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

Unified Diff: sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart

Issue 278823002: dart2dart: Method and constructor calls in new backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed call to addArgumentsToList. Created 6 years, 7 months 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
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..98b2dd005032f8c5790b2a9379790e9217439bea 100644
--- a/sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart
@@ -1,3 +1,7 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
library dart2js.ir_tracer;
import 'dart:async' show EventSink;
@@ -93,6 +97,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);
@@ -231,6 +256,20 @@ class BlockCollector extends ir.Visitor {
}
}
+ 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;
if (target is ir.Continuation && target.body != null) {

Powered by Google App Engine
This is Rietveld 408576698