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

Unified Diff: lib/compiler/implementation/ssa/builder.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/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index 4ae61cd9dc442c553a18aa63b6c1b2a1fb695723..13e1bdeb45d3abc72b18b87457d2afa7e20d3ddb 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -332,7 +332,7 @@ class LocalsHandler {
// context.
ClassElement cls = function.enclosingElement;
Type type = cls.computeType(builder.compiler);
- HInstruction thisInstruction = new HThis(new HBoundedType(type));
+ HInstruction thisInstruction = new HThis(new HBoundedType.nonNull(type));
builder.add(thisInstruction);
directLocals[closureData.thisElement] = thisInstruction;
}
@@ -428,7 +428,7 @@ class LocalsHandler {
Element element = closureData.thisElement;
ClassElement cls = element.enclosingElement.enclosingElement;
Type type = cls.computeType(builder.compiler);
- cachedTypeOfThis = new HBoundedType(type);
+ cachedTypeOfThis = new HBoundedType.nonNull(type);
}
res.guaranteedType = cachedTypeOfThis;
}
@@ -2309,7 +2309,7 @@ class SsaBuilder implements Visitor {
}
} else if (element.isGenerativeConstructor()) {
ClassElement cls = element.enclosingElement;
- return new HExactType(cls.type);
+ return new HBoundedType.exact(cls.type);
} else {
return HType.UNKNOWN;
}

Powered by Google App Engine
This is Rietveld 408576698