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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.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
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.optimization.statement_rewriter; 5 library tree_ir.optimization.statement_rewriter;
6 6
7 import 'optimization.dart' show Pass; 7 import 'optimization.dart' show Pass;
8 import '../tree_ir_nodes.dart'; 8 import '../tree_ir_nodes.dart';
9 import '../../io/source_information.dart'; 9 import '../../io/source_information.dart';
10 import '../../elements/elements.dart'; 10 import '../../elements/elements.dart';
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 node.value = visitExpression(node.value); 604 node.value = visitExpression(node.value);
605 } 605 }
606 return node; 606 return node;
607 } 607 }
608 608
609 Statement visitThrow(Throw node) { 609 Statement visitThrow(Throw node) {
610 node.value = visitExpression(node.value); 610 node.value = visitExpression(node.value);
611 return node; 611 return node;
612 } 612 }
613 613
614 Statement visitRethrow(Rethrow node) {
615 return node;
616 }
617
618 Statement visitUnreachable(Unreachable node) { 614 Statement visitUnreachable(Unreachable node) {
619 return node; 615 return node;
620 } 616 }
621 617
622 Statement visitBreak(Break node) { 618 Statement visitBreak(Break node) {
623 // Redirect through chain of breaks. 619 // Redirect through chain of breaks.
624 // Note that useCount was accounted for at visitLabeledStatement. 620 // Note that useCount was accounted for at visitLabeledStatement.
625 // Note redirect may return either a Break or Continue statement. 621 // Note redirect may return either a Break or Continue statement.
626 Jump jump = redirect(node); 622 Jump jump = redirect(node);
627 if (jump is Break && 623 if (jump is Break &&
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 VariableUseCallback callback; 1351 VariableUseCallback callback;
1356 1352
1357 VariableUseVisitor(this.callback); 1353 VariableUseVisitor(this.callback);
1358 1354
1359 visitVariableUse(VariableUse use) => callback(use); 1355 visitVariableUse(VariableUse use) => callback(use);
1360 1356
1361 static void visit(Expression node, VariableUseCallback callback) { 1357 static void visit(Expression node, VariableUseCallback callback) {
1362 new VariableUseVisitor(callback).visitExpression(node); 1358 new VariableUseVisitor(callback).visitExpression(node);
1363 } 1359 }
1364 } 1360 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/codegen.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698