OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 271 |
272 Variable* arguments = info->scope()->arguments(); | 272 Variable* arguments = info->scope()->arguments(); |
273 if (arguments != NULL) { | 273 if (arguments != NULL) { |
274 // Function uses arguments object. | 274 // Function uses arguments object. |
275 Comment cmnt(masm_, "[ Allocate arguments object"); | 275 Comment cmnt(masm_, "[ Allocate arguments object"); |
276 if (!function_in_register_r4) { | 276 if (!function_in_register_r4) { |
277 // Load this again, if it's used by the local context below. | 277 // Load this again, if it's used by the local context below. |
278 __ LoadP(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 278 __ LoadP(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
279 } | 279 } |
280 if (is_strict(language_mode()) || !has_simple_parameters()) { | 280 if (is_strict(language_mode()) || !has_simple_parameters()) { |
281 FastNewStrictArgumentsStub stub(isolate()); | 281 Callable callable = CodeFactory::FastNewStrictArguments(isolate()); |
282 __ CallStub(&stub); | 282 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 283 RestoreContext(); |
283 } else if (literal()->has_duplicate_parameters()) { | 284 } else if (literal()->has_duplicate_parameters()) { |
284 __ Push(r4); | 285 __ Push(r4); |
285 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); | 286 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
286 } else { | 287 } else { |
287 FastNewSloppyArgumentsStub stub(isolate()); | 288 Callable callable = CodeFactory::FastNewSloppyArguments(isolate()); |
288 __ CallStub(&stub); | 289 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 290 RestoreContext(); |
289 } | 291 } |
290 | 292 |
291 SetVar(arguments, r3, r4, r5); | 293 SetVar(arguments, r3, r4, r5); |
292 } | 294 } |
293 | 295 |
294 if (FLAG_trace) { | 296 if (FLAG_trace) { |
295 __ CallRuntime(Runtime::kTraceEnter); | 297 __ CallRuntime(Runtime::kTraceEnter); |
296 } | 298 } |
297 | 299 |
298 // Visit the declarations and body. | 300 // Visit the declarations and body. |
(...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2848 | 2850 |
2849 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 2851 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
2850 | 2852 |
2851 DCHECK(interrupt_address == | 2853 DCHECK(interrupt_address == |
2852 isolate->builtins()->OnStackReplacement()->entry()); | 2854 isolate->builtins()->OnStackReplacement()->entry()); |
2853 return ON_STACK_REPLACEMENT; | 2855 return ON_STACK_REPLACEMENT; |
2854 } | 2856 } |
2855 } // namespace internal | 2857 } // namespace internal |
2856 } // namespace v8 | 2858 } // namespace v8 |
2857 #endif // V8_TARGET_ARCH_PPC | 2859 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |