Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart b/sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart |
| index 9dc4c3f0acbc06a7d5afce1d3330db2b0cb583e9..fe75a10d503a60a26c596733f15863407609493a 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart |
| @@ -93,6 +93,27 @@ class IRTracer extends TracerUtil implements ir.Visitor { |
| printStmt(dummy, "InvokeStatic $callName ($args) $kont"); |
| } |
| + visitInvokeMethod(ir.InvokeMethod 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"); |
| + } |
| + |
| + visitInvokeConstructor(ir.InvokeConstructor node) { |
| + String dummy = names.name(node); |
| + String callName; |
| + if (node.target.name.isEmpty) { |
| + callName = '${node.type}'; |
| + } else { |
| + callName = '${node.type}.${node.target.name}'; |
| + } |
| + String args = node.arguments.map(formatReference).join(', '); |
| + String kont = formatReference(node.continuation); |
| + printStmt(dummy, "InvokeConstructor $callName ($args) $kont"); |
| + } |
| + |
| visitInvokeContinuation(ir.InvokeContinuation node) { |
| String dummy = names.name(node); |
| String kont = formatReference(node.continuation); |
| @@ -107,7 +128,7 @@ class IRTracer extends TracerUtil implements ir.Visitor { |
| String falseCont = formatReference(node.falseContinuation); |
| printStmt(dummy, "Branch $condition ($trueCont, $falseCont)"); |
| } |
| - |
| + |
|
Kevin Millikin (Google)
2014/05/09 10:21:22
Make sure to tell the editor to strip trailing whi
|
| String formatReference(ir.Reference ref) { |
| ir.Definition target = ref.definition; |
| if (target is ir.Continuation && target.body == null) { |
| @@ -230,6 +251,20 @@ class BlockCollector extends ir.Visitor { |
| current_block.addEdgeTo(getBlock(target)); |
| } |
| } |
| + |
| + visitInvokeMethod(ir.InvokeMethod exp) { |
| + ir.Definition target = exp.continuation.definition; |
| + if (target is ir.Continuation && target.body != null) { |
| + current_block.addEdgeTo(getBlock(target)); |
| + } |
| + } |
| + |
| + visitInvokeConstructor(ir.InvokeConstructor exp) { |
| + ir.Definition target = exp.continuation.definition; |
| + if (target is ir.Continuation && target.body != null) { |
| + current_block.addEdgeTo(getBlock(target)); |
| + } |
| + } |
| visitInvokeContinuation(ir.InvokeContinuation exp) { |
| ir.Definition target = exp.continuation.definition; |