| Index: src/full-codegen/arm/full-codegen-arm.cc
|
| diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc
|
| index e10cb4ab7001e464835f8bb86caaec18fa5bd2ab..c34db15e163d2f07f51f8311f1f7f6cea25b6b20 100644
|
| --- a/src/full-codegen/arm/full-codegen-arm.cc
|
| +++ b/src/full-codegen/arm/full-codegen-arm.cc
|
| @@ -259,6 +259,28 @@ void FullCodeGenerator::Generate() {
|
| SetVar(new_target_var, r3, r0, r2);
|
| }
|
|
|
| + // 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)));
|
| + __ mov(r0, Operand(Smi::FromInt(language_mode())));
|
| + __ Push(r3, r2, r1, r0);
|
| + function_in_register_r1 = false;
|
| +
|
| + RestParamAccessStub stub(isolate());
|
| + __ CallStub(&stub);
|
| +
|
| + SetVar(rest_param, r0, r1, r2);
|
| + }
|
| +
|
| Variable* arguments = scope()->arguments();
|
| if (arguments != NULL) {
|
| // Function uses arguments object.
|
|
|