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 | |
121 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 116 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 | |
129 // Load the function pointer off of our current stack frame. | 117 // Load the function pointer off of our current stack frame. |
130 __ ldr(r1, MemOperand(fp, | 118 __ ldr(r1, MemOperand(fp, |
131 StandardFrameConstants::kConstantPoolOffset - kPointerSize)); | 119 StandardFrameConstants::kConstantPoolOffset - kPointerSize)); |
132 | 120 |
133 // Pop return address, frame and constant pool pointer (if | 121 // Pop return address, frame and constant pool pointer (if |
134 // FLAG_enable_embedded_constant_pool). | 122 // FLAG_enable_embedded_constant_pool). |
135 __ LeaveFrame(StackFrame::INTERNAL); | 123 __ LeaveFrame(StackFrame::INTERNAL); |
136 | 124 |
| 125 ParameterCount dummy(0); |
| 126 __ FloodFunctionIfStepping(r1, no_reg, dummy, dummy); |
| 127 |
137 { ConstantPoolUnavailableScope constant_pool_unavailable(masm); | 128 { ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
138 // Load context from the function. | 129 // Load context from the function. |
139 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 130 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
140 | 131 |
141 // Clear new.target as a safety measure. | 132 // Clear new.target as a safety measure. |
142 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); | 133 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
143 | 134 |
144 // Get function code. | 135 // Get function code. |
145 __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); | 136 __ ldr(ip, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
146 __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); | 137 __ ldr(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); |
147 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 138 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
148 | 139 |
149 // Re-run JSFunction, r1 is function, cp is context. | 140 // Re-run JSFunction, r1 is function, cp is context. |
150 __ Jump(ip); | 141 __ Jump(ip); |
151 } | 142 } |
152 } | 143 } |
153 | 144 |
154 | 145 |
155 const bool LiveEdit::kFrameDropperSupported = true; | 146 const bool LiveEdit::kFrameDropperSupported = true; |
156 | 147 |
157 #undef __ | 148 #undef __ |
158 | 149 |
159 } // namespace internal | 150 } // namespace internal |
160 } // namespace v8 | 151 } // namespace v8 |
161 | 152 |
162 #endif // V8_TARGET_ARCH_ARM | 153 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |