jon.recoil.org

Module Flambda2_simplify_shared.Exported_offsets

type t

Public state to store the mapping from elements of a closure to offset.

type words = int
type function_slot_info =
  1. | Dead_function_slot
  2. | Live_function_slot of {
    1. offset : Flambda2_simplify_shared.Exported_offsets.words;
    2. size : Flambda2_simplify_shared.Exported_offsets.words;
    }
type value_slot_info =
  1. | Dead_value_slot
  2. | Live_value_slot of {
    1. offset : Flambda2_simplify_shared.Exported_offsets.words;
    2. size : Flambda2_simplify_shared.Exported_offsets.words;
    3. is_scanned : bool;
    }

The empty environment

Printing function for environment.

Returns the offset computed for a value slot, in terms of target architecture words.

If None is returned, there is no set of closures in the program containing the given value slot.

Returns the offset computed for a function slot, in terms of target architecture words.

This points to the first field of the representation of the function slot within the Closure_tag block. Notably, if the offset is not 0, an infix header must be placed just before the returned offset.

If None is returned, there is no set of closures in the program containing the given function slot.

val import_offsets : Flambda2_simplify_shared.Exported_offsets.t -> unit

Take the offsets read from a cmx file and add them to the current state

val imported_offsets : unit -> Flambda2_simplify_shared.Exported_offsets.t

Return all the offsets read from cmx files so far

Ensure the offsets for the given function slots are in the given exported offsets.

Ensure the offsets for the given function slots are in the given exported offsets.