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

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

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 interface HVisitor<R> { 5 interface 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 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2606 final HBlockInformation body; 2606 final HBlockInformation body;
2607 final HBasicBlock continuation; 2607 final HBasicBlock continuation;
2608 HBlockFlow(this.body, this.continuation); 2608 HBlockFlow(this.body, this.continuation);
2609 } 2609 }
2610 2610
2611 2611
2612 /** 2612 /**
2613 * Information about a syntactic-like structure. 2613 * Information about a syntactic-like structure.
2614 */ 2614 */
2615 interface HBlockInformation { 2615 interface HBlockInformation {
2616 HBasicBlock get start(); 2616 HBasicBlock get start;
2617 HBasicBlock get end(); 2617 HBasicBlock get end;
2618 bool accept(HBlockInformationVisitor visitor); 2618 bool accept(HBlockInformationVisitor visitor);
2619 } 2619 }
2620 2620
2621 2621
2622 /** 2622 /**
2623 * Information about a statement-like structure. 2623 * Information about a statement-like structure.
2624 */ 2624 */
2625 interface HStatementInformation extends HBlockInformation { 2625 interface HStatementInformation extends HBlockInformation {
2626 bool accept(HStatementInformationVisitor visitor); 2626 bool accept(HStatementInformationVisitor visitor);
2627 } 2627 }
2628 2628
2629 2629
2630 /** 2630 /**
2631 * Information about an expression-like structure. 2631 * Information about an expression-like structure.
2632 */ 2632 */
2633 interface HExpressionInformation extends HBlockInformation { 2633 interface HExpressionInformation extends HBlockInformation {
2634 bool accept(HExpressionInformationVisitor visitor); 2634 bool accept(HExpressionInformationVisitor visitor);
2635 HInstruction get conditionExpression(); 2635 HInstruction get conditionExpression;
2636 } 2636 }
2637 2637
2638 2638
2639 interface HStatementInformationVisitor { 2639 interface HStatementInformationVisitor {
2640 bool visitLabeledBlockInfo(HLabeledBlockInformation info); 2640 bool visitLabeledBlockInfo(HLabeledBlockInformation info);
2641 bool visitLoopInfo(HLoopBlockInformation info); 2641 bool visitLoopInfo(HLoopBlockInformation info);
2642 bool visitIfInfo(HIfBlockInformation info); 2642 bool visitIfInfo(HIfBlockInformation info);
2643 bool visitTryInfo(HTryBlockInformation info); 2643 bool visitTryInfo(HTryBlockInformation info);
2644 bool visitSwitchInfo(HSwitchBlockInformation info); 2644 bool visitSwitchInfo(HSwitchBlockInformation info);
2645 bool visitSequenceInfo(HStatementSequenceInformation info); 2645 bool visitSequenceInfo(HStatementSequenceInformation info);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 HBasicBlock get start => expression.start; 2866 HBasicBlock get start => expression.start;
2867 HBasicBlock get end { 2867 HBasicBlock get end {
2868 // We don't create a switch block if there are no cases. 2868 // We don't create a switch block if there are no cases.
2869 assert(!statements.isEmpty()); 2869 assert(!statements.isEmpty());
2870 return statements.last().end; 2870 return statements.last().end;
2871 } 2871 }
2872 2872
2873 bool accept(HStatementInformationVisitor visitor) => 2873 bool accept(HStatementInformationVisitor visitor) =>
2874 visitor.visitSwitchInfo(this); 2874 visitor.visitSwitchInfo(this);
2875 } 2875 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/scanner/token.dart ('k') | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698