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

Unified Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 9431029: Implement interface types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test. Created 8 years, 9 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/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index 91f179dc4a9da9b9577922cbbe83d70de4e0b08f..90f33480dd0a8e97746adad9cb9677e351f97d6e 100644
--- a/lib/compiler/implementation/ssa/codegen.dart
+++ b/lib/compiler/implementation/ssa/codegen.dart
@@ -1446,13 +1446,16 @@ class SsaCodeGenerator implements HVisitor {
}
void visitIs(HIs node) {
- Element element = node.typeExpression;
+ Type type = node.typeName;
ahe 2012/04/12 15:05:23 I don't see how typeName is an improvement over ty
+ Element element = type.element;
if (element.kind === ElementKind.TYPE_VARIABLE) {
compiler.unimplemented("visitIs for type variables");
ahe 2012/04/12 15:05:23 Please add this argument: "instruction: node"
+ } else if (element.kind === ElementKind.TYPEDEF) {
+ compiler.unimplemented("visitIs for typedefs");
ahe 2012/04/12 15:05:23 Ditto.
}
compiler.registerIsCheck(element);
LibraryElement coreLibrary = compiler.coreLibrary;
- ClassElement objectClass = coreLibrary.find(const SourceString('Object'));
+ ClassElement objectClass = compiler.objectClass;
HInstruction input = node.expression;
if (node.nullOk) {
beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE);

Powered by Google App Engine
This is Rietveld 408576698