public static long and(byte op1, long op2) { if (instance.byte_and) { return andSlow(op1, op2); } else { return ((long) op1) & op2; } }
public static double div(byte op1, double op2) { if (instance.byte_div) { return divSlow(op1, op2); } else { return ((double) op1) / op2; } }
public static long intdiv(long op1, byte op2) { if (instance.long_intdiv) { return intdivSlow(op1, op2); } else { return op1 / ((long) op2); } }
public static int mod(byte op1, int op2) { if (instance.byte_mod) { return modSlow(op1, op2); } else { return ((int) op1) % op2; } }
public static int or(byte op1, byte op2) { if (instance.byte_or) { return orSlow(op1, op2); } else { return ((int) op1) | ((int) op2); } }
public static int leftShift(byte op1, short op2) { if (instance.byte_leftShift) { return leftShiftSlow(op1, op2); } else { return ((int) op1) << ((int) op2); } }
public static int multiply(short op1, short op2) { if (instance.short_multiply) { return multiplySlow(op1, op2); } else { return ((int) op1) * ((int) op2); } }
public static double minus(byte op1, float op2) { if (instance.byte_minus) { return minusSlow(op1, op2); } else { return ((double) op1) - ((double) op2); } }
public void checkIfStdMethod(MetaMethod method) { if (method.getClass() != NewInstanceMetaMethod.class) { String name = method.getName(); if (method.getParameterTypes().length != 1) return; if (!method.getParameterTypes()[0].isNumber && method.getParameterTypes()[0].getTheClass() != Object.class) return; if (!NAMES.contains(name)) return; checkNumberOps(name, method.getDeclaringClass().getTheClass()); } }
NumberMathModificationInfo.instance.checkIfStdMethod (method);
public static int mod(short op1, byte op2) { if (instance.short_mod) { return modSlow(op1, op2); } else { return ((int) op1) % ((int) op2); } }
public static long or(long op1, long op2) { if (instance.long_or) { return orSlow(op1, op2); } else { return op1 | op2; } }
public static int leftShift(short op1, int op2) { if (instance.short_leftShift) { return leftShiftSlow(op1, op2); } else { return ((int) op1) << op2; } }
public static long multiply(long op1, byte op2) { if (instance.long_multiply) { return multiplySlow(op1, op2); } else { return op1 * ((long) op2); } }
public static long minus(short op1, long op2) { if (instance.short_minus) { return minusSlow(op1, op2); } else { return ((long) op1) - op2; } }
public void checkIfStdMethod(MetaMethod method) { if (method.getClass() != NewInstanceMetaMethod.class) { String name = method.getName(); if (method.getParameterTypes().length != 1) return; if (!method.getParameterTypes()[0].isNumber && method.getParameterTypes()[0].getTheClass() != Object.class) return; if (!names.contains(name)) return; checkNumberOps(name, method.getDeclaringClass().getTheClass()); } }
public static int mod(short op1, short op2) { if (instance.short_mod) { return modSlow(op1, op2); } else { return ((int) op1) % ((int) op2); } }
public static long or(byte op1, long op2) { if (instance.byte_or) { return orSlow(op1, op2); } else { return ((long) op1) | op2; } }
public static int and(short op1, int op2) { if (instance.short_and) { return andSlow(op1, op2); } else { return ((int) op1) & op2; } }
public static long intdiv(byte op1, long op2) { if (instance.byte_intdiv) { return intdivSlow(op1, op2); } else { return ((long) op1) / op2; } }