/** * Creates a stack manipulation for loading a {@code float} value onto the operand stack. * <p> </p> * This is achieved either by invoking a specific opcode, if any, or by creating a constant pool entry. * * @param value The {@code float} value to load onto the stack. * @return A stack manipulation for loading the given {@code float} value. */ public static StackManipulation forValue(float value) { if (value == 0f) { return ZERO; } else if (value == 1f) { return ONE; } else if (value == 2f) { return TWO; } else { return new ConstantPool(value); } }