Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index abbeff27d94ef564668d746e5ece51eb73635e08..6ec68fc25e8a58bba8a46405784080e5bdf94cc1 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2050,9 +2050,8 @@ void Heap::ScavengeObjectSlow(HeapObject** p, HeapObject* object) { |
MaybeObject* Heap::AllocatePartialMap(InstanceType instance_type, |
int instance_size) { |
Object* result; |
- { MaybeObject* maybe_result = AllocateRawMap(); |
- if (!maybe_result->ToObject(&result)) return maybe_result; |
- } |
+ MaybeObject* maybe_result = AllocateRawMap(); |
+ if (!maybe_result->ToObject(&result)) return maybe_result; |
// Map::cast cannot be used due to uninitialized map field. |
reinterpret_cast<Map*>(result)->set_map(raw_unchecked_meta_map()); |
@@ -2065,8 +2064,7 @@ MaybeObject* Heap::AllocatePartialMap(InstanceType instance_type, |
reinterpret_cast<Map*>(result)->set_unused_property_fields(0); |
reinterpret_cast<Map*>(result)->set_bit_field(0); |
reinterpret_cast<Map*>(result)->set_bit_field2(0); |
- reinterpret_cast<Map*>(result)->set_bit_field3( |
- Map::LastAddedBits::encode(Map::kNoneAdded)); |
+ reinterpret_cast<Map*>(result)->set_bit_field3(0); |
return result; |
} |
@@ -2093,7 +2091,7 @@ MaybeObject* Heap::AllocateMap(InstanceType instance_type, |
map->set_unused_property_fields(0); |
map->set_bit_field(0); |
map->set_bit_field2(1 << Map::kIsExtensible); |
- map->set_bit_field3(Map::LastAddedBits::encode(Map::kNoneAdded)); |
+ map->set_bit_field3(0); |
map->set_elements_kind(elements_kind); |
// If the map object is aligned fill the padding area with Smi 0 objects. |
@@ -3885,7 +3883,7 @@ MaybeObject* Heap::AllocateInitialMap(JSFunction* fun) { |
FieldDescriptor field(name, i, NONE, i + 1); |
descriptors->Set(i, &field, witness); |
} |
- descriptors->Sort(witness); |
+ descriptors->Sort(); |
// The descriptors may contain duplicates because the compiler does not |
// guarantee the uniqueness of property names (it would have required |
@@ -4157,8 +4155,9 @@ MaybeObject* Heap::AllocateGlobalObject(JSFunction* constructor) { |
for (int i = 0; i < descs->number_of_descriptors(); i++) { |
PropertyDetails details = descs->GetDetails(i); |
ASSERT(details.type() == CALLBACKS); // Only accessors are expected. |
- PropertyDetails d = |
- PropertyDetails(details.attributes(), CALLBACKS, details.index()); |
+ PropertyDetails d = PropertyDetails(details.attributes(), |
+ CALLBACKS, |
+ details.descriptor_index()); |
Object* value = descs->GetCallbacksObject(i); |
MaybeObject* maybe_value = AllocateJSGlobalPropertyCell(value); |
if (!maybe_value->ToObject(&value)) return maybe_value; |