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

Unified Diff: pkg/compiler/lib/src/ssa/type_builder.dart

Issue 2613833005: Use entities in the TypeMask interface. (Closed)
Patch Set: dartfmt Created 3 years, 11 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: pkg/compiler/lib/src/ssa/type_builder.dart
diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart
index 175523a35203001fb3598186aeec4de080ee89bf..92011677d7bda95c4acd236d868e26a950c40651 100644
--- a/pkg/compiler/lib/src/ssa/type_builder.dart
+++ b/pkg/compiler/lib/src/ssa/type_builder.dart
@@ -29,7 +29,7 @@ class TypeBuilder {
if (!type.isInterfaceType) return original;
if (type.isObject) return original;
// The type element is either a class or the void element.
- Element element = type.element;
+ ClassElement element = type.element;
TypeMask mask = new TypeMask.subtype(element, builder.closedWorld);
return new HTypeKnown.pinned(mask, original);
}
@@ -230,8 +230,9 @@ class TypeBuilder {
type = type.unaliased;
assert(assertTypeInContext(type, original));
if (type.isInterfaceType && !type.treatAsRaw) {
+ InterfaceType interfaceType = type;
TypeMask subtype =
- new TypeMask.subtype(type.element, builder.closedWorld);
+ new TypeMask.subtype(interfaceType.element, builder.closedWorld);
HInstruction representations =
buildTypeArgumentRepresentations(type, builder.sourceElement);
builder.add(representations);

Powered by Google App Engine
This is Rietveld 408576698