X-Git-Url: http://git.megacz.com/?p=org.ibex.classgen.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FClassFile.java;h=2a755f0be09240394129b44776fcf08993403e92;hp=f70ed48b37c02e7183394a3449175b5bf57547e1;hb=76a1336320be6b7dbae29acd341659ed648f9487;hpb=e2310783b3b5cf06044d90387938209726054980 diff --git a/src/org/ibex/classgen/ClassFile.java b/src/org/ibex/classgen/ClassFile.java index f70ed48..2a755f0 100644 --- a/src/org/ibex/classgen/ClassFile.java +++ b/src/org/ibex/classgen/ClassFile.java @@ -13,7 +13,7 @@ public class ClassFile implements CGConst { final int flags; private final Vector fields = new Vector(); - private final Vector methods = new Vector(); + public final Vector methods = new Vector(); private final AttrGen attributes; @@ -86,7 +86,7 @@ public class ClassFile implements CGConst { @see CGConst */ public final MethodGen addMethod(String name, Type ret, Type[] args, int flags) { - MethodGen mg = new MethodGen(this.getType(), name, ret, args, flags, (this.flags & INTERFACE) != 0); + MethodGen mg = new MethodGen(getType().method(name, ret, args), flags); methods.addElement(mg); return mg; } @@ -199,7 +199,8 @@ public class ClassFile implements CGConst { } } - ClassFile(DataInput i) throws IOException { + ClassFile(DataInput i) throws IOException { this(i, false); } + ClassFile(DataInput i, boolean ssa) throws IOException { int magic = i.readInt(); if (magic != 0xcafebabe) throw new ClassReadExn("invalid magic: " + Long.toString(0xffffffffL & magic, 16)); minor = i.readShort(); @@ -215,7 +216,9 @@ public class ClassFile implements CGConst { int numFields = i.readShort(); for(int j=0; j