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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.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, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 30621)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -5190,7 +5190,6 @@
HBasicBlock expressionEnd = close(switchInstruction);
LocalsHandler savedLocals = localsHandler;
- List<List<Constant>> matchExpressions = <List<Constant>>[];
List<HStatementInformation> statements = <HStatementInformation>[];
bool hasDefault = false;
Element getFallThroughErrorElement = backend.getFallThroughError();
@@ -5198,16 +5197,13 @@
new HasNextIterator<Node>(switchCases.iterator);
while (caseIterator.hasNext) {
SwitchCase switchCase = caseIterator.next();
- List<Constant> caseConstants = <Constant>[];
HBasicBlock block = graph.addNewBlock();
for (Constant constant in getConstants(switchCase)) {
- caseConstants.add(constant);
HConstant hConstant = graph.addConstant(constant, compiler);
switchInstruction.inputs.add(hConstant);
hConstant.usedBy.add(switchInstruction);
expressionEnd.addSuccessor(block);
}
- matchExpressions.add(caseConstants);
if (isDefaultCase(switchCase)) {
// An HSwitch has n inputs and n+1 successors, the last being the
@@ -5265,7 +5261,6 @@
close(new HGoto());
defaultCase.addSuccessor(joinBlock);
caseHandlers.add(savedLocals);
- matchExpressions.add(<Constant>[]);
statements.add(new HSubGraphBlockInformation(new SubGraph(
defaultCase, defaultCase)));
}
@@ -5288,7 +5283,6 @@
expressionEnd));
expressionStart.setBlockFlow(
new HSwitchBlockInformation(expressionInfo,
- matchExpressions,
statements,
jumpHandler.target,
jumpHandler.labels()),
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698