| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index f71bf38e42a0ecae4453f12dd29b9a018c5c550d..a6cc152b9a3169873b7f6ec1197cd0e613ef3a20 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -89,6 +89,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);
|
| + }
|
| }
|
|
|
|
|
| @@ -4906,9 +4910,16 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
|
|
|
| ASSERT(prototypes->length() == maps->length());
|
|
|
| - for (int i = 0; i < prototypes->length(); i++) {
|
| - __ LoadHeapObject(reg, prototypes->at(i));
|
| - DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr);
|
| + if (instr->hydrogen()->CanOmitPrototypeChecks()) {
|
| + for (int i = 0; i < maps->length(); i++) {
|
| + prototype_maps_.Add(maps->at(i), info()->zone());
|
| + }
|
| + __ LoadHeapObject(reg, prototypes->at(prototypes->length() - 1));
|
| + } else {
|
| + for (int i = 0; i < prototypes->length(); i++) {
|
| + __ LoadHeapObject(reg, prototypes->at(i));
|
| + DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr);
|
| + }
|
| }
|
| }
|
|
|
|
|