diff -r 7c5be05296e3 -r 5cbec15fadfe src/Array.cpp --- a/src/Array.cpp Sat Nov 17 22:02:08 2012 -0800 +++ b/src/Array.cpp Sat Nov 17 23:11:38 2012 -0800 @@ -27,7 +27,7 @@ using namespace ke; ArrayMap * -ArrayMap::New(Zone *zone, Handle type) +ArrayMap::New(Zone *zone, Handle type) { Local obj(zone, zone->allocateMap(MapKind_Array, sizeof(ArrayMap), MapKind_MetaArray)); if (!obj) @@ -39,7 +39,7 @@ } ArrayMap * -ArrayMap::Attach(Zone *zone, Handle type) +ArrayMap::Attach(Zone *zone, Handle type) { if (type->newMap()) return ArrayMap::cast(type->newMap()); @@ -50,7 +50,7 @@ // Ensure the inner type has an ArrayMap if needed. if (type->contained()->isArray()) { - Local contained(zone, type->contained()); + Local contained(zone, ArrayType::cast(type->contained())); if (!ArrayMap::Attach(zone, contained)) return NULL; } @@ -114,7 +114,8 @@ // If this is an array of structs, we're required to allocate those structs now. if (map->type()->contained()->isStruct()) { - Local childMap(zone, StructMap::cast(map->type()->contained()->newMap())); + Local childType(zone, StructType::cast(map->type()->contained())); + Local childMap(zone, childType->newMap()); Local child(zone); for (unsigned i = 0; i < nelements; i++) { child = Struct::New(zone, childMap, tenure); @@ -137,7 +138,8 @@ return NULL; if (map->type()->contained()->isArray()) { - Local childMap(zone, ArrayMap::cast(map->type()->contained()->newMap())); + Local childType(zone, ArrayType::cast(map->type()->contained())); + Local childMap(zone, childType->newMap()); Local child(zone); for (unsigned i = 0; i < unsigned(dims[level]); i++) { @@ -174,7 +176,8 @@ return NULL; if (map->type()->contained()->isArray()) { - Local childMap(zone, ArrayMap::cast(map->type()->contained()->newMap())); + Local childType(zone, ArrayType::cast(map->type()->contained())); + Local childMap(zone, childType->newMap()); Local child(zone); if (childMap->type()->isFixedLength()) {