Module Jkind.Builtin

This jkind is the top of the jkind lattice. All types have jkind any. But we cannot compile run-time manipulations of values of types with jkind any.

Value of types of this jkind are not retained at all at runtime

This is the jkind of normal ocaml values

val immutable_data : why:History.value_creation_reason -> 'd Types.jkind

This is suitable for records or variants without mutable fields.

val sync_data : why:History.value_creation_reason -> 'd Types.jkind

This is suitable for records or variants with atomically mutable fields.

val mutable_data : why:History.value_creation_reason -> 'd Types.jkind

This is suitable for records or variants with mutable fields.

We know for sure that values of types of this jkind are always immediate

val immediate_or_null : why:History.immediate_or_null_creation_reason -> 'd Types.jkind

Values of types of this jkind are either immediate or null pointers

Build a jkind of unboxed products, from a list of types with their layouts. Errors if zero inputs are given.

Precondition: both input lists are the same length.

This returns an jkind_l simply as a matter of convenience; it can be generalized if need be.

The resulting jkind has quality Best, because all the components of the product are represented in the with-bounds.

val product_of_sorts : why:History.product_creation_reason -> level:int -> int -> Types.jkind_l

Build a jkind of unboxed products, given only an arity. This jkind will not mode-cross (and has kind Not_best accordingly), even though unboxed products generally should. This is useful when creating an initial jkind in Typedecl.