jon.recoil.org

Module Obj.Uniform_or_mixedSource

Blocks with a nominally scannable tag can still have a suffix of unscanned objects; such a block is "mixed". This contrasts with "uniform" blocks which are either all-scanned or all-unscanned.

Note that this module can return different results for the scannable prefix len of a mixed block in native code vs. bytecode. That's because more fields are scanned in bytecode.

type obj_t := Stdlib.Obj.t
Sourcetype t
Sourcetype repr =
  1. | Uniform
    (*

    The block is tagged as not scannable or the block is tagged as scannable and all fields can be scanned.

    *)
  2. | Mixed of {
    1. scannable_prefix_len : int;
    }
    (*

    The block is tagged as scannable but some fields can't be scanned.

    *)
Sourceval is_uniform : Stdlib.Obj.Uniform_or_mixed.t -> bool

Equivalent to repr returning Uniform.

Equivalent to repr returning Mixed _.

Sourceval mixed_scannable_prefix_len_exn : Stdlib.Obj.Uniform_or_mixed.t -> int

Returns the scannable_prefix_len without materializing the return value of repr. Raises if is_mixed is false.