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

Side by Side Diff: src/debug/x64/debug-x64.cc

Issue 1498523008: Revert of [debugger] do not predict step in target for liveedit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@liveeditstep
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « src/debug/mips64/debug-mips64.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Now that the break point has been handled, resume normal execution by 99 // Now that the break point has been handled, resume normal execution by
100 // jumping to the target address intended by the caller and that was 100 // jumping to the target address intended by the caller and that was
101 // overwritten by the address of DebugBreakXXX. 101 // overwritten by the address of DebugBreakXXX.
102 ExternalReference after_break_target = 102 ExternalReference after_break_target =
103 ExternalReference::debug_after_break_target_address(masm->isolate()); 103 ExternalReference::debug_after_break_target_address(masm->isolate());
104 __ Move(kScratchRegister, after_break_target); 104 __ Move(kScratchRegister, after_break_target);
105 __ Jump(Operand(kScratchRegister, 0)); 105 __ Jump(Operand(kScratchRegister, 0));
106 } 106 }
107 107
108 108
109 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
110 masm->ret(0);
111 }
112
113
109 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 114 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
115 ExternalReference restarter_frame_function_slot =
116 ExternalReference::debug_restarter_frame_function_pointer_address(
117 masm->isolate());
118 __ Move(rax, restarter_frame_function_slot);
119 __ movp(Operand(rax, 0), Immediate(0));
120
110 // We do not know our frame height, but set rsp based on rbp. 121 // We do not know our frame height, but set rsp based on rbp.
111 __ leap(rsp, Operand(rbp, -1 * kPointerSize)); 122 __ leap(rsp, Operand(rbp, -1 * kPointerSize));
112 123
113 __ Pop(rdi); // Function. 124 __ Pop(rdi); // Function.
114 __ popq(rbp); 125 __ popq(rbp);
115 126
116 ParameterCount dummy(0);
117 __ FloodFunctionIfStepping(rdi, no_reg, dummy, dummy);
118
119 // Load context from the function. 127 // Load context from the function.
120 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 128 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
121 129
122 // Clear new.target as a safety measure. 130 // Clear new.target as a safety measure.
123 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); 131 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex);
124 132
125 // Get function code. 133 // Get function code.
126 __ movp(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 134 __ movp(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
127 __ movp(rbx, FieldOperand(rbx, SharedFunctionInfo::kCodeOffset)); 135 __ movp(rbx, FieldOperand(rbx, SharedFunctionInfo::kCodeOffset));
128 __ leap(rbx, FieldOperand(rbx, Code::kHeaderSize)); 136 __ leap(rbx, FieldOperand(rbx, Code::kHeaderSize));
129 137
130 // Re-run JSFunction, rdi is function, rsi is context. 138 // Re-run JSFunction, rdi is function, rsi is context.
131 __ jmp(rbx); 139 __ jmp(rbx);
132 } 140 }
133 141
134 const bool LiveEdit::kFrameDropperSupported = true; 142 const bool LiveEdit::kFrameDropperSupported = true;
135 143
136 #undef __ 144 #undef __
137 145
138 } // namespace internal 146 } // namespace internal
139 } // namespace v8 147 } // namespace v8
140 148
141 #endif // V8_TARGET_ARCH_X64 149 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/debug/mips64/debug-mips64.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698