super(c, in, cp);
local = new Expr[maxLocals];
stack = new Expr[maxStack];
- for(int i=0; i<this.method.getNumArgs(); i++)
- local[i] = new Argument("arg"+i, this.method.getArgType(i));
+ int n=0;
+ if (!isStatic())
+ local[n++] = new Argument("this",method.getDeclaringClass());
+ for(int i=0;i<this.method.getNumArgs(); i++)
+ local[n++] = new Argument("arg"+i, this.method.getArgType(i));
for(int i=0; i<size(); i++) {
int op = get(i);
Object arg = getArg(i);
if (o instanceof Long) return Type.LONG;
if (o instanceof Double) return Type.DOUBLE;
if (o instanceof Float) return Type.FLOAT;
- if (o instanceof ConstantPool.Ent) throw new Error("unimplemented");
- throw new Error("this should not happen");
+ if (o instanceof Integer) return Type.INT;
+ throw new IllegalStateException("unknown constant type");
}
}