| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 Variable* arguments = info->scope()->arguments(); | 264 Variable* arguments = info->scope()->arguments(); |
| 265 if (arguments != NULL) { | 265 if (arguments != NULL) { |
| 266 // Function uses arguments object. | 266 // Function uses arguments object. |
| 267 Comment cmnt(masm_, "[ Allocate arguments object"); | 267 Comment cmnt(masm_, "[ Allocate arguments object"); |
| 268 if (!function_in_register_r1) { | 268 if (!function_in_register_r1) { |
| 269 // Load this again, if it's used by the local context below. | 269 // Load this again, if it's used by the local context below. |
| 270 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 270 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 271 } | 271 } |
| 272 if (is_strict(language_mode()) || !has_simple_parameters()) { | 272 if (is_strict(language_mode()) || !has_simple_parameters()) { |
| 273 FastNewStrictArgumentsStub stub(isolate()); | 273 Callable callable = CodeFactory::FastNewStrictArguments(isolate()); |
| 274 __ CallStub(&stub); | 274 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 275 RestoreContext(); |
| 275 } else if (literal()->has_duplicate_parameters()) { | 276 } else if (literal()->has_duplicate_parameters()) { |
| 276 __ Push(r1); | 277 __ Push(r1); |
| 277 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); | 278 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
| 278 } else { | 279 } else { |
| 279 FastNewSloppyArgumentsStub stub(isolate()); | 280 Callable callable = CodeFactory::FastNewSloppyArguments(isolate()); |
| 280 __ CallStub(&stub); | 281 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 282 RestoreContext(); |
| 281 } | 283 } |
| 282 | 284 |
| 283 SetVar(arguments, r0, r1, r2); | 285 SetVar(arguments, r0, r1, r2); |
| 284 } | 286 } |
| 285 | 287 |
| 286 if (FLAG_trace) { | 288 if (FLAG_trace) { |
| 287 __ CallRuntime(Runtime::kTraceEnter); | 289 __ CallRuntime(Runtime::kTraceEnter); |
| 288 } | 290 } |
| 289 | 291 |
| 290 // Visit the declarations and body. | 292 // Visit the declarations and body. |
| (...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2908 DCHECK(interrupt_address == | 2910 DCHECK(interrupt_address == |
| 2909 isolate->builtins()->OnStackReplacement()->entry()); | 2911 isolate->builtins()->OnStackReplacement()->entry()); |
| 2910 return ON_STACK_REPLACEMENT; | 2912 return ON_STACK_REPLACEMENT; |
| 2911 } | 2913 } |
| 2912 | 2914 |
| 2913 | 2915 |
| 2914 } // namespace internal | 2916 } // namespace internal |
| 2915 } // namespace v8 | 2917 } // namespace v8 |
| 2916 | 2918 |
| 2917 #endif // V8_TARGET_ARCH_ARM | 2919 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |