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

Unified Diff: src/parsing/parser-base.h

Issue 2642843002: Revert of [Ignition/turbo] Add a CallWithSpread bytecode. (Closed)
Patch Set: Created 3 years, 11 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 | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index a10d1183dc2c32002877777d8cc79d96829e417d..b17d664b3abe099d90f65d67a15f7c3e616bbc5a 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -2597,7 +2597,6 @@
bool done = (peek() == Token::RPAREN);
bool was_unspread = false;
int unspread_sequences_count = 0;
- int spread_count = 0;
while (!done) {
int start_pos = peek_position();
bool is_spread = Check(Token::ELLIPSIS);
@@ -2621,7 +2620,6 @@
// are not prefixed with a spread '...' operator.
if (is_spread) {
was_unspread = false;
- spread_count++;
} else if (!was_unspread) {
was_unspread = true;
unspread_sequences_count++;
@@ -2657,11 +2655,7 @@
// Unspread parameter sequences are translated into array literals in the
// parser. Ensure that the number of materialized literals matches between
// the parser and preparser
- if (was_unspread || spread_count > 1) {
- // There was more than one spread, or the spread was not the final
- // argument, so the parser will materialize literals.
- impl()->MaterializeUnspreadArgumentsLiterals(unspread_sequences_count);
- }
+ impl()->MaterializeUnspreadArgumentsLiterals(unspread_sequences_count);
}
}
@@ -3203,7 +3197,7 @@
bool is_super_call = result->IsSuperCallReference();
if (spread_pos.IsValid()) {
- result = impl()->SpreadCall(result, args, pos, is_possibly_eval);
+ result = impl()->SpreadCall(result, args, pos);
} else {
result = factory()->NewCall(result, args, pos, is_possibly_eval);
}
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698