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

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

Issue 1696043002: [runtime] Unify and simplify how frames are marked (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge problems Created 4 years, 9 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 unified diff | Download patch
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // overwritten by the address of DebugBreakXXX. 104 // overwritten by the address of DebugBreakXXX.
105 ExternalReference after_break_target = 105 ExternalReference after_break_target =
106 ExternalReference::debug_after_break_target_address(masm->isolate()); 106 ExternalReference::debug_after_break_target_address(masm->isolate());
107 __ Move(kScratchRegister, after_break_target); 107 __ Move(kScratchRegister, after_break_target);
108 __ Jump(Operand(kScratchRegister, 0)); 108 __ Jump(Operand(kScratchRegister, 0));
109 } 109 }
110 110
111 111
112 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 112 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
113 // We do not know our frame height, but set rsp based on rbp. 113 // We do not know our frame height, but set rsp based on rbp.
114 __ leap(rsp, Operand(rbp, -1 * kPointerSize)); 114 __ leap(rsp, Operand(rbp, FrameDropperFrameConstants::kFunctionOffset));
115
116 __ Pop(rdi); // Function. 115 __ Pop(rdi); // Function.
116 __ addp(rsp,
117 Immediate(-FrameDropperFrameConstants::kCodeOffset)); // INTERNAL
118 // frame marker
119 // and code
117 __ popq(rbp); 120 __ popq(rbp);
118 121
119 ParameterCount dummy(0); 122 ParameterCount dummy(0);
120 __ FloodFunctionIfStepping(rdi, no_reg, dummy, dummy); 123 __ FloodFunctionIfStepping(rdi, no_reg, dummy, dummy);
121 124
122 // Load context from the function. 125 // Load context from the function.
123 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 126 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
124 127
125 // Clear new.target as a safety measure. 128 // Clear new.target as a safety measure.
126 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); 129 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex);
127 130
128 // Get function code. 131 // Get function code.
129 __ movp(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 132 __ movp(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
130 __ movp(rbx, FieldOperand(rbx, SharedFunctionInfo::kCodeOffset)); 133 __ movp(rbx, FieldOperand(rbx, SharedFunctionInfo::kCodeOffset));
131 __ leap(rbx, FieldOperand(rbx, Code::kHeaderSize)); 134 __ leap(rbx, FieldOperand(rbx, Code::kHeaderSize));
132 135
133 // Re-run JSFunction, rdi is function, rsi is context. 136 // Re-run JSFunction, rdi is function, rsi is context.
134 __ jmp(rbx); 137 __ jmp(rbx);
135 } 138 }
136 139
137 const bool LiveEdit::kFrameDropperSupported = true; 140 const bool LiveEdit::kFrameDropperSupported = true;
138 141
139 #undef __ 142 #undef __
140 143
141 } // namespace internal 144 } // namespace internal
142 } // namespace v8 145 } // namespace v8
143 146
144 #endif // V8_TARGET_ARCH_X64 147 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698