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

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

Issue 2278213003: Rename the global inference task and reduce it's API surface by introducing the (Closed)
Patch Set: cl comments Created 4 years, 4 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 | « tests/compiler/dart2js/type_inference6_test.dart ('k') | tests/compiler/dart2js/type_inference8_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/type_inference7_test.dart
diff --git a/tests/compiler/dart2js/type_inference7_test.dart b/tests/compiler/dart2js/type_inference7_test.dart
index 072d42d7aed58f9bc408b1a4bba7dd016f4c89e5..af867ccc6f615f0c6b16ba008c4fc24fc70a16d9 100644
--- a/tests/compiler/dart2js/type_inference7_test.dart
+++ b/tests/compiler/dart2js/type_inference7_test.dart
@@ -23,19 +23,19 @@ Future runTest() async {
// Assertions enabled:
var compiler = compilerFor(TEST, uri, enableUserAssertions: true);
await compiler.run(uri);
- var typesTask = compiler.typesTask;
- var typesInferrer = typesTask.typesInferrer;
+ var commonMasks = compiler.commonMasks;
+ var typesInferrer = compiler.globalInference.typesInferrer;
var foo = findElement(compiler, "foo");
// Return type is null|bool.
var mask = typesInferrer.getReturnTypeOfElement(foo);
Expect.isTrue(mask.isNullable);
- Expect.equals(typesTask.boolType, simplify(mask.nonNullable(), compiler));
+ Expect.equals(commonMasks.boolType, simplify(mask.nonNullable(), compiler));
// First parameter is uint31|String|bool.
var mask1 = typesInferrer.getTypeOfElement(foo.parameters[0]);
Expect.isTrue(mask1.isUnion);
- var expectedTypes = new Set.from([typesTask.uint31Type,
- typesTask.stringType,
- typesTask.boolType]);
+ var expectedTypes = new Set.from([commonMasks.uint31Type,
+ commonMasks.stringType,
+ commonMasks.boolType]);
for (var typeMask in mask1.disjointMasks) {
Expect.isFalse(typeMask.isNullable);
var simpleType = simplify(typeMask, compiler);
@@ -45,15 +45,16 @@ Future runTest() async {
// Second parameter is bool or null.
var mask2 = typesInferrer.getTypeOfElement(foo.parameters[1]);
Expect.isTrue(mask2.isNullable);
- Expect.equals(typesTask.boolType, simplify(mask2.nonNullable(), compiler));
+ Expect.equals(
+ commonMasks.boolType, simplify(mask2.nonNullable(), compiler));
}
{
// Assertions disabled:
var compiler = compilerFor(TEST, uri, enableUserAssertions: false);
await compiler.run(uri);
- var typesTask = compiler.typesTask;
- var typesInferrer = typesTask.typesInferrer;
+ var commonMasks = compiler.commonMasks;
+ var typesInferrer = compiler.globalInference.typesInferrer;
var foo = findElement(compiler, "foo");
// Return type is null.
var mask = typesInferrer.getReturnTypeOfElement(foo);
@@ -62,7 +63,7 @@ Future runTest() async {
// First parameter is uint31.
var mask1 = typesInferrer.getTypeOfElement(foo.parameters[0]);
Expect.isFalse(mask1.isNullable);
- Expect.equals(typesTask.uint31Type, simplify(mask1, compiler));
+ Expect.equals(commonMasks.uint31Type, simplify(mask1, compiler));
// Second parameter is null.
var mask2 = typesInferrer.getTypeOfElement(foo.parameters[1]);
Expect.isTrue(mask2.isNullable);
« no previous file with comments | « tests/compiler/dart2js/type_inference6_test.dart ('k') | tests/compiler/dart2js/type_inference8_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698