summaryrefslogtreecommitdiff
path: root/deps/v8/src/debug/ia32/debug-ia32.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/debug/ia32/debug-ia32.cc')
-rw-r--r--deps/v8/src/debug/ia32/debug-ia32.cc38
1 files changed, 17 insertions, 21 deletions
diff --git a/deps/v8/src/debug/ia32/debug-ia32.cc b/deps/v8/src/debug/ia32/debug-ia32.cc
index fb8d495af8..d489a01441 100644
--- a/deps/v8/src/debug/ia32/debug-ia32.cc
+++ b/deps/v8/src/debug/ia32/debug-ia32.cc
@@ -23,24 +23,24 @@ void EmitDebugBreakSlot(MacroAssembler* masm) {
}
-void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
- int call_argc) {
+void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
// Generate enough nop's to make space for a call instruction.
- masm->RecordDebugBreakSlot(mode, call_argc);
+ masm->RecordDebugBreakSlot(mode);
EmitDebugBreakSlot(masm);
}
-void DebugCodegen::ClearDebugBreakSlot(Address pc) {
- CodePatcher patcher(pc, Assembler::kDebugBreakSlotLength);
+void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) {
+ CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotLength);
EmitDebugBreakSlot(patcher.masm());
}
-void DebugCodegen::PatchDebugBreakSlot(Address pc, Handle<Code> code) {
+void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc,
+ Handle<Code> code) {
DCHECK_EQ(Code::BUILTIN, code->kind());
static const int kSize = Assembler::kDebugBreakSlotLength;
- CodePatcher patcher(pc, kSize);
+ CodePatcher patcher(isolate, pc, kSize);
// Add a label for checking the size of the code used for returning.
Label check_codesize;
@@ -105,33 +105,29 @@ void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm,
}
-void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
- masm->ret(0);
-}
-
-
void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
- ExternalReference restarter_frame_function_slot =
- ExternalReference::debug_restarter_frame_function_pointer_address(
- masm->isolate());
- __ mov(Operand::StaticVariable(restarter_frame_function_slot), Immediate(0));
-
// We do not know our frame height, but set esp based on ebp.
__ lea(esp, Operand(ebp, -1 * kPointerSize));
__ pop(edi); // Function.
__ pop(ebp);
+ ParameterCount dummy(0);
+ __ FloodFunctionIfStepping(edi, no_reg, dummy, dummy);
+
// Load context from the function.
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
+ // Clear new.target register as a safety measure.
+ __ mov(edx, masm->isolate()->factory()->undefined_value());
+
// Get function code.
- __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
- __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset));
- __ lea(edx, FieldOperand(edx, Code::kHeaderSize));
+ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
+ __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset));
+ __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize));
// Re-run JSFunction, edi is function, esi is context.
- __ jmp(edx);
+ __ jmp(ebx);
}