Index: src/full-codegen/mips64/full-codegen-mips64.cc |
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc |
index 3ca8d78e86e1017b81fe6ee6628c37de94223831..d86479833c661ccab3bf7a3e028a91559e8c6fbe 100644 |
--- a/src/full-codegen/mips64/full-codegen-mips64.cc |
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc |
@@ -272,21 +272,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; |
- |
- __ li(RestParamAccessDescriptor::parameter_count(), |
- Operand(Smi::FromInt(num_parameters))); |
- __ Daddu(RestParamAccessDescriptor::parameter_pointer(), fp, |
- Operand(StandardFrameConstants::kCallerSPOffset + offset)); |
- __ li(RestParamAccessDescriptor::rest_parameter_index(), |
- Operand(Smi::FromInt(rest_index))); |
- function_in_register_a1 = false; |
- |
- RestParamAccessStub stub(isolate()); |
+ if (!function_in_register_a1) { |
+ __ lw(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ } |
+ FastNewRestParameterStub stub(isolate()); |
__ CallStub(&stub); |
- |
+ function_in_register_a1 = false; |
SetVar(rest_param, v0, a1, a2); |
} |