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

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

Issue 981523002: Integrity checker for CPS and Tree IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Stronger checks on Tree IR and update status file Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library tree_ir_tracer; 5 library tree_ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import '../tracer.dart'; 8 import '../tracer.dart';
9 import 'tree_ir_nodes.dart'; 9 import 'tree_ir_nodes.dart';
10 import 'optimization/optimization.dart'; 10 import 'optimization/optimization.dart';
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 visitSetField(SetField node) { 179 visitSetField(SetField node) {
180 _addStatement(node); 180 _addStatement(node);
181 visitStatement(node.next); 181 visitStatement(node.next);
182 } 182 }
183 183
184 } 184 }
185 185
186 class TreeTracer extends TracerUtil with StatementVisitor, PassMixin { 186 class TreeTracer extends TracerUtil with StatementVisitor, PassMixin {
187 // TODO(asgerf): Fix visitors so we don't have to use PassMixin here.
188 String get passName => null;
189
187 final EventSink<String> output; 190 final EventSink<String> output;
188 191
189 TreeTracer(this.output); 192 TreeTracer(this.output);
190 193
191 Names names; 194 Names names;
192 BlockCollector collector; 195 BlockCollector collector;
193 int statementCounter; 196 int statementCounter;
194 197
195 void traceGraph(String name, ExecutableDefinition node) { 198 void traceGraph(String name, ExecutableDefinition node) {
196 if (node is FunctionDefinition && node.isAbstract) return; 199 if (node is FunctionDefinition && node.isAbstract) return;
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 512 String prefix = v.element == null ? 'v' : '${v.element.name}_';
510 while (name == null || _usedNames.contains(name)) { 513 while (name == null || _usedNames.contains(name)) {
511 name = "$prefix${_counter++}"; 514 name = "$prefix${_counter++}";
512 } 515 }
513 _names[v] = name; 516 _names[v] = name;
514 _usedNames.add(name); 517 _usedNames.add(name);
515 } 518 }
516 return name; 519 return name;
517 } 520 }
518 } 521 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698