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

Unified Diff: src/compiler/ast-graph-builder.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/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 65c6826435f0df1a70fcf645094f90a9e88e5b86..c3cac45a4cd8e12f4ea117ec02291d0a428be8cd 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -3206,11 +3206,11 @@ Node* AstGraphBuilder::BuildArgumentsObject(Variable* arguments) {
if (arguments == nullptr) return nullptr;
// Allocate and initialize a new arguments object.
- CreateArgumentsParameters::Type type =
+ CreateArgumentsType type =
is_strict(language_mode()) || !info()->has_simple_parameters()
- ? CreateArgumentsParameters::kUnmappedArguments
- : CreateArgumentsParameters::kMappedArguments;
- const Operator* op = javascript()->CreateArguments(type, 0);
+ ? CreateArgumentsType::kUnmappedArguments
+ : CreateArgumentsType::kMappedArguments;
+ const Operator* op = javascript()->CreateArguments(type);
Node* object = NewNode(op, GetFunctionClosure());
PrepareFrameState(object, BailoutId::None());
@@ -3228,8 +3228,8 @@ Node* AstGraphBuilder::BuildRestArgumentsArray(Variable* rest, int index) {
if (rest == nullptr) return nullptr;
// Allocate and initialize a new arguments object.
- CreateArgumentsParameters::Type type = CreateArgumentsParameters::kRestArray;
- const Operator* op = javascript()->CreateArguments(type, index);
+ CreateArgumentsType type = CreateArgumentsType::kRestParameter;
+ const Operator* op = javascript()->CreateArguments(type);
Node* object = NewNode(op, GetFunctionClosure());
PrepareFrameState(object, BailoutId::None());

Powered by Google App Engine
This is Rietveld 408576698