if (type instanceof BasicType) {
if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
type = Type.INT;
}
insList.append(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
insList.append(new SWAP()); // TODO: check for types with two words on stack
insList.append(insFactory.createInvoke(STACK_CLASS, getPushMethod(type), Type.VOID, new Type[]{type}, Constants.INVOKEVIRTUAL));
} else if (type == null) {
insList.append(InstructionConstants.POP);
} else if (type instanceof UninitializedObjectType) {
// After the remove of new, there shouldn't be a
// uninitialized object on the stack
} else if (type instanceof ReferenceType) {
insList.append(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
insList.append(new SWAP());
insList.append(insFactory.createInvoke(STACK_CLASS, getPushMethod(Type.OBJECT), Type.VOID, new Type[]{Type.OBJECT}, Constants.INVOKEVIRTUAL));
}
}
// add isCapturing test
insList.insert(new IFEQ(handle.getNext()));