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

Unified Diff: src/compiler/js-generic-lowering.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/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index 5972ce81dcbd5462d83bad81b09426af3b014b4d..0b5797df85e211832cced3a0523925829f5d2d29 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -455,17 +455,16 @@ void JSGenericLowering::LowerJSCreate(Node* node) {
void JSGenericLowering::LowerJSCreateArguments(Node* node) {
- const CreateArgumentsParameters& p = CreateArgumentsParametersOf(node->op());
- switch (p.type()) {
- case CreateArgumentsParameters::kMappedArguments:
+ CreateArgumentsType const type = CreateArgumentsTypeOf(node->op());
+ switch (type) {
+ case CreateArgumentsType::kMappedArguments:
ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic);
break;
- case CreateArgumentsParameters::kUnmappedArguments:
+ case CreateArgumentsType::kUnmappedArguments:
ReplaceWithRuntimeCall(node, Runtime::kNewStrictArguments_Generic);
break;
- case CreateArgumentsParameters::kRestArray:
- node->InsertInput(zone(), 1, jsgraph()->Constant(p.start_index()));
- ReplaceWithRuntimeCall(node, Runtime::kNewRestArguments_Generic);
+ case CreateArgumentsType::kRestParameter:
+ ReplaceWithRuntimeCall(node, Runtime::kNewRestParameter);
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698