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

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

Issue 2968743002: Use .callMethod instead of LocalFunctionElement as key in inference (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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
Index: pkg/compiler/lib/src/inferrer/type_graph_dump.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
index 65fc6ff811463d7e03642eb882c5244869854219..ead13f40dc53d9e033e43a34ad2c8dacde01862a 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
@@ -62,8 +62,8 @@ class TypeGraphDump {
/// Dumps the entire graph.
void afterAnalysis() {
// Group all the type nodes by their context member.
- Map<Element, List<TypeInformation>> nodes =
- <Element, List<TypeInformation>>{};
+ Map<MemberElement, List<TypeInformation>> nodes =
+ <MemberElement, List<TypeInformation>>{};
for (TypeInformation node in inferrer.types.allTypes) {
if (node.contextMember != null) {
nodes
@@ -72,7 +72,7 @@ class TypeGraphDump {
}
}
// Print every group separately.
- for (Element element in nodes.keys) {
+ for (MemberElement element in nodes.keys) {
OutputSink output;
try {
String name = filenameFromElement(element);
@@ -149,18 +149,11 @@ class _GraphGenerator extends TypeInformationVisitor {
final Map<TypeInformation, int> nodeId = <TypeInformation, int>{};
int usedIds = 0;
final OutputSink output;
- final Element element;
+ final MemberElement element;
TypeInformation returnValue;
_GraphGenerator(this.global, this.element, this.output) {
- if (element.isParameter) {
- returnValue = global.inferrer.types.getInferredTypeOfParameter(element);
- } else if (element.isLocal) {
- returnValue =
- global.inferrer.types.getInferredTypeOfLocalFunction(element);
- } else {
- returnValue = global.inferrer.types.getInferredTypeOfMember(element);
- }
+ returnValue = global.inferrer.types.getInferredTypeOfMember(element);
getNode(returnValue); // Ensure return value is part of graph.
append('digraph {');
}
« no previous file with comments | « pkg/compiler/lib/src/inferrer/node_tracer.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698