diff -r cbba1997dc71 -r b765a6383849 jitcraft/TypeManager.cpp --- a/jitcraft/TypeManager.cpp Mon Jul 09 21:40:20 2012 -0700 +++ b/jitcraft/TypeManager.cpp Mon Jul 09 22:25:52 2012 -0700 @@ -54,7 +54,7 @@ Local type(zone_); for (unsigned i = 0; i < PrimitiveTypes_Total; i++) { type = primitiveTypes_[i]; - if ((referenceTypes_[i] = Type::NewReference(zone_, type)) == NULL) + if ((referenceTypes_[i] = Type::NewReference(zone_, type, false)) == NULL) return false; } @@ -74,20 +74,20 @@ } Type * -TypeManager::unsafeArray(Handle contained, int elements) +TypeManager::unsafeArray(Handle contained, int elements, bool isConst) { // :TODO: cache this. - return Type::NewArray(zone_, contained, elements, false); + return Type::NewArray(zone_, contained, elements, isConst); } Type * -TypeManager::getReference(Handle type) +TypeManager::getReference(Handle type, bool isConst) { - if (type->isFloat() || (type->isInt32() && !type->tag())) + if (!isConst && (type->isFloat() || (type->isInt32() && !type->tag()))) return referenceTypes_[type->primitive()]; // :TODO: cache this. - return Type::NewReference(zone_, type); + return Type::NewReference(zone_, type, isConst); } Type *