Module Slot_offsets.Layout
Offsets & Layouts
type slot = private | Value_slot of {size : Flambda2_simplify_shared.Slot_offsets.words;is_scanned : bool;value_slot : Flambda2_identifiers.Value_slot.t;
}| Infix_header| Function_slot of {size : Flambda2_simplify_shared.Slot_offsets.words;function_slot : Flambda2_identifiers.Function_slot.t;last_function_slot : bool;
}
Layout slots, aka what might be found in a block at a given offset. A layout slot can take up more than one word of memory (this is the case for closures, which can take either 2 or 3 words depending on arity).
type t = private {startenv : Flambda2_simplify_shared.Slot_offsets.words;empty_env : bool;slots : (Flambda2_simplify_shared.Slot_offsets.words * Flambda2_simplify_shared.Slot_offsets.Layout.slot) list;
}Alias for complete layouts. The list is sorted according to offsets (in increasing order).
val make :
Flambda2_simplify_shared.Exported_offsets.t ->
_ Flambda2_identifiers.Function_slot.Lmap.t ->
_ Flambda2_identifiers.Value_slot.Map.t ->
Flambda2_simplify_shared.Slot_offsets.Layout.tOrder the given function slots and env vars into a list of layout slots together with their respective offset. Note that there may be holes between the offsets.
val print :
Stdlib.Format.formatter ->
Flambda2_simplify_shared.Slot_offsets.Layout.t ->
unitPrinting function for layouts.
val print_slot :
Stdlib.Format.formatter ->
Flambda2_simplify_shared.Slot_offsets.Layout.slot ->
unitPrinting functions for layout slots.