Mercurial > repos > rhope
diff runtime/object.h @ 12:31f8182f3433
Finished fib test and did some small work on the c backend
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 25 May 2009 23:34:36 -0400 |
parents | 0f2c4ee070fe |
children | 914ad38f9b59 |
line wrap: on
line diff
--- a/runtime/object.h Tue May 19 23:29:55 2009 -0400 +++ b/runtime/object.h Mon May 25 23:34:36 2009 -0400 @@ -1,5 +1,5 @@ -#ifndef _OBJECT_H_ -#define _OBJECT_H_ +#ifndef OBJECT_H_ +#define OBJECT_H_ #include "plat_types.h" #include "thread.h" @@ -41,23 +41,24 @@ typedef struct calldata { - rhope_func tail_func; - struct context *ct; - void *locals; - uint32_t original_methodid; - uint16_t num_params; - uint16_t resume; - object *params[1]; + rhope_func tail_func; + struct context *ct; + void *locals; + struct calldata *call; + uint32_t original_methodid; + uint16_t num_params; + uint16_t resume; + object *params[1]; } calldata; #define OBegin typedef struct { object header; -#define Object(name) } _t_ ## name; +#define Object(name) } t_ ## name; #define MOBegin typedef struct { multisize header; #define get_blueprint(object) (object)->bprint -#define add_ref(object) rh_atomic_add(&(object->header), refcount, 1) +#define add_ref(object) (rh_atomic_add((object), refcount, 1),object) returntype call_method(uint32_t methodid, calldata * params); returntype set_field(uint32_t setfieldid, calldata * params); @@ -79,4 +80,4 @@ #define INITIAL_METHOD_LOOKUP 8 #define BELOW_INITIAL_METHOD 3 -#endif //_OBJECT_H_ +#endif //OBJECT_H_