public final class OptimizedAssumption
extends com.oracle.truffle.api.impl.AbstractAssumption
| Constructor and Description |
|---|
OptimizedAssumption(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
check() |
int |
countDependencies()
Gets the number of dependencies registered with this assumption.
|
void |
invalidate() |
void |
invalidate(String message) |
boolean |
isValid() |
Consumer<OptimizedAssumptionDependency> |
registerDependency()
Registers some dependent code with this assumption.
|
void |
removeDeadDependencies()
Removes all invalid dependencies.
|
public OptimizedAssumption(String name)
public void check()
throws com.oracle.truffle.api.nodes.InvalidAssumptionException
com.oracle.truffle.api.nodes.InvalidAssumptionExceptionpublic void invalidate()
public void invalidate(String message)
public void removeDeadDependencies()
public int countDependencies()
public Consumer<OptimizedAssumptionDependency> registerDependency()
Consumer is 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 a
null argument.
If this assumption is already invalid, then null is returned in which case the caller
(e.g., the compiler) must ensure the dependent code is never executed.public boolean isValid()