| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index b248dd1ebbf88f200e6ac44acdf87683e402f47c..274a12d88367370636cf757214df6c0f0700543d 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -232,6 +232,26 @@ void FullCodeGenerator::Generate() {
|
| }
|
| }
|
|
|
| + // 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));
|
| +
|
| + RestParamAccessStub stub(isolate());
|
| + __ CallStub(&stub);
|
| +
|
| + SetVar(rest_param, rax, rbx, rdx);
|
| + }
|
| +
|
| // Possibly allocate an arguments object.
|
| Variable* arguments = scope()->arguments();
|
| if (arguments != NULL) {
|
| @@ -255,7 +275,7 @@ void FullCodeGenerator::Generate() {
|
| // The stub will rewrite receiver and parameter count if the previous
|
| // stack frame was an arguments adapter frame.
|
| ArgumentsAccessStub::Type type;
|
| - if (is_strict(language_mode())) {
|
| + if (is_strict(language_mode()) || !is_simple_parameter_list()) {
|
| type = ArgumentsAccessStub::NEW_STRICT;
|
| } else if (function()->has_duplicate_parameters()) {
|
| type = ArgumentsAccessStub::NEW_SLOPPY_SLOW;
|
|
|