comparison runtime/object.h @ 8:8d74ef7fa357

Improved helper macros and added separate Rhope stack in runtime
author Mike Pavone <pavone@retrodev.com>
date Wed, 13 May 2009 23:37:19 -0400
parents d61550e2c001
children 0f2c4ee070fe
comparison
equal deleted inserted replaced
7:d61550e2c001 8:8d74ef7fa357
1 #ifndef _OBJECT_H_ 1 #ifndef _OBJECT_H_
2 #define _OBJECT_H_ 2 #define _OBJECT_H_
3 3
4 #include "plat_types.h" 4 #include "plat_types.h"
5 #include "thread.h" 5 #include "thread.h"
6 6 #include "func.h"
7 typedef enum {
8 NORMAL_RETURN=0,
9 EXCEPTION_RETURN,
10 TAIL_RETURN,
11 NO_CONVERSION,
12 STACK_UNWIND
13 } returntype;
14
15
16 typedef returntype (*rhope_func)(struct calldata *);
17 typedef void (*special_func) (struct object *);
18 7
19 typedef struct{ 8 typedef struct{
20 rhope_func *method_lookup; 9 rhope_func *method_lookup;
21 rhope_func *getter_lookup; 10 rhope_func *getter_lookup;
22 rhope_func *setter_lookup; 11 rhope_func *setter_lookup;
50 uint32_t size; 39 uint32_t size;
51 } multisize; 40 } multisize;
52 41
53 42
54 typedef struct calldata { 43 typedef struct calldata {
55 rhope_func tail_func; 44 rhope_func tail_func;
56 uint32_t num_params; 45 struct context *ct;
57 uint32_t original_methodid; 46 uint32_t num_params;
58 object *params[32]; 47 uint32_t original_methodid;
48 object *params[1];
59 } calldata; 49 } calldata;
60 50
61 #define OBegin typedef struct { object header; 51 #define OBegin typedef struct { object header;
62 #define Object(name) } _t_ ## name; 52 #define Object(name) } _t_ ## name;
63 53