use of org.graalvm.compiler.core.common.type.ArithmeticStamp in project graal by oracle.
the class ReinterpretNode method evalConst.
private static SerializableConstant evalConst(Stamp stamp, SerializableConstant c) {
/*
* We don't care about byte order here. Either would produce the correct result.
*/
ByteBuffer buffer = ByteBuffer.wrap(new byte[c.getSerializedSize()]).order(ByteOrder.nativeOrder());
c.serialize(buffer);
buffer.rewind();
SerializableConstant ret = ((ArithmeticStamp) stamp).deserialize(buffer);
assert !buffer.hasRemaining();
return ret;
}
Aggregations