Fix issue 825 (LiveEdit vs. function with no locals) for x64.

Review URL: https://chromiumcodereview.appspot.com/10387116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
peter.rybin@gmail.com 2012-05-16 21:15:24 +00:00
parent 266c17e5d0
commit 401fbbaef6
2 changed files with 13 additions and 2 deletions

View File

@ -175,7 +175,7 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
// Read current padding counter and skip corresponding number of words.
__ pop(unused_reg);
// We divide stored value by 2 (untagging) and multiply it by word's size.
STATIC_ASSERT(kSmiTagSize == 1);
STATIC_ASSERT(kSmiTagSize == 1 && kSmiShiftSize == 0);
__ lea(esp, Operand(esp, unused_reg, times_half_pointer_size, 0));
// Get rid of the internal frame.

View File

@ -91,7 +91,7 @@ void BreakLocationIterator::ClearDebugBreakAtSlot() {
rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength);
}
const bool Debug::FramePaddingLayout::kIsSupported = false;
const bool Debug::FramePaddingLayout::kIsSupported = true;
#define __ ACCESS_MASM(masm)
@ -105,6 +105,12 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
{
FrameScope scope(masm, StackFrame::INTERNAL);
// Load padding words on stack.
for (int i = 0; i < Debug::FramePaddingLayout::kInitialSize; i++) {
__ Push(Smi::FromInt(Debug::FramePaddingLayout::kPaddingValue));
}
__ Push(Smi::FromInt(Debug::FramePaddingLayout::kInitialSize));
// Store the registers containing live values on the expression stack to
// make sure that these are correctly updated during GC. Non object values
// are stored as as two smis causing it to be untouched by GC.
@ -159,6 +165,11 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
}
}
// Read current padding counter and skip corresponding number of words.
__ pop(kScratchRegister);
__ SmiToInteger32(kScratchRegister, kScratchRegister);
__ lea(rsp, Operand(rsp, kScratchRegister, times_pointer_size, 0));
// Get rid of the internal frame.
}