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

Unified Diff: pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart

Issue 1161683002: dart2js cps: 'is' checks on types with type arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status file Created 5 years, 7 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: pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart b/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
index 4719b6ac117b3121f21f1f220230dbcb8a6ad5fa..e68c4886f93e76539efde5f24589ca176bd7790c 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
@@ -247,7 +247,9 @@ class BodyRewriter extends ExpressionVisitor<Expression> {
}
Expression visitTypeOperator(TypeOperator node) {
- node.receiver = visitExpression(node.receiver);
+ node.value = visitExpression(node.value);
+ if (seenImpure) return node;
+ rewriteList(node.typeArguments);
if (!node.isTypeTest) seenImpure = true; // Type cast can throw.
return node;
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698