| 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 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 __ Push(info->scope()->scope_info()); | 203 __ Push(info->scope()->scope_info()); |
| 204 __ CallRuntime(Runtime::kNewScriptContext); | 204 __ CallRuntime(Runtime::kNewScriptContext); |
| 205 PrepareForBailoutForId(BailoutId::ScriptContext(), | 205 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 206 BailoutState::TOS_REGISTER); | 206 BailoutState::TOS_REGISTER); |
| 207 // The new target value is not used, clobbering is safe. | 207 // The new target value is not used, clobbering is safe. |
| 208 DCHECK_NULL(info->scope()->new_target_var()); | 208 DCHECK_NULL(info->scope()->new_target_var()); |
| 209 } else { | 209 } else { |
| 210 if (info->scope()->new_target_var() != nullptr) { | 210 if (info->scope()->new_target_var() != nullptr) { |
| 211 __ push(a3); // Preserve new target. | 211 __ push(a3); // Preserve new target. |
| 212 } | 212 } |
| 213 FastNewFunctionContextStub stub(isolate()); | 213 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
| 214 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); | 214 FastNewFunctionContextStub stub(isolate()); |
| 215 __ CallStub(&stub); | 215 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 216 // Result of FastNewFunctionContextStub is always in new space. | 216 Operand(slots)); |
| 217 need_write_barrier = false; | 217 __ CallStub(&stub); |
| 218 // Result of FastNewFunctionContextStub is always in new space. |
| 219 need_write_barrier = false; |
| 220 } else { |
| 221 __ push(a1); |
| 222 __ CallRuntime(Runtime::kNewFunctionContext); |
| 223 } |
| 218 if (info->scope()->new_target_var() != nullptr) { | 224 if (info->scope()->new_target_var() != nullptr) { |
| 219 __ pop(a3); // Restore new target. | 225 __ pop(a3); // Restore new target. |
| 220 } | 226 } |
| 221 } | 227 } |
| 222 function_in_register_a1 = false; | 228 function_in_register_a1 = false; |
| 223 // Context is returned in v0. It replaces the context passed to us. | 229 // Context is returned in v0. It replaces the context passed to us. |
| 224 // It's saved in the stack and kept live in cp. | 230 // It's saved in the stack and kept live in cp. |
| 225 __ mov(cp, v0); | 231 __ mov(cp, v0); |
| 226 __ sw(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 232 __ sw(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 227 // Copy any necessary parameters into the context. | 233 // Copy any necessary parameters into the context. |
| (...skipping 3413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3641 reinterpret_cast<uint32_t>( | 3647 reinterpret_cast<uint32_t>( |
| 3642 isolate->builtins()->OnStackReplacement()->entry())); | 3648 isolate->builtins()->OnStackReplacement()->entry())); |
| 3643 return ON_STACK_REPLACEMENT; | 3649 return ON_STACK_REPLACEMENT; |
| 3644 } | 3650 } |
| 3645 | 3651 |
| 3646 | 3652 |
| 3647 } // namespace internal | 3653 } // namespace internal |
| 3648 } // namespace v8 | 3654 } // namespace v8 |
| 3649 | 3655 |
| 3650 #endif // V8_TARGET_ARCH_MIPS | 3656 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |