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