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

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

Issue 12781005: Track argument types, and remove obsolete code that also used to track it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/concrete_type_inference_test.dart
===================================================================
--- tests/compiler/dart2js/concrete_type_inference_test.dart (revision 20148)
+++ tests/compiler/dart2js/concrete_type_inference_test.dart (working copy)
@@ -48,28 +48,28 @@
void testBasicTypes() {
checkPrintType('true', (compiler, type) {
- var backend = compiler.backend;
- Expect.identical(backend.boolImplementation, type.exactType.element);
+ var inferrer = compiler.typesTask.typesInferrer;
+ Expect.identical(inferrer.boolType, type);
});
checkPrintType('1.0', (compiler, type) {
- var backend = compiler.backend;
- Expect.identical(backend.doubleImplementation, type.exactType.element);
+ var inferrer = compiler.typesTask.typesInferrer;
+ Expect.identical(inferrer.doubleType, type);
});
checkPrintType('1', (compiler, type) {
- var backend = compiler.backend;
- Expect.identical(backend.intImplementation, type.exactType.element);
+ var inferrer = compiler.typesTask.typesInferrer;
+ Expect.identical(inferrer.intType, type);
});
checkPrintType('[]', (compiler, type) {
- var backend = compiler.backend;
- Expect.identical(backend.listImplementation, type.exactType.element);
+ var inferrer = compiler.typesTask.typesInferrer;
+ Expect.identical(inferrer.growableListType, type);
});
checkPrintType('null', (compiler, type) {
- var backend = compiler.backend;
- Expect.identical(backend.nullImplementation, type.exactType.element);
+ var inferrer = compiler.typesTask.typesInferrer;
+ Expect.identical(inferrer.nullType, type);
});
checkPrintType('"foo"', (compiler, type) {
- var backend = compiler.backend;
- Expect.identical(backend.stringImplementation, type.exactType.element);
+ var inferrer = compiler.typesTask.typesInferrer;
+ Expect.identical(inferrer.stringType, type);
});
}
@@ -84,14 +84,17 @@
fiskElement.computeSignature(compiler).optionalParameters.head;
var thirdParameter =
fiskElement.computeSignature(compiler).optionalParameters.tail.head;
+ var typesTask = compiler.typesTask;
+ var inferrer = typesTask.typesInferrer;
Expect.identical(
- compiler.backend.intImplementation,
- compiler.typesTask.getGuaranteedTypeOfElement(firstParameter)
- .exactType.element);
- Expect.isNull(
- compiler.typesTask.getGuaranteedTypeOfElement(secondParameter));
- Expect.isNull(
- compiler.typesTask.getGuaranteedTypeOfElement(thirdParameter));
+ inferrer.intType,
+ typesTask.getGuaranteedTypeOfElement(firstParameter));
+ Expect.identical(
+ inferrer.nullType,
+ typesTask.getGuaranteedTypeOfElement(secondParameter));
+ Expect.identical(
+ inferrer.nullType,
+ typesTask.getGuaranteedTypeOfElement(thirdParameter));
});
}

Powered by Google App Engine
This is Rietveld 408576698