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