diff -r 0c588a96837c -r 0cde1379b29f src/Types.cpp --- a/src/Types.cpp Mon Nov 19 02:12:13 2012 -0800 +++ b/src/Types.cpp Thu Dec 20 00:59:38 2012 -0800 @@ -102,16 +102,17 @@ return type; } -Type * -Type::NewReference(Zone *zone, Handle contained, bool isConst) +ReferenceType * +ReferenceType::New(Zone *zone, Handle contained) { - Local type(zone, Type::cast(zone->allocate(MapKind_Type, sizeof(Type), Heap::Tenure_Old))); + Local type(zone, ReferenceType::cast(zone->allocate(MapKind_ReferenceType, sizeof(ReferenceType), Heap::Tenure_Old))); if (!type) return NULL; type->kind_ = REFERENCE; type->name_ = NULL; - type->const_ = isConst; + type->const_ = false; + type->contained_ = contained; return type; } @@ -204,7 +205,7 @@ default: assert(left->kind() == Type::REFERENCE); - return Compare(left->contained_ref(), right->contained_ref()); + return Compare(ReferenceType::cast(left)->contained(), ReferenceType::cast(right)->contained()); } } @@ -286,7 +287,7 @@ if (type->isEnum() || type->isStruct()) return type->name()->chars(); if (type->isReference()) - type = type->contained_ref(); + type = ReferenceType::cast(type)->contained(); switch (type->primitive()) { case PrimitiveType_Bool: return "bool";