Ocaml_typing.Vicuna_value_shapesThis file defines a representation of the runtime shapes of OCaml values. These shapes are different from (and unrelated to) the shapes defined in typing/shape.mli.
type value_shape = | Valueanything of C type value
| Immimmediate, tagged with a one at the end
*)| Nativeintblock of a native word integer, e.g., 64-bit integer on amd64 target
*)| Doubleblock of a native double
*)| Int64block of a 64-bit integer
*)| Int32block of a 32-bit integer
*)| Stringblock of a char pointer with a size, representing both Bytes.t and String.t
*)| FloatArrayblock containing native doubles
*)| Block of (int * value_shape list) optionBlock whose tag is below no-scan tag (i.e., a normal ocaml block value). If the argment is None, then the block could have any tag and any elements. If the argument is Some (t, shs), then t is the tag of the block and shs contains the shapes of its fields. In the case of Some (t, shs), the number of fields is known statically (i.e., the length of the list shs).
To represent arrays (which are blocks with tag 0 at run time, but whose size is not statically known), there is a separate construtor, Array sh, which keeps track of the shapes of the elements.
| Array of value_shapeBlock with tag 0 and a fixed size (not known statically). The shape of the elements is given by the argument.
*)| ClosureBlock with closure tag.
*)| ObjBlock with object tag.
*)| Or of value_shape * value_shapeDisjunction between two shapes for, e.g., variant types.
*)type extfun_desc = {shape : fn_value_shapes option;If the shape is not present, then we fallback on the arity of the C code.
*)}An extfun_desc describes the information that we know about an external function. To enable extensions in the future, we define it as a record of options. This enables adding new, optional fields in the future without breaking the serialized form.
val print_extfuns : Format.formatter -> extfuns -> unitval print_extfuns_readable : Format.formatter -> extfuns -> unit