# HG changeset patch # User Roland Schatz # Date 1418667339 -3600 # Node ID 0a109f5d587362a57f5be18a20185c3394a47bdb # Parent 45f8b94b3b368f7a5e349a1bb3dba74f1784f7b5 Add unwrap method to arithmetic operations. diff -r 45f8b94b3b36 -r 0a109f5d5873 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 Mon Dec 15 18:51:08 2014 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ArithmeticOpTable.java Mon Dec 15 19:15:39 2014 +0100 @@ -354,6 +354,10 @@ * Apply the operation to a {@link Stamp}. */ public abstract Stamp foldStamp(Stamp stamp); + + public UnaryOp unwrap() { + return this; + } } /** @@ -479,6 +483,10 @@ return null; } + public BinaryOp unwrap() { + return this; + } + @Override public String toString() { if (associative) { @@ -506,6 +514,11 @@ public FloatConvert getFloatConvert() { return op; } + + @Override + public FloatConvertOp unwrap() { + return this; + } } public abstract static class IntegerConvertOp extends Op { @@ -538,5 +551,9 @@ public abstract Constant foldConstant(int inputBits, int resultBits, Constant value); public abstract Stamp foldStamp(int inputBits, int resultBits, Stamp stamp); + + public IntegerConvertOp unwrap() { + return this; + } } }