/** * Adds a finally clause for earch return statement. */ private void addFinally(ArrayList returnList, Stmnt finallyBlock) throws CompileError { Bytecode bc = bytecode; int n = returnList.size(); for (int i = 0; i < n; ++i) { final int[] ret = (int[])returnList.get(i); int pc = ret[0]; bc.write16bit(pc, bc.currentPc() - pc + 1); ReturnHook hook = new JsrHook2(this, ret); finallyBlock.accept(this); hook.remove(this); if (!hasReturned) { bc.addOpcode(Opcode.GOTO); bc.addIndex(pc + 3 - bc.currentPc()); } } }
protected final void atReturnStmnt2(ASTree result) throws CompileError { int op; if (result == null) op = Opcode.RETURN; else { compileExpr(result); if (arrayDim > 0) op = ARETURN; else { int type = exprType; if (type == DOUBLE) op = DRETURN; else if (type == FLOAT) op = FRETURN; else if (type == LONG) op = LRETURN; else if (isRefType(type)) op = ARETURN; else op = IRETURN; } } for (ReturnHook har = returnHooks; har != null; har = har.next) if (har.doit(bytecode, op)) { hasReturned = true; return; } bytecode.addOpcode(op); hasReturned = true; }
protected final void atReturnStmnt2(ASTree result) throws CompileError { int op; if (result == null) op = Opcode.RETURN; else { compileExpr(result); if (arrayDim > 0) op = ARETURN; else { int type = exprType; if (type == DOUBLE) op = DRETURN; else if (type == FLOAT) op = FRETURN; else if (type == LONG) op = LRETURN; else if (isRefType(type)) op = ARETURN; else op = IRETURN; } } for (ReturnHook har = returnHooks; har != null; har = har.next) if (har.doit(bytecode, op)) { hasReturned = true; return; } bytecode.addOpcode(op); hasReturned = true; }
protected final void atReturnStmnt2(ASTree result) throws CompileError { int op; if (result == null) op = Opcode.RETURN; else { compileExpr(result); if (arrayDim > 0) op = ARETURN; else { int type = exprType; if (type == DOUBLE) op = DRETURN; else if (type == FLOAT) op = FRETURN; else if (type == LONG) op = LRETURN; else if (isRefType(type)) op = ARETURN; else op = IRETURN; } } for (ReturnHook har = returnHooks; har != null; har = har.next) if (har.doit(bytecode, op)) { hasReturned = true; return; } bytecode.addOpcode(op); hasReturned = true; }
protected final void atReturnStmnt2(ASTree result) throws CompileError { int op; if (result == null) op = Opcode.RETURN; else { compileExpr(result); if (arrayDim > 0) op = ARETURN; else { int type = exprType; if (type == DOUBLE) op = DRETURN; else if (type == FLOAT) op = FRETURN; else if (type == LONG) op = LRETURN; else if (isRefType(type)) op = ARETURN; else op = IRETURN; } } for (ReturnHook har = returnHooks; har != null; har = har.next) if (har.doit(bytecode, op)) { hasReturned = true; return; } bytecode.addOpcode(op); hasReturned = true; }
protected final void atReturnStmnt2(ASTree result) throws CompileError { int op; if (result == null) op = Opcode.RETURN; else { compileExpr(result); if (arrayDim > 0) op = ARETURN; else { int type = exprType; if (type == DOUBLE) op = DRETURN; else if (type == FLOAT) op = FRETURN; else if (type == LONG) op = LRETURN; else if (isRefType(type)) op = ARETURN; else op = IRETURN; } } for (ReturnHook har = returnHooks; har != null; har = har.next) if (har.doit(bytecode, op)) { hasReturned = true; return; } bytecode.addOpcode(op); hasReturned = true; }
/** * Adds a finally clause for earch return statement. */ private void addFinally(ArrayList returnList, Stmnt finallyBlock) throws CompileError { Bytecode bc = bytecode; int n = returnList.size(); for (int i = 0; i < n; ++i) { final int[] ret = (int[])returnList.get(i); int pc = ret[0]; bc.write16bit(pc, bc.currentPc() - pc + 1); ReturnHook hook = new JsrHook2(this, ret); finallyBlock.accept(this); hook.remove(this); if (!hasReturned) { bc.addOpcode(Opcode.GOTO); bc.addIndex(pc + 3 - bc.currentPc()); } } }
/** * Adds a finally clause for earch return statement. */ private void addFinally(ArrayList returnList, Stmnt finallyBlock) throws CompileError { Bytecode bc = bytecode; int n = returnList.size(); for (int i = 0; i < n; ++i) { final int[] ret = (int[])returnList.get(i); int pc = ret[0]; bc.write16bit(pc, bc.currentPc() - pc + 1); ReturnHook hook = new JsrHook2(this, ret); finallyBlock.accept(this); hook.remove(this); if (!hasReturned) { bc.addOpcode(Opcode.GOTO); bc.addIndex(pc + 3 - bc.currentPc()); } } }
/** * Adds a finally clause for earch return statement. */ private void addFinally(ArrayList returnList, Stmnt finallyBlock) throws CompileError { Bytecode bc = bytecode; int n = returnList.size(); for (int i = 0; i < n; ++i) { final int[] ret = (int[])returnList.get(i); int pc = ret[0]; bc.write16bit(pc, bc.currentPc() - pc + 1); ReturnHook hook = new JsrHook2(this, ret); finallyBlock.accept(this); hook.remove(this); if (!hasReturned) { bc.addOpcode(Opcode.GOTO); bc.addIndex(pc + 3 - bc.currentPc()); } } }
/** * Adds a finally clause for earch return statement. */ private void addFinally(ArrayList returnList, Stmnt finallyBlock) throws CompileError { Bytecode bc = bytecode; int n = returnList.size(); for (int i = 0; i < n; ++i) { final int[] ret = (int[])returnList.get(i); int pc = ret[0]; bc.write16bit(pc, bc.currentPc() - pc + 1); ReturnHook hook = new JsrHook2(this, ret); finallyBlock.accept(this); hook.remove(this); if (!hasReturned) { bc.addOpcode(Opcode.GOTO); bc.addIndex(pc + 3 - bc.currentPc()); } } }
/** * Adds a finally clause for earch return statement. */ private void addFinally(ArrayList returnList, Stmnt finallyBlock) throws CompileError { Bytecode bc = bytecode; int n = returnList.size(); for (int i = 0; i < n; ++i) { final int[] ret = (int[])returnList.get(i); int pc = ret[0]; bc.write16bit(pc, bc.currentPc() - pc + 1); ReturnHook hook = new JsrHook2(this, ret); finallyBlock.accept(this); hook.remove(this); if (!hasReturned) { bc.addOpcode(Opcode.GOTO); bc.addIndex(pc + 3 - bc.currentPc()); } } }
protected final void atReturnStmnt2(ASTree result) throws CompileError { int op; if (result == null) op = Opcode.RETURN; else { compileExpr(result); if (arrayDim > 0) op = ARETURN; else { int type = exprType; if (type == DOUBLE) op = DRETURN; else if (type == FLOAT) op = FRETURN; else if (type == LONG) op = LRETURN; else if (isRefType(type)) op = ARETURN; else op = IRETURN; } } for (ReturnHook har = returnHooks; har != null; har = har.next) if (har.doit(bytecode, op)) { hasReturned = true; return; } bytecode.addOpcode(op); hasReturned = true; }
/** * Adds a finally clause for earch return statement. */ private void addFinally(List<int[]> returnList, Stmnt finallyBlock) throws CompileError { Bytecode bc = bytecode; for (final int[] ret:returnList) { int pc = ret[0]; bc.write16bit(pc, bc.currentPc() - pc + 1); ReturnHook hook = new JsrHook2(this, ret); finallyBlock.accept(this); hook.remove(this); if (!hasReturned) { bc.addOpcode(Opcode.GOTO); bc.addIndex(pc + 3 - bc.currentPc()); } } }