# HG changeset patch # User Roland Schatz # Date 1412071227 -7200 # Node ID 83ebc10fb5e9ff3814129cb1b54cff53c9aba9d0 # Parent 48c91ed917d8a35d1c89d61b570cba72e0c72634 Return empty ArithmeticOpTable for non-arithmetic stamps. diff -r 48c91ed917d8 -r 83ebc10fb5e9 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ArithmeticOpTable.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ArithmeticOpTable.java Tue Sep 30 14:22:10 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ArithmeticOpTable.java Tue Sep 30 12:00:27 2014 +0200 @@ -43,9 +43,15 @@ protected BinaryOp xor; public static ArithmeticOpTable forStamp(Stamp s) { - return ((ArithmeticStamp) s).getOps(); + if (s instanceof ArithmeticStamp) { + return ((ArithmeticStamp) s).getOps(); + } else { + return EMPTY; + } } + public static final ArithmeticOpTable EMPTY = new ArithmeticOpTable(); + /** * Describes the unary negation operation. */