f2 = new LocalMember(where, thisClass, 0, Type.tInt, null);
num1 = new Integer(ctx.declare(env, f1));
num2 = new Integer(ctx.declare(env, f2));
}
TryData td = new TryData();
td.add(null);
// Main body
CodeContext bodyctx = new CodeContext(ctx, this);
asm.add(where, opc_try, td); // start of protected code
body.code(env, bodyctx, asm);
asm.add(bodyctx.breakLabel);
asm.add(td.getEndLabel()); // end of protected code
// Cleanup afer body
if (finallyCanFinish) {
asm.add(where, opc_jsr, bodyctx.contLabel);
asm.add(where, opc_goto, endLabel);
} else {
// just goto the cleanup code. It will never return.
asm.add(where, opc_goto, bodyctx.contLabel);
}
// Catch code
CatchData cd = td.getCatch(0);
asm.add(cd.getLabel());
if (finallyCanFinish) {
asm.add(where, opc_astore, num1); // store exception
asm.add(where, opc_jsr, bodyctx.contLabel);
asm.add(where, opc_aload, num1); // rethrow exception