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

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

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 library dart2js.cps_ir.loop_effects; 1 library dart2js.cps_ir.loop_effects;
2 2
3 import 'cps_ir_nodes.dart'; 3 import 'cps_ir_nodes.dart';
4 import 'loop_hierarchy.dart'; 4 import 'loop_hierarchy.dart';
5 import '../world.dart'; 5 import '../world.dart';
6 import 'effects.dart'; 6 import 'effects.dart';
7 7
8 /// Determines the side effects that may occur in each loop. 8 /// Determines the side effects that may occur in each loop.
9 class LoopSideEffects extends TrampolineRecursiveVisitor { 9 class LoopSideEffects extends TrampolineRecursiveVisitor {
10 LoopHierarchy loopHierarchy; 10 LoopHierarchy loopHierarchy;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 push(cont); 78 push(cont);
79 } else { 79 } else {
80 // Multiple loops can be exited at once. 80 // Multiple loops can be exited at once.
81 // Register as an exit from the outermost loop being exited. 81 // Register as an exit from the outermost loop being exited.
82 Continuation inner = currentLoopHeader; 82 Continuation inner = currentLoopHeader;
83 Continuation outer = loopHierarchy.getEnclosingLoop(currentLoopHeader); 83 Continuation outer = loopHierarchy.getEnclosingLoop(currentLoopHeader);
84 while (outer != loop) { 84 while (outer != loop) {
85 if (inner == null) { 85 if (inner == null) {
86 // The shrinking reductions pass must run before any pass that relies 86 // The shrinking reductions pass must run before any pass that relies
87 // on computing loop side effects. 87 // on computing loop side effects.
88 world.compiler.reporter.internalError(null, 88 world.compiler.reporter.internalError(
89 null,
89 'Unreachable continuations must be removed before computing ' 90 'Unreachable continuations must be removed before computing '
90 'loop side effects.'); 91 'loop side effects.');
91 } 92 }
92 inner = outer; 93 inner = outer;
93 outer = loopHierarchy.getEnclosingLoop(outer); 94 outer = loopHierarchy.getEnclosingLoop(outer);
94 } 95 }
95 exitContinuations[inner].add(cont); 96 exitContinuations[inner].add(cont);
96 } 97 }
97 } 98 }
98 } 99 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/insert_refinements.dart ('k') | pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698