jon.recoil.org

Module Zero_alloc_checker

Check that functions do not allocate on the heap (local allocations are ignored).

Maintains shared state per compilation unit

val reset_unit_info : unit -> unit

Removes all information

val record_unit_info : Stdlib.Format.formatter -> unit

Records the result in Compilenv to be saved to cmx.

module Witness : sig ... end

When the check fails, Witness.t represents an instruction that does not satisfy the property.

module Witnesses : sig ... end
type iter_witnesses = (string -> Zero_alloc_checker.Witnesses.components -> unit) -> unit

Iterate over all function symbols with their witnesses. This function can be called at any time, but the complete information is only available after a call to record_unit_info. To get all witnesses for all functions, and not only for functions annotated with @zero_alloc, set Oxcaml_flags.zero_alloc_checker_details_cutoff to a negative value before calls to fundecl. Used by compiler_hooks.

val is_check_enabled : Cmm.codegen_option list -> string -> Debuginfo.t -> bool