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

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

Issue 1375213003: dart2js cps: Maintain parent pointers instead of recomputing them. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 5 years, 2 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 | « pkg/compiler/lib/src/cps_ir/parent_visitor.dart ('k') | pkg/compiler/lib/src/cps_ir/redundant_phi.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d07d5190ab480754da3971396e74e6d0b89a72d5..92f64ae252fbfff866cf0ac8cb4716d16dfd7d9e 100644
--- a/pkg/compiler/lib/src/cps_ir/redundant_join.dart
+++ b/pkg/compiler/lib/src/cps_ir/redundant_join.dart
@@ -19,7 +19,7 @@ import 'optimizers.dart';
/// one continuation. The reference chains for parameters are therefore
/// meaningless during this pass, until repaired by [AlphaRenamer] at
/// the end.
-class RedundantJoinEliminator extends RecursiveVisitor implements Pass {
+class RedundantJoinEliminator extends TrampolineRecursiveVisitor implements Pass {
String get passName => 'Redundant join elimination';
final Set<Branch> workSet = new Set<Branch>();
@@ -139,7 +139,7 @@ class RedundantJoinEliminator extends RecursiveVisitor implements Pass {
Expression use = ref.parent;
if (use is InvokeContinuation) {
for (Parameter param in branchCont.parameters) {
- use.arguments.add(new Reference<Primitive>(param));
+ use.arguments.add(new Reference<Primitive>(param)..parent = use);
}
} else {
// The branch will be eliminated, so don't worry about updating it.
@@ -215,7 +215,7 @@ class RedundantJoinEliminator extends RecursiveVisitor implements Pass {
///
/// This returns the IR to its normal form after redundant joins have been
/// eliminated.
-class AlphaRenamer extends RecursiveVisitor {
+class AlphaRenamer extends TrampolineRecursiveVisitor {
Map<Parameter, Parameter> renaming = <Parameter, Parameter>{};
processContinuation(Continuation cont) {
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/parent_visitor.dart ('k') | pkg/compiler/lib/src/cps_ir/redundant_phi.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698