Index: pkg/compiler/lib/src/cps_ir/redundant_join.dart |
diff --git a/pkg/compiler/lib/src/cps_ir/redundant_join.dart b/pkg/compiler/lib/src/cps_ir/redundant_join.dart |
index 92bd51b07bfd6c0aad3476909d6b0f6a51188850..2a1a584c99417c824a70033fd911bdd285fb6eac 100644 |
--- a/pkg/compiler/lib/src/cps_ir/redundant_join.dart |
+++ b/pkg/compiler/lib/src/cps_ir/redundant_join.dart |
@@ -234,7 +234,7 @@ class RedundantJoinEliminator extends RecursiveVisitor implements Pass { |
class AlphaRenamer extends RecursiveVisitor { |
Map<Parameter, Parameter> renaming = <Parameter, Parameter>{}; |
- visitContinuation(Continuation cont) { |
+ processContinuation(Continuation cont) { |
if (cont.isReturnContinuation) return; |
List<Parameter> shadowedKeys = <Parameter>[]; |
@@ -255,16 +255,15 @@ class AlphaRenamer extends RecursiveVisitor { |
} |
} |
- // Visit the body with the updated environment. |
- visit(cont.body); |
- |
- // Restore the original environment. |
- for (int i = 0; i < cont.parameters.length; ++i) { |
- renaming.remove(cont.parameters[i]); |
- if (shadowedValues[i] != null) { |
- renaming[shadowedKeys[i]] = shadowedValues[i]; |
+ pushAction(() { |
+ // Restore the original environment. |
+ for (int i = 0; i < cont.parameters.length; ++i) { |
+ renaming.remove(cont.parameters[i]); |
+ if (shadowedValues[i] != null) { |
+ renaming[shadowedKeys[i]] = shadowedValues[i]; |
+ } |
} |
- } |
+ }); |
} |
processReference(Reference ref) { |