Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 353f8f2d669a33058eb009421f549609675bbb06..faeb841d30c0951c18491830d9175ef4804e470b 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -87,6 +87,10 @@ void LCodeGen::FinishCode(Handle<Code> code) { |
RegisterDependentCodeForEmbeddedMaps(code); |
} |
PopulateDeoptimizationData(code); |
+ for (int i = 0 ; i < prototype_maps_.length(); i++) { |
+ prototype_maps_.at(i)->AddDependentCode( |
+ DependentCode::kPrototypeCheckGroup, code); |
+ } |
} |
@@ -887,7 +891,7 @@ void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) { |
NoWeakEmbeddedMapsVerificationScope disable_verification_of_embedded_maps; |
#endif |
for (int i = 0; i < maps.length(); i++) { |
- maps.at(i)->AddDependentCode(code); |
+ maps.at(i)->AddDependentCode(DependentCode::kWeaklyEmbeddedGroup, code); |
} |
} |
@@ -5478,13 +5482,21 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { |
ASSERT(prototypes->length() == maps->length()); |
- for (int i = 0; i < prototypes->length(); i++) { |
- __ LoadHeapObject(prototype_reg, prototypes->at(i)); |
- __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); |
- DoCheckMapCommon(map_reg, |
- maps->at(i), |
- ALLOW_ELEMENT_TRANSITION_MAPS, |
- instr->environment()); |
+ if (instr->hydrogen()->CanOmitPrototypeChecks()) { |
+ for (int i = 0; i < maps->length(); i++) { |
+ prototype_maps_.Add(maps->at(i), info()->zone()); |
+ } |
+ __ LoadHeapObject(prototype_reg, |
+ prototypes->at(prototypes->length() - 1)); |
+ } else { |
+ for (int i = 0; i < prototypes->length(); i++) { |
+ __ LoadHeapObject(prototype_reg, prototypes->at(i)); |
+ __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); |
+ DoCheckMapCommon(map_reg, |
+ maps->at(i), |
+ ALLOW_ELEMENT_TRANSITION_MAPS, |
+ instr->environment()); |
+ } |
} |
} |