From 6c0c37e048f49ee5cd3afa79ce461abbc6a0c367 Mon Sep 17 00:00:00 2001 From: Rich Hickey Date: Mon, 7 Dec 2009 16:25:34 -0500 Subject: fix try with no catch/finally --- src/jvm/clojure/lang/Compiler.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java index db2d3ffd..72ac5313 100644 --- a/src/jvm/clojure/lang/Compiler.java +++ b/src/jvm/clojure/lang/Compiler.java @@ -1798,9 +1798,7 @@ public static class TryExpr implements Expr{ 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); @@ -1848,6 +1846,8 @@ public static class TryExpr implements Expr{ } } } + if(bodyExpr == null) + bodyExpr = (new BodyExpr.Parser()).parse(context, RT.seq(body)); return new TryExpr(bodyExpr, catches, finallyExpr, retLocal, finallyLocal); @@ -3961,8 +3961,10 @@ static public class ObjExpr implements Expr{ gen.visitInsn(Opcodes.ACONST_NULL); gen.storeArg(lb.idx - 1); } -// else + else + { // System.out.println("use: " + rep); + } } } else @@ -3981,8 +3983,10 @@ static public class ObjExpr implements Expr{ gen.visitInsn(Opcodes.ACONST_NULL); gen.visitVarInsn(OBJECT_TYPE.getOpcode(Opcodes.ISTORE), lb.idx); } -// else + else + { // System.out.println("use: " + rep); + } } } } -- cgit v1.2.3-70-g09d2