OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 Variable* arguments = info->scope()->arguments(); | 267 Variable* arguments = info->scope()->arguments(); |
268 if (arguments != NULL) { | 268 if (arguments != NULL) { |
269 // Function uses arguments object. | 269 // Function uses arguments object. |
270 Comment cmnt(masm_, "[ Allocate arguments object"); | 270 Comment cmnt(masm_, "[ Allocate arguments object"); |
271 if (!function_in_register_x1) { | 271 if (!function_in_register_x1) { |
272 // Load this again, if it's used by the local context below. | 272 // Load this again, if it's used by the local context below. |
273 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 273 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
274 } | 274 } |
275 if (is_strict(language_mode()) || !has_simple_parameters()) { | 275 if (is_strict(language_mode()) || !has_simple_parameters()) { |
276 FastNewStrictArgumentsStub stub(isolate()); | 276 Callable callable = CodeFactory::FastNewStrictArguments(isolate()); |
277 __ CallStub(&stub); | 277 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 278 RestoreContext(); |
278 } else if (literal()->has_duplicate_parameters()) { | 279 } else if (literal()->has_duplicate_parameters()) { |
279 __ Push(x1); | 280 __ Push(x1); |
280 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); | 281 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
281 } else { | 282 } else { |
282 FastNewSloppyArgumentsStub stub(isolate()); | 283 Callable callable = CodeFactory::FastNewSloppyArguments(isolate()); |
283 __ CallStub(&stub); | 284 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 285 RestoreContext(); |
284 } | 286 } |
285 | 287 |
286 SetVar(arguments, x0, x1, x2); | 288 SetVar(arguments, x0, x1, x2); |
287 } | 289 } |
288 | 290 |
289 if (FLAG_trace) { | 291 if (FLAG_trace) { |
290 __ CallRuntime(Runtime::kTraceEnter); | 292 __ CallRuntime(Runtime::kTraceEnter); |
291 } | 293 } |
292 | 294 |
293 // Visit the declarations and body. | 295 // Visit the declarations and body. |
(...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2911 } | 2913 } |
2912 | 2914 |
2913 return INTERRUPT; | 2915 return INTERRUPT; |
2914 } | 2916 } |
2915 | 2917 |
2916 | 2918 |
2917 } // namespace internal | 2919 } // namespace internal |
2918 } // namespace v8 | 2920 } // namespace v8 |
2919 | 2921 |
2920 #endif // V8_TARGET_ARCH_ARM64 | 2922 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |