1.1 --- a/src/Types.h Sat Nov 17 23:13:39 2012 -0800
1.2 +++ b/src/Types.h Sun Nov 18 14:53:23 2012 -0800
1.3 @@ -100,9 +100,7 @@
1.4 return kind_;
1.5 }
1.6
1.7 - public:
1.8 - static const int DYNAMIC_ARRAY_SIZE = -1;
1.9 -
1.10 + public:
1.11 static Type *NewVoid(Zone *zone);
1.12 static Type *NewUnchecked(Zone *zone);
1.13 static Type *NewPrimitive(Zone *zone, PrimitiveType type);
1.14 @@ -156,6 +154,9 @@
1.15 : primitive()
1.16 : PrimitiveType_Int32;
1.17 }
1.18 + bool isChar() {
1.19 + return isPrimitive() && primitive() == PrimitiveType_Char;
1.20 + }
1.21 bool isFloat() {
1.22 return isPrimitive() && primitive() == PrimitiveType_Float;
1.23 }
1.24 @@ -213,6 +214,8 @@
1.25 class ArrayType : public Type
1.26 {
1.27 public:
1.28 + static const int DYNAMIC_ARRAY_SIZE = -1;
1.29 +
1.30 static ArrayType *New(Zone *zone, Handle<Type> contained, int elements);
1.31 static ArrayType *NewExternal(Zone *zone, Handle<Type> contained);
1.32