projects
/
org.ibex.classgen.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfixes
[org.ibex.classgen.git]
/
src
/
org
/
ibex
/
classgen
/
MethodGen.java
diff --git
a/src/org/ibex/classgen/MethodGen.java
b/src/org/ibex/classgen/MethodGen.java
index
acb6c5c
..
c25c950
100644
(file)
--- a/
src/org/ibex/classgen/MethodGen.java
+++ b/
src/org/ibex/classgen/MethodGen.java
@@
-38,7
+38,7
@@
public class MethodGen implements CGConst {
if (((flags & INTERFACE) != 0) || (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);
+ maxLocals = Math.max(method.getNumArgs() + (flags&STATIC)==0 ? 1 : 0, 4);
}
MethodGen(Type.Class c, DataInput in, ConstantPool cp) throws IOException {
}
MethodGen(Type.Class c, DataInput in, ConstantPool cp) throws IOException {
@@
-480,7
+480,7
@@
public class MethodGen implements CGConst {
int length() { return 12 + targets.length * 4; } // 4bytes/target, hi, lo, default
}
int length() { return 12 + targets.length * 4; } // 4bytes/target, hi, lo, default
}
- public static class Lookup extends Table {
+ public static class Lookup extends Switch {
public final int[] vals;
public Lookup(int size) {
super(size);
public final int[] vals;
public Lookup(int size) {
super(size);