projects
/
org.ibex.classgen.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eliminated MethodRef.I
[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
32fd705
..
31d1229
100644
(file)
--- 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: {
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];
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;
else if((opdata&OP_VALID_FLAG) == 0)
throw new IllegalArgumentException("unknown bytecode");
this.op[pos] = op;