| 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/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 ExternalReference after_break_target = | 107 ExternalReference after_break_target = |
| 108 ExternalReference::debug_after_break_target_address(masm->isolate()); | 108 ExternalReference::debug_after_break_target_address(masm->isolate()); |
| 109 __ li(t9, Operand(after_break_target)); | 109 __ li(t9, Operand(after_break_target)); |
| 110 __ lw(t9, MemOperand(t9)); | 110 __ lw(t9, MemOperand(t9)); |
| 111 __ Jump(t9); | 111 __ Jump(t9); |
| 112 } | 112 } |
| 113 | 113 |
| 114 | 114 |
| 115 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 115 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 116 // We do not know our frame height, but set sp based on fp. | 116 // We do not know our frame height, but set sp based on fp. |
| 117 __ Subu(sp, fp, Operand(kPointerSize)); | 117 __ lw(a1, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); |
| 118 | 118 |
| 119 __ Pop(ra, fp, a1); // Return address, Frame, Function. | 119 // Pop return address and frame. |
| 120 __ LeaveFrame(StackFrame::INTERNAL); |
| 120 | 121 |
| 121 ParameterCount dummy(0); | 122 ParameterCount dummy(0); |
| 122 __ FloodFunctionIfStepping(a1, no_reg, dummy, dummy); | 123 __ FloodFunctionIfStepping(a1, no_reg, dummy, dummy); |
| 123 | 124 |
| 124 // Load context from the function. | 125 // Load context from the function. |
| 125 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 126 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
| 126 | 127 |
| 127 // Clear new.target as a safety measure. | 128 // Clear new.target as a safety measure. |
| 128 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); | 129 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); |
| 129 | 130 |
| 130 // Get function code. | 131 // Get function code. |
| 131 __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 132 __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
| 132 __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); | 133 __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); |
| 133 __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); | 134 __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 134 | 135 |
| 135 // Re-run JSFunction, a1 is function, cp is context. | 136 // Re-run JSFunction, a1 is function, cp is context. |
| 136 __ Jump(t9); | 137 __ Jump(t9); |
| 137 } | 138 } |
| 138 | 139 |
| 139 | 140 |
| 140 const bool LiveEdit::kFrameDropperSupported = true; | 141 const bool LiveEdit::kFrameDropperSupported = true; |
| 141 | 142 |
| 142 #undef __ | 143 #undef __ |
| 143 | 144 |
| 144 } // namespace internal | 145 } // namespace internal |
| 145 } // namespace v8 | 146 } // namespace v8 |
| 146 | 147 |
| 147 #endif // V8_TARGET_ARCH_MIPS | 148 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |