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

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

Issue 2472143002: [modules] Disable Crankshaft for functions referencing module variables. (Closed)
Patch Set: Created 4 years, 1 month 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 | src/bailout-reason.h » ('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 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()));
}
« no previous file with comments | « no previous file | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698