OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 Variable* arguments = info->scope()->arguments(); | 276 Variable* arguments = info->scope()->arguments(); |
277 if (arguments != NULL) { | 277 if (arguments != NULL) { |
278 // Function uses arguments object. | 278 // Function uses arguments object. |
279 Comment cmnt(masm_, "[ Allocate arguments object"); | 279 Comment cmnt(masm_, "[ Allocate arguments object"); |
280 if (!function_in_register_r3) { | 280 if (!function_in_register_r3) { |
281 // Load this again, if it's used by the local context below. | 281 // Load this again, if it's used by the local context below. |
282 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 282 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
283 } | 283 } |
284 if (is_strict(language_mode()) || !has_simple_parameters()) { | 284 if (is_strict(language_mode()) || !has_simple_parameters()) { |
285 FastNewStrictArgumentsStub stub(isolate()); | 285 Callable callable = CodeFactory::FastNewStrictArguments(isolate()); |
286 __ CallStub(&stub); | 286 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 287 RestoreContext(); |
287 } else if (literal()->has_duplicate_parameters()) { | 288 } else if (literal()->has_duplicate_parameters()) { |
288 __ Push(r3); | 289 __ Push(r3); |
289 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); | 290 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
290 } else { | 291 } else { |
291 FastNewSloppyArgumentsStub stub(isolate()); | 292 Callable callable = CodeFactory::FastNewSloppyArguments(isolate()); |
292 __ CallStub(&stub); | 293 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 294 RestoreContext(); |
293 } | 295 } |
294 | 296 |
295 SetVar(arguments, r2, r3, r4); | 297 SetVar(arguments, r2, r3, r4); |
296 } | 298 } |
297 | 299 |
298 if (FLAG_trace) { | 300 if (FLAG_trace) { |
299 __ CallRuntime(Runtime::kTraceEnter); | 301 __ CallRuntime(Runtime::kTraceEnter); |
300 } | 302 } |
301 | 303 |
302 // Visit the declarations and body. | 304 // Visit the declarations and body. |
(...skipping 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2785 USE(kOSRBranchInstruction); | 2787 USE(kOSRBranchInstruction); |
2786 DCHECK(kOSRBranchInstruction == br_instr); | 2788 DCHECK(kOSRBranchInstruction == br_instr); |
2787 | 2789 |
2788 DCHECK(interrupt_address == | 2790 DCHECK(interrupt_address == |
2789 isolate->builtins()->OnStackReplacement()->entry()); | 2791 isolate->builtins()->OnStackReplacement()->entry()); |
2790 return ON_STACK_REPLACEMENT; | 2792 return ON_STACK_REPLACEMENT; |
2791 } | 2793 } |
2792 } // namespace internal | 2794 } // namespace internal |
2793 } // namespace v8 | 2795 } // namespace v8 |
2794 #endif // V8_TARGET_ARCH_S390 | 2796 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |