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

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

Issue 10452032: Merge functionality of HExactType into HBoundedType and fix computation of unions and intersections. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
index 8775edf9db6f99824c4fa2e9796779ff2181873e..c037f6bc2c7c36b3aba7cc90b9df5a8529220d39 100644
--- a/lib/compiler/implementation/ssa/optimize.dart
+++ b/lib/compiler/implementation/ssa/optimize.dart
@@ -203,7 +203,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
HInstruction visitInvokeDynamic(HInvokeDynamic node) {
HType receiverType = node.receiver.propagatedType;
if (receiverType.isExact()) {
- HExactType type = receiverType;
+ HBoundedType type = receiverType;
Element element = type.lookupMember(node.name);
// TODO(ngeoffray): Also fold if it's a getter or variable.
if (element != null && element.isFunction()) {
@@ -229,7 +229,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
methodName,
node.inputs.getRange(1, node.inputs.length - 1));
if (type.isExact()) {
- HExactType concrete = type;
+ HBoundedType concrete = type;
result.element = concrete.lookupMember(methodName);
}
return result;
@@ -429,7 +429,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
}
if (left.propagatedType.isExact()) {
- HExactType type = left.propagatedType;
+ HBoundedType type = left.propagatedType;
Element element = type.lookupMember(Namer.OPERATOR_EQUALS);
if (element !== null) {
// If the left-hand side is guaranteed to be a non-primitive

Powered by Google App Engine
This is Rietveld 408576698