| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 43522ab8edc57a9e695d8b6359b4c43ae6b3e353..716a0301c64cdfa246fa14b2d24e282f93c6502e 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -2197,6 +2197,8 @@ MaybeObject* Heap::AllocateMap(InstanceType instance_type,
|
| map->set_inobject_properties(0);
|
| map->set_pre_allocated_property_fields(0);
|
| map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER);
|
| + map->set_dependent_codes(DependentCodes::cast(empty_fixed_array()),
|
| + SKIP_WRITE_BARRIER);
|
| map->init_back_pointer(undefined_value());
|
| map->set_unused_property_fields(0);
|
| map->set_instance_descriptors(empty_descriptor_array());
|
| @@ -2332,14 +2334,18 @@ bool Heap::CreateInitialMaps() {
|
|
|
| // Fix the instance_descriptors for the existing maps.
|
| meta_map()->set_code_cache(empty_fixed_array());
|
| + meta_map()->set_dependent_codes(DependentCodes::cast(empty_fixed_array()));
|
| meta_map()->init_back_pointer(undefined_value());
|
| meta_map()->set_instance_descriptors(empty_descriptor_array());
|
|
|
| fixed_array_map()->set_code_cache(empty_fixed_array());
|
| + fixed_array_map()->set_dependent_codes(
|
| + DependentCodes::cast(empty_fixed_array()));
|
| fixed_array_map()->init_back_pointer(undefined_value());
|
| fixed_array_map()->set_instance_descriptors(empty_descriptor_array());
|
|
|
| oddball_map()->set_code_cache(empty_fixed_array());
|
| + oddball_map()->set_dependent_codes(DependentCodes::cast(empty_fixed_array()));
|
| oddball_map()->init_back_pointer(undefined_value());
|
| oddball_map()->set_instance_descriptors(empty_descriptor_array());
|
|
|
| @@ -3788,6 +3794,9 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc,
|
| code->set_gc_metadata(Smi::FromInt(0));
|
| code->set_ic_age(global_ic_age_);
|
| code->set_prologue_offset(kPrologueOffsetNotSet);
|
| + if (code->kind() == Code::OPTIMIZED_FUNCTION) {
|
| + code->set_marked_for_deoptimization(false);
|
| + }
|
| // Allow self references to created code object by patching the handle to
|
| // point to the newly allocated Code object.
|
| if (!self_reference.is_null()) {
|
|
|