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

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

Issue 1677223002: PPC: [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
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/ppc/full-codegen-ppc.cc
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc
index 079c22d212d96e78eb56a2d5047ea2eb2d94e673..41b89da3957b960819bc225c5a603aaae46f5d97 100644
--- a/src/full-codegen/ppc/full-codegen-ppc.cc
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc
@@ -263,21 +263,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;
-
- __ LoadSmiLiteral(RestParamAccessDescriptor::parameter_count(),
- Smi::FromInt(num_parameters));
- __ addi(RestParamAccessDescriptor::parameter_pointer(), fp,
- Operand(StandardFrameConstants::kCallerSPOffset + offset));
- __ LoadSmiLiteral(RestParamAccessDescriptor::rest_parameter_index(),
- Smi::FromInt(rest_index));
- function_in_register_r4 = false;
-
- RestParamAccessStub stub(isolate());
+ if (!function_in_register_r4) {
+ __ LoadP(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
+ }
+ FastNewRestParameterStub stub(isolate());
__ CallStub(&stub);
-
+ function_in_register_r4 = false;
SetVar(rest_param, r3, r4, r5);
}
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698