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

Unified Diff: pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart

Issue 923013002: dart2dart: Implementation of simple try/catch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed break/continue, incorporated comments. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart b/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart
index a2828b697d175d31114ec71987939288743b0405..5ab45278bcac6f38cb4d657c9dbc826e0c9235ca 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart
@@ -210,6 +210,12 @@ class CopyPropagator extends RecursiveVisitor with PassMixin {
throw "WhileCondition before LoopRewriter";
}
+ Statement visitTry(Try node) {
+ node.tryBody = visitBasicBlock(node.tryBody);
+ node.catchBody = visitBasicBlock(node.catchBody);
+ return node;
+ }
+
Statement visitFunctionDeclaration(FunctionDeclaration node) {
// Unlike var declarations, function declarations are not hoisted, so we
// can't do copy propagation of the variable.

Powered by Google App Engine
This is Rietveld 408576698