Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 2ca585d63537d803afa097ac34f52a0580f26919..b3caeef8c478409ebb68df32004e0d6cf4e6de3b 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -92,7 +92,20 @@ void LCodeGen::FinishCode(Handle<Code> code) { |
RegisterDependentCodeForEmbeddedMaps(code); |
} |
PopulateDeoptimizationData(code); |
- info()->CommitDependentMaps(code); |
+ for (int i = 0 ; i < prototype_maps_.length(); i++) { |
+ prototype_maps_.at(i)->AddDependentCode( |
+ DependentCode::kPrototypeCheckGroup, code); |
+ } |
+ for (int i = 0 ; i < transition_maps_.length(); i++) { |
+ transition_maps_.at(i)->AddDependentCode( |
+ DependentCode::kTransitionGroup, code); |
+ } |
+ if (graph()->depends_on_empty_array_proto_elements()) { |
+ isolate()->initial_object_prototype()->map()->AddDependentCode( |
+ DependentCode::kElementsCantBeAddedGroup, code); |
+ isolate()->initial_array_prototype()->map()->AddDependentCode( |
+ DependentCode::kElementsCantBeAddedGroup, code); |
+ } |
} |
@@ -3995,6 +4008,9 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
} |
if (!transition.is_null()) { |
+ if (transition->CanBeDeprecated()) { |
+ transition_maps_.Add(transition, info()->zone()); |
+ } |
if (!instr->hydrogen()->NeedsWriteBarrierForMap()) { |
__ Move(FieldOperand(object, HeapObject::kMapOffset), transition); |
} else { |
@@ -5067,7 +5083,11 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { |
ASSERT(prototypes->length() == maps->length()); |
- if (!instr->hydrogen()->CanOmitPrototypeChecks()) { |
+ if (instr->hydrogen()->CanOmitPrototypeChecks()) { |
+ for (int i = 0; i < maps->length(); i++) { |
+ prototype_maps_.Add(maps->at(i), info()->zone()); |
+ } |
+ } else { |
for (int i = 0; i < prototypes->length(); i++) { |
__ LoadHeapObject(reg, prototypes->at(i)); |
DoCheckMapCommon(reg, maps->at(i), instr); |