Revision: 13476
Author: [email protected]
Date: Wed Jan 23 06:01:11 2013
Log: MIPS: Make HCheckPrototypeMaps compatible with parallel
recompilation.
Port r13454 (2c0dd0ff)
Original commit message:
HCheckPrototypeMaps currently records the prototype and the holder of the
prototype chain (both ends of the chain) and assumes that the chain elements
and their maps did not change in during the entirety of Crankshaft. The
actual
traversal of the prototype chain happens in Lithium at code generation.
With parallel compilation, this assumption is not longer correct.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/12036030
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=13476
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.h
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Mon Jan 21
00:30:11 2013
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Jan 23
06:01:11 2013
@@ -5005,29 +5005,19 @@
Register prototype_reg = ToRegister(instr->temp());
Register map_reg = ToRegister(instr->temp2());
- 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(prototype_reg, current_prototype);
+ ASSERT(prototypes->length() == maps->length());
- // Check prototype maps up to the holder.
- while (!current_prototype.is_identical_to(holder)) {
+ for (int i = 0; i < prototypes->length(); i++) {
+ __ LoadHeapObject(prototype_reg, prototypes->at(i));
__ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
DoCheckMapCommon(map_reg,
- Handle<Map>(current_prototype->map()),
- ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment());
- current_prototype =
-
Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
- // Load next prototype object.
- __ LoadHeapObject(prototype_reg, current_prototype);
+ maps->at(i),
+ ALLOW_ELEMENT_TRANSITION_MAPS,
+ instr->environment());
}
-
- // Check the holder map.
- __ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
- DoCheckMapCommon(map_reg,
- Handle<Map>(current_prototype->map()),
- ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment());
}
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.h Fri Jan 18 02:10:36 2013
+++ /branches/bleeding_edge/src/mips/lithium-mips.h Wed Jan 23 06:01:11 2013
@@ -2130,8 +2130,10 @@
DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps")
DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps)
- Handle<JSObject> prototype() const { return hydrogen()->prototype(); }
- Handle<JSObject> holder() const { return hydrogen()->holder(); }
+ ZoneList<Handle<JSObject> >* prototypes() const {
+ return hydrogen()->prototypes();
+ }
+ ZoneList<Handle<Map> >* maps() const { return hydrogen()->maps(); }
};
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev