diff -r 9d17f29fe16a -r 23a804fa1d3e src/Structures.cpp --- a/src/Structures.cpp Sun Sep 16 22:49:54 2012 -0700 +++ b/src/Structures.cpp Sun Sep 16 23:15:13 2012 -0700 @@ -20,6 +20,7 @@ #include "Structures.h" #include "Zone.h" #include "Types.h" +#include "Array.h" #include "Spaces-inl.h" #include "Heap-inl.h" @@ -98,16 +99,23 @@ // struct allocation, rather than inlined in bytecode, for simplicity. if (map->composed()) { Local desc(zone); - Local child(zone); - Local childMap(zone); + Local child(zone); + Local childStructMap(zone); + Local childArrayMap(zone); + for (unsigned i = 0; i < map->composed()->length(); i++) { desc = Descriptor::cast(map->composed()->at(i)); - // We don't support composing arrays yet. - assert(desc->type()->isStruct()); - - childMap = StructMap::cast(desc->type()->newMap()); - child = Struct::New(zone, childMap, tenure); + if (desc->type()->isStruct()) { + childStructMap = StructMap::cast(desc->type()->newMap()); + child = Struct::New(zone, childStructMap, tenure); + } else if (desc->type()->isArray()) { + childArrayMap = ArrayMap::cast(desc->type()->newMap()); + if (desc->type()->isFixedLength()) + child = Array::NewFixed(zone, childArrayMap, tenure); + else + child = Array::NewEmpty(zone, childArrayMap, tenure); + } if (!child) return NULL;