Commit 401fbbae authored by peter.rybin@gmail.com's avatar peter.rybin@gmail.com

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
parent 266c17e5
...@@ -175,7 +175,7 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm, ...@@ -175,7 +175,7 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
// Read current padding counter and skip corresponding number of words. // Read current padding counter and skip corresponding number of words.
__ pop(unused_reg); __ pop(unused_reg);
// We divide stored value by 2 (untagging) and multiply it by word's size. // 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)); __ lea(esp, Operand(esp, unused_reg, times_half_pointer_size, 0));
// Get rid of the internal frame. // Get rid of the internal frame.
......
...@@ -91,7 +91,7 @@ void BreakLocationIterator::ClearDebugBreakAtSlot() { ...@@ -91,7 +91,7 @@ void BreakLocationIterator::ClearDebugBreakAtSlot() {
rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength);
} }
const bool Debug::FramePaddingLayout::kIsSupported = false; const bool Debug::FramePaddingLayout::kIsSupported = true;
#define __ ACCESS_MASM(masm) #define __ ACCESS_MASM(masm)
...@@ -105,6 +105,12 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm, ...@@ -105,6 +105,12 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
{ {
FrameScope scope(masm, StackFrame::INTERNAL); 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 // Store the registers containing live values on the expression stack to
// make sure that these are correctly updated during GC. Non object values // 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. // are stored as as two smis causing it to be untouched by GC.
...@@ -159,6 +165,11 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm, ...@@ -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. // Get rid of the internal frame.
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment