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

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: 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..8a0a3ed82b536079e462ac36351398f1e265bc6d 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 visitTryStatement(TryStatement 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