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