Chromium Code Reviews| 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 e2c8e603ee986bf9f009ecfecc6661419b3cc132..5250c7985d3673f6332839d9c4c71154c2dd0fb2 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 |
| @@ -30,6 +30,7 @@ class SExpressionStringifier extends Indentation implements Visitor<String> { |
| } |
| String access(Reference<Definition> r) { |
| + if (r == null) return '**** NULL ****'; |
| return decorator(r, namer.getName(r.definition)); |
| } |
| @@ -48,7 +49,11 @@ class SExpressionStringifier extends Indentation implements Visitor<String> { |
| /// Main entry point for creating a [String] from a [Node]. All recursive |
| /// calls must go through this method. |
| String visit(Node node) { |
| - if (node == null) return '**** NULL ****'; |
| + if (node == null) { |
| + return node is Expression |
|
asgerf
2016/01/19 22:45:24
Dead code, null is not an expression.
Kevin Millikin (Google)
2016/01/25 12:46:37
Done.
|
| + ? '$indentation**** NULL ****' |
| + : '**** NULL ****'; |
| + } |
| String s = node.accept(this); |
| return decorator(node, s); |
| } |
| @@ -192,7 +197,9 @@ class SExpressionStringifier extends Indentation implements Visitor<String> { |
| String visitInvokeContinuation(InvokeContinuation node) { |
| String name = access(node.continuation); |
| if (node.isRecursive) name = 'rec $name'; |
| - String args = node.arguments.map(access).join(' '); |
| + String args = node.arguments == null |
| + ? '**** NULL ****' |
| + : node.arguments.map(access).join(' '); |
| String escaping = node.isEscapingTry ? ' escape' : ''; |
| return '$indentation(InvokeContinuation $name ($args)$escaping)'; |
| } |