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

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

Issue 10905203: Allow catch part to be optional as in try {} on T [catch (x[,y])] {} (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 8 years, 3 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 | « lib/compiler/implementation/scanner/listener.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index 1f3039203cdc5566b79e81fdabd58b7691caeecb..abcada3b388b2c058cac460201ec69384a6d23b7 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -3672,8 +3672,10 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
void visitThen() {
CatchBlock catchBlock = link.head;
link = link.tail;
- localsHandler.updateLocal(elements[catchBlock.exception],
- unwrappedException);
+ if (catchBlock.exception !== null) {
+ localsHandler.updateLocal(elements[catchBlock.exception],
+ unwrappedException);
+ }
Node trace = catchBlock.trace;
if (trace != null) {
pushInvokeHelper1(interceptors.getTraceFromException(), exception);
« no previous file with comments | « lib/compiler/implementation/scanner/listener.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698