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

Unified Diff: tests/compiler/dart2js/type_combination_test.dart

Issue 2531303002: Decouple WorkItem from Compiler (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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 | « tests/compiler/dart2js/resolver_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/type_combination_test.dart
diff --git a/tests/compiler/dart2js/type_combination_test.dart b/tests/compiler/dart2js/type_combination_test.dart
index 875f276288b932a3fc9f39e3b04d5a6a39be6a61..bde511b5c6c5cb3f84dce22208785ab37c47a456 100644
--- a/tests/compiler/dart2js/type_combination_test.dart
+++ b/tests/compiler/dart2js/type_combination_test.dart
@@ -8,6 +8,8 @@ import 'package:compiler/src/js_backend/backend_helpers.dart';
import 'package:compiler/src/js_backend/js_backend.dart';
import 'package:compiler/src/types/types.dart';
import 'package:compiler/src/world.dart';
+import 'package:compiler/src/universe/use.dart';
+import 'package:compiler/src/universe/world_impact.dart';
import 'compiler_helper.dart';
import 'type_mask_test_helper.dart';
@@ -737,21 +739,24 @@ void main() {
JavaScriptBackend backend = compiler.backend;
BackendHelpers helpers = backend.helpers;
ClosedWorld world = compiler.openWorld.closeWorld(compiler.reporter);
+ WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
helpers.interceptorsLibrary.forEachLocalMember((element) {
if (element.isClass) {
element.ensureResolved(compiler.resolution);
- compiler.enqueuer.resolution.registerInstantiatedType(element.rawType);
+ impactBuilder
+ .registerTypeUse(new TypeUse.instantiation(element.rawType));
}
});
ClassElement patternImplClass = compiler.mainApp.find('PatternImpl');
patternImplClass.ensureResolved(compiler.resolution);
- compiler.enqueuer.resolution
- .registerInstantiatedType(compiler.coreTypes.mapType());
- compiler.enqueuer.resolution
- .registerInstantiatedType(compiler.coreTypes.functionType);
- compiler.enqueuer.resolution
- .registerInstantiatedType(patternImplClass.rawType);
+ impactBuilder.registerTypeUse(
+ new TypeUse.instantiation(compiler.coreTypes.mapType()));
+ impactBuilder.registerTypeUse(
+ new TypeUse.instantiation(compiler.coreTypes.functionType));
+ impactBuilder
+ .registerTypeUse(new TypeUse.instantiation(patternImplClass.rawType));
+ compiler.enqueuer.resolution.applyImpact(impactBuilder);
compiler.openWorld.closeWorld(compiler.reporter);
// Grab hold of a supertype for String so we can produce potential
« no previous file with comments | « tests/compiler/dart2js/resolver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698