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

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

Issue 2577423002: Further reduce use of Compiler.closedWorld. (Closed)
Patch Set: Created 4 years 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: tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
index 207a8619eea2b4bad30722f7c47782468e9f9d99..b6fc660acfc2a82b102213d016970dd056a7016d 100644
--- a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
@@ -167,15 +167,16 @@ void main() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST, uri);
asyncTest(() => compiler.run(uri).then((_) {
- var commonMasks = compiler.closedWorld.commonMasks;
var typesInferrer = compiler.globalInference.typesInferrerInternal;
+ var closedWorld = typesInferrer.closedWorld;
+ var commonMasks = closedWorld.commonMasks;
checkReturn(String name, type) {
var element = findElement(compiler, name);
Expect.equals(
type,
simplify(
- typesInferrer.getReturnTypeOfElement(element), compiler));
+ typesInferrer.getReturnTypeOfElement(element), closedWorld));
}
checkReturn('returnInt1', commonMasks.uint31Type);
@@ -186,10 +187,9 @@ void main() {
checkReturn(
'returnInt6',
new TypeMask.nonNullSubtype(
- compiler.coreClasses.intClass, compiler.closedWorld));
+ closedWorld.coreClasses.intClass, closedWorld));
- var subclassOfInterceptor =
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
+ var subclassOfInterceptor = commonMasks.interceptorType;
checkReturn('returnDyn1', subclassOfInterceptor);
checkReturn('returnDyn2', subclassOfInterceptor);
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698