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

Unified Diff: src/preparser.cc

Issue 919703003: WIP: Implement ES6 Spread-calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Flag calls as spread calls in parser, error on spread intrinsics/construct calls Created 5 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/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 9e72422eb7deb1c28f824ac86937068d2eb5ddbe..8e34f4cae245e83f9c98950daab61876c89e3eef 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -1016,7 +1016,15 @@ PreParser::Expression PreParser::ParseV8Intrinsic(bool* ok) {
}
// Allow "eval" or "arguments" for backward compatibility.
ParseIdentifier(kAllowEvalOrArguments, CHECK_OK);
- ParseArguments(ok);
+ Scanner::Location spread_pos;
+ ParseArguments(&spread_pos, ok);
+
+ if (spread_pos.IsValid()) {
+ // Maybe support spread calls for intrinsics/runtime calls?
+ PreParserTraits::ReportMessageAt(spread_pos, "spreadcall_intrinsic");
+ *ok = false;
+ return Expression::Default();
+ }
return Expression::Default();
}

Powered by Google App Engine
This is Rietveld 408576698