From: rmcilroy@chromium.org Date: Mon, 30 Jun 2014 11:06:03 +0000 (+0000) Subject: [Arm]: Fix liveedit support if --enable_ool_constant_pool is true. X-Git-Tag: upstream/4.7.83~8483 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1e67437395a04f398800e66c93ad3f7f3c93015;p=platform%2Fupstream%2Fv8.git [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. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/338053003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/arm/debug-arm.cc b/src/arm/debug-arm.cc index 9788319..aad40c2 100644 --- a/src/arm/debug-arm.cc +++ b/src/arm/debug-arm.cc @@ -298,21 +298,26 @@ void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { __ 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); + } }