X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FMethodGen.java;h=96193daf9f3006382fbd2769c970ab143ad1d5cb;hp=3e8571d4131621e7f4b7e7b3482ed0b85b5d8e33;hb=0f4dbf22cb4e40d2f9cdedfb40b6e31647781b75;hpb=e2310783b3b5cf06044d90387938209726054980 diff --git a/src/org/ibex/classgen/MethodGen.java b/src/org/ibex/classgen/MethodGen.java index 3e8571d..96193da 100644 --- a/src/org/ibex/classgen/MethodGen.java +++ b/src/org/ibex/classgen/MethodGen.java @@ -104,7 +104,7 @@ public class MethodGen implements CGConst { } } - MethodGen(Type.Class c, DataInput in, ConstantPool cp, boolean ownerInterface) throws IOException { + MethodGen(Type.Class c, DataInput in, ConstantPool cp) throws IOException { this.flags = in.readShort(); if ((flags & ~VALID_METHOD_FLAGS) != 0) throw new ClassFile.ClassReadExn("invalid flags"); String name = cp.getUtf8KeyByIndex(in.readShort()); @@ -294,15 +294,15 @@ public class MethodGen implements CGConst { return map; } - MethodGen(Type.Class c, String name, Type ret, Type[] args, int flags, boolean ownerInterface) { + MethodGen(Type.Class.Method method, int flags) { if ((flags & ~VALID_METHOD_FLAGS) != 0) throw new IllegalArgumentException("invalid flags"); - this.method = c.method(name, ret, args); + this.method = method; this.flags = flags; attrs = new ClassFile.AttrGen(); codeAttrs = new ClassFile.AttrGen(); - if(ownerInterface || (flags & (ABSTRACT|NATIVE)) != 0) size = capacity = -1; + if (((flags & INTERFACE) != 0) || (flags & (ABSTRACT|NATIVE)) != 0) size = capacity = -1; maxLocals = Math.max(args.length + (flags&STATIC)==0 ? 1 : 0, 4); }