OLD | NEW |
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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/debug/debug.h" | 7 #include "src/debug/debug.h" |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug/liveedit.h" | 10 #include "src/debug/liveedit.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 130 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
131 // Load the function pointer off of our current stack frame. | 131 // Load the function pointer off of our current stack frame. |
132 __ ldr(r1, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); | 132 __ ldr(r1, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); |
133 | 133 |
134 // Pop return address, frame and constant pool pointer (if | 134 // Pop return address, frame and constant pool pointer (if |
135 // FLAG_enable_embedded_constant_pool). | 135 // FLAG_enable_embedded_constant_pool). |
136 __ LeaveFrame(StackFrame::INTERNAL); | 136 __ LeaveFrame(StackFrame::INTERNAL); |
137 | 137 |
138 ParameterCount dummy(0); | 138 ParameterCount dummy(0); |
139 __ FloodFunctionIfStepping(r1, no_reg, dummy, dummy); | 139 __ CheckDebugHook(r1, no_reg, dummy, dummy); |
140 | 140 |
141 { ConstantPoolUnavailableScope constant_pool_unavailable(masm); | 141 { ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
142 // Load context from the function. | 142 // Load context from the function. |
143 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 143 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
144 | 144 |
145 // Clear new.target as a safety measure. | 145 // Clear new.target as a safety measure. |
146 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); | 146 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
147 | 147 |
148 // Get function code. | 148 // Get function code. |
149 __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); | 149 __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
150 __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); | 150 __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); |
151 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 151 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
152 | 152 |
153 // Re-run JSFunction, r1 is function, cp is context. | 153 // Re-run JSFunction, r1 is function, cp is context. |
154 __ Jump(ip); | 154 __ Jump(ip); |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 | 158 |
159 const bool LiveEdit::kFrameDropperSupported = true; | 159 const bool LiveEdit::kFrameDropperSupported = true; |
160 | 160 |
161 #undef __ | 161 #undef __ |
162 | 162 |
163 } // namespace internal | 163 } // namespace internal |
164 } // namespace v8 | 164 } // namespace v8 |
165 | 165 |
166 #endif // V8_TARGET_ARCH_ARM | 166 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |