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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 __ sw(zero_reg, MemOperand(at, 0)); | 121 __ sw(zero_reg, MemOperand(at, 0)); |
122 | 122 |
123 // We do not know our frame height, but set sp based on fp. | 123 // We do not know our frame height, but set sp based on fp. |
124 __ Subu(sp, fp, Operand(kPointerSize)); | 124 __ Subu(sp, fp, Operand(kPointerSize)); |
125 | 125 |
126 __ Pop(ra, fp, a1); // Return address, Frame, Function. | 126 __ Pop(ra, fp, a1); // Return address, Frame, Function. |
127 | 127 |
128 // Load context from the function. | 128 // Load context from the function. |
129 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 129 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
130 | 130 |
| 131 // Clear new.target as a safety measure. |
| 132 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); |
| 133 |
131 // Get function code. | 134 // Get function code. |
132 __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 135 __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
133 __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); | 136 __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); |
134 __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); | 137 __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); |
135 | 138 |
136 // Re-run JSFunction, a1 is function, cp is context. | 139 // Re-run JSFunction, a1 is function, cp is context. |
137 __ Jump(t9); | 140 __ Jump(t9); |
138 } | 141 } |
139 | 142 |
140 | 143 |
141 const bool LiveEdit::kFrameDropperSupported = true; | 144 const bool LiveEdit::kFrameDropperSupported = true; |
142 | 145 |
143 #undef __ | 146 #undef __ |
144 | 147 |
145 } // namespace internal | 148 } // namespace internal |
146 } // namespace v8 | 149 } // namespace v8 |
147 | 150 |
148 #endif // V8_TARGET_ARCH_MIPS | 151 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |