| 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/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // jumping to the target address intended by the caller and that was | 106 // jumping to the target address intended by the caller and that was |
| 107 // overwritten by the address of DebugBreakXXX. | 107 // overwritten by the address of DebugBreakXXX. |
| 108 ExternalReference after_break_target = | 108 ExternalReference after_break_target = |
| 109 ExternalReference::debug_after_break_target_address(masm->isolate()); | 109 ExternalReference::debug_after_break_target_address(masm->isolate()); |
| 110 __ mov(ip, Operand(after_break_target)); | 110 __ mov(ip, Operand(after_break_target)); |
| 111 __ ldr(ip, MemOperand(ip)); | 111 __ ldr(ip, MemOperand(ip)); |
| 112 __ Jump(ip); | 112 __ Jump(ip); |
| 113 } | 113 } |
| 114 | 114 |
| 115 | 115 |
| 116 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { |
| 117 __ Ret(); |
| 118 } |
| 119 |
| 120 |
| 116 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 121 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 122 ExternalReference restarter_frame_function_slot = |
| 123 ExternalReference::debug_restarter_frame_function_pointer_address( |
| 124 masm->isolate()); |
| 125 __ mov(ip, Operand(restarter_frame_function_slot)); |
| 126 __ mov(r1, Operand::Zero()); |
| 127 __ str(r1, MemOperand(ip, 0)); |
| 128 |
| 117 // Load the function pointer off of our current stack frame. | 129 // Load the function pointer off of our current stack frame. |
| 118 __ ldr(r1, MemOperand(fp, | 130 __ ldr(r1, MemOperand(fp, |
| 119 StandardFrameConstants::kConstantPoolOffset - kPointerSize)); | 131 StandardFrameConstants::kConstantPoolOffset - kPointerSize)); |
| 120 | 132 |
| 121 // Pop return address, frame and constant pool pointer (if | 133 // Pop return address, frame and constant pool pointer (if |
| 122 // FLAG_enable_embedded_constant_pool). | 134 // FLAG_enable_embedded_constant_pool). |
| 123 __ LeaveFrame(StackFrame::INTERNAL); | 135 __ LeaveFrame(StackFrame::INTERNAL); |
| 124 | 136 |
| 125 ParameterCount dummy(0); | |
| 126 __ FloodFunctionIfStepping(r1, no_reg, dummy, dummy); | |
| 127 | |
| 128 { ConstantPoolUnavailableScope constant_pool_unavailable(masm); | 137 { ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
| 129 // Load context from the function. | 138 // Load context from the function. |
| 130 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 139 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
| 131 | 140 |
| 132 // Clear new.target as a safety measure. | 141 // Clear new.target as a safety measure. |
| 133 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); | 142 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
| 134 | 143 |
| 135 // Get function code. | 144 // Get function code. |
| 136 __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); | 145 __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
| 137 __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); | 146 __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); |
| 138 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 147 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 139 | 148 |
| 140 // Re-run JSFunction, r1 is function, cp is context. | 149 // Re-run JSFunction, r1 is function, cp is context. |
| 141 __ Jump(ip); | 150 __ Jump(ip); |
| 142 } | 151 } |
| 143 } | 152 } |
| 144 | 153 |
| 145 | 154 |
| 146 const bool LiveEdit::kFrameDropperSupported = true; | 155 const bool LiveEdit::kFrameDropperSupported = true; |
| 147 | 156 |
| 148 #undef __ | 157 #undef __ |
| 149 | 158 |
| 150 } // namespace internal | 159 } // namespace internal |
| 151 } // namespace v8 | 160 } // namespace v8 |
| 152 | 161 |
| 153 #endif // V8_TARGET_ARCH_ARM | 162 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |