}
}
- private void set(int pos, byte op, Object arg) {
+ public void set(int pos, byte op, Object arg) {
int iarg = arg instanceof Integer ? ((Integer)arg).intValue() : -1;
switch(op) {
case FSTORE: case DLOAD: case DSTORE: case ALOAD: case ASTORE:
{
if(iarg >= 0 && iarg <= 3) {
- int base = -1;
+ byte base = 0;
switch(op) {
case ILOAD: base = ILOAD_0; break;
case ISTORE: base = ISTORE_0; break;
case ALOAD: base = ALOAD_0; break;
case ASTORE: base = ASTORE_0; break;
}
- op = (byte)(base + iarg);
+ op = (byte)((base&0xff) + iarg);
} else {
- if(iarg > maxLocals) maxLocals = iarg;
+ if(iarg >= maxLocals) maxLocals = iarg + 1;
}
+ break;
}
case LDC:
if(arg instanceof Integer) { set(pos,op,iarg); return; }
_set(pos,op,arg);
}
- public final void _set(int pos, byte op, Object arg) {
+ private final void _set(int pos, byte op, Object arg) {
if(capacity == -1) throw new IllegalStateException("method can't have code");
if(size == -1) throw new IllegalStateException("method is finalized");
if(!OP_VALID(op)) throw new IllegalArgumentException("unknown bytecode");
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x03, 0x05, 0x13, 0x15, 0x15, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x13, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,