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

Unified Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10693059: remove HIf.hasElse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index 145761d9419a02556bf47bbec9a9c78c541fdad4..df545511e8a36f4336fa1ce8e3f9e2d999ecbce3 100644
--- a/lib/compiler/implementation/ssa/codegen.dart
+++ b/lib/compiler/implementation/ssa/codegen.dart
@@ -1703,7 +1703,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// Depending on how the then/else branches terminate
// (e.g., return/throw/break) there can be any number of these.
List<HBasicBlock> dominated = node.block.dominatedBlocks;
- for (int i = node.hasElse ? 2 : 1; i < dominated.length; i++) {
+ for (int i = 2; i < dominated.length; i++) {
visitBasicBlock(dominated[i]);
}
}
@@ -3048,15 +3048,15 @@ class SsaUnoptimizedCodeGenerator extends SsaCodeGenerator {
HStatementInformation thenGraph = info.thenGraph;
HStatementInformation elseGraph = info.elseGraph;
bool thenHasGuards = thenGraph.start.hasGuards();
- bool elseHasGuards = node.hasElse && elseGraph.start.hasGuards();
+ bool elseHasGuards = elseGraph.start.hasGuards();
bool hasGuards = thenHasGuards || elseHasGuards;
if (!hasGuards) return super.generateIf(node, info);
int elseKind = analyzeGraphForCodegen(elseGraph);
- bool emptyElse = !node.hasElse || elseKind == SsaCodeGenerator.EMPTY;
+ bool emptyElse = elseKind == SsaCodeGenerator.EMPTY;
startBailoutCase(thenGraph.start.guards,
- node.hasElse ? elseGraph.start.guards : const <HTypeGuard>[]);
+ emptyElse ? const <HTypeGuard>[] : elseGraph.start.guards);
addIndented('if (');
int precedence = JSPrecedence.EXPRESSION_PRECEDENCE;
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698