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