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 a8262c76836e6e00304065314589c00c50d9d1c1..642671af18e80d1a80db971c7bfc78aec0339928 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -264,21 +264,12 @@ void FullCodeGenerator::Generate() { |
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; |
- |
- __ mov(RestParamAccessDescriptor::parameter_count(), |
- Operand(Smi::FromInt(num_parameters))); |
- __ add(RestParamAccessDescriptor::parameter_pointer(), fp, |
- Operand(StandardFrameConstants::kCallerSPOffset + offset)); |
- __ mov(RestParamAccessDescriptor::rest_parameter_index(), |
- Operand(Smi::FromInt(rest_index))); |
- function_in_register_r1 = false; |
- |
- RestParamAccessStub stub(isolate()); |
+ if (!function_in_register_r1) { |
+ __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ } |
+ FastNewRestParameterStub stub(isolate()); |
__ CallStub(&stub); |
- |
+ function_in_register_r1 = false; |
SetVar(rest_param, r0, r1, r2); |
} |