Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: src/debug/mips/debug-mips.cc

Issue 2636913002: [liveedit] reimplement frame restarting. (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/liveedit.cc ('k') | src/debug/mips64/debug-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/mips/debug-mips.cc
diff --git a/src/debug/mips/debug-mips.cc b/src/debug/mips/debug-mips.cc
index c6daf2d2261b629e1206ee2f1e738869597eadc8..5b809e6a405362d5f10c09c7494b7982fa331ee3 100644
--- a/src/debug/mips/debug-mips.cc
+++ b/src/debug/mips/debug-mips.cc
@@ -69,16 +69,6 @@ void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm,
{
FrameScope scope(masm, StackFrame::INTERNAL);
- // Load padding words on stack.
- __ li(at, Operand(Smi::FromInt(LiveEdit::kFramePaddingValue)));
- __ Subu(sp, sp,
- Operand(kPointerSize * LiveEdit::kFramePaddingInitialSize));
- for (int i = LiveEdit::kFramePaddingInitialSize - 1; i >= 0; i--) {
- __ sw(at, MemOperand(sp, kPointerSize * i));
- }
- __ li(at, Operand(Smi::FromInt(LiveEdit::kFramePaddingInitialSize)));
- __ push(at);
-
// Push arguments for DebugBreak call.
if (mode == SAVE_RESULT_REGISTER) {
// Break on return.
@@ -104,47 +94,47 @@ void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm,
}
}
}
-
- // Don't bother removing padding bytes pushed on the stack
- // as the frame is going to be restored right away.
-
// Leave the internal frame.
}
- // Now that the break point has been handled, resume normal execution by
- // jumping to the target address intended by the caller and that was
- // overwritten by the address of DebugBreakXXX.
- ExternalReference after_break_target =
- ExternalReference::debug_after_break_target_address(masm->isolate());
- __ li(t9, Operand(after_break_target));
- __ lw(t9, MemOperand(t9));
- __ Jump(t9);
+ __ MaybeDropFrames();
+
+ // Return to caller.
+ __ Ret();
}
+void DebugCodegen::GenerateHandleDebuggerStatement(MacroAssembler* masm) {
+ {
+ FrameScope scope(masm, StackFrame::INTERNAL);
+ __ CallRuntime(Runtime::kHandleDebuggerStatement, 0);
+ }
+ __ MaybeDropFrames();
+
+ // Return to caller.
+ __ Ret();
+}
-void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
- // We do not know our frame height, but set sp based on fp.
- __ lw(a1, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset));
+void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) {
+ // Frame is being dropped:
+ // - Drop to the target frame specified by a1.
+ // - Look up current function on the frame.
+ // - Leave the frame.
+ // - Restart the frame by calling the function.
+ __ mov(fp, a1);
+ __ lw(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
// Pop return address and frame.
__ LeaveFrame(StackFrame::INTERNAL);
- ParameterCount dummy(0);
- __ CheckDebugHook(a1, no_reg, dummy, dummy);
-
- // Load context from the function.
- __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset));
-
- // Clear new.target as a safety measure.
- __ LoadRoot(a3, Heap::kUndefinedValueRootIndex);
-
- // Get function code.
- __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
- __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset));
- __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag));
+ __ lw(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
+ __ lw(a0,
+ FieldMemOperand(a0, SharedFunctionInfo::kFormalParameterCountOffset));
+ __ mov(a2, a0);
- // Re-run JSFunction, a1 is function, cp is context.
- __ Jump(t9);
+ ParameterCount dummy1(a2);
+ ParameterCount dummy2(a0);
+ __ InvokeFunction(a1, dummy1, dummy2, JUMP_FUNCTION,
+ CheckDebugStepCallWrapper());
}
« no previous file with comments | « src/debug/liveedit.cc ('k') | src/debug/mips64/debug-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698