| Index: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
|
| index 12a6a313eeb4f8596ad6efce6b6ad14e8b6a1023..1dbe46a55089d29ebeef1d238a2167dcf5f9d97e 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
|
| @@ -140,35 +140,26 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
|
| }
|
|
|
| visitInvokeStatic(cps_ir.InvokeStatic node) {
|
| - String dummy = names.name(node);
|
| String callName = node.selector.name;
|
| String args = node.arguments.map(formatReference).join(', ');
|
| - String kont = formatReference(node.continuation);
|
| - printStmt(dummy, "InvokeStatic $callName ($args) $kont");
|
| + return "InvokeStatic $callName ($args)";
|
| }
|
|
|
| visitInvokeMethod(cps_ir.InvokeMethod node) {
|
| - String dummy = names.name(node);
|
| String receiver = formatReference(node.receiver);
|
| String callName = node.selector.name;
|
| String args = node.arguments.map(formatReference).join(', ');
|
| - String kont = formatReference(node.continuation);
|
| - printStmt(dummy,
|
| - "InvokeMethod $receiver $callName ($args) $kont");
|
| + return "InvokeMethod $receiver $callName ($args)";
|
| }
|
|
|
| visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) {
|
| - String dummy = names.name(node);
|
| String receiver = formatReference(node.receiver);
|
| String callName = node.selector.name;
|
| String args = node.arguments.map(formatReference).join(', ');
|
| - String kont = formatReference(node.continuation);
|
| - printStmt(dummy,
|
| - "InvokeMethodDirectly $receiver $callName ($args) $kont");
|
| + return "InvokeMethodDirectly $receiver $callName ($args)";
|
| }
|
|
|
| visitInvokeConstructor(cps_ir.InvokeConstructor node) {
|
| - String dummy = names.name(node);
|
| String className = node.target.enclosingClass.name;
|
| String callName;
|
| if (node.target.name.isEmpty) {
|
| @@ -177,8 +168,7 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
|
| callName = '${className}.${node.target.name}';
|
| }
|
| String args = node.arguments.map(formatReference).join(', ');
|
| - String kont = formatReference(node.continuation);
|
| - printStmt(dummy, "InvokeConstructor $callName ($args) $kont");
|
| + return "InvokeConstructor $callName ($args)";
|
| }
|
|
|
| visitThrow(cps_ir.Throw node) {
|
| @@ -213,11 +203,9 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
|
| }
|
|
|
| visitTypeCast(cps_ir.TypeCast node) {
|
| - String dummy = names.name(node);
|
| String value = formatReference(node.value);
|
| String args = node.typeArguments.map(formatReference).join(', ');
|
| - String kont = formatReference(node.continuation);
|
| - printStmt(dummy, "TypeCast ($value ${node.dartType} ($args)) $kont");
|
| + return "TypeCast ($value ${node.dartType} ($args))";
|
| }
|
|
|
| visitInvokeContinuation(cps_ir.InvokeContinuation node) {
|
| @@ -237,18 +225,14 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
|
| }
|
|
|
| visitAwait(cps_ir.Await node) {
|
| - String dummy = names.name(node);
|
| String value = formatReference(node.input);
|
| - String continuation = formatReference(node.continuation);
|
| - printStmt(dummy, 'Await $value $continuation');
|
| + return 'Await $value';
|
| }
|
|
|
| visitYield(cps_ir.Yield node) {
|
| - String dummy = names.name(node);
|
| String name = node.hasStar ? 'YieldStar' : 'Yield';
|
| String value = formatReference(node.input);
|
| - String continuation = formatReference(node.continuation);
|
| - printStmt(dummy, '$name $value $continuation');
|
| + return '$name $value';
|
| }
|
|
|
| visitSetMutable(cps_ir.SetMutable node) {
|
| @@ -307,9 +291,8 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
|
| }
|
|
|
| visitGetLazyStatic(cps_ir.GetLazyStatic node) {
|
| - String dummy = names.name(node);
|
| - String kont = formatReference(node.continuation);
|
| - printStmt(dummy, "GetLazyStatic $kont");
|
| + String element = node.element.name;
|
| + return "GetLazyStatic $element";
|
| }
|
|
|
| visitCreateBox(cps_ir.CreateBox node) {
|
| @@ -384,13 +367,11 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
|
| return 'ApplyBuiltinMethod $method $receiver ($args)';
|
| }
|
|
|
| - @override
|
| visitForeignCode(cps_ir.ForeignCode node) {
|
| String id = names.name(node);
|
| String arguments = node.arguments.map(formatReference).join(', ');
|
| - String continuation = formatReference(node.continuation);
|
| - printStmt(id, "ForeignCode ${node.type} ${node.codeTemplate.source} "
|
| - "$arguments $continuation");
|
| + printStmt(id,
|
| + "ForeignCode ${node.type} ${node.codeTemplate.source} $arguments");
|
| }
|
|
|
| visitGetLength(cps_ir.GetLength node) {
|
| @@ -411,7 +392,6 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
|
| return 'SetIndex $object $index $value';
|
| }
|
|
|
| - @override
|
| visitRefinement(cps_ir.Refinement node) {
|
| String value = formatReference(node.value);
|
| return 'Refinement $value ${node.refineType}';
|
| @@ -526,20 +506,20 @@ class BlockCollector implements cps_ir.Visitor {
|
| addEdgeToContinuation(exp.continuation);
|
| }
|
|
|
| - visitInvokeStatic(cps_ir.InvokeStatic exp) {
|
| - addEdgeToContinuation(exp.continuation);
|
| + visitInvokeStatic(cps_ir.InvokeStatic node) {
|
| + unexpectedNode(node);
|
| }
|
|
|
| - visitInvokeMethod(cps_ir.InvokeMethod exp) {
|
| - addEdgeToContinuation(exp.continuation);
|
| + visitInvokeMethod(cps_ir.InvokeMethod node) {
|
| + unexpectedNode(node);
|
| }
|
|
|
| - visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly exp) {
|
| - addEdgeToContinuation(exp.continuation);
|
| + visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) {
|
| + unexpectedNode(node);
|
| }
|
|
|
| - visitInvokeConstructor(cps_ir.InvokeConstructor exp) {
|
| - addEdgeToContinuation(exp.continuation);
|
| + visitInvokeConstructor(cps_ir.InvokeConstructor node) {
|
| + unexpectedNode(node);
|
| }
|
|
|
| visitThrow(cps_ir.Throw exp) {
|
| @@ -551,8 +531,8 @@ class BlockCollector implements cps_ir.Visitor {
|
| visitUnreachable(cps_ir.Unreachable node) {
|
| }
|
|
|
| - visitGetLazyStatic(cps_ir.GetLazyStatic exp) {
|
| - addEdgeToContinuation(exp.continuation);
|
| + visitGetLazyStatic(cps_ir.GetLazyStatic node) {
|
| + unexpectedNode(node);
|
| }
|
|
|
| visitBranch(cps_ir.Branch exp) {
|
| @@ -566,8 +546,8 @@ class BlockCollector implements cps_ir.Visitor {
|
| }
|
| }
|
|
|
| - visitTypeCast(cps_ir.TypeCast exp) {
|
| - addEdgeToContinuation(exp.continuation);
|
| + visitTypeCast(cps_ir.TypeCast node) {
|
| + unexpectedNode(node);
|
| }
|
|
|
| visitContinuation(cps_ir.Continuation c) {
|
| @@ -687,22 +667,18 @@ class BlockCollector implements cps_ir.Visitor {
|
| unexpectedNode(node);
|
| }
|
|
|
| - @override
|
| visitForeignCode(cps_ir.ForeignCode node) {
|
| - addEdgeToContinuation(node.continuation);
|
| + unexpectedNode(node);
|
| }
|
|
|
| - @override
|
| visitAwait(cps_ir.Await node) {
|
| - addEdgeToContinuation(node.continuation);
|
| + unexpectedNode(node);
|
| }
|
|
|
| - @override
|
| visitYield(cps_ir.Yield node) {
|
| - addEdgeToContinuation(node.continuation);
|
| + unexpectedNode(node);
|
| }
|
|
|
| - @override
|
| visitRefinement(cps_ir.Refinement node) {
|
| unexpectedNode(node);
|
| }
|
|
|