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

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

Issue 24952003: Change TypeMask.base to be a ClassElement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moar declaration. Created 7 years, 3 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/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
index 8c723df979d07f6c503f9bca782dfa4320fc6892..69e01024303f880e93bb94d4b459fabda04c78ce 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -175,7 +175,8 @@ class HGraph {
// TODO(sra): What is the type of the prototype of an interceptor?
if (constant.isInterceptor()) return HType.UNKNOWN;
ObjectConstant objectConstant = constant;
- return new HBoundedType(new TypeMask.nonNullExact(objectConstant.type));
+ TypeMask mask = new TypeMask.nonNullExact(objectConstant.type.element);
+ return new HBoundedType(mask);
}
HConstant addConstant(Constant constant, Compiler compiler) {
@@ -1126,7 +1127,8 @@ abstract class HInstruction implements Spannable {
assert(type.kind != TypeKind.TYPE_VARIABLE);
assert(type.isRaw || type.kind == TypeKind.FUNCTION);
if (type.treatAsDynamic) return this;
- if (identical(type.element, compiler.objectClass)) return this;
+ ClassElement element = type.element;
+ if (identical(element, compiler.objectClass)) return this;
if (type.kind != TypeKind.INTERFACE) {
return new HTypeConversion(type, kind, HType.UNKNOWN, this);
} else if (kind == HTypeConversion.BOOLEAN_CONVERSION_CHECK) {
@@ -1135,7 +1137,7 @@ abstract class HInstruction implements Spannable {
} else if (kind == HTypeConversion.CHECKED_MODE_CHECK && !type.isRaw) {
throw 'creating compound check to $type (this = ${this})';
} else {
- HType subtype = new HType.subtype(type, compiler);
+ HType subtype = new HType.subtype(element, compiler);
return new HTypeConversion(type, kind, subtype, this);
}
}

Powered by Google App Engine
This is Rietveld 408576698