Module org.kink_lang.kink
Class ConstBootstrapper
java.lang.Object
org.kink_lang.kink.internal.compile.bootstrap.ConstBootstrapper
Bootstrapper of constant values.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CallSitebootstrapFalse(MethodHandles.Lookup caller, String name, MethodType type) Bootstarp false.static CallSitebootstrapNada(MethodHandles.Lookup caller, String name, MethodType type) Gets nada.static CallSitebootstrapNum(MethodHandles.Lookup caller, String name, MethodType type, String decimalStr) Bootstarp a num.static CallSitebootstrapPreloaded(MethodHandles.Lookup caller, String name, MethodType type, String sym) Bootstarp a preloaded fun.static CallSitebootstrapStr(MethodHandles.Lookup caller, String name, MethodType type, String string) Bootstarp a str.static CallSitebootstrapTrue(MethodHandles.Lookup caller, String name, MethodType type) Bootstarp true.
-
Method Details
-
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.
-