| OLD | NEW |
| 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/debug/debug.h" | 7 #include "src/debug/debug.h" |
| 8 | 8 |
| 9 #include "src/arm64/frames-arm64.h" | 9 #include "src/arm64/frames-arm64.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 140 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 141 // We do not know our frame height, but set sp based on fp. | 141 // We do not know our frame height, but set sp based on fp. |
| 142 __ Add(masm->StackPointer(), fp, FrameDropperFrameConstants::kFunctionOffset); | 142 __ Add(masm->StackPointer(), fp, FrameDropperFrameConstants::kFunctionOffset); |
| 143 __ AssertStackConsistency(); | 143 __ AssertStackConsistency(); |
| 144 | 144 |
| 145 __ Pop(x1); // Function | 145 __ Pop(x1); // Function |
| 146 __ Mov(masm->StackPointer(), Operand(fp)); | 146 __ Mov(masm->StackPointer(), Operand(fp)); |
| 147 __ Pop(fp, lr); // Frame, Return address. | 147 __ Pop(fp, lr); // Frame, Return address. |
| 148 | 148 |
| 149 ParameterCount dummy(0); | 149 ParameterCount dummy(0); |
| 150 __ FloodFunctionIfStepping(x1, no_reg, dummy, dummy); | 150 __ CheckDebugHook(x1, no_reg, dummy, dummy); |
| 151 | 151 |
| 152 UseScratchRegisterScope temps(masm); | 152 UseScratchRegisterScope temps(masm); |
| 153 Register scratch = temps.AcquireX(); | 153 Register scratch = temps.AcquireX(); |
| 154 | 154 |
| 155 // Load context from the function. | 155 // Load context from the function. |
| 156 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); | 156 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); |
| 157 | 157 |
| 158 // Clear new.target as a safety measure. | 158 // Clear new.target as a safety measure. |
| 159 __ LoadRoot(x3, Heap::kUndefinedValueRootIndex); | 159 __ LoadRoot(x3, Heap::kUndefinedValueRootIndex); |
| 160 | 160 |
| 161 // Get function code. | 161 // Get function code. |
| 162 __ Ldr(scratch, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); | 162 __ Ldr(scratch, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); |
| 163 __ Ldr(scratch, FieldMemOperand(scratch, SharedFunctionInfo::kCodeOffset)); | 163 __ Ldr(scratch, FieldMemOperand(scratch, SharedFunctionInfo::kCodeOffset)); |
| 164 __ Add(scratch, scratch, Code::kHeaderSize - kHeapObjectTag); | 164 __ Add(scratch, scratch, Code::kHeaderSize - kHeapObjectTag); |
| 165 | 165 |
| 166 // Re-run JSFunction, x1 is function, cp is context. | 166 // Re-run JSFunction, x1 is function, cp is context. |
| 167 __ Br(scratch); | 167 __ Br(scratch); |
| 168 } | 168 } |
| 169 | 169 |
| 170 | 170 |
| 171 const bool LiveEdit::kFrameDropperSupported = true; | 171 const bool LiveEdit::kFrameDropperSupported = true; |
| 172 | 172 |
| 173 } // namespace internal | 173 } // namespace internal |
| 174 } // namespace v8 | 174 } // namespace v8 |
| 175 | 175 |
| 176 #endif // V8_TARGET_ARCH_ARM64 | 176 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |