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

Unified Diff: src/ast/ast-numbering.cc

Issue 2556663002: [compiler] Improve let+const decision in AstNumbering. (Closed)
Patch Set: Add comment. Created 4 years 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 | « no previous file | test/mjsunit/regress/regress-v8-5666.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast-numbering.cc
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc
index a8e63c0018741bb07b44bc505c4920562e200514..700ce2c0f5519ae25f9c9494a257b59bb3a2c6ce 100644
--- a/src/ast/ast-numbering.cc
+++ b/src/ast/ast-numbering.cc
@@ -161,7 +161,10 @@ void AstNumberingVisitor::VisitVariableProxyReference(VariableProxy* node) {
default:
break;
}
- if (IsLexicalVariableMode(node->var()->mode())) {
+ if (node->var()->binding_needs_init()) {
+ // Disable FCG+CS for all variable bindings that need explicit
+ // initialization, i.e. ES2015 stylt const and let, but not
Yang 2016/12/06 05:48:14 Is 'stylt' a typo?
+ // named function expressions.
DisableFullCodegenAndCrankshaft(kReferenceToLetOrConstVariable);
}
node->set_base_id(ReserveIdRange(VariableProxy::num_ids()));
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-v8-5666.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698