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())); |