Index: src/ast/ast-numbering.cc |
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc |
index 158df6eb74553b240567192a23aa6a01570c2b92..9cbfd8535357eca4c07d34ab86d89b26a7e3c85d 100644 |
--- a/src/ast/ast-numbering.cc |
+++ b/src/ast/ast-numbering.cc |
@@ -147,8 +147,15 @@ void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) { |
void AstNumberingVisitor::VisitVariableProxyReference(VariableProxy* node) { |
IncrementNodeCount(); |
- if (node->var()->IsLookupSlot()) { |
- DisableCrankshaft(kReferenceToAVariableWhichRequiresDynamicLookup); |
+ switch (node->var()->location()) { |
+ case VariableLocation::LOOKUP: |
+ DisableCrankshaft(kReferenceToAVariableWhichRequiresDynamicLookup); |
+ break; |
+ case VariableLocation::MODULE: |
+ DisableCrankshaft(kReferenceToModuleVariable); |
+ break; |
+ default: |
+ break; |
} |
node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); |
} |