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

Unified Diff: dart/tests/try/poi/forget_element_test.dart

Issue 626433004: Forget closure classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r40894 Created 6 years, 2 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 | « dart/sdk/lib/_internal/compiler/implementation/enqueue.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/poi/forget_element_test.dart
diff --git a/dart/tests/try/poi/forget_element_test.dart b/dart/tests/try/poi/forget_element_test.dart
index 4636e32e7815513c0e107ee7a975c8db6f05a511..ce670e8131fd7a752dcbf6fc2bc3613f112bf0cf 100644
--- a/dart/tests/try/poi/forget_element_test.dart
+++ b/dart/tests/try/poi/forget_element_test.dart
@@ -159,6 +159,12 @@ class ForgetElementTestCase extends CompilerTestCase {
resolutionMembersIn(library).isEmpty, 'resolution misc members');
Expect.isTrue(
codegenMembersIn(library).isEmpty, 'codegen misc members');
+
+ // Check that classes remembered by the enqueuer have been forgotten.
+ Expect.isTrue(
+ codegenSeenClassesIn(library).isEmpty, 'codegen seen classes');
+ Expect.isTrue(
+ resolutionSeenClassesIn(library).isEmpty, 'resolution seen classes');
});
Iterable closuresInLibrary(LibraryElement library) {
@@ -252,6 +258,16 @@ class ForgetElementTestCase extends CompilerTestCase {
..addAll(resolutionUniverse.fieldSetters.where(sameLibrary))
..addAll(resolutionUniverse.fieldGetters.where(sameLibrary));
}
+
+ Iterable codegenSeenClassesIn(LibraryElement library) {
+ return compiler.enqueuer.codegen.seenClasses.where(
+ (e) => e.library == library);
+ }
+
+ Iterable resolutionSeenClassesIn(LibraryElement library) {
+ return compiler.enqueuer.resolution.seenClasses.where(
+ (e) => e.library == library);
+ }
}
class NodeCollector extends tree.Visitor {
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/enqueue.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698