| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 87eb954093589126995a2593ee5756519f4f6fe2..77557c58c7d14184d1d0ff580814ca7a0a9a4849 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -4778,25 +4778,15 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
|
| ASSERT(instr->temp()->Equals(instr->result()));
|
| Register reg = ToRegister(instr->temp());
|
|
|
| - Handle<JSObject> holder = instr->holder();
|
| - Handle<JSObject> current_prototype = instr->prototype();
|
| + ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
|
| + ZoneList<Handle<Map> >* maps = instr->maps();
|
|
|
| - // Load prototype object.
|
| - __ LoadHeapObject(reg, current_prototype);
|
| + ASSERT(prototypes->length() == maps->length());
|
|
|
| - // Check prototype maps up to the holder.
|
| - while (!current_prototype.is_identical_to(holder)) {
|
| - DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()),
|
| - ALLOW_ELEMENT_TRANSITION_MAPS, instr);
|
| - current_prototype =
|
| - Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
|
| - // Load next prototype object.
|
| - __ LoadHeapObject(reg, current_prototype);
|
| + for (int i = 0; i < prototypes->length(); i++) {
|
| + __ LoadHeapObject(reg, prototypes->at(i));
|
| + DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr);
|
| }
|
| -
|
| - // Check the holder map.
|
| - DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()),
|
| - ALLOW_ELEMENT_TRANSITION_MAPS, instr);
|
| }
|
|
|
|
|
|
|