jon.recoil.org

Module Lambda_utils.Primitive

Expose functions to construct Lambda calls to primitives; some of their arguments have been given labels, but otherwise they mirror the primitives exactly

val make_vect : loc:Lambda.scoped_location -> length:Lambda.lambda -> init:Lambda.lambda -> Lambda.lambda

make_vect ~length ~init calls the caml_make_vect C primitive, which creates an array of the given length containing that many copies of the given initial value

val make_float_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

make_float_vect len calls the caml_make_float_vect C primitive, which creates an unboxed float array of length len whose contents are uninitialized

val make_unboxed_float32_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

Like make_float_vect but for unboxed float32 arrays.

val make_untagged_int_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

Like make_float_vect but for untagged int arrays.

val make_untagged_int8_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

Like make_float_vect but for untagged int8 arrays.

val make_untagged_int16_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

Like make_float_vect but for untagged int16 arrays.

val make_unboxed_int32_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

Like make_float_vect but for unboxed int32 arrays.

val make_unboxed_int64_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

Like make_float_vect but for unboxed int64 arrays.

val make_unboxed_nativeint_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

Like make_float_vect but for unboxed nativeint arrays.

val make_unboxed_vec128_vect : loc:Lambda.scoped_location -> Lambda.lambda -> Lambda.lambda

Like make_float_vect but for unboxed vec128 arrays.

array_append a1 a2 calls the caml_array_append C primitive, which creates a new array by appending a1 and a2

val array_sub : loc:Lambda.scoped_location -> Lambda.lambda -> offset:Lambda.lambda -> length:Lambda.lambda -> Lambda.lambda

array_sub a ~offset ~length calls the caml_array_sub C primitive, which creates a new subarray corresponding to the subarray of a starting at the given offset with the given length