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

Side by Side Diff: src/debug/arm64/debug-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 ExternalReference after_break_target = 123 ExternalReference after_break_target =
124 ExternalReference::debug_after_break_target_address(masm->isolate()); 124 ExternalReference::debug_after_break_target_address(masm->isolate());
125 __ Mov(scratch, after_break_target); 125 __ Mov(scratch, after_break_target);
126 __ Ldr(scratch, MemOperand(scratch)); 126 __ Ldr(scratch, MemOperand(scratch));
127 __ Br(scratch); 127 __ Br(scratch);
128 } 128 }
129 129
130 130
131 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 131 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
132 // We do not know our frame height, but set sp based on fp. 132 // We do not know our frame height, but set sp based on fp.
133 __ Sub(masm->StackPointer(), fp, kPointerSize); 133 __ Add(masm->StackPointer(), fp, FrameDropperFrameConstants::kFunctionOffset);
134 __ AssertStackConsistency(); 134 __ AssertStackConsistency();
135 135
136 __ Pop(x1, fp, lr); // Function, Frame, Return address. 136 __ Pop(x1); // Function
137 __ Mov(masm->StackPointer(), Operand(fp));
138 __ Pop(fp, lr); // Frame, Return address.
137 139
138 ParameterCount dummy(0); 140 ParameterCount dummy(0);
139 __ FloodFunctionIfStepping(x1, no_reg, dummy, dummy); 141 __ FloodFunctionIfStepping(x1, no_reg, dummy, dummy);
140 142
141 UseScratchRegisterScope temps(masm); 143 UseScratchRegisterScope temps(masm);
142 Register scratch = temps.AcquireX(); 144 Register scratch = temps.AcquireX();
143 145
144 // Load context from the function. 146 // Load context from the function.
145 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); 147 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset));
146 148
147 // Clear new.target as a safety measure. 149 // Clear new.target as a safety measure.
148 __ LoadRoot(x3, Heap::kUndefinedValueRootIndex); 150 __ LoadRoot(x3, Heap::kUndefinedValueRootIndex);
149 151
150 // Get function code. 152 // Get function code.
151 __ Ldr(scratch, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); 153 __ Ldr(scratch, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset));
152 __ Ldr(scratch, FieldMemOperand(scratch, SharedFunctionInfo::kCodeOffset)); 154 __ Ldr(scratch, FieldMemOperand(scratch, SharedFunctionInfo::kCodeOffset));
153 __ Add(scratch, scratch, Code::kHeaderSize - kHeapObjectTag); 155 __ Add(scratch, scratch, Code::kHeaderSize - kHeapObjectTag);
154 156
155 // Re-run JSFunction, x1 is function, cp is context. 157 // Re-run JSFunction, x1 is function, cp is context.
156 __ Br(scratch); 158 __ Br(scratch);
157 } 159 }
158 160
159 161
160 const bool LiveEdit::kFrameDropperSupported = true; 162 const bool LiveEdit::kFrameDropperSupported = true;
161 163
162 } // namespace internal 164 } // namespace internal
163 } // namespace v8 165 } // namespace v8
164 166
165 #endif // V8_TARGET_ARCH_ARM64 167 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698