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

Unified Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2324213003: build kernel for the entire program after resolution (Closed)
Patch Set: respond to comments Created 4 years, 3 months 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 | « pkg/compiler/lib/src/kernel/kernel.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/kernel_visitor.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel_visitor.dart b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
index 900c0cc042b2c884414dcbaae22b38941cefd0b1..cde10707af141e4ba678448779c25e328587ee78 100644
--- a/pkg/compiler/lib/src/kernel/kernel_visitor.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
@@ -198,16 +198,13 @@ class KernelVisitor extends Object
final Map<CascadeReceiver, ir.VariableGet> cascadeReceivers =
<CascadeReceiver, ir.VariableGet>{};
- final Map<ir.Node, Element> nodeToElement = <ir.Node, Element>{};
- final Map<ir.Node, Node> nodeToAst = <ir.Node, Node>{};
-
ir.Node associateElement(ir.Node node, Element element) {
- nodeToElement[node] = element;
+ kernel.nodeToElement[node] = element;
return node;
}
ir.Node associateNode(ir.Node node, Node ast) {
- nodeToAst[node] = ast;
+ kernel.nodeToAst[node] = ast;
return node;
}
@@ -905,8 +902,7 @@ class KernelVisitor extends Object
@override
ir.SymbolLiteral visitLiteralSymbol(LiteralSymbol node) {
var result = new ir.SymbolLiteral(node.slowNameString);
- nodeToAst[result] = node;
- return result;
+ return associateNode(result, node);
}
@override
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698