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

Unified Diff: tests/compiler/dart2js/simple_inferrer_postfix_prefix_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_postfix_prefix_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart b/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
index 3d37e582dc617694fe802b12a5abc0cf6734248d..27ed1a4e6384d7d326632eabee3171066bed2399 100644
--- a/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
@@ -66,20 +66,21 @@ 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;
checkReturnInClass(String className, String methodName, type) {
var cls = findElement(compiler, className);
var element = cls.lookupLocalMember(methodName);
Expect.equals(
type,
- simplify(typesInferrer.getReturnTypeOfElement(element), compiler),
+ simplify(
+ typesInferrer.getReturnTypeOfElement(element), closedWorld),
methodName);
}
- var subclassOfInterceptor =
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
+ var subclassOfInterceptor = commonMasks.interceptorType;
checkReturnInClass('A', 'returnNum1', commonMasks.numType);
checkReturnInClass('A', 'returnNum2', commonMasks.numType);
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698