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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 Variable* arguments = info->scope()->arguments(); | 257 Variable* arguments = info->scope()->arguments(); |
258 if (arguments != NULL) { | 258 if (arguments != NULL) { |
259 // Arguments object must be allocated after the context object, in | 259 // Arguments object must be allocated after the context object, in |
260 // case the "arguments" or ".arguments" variables are in the context. | 260 // case the "arguments" or ".arguments" variables are in the context. |
261 Comment cmnt(masm_, "[ Allocate arguments object"); | 261 Comment cmnt(masm_, "[ Allocate arguments object"); |
262 if (!function_in_register) { | 262 if (!function_in_register) { |
263 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 263 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
264 } | 264 } |
265 if (is_strict(language_mode()) || !has_simple_parameters()) { | 265 if (is_strict(language_mode()) || !has_simple_parameters()) { |
266 FastNewStrictArgumentsStub stub(isolate()); | 266 __ call(isolate()->builtins()->FastNewStrictArguments(), |
267 __ CallStub(&stub); | 267 RelocInfo::CODE_TARGET); |
| 268 RestoreContext(); |
268 } else if (literal()->has_duplicate_parameters()) { | 269 } else if (literal()->has_duplicate_parameters()) { |
269 __ Push(edi); | 270 __ Push(edi); |
270 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); | 271 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
271 } else { | 272 } else { |
272 FastNewSloppyArgumentsStub stub(isolate()); | 273 __ call(isolate()->builtins()->FastNewSloppyArguments(), |
273 __ CallStub(&stub); | 274 RelocInfo::CODE_TARGET); |
| 275 RestoreContext(); |
274 } | 276 } |
275 | 277 |
276 SetVar(arguments, eax, ebx, edx); | 278 SetVar(arguments, eax, ebx, edx); |
277 } | 279 } |
278 | 280 |
279 if (FLAG_trace) { | 281 if (FLAG_trace) { |
280 __ CallRuntime(Runtime::kTraceEnter); | 282 __ CallRuntime(Runtime::kTraceEnter); |
281 } | 283 } |
282 | 284 |
283 // Visit the declarations and body. | 285 // Visit the declarations and body. |
(...skipping 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2781 isolate->builtins()->OnStackReplacement()->entry(), | 2783 isolate->builtins()->OnStackReplacement()->entry(), |
2782 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2784 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2783 return ON_STACK_REPLACEMENT; | 2785 return ON_STACK_REPLACEMENT; |
2784 } | 2786 } |
2785 | 2787 |
2786 | 2788 |
2787 } // namespace internal | 2789 } // namespace internal |
2788 } // namespace v8 | 2790 } // namespace v8 |
2789 | 2791 |
2790 #endif // V8_TARGET_ARCH_IA32 | 2792 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |