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

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

Issue 2556663002: [compiler] Improve let+const decision in AstNumbering. (Closed)
Patch Set: Fix typo. 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..f84321de4c84f17c96f8dd309b07f821c87109a7 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 style const and let, but not
+ // 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