insList.insert(insFactory.createInvoke(STACK_CLASS, getPopMethod(Type.INT), Type.INT, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
insList.insert(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
// test if the continuation should be restored
insList.insert(new IFEQ(firstIns));
insList.insert(insFactory.createInvoke(CONTINUATION_CLASS, RESTORING_METHOD, Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));
}
// get stack from current continuation and store in the last local variable
insList.insert(InstructionFactory.createStore(STACK_TYPE, method.getMaxLocals()+1));