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

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

Issue 10139012: Refactor types in ssa nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and remove isIntegerOrDouble. Created 8 years, 8 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 0f12bb9e8e1b3d6998147afeddea202411b5822c..1d243ff65b69004c930512a2e57938778e1fa7e2 100644
--- a/lib/compiler/implementation/ssa/types.dart
+++ b/lib/compiler/implementation/ssa/types.dart
@@ -111,7 +111,7 @@ class SsaSpeculativeTypePropagator extends SsaTypePropagator {
HType desiredType = HType.UNKNOWN;
for (final user in instruction.usedBy) {
desiredType =
- desiredType.combine(user.computeDesiredTypeForInput(instruction));
+ desiredType.intersect(user.computeDesiredTypeForInput(instruction));
// No need to continue if two users disagree on the type.
if (desiredType.isConflicting()) break;
}
@@ -134,6 +134,6 @@ class SsaSpeculativeTypePropagator extends SsaTypePropagator {
// TODO(ngeoffray): Allow speculative optimizations on
// non-primitive types?
if (desiredType.isNonPrimitive()) return newType;
- return newType.combine(desiredType);
+ return newType.intersect(desiredType);
}
}

Powered by Google App Engine
This is Rietveld 408576698