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

Unified Diff: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart

Issue 12764005: Get rid of old code for union/intersection in HType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comments. 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: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
index cc8a75a46c324bc2d9bebac67b6f9164de1c93d0..36e356e0abcbc942579311cd09888a613b871c49 100644
--- a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
@@ -334,11 +334,9 @@ class SimpleTypesInferrer extends TypesInferrer {
}
void initializeTypes() {
- // TODO(ngeoffray): Is that the right type?
- Backend backend = compiler.backend;
- nullType = new TypeMask.exact(
- backend.nullImplementation.computeType(compiler));
+ nullType = new TypeMask.empty();
+ Backend backend = compiler.backend;
intType = new TypeMask.nonNullExact(
rawTypeOf(backend.intImplementation));
doubleType = new TypeMask.nonNullExact(
@@ -663,10 +661,6 @@ class SimpleTypesInferrer extends TypesInferrer {
return secondType;
} else if (isDynamicType(firstType)) {
return firstType;
- } else if (firstType == nullType) {
- return secondType.nullable();
- } else if (secondType == nullType) {
- return firstType.nullable();
} else {
TypeMask union = firstType.union(secondType, compiler);
return union == null ? giveUpType : union;

Powered by Google App Engine
This is Rietveld 408576698