Package com.oracle.truffle.api.utilities
Class UnionAssumption
java.lang.Object
com.oracle.truffle.api.utilities.UnionAssumption
- All Implemented Interfaces:
Assumption
An assumption that combines two other assumptions. A check on this assumption checks both of the
child assumptions.
-
Constructor Summary
ConstructorsConstructorDescriptionUnionAssumption(Assumption first, Assumption second) UnionAssumption(String name, Assumption first, Assumption second) -
Method Summary
-
Constructor Details
-
UnionAssumption
-
UnionAssumption
-
-
Method Details
-
check
Description copied from interface:AssumptionChecks that this assumption is still valid. The method throws an exception, if this is no longer the case. This method is preferred over theAssumption.isValid()method when writing guest language interpreter code. The catch block should perform a node rewrite (seeNode.replace(Node)) with a node that no longer relies on the assumption.- Specified by:
checkin interfaceAssumption- Throws:
InvalidAssumptionException- If the assumption is no longer valid.
-
invalidate
public void invalidate()Description copied from interface:AssumptionInvalidates this assumption. Performs no operation, if the assumption is already invalid.- Specified by:
invalidatein interfaceAssumption
-
getName
Description copied from interface:AssumptionA name for the assumption that is used for debug output.- Specified by:
getNamein interfaceAssumption- Returns:
- the name of the assumption
-
isValid
public boolean isValid()Description copied from interface:AssumptionChecks whether the assumption is still valid.- Specified by:
isValidin interfaceAssumption- Returns:
- a boolean value indicating the validity of the assumption
-