X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FMethodGen.java;h=31d1229b306f7a2c00ba716f1db289c829c507e3;hp=32fd705cc9d3c48ab116093ae540501cad40f2f3;hb=7fbbcd1b85ae398c4468651e05df64e938812397;hpb=d60e86de7947e6e628b5f90dfe19bee7f7a26bd0 diff --git a/src/org/ibex/classgen/MethodGen.java b/src/org/ibex/classgen/MethodGen.java index 32fd705..31d1229 100644 --- a/src/org/ibex/classgen/MethodGen.java +++ b/src/org/ibex/classgen/MethodGen.java @@ -276,14 +276,14 @@ public class MethodGen implements CGConst { if(arg instanceof Long || arg instanceof Double) op = LDC2_W; break; case INVOKEINTERFACE: { - MethodRef mr = (MethodRef)arg; - if(arg instanceof MethodRef) arg = new MethodRef.I(mr.klass, mr.name, mr.returnType, mr.argTypes); break; } } int opdata = OP_DATA[op&0xff]; - if((opdata&OP_CPENT_FLAG) != 0 && !(arg instanceof CPGen.Ent)) - arg = cp.add(arg); + if((opdata&OP_CPENT_FLAG) != 0 && !(arg instanceof CPGen.Ent)) { + if (op==INVOKEINTERFACE) arg = cp.add(arg, true); + else arg = cp.add(arg); + } else if((opdata&OP_VALID_FLAG) == 0) throw new IllegalArgumentException("unknown bytecode"); this.op[pos] = op;