Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart |
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart |
index 12262e13491f56cc66518585fcd9e5ed1ff3a428..dc2768f75ba1c5b833c2c7d20a04237f3b7a6912 100644 |
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart |
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart |
@@ -33,6 +33,10 @@ class SExpressionStringifier extends Indentation implements Visitor<String> { |
return decorator(r, namer.getName(r.definition)); |
} |
+ String optional(Reference<Definition> r) { |
+ return r == null ? '()' : '(${access(r)})'; |
+ } |
+ |
String visitParameter(Parameter node) { |
return namer.nameParameter(node); |
} |
@@ -360,6 +364,12 @@ class SExpressionStringifier extends Indentation implements Visitor<String> { |
String value = access(node.value); |
return '(Refinement $value ${node.type})'; |
} |
+ |
+ String visitNullCheck(NullCheck node) { |
+ String value = access(node.value); |
+ String condition = optional(node.condition); |
+ return '(NullCheck $value $condition (${node.selector ?? ""}))'; |
+ } |
} |
class ConstantStringifier extends ConstantValueVisitor<String, Null> { |