Package com.oracle.truffle.api.utilities
Class BranchProfile
- java.lang.Object
-
- com.oracle.truffle.api.nodes.NodeCloneable
-
- com.oracle.truffle.api.utilities.BranchProfile
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class BranchProfile extends NodeCloneable
Utility class to speculate on branches to be never visited. If theenter()
method is invoked first the optimized code is invalidated and the branch whereenter()
is invoked is enabled for compilation. Otherwise if theenter()
method was never invoked the branch will not get compiled. AllBranchProfile
instances must be held infinal
fields for compiler optimizations to take effect.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BranchProfile
create()
void
enter()
boolean
isVisited()
java.lang.String
toString()
-
Methods inherited from class com.oracle.truffle.api.nodes.NodeCloneable
clone
-
-
-
-
Method Detail
-
enter
public void enter()
-
isVisited
public boolean isVisited()
-
create
public static BranchProfile create()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-