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

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: Address comments. 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c83db8c522ac7ce6a6d433cad4e55b1e719e6a1c..b6ea705a87af1e3c376d4f94d0990109d6bc89fc 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];
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698