Revision: 22084
Author:   [email protected]
Date:     Mon Jun 30 11:06:03 2014 UTC
Log:      [Arm]: Fix liveedit support if --enable_ool_constant_pool is true.

If the out of line constant pool is enabled, there is an extra value on the stack frame (the constant pool pointer). This change fixes GenerateFrameDropperLiveEdit to pull the function pointer and pop the stack frame correctly whether or not the constant pool pointer is on the
frame.

[email protected]

Review URL: https://codereview.chromium.org/338053003
http://code.google.com/p/v8/source/detail?r=22084

Modified:
 /branches/bleeding_edge/src/arm/debug-arm.cc

=======================================
--- /branches/bleeding_edge/src/arm/debug-arm.cc Thu Jun 26 10:00:36 2014 UTC +++ /branches/bleeding_edge/src/arm/debug-arm.cc Mon Jun 30 11:06:03 2014 UTC
@@ -298,21 +298,26 @@
   __ mov(r1, Operand::Zero());
   __ str(r1, MemOperand(ip, 0));

-  // We do not know our frame height, but set sp based on fp.
-  __ sub(sp, fp, Operand(kPointerSize));
+  // Load the function pointer off of our current stack frame.
+  __ ldr(r1, MemOperand(fp,
+         StandardFrameConstants::kConstantPoolOffset - kPointerSize));

-  __ Pop(lr, fp, r1);  // Return address, Frame, Function.
+  // Pop return address, frame and constant pool pointer (if
+  // FLAG_enable_ool_constant_pool).
+  __ LeaveFrame(StackFrame::INTERNAL);

-  // Load context from the function.
-  __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
+  { ConstantPoolUnavailableScope constant_pool_unavailable(masm);
+    // Load context from the function.
+    __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));

-  // Get function code.
-  __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
-  __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset));
-  __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag));
+    // Get function code.
+    __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
+    __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset));
+    __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag));

-  // Re-run JSFunction, r1 is function, cp is context.
-  __ Jump(ip);
+    // Re-run JSFunction, r1 is function, cp is context.
+    __ Jump(ip);
+  }
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to