| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 | 131 |
| 132 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 132 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 133 // Load the function pointer off of our current stack frame. | 133 // Load the function pointer off of our current stack frame. |
| 134 __ LoadP(r4, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); | 134 __ LoadP(r4, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); |
| 135 | 135 |
| 136 // Pop return address and frame | 136 // Pop return address and frame |
| 137 __ LeaveFrame(StackFrame::INTERNAL); | 137 __ LeaveFrame(StackFrame::INTERNAL); |
| 138 | 138 |
| 139 ParameterCount dummy(0); | 139 ParameterCount dummy(0); |
| 140 __ FloodFunctionIfStepping(r4, no_reg, dummy, dummy); | 140 __ CheckDebugHook(r4, no_reg, dummy, dummy); |
| 141 | 141 |
| 142 // Load context from the function. | 142 // Load context from the function. |
| 143 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); | 143 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); |
| 144 | 144 |
| 145 // Clear new.target as a safety measure. | 145 // Clear new.target as a safety measure. |
| 146 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); | 146 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); |
| 147 | 147 |
| 148 // Get function code. | 148 // Get function code. |
| 149 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); | 149 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); |
| 150 __ LoadP(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); | 150 __ LoadP(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); |
| 151 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 151 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 152 | 152 |
| 153 // Re-run JSFunction, r4 is function, cp is context. | 153 // Re-run JSFunction, r4 is function, cp is context. |
| 154 __ Jump(ip); | 154 __ Jump(ip); |
| 155 } | 155 } |
| 156 | 156 |
| 157 | 157 |
| 158 const bool LiveEdit::kFrameDropperSupported = true; | 158 const bool LiveEdit::kFrameDropperSupported = true; |
| 159 | 159 |
| 160 #undef __ | 160 #undef __ |
| 161 } // namespace internal | 161 } // namespace internal |
| 162 } // namespace v8 | 162 } // namespace v8 |
| 163 | 163 |
| 164 #endif // V8_TARGET_ARCH_PPC | 164 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |