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

Unified Diff: pkg/compiler/lib/src/cps_ir/redundant_join.dart

Issue 1616673002: dart2js cps: Debugging utility and fix idempotency in shrinking reducer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Do not run the same Pass instance twice Created 4 years, 11 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
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 92f64ae252fbfff866cf0ac8cb4716d16dfd7d9e..808c1c73eed90f4720503ae95a60cc9b646866a0 100644
--- a/pkg/compiler/lib/src/cps_ir/redundant_join.dart
+++ b/pkg/compiler/lib/src/cps_ir/redundant_join.dart
@@ -8,15 +8,15 @@ import 'cps_ir_nodes.dart';
import 'optimizers.dart';
/// Eliminates redundant join points.
-///
+///
/// A redundant join point is a continuation that immediately branches
/// based on one of its parameters, and that parameter is a constant value
/// at every invocation. Each invocation is redirected to jump directly
/// to the branch target.
-///
+///
/// Internally in this pass, parameters are treated as names with lexical
/// scoping, and a given parameter "name" may be declared by more than
-/// one continuation. The reference chains for parameters are therefore
+/// one continuation. The reference chains for parameters are therefore
/// meaningless during this pass, until repaired by [AlphaRenamer] at
/// the end.
class RedundantJoinEliminator extends TrampolineRecursiveVisitor implements Pass {
@@ -113,11 +113,11 @@ class RedundantJoinEliminator extends TrampolineRecursiveVisitor implements Pass
return;
}
- // Lift any continuations bound inside branchCont so they are in scope at
+ // Lift any continuations bound inside branchCont so they are in scope at
// the call sites. When lifting, the parameters of branchCont fall out of
// scope, so they are added as parameters on each lifted continuation.
// Schematically:
- //
+ //
// (LetCont (branchCont (x1, x2, x3) =
// (LetCont (innerCont (y) = ...) in
// [... innerCont(y') ...]))
@@ -127,8 +127,8 @@ class RedundantJoinEliminator extends TrampolineRecursiveVisitor implements Pass
// (LetCont (innerCont (y, x1, x2, x3) = ...) in
// (LetCont (branchCont (x1, x2, x3) =
// [... innerCont(y', x1, x2, x3) ...])
- //
- // Parameter objects become shared between branchCont and the lifted
+ //
+ // Parameter objects become shared between branchCont and the lifted
// continuations. [AlphaRenamer] will clean up at the end of this pass.
LetCont outerLetCont = branchCont.parent;
while (branchCont.body is LetCont) {
@@ -202,13 +202,13 @@ class RedundantJoinEliminator extends TrampolineRecursiveVisitor implements Pass
/// Ensures parameter objects are not shared between different continuations,
/// akin to alpha-renaming variables so every variable is named uniquely.
/// For example:
-///
+///
/// LetCont (k1 x = (return x)) in
/// LetCont (k2 x = (InvokeContinuation k3 x)) in ...
-/// =>
+/// =>
/// LetCont (k1 x = (return x)) in
/// LetCont (k2 x' = (InvokeContinuation k3 x')) in ...
-///
+///
/// After lifting LetConts in the main pass above, parameter objects can have
/// multiple bindings. Each reference implicitly refers to the binding that
/// is currently in scope.
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698