Chromium Code Reviews| Index: src/ia32/lithium-codegen-ia32.cc |
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
| index dfced7c221335f060f7c333e02c0ec38bb7516d8..36168130b29b020a1f977c8e11c8965c6f838d8e 100644 |
| --- a/src/ia32/lithium-codegen-ia32.cc |
| +++ b/src/ia32/lithium-codegen-ia32.cc |
| @@ -100,6 +100,10 @@ void LCodeGen::FinishCode(Handle<Code> code) { |
| if (!info()->IsStub()) { |
| Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code); |
| } |
| + for (int i = 0 ; i < prototype_maps_.length(); i++) { |
| + prototype_maps_.at(i)->AddDependentCode( |
| + DependentCodes::kPrototypeCheckGroup, code); |
| + } |
| } |
| @@ -5332,9 +5336,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()); |
| + } |
|
Toon Verwaest
2013/02/13 10:40:07
Is there a reason you copy the maps list, rather t
ulan
2013/02/13 12:27:38
Yep, the prototype_maps_ list collects maps from m
|
| + __ LoadHeapObject(reg, prototypes->at(prototypes->length() - 1)); |
|
Toon Verwaest
2013/02/13 10:40:07
Do all clients depend on this object being loaded?
ulan
2013/02/13 12:27:38
The result is the holder and it is used in all cal
|
| + } else { |
| + for (int i = 0; i < prototypes->length(); i++) { |
| + __ LoadHeapObject(reg, prototypes->at(i)); |
| + DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr); |
| + } |
| } |
| } |