private InstructionList restoreFrame(MethodGen method, InstructionHandle handle,
InstructionFactory insFactory, Frame frame, ObjectType objecttype) {
InstructionList insList = new InstructionList();
// restore local variables
LocalVariables lvs = frame.getLocals();
for (int i = lvs.maxLocals() - 1; i >= 0; i--) {
Type type = lvs.get(i);
if (type instanceof BasicType) {
insList.append(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
type = Type.INT;