| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 9fdb22b8d50114c43dba07cab931fa8403f0616f..de1dba0363de217908471f4c1383f5150088da2f 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -84,6 +84,10 @@ void LCodeGen::FinishCode(Handle<Code> code) {
|
| code->set_stack_slots(GetStackSlotCount());
|
| code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
|
| PopulateDeoptimizationData(code);
|
| + for (int i = 0 ; i < prototype_maps_.length(); i++) {
|
| + prototype_maps_.at(i)->AddDependentCode(
|
| + DependentCode::kPrototypeCheckGroup, code);
|
| + }
|
| }
|
|
|
|
|
| @@ -5481,13 +5485,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());
|
| + }
|
| }
|
| }
|
|
|
|
|