Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 1676883002: [runtime] Optimize and unify rest parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698