| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 | 124 |
| 125 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 125 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 126 // We do not know our frame height, but set sp based on fp. | 126 // We do not know our frame height, but set sp based on fp. |
| 127 __ lw(a1, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); | 127 __ lw(a1, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); |
| 128 | 128 |
| 129 // Pop return address and frame. | 129 // Pop return address and frame. |
| 130 __ LeaveFrame(StackFrame::INTERNAL); | 130 __ LeaveFrame(StackFrame::INTERNAL); |
| 131 | 131 |
| 132 ParameterCount dummy(0); | 132 ParameterCount dummy(0); |
| 133 __ FloodFunctionIfStepping(a1, no_reg, dummy, dummy); | 133 __ CheckDebugHook(a1, no_reg, dummy, dummy); |
| 134 | 134 |
| 135 // Load context from the function. | 135 // Load context from the function. |
| 136 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 136 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
| 137 | 137 |
| 138 // Clear new.target as a safety measure. | 138 // Clear new.target as a safety measure. |
| 139 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); | 139 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); |
| 140 | 140 |
| 141 // Get function code. | 141 // Get function code. |
| 142 __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 142 __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
| 143 __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); | 143 __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); |
| 144 __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); | 144 __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 145 | 145 |
| 146 // Re-run JSFunction, a1 is function, cp is context. | 146 // Re-run JSFunction, a1 is function, cp is context. |
| 147 __ Jump(t9); | 147 __ Jump(t9); |
| 148 } | 148 } |
| 149 | 149 |
| 150 | 150 |
| 151 const bool LiveEdit::kFrameDropperSupported = true; | 151 const bool LiveEdit::kFrameDropperSupported = true; |
| 152 | 152 |
| 153 #undef __ | 153 #undef __ |
| 154 | 154 |
| 155 } // namespace internal | 155 } // namespace internal |
| 156 } // namespace v8 | 156 } // namespace v8 |
| 157 | 157 |
| 158 #endif // V8_TARGET_ARCH_MIPS | 158 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |