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

Unified Diff: src/parser.cc

Issue 1180943007: [strong] Make strong 'this' optional for experimentation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/flag-definitions.h ('k') | src/preparser.h » ('j') | src/preparser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 96c269546f755b6a706a4cc9d13b555453ad3d25..7e0c1a8aa629d8e60b9cacc6f56931bb7873f4cd 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -2563,7 +2563,8 @@ Statement* Parser::ParseExpressionOrLabelledStatement(
case Token::THIS:
case Token::SUPER:
- if (is_strong(language_mode()) &&
+ if ((FLAG_strong_this || peek() != Token::THIS) &&
conradw 2015/06/12 15:01:34 Could the peek() check be eliminated by shifting t
rossberg 2015/06/15 08:50:30 Done.
+ is_strong(language_mode()) &&
i::IsConstructor(function_state_->kind())) {
bool is_this = peek() == Token::THIS;
Expression* expr;
« no previous file with comments | « src/flag-definitions.h ('k') | src/preparser.h » ('j') | src/preparser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698