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

Unified Diff: lib/compiler/implementation/ssa/types.dart

Issue 10692087: Reapply change to update dart2js operator equals semantics to follow (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Whoops, fix eqB to use === true Created 8 years, 5 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: lib/compiler/implementation/ssa/types.dart
diff --git a/lib/compiler/implementation/ssa/types.dart b/lib/compiler/implementation/ssa/types.dart
index cac3924513ff5ad512b29ba7263a64d719cb9c52..b3fa03d48ddcdab6421071aa4baa950a78adcb7e 100644
--- a/lib/compiler/implementation/ssa/types.dart
+++ b/lib/compiler/implementation/ssa/types.dart
@@ -199,7 +199,7 @@ class HBooleanOrNullType extends HPrimitiveOrNullType {
if (other.isUnknown()) return HType.BOOLEAN_OR_NULL;
if (other.isBooleanOrNull()) return HType.BOOLEAN_OR_NULL;
if (other.isBoolean()) return HType.BOOLEAN;
- if (other.isNull()) return HType.NULL;
+ if (other.canBeNull()) return HType.NULL;
return HType.CONFLICTING;
}
}
@@ -254,7 +254,7 @@ class HNumberOrNullType extends HPrimitiveOrNullType {
if (other.isIntegerOrNull()) return HType.INTEGER_OR_NULL;
if (other.isDoubleOrNull()) return HType.DOUBLE_OR_NULL;
if (other.isNumberOrNull()) return HType.NUMBER_OR_NULL;
- if (other.isNull()) return HType.NULL;
+ if (other.canBeNull()) return HType.NULL;
return HType.CONFLICTING;
}
}
@@ -313,7 +313,7 @@ class HIntegerOrNullType extends HNumberOrNullType {
if (other.isDoubleOrNull()) return HType.CONFLICTING;
if (other.isNumber()) return HType.INTEGER;
if (other.isNumberOrNull()) return HType.INTEGER_OR_NULL;
- if (other.isNull()) return HType.NULL;
+ if (other.canBeNull()) return HType.NULL;
return HType.CONFLICTING;
}
}
@@ -376,7 +376,7 @@ class HDoubleOrNullType extends HNumberOrNullType {
if (other.isDoubleOrNull()) return HType.DOUBLE_OR_NULL;
if (other.isNumber()) return HType.DOUBLE;
if (other.isNumberOrNull()) return HType.DOUBLE_OR_NULL;
- if (other.isNull()) return HType.NULL;
+ if (other.canBeNull()) return HType.NULL;
return HType.CONFLICTING;
}
}
@@ -484,7 +484,7 @@ class HStringOrNullType extends HPrimitiveOrNullType {
if (other is HBoundedPotentialPrimitiveString) {
return other.canBeNull() ? HType.STRING_OR_NULL : HType.STRING;
}
- if (other.isNull()) return HType.NULL;
+ if (other.canBeNull()) return HType.NULL;
return HType.CONFLICTING;
}
}
@@ -631,18 +631,17 @@ class HBoundedType extends HType {
if (this.type === temp.type) {
if (isExact()) {
return this;
- } else if (other.isExact()){
+ } else if (other.isExact()) {
return other;
} else if (canBeNull()) {
return other;
} else {
return this;
}
- } else if (canBeNull() && other.canBeNull()) {
- return HType.NULL;
}
}
if (other.isUnknown()) return this;
+ if (other.canBeNull() && canBeNull()) return HType.NULL;
return HType.CONFLICTING;
}

Powered by Google App Engine
This is Rietveld 408576698