Revision: 21895
Author:   [email protected]
Date:     Fri Jun 20 09:41:14 2014 UTC
Log:      Support LiveEdit on ARM

BUG=368580
LOG=Y
[email protected]

Review URL: https://codereview.chromium.org/344573004
http://code.google.com/p/v8/source/detail?r=21895

Modified:
 /branches/bleeding_edge/src/arm/debug-arm.cc
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/test/mjsunit/mjsunit.status

=======================================
--- /branches/bleeding_edge/src/arm/debug-arm.cc Tue Jun 3 08:12:43 2014 UTC +++ /branches/bleeding_edge/src/arm/debug-arm.cc Fri Jun 20 09:41:14 2014 UTC
@@ -27,7 +27,7 @@
   //   ldr ip, [pc, #0]
   //   blx ip
   //   <debug break return code entry point address>
-  //   bktp 0
+  //   bkpt 0
CodePatcher patcher(rinfo()->pc(), Assembler::kJSReturnSequenceInstructions);
   patcher.masm()->ldr(v8::internal::ip, MemOperand(v8::internal::pc, 0));
   patcher.masm()->blx(v8::internal::ip);
@@ -93,6 +93,14 @@
   {
     FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);

+    // Load padding words on stack.
+    __ mov(ip, Operand(Smi::FromInt(LiveEdit::kFramePaddingValue)));
+    for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) {
+      __ push(ip);
+    }
+    __ mov(ip, Operand(Smi::FromInt(LiveEdit::kFramePaddingInitialSize)));
+    __ push(ip);
+
// 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 a smi causing it to be untouched by GC.
@@ -138,6 +146,9 @@
         }
       }
     }
+
+    // Don't bother removing padding bytes pushed on the stack
+    // as the frame is going to be restored right away.

     // Leave the internal frame.
   }
@@ -282,16 +293,37 @@


 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
-  masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnArm);
+  __ Ret();
 }


 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
-  masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnArm);
+  ExternalReference restarter_frame_function_slot =
+      ExternalReference::debug_restarter_frame_function_pointer_address(
+          masm->isolate());
+  __ mov(ip, Operand(restarter_frame_function_slot));
+  __ 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));
+
+  __ Pop(lr, fp, r1);  // Return address, Frame, Function.
+
+  // 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));
+
+  // Re-run JSFunction, r1 is function, cp is context.
+  __ Jump(ip);
 }


-const bool LiveEdit::kFrameDropperSupported = false;
+const bool LiveEdit::kFrameDropperSupported = true;

 #undef __

=======================================
--- /branches/bleeding_edge/src/objects.h       Fri Jun 20 08:40:11 2014 UTC
+++ /branches/bleeding_edge/src/objects.h       Fri Jun 20 09:41:14 2014 UTC
@@ -1153,8 +1153,6 @@
V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ V(kLiveEditFrameDroppingIsNotSupportedOnARM64, \ "LiveEdit frame dropping is not supported on arm64") \ - V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ - "LiveEdit frame dropping is not supported on arm") \ V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ "LiveEdit frame dropping is not supported on mips") \ V(kLiveEdit, "LiveEdit") \
=======================================
--- /branches/bleeding_edge/test/mjsunit/mjsunit.status Fri Jun 13 08:05:34 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/mjsunit.status Fri Jun 20 09:41:14 2014 UTC
@@ -301,13 +301,6 @@
   # should be platform-independent.
   'regress/regress-1132': [SKIP],

-  # Stack manipulations in LiveEdit is not implemented for this arch.
-  'debug-liveedit-check-stack': [SKIP],
-  'debug-liveedit-stack-padding': [SKIP],
-  'debug-liveedit-restart-frame': [SKIP],
-  'debug-liveedit-double-call': [SKIP],
-  'harmony/generators-debug-liveedit': [SKIP],
-
   # Currently always deopt on minus zero
   'math-floor-of-div-minus-zero': [SKIP],

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to