| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index 762c4f9962716b477224c59e76418d7e3db7132f..c37fe57b6a04eb692212e4c5ba3f49ac370b3560 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -1830,6 +1830,60 @@ bool Genesis::InstallNatives() {
|
| native_context()->set_regexp_result_map(*initial_map);
|
| }
|
|
|
| + // Should be flag-guarded with FLAG_harmony_observation, but can't due to
|
| + // context snapshotting.
|
| + {
|
| + Handle<Map> change_record_map =
|
| + factory()->NewMap(JS_OBJECT_TYPE, JSChangeRecord::kSize);
|
| + change_record_map->set_constructor(native_context()->object_function());
|
| + change_record_map->set_non_instance_prototype(false);
|
| + change_record_map->set_prototype(
|
| + native_context()->initial_object_prototype());
|
| +
|
| + Handle<DescriptorArray> descriptors = factory()->NewDescriptorArray(0, 4);
|
| + DescriptorArray::WhitenessWitness witness(*descriptors);
|
| + change_record_map->set_instance_descriptors(*descriptors);
|
| +
|
| + PropertyAttributes attrs =
|
| + static_cast<PropertyAttributes>(READ_ONLY | DONT_DELETE);
|
| + {
|
| + FieldDescriptor field(
|
| + heap()->type_symbol(), JSChangeRecord::kTypeIndex, attrs);
|
| + change_record_map->AppendDescriptor(&field, witness);
|
| + }
|
| + {
|
| + FieldDescriptor field(
|
| + heap()->object_symbol(), JSChangeRecord::kObjectIndex, attrs);
|
| + change_record_map->AppendDescriptor(&field, witness);
|
| + }
|
| + {
|
| + FieldDescriptor field(
|
| + heap()->name_symbol(), JSChangeRecord::kNameIndex, attrs);
|
| + change_record_map->AppendDescriptor(&field, witness);
|
| + }
|
| +
|
| + change_record_map->set_inobject_properties(4);
|
| + change_record_map->set_pre_allocated_property_fields(3);
|
| + change_record_map->set_unused_property_fields(1);
|
| +
|
| + change_record_map->set_is_extensible(false);
|
| +
|
| + native_context()->set_change_record_map(*change_record_map);
|
| +
|
| + // Create a different map for change records with an oldValue property.
|
| + {
|
| + FieldDescriptor field(
|
| + heap()->oldvalue_symbol(), JSChangeRecord::kOldValueIndex, attrs);
|
| + MaybeObject* maybe_map = change_record_map->CopyAddDescriptor(
|
| + &field, OMIT_TRANSITION);
|
| + if (!maybe_map->ToHandle(&change_record_map, isolate())) return false;
|
| + }
|
| + change_record_map->set_inobject_properties(4);
|
| + change_record_map->set_pre_allocated_property_fields(4);
|
| + change_record_map->set_unused_property_fields(0);
|
| + native_context()->set_change_record_oldvalue_map(*change_record_map);
|
| + }
|
| +
|
| #ifdef VERIFY_HEAP
|
| builtins->Verify();
|
| #endif
|
|
|