projects
/
org.ibex.classgen.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ok, really added JSSA
[org.ibex.classgen.git]
/
src
/
org
/
ibex
/
classgen
/
ClassFile.java
diff --git
a/src/org/ibex/classgen/ClassFile.java
b/src/org/ibex/classgen/ClassFile.java
index
2cd4d5f
..
2a755f0
100644
(file)
--- 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();
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;
private final AttrGen attributes;
@@
-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();
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<numFields; j++) fields.addElement(new FieldGen(i, cp));
int numMethods = i.readShort();
int numFields = i.readShort();
for(int j=0; j<numFields; j++) fields.addElement(new FieldGen(i, cp));
int numMethods = i.readShort();
- for(int j=0; j<numMethods; j++) methods.addElement(new MethodGen(this.getType(), i, cp));
+ for(int j=0; j<numMethods; j++) methods.addElement(ssa
+ ? new JSSA(this.getType(), i, cp)
+ : new MethodGen(this.getType(), i, cp));
attributes = new AttrGen(i, cp);
// FEATURE: Support these
attributes = new AttrGen(i, cp);
// FEATURE: Support these