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

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

Issue 11341041: Fix for dartbug.com/6036: the intersection of two different types is not always conflicting. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/optimize.dart
===================================================================
--- lib/compiler/implementation/ssa/optimize.dart (revision 14260)
+++ lib/compiler/implementation/ssa/optimize.dart (working copy)
@@ -399,7 +399,7 @@
// We don't optimize on numbers to preserve the runtime semantics.
if (!(left.isNumber(types) && right.isNumber(types)) &&
- leftType.intersection(rightType).isConflicting()) {
+ leftType.intersection(rightType, compiler).isConflicting()) {
return graph.addConstantBool(false, constantSystem);
}
@@ -489,7 +489,7 @@
// If the intersection of the types is still the incoming type then
// the incoming type was a subtype of the guarded type, and no check
// is required.
- HType combinedType = types[value].intersection(node.guardedType);
+ HType combinedType = types[value].intersection(node.guardedType, compiler);
return (combinedType == types[value]) ? value : node;
}
@@ -576,7 +576,7 @@
if (types[value].canBeNull() && node.isBooleanConversionCheck) {
return node;
}
- HType combinedType = types[value].intersection(types[node]);
+ HType combinedType = types[value].intersection(types[node], compiler);
return (combinedType == types[value]) ? value : node;
}
@@ -1256,7 +1256,8 @@
predecessorsFieldSetters.forEach((Element element, HType type) {
HType currentType = currentFieldSetters[element];
if (currentType != null) {
- newFieldSetters[element] = currentType.union(type);
+ newFieldSetters[element] =
+ currentType.union(type, backend.compiler);
}
});
currentFieldSetters = newFieldSetters;

Powered by Google App Engine
This is Rietveld 408576698