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

Unified Diff: pkg/compiler/lib/src/inferrer/builder.dart

Issue 2975053002: Encapsulate use of ast.Node in type_graph_nodes (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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 | « no previous file | pkg/compiler/lib/src/inferrer/closure_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/builder.dart
diff --git a/pkg/compiler/lib/src/inferrer/builder.dart b/pkg/compiler/lib/src/inferrer/builder.dart
index 125472e1ce9d51a877ed6b597ce2b489fc9901c1..513897d973e080b7183a86674a8b793925de6ae1 100644
--- a/pkg/compiler/lib/src/inferrer/builder.dart
+++ b/pkg/compiler/lib/src/inferrer/builder.dart
@@ -1126,7 +1126,7 @@ class ElementGraphBuilder extends ast.Visitor<TypeInformation>
});
return inferrer.concreteTypes.putIfAbsent(node, () {
- return types.allocateClosure(node, element.callMethod);
+ return types.allocateClosure(element.callMethod);
});
}
@@ -1135,7 +1135,7 @@ class ElementGraphBuilder extends ast.Visitor<TypeInformation>
elements.getFunctionDefinition(node.function);
TypeInformation type =
inferrer.concreteTypes.putIfAbsent(node.function, () {
- return types.allocateClosure(node.function, element.callMethod);
+ return types.allocateClosure(element.callMethod);
});
locals.update(element, type, node);
visit(node.function);
@@ -2754,7 +2754,9 @@ class ElementGraphBuilder extends ast.Visitor<TypeInformation>
// its type by refining it with the potential targets of the
// calls.
ast.Send send = node.asSend();
+ bool isConditional = false;
if (send != null) {
+ isConditional = send.isConditional;
ast.Node receiver = send.receiver;
if (receiver != null) {
Element element = elements[receiver];
@@ -2767,7 +2769,7 @@ class ElementGraphBuilder extends ast.Visitor<TypeInformation>
}
return inferrer.registerCalledSelector(node, selector, mask, receiverType,
- outermostElement, arguments, sideEffects, inLoop);
+ outermostElement, arguments, sideEffects, inLoop, isConditional);
}
TypeInformation handleDynamicInvoke(ast.Send node) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/closure_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698