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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart

Issue 1491973002: dart2js: Use correct call structures throughout the backend. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase. Created 5 years 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
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 78b976f913ac698e92a52b3b0220c5a3ff2df4f6..12262e13491f56cc66518585fcd9e5ed1ff3a428 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
@@ -148,24 +148,18 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
}
String visitInvokeConstructor(InvokeConstructor node) {
- String className;
// TODO(karlklose): for illegal nodes constructed for tests or unresolved
// constructor calls in the DartBackend, we get an element with no enclosing
// class. Clean this up by introducing a name field to the node and
// removing [ErroneousElement]s from the IR.
- if (node.dartType != null) {
- className = node.dartType.toString();
- } else {
- className = node.target.enclosingClass.name;
- }
- String callName;
- if (node.target.name.isEmpty) {
- callName = '${className}';
- } else {
- callName = '${className}.${node.target.name}';
+ String name = node.dartType != null
+ ? node.dartType.toString()
+ : node.target.enclosingClass.name;
+ if (!node.target.name.isEmpty) {
+ name = '${name}.${node.target.name}';
}
String args = formatArguments(node.selector.callStructure, node.arguments);
- return '(InvokeConstructor $callName $args)';
+ return '(InvokeConstructor $name $args)';
}
String visitInvokeContinuation(InvokeContinuation node) {
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698