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

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

Issue 10982089: Remove AbstractVisitor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 abstract class HVisitor<R> { 5 abstract class HVisitor<R> {
6 R visitAdd(HAdd node); 6 R visitAdd(HAdd node);
7 R visitBailoutTarget(HBailoutTarget node); 7 R visitBailoutTarget(HBailoutTarget node);
8 R visitBitAnd(HBitAnd node); 8 R visitBitAnd(HBitAnd node);
9 R visitBitNot(HBitNot node); 9 R visitBitNot(HBitNot node);
10 R visitBitOr(HBitOr node); 10 R visitBitOr(HBitOr node);
(...skipping 2761 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 [this.isContinue = false]) 2772 [this.isContinue = false])
2773 : this.labels = const<LabelElement>[]; 2773 : this.labels = const<LabelElement>[];
2774 2774
2775 HBasicBlock get start => body.start; 2775 HBasicBlock get start => body.start;
2776 HBasicBlock get end => body.end; 2776 HBasicBlock get end => body.end;
2777 2777
2778 bool accept(HStatementInformationVisitor visitor) => 2778 bool accept(HStatementInformationVisitor visitor) =>
2779 visitor.visitLabeledBlockInfo(this); 2779 visitor.visitLabeledBlockInfo(this);
2780 } 2780 }
2781 2781
2782 class LoopTypeVisitor extends AbstractVisitor { 2782 class LoopTypeVisitor extends Visitor {
2783 const LoopTypeVisitor(); 2783 const LoopTypeVisitor();
2784 int visitNode(Node node) => HLoopBlockInformation.NOT_A_LOOP; 2784 int visitNode(Node node) => HLoopBlockInformation.NOT_A_LOOP;
2785 int visitWhile(While node) => HLoopBlockInformation.WHILE_LOOP; 2785 int visitWhile(While node) => HLoopBlockInformation.WHILE_LOOP;
2786 int visitFor(For node) => HLoopBlockInformation.FOR_LOOP; 2786 int visitFor(For node) => HLoopBlockInformation.FOR_LOOP;
2787 int visitDoWhile(DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP; 2787 int visitDoWhile(DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP;
2788 int visitForIn(ForIn node) => HLoopBlockInformation.FOR_IN_LOOP; 2788 int visitForIn(ForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
2789 } 2789 }
2790 2790
2791 class HLoopBlockInformation implements HStatementInformation { 2791 class HLoopBlockInformation implements HStatementInformation {
2792 static const int WHILE_LOOP = 0; 2792 static const int WHILE_LOOP = 0;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2917 HBasicBlock get start => expression.start; 2917 HBasicBlock get start => expression.start;
2918 HBasicBlock get end { 2918 HBasicBlock get end {
2919 // We don't create a switch block if there are no cases. 2919 // We don't create a switch block if there are no cases.
2920 assert(!statements.isEmpty()); 2920 assert(!statements.isEmpty());
2921 return statements.last().end; 2921 return statements.last().end;
2922 } 2922 }
2923 2923
2924 bool accept(HStatementInformationVisitor visitor) => 2924 bool accept(HStatementInformationVisitor visitor) =>
2925 visitor.visitSwitchInfo(this); 2925 visitor.visitSwitchInfo(this);
2926 } 2926 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/ssa/builder.dart ('k') | dart/lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698