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

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

Issue 1195573003: dart2js cps: Refactor and optimize string concatenations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove renegade linebreak 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.cps_ir.shrinking_reductions; 5 library dart2js.cps_ir.shrinking_reductions;
6 6
7 import 'cps_ir_nodes.dart'; 7 import 'cps_ir_nodes.dart';
8 import 'optimizers.dart'; 8 import 'optimizers.dart';
9 9
10 /** 10 /**
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 node.receiver.parent = node; 544 node.receiver.parent = node;
545 node.continuation.parent = node; 545 node.continuation.parent = node;
546 node.arguments.forEach((Reference ref) => ref.parent = node); 546 node.arguments.forEach((Reference ref) => ref.parent = node);
547 } 547 }
548 548
549 processInvokeConstructor(InvokeConstructor node) { 549 processInvokeConstructor(InvokeConstructor node) {
550 node.continuation.parent = node; 550 node.continuation.parent = node;
551 node.arguments.forEach((Reference ref) => ref.parent = node); 551 node.arguments.forEach((Reference ref) => ref.parent = node);
552 } 552 }
553 553
554 processConcatenateStrings(ConcatenateStrings node) {
555 node.continuation.parent = node;
556 node.arguments.forEach((Reference ref) => ref.parent = node);
557 }
558
559 processBranch(Branch node) { 554 processBranch(Branch node) {
560 node.condition.parent = node; 555 node.condition.parent = node;
561 node.trueContinuation.parent = node; 556 node.trueContinuation.parent = node;
562 node.falseContinuation.parent = node; 557 node.falseContinuation.parent = node;
563 } 558 }
564 559
565 processTypeCast(TypeCast node) { 560 processTypeCast(TypeCast node) {
566 node.typeArguments.forEach((Reference ref) => ref.parent = node); 561 node.typeArguments.forEach((Reference ref) => ref.parent = node);
567 node.continuation.parent = node; 562 node.continuation.parent = node;
568 node.value.parent = node; 563 node.value.parent = node;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 } 707 }
713 708
714 String toString() => "$kind: $node"; 709 String toString() => "$kind: $node";
715 } 710 }
716 711
717 /// A dummy class used solely to mark nodes as deleted once they are removed 712 /// A dummy class used solely to mark nodes as deleted once they are removed
718 /// from a term. 713 /// from a term.
719 class _DeletedNode extends Node { 714 class _DeletedNode extends Node {
720 accept(_) => null; 715 accept(_) => null;
721 } 716 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698