com.oracle.truffle.api.utilities
Various utility classes that aim to make the development of TruffleLanguage guest languages easier.
We try to capture common language patterns in this package. Here is an overview of patterns that we have captured so far:
AssumedValuespeculates on global values to remain unchanged.CyclicAssumptionspeculates on assumptions that might invalidate more often but are assumed to stabilize over time.
Classes
public class AssumedValueA value that the compiler can assume is constant, but can be changed by invalidation.
public class CyclicAssumptionHolds an
Assumption, and knows how to recreate it with the same properties on invalidation.public final class FinalBitSetRead-only bitset designed for partial evaluation.
public final class JSONHelperdeprecatedHelper function that allows to dump the AST during creation to a JSON format.
public static final class .JSONArrayBuilderNo description.
public static final class .JSONObjectBuilderNo description.
public abstract static class .JSONStringBuilderNo description.
public final class MathUtilsThis class contains mathematical methods that are not already provided by
Maththat are generally useful for language implementations.public final class TruffleWeakReferenceCreates a new weak reference that is safe to be used in compiled code paths.
Enums
public enum TriStateAn utility value with three states,
TRUE,FALSE, andUNDEFINED.