diff -r f6b1a68e7ebb -r c920f9328716 jitcraft/Code.h --- a/jitcraft/Code.h Tue Jul 03 01:25:23 2012 -0700 +++ b/jitcraft/Code.h Tue Jul 03 08:30:09 2012 -0700 @@ -69,6 +69,21 @@ return objects_->at(index); } + // GC Descriptor. + static inline size_t offsetOfModule() { + return offsetof(Code, module_); + } + static inline size_t offsetOfBytecode() { + return offsetof(Code, bytecode_); + } + static inline size_t offsetOfLocals() { + return offsetof(Code, locals_); + } + static inline size_t offsetOfObjects() { + return offsetof(Code, objects_); + } + // End GC Descriptor. + static Code *cast(Object *obj) { assert(!obj || obj->is(MapKind_Code)); return reinterpret_cast(obj);