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

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

Issue 1776533002: dart2js: Destroy some type inference graph edges after type inference. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: fix failing tests that use initialized MemberTypeInformations Created 4 years, 9 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/type_graph_nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index 68cf701ff1467f387c9d2e877a8f1272abe7026a..418bd2d23728c6eecf5e6c962f299c5350a4f014 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -1287,14 +1287,28 @@ class TypeGraphInferrerEngine
}
void clear() {
+ void cleanup(TypeInformation info) => info.cleanup();
+
+ allocatedCalls.forEach(cleanup);
allocatedCalls.clear();
+
defaultTypeOfParameter.clear();
- types.typeInformations.values.forEach((info) => info.clear());
+
+ types.typeInformations.values.forEach(cleanup);
+
+ types.allocatedTypes.forEach(cleanup);
types.allocatedTypes.clear();
+
types.concreteTypes.clear();
+
+ types.allocatedClosures.forEach(cleanup);
types.allocatedClosures.clear();
+
analyzedElements.clear();
generativeConstructorsExposingThis.clear();
+
+ types.allocatedMaps.values.forEach(cleanup);
+ types.allocatedLists.values.forEach(cleanup);
}
Iterable<Element> getCallersOf(Element element) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698