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

Unified Diff: tests/compiler/dart2js/type_inference8_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
Index: tests/compiler/dart2js/type_inference8_test.dart
diff --git a/tests/compiler/dart2js/type_inference8_test.dart b/tests/compiler/dart2js/type_inference8_test.dart
index 001b1aab814872516a01093fdad7b47fc094340c..bcae368a31ba00d98718378588bc926c4abfc1a6 100644
--- a/tests/compiler/dart2js/type_inference8_test.dart
+++ b/tests/compiler/dart2js/type_inference8_test.dart
@@ -34,12 +34,12 @@ Future runTest1() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST1, uri);
return compiler.run(uri).then((_) {
- var typesTask = compiler.typesTask;
- var typesInferrer = typesTask.typesInferrer;
+ var commonMasks = compiler.commonMasks;
+ var typesInferrer = compiler.globalInference.typesInferrer;
var element = findElement(compiler, "foo");
var mask = typesInferrer.getReturnTypeOfElement(element);
var falseType =
- new ValueTypeMask(typesTask.boolType, new FalseConstantValue());
+ new ValueTypeMask(commonMasks.boolType, new FalseConstantValue());
// 'foo' should always return false
Expect.equals(falseType, mask);
// the argument to 'bar' is always false
@@ -77,17 +77,17 @@ Future runTest2() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST2, uri);
return compiler.run(uri).then((_) {
- var typesTask = compiler.typesTask;
- var typesInferrer = typesTask.typesInferrer;
+ var commonMasks = compiler.commonMasks;
+ var typesInferrer = compiler.globalInference.typesInferrer;
var element = findElement(compiler, "foo");
var mask = typesInferrer.getReturnTypeOfElement(element);
// Can't infer value for foo's return type, it could be either true or false
- Expect.identical(typesTask.boolType, mask);
+ Expect.identical(commonMasks.boolType, mask);
var bar = findElement(compiler, "bar");
var barArg = bar.parameters.first;
var barArgMask = typesInferrer.getTypeOfElement(barArg);
// The argument to bar should have the same type as the return type of foo
- Expect.identical(typesTask.boolType, barArgMask);
+ Expect.identical(commonMasks.boolType, barArgMask);
var barCode = compiler.backend.getGeneratedCode(bar);
Expect.isTrue(barCode.contains('"bbb"'));
// Still must output the print for "aaa"
« no previous file with comments | « tests/compiler/dart2js/type_inference7_test.dart ('k') | tests/compiler/dart2js/type_inference_switch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698