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