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

Unified Diff: frog/leg/ssa/codegen.dart

Issue 9618053: Introduce the TYPEDEF element, and use it in order to catch passing closures to the DOM. I make the… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | frog/tests/native/src/NativeWrappingFunctionFrogTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/codegen.dart
===================================================================
--- frog/leg/ssa/codegen.dart (revision 5070)
+++ frog/leg/ssa/codegen.dart (working copy)
@@ -934,7 +934,7 @@
}
void visitIs(HIs node) {
- ClassElement element = node.typeExpression;
+ Element element = node.typeExpression;
LibraryElement coreLibrary = compiler.coreLibrary;
ClassElement objectClass = coreLibrary.find(const SourceString('Object'));
HInstruction input = node.expression;
@@ -976,7 +976,8 @@
checkArray(input, '===');
buffer.add(' || ');
precedence = JSPrecedence.LOGICAL_OR_PRECEDENCE;
- } else if (element.isNative() || isSupertypeOfNativeClass(element)) {
+ } else if (element.isClass() && (element.dynamic.isNative()
+ || isSupertypeOfNativeClass(element))) {
buffer.add("(");
endParen = true;
} else {
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | frog/tests/native/src/NativeWrappingFunctionFrogTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698