Package-level declarations

Types

Link copied to clipboard

Builder of bindings for all arguments of a function call.

Link copied to clipboard

Parameter-argument pairs of a function call.

Link copied to clipboard
typealias ArgumentConverter = (raw: Any, parameter: FunctionParameter, call: FunctionCall<*>) -> Value<*>

Converts an untyped function call argument to the static type a parameter expects.

Link copied to clipboard
sealed interface ArgumentsBinder

Builder of parameter-argument pairs of a function call. Allows binding each argument to its corresponding parameter, and may throw an exception if some cannot be paired.

Link copied to clipboard

Builder of bindings for the regular (not injected) argument subset of a function call.

Link copied to clipboard
data object Unbound

Marks an argument the call did not supply, as distinct from an explicit .none.

Properties

Link copied to clipboard
const val MAX_ADAPTATION_DEPTH: Int = 8

Upper bound on how many times coerce follows an AdaptableValue chain before giving up, so that a cyclic adaptation cannot hang the compiler.

Functions

Link copied to clipboard
fun argumentTypeMismatch(call: FunctionCall<*>, parameter: FunctionParameter, found: Any?): Nothing

Reports that found cannot satisfy parameter. Public because coerce is inline and has to reach it from generated call sites.

Link copied to clipboard
inline fun <T> coerce(raw: Any, parameter: FunctionParameter, call: FunctionCall<*>, noinline factory: (Any) -> Value<*>?): T

Same as convertArgument, unwrapped to the static type itself.

Link copied to clipboard
inline fun <T> convertArgument(raw: Any, parameter: FunctionParameter, call: FunctionCall<*>, noinline factory: (Any) -> Value<*>?): Value<*>

Converts a function call argument to the static type a parameter expects, keeping it wrapped.

Link copied to clipboard
inline fun <T> invokeGuarded(call: FunctionCall<*>, body: () -> T): T

Runs a generated native function body, attributing any error raised inside it to call.

Link copied to clipboard
Link copied to clipboard