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

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

Issue 1580613002: dart2js: Remove rethrow from the CPS and Tree IRs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Restore rethrow to the CPS IR. 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 | « 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 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 visitReturn(Return node) { 77 visitReturn(Return node) {
78 _addStatement(node); 78 _addStatement(node);
79 } 79 }
80 80
81 visitThrow(Throw node) { 81 visitThrow(Throw node) {
82 _addStatement(node); 82 _addStatement(node);
83 } 83 }
84 84
85 visitRethrow(Rethrow node) {
86 _addStatement(node);
87 }
88
89 visitUnreachable(Unreachable node) { 85 visitUnreachable(Unreachable node) {
90 _addStatement(node); 86 _addStatement(node);
91 } 87 }
92 88
93 visitBreak(Break node) { 89 visitBreak(Break node) {
94 _addStatement(node); 90 _addStatement(node);
95 if (breakTargets.containsKey(node.target)) { 91 if (breakTargets.containsKey(node.target)) {
96 blocks.last.addEdgeTo(breakTargets[node.target]); 92 blocks.last.addEdgeTo(breakTargets[node.target]);
97 } 93 }
98 } 94 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 265 }
270 266
271 visitReturn(Return node) { 267 visitReturn(Return node) {
272 printStatement(null, "return ${expr(node.value)}"); 268 printStatement(null, "return ${expr(node.value)}");
273 } 269 }
274 270
275 visitThrow(Throw node) { 271 visitThrow(Throw node) {
276 printStatement(null, "throw ${expr(node.value)}"); 272 printStatement(null, "throw ${expr(node.value)}");
277 } 273 }
278 274
279 visitRethrow(Rethrow node) {
280 printStatement(null, "rethrow");
281 }
282
283 visitUnreachable(Unreachable node) { 275 visitUnreachable(Unreachable node) {
284 printStatement(null, "unreachable"); 276 printStatement(null, "unreachable");
285 } 277 }
286 278
287 visitBreak(Break node) { 279 visitBreak(Break node) {
288 Block block = collector.breakTargets[node.target]; 280 Block block = collector.breakTargets[node.target];
289 String name = block != null ? block.name : '<missing label>'; 281 String name = block != null ? block.name : '<missing label>';
290 printStatement(null, "break $name"); 282 printStatement(null, "break $name");
291 } 283 }
292 284
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 618 String prefix = v.element == null ? 'v' : '${v.element.name}_';
627 while (name == null || _usedNames.contains(name)) { 619 while (name == null || _usedNames.contains(name)) {
628 name = "$prefix${_counter++}"; 620 name = "$prefix${_counter++}";
629 } 621 }
630 _names[v] = name; 622 _names[v] = name;
631 _usedNames.add(name); 623 _usedNames.add(name);
632 } 624 }
633 return name; 625 return name;
634 } 626 }
635 } 627 }
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