| 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 // 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 186 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
| 187 __ CallRuntime(Runtime::kNewScriptContext); | 187 __ CallRuntime(Runtime::kNewScriptContext); |
| 188 PrepareForBailoutForId(BailoutId::ScriptContext(), | 188 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 189 BailoutState::TOS_REGISTER); | 189 BailoutState::TOS_REGISTER); |
| 190 // The new target value is not used, clobbering is safe. | 190 // The new target value is not used, clobbering is safe. |
| 191 DCHECK_NULL(info->scope()->new_target_var()); | 191 DCHECK_NULL(info->scope()->new_target_var()); |
| 192 } else { | 192 } else { |
| 193 if (info->scope()->new_target_var() != nullptr) { | 193 if (info->scope()->new_target_var() != nullptr) { |
| 194 __ push(a3); // Preserve new target. | 194 __ push(a3); // Preserve new target. |
| 195 } | 195 } |
| 196 FastNewFunctionContextStub stub(isolate()); | 196 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
| 197 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); | 197 FastNewFunctionContextStub stub(isolate()); |
| 198 __ CallStub(&stub); | 198 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 199 // Result of FastNewFunctionContextStub is always in new space. | 199 Operand(slots)); |
| 200 need_write_barrier = false; | 200 __ CallStub(&stub); |
| 201 // Result of FastNewFunctionContextStub is always in new space. |
| 202 need_write_barrier = false; |
| 203 } else { |
| 204 __ push(a1); |
| 205 __ CallRuntime(Runtime::kNewFunctionContext); |
| 206 } |
| 201 if (info->scope()->new_target_var() != nullptr) { | 207 if (info->scope()->new_target_var() != nullptr) { |
| 202 __ pop(a3); // Restore new target. | 208 __ pop(a3); // Restore new target. |
| 203 } | 209 } |
| 204 } | 210 } |
| 205 function_in_register_a1 = false; | 211 function_in_register_a1 = false; |
| 206 // Context is returned in v0. It replaces the context passed to us. | 212 // Context is returned in v0. It replaces the context passed to us. |
| 207 // It's saved in the stack and kept live in cp. | 213 // It's saved in the stack and kept live in cp. |
| 208 __ mov(cp, v0); | 214 __ mov(cp, v0); |
| 209 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 215 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 210 // Copy any necessary parameters into the context. | 216 // Copy any necessary parameters into the context. |
| (...skipping 3553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3764 reinterpret_cast<uint64_t>( | 3770 reinterpret_cast<uint64_t>( |
| 3765 isolate->builtins()->OnStackReplacement()->entry())); | 3771 isolate->builtins()->OnStackReplacement()->entry())); |
| 3766 return ON_STACK_REPLACEMENT; | 3772 return ON_STACK_REPLACEMENT; |
| 3767 } | 3773 } |
| 3768 | 3774 |
| 3769 | 3775 |
| 3770 } // namespace internal | 3776 } // namespace internal |
| 3771 } // namespace v8 | 3777 } // namespace v8 |
| 3772 | 3778 |
| 3773 #endif // V8_TARGET_ARCH_MIPS64 | 3779 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |