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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 12220011: Handle malformed types in catch-on. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index 67085fdb8a719521baf050b245c134aff2505a0b..0d2d98e1fc7f082e38453da1976076c23c0a2d14 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -4451,12 +4451,18 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
if (catchBlock.onKeyword != null) {
DartType type = elements.getType(catchBlock.type);
if (type == null) {
- compiler.cancel('On with unresolved type',
+ compiler.cancel('On with no type',
ngeoffray 2013/02/05 09:43:46 Fits in one line?
Johnni Winther 2013/02/18 14:51:43 Done.
node: catchBlock.type);
}
- HInstruction condition =
- new HIs(type, <HInstruction>[unwrappedException]);
- push(condition);
+ if (type.isMalformed) {
+ HInstruction condition =
+ graph.addConstantBool(false, constantSystem);
ngeoffray 2013/02/05 09:43:46 Fits in one line?
Johnni Winther 2013/02/18 14:51:43 :( No.
+ stack.add(condition);
ahe 2013/02/05 09:58:39 Am I understanding this correctly: the specificati
karlklose 2013/02/05 10:21:45 Shouldn't we treat any malformed type as dynamic a
+ } else {
+ HInstruction condition =
+ new HIs(type, <HInstruction>[unwrappedException]);
+ push(condition);
+ }
}
else {
VariableDefinitions declaration = catchBlock.formals.nodes.head;
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698