1.1 --- a/jitcraft/Types.h Sat Jul 07 17:11:31 2012 -0700
1.2 +++ b/jitcraft/Types.h Sat Jul 07 20:28:29 2012 -0700
1.3 @@ -19,13 +19,14 @@
1.4 #ifndef _include_jc_types_h_
1.5 #define _include_jc_types_h_
1.6
1.7 -#include "StringPool.h"
1.8 #include "Heap.h"
1.9 #include "Barriers.h"
1.10 #include "FixedArray.h"
1.11
1.12 namespace jc {
1.13
1.14 +class String;
1.15 +
1.16 enum PrimitiveType
1.17 {
1.18 PrimitiveType_Char, // signed, 8-bit character
1.19 @@ -53,7 +54,7 @@
1.20 static const int UNKNOWN_SIZE = -1;
1.21 static const size_t MAX_UNSAFE_ARRAY_DEPTH = 5;
1.22
1.23 - static Type *NewPrimitive(Zone *zone, Name *tag);
1.24 + static Type *NewPrimitive(Zone *zone, Handle<String> tag);
1.25 static Type *NewPrimitive(Zone *zone, PrimitiveType type);
1.26 static Type *NewArray(Zone *zone, Handle<Type> contained, int elements, bool isConst);
1.27 static Type *NewReference(Zone *zone, Handle<Type> contained);
1.28 @@ -92,7 +93,7 @@
1.29 assert(isArray());
1.30 return levels_;
1.31 }
1.32 - Name *tag() {
1.33 + String *tag() {
1.34 assert(isPrimitive());
1.35 return tag_;
1.36 }
1.37 @@ -143,12 +144,15 @@
1.38 static inline size_t offsetOfParameters() {
1.39 return offsetof(Type, parameters_);
1.40 }
1.41 + static inline size_t offsetOfTag() {
1.42 + return offsetof(Type, tag_);
1.43 + }
1.44 // End GC Descriptor.
1.45
1.46 private:
1.47 Kind kind_;
1.48 PrimitiveType primitive_;
1.49 - Name *tag_;
1.50 + Barriered<String> tag_;
1.51
1.52 // Arrays only.
1.53 int32 elements_;