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

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

Issue 2598983002: Introduce DartType super hierarchy based on Entity (Closed)
Patch Set: Cleanup. Created 4 years 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/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 67bcd302144a64bf6072599f27bd6a43255a9bd9..2b3d5d49ac71a822ebbb4bc022b64ed50d4e6081 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -3003,7 +3003,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
case TypeInfoExpressionKind.INSTANCE:
// We expect only flat types for the INSTANCE representation.
assert(
- node.dartType == (node.dartType.element as ClassElement).thisType);
+ node.dartType == (node.dartType as InterfaceType).element.thisType);
registry.registerInstantiatedClass(commonElements.listClass);
push(new js.ArrayInitializer(arguments)
.withSourceInformation(node.sourceInformation));
@@ -3071,8 +3071,8 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
use(type);
typeArguments.add(pop());
}
-
- ClassElement cls = node.dartType.element;
+ InterfaceType type = node.dartType;
+ ClassElement cls = type.element;
var arguments = [backend.emitter.typeAccess(cls)];
if (!typeArguments.isEmpty) {
arguments.add(new js.ArrayInitializer(typeArguments));

Powered by Google App Engine
This is Rietveld 408576698