1.1 --- a/src/Types.cpp Mon Nov 19 02:12:13 2012 -0800
1.2 +++ b/src/Types.cpp Thu Dec 20 00:59:38 2012 -0800
1.3 @@ -102,16 +102,17 @@
1.4 return type;
1.5 }
1.6
1.7 -Type *
1.8 -Type::NewReference(Zone *zone, Handle<Type> contained, bool isConst)
1.9 +ReferenceType *
1.10 +ReferenceType::New(Zone *zone, Handle<Type> contained)
1.11 {
1.12 - Local<Type> type(zone, Type::cast(zone->allocate(MapKind_Type, sizeof(Type), Heap::Tenure_Old)));
1.13 + Local<ReferenceType> type(zone, ReferenceType::cast(zone->allocate(MapKind_ReferenceType, sizeof(ReferenceType), Heap::Tenure_Old)));
1.14 if (!type)
1.15 return NULL;
1.16
1.17 type->kind_ = REFERENCE;
1.18 type->name_ = NULL;
1.19 - type->const_ = isConst;
1.20 + type->const_ = false;
1.21 + type->contained_ = contained;
1.22 return type;
1.23 }
1.24
1.25 @@ -204,7 +205,7 @@
1.26
1.27 default:
1.28 assert(left->kind() == Type::REFERENCE);
1.29 - return Compare(left->contained_ref(), right->contained_ref());
1.30 + return Compare(ReferenceType::cast(left)->contained(), ReferenceType::cast(right)->contained());
1.31 }
1.32 }
1.33
1.34 @@ -286,7 +287,7 @@
1.35 if (type->isEnum() || type->isStruct())
1.36 return type->name()->chars();
1.37 if (type->isReference())
1.38 - type = type->contained_ref();
1.39 + type = ReferenceType::cast(type)->contained();
1.40 switch (type->primitive()) {
1.41 case PrimitiveType_Bool:
1.42 return "bool";