Skip to content

Commit

Permalink
fix try with no catch/finally
Browse files Browse the repository at this point in the history
  • Loading branch information
richhickey committed Dec 7, 2009
1 parent 76c8f45 commit 6c0c37e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/jvm/clojure/lang/Compiler.java
Expand Up @@ -1798,9 +1798,7 @@ public Expr parse(C context, Object frm) throws Exception{
else
{
if(bodyExpr == null)
{
bodyExpr = (new BodyExpr.Parser()).parse(context, RT.seq(body));
}
if(Util.equals(op, CATCH))
{
Class c = HostExpr.maybeClass(RT.second(f), false);
Expand Down Expand Up @@ -1848,6 +1846,8 @@ public Expr parse(C context, Object frm) throws Exception{
}
}
}
if(bodyExpr == null)
bodyExpr = (new BodyExpr.Parser()).parse(context, RT.seq(body));

return new TryExpr(bodyExpr, catches, finallyExpr, retLocal,
finallyLocal);
Expand Down Expand Up @@ -3961,8 +3961,10 @@ private void emitLocal(GeneratorAdapter gen, LocalBinding lb, boolean clear){
gen.visitInsn(Opcodes.ACONST_NULL);
gen.storeArg(lb.idx - 1);
}
// else
else
{
// System.out.println("use: " + rep);
}
}
}
else
Expand All @@ -3981,8 +3983,10 @@ private void emitLocal(GeneratorAdapter gen, LocalBinding lb, boolean clear){
gen.visitInsn(Opcodes.ACONST_NULL);
gen.visitVarInsn(OBJECT_TYPE.getOpcode(Opcodes.ISTORE), lb.idx);
}
// else
else
{
// System.out.println("use: " + rep);
}
}
}
}
Expand Down

0 comments on commit 6c0c37e

Please sign in to comment.