| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 // Possibly set up a local binding to the new target value. | 239 // Possibly set up a local binding to the new target value. |
| 240 Variable* new_target_var = info->scope()->new_target_var(); | 240 Variable* new_target_var = info->scope()->new_target_var(); |
| 241 if (new_target_var != nullptr) { | 241 if (new_target_var != nullptr) { |
| 242 Comment cmnt(masm_, "[ new.target"); | 242 Comment cmnt(masm_, "[ new.target"); |
| 243 SetVar(new_target_var, rdx, rbx, rcx); | 243 SetVar(new_target_var, rdx, rbx, rcx); |
| 244 } | 244 } |
| 245 | 245 |
| 246 // Possibly allocate RestParameters | 246 // Possibly allocate RestParameters |
| 247 int rest_index; | 247 Variable* rest_param = info->scope()->rest_parameter(); |
| 248 Variable* rest_param = info->scope()->rest_parameter(&rest_index); | 248 if (rest_param != nullptr) { |
| 249 if (rest_param) { | |
| 250 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 249 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
| 251 if (!function_in_register) { | 250 if (!function_in_register) { |
| 252 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 251 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 253 } | 252 } |
| 254 FastNewRestParameterStub stub(isolate()); | 253 FastNewRestParameterStub stub(isolate()); |
| 255 __ CallStub(&stub); | 254 __ CallStub(&stub); |
| 256 function_in_register = false; | 255 function_in_register = false; |
| 257 SetVar(rest_param, rax, rbx, rdx); | 256 SetVar(rest_param, rax, rbx, rdx); |
| 258 } | 257 } |
| 259 | 258 |
| (...skipping 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3636 DCHECK_EQ( | 3635 DCHECK_EQ( |
| 3637 isolate->builtins()->OnStackReplacement()->entry(), | 3636 isolate->builtins()->OnStackReplacement()->entry(), |
| 3638 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3637 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3639 return ON_STACK_REPLACEMENT; | 3638 return ON_STACK_REPLACEMENT; |
| 3640 } | 3639 } |
| 3641 | 3640 |
| 3642 } // namespace internal | 3641 } // namespace internal |
| 3643 } // namespace v8 | 3642 } // namespace v8 |
| 3644 | 3643 |
| 3645 #endif // V8_TARGET_ARCH_X64 | 3644 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |