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

Unified Diff: src/preparser.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
« src/parser.cc ('K') | « src/preparser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index ddea1792781a5d10310b2095b9c67e7dff9531f2..42703d6ddfc357838641521e74cce906678e0b16 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -600,7 +600,8 @@ PreParser::Statement PreParser::ParseExpressionOrLabelledStatement(bool* ok) {
case Token::THIS:
case Token::SUPER:
- if (is_strong(language_mode()) &&
+ if ((FLAG_strong_this || peek() != Token::THIS) &&
conradw 2015/06/12 15:04:58 Similar here (sorry for spam)
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 = Expression::Default();
« src/parser.cc ('K') | « src/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698