diff -r 13bd3a8df334 -r 8e22792a3921 jitcraft/Types.h --- a/jitcraft/Types.h Sat Jul 07 17:11:31 2012 -0700 +++ b/jitcraft/Types.h Sat Jul 07 20:28:29 2012 -0700 @@ -19,13 +19,14 @@ #ifndef _include_jc_types_h_ #define _include_jc_types_h_ -#include "StringPool.h" #include "Heap.h" #include "Barriers.h" #include "FixedArray.h" namespace jc { +class String; + enum PrimitiveType { PrimitiveType_Char, // signed, 8-bit character @@ -53,7 +54,7 @@ static const int UNKNOWN_SIZE = -1; static const size_t MAX_UNSAFE_ARRAY_DEPTH = 5; - static Type *NewPrimitive(Zone *zone, Name *tag); + static Type *NewPrimitive(Zone *zone, Handle tag); static Type *NewPrimitive(Zone *zone, PrimitiveType type); static Type *NewArray(Zone *zone, Handle contained, int elements, bool isConst); static Type *NewReference(Zone *zone, Handle contained); @@ -92,7 +93,7 @@ assert(isArray()); return levels_; } - Name *tag() { + String *tag() { assert(isPrimitive()); return tag_; } @@ -143,12 +144,15 @@ static inline size_t offsetOfParameters() { return offsetof(Type, parameters_); } + static inline size_t offsetOfTag() { + return offsetof(Type, tag_); + } // End GC Descriptor. private: Kind kind_; PrimitiveType primitive_; - Name *tag_; + Barriered tag_; // Arrays only. int32 elements_;