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