summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jvm/clojure/lang/Compiler.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java
index f5684f1b..130ed5d8 100644
--- a/src/jvm/clojure/lang/Compiler.java
+++ b/src/jvm/clojure/lang/Compiler.java
@@ -1719,7 +1719,6 @@ public static class TryExpr implements Expr{
public void emit(C context, ObjExpr objx, GeneratorAdapter gen){
Label startTry = gen.newLabel();
Label endTry = gen.newLabel();
- Label endTryCatch = gen.newLabel();
Label end = gen.newLabel();
Label ret = gen.newLabel();
Label finallyLabel = gen.newLabel();
@@ -1755,7 +1754,6 @@ public static class TryExpr implements Expr{
finallyExpr.emit(C.STATEMENT, objx, gen);
gen.goTo(ret);
}
- gen.mark(endTryCatch);
if(finallyExpr != null)
{
gen.mark(finallyLabel);
@@ -1775,7 +1773,14 @@ public static class TryExpr implements Expr{
gen.visitTryCatchBlock(startTry, endTry, clause.label, clause.c.getName().replace('.', '/'));
}
if(finallyExpr != null)
- gen.visitTryCatchBlock(startTry, endTryCatch, finallyLabel, null);
+ {
+ gen.visitTryCatchBlock(startTry, endTry, finallyLabel, null);
+ for(int i = 0; i < catchExprs.count(); i++)
+ {
+ CatchClause clause = (CatchClause) catchExprs.nth(i);
+ gen.visitTryCatchBlock(clause.label, clause.endLabel, finallyLabel, null);
+ }
+ }
for(int i = 0; i < catchExprs.count(); i++)
{
CatchClause clause = (CatchClause) catchExprs.nth(i);