| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index f1ec56ce5a862ad7a6ae811f1391408335db802c..3098569e3a42313e6d128ae6164c4595b5dad6e6 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -1217,7 +1217,7 @@ Object* Heap::AllocateMap(InstanceType instance_type, int instance_size) {
|
| map->set_code_cache(empty_fixed_array());
|
| map->set_unused_property_fields(0);
|
| map->set_bit_field(0);
|
| - map->set_bit_field2(1 << Map::kIsExtensible);
|
| + map->set_bit_field2((1 << Map::kIsExtensible) | (1 << Map::kHasFastElements));
|
|
|
| // If the map object is aligned fill the padding area with Smi 0 objects.
|
| if (Map::kPadStart < Map::kSize) {
|
| @@ -2545,6 +2545,7 @@ Object* Heap::AllocateInitialMap(JSFunction* fun) {
|
| map->set_inobject_properties(in_object_properties);
|
| map->set_unused_property_fields(in_object_properties);
|
| map->set_prototype(prototype);
|
| + ASSERT(map->has_fast_elements());
|
|
|
| // If the function has only simple this property assignments add
|
| // field descriptors for these to the initial map as the object
|
| @@ -2598,8 +2599,8 @@ Object* Heap::AllocateJSObjectFromMap(Map* map, PretenureFlag pretenure) {
|
| // properly initialized.
|
| ASSERT(map->instance_type() != JS_FUNCTION_TYPE);
|
|
|
| - // Both types of globla objects should be allocated using
|
| - // AllocateGloblaObject to be properly initialized.
|
| + // Both types of global objects should be allocated using
|
| + // AllocateGlobalObject to be properly initialized.
|
| ASSERT(map->instance_type() != JS_GLOBAL_OBJECT_TYPE);
|
| ASSERT(map->instance_type() != JS_BUILTINS_OBJECT_TYPE);
|
|
|
| @@ -2623,6 +2624,7 @@ Object* Heap::AllocateJSObjectFromMap(Map* map, PretenureFlag pretenure) {
|
| InitializeJSObjectFromMap(JSObject::cast(obj),
|
| FixedArray::cast(properties),
|
| map);
|
| + ASSERT(JSObject::cast(obj)->HasFastElements());
|
| return obj;
|
| }
|
|
|
|
|