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

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 1175973005: dart2js cps: Introduce some built-in operators in type propagation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status files Created 5 years, 6 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/tree_ir_builder.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index 13ccd0c9589ebb0bbec3ec47679ea3249fa0f8e0..deaa2ed8434066d9ba0f2790629fc7d0be4971b3 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -583,5 +583,13 @@ class Builder implements cps_ir.Visitor<Node> {
node.sourceInformation);
return new ExpressionStatement(setStatic, visit(node.body));
}
+
+ Expression visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
+ if (node.operator == BuiltinOperator.IsFalsy) {
+ return new Not(getVariableUse(node.arguments.single));
+ }
+ return new ApplyBuiltinOperator(node.operator,
+ translateArguments(node.arguments));
+ }
}
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698