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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart

Issue 1579713002: dart2js cps: Fix a comment. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library dart2js.cps_ir.loop_invariant_branch; 1 library dart2js.cps_ir.loop_invariant_branch;
2 2
3 import 'cps_ir_nodes.dart'; 3 import 'cps_ir_nodes.dart';
4 import 'optimizers.dart'; 4 import 'optimizers.dart';
5 import 'loop_hierarchy.dart'; 5 import 'loop_hierarchy.dart';
6 import 'cps_fragment.dart'; 6 import 'cps_fragment.dart';
7 import 'redundant_join.dart' show AlphaRenamer; 7 import 'redundant_join.dart' show AlphaRenamer;
8 8
9 /// Hoists branches out of loops, where: 9 /// Hoists branches out of loops, where:
10 /// - the branch is at the entry point of a loop 10 /// - the branch is at the entry point of a loop
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 while (exp is LetCont) { 88 while (exp is LetCont) {
89 exp = exp.next; 89 exp = exp.next;
90 } 90 }
91 return exp; 91 return exp;
92 } 92 }
93 93
94 /// Adds [parameters] to [cont] and updates every invocation to pass the 94 /// Adds [parameters] to [cont] and updates every invocation to pass the
95 /// corresponding parameter values as arguments. Thus, the parameters are 95 /// corresponding parameter values as arguments. Thus, the parameters are
96 /// passed in explicitly instead of being captured. 96 /// passed in explicitly instead of being captured.
97 /// 97 ///
98 /// This only works because [AlphaRenamer] cleans up after this pass. 98 /// This only works because [AlphaRenamer] cleans up at the end of this pass.
99 /// 99 ///
100 /// Schematically: 100 /// Schematically:
101 /// 101 ///
102 /// let outer(x1, x2, x3) = 102 /// let outer(x1, x2, x3) =
103 /// let inner(y) = BODY 103 /// let inner(y) = BODY
104 /// [ .. inner(y') .. ] 104 /// [ .. inner(y') .. ]
105 /// 105 ///
106 /// ==> (append parameters) 106 /// ==> (append parameters)
107 /// 107 ///
108 /// let outer(x1, x2, x3) = 108 /// let outer(x1, x2, x3) =
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // in loop(i) 243 // in loop(i)
244 // 244 //
245 destroyAndReplace(branch, new InvokeContinuation(loopCase, [])); 245 destroyAndReplace(branch, new InvokeContinuation(loopCase, []));
246 246
247 // Record that at least one branch was hoisted to trigger alpha renaming. 247 // Record that at least one branch was hoisted to trigger alpha renaming.
248 wasHoisted = true; 248 wasHoisted = true;
249 249
250 return true; 250 return true;
251 } 251 }
252 } 252 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698