| 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/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 242 } |
| 243 | 243 |
| 244 // Possibly set up a local binding to the new target value. | 244 // Possibly set up a local binding to the new target value. |
| 245 Variable* new_target_var = info->scope()->new_target_var(); | 245 Variable* new_target_var = info->scope()->new_target_var(); |
| 246 if (new_target_var != nullptr) { | 246 if (new_target_var != nullptr) { |
| 247 Comment cmnt(masm_, "[ new.target"); | 247 Comment cmnt(masm_, "[ new.target"); |
| 248 SetVar(new_target_var, edx, ebx, ecx); | 248 SetVar(new_target_var, edx, ebx, ecx); |
| 249 } | 249 } |
| 250 | 250 |
| 251 // Possibly allocate RestParameters | 251 // Possibly allocate RestParameters |
| 252 int rest_index; | 252 Variable* rest_param = info->scope()->rest_parameter(); |
| 253 Variable* rest_param = info->scope()->rest_parameter(&rest_index); | 253 if (rest_param != nullptr) { |
| 254 if (rest_param) { | |
| 255 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 254 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
| 256 if (!function_in_register) { | 255 if (!function_in_register) { |
| 257 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 256 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 258 } | 257 } |
| 259 FastNewRestParameterStub stub(isolate()); | 258 FastNewRestParameterStub stub(isolate()); |
| 260 __ CallStub(&stub); | 259 __ CallStub(&stub); |
| 261 function_in_register = false; | 260 function_in_register = false; |
| 262 SetVar(rest_param, eax, ebx, edx); | 261 SetVar(rest_param, eax, ebx, edx); |
| 263 } | 262 } |
| 264 | 263 |
| (...skipping 3381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3646 isolate->builtins()->OnStackReplacement()->entry(), | 3645 isolate->builtins()->OnStackReplacement()->entry(), |
| 3647 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3646 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3648 return ON_STACK_REPLACEMENT; | 3647 return ON_STACK_REPLACEMENT; |
| 3649 } | 3648 } |
| 3650 | 3649 |
| 3651 | 3650 |
| 3652 } // namespace internal | 3651 } // namespace internal |
| 3653 } // namespace v8 | 3652 } // namespace v8 |
| 3654 | 3653 |
| 3655 #endif // V8_TARGET_ARCH_IA32 | 3654 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |