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

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

Issue 85593002: Make sure the SSA codegen visit constants used in a switch through the 'visitConstant' method, to e… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698