Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index ea3160692cd0952ffa230b8e2ee75b99c2049c3f..02ae248315f838d3fd0ddff1c5b1cc1b36776951 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -268,21 +268,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(), |
- Smi::FromInt(num_parameters)); |
- __ Add(RestParamAccessDescriptor::parameter_pointer(), fp, |
- StandardFrameConstants::kCallerSPOffset + offset); |
- __ Mov(RestParamAccessDescriptor::rest_parameter_index(), |
- Smi::FromInt(rest_index)); |
- |
- function_in_register_x1 = false; |
- |
- RestParamAccessStub stub(isolate()); |
+ if (!function_in_register_x1) { |
+ __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ } |
+ FastNewRestParameterStub stub(isolate()); |
__ CallStub(&stub); |
- |
+ function_in_register_x1 = false; |
SetVar(rest_param, x0, x1, x2); |
} |