Return & Throw jump to end

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@60 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 27 years ago
parent 20ffd055c4
commit 014b9c7107
  1. 10
      jode/jode/bytecode/Opcodes.java

@ -584,12 +584,13 @@ public abstract class Opcodes {
}
case opc_ireturn: case opc_lreturn:
case opc_freturn: case opc_dreturn: case opc_areturn: {
Type retType = ca.getMethod().getReturnType();
/* Address -1 is interpreted as end of method */
Type retType = Type.tSubType(ca.getMethod().getReturnType());
return createBlock
(ca, addr, 1, new ReturnBlock(new NopOperator(retType)));
(ca, addr, 1, new ReturnBlock(new NopOperator(retType),
new Jump(-1)));
}
case opc_return:
/* Address -1 is interpreted as end of method */
return createBlock
(ca, addr, 1, new EmptyBlock(new Jump(-1)));
case opc_getstatic:
@ -662,7 +663,8 @@ public abstract class Opcodes {
case opc_athrow:
return createBlock
(ca, addr, 1,
new ThrowBlock(new NopOperator(Type.tUObject)));
new ThrowBlock(new NopOperator(Type.tUObject),
new Jump(-1)));
case opc_checkcast: {
CpoolClass cpcls = (CpoolClass)
ca.method.classAnalyzer.getConstant

Loading…
Cancel
Save