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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug.h" | 10 #include "src/debug.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 291 |
292 | 292 |
293 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 293 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
294 ExternalReference restarter_frame_function_slot = | 294 ExternalReference restarter_frame_function_slot = |
295 ExternalReference::debug_restarter_frame_function_pointer_address( | 295 ExternalReference::debug_restarter_frame_function_pointer_address( |
296 masm->isolate()); | 296 masm->isolate()); |
297 __ mov(ip, Operand(restarter_frame_function_slot)); | 297 __ mov(ip, Operand(restarter_frame_function_slot)); |
298 __ mov(r1, Operand::Zero()); | 298 __ mov(r1, Operand::Zero()); |
299 __ str(r1, MemOperand(ip, 0)); | 299 __ str(r1, MemOperand(ip, 0)); |
300 | 300 |
301 // We do not know our frame height, but set sp based on fp. | 301 // Load the function pointer off of our current stack frame. |
302 __ sub(sp, fp, Operand(kPointerSize)); | 302 __ ldr(r1, MemOperand(fp, |
| 303 StandardFrameConstants::kConstantPoolOffset - kPointerSize)); |
303 | 304 |
304 __ Pop(lr, fp, r1); // Return address, Frame, Function. | 305 // Pop return address, frame and constant pool pointer (if |
| 306 // FLAG_enable_ool_constant_pool). |
| 307 __ LeaveFrame(StackFrame::INTERNAL); |
305 | 308 |
306 // Load context from the function. | 309 { ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
307 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 310 // Load context from the function. |
| 311 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
308 | 312 |
309 // Get function code. | 313 // Get function code. |
310 __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); | 314 __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
311 __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); | 315 __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); |
312 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 316 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
313 | 317 |
314 // Re-run JSFunction, r1 is function, cp is context. | 318 // Re-run JSFunction, r1 is function, cp is context. |
315 __ Jump(ip); | 319 __ Jump(ip); |
| 320 } |
316 } | 321 } |
317 | 322 |
318 | 323 |
319 const bool LiveEdit::kFrameDropperSupported = true; | 324 const bool LiveEdit::kFrameDropperSupported = true; |
320 | 325 |
321 #undef __ | 326 #undef __ |
322 | 327 |
323 } } // namespace v8::internal | 328 } } // namespace v8::internal |
324 | 329 |
325 #endif // V8_TARGET_ARCH_ARM | 330 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |