| Index: src/full-codegen/x64/full-codegen-x64.cc
|
| diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
|
| index 1b65345f29b2cc2a95ad87e018d47d7e1128c4e7..1cc18044fd298189403d1b54d6c3c3de6d49f9e4 100644
|
| --- a/src/full-codegen/x64/full-codegen-x64.cc
|
| +++ b/src/full-codegen/x64/full-codegen-x64.cc
|
| @@ -249,6 +249,29 @@ void FullCodeGenerator::Generate() {
|
| SetVar(new_target_var, rdx, rbx, rcx);
|
| }
|
|
|
| + // Possibly allocate RestParameters
|
| + int rest_index;
|
| + Variable* rest_param = scope()->rest_parameter(&rest_index);
|
| + if (rest_param) {
|
| + Comment cmnt(masm_, "[ Allocate rest parameter array");
|
| +
|
| + int num_parameters = info->scope()->num_parameters();
|
| + int offset = num_parameters * kPointerSize;
|
| +
|
| + __ leap(rdx,
|
| + Operand(rbp, StandardFrameConstants::kCallerSPOffset + offset));
|
| + __ Push(rdx);
|
| + __ Push(Smi::FromInt(num_parameters));
|
| + __ Push(Smi::FromInt(rest_index));
|
| + __ Push(Smi::FromInt(language_mode()));
|
| + function_in_register = false;
|
| +
|
| + RestParamAccessStub stub(isolate());
|
| + __ CallStub(&stub);
|
| +
|
| + SetVar(rest_param, rax, rbx, rdx);
|
| + }
|
| +
|
| // Possibly allocate an arguments object.
|
| Variable* arguments = scope()->arguments();
|
| if (arguments != NULL) {
|
|
|