Revision: 11587
Author:   [email protected]
Date:     Wed May 16 14:15:24 2012
Log:      Fix issue 825 (LiveEdit vs. function with no locals) for x64.

Review URL: https://chromiumcodereview.appspot.com/10387116
http://code.google.com/p/v8/source/detail?r=11587

Modified:
 /branches/bleeding_edge/src/ia32/debug-ia32.cc
 /branches/bleeding_edge/src/x64/debug-x64.cc

=======================================
--- /branches/bleeding_edge/src/ia32/debug-ia32.cc      Thu May  3 10:31:34 2012
+++ /branches/bleeding_edge/src/ia32/debug-ia32.cc      Wed May 16 14:15:24 2012
@@ -175,7 +175,7 @@
     // 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.
=======================================
--- /branches/bleeding_edge/src/x64/debug-x64.cc        Thu May  3 10:31:34 2012
+++ /branches/bleeding_edge/src/x64/debug-x64.cc        Wed May 16 14:15:24 2012
@@ -91,7 +91,7 @@
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 @@
   {
     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.
@@ -158,6 +164,11 @@
         __ or_(reg, kScratchRegister);
       }
     }
+
+    // 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.
   }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to