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

Unified Diff: sdk/lib/_internal/compiler/implementation/universe/universe.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: Remove unused factory methods. 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/universe/universe.dart
diff --git a/sdk/lib/_internal/compiler/implementation/universe/universe.dart b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
index e962d4cdae2f01d29de9d8ab7368a260e071906d..a04bb233f9deb476f1d8c574b12ebcc7cf781a4a 100644
--- a/sdk/lib/_internal/compiler/implementation/universe/universe.dart
+++ b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
@@ -459,7 +459,7 @@ class TypedSelector extends Selector {
selector.argumentCount,
selector.namedArguments) {
// Invariant: Typed selector can not be based on a malformed type.
- assert(!identical(mask.base.kind, TypeKind.MALFORMED_TYPE));
+ assert(mask.isEmpty || !identical(mask.base.kind, TypeKind.MALFORMED_TYPE));
assert(asUntyped.mask == null);
}
@@ -498,6 +498,12 @@ class TypedSelector extends Selector {
return appliesUntyped(element, compiler);
}
+ if (mask.isEmpty) {
+ if (!mask.isNullable) return false;
+ return hasElementIn(compiler.backend.jsNullClass, element)
+ && appliesUntyped(element, compiler);
+ }
+
// TODO(kasperl): Can't we just avoid creating typed selectors
// based of function types?
Element self = mask.base.element;

Powered by Google App Engine
This is Rietveld 408576698