Class OptimizedAssumption
java.lang.Object
com.oracle.truffle.api.impl.AbstractAssumption
com.oracle.truffle.runtime.OptimizedAssumption
- All Implemented Interfaces:
com.oracle.truffle.api.Assumption,jdk.vm.ci.meta.JavaKind.FormatWithToString
public final class OptimizedAssumption
extends com.oracle.truffle.api.impl.AbstractAssumption
implements jdk.vm.ci.meta.JavaKind.FormatWithToString
An assumption that when invalidated will cause all
registered dependencies to be invalidated.
-
Field Summary
Fields inherited from class com.oracle.truffle.api.impl.AbstractAssumption
isValid, nameFields inherited from interface com.oracle.truffle.api.Assumption
ALWAYS_VALID, NEVER_VALID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck()intGets the number of dependencies registered with this assumption.voidvoidinvalidate(String message) booleanisValid()Consumer<com.oracle.truffle.compiler.OptimizedAssumptionDependency> Registers some dependent code with this assumption.voidRemoves all invalid dependencies.Methods inherited from class com.oracle.truffle.api.impl.AbstractAssumption
getName, toString
-
Constructor Details
-
OptimizedAssumption
-
-
Method Details
-
check
public void check() throws com.oracle.truffle.api.nodes.InvalidAssumptionException- Specified by:
checkin interfacecom.oracle.truffle.api.Assumption- Throws:
com.oracle.truffle.api.nodes.InvalidAssumptionException
-
invalidate
public void invalidate()- Specified by:
invalidatein interfacecom.oracle.truffle.api.Assumption
-
invalidate
- Specified by:
invalidatein interfacecom.oracle.truffle.api.Assumption
-
removeDeadDependencies
public void removeDeadDependencies()Removes all invalid dependencies. -
countDependencies
public int countDependencies()Gets the number of dependencies registered with this assumption. -
registerDependency
Registers some dependent code with this assumption. As the dependent code may not yet be available, aConsumeris returned that must be notified when the code becomes available. If there is an error while compiling or installing the code, the returned consumer must be called with anullargument. If this assumption is already invalid, thennullis returned in which case the caller (e.g., the compiler) must ensure the dependent code is never executed. -
isValid
public boolean isValid()- Specified by:
isValidin interfacecom.oracle.truffle.api.Assumption
-