| OLD | NEW |
| 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 visitBitAnd(HBitAnd node); | 9 R visitBitAnd(HBitAnd node); |
| 10 R visitBitNot(HBitNot node); | 10 R visitBitNot(HBitNot node); |
| (...skipping 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2799 finallyBlock == null ? catchBlock.end : finallyBlock.end; | 2799 finallyBlock == null ? catchBlock.end : finallyBlock.end; |
| 2800 | 2800 |
| 2801 bool accept(HStatementInformationVisitor visitor) => | 2801 bool accept(HStatementInformationVisitor visitor) => |
| 2802 visitor.visitTryInfo(this); | 2802 visitor.visitTryInfo(this); |
| 2803 } | 2803 } |
| 2804 | 2804 |
| 2805 | 2805 |
| 2806 | 2806 |
| 2807 class HSwitchBlockInformation implements HStatementInformation { | 2807 class HSwitchBlockInformation implements HStatementInformation { |
| 2808 final HExpressionInformation expression; | 2808 final HExpressionInformation expression; |
| 2809 final List<List<Constant>> matchExpressions; | |
| 2810 final List<HStatementInformation> statements; | 2809 final List<HStatementInformation> statements; |
| 2811 final TargetElement target; | 2810 final TargetElement target; |
| 2812 final List<LabelElement> labels; | 2811 final List<LabelElement> labels; |
| 2813 | 2812 |
| 2814 HSwitchBlockInformation(this.expression, | 2813 HSwitchBlockInformation(this.expression, |
| 2815 this.matchExpressions, | |
| 2816 this.statements, | 2814 this.statements, |
| 2817 this.target, | 2815 this.target, |
| 2818 this.labels); | 2816 this.labels); |
| 2819 | 2817 |
| 2820 HBasicBlock get start => expression.start; | 2818 HBasicBlock get start => expression.start; |
| 2821 HBasicBlock get end { | 2819 HBasicBlock get end { |
| 2822 // We don't create a switch block if there are no cases. | 2820 // We don't create a switch block if there are no cases. |
| 2823 assert(!statements.isEmpty); | 2821 assert(!statements.isEmpty); |
| 2824 return statements.last.end; | 2822 return statements.last.end; |
| 2825 } | 2823 } |
| 2826 | 2824 |
| 2827 bool accept(HStatementInformationVisitor visitor) => | 2825 bool accept(HStatementInformationVisitor visitor) => |
| 2828 visitor.visitSwitchInfo(this); | 2826 visitor.visitSwitchInfo(this); |
| 2829 } | 2827 } |
| OLD | NEW |