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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart

Issue 1201753004: Revert "dart2js cps: Refactor and optimize string concatenations." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.ir_tracer; 5 library dart2js.ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import 'cps_ir_nodes.dart' as cps_ir hide Function; 8 import 'cps_ir_nodes.dart' as cps_ir hide Function;
9 import '../tracer.dart'; 9 import '../tracer.dart';
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if (node.target.name.isEmpty) { 168 if (node.target.name.isEmpty) {
169 callName = '${className}'; 169 callName = '${className}';
170 } else { 170 } else {
171 callName = '${className}.${node.target.name}'; 171 callName = '${className}.${node.target.name}';
172 } 172 }
173 String args = node.arguments.map(formatReference).join(', '); 173 String args = node.arguments.map(formatReference).join(', ');
174 String kont = formatReference(node.continuation); 174 String kont = formatReference(node.continuation);
175 printStmt(dummy, "InvokeConstructor $callName ($args) $kont"); 175 printStmt(dummy, "InvokeConstructor $callName ($args) $kont");
176 } 176 }
177 177
178 visitConcatenateStrings(cps_ir.ConcatenateStrings node) {
179 String dummy = names.name(node);
180 String args = node.arguments.map(formatReference).join(', ');
181 String kont = formatReference(node.continuation);
182 printStmt(dummy, "ConcatenateStrings ($args) $kont");
183 }
184
178 visitThrow(cps_ir.Throw node) { 185 visitThrow(cps_ir.Throw node) {
179 String dummy = names.name(node); 186 String dummy = names.name(node);
180 String value = formatReference(node.value); 187 String value = formatReference(node.value);
181 printStmt(dummy, "Throw $value"); 188 printStmt(dummy, "Throw $value");
182 } 189 }
183 190
184 visitRethrow(cps_ir.Rethrow node) { 191 visitRethrow(cps_ir.Rethrow node) {
185 String dummy = names.name(node); 192 String dummy = names.name(node);
186 printStmt(dummy, "Rethrow"); 193 printStmt(dummy, "Rethrow");
187 } 194 }
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 } 506 }
500 507
501 visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly exp) { 508 visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly exp) {
502 addEdgeToContinuation(exp.continuation); 509 addEdgeToContinuation(exp.continuation);
503 } 510 }
504 511
505 visitInvokeConstructor(cps_ir.InvokeConstructor exp) { 512 visitInvokeConstructor(cps_ir.InvokeConstructor exp) {
506 addEdgeToContinuation(exp.continuation); 513 addEdgeToContinuation(exp.continuation);
507 } 514 }
508 515
516 visitConcatenateStrings(cps_ir.ConcatenateStrings exp) {
517 addEdgeToContinuation(exp.continuation);
518 }
519
509 visitThrow(cps_ir.Throw exp) { 520 visitThrow(cps_ir.Throw exp) {
510 } 521 }
511 522
512 visitRethrow(cps_ir.Rethrow exp) { 523 visitRethrow(cps_ir.Rethrow exp) {
513 } 524 }
514 525
515 visitUnreachable(cps_ir.Unreachable node) { 526 visitUnreachable(cps_ir.Unreachable node) {
516 } 527 }
517 528
518 visitSetMutableVariable(cps_ir.SetMutableVariable exp) { 529 visitSetMutableVariable(cps_ir.SetMutableVariable exp) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 unexpectedNode(node); 654 unexpectedNode(node);
644 } 655 }
645 656
646 @override 657 @override
647 visitForeignCode(cps_ir.ForeignCode node) { 658 visitForeignCode(cps_ir.ForeignCode node) {
648 if (node.continuation != null) { 659 if (node.continuation != null) {
649 addEdgeToContinuation(node.continuation); 660 addEdgeToContinuation(node.continuation);
650 } 661 }
651 } 662 }
652 } 663 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698