Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index 8ac139fe85cca56263b2ea5b80d803baff69975a..240b6e911fa08a5667835875d54f50f5f58fa2cc 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -1033,6 +1033,14 @@ CaseClause::CaseClause(Isolate* isolate, |
increase_node_count(); \ |
add_flag(kDontSelfOptimize); \ |
} |
+#define DONT_CACHE_NODE(NodeType) \ |
+ void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ |
+ increase_node_count(); \ |
+ add_flag(kDontOptimize); \ |
+ add_flag(kDontInline); \ |
+ add_flag(kDontSelfOptimize); \ |
+ add_flag(kDontCache); \ |
+ } |
REGULAR_NODE(VariableDeclaration) |
REGULAR_NODE(FunctionDeclaration) |
@@ -1065,10 +1073,14 @@ REGULAR_NODE(CallNew) |
// LOOKUP variables only result from constructs that cannot be inlined anyway. |
REGULAR_NODE(VariableProxy) |
+// We currently do not optimize any modules. Note in particular, that module |
+// instance objects associated with ModuleLiterals are allocated during |
+// scope resolution, and references to them are embedded into the code. |
+// That code may hence neither be cached nor re-compiled. |
DONT_OPTIMIZE_NODE(ModuleDeclaration) |
DONT_OPTIMIZE_NODE(ImportDeclaration) |
DONT_OPTIMIZE_NODE(ExportDeclaration) |
-DONT_OPTIMIZE_NODE(ModuleLiteral) |
+DONT_CACHE_NODE(ModuleLiteral) |
Michael Starzinger
2012/07/06 10:53:22
Can we move that out into a separate group instead
rossberg
2012/07/06 15:39:28
Done.
|
DONT_OPTIMIZE_NODE(ModuleVariable) |
DONT_OPTIMIZE_NODE(ModulePath) |
DONT_OPTIMIZE_NODE(ModuleUrl) |