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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_propagation.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/cps_ir/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index dc36d80432fe901283e506f7e2d18ec7dd41374b..f3ba249783182567c77866668e7f9b561c63d943 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -445,6 +445,16 @@ class _TypePropagationVisitor<T> extends Visitor {
setReachable(node.body);
}
+ void visitLetHandler(LetHandler node) {
+ setReachable(node.body);
+ // The handler is assumed to be reachable (we could instead treat it as
+ // unreachable unless we find something reachable that might throw in the
+ // body --- it's not clear if we want to do that here or in some other
+ // pass). The handler parameters are assumed to be unknown.
+ setReachable(node.handler);
+ node.handler.parameters.forEach((Parameter p) => setValue(p, nonConst()));
karlklose 2015/02/16 10:15:48 We should set the type of the parameters here.
Kevin Millikin (Google) 2015/02/25 11:06:36 Acknowledged. I've made it a TODO because the way
+ }
+
void visitLetMutable(LetMutable node) {
setValue(node.variable, getValue(node.value.definition));
setReachable(node.body);

Powered by Google App Engine
This is Rietveld 408576698