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

Unified Diff: frog/leg/ssa/optimize.dart

Issue 9500010: Fix break implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments. Created 8 years, 10 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 | « frog/leg/ssa/nodes.dart ('k') | frog/leg/ssa/tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/optimize.dart
diff --git a/frog/leg/ssa/optimize.dart b/frog/leg/ssa/optimize.dart
index 58916bcbcc9deaee6f29bfa1b828d682ff4f9b75..45765a4d03ff355ab867854188ddd4e76b40a737 100644
--- a/frog/leg/ssa/optimize.dart
+++ b/frog/leg/ssa/optimize.dart
@@ -297,7 +297,8 @@ class SsaDeadPhiEliminator {
// Remove phis that are not live.
// Traverse in reverse order to remove phis with no uses before the
// phis that they might use.
- // TODO(lrn): Handle cyclic usages.
+ // NOTICE: Doesn't handle circular references, but we don't currently
+ // create any.
List<HBasicBlock> blocks = graph.blocks;
for (int i = blocks.length - 1; i >= 0; i--) {
HBasicBlock block = blocks[i];
@@ -306,7 +307,7 @@ class SsaDeadPhiEliminator {
while (current != null) {
next = current.next;
if (!livePhis.contains(current)) {
- current.block.removePhi(current);
+ block.removePhi(current);
}
current = next;
}
« no previous file with comments | « frog/leg/ssa/nodes.dart ('k') | frog/leg/ssa/tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698