diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc index 9aab22ed302d..2e0d020113c7 100644 --- a/src/ast/ast-numbering.cc +++ b/src/ast/ast-numbering.cc @@ -158,6 +158,9 @@ void AstNumberingVisitor::VisitVariableProxyReference(VariableProxy* node) { default: break; } + if (IsLexicalVariableMode(node->var()->mode())) { + DisableFullCodegenAndCrankshaft(kReferenceToLetOrConstVariable); + } node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); } diff --git a/src/bailout-reason.h b/src/bailout-reason.h index d77a7db70011..4d1ff9124eb0 100644 --- a/src/bailout-reason.h +++ b/src/bailout-reason.h @@ -173,6 +173,7 @@ namespace internal { V(kReceivedInvalidReturnAddress, "Received invalid return address") \ V(kReferenceToAVariableWhichRequiresDynamicLookup, \ "Reference to a variable which requires dynamic lookup") \ + V(kReferenceToLetOrConstVariable, "Reference to let or const variable") \ V(kReferenceToGlobalLexicalVariable, "Reference to global lexical variable") \ V(kReferenceToModuleVariable, "Reference to module-allocated variable") \ V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \