Index: src/x64/debug-x64.cc |
diff --git a/src/x64/debug-x64.cc b/src/x64/debug-x64.cc |
index 94a50eb53e7731246dc135242ca92e889d975e90..6ef7e7befb737291f0f0c9466b1697a7f43646d5 100644 |
--- a/src/x64/debug-x64.cc |
+++ b/src/x64/debug-x64.cc |
@@ -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,18 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
+ // Load padding words on stack. |
+ __ movq(kScratchRegister, |
+ Immediate(Debug::FramePaddingLayout::kPaddingValue)); |
+ __ Integer32ToSmi(kScratchRegister, kScratchRegister); |
+ for (int i = 0; i < Debug::FramePaddingLayout::kInitialSize; i++) { |
+ __ push(kScratchRegister); |
+ } |
+ __ movq(kScratchRegister, |
+ Immediate(Debug::FramePaddingLayout::kInitialSize)); |
+ __ Integer32ToSmi(kScratchRegister, kScratchRegister); |
Yang
2012/05/16 09:59:01
You can convert those values to smi using
Smi*
Peter Rybin
2012/05/16 21:14:57
And this is 2-6 times shorter in terms of generate
|
+ __ push(kScratchRegister); |
+ |
// 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 +171,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. |
} |