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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart

Issue 13872007: Refactor removeRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files and rebuild dom (unrelated CL). Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of ssa; 5 part of ssa;
6 6
7 abstract class HVisitor<R> { 7 abstract class HVisitor<R> {
8 R visitAdd(HAdd node); 8 R visitAdd(HAdd node);
9 R visitBailoutTarget(HBailoutTarget node); 9 R visitBailoutTarget(HBailoutTarget node);
10 R visitBitAnd(HBitAnd node); 10 R visitBitAnd(HBitAnd node);
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 } 666 }
667 667
668 void removeDominatedBlock(HBasicBlock block) { 668 void removeDominatedBlock(HBasicBlock block) {
669 assert(isClosed()); 669 assert(isClosed());
670 assert(id != null && block.id != null); 670 assert(id != null && block.id != null);
671 int index = dominatedBlocks.indexOf(block); 671 int index = dominatedBlocks.indexOf(block);
672 assert(index >= 0); 672 assert(index >= 0);
673 if (index == dominatedBlocks.length - 1) { 673 if (index == dominatedBlocks.length - 1) {
674 dominatedBlocks.removeLast(); 674 dominatedBlocks.removeLast();
675 } else { 675 } else {
676 dominatedBlocks.removeRange(index, 1); 676 dominatedBlocks.removeRange(index, index + 1);
677 } 677 }
678 assert(identical(block.dominator, this)); 678 assert(identical(block.dominator, this));
679 block.dominator = null; 679 block.dominator = null;
680 } 680 }
681 681
682 void assignCommonDominator(HBasicBlock predecessor) { 682 void assignCommonDominator(HBasicBlock predecessor) {
683 assert(isClosed()); 683 assert(isClosed());
684 if (dominator == null) { 684 if (dominator == null) {
685 // If this basic block doesn't have a dominator yet we use the 685 // If this basic block doesn't have a dominator yet we use the
686 // given predecessor as the dominator. 686 // given predecessor as the dominator.
(...skipping 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 HBasicBlock get start => expression.start; 2647 HBasicBlock get start => expression.start;
2648 HBasicBlock get end { 2648 HBasicBlock get end {
2649 // We don't create a switch block if there are no cases. 2649 // We don't create a switch block if there are no cases.
2650 assert(!statements.isEmpty); 2650 assert(!statements.isEmpty);
2651 return statements.last.end; 2651 return statements.last.end;
2652 } 2652 }
2653 2653
2654 bool accept(HStatementInformationVisitor visitor) => 2654 bool accept(HStatementInformationVisitor visitor) =>
2655 visitor.visitSwitchInfo(this); 2655 visitor.visitSwitchInfo(this);
2656 } 2656 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698