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

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

Issue 11478022: Implement is-checks with typedefs for callable objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index 036d1ac4b4de5a5b01413c5e9f163ad103e1e833..1eb93d10d26f12b3c5875b12da2d89ba1977d6e4 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -511,8 +511,10 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
HInstruction visitIs(HIs node) {
DartType type = node.typeExpression;
Element element = type.element;
- if (identical(element.kind, ElementKind.TYPE_VARIABLE)) {
+ if (element.isTypeVariable()) {
compiler.unimplemented("visitIs for type variables");
+ } if (element.isTypedef()) {
+ return node;
}
HType expressionType = types[node.expression];

Powered by Google App Engine
This is Rietveld 408576698