Module Flambda2_simplify_shared.Exported_offsets
type function_slot_info = | Dead_function_slot| Live_function_slot of {offset : Flambda2_simplify_shared.Exported_offsets.words;size : Flambda2_simplify_shared.Exported_offsets.words;
}
type value_slot_info = | Dead_value_slot| Live_value_slot of {offset : Flambda2_simplify_shared.Exported_offsets.words;size : Flambda2_simplify_shared.Exported_offsets.words;is_scanned : bool;
}
val empty : Flambda2_simplify_shared.Exported_offsets.tThe empty environment
val print :
Stdlib.Format.formatter ->
Flambda2_simplify_shared.Exported_offsets.t ->
unitPrinting function for environment.
val value_slot_offset :
Flambda2_simplify_shared.Exported_offsets.t ->
Flambda2_identifiers.Value_slot.t ->
Flambda2_simplify_shared.Exported_offsets.value_slot_info optionReturns 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.
val function_slot_offset :
Flambda2_simplify_shared.Exported_offsets.t ->
Flambda2_identifiers.Function_slot.t ->
Flambda2_simplify_shared.Exported_offsets.function_slot_info optionReturns 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 add_function_slot_offset :
Flambda2_simplify_shared.Exported_offsets.t ->
Flambda2_identifiers.Function_slot.t ->
Flambda2_simplify_shared.Exported_offsets.function_slot_info ->
Flambda2_simplify_shared.Exported_offsets.tRecord the assignment of the given offset to the given function slot
val add_value_slot_offset :
Flambda2_simplify_shared.Exported_offsets.t ->
Flambda2_identifiers.Value_slot.t ->
Flambda2_simplify_shared.Exported_offsets.value_slot_info ->
Flambda2_simplify_shared.Exported_offsets.tRecord the assignment of the given offset to the given value slot
val map_function_slot_offsets :
Flambda2_simplify_shared.Exported_offsets.t ->
(Flambda2_identifiers.Function_slot.t ->
Flambda2_simplify_shared.Exported_offsets.function_slot_info ->
'a) ->
'a Flambda2_identifiers.Function_slot.Map.tval map_value_slot_offsets :
Flambda2_simplify_shared.Exported_offsets.t ->
(Flambda2_identifiers.Value_slot.t ->
Flambda2_simplify_shared.Exported_offsets.value_slot_info ->
'a) ->
'a Flambda2_identifiers.Value_slot.Map.tBuild maps from the underlying data
val import_offsets : Flambda2_simplify_shared.Exported_offsets.t -> unitTake the offsets read from a cmx file and add them to the current state
val imported_offsets : unit -> Flambda2_simplify_shared.Exported_offsets.tReturn all the offsets read from cmx files so far
val merge :
Flambda2_simplify_shared.Exported_offsets.t ->
Flambda2_simplify_shared.Exported_offsets.t ->
Flambda2_simplify_shared.Exported_offsets.tMerge the offsets from two files
val reexport_function_slots :
Flambda2_identifiers.Function_slot.Set.t ->
Flambda2_simplify_shared.Exported_offsets.t ->
Flambda2_simplify_shared.Exported_offsets.tEnsure the offsets for the given function slots are in the given exported offsets.
val reexport_value_slots :
Flambda2_identifiers.Value_slot.Set.t ->
Flambda2_simplify_shared.Exported_offsets.t ->
Flambda2_simplify_shared.Exported_offsets.tEnsure the offsets for the given function slots are in the given exported offsets.