| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index a4a17efeec1194ac9acfc4e1fead128612b7962e..8533b326a6149604b2c5e2a94692224c08c76538 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -240,6 +240,25 @@ 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;
|
| + __ add(r3, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset));
|
| + __ mov(r2, Operand(Smi::FromInt(num_parameters)));
|
| + __ mov(r1, Operand(Smi::FromInt(rest_index)));
|
| + __ Push(r3, r2, r1);
|
| +
|
| + RestParamAccessStub stub(isolate());
|
| + __ CallStub(&stub);
|
| +
|
| + SetVar(rest_param, r0, r1, r2);
|
| + }
|
| +
|
| Variable* arguments = scope()->arguments();
|
| if (arguments != NULL) {
|
| // Function uses arguments object.
|
| @@ -263,7 +282,7 @@ void FullCodeGenerator::Generate() {
|
| // The stub will rewrite receiever 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_simmple_parameter_list()) {
|
| type = ArgumentsAccessStub::NEW_STRICT;
|
| } else if (function()->has_duplicate_parameters()) {
|
| type = ArgumentsAccessStub::NEW_SLOPPY_SLOW;
|
|
|