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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 12207081: Add a type kind to TypedSelector. A typed selector can either be (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 18249)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -303,8 +303,10 @@
// context.
ClassElement cls = element.getEnclosingClass();
DartType type = cls.computeType(builder.compiler);
- HThis thisInstruction = new HThis(closureData.thisElement,
- new HBoundedType.nonNull(type));
+ HThis thisInstruction = new HThis(
+ closureData.thisElement,
+ new HBoundedType(
+ type, isExact: false, canBeNull: false, isInterfaceType: false));
builder.graph.thisInstruction = thisInstruction;
builder.graph.entry.addAtEntry(thisInstruction);
directLocals[closureData.thisElement] = thisInstruction;
@@ -426,7 +428,11 @@
Element element = closureData.thisElement;
ClassElement cls = element.enclosingElement.getEnclosingClass();
DartType type = cls.computeType(builder.compiler);
- cachedTypeOfThis = new HBoundedType.nonNull(type);
+ cachedTypeOfThis = new HBoundedType(
+ type,
+ canBeNull: false,
+ isExact: false,
+ isInterfaceType: false);
}
res.guaranteedType = cachedTypeOfThis;
}
@@ -4023,7 +4029,9 @@
pushInvokeHelper1(backend.getMapMaker(), keyValuePairs,
new HType.fromBoundedType(compiler.mapClass.computeType(compiler),
compiler,
- false));
+ canBeNull: false,
+ isExact: false,
+ isInterfaceType: false));
}
visitLiteralMapEntry(LiteralMapEntry node) {
@@ -4612,7 +4620,11 @@
if (!baseType.isClass()) return HType.UNKNOWN;
ClassBaseType classBaseType = baseType;
return new HType.fromBoundedType(
- classBaseType.element.computeType(compiler), compiler, false);
+ classBaseType.element.computeType(compiler),
+ compiler,
+ canBeNull: false,
+ isExact: true,
+ isInterfaceType: false);
}
HType mapInferredType(ConcreteType concreteType) {
@@ -4632,7 +4644,12 @@
} else if (type == native.SpecialType.JsArray) {
return HType.READABLE_ARRAY;
} else {
- return new HType.fromBoundedType(type, compiler, false);
+ return new HType.fromBoundedType(
+ type,
+ compiler,
+ canBeNull: false,
+ isExact: false,
+ isInterfaceType: false);
}
}

Powered by Google App Engine
This is Rietveld 408576698