--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java 2017-11-03 23:55:52.484032339 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java 2017-11-03 23:55:51.788001192 -0700 @@ -96,6 +96,22 @@ } } + public BinaryOp[] getBinaryOps() { + return new BinaryOp[]{add, sub, mul, mulHigh, umulHigh, div, rem, and, or, xor}; + } + + public UnaryOp[] getUnaryOps() { + return new UnaryOp[]{neg, not, abs, sqrt}; + } + + public ShiftOp[] getShiftOps() { + return new ShiftOp[]{shl, shr, ushr}; + } + + public IntegerConvertOp[] getIntegerConvertOps() { + return new IntegerConvertOp[]{zeroExtend, signExtend, narrow}; + } + public static final ArithmeticOpTable EMPTY = new ArithmeticOpTable(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); public interface ArithmeticOpWrapper { @@ -562,7 +578,10 @@ } /** - * Apply the operation to two {@linkplain Constant Constants}. + * Applies this operation to {@code a} and {@code b}. + * + * @return the result of applying this operation or {@code null} if applying it would raise + * an exception (e.g., {@link ArithmeticException} for dividing by 0) */ public abstract Constant foldConstant(Constant a, Constant b);