Mercurial > repos > rhope
diff runtime/object.h @ 49:3e20ed8959c4
Added initial FFI implementation, Array type and 64-bit integers
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 08 Apr 2010 01:02:18 -0400 |
parents | aabda74c7a88 |
children | 70af7fa155d0 |
line wrap: on
line diff
--- a/runtime/object.h Tue Mar 02 00:18:49 2010 -0500 +++ b/runtime/object.h Thu Apr 08 01:02:18 2010 -0400 @@ -26,8 +26,8 @@ uint32_t last_convertto; uint32_t first_convertfrom; uint32_t last_convertfrom; - uint32_t size; - uint32_t boxed_size; + int32_t size; + int32_t boxed_size; } blueprint; typedef struct object { @@ -53,10 +53,9 @@ } calldata; #define OBegin typedef struct { -#define Object(name) } nt_ ## name; typedef struct { object _SP_header; nt_ ## name payload; } t_ ## name; -#define Box(nakedtype,fieldname,objectname) typedef struct{ object _SP_header; nakedtype fieldname; } t_ ## objectname; - -#define MOBegin typedef struct { multisize header; +#define Object(name) } nt_ ## name; typedef struct { object SP_header; nt_ ## name payload; } t_ ## name; +#define MObject(name) } nt_ ## name; typedef struct { multisize SP_header; nt_ ## name payload; } t_ ## name; +#define Box(nakedtype,fieldname,objectname) typedef struct{ object SP_header; nakedtype fieldname; } t_ ## objectname; #define get_blueprint(object) (object)->bprint @@ -71,8 +70,8 @@ object * new_object_bp(blueprint * bp); multisize * new_multisize(uint32_t type, uint32_t size); void release_ref(object * obj); -blueprint * register_type_byid(uint32_t type, uint32_t size, special_func init, special_func copy, special_func cleanup); -blueprint * new_blueprint(uint32_t type, uint32_t size, special_func init, special_func copy, special_func cleanup); +blueprint * register_type_byid(uint32_t type, int32_t size, special_func init, special_func copy, special_func cleanup); +blueprint * new_blueprint(uint32_t type, int32_t size, special_func init, special_func copy, special_func cleanup); void add_method(blueprint * bp, uint32_t methodid, rhope_func impl); void add_getter(blueprint * bp, uint32_t fieldid, rhope_func impl); void add_setter(blueprint * bp, uint32_t fieldid, rhope_func impl);