| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 Variable* arguments = info->scope()->arguments(); | 274 Variable* arguments = info->scope()->arguments(); |
| 275 if (arguments != NULL) { | 275 if (arguments != NULL) { |
| 276 // Function uses arguments object. | 276 // Function uses arguments object. |
| 277 Comment cmnt(masm_, "[ Allocate arguments object"); | 277 Comment cmnt(masm_, "[ Allocate arguments object"); |
| 278 if (!function_in_register_a1) { | 278 if (!function_in_register_a1) { |
| 279 // Load this again, if it's used by the local context below. | 279 // Load this again, if it's used by the local context below. |
| 280 __ ld(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 280 __ ld(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 281 } | 281 } |
| 282 if (is_strict(language_mode()) || !has_simple_parameters()) { | 282 if (is_strict(language_mode()) || !has_simple_parameters()) { |
| 283 FastNewStrictArgumentsStub stub(isolate()); | 283 Callable callable = CodeFactory::FastNewStrictArguments(isolate()); |
| 284 __ CallStub(&stub); | 284 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 285 RestoreContext(); |
| 285 } else if (literal()->has_duplicate_parameters()) { | 286 } else if (literal()->has_duplicate_parameters()) { |
| 286 __ Push(a1); | 287 __ Push(a1); |
| 287 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); | 288 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
| 288 } else { | 289 } else { |
| 289 FastNewSloppyArgumentsStub stub(isolate()); | 290 Callable callable = CodeFactory::FastNewSloppyArguments(isolate()); |
| 290 __ CallStub(&stub); | 291 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 292 RestoreContext(); |
| 291 } | 293 } |
| 292 | 294 |
| 293 SetVar(arguments, v0, a1, a2); | 295 SetVar(arguments, v0, a1, a2); |
| 294 } | 296 } |
| 295 | 297 |
| 296 if (FLAG_trace) { | 298 if (FLAG_trace) { |
| 297 __ CallRuntime(Runtime::kTraceEnter); | 299 __ CallRuntime(Runtime::kTraceEnter); |
| 298 } | 300 } |
| 299 | 301 |
| 300 // Visit the declarations and body. | 302 // Visit the declarations and body. |
| (...skipping 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2879 reinterpret_cast<uint64_t>( | 2881 reinterpret_cast<uint64_t>( |
| 2880 isolate->builtins()->OnStackReplacement()->entry())); | 2882 isolate->builtins()->OnStackReplacement()->entry())); |
| 2881 return ON_STACK_REPLACEMENT; | 2883 return ON_STACK_REPLACEMENT; |
| 2882 } | 2884 } |
| 2883 | 2885 |
| 2884 | 2886 |
| 2885 } // namespace internal | 2887 } // namespace internal |
| 2886 } // namespace v8 | 2888 } // namespace v8 |
| 2887 | 2889 |
| 2888 #endif // V8_TARGET_ARCH_MIPS64 | 2890 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |