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

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

Issue 1507313006: dart2js cps: Add instruction for null checks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix true/false misdocumentation about condition and do not emit call Created 5 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 | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
index 3f08e95f3970fa47cbad65d51621778daa24df4c..2bc2dd28257c8e7a0f7d721a4dbaf21c6f1c4562 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
@@ -182,6 +182,11 @@ class BlockCollector extends StatementVisitor {
_addStatement(node);
visitStatement(node.next);
}
+
+ visitNullCheck(NullCheck node) {
+ _addStatement(node);
+ visitStatement(node.next);
+ }
}
class TreeTracer extends TracerUtil with StatementVisitor {
@@ -346,6 +351,11 @@ class TreeTracer extends TracerUtil with StatementVisitor {
String name = node.hasStar ? 'yield*' : 'yield';
printStatement(null, '$name ${expr(node.input)}');
}
+
+ @override
+ visitNullCheck(NullCheck node) {
+ printStatement(null, 'NullCheck ${expr(node.value)}');
+ }
}
class SubexpressionVisitor extends ExpressionVisitor<String> {
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698