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

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

Issue 980853002: dart2dart: Bugfix in copy propagator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase 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') | 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 // 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 addIndent(); 258 addIndent();
259 add("$bci $uses $name $contents <|@\n"); 259 add("$bci $uses $name $contents <|@\n");
260 } 260 }
261 261
262 visitLabeledStatement(LabeledStatement node) { 262 visitLabeledStatement(LabeledStatement node) {
263 // These do not get added to a block's list of statements. 263 // These do not get added to a block's list of statements.
264 } 264 }
265 265
266 visitAssign(Assign node) { 266 visitAssign(Assign node) {
267 String name = names.varName(node.variable); 267 String name = names.varName(node.variable);
268 String rhs = expr(node.definition); 268 String rhs = expr(node.value);
269 Variable v = node.variable; 269 Variable v = node.variable;
270 String extra = "(r=${v.readCount}, w=${v.writeCount})"; 270 String extra = "(r=${v.readCount}, w=${v.writeCount})";
271 printStatement(null, "assign $name = $rhs $extra"); 271 printStatement(null, "assign $name = $rhs $extra");
272 } 272 }
273 273
274 visitReturn(Return node) { 274 visitReturn(Return node) {
275 printStatement(null, "return ${expr(node.value)}"); 275 printStatement(null, "return ${expr(node.value)}");
276 } 276 }
277 277
278 visitBreak(Break node) { 278 visitBreak(Break node) {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 519 String prefix = v.element == null ? 'v' : '${v.element.name}_';
520 while (name == null || _usedNames.contains(name)) { 520 while (name == null || _usedNames.contains(name)) {
521 name = "$prefix${_counter++}"; 521 name = "$prefix${_counter++}";
522 } 522 }
523 _names[v] = name; 523 _names[v] = name;
524 _usedNames.add(name); 524 _usedNames.add(name);
525 } 525 }
526 return name; 526 return name;
527 } 527 }
528 } 528 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698