Index: src/arm/macro-assembler-arm.cc |
=================================================================== |
--- src/arm/macro-assembler-arm.cc (revision 4439) |
+++ src/arm/macro-assembler-arm.cc (working copy) |
@@ -721,6 +721,7 @@ |
Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg, |
JSObject* holder, Register holder_reg, |
Register scratch, |
+ int save_at_depth, |
Label* miss) { |
// Make sure there's no overlap between scratch and the other |
// registers. |
@@ -728,8 +729,12 @@ |
// Keep track of the current object in register reg. |
Register reg = object_reg; |
- int depth = 1; |
+ int depth = 0; |
+ if (save_at_depth == depth) { |
+ str(reg, MemOperand(sp)); |
+ } |
+ |
// Check the maps in the prototype chain. |
// Traverse the prototype chain from the object and do map checks. |
while (object != holder) { |
@@ -768,6 +773,10 @@ |
mov(reg, Operand(Handle<JSObject>(prototype))); |
} |
+ if (save_at_depth == depth) { |
+ str(reg, MemOperand(sp)); |
+ } |
+ |
// Go to the next object in the prototype chain. |
object = prototype; |
} |
@@ -778,7 +787,7 @@ |
b(ne, miss); |
// Log the check depth. |
- LOG(IntEvent("check-maps-depth", depth)); |
+ LOG(IntEvent("check-maps-depth", depth + 1)); |
// Perform security check for access to the global object and return |
// the holder register. |