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

Unified Diff: src/preparser.h

Issue 950303002: [strong] Deprecate ellisions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/messages.js ('k') | test/mjsunit/strong/arrays.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 8171f9433a4627c9b8fe5f1c5ac6a72d73a9ae4a..41b3a31f0e1169068eaf2968fe55b67fc3904ee4 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -2013,6 +2013,11 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseArrayLiteral(
while (peek() != Token::RBRACK) {
ExpressionT elem = this->EmptyExpression();
if (peek() == Token::COMMA) {
+ if (is_strong(language_mode())) {
+ ReportMessageAt(scanner()->peek_location(), "strong_ellision");
+ *ok = false;
+ return this->EmptyExpression();
+ }
elem = this->GetLiteralTheHole(peek_position(), factory());
} else {
elem = this->ParseAssignmentExpression(true, CHECK_OK);
« no previous file with comments | « src/messages.js ('k') | test/mjsunit/strong/arrays.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698