org.qbicc.graph.UnaryValue Maven / Gradle / Ivy
package org.qbicc.graph;
import org.qbicc.type.ValueType;
/**
* Unary operations.
*/
public interface UnaryValue extends Value {
Value getInput();
default ValueType getType() {
return getInput().getType();
}
default boolean isConstant() {
return getInput().isConstant();
}
default int getValueDependencyCount() {
return 1;
}
default Value getValueDependency(int index) throws IndexOutOfBoundsException {
return index == 0 ? getInput() : Util.throwIndexOutOfBounds(index);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy