Class ConstBootstrapper

java.lang.Object
org.kink_lang.kink.internal.compile.bootstrap.ConstBootstrapper

public final class ConstBootstrapper extends Object
Bootstrapper of constant values.
  • Method Details

    • bootstrapBigDecimal

      public static CallSite bootstrapBigDecimal(MethodHandles.Lookup caller, String name, MethodType type, String decimalStr)
      Bootstrap BigDecimal constant. Avoiding condy because of JDK-8280473.
      Parameters:
      caller - the lookup of the caller.
      name - not used.
      type - ()BigDecimal.
      decimalStr - the source of the decimal.
      Returns:
      the constant call site of the BigDecimal constant.
    • bootstrapNada

      public static CallSite bootstrapNada(MethodHandles.Lookup caller, String name, MethodType type) throws Throwable
      Gets nada. Avoiding condy because of JDK-8280473.
      Parameters:
      caller - the lookup of the caller.
      name - unused.
      type - ()Val.
      Returns:
      a constant call site of nada.
      Throws:
      Throwable - any throwable.
    • bootstrapTrue

      public static CallSite bootstrapTrue(MethodHandles.Lookup caller, String name, MethodType type) throws Throwable
      Bootstarp true. Avoiding condy because of JDK-8280473.
      Parameters:
      caller - the lookup of the caller.
      name - unused.
      type - ()Val.
      Returns:
      a constant call site of true.
      Throws:
      Throwable - any throwable.
    • bootstrapFalse

      public static CallSite bootstrapFalse(MethodHandles.Lookup caller, String name, MethodType type) throws Throwable
      Bootstarp false. Avoiding condy because of JDK-8280473.
      Parameters:
      caller - the lookup of the caller.
      name - unused.
      type - ()Val.
      Returns:
      a constant call site of false.
      Throws:
      Throwable - any throwable.
    • bootstrapStr

      public static CallSite bootstrapStr(MethodHandles.Lookup caller, String name, MethodType type, String string) throws Throwable
      Bootstarp a str. Avoiding condy because of JDK-8280473.
      Parameters:
      caller - the lookup of the caller.
      name - unused.
      type - ()Val.
      string - the string.
      Returns:
      a constant call site of the str.
      Throws:
      Throwable - any throwable.
    • bootstrapNum

      public static CallSite bootstrapNum(MethodHandles.Lookup caller, String name, MethodType type, String decimalStr) throws Throwable
      Bootstarp a num. Avoiding condy because of JDK-8280473.
      Parameters:
      caller - the lookup of the caller.
      name - unused.
      type - ()Val.
      decimalStr - the string representation of BigDecimal.
      Returns:
      a constant call site of the num val.
      Throws:
      Throwable - any throwable.
    • bootstrapPreloaded

      public static CallSite bootstrapPreloaded(MethodHandles.Lookup caller, String name, MethodType type, String sym) throws Throwable
      Bootstarp a preloaded fun. Avoiding condy because of JDK-8280473.
      Parameters:
      caller - the lookup of the caller.
      name - unused.
      type - ()Val.
      sym - the sym of the fun var.
      Returns:
      a constant call site of the fun val.
      Throws:
      Throwable - any throwable.