/* */
/* */ protected void atTryStmnt(Stmnt st)
/* */ throws CompileError
/* */ {
/* 189 */ Bytecode bc = this.bytecode;
/* 190 */ Stmnt body = (Stmnt)st.getLeft();
/* 191 */ if (body == null) {
/* 192 */ return;
/* */ }
/* 194 */ ASTList catchList = (ASTList)st.getRight().getLeft();
/* 195 */ Stmnt finallyBlock = (Stmnt)st.getRight().getRight().getLeft();
/* 196 */ ArrayList gotoList = new ArrayList();
/* */
/* 198 */ JsrHook jsrHook = null;
/* 199 */ if (finallyBlock != null) {
/* 200 */ jsrHook = new JsrHook(this);
/* */ }
/* 202 */ int start = bc.currentPc();
/* 203 */ body.accept(this);
/* 204 */ int end = bc.currentPc();
/* 205 */ if (start == end) {
/* 206 */ throw new CompileError("empty try block");
/* */ }
/* 208 */ boolean tryNotReturn = !this.hasReturned;
/* 209 */ if (tryNotReturn) {
/* 210 */ bc.addOpcode(167);
/* 211 */ gotoList.add(new Integer(bc.currentPc()));
/* 212 */ bc.addIndex(0);
/* */ }
/* */
/* 215 */ int var = getMaxLocals();
/* 216 */ incMaxLocals(1);
/* 217 */ while (catchList != null)
/* */ {
/* 219 */ Pair p = (Pair)catchList.head();
/* 220 */ catchList = catchList.tail();
/* 221 */ Declarator decl = (Declarator)p.getLeft();
/* 222 */ Stmnt block = (Stmnt)p.getRight();
/* */
/* 224 */ decl.setLocalVar(var);
/* */
/* 226 */ CtClass type = this.resolver.lookupClassByJvmName(decl.getClassName());
/* 227 */ decl.setClassName(MemberResolver.javaToJvmName(type.getName()));
/* 228 */ bc.addExceptionHandler(start, end, bc.currentPc(), type);
/* 229 */ bc.growStack(1);
/* 230 */ bc.addAstore(var);
/* 231 */ this.hasReturned = false;
/* 232 */ if (block != null) {
/* 233 */ block.accept(this);
/* */ }
/* 235 */ if (!this.hasReturned) {
/* 236 */ bc.addOpcode(167);
/* 237 */ gotoList.add(new Integer(bc.currentPc()));
/* 238 */ bc.addIndex(0);