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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart

Issue 1291333002: Revert "dart2js cps: Compile some loops as 'for' loops." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 tree_ir.integrity; 1 library tree_ir.integrity;
2 2
3 import 'tree_ir_nodes.dart'; 3 import 'tree_ir_nodes.dart';
4 4
5 /// Performs integrity checks on the tree_ir. 5 /// Performs integrity checks on the tree_ir.
6 /// 6 ///
7 /// Should only be run for debugging purposes, not in production. 7 /// Should only be run for debugging purposes, not in production.
8 /// 8 ///
9 /// - Reference counts on must match the actual number of references. 9 /// - Reference counts on must match the actual number of references.
10 /// - Labels must be in scope when referenced. 10 /// - Labels must be in scope when referenced.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 visitLabeledStatement(LabeledStatement node) { 96 visitLabeledStatement(LabeledStatement node) {
97 visitJumpTargetBody(node); 97 visitJumpTargetBody(node);
98 visitStatement(node.next); 98 visitStatement(node.next);
99 } 99 }
100 100
101 visitWhileTrue(WhileTrue node) { 101 visitWhileTrue(WhileTrue node) {
102 visitJumpTargetBody(node); 102 visitJumpTargetBody(node);
103 } 103 }
104 104
105 visitFor(For node) { 105 visitWhileCondition(WhileCondition node) {
106 visitExpression(node.condition); 106 visitExpression(node.condition);
107 visitJumpTargetBody(node); 107 visitJumpTargetBody(node);
108 node.updates.forEach(visitExpression);
109 visitStatement(node.next); 108 visitStatement(node.next);
110 } 109 }
111 110
112 visitBreak(Break node) { 111 visitBreak(Break node) {
113 if (!label2declaration.containsKey(node.target)) { 112 if (!label2declaration.containsKey(node.target)) {
114 error('Break to label that is not in scope'); 113 error('Break to label that is not in scope');
115 } 114 }
116 if (label2declaration[node.target] is! LabeledStatement) { 115 if (label2declaration[node.target] is! LabeledStatement) {
117 error('Break to non-labeled statement ${label2declaration[node.target]}'); 116 error('Break to non-labeled statement ${label2declaration[node.target]}');
118 } 117 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (reads != variable.readCount || writes != variable.writeCount) { 156 if (reads != variable.readCount || writes != variable.writeCount) {
158 error('Invalid reference count for $variable:\n' 157 error('Invalid reference count for $variable:\n'
159 '- Variable has $reads reads and $writes writes\n' 158 '- Variable has $reads reads and $writes writes\n'
160 '- Reference count is ${variable.readCount} reads and ' 159 '- Reference count is ${variable.readCount} reads and '
161 '${variable.writeCount} writes'); 160 '${variable.writeCount} writes');
162 } 161 }
163 } 162 }
164 } 163 }
165 164
166 } 165 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698