| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 8ab3763e7c584a40e1eda68db5d508ea0c8d739f..cf8e727d999bb6806fc29008914d0ee9028bf34f 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -236,6 +236,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;
|
| + __ lea(edx,
|
| + Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset));
|
| + __ push(edx);
|
| + __ push(Immediate(Smi::FromInt(num_parameters)));
|
| + __ push(Immediate(Smi::FromInt(rest_index)));
|
| +
|
| + RestParamAccessStub stub(isolate());
|
| + __ CallStub(&stub);
|
| +
|
| + SetVar(rest_param, eax, ebx, edx);
|
| + }
|
| +
|
| Variable* arguments = scope()->arguments();
|
| if (arguments != NULL) {
|
| // Function uses arguments object.
|
| @@ -257,7 +277,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;
|
|
|