Module Slot_offsets.Layout
Offsets & Layouts
type slot = private | Value_slot of {size : words;is_scanned : bool;value_slot : Flambda2_identifiers.Value_slot.t;
}| Infix_header| Function_slot of {size : 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).
Alias for complete layouts. The list is sorted according to offsets (in increasing order).
val make :
Exported_offsets.t ->
_ Flambda2_identifiers.Function_slot.Lmap.t ->
_ Flambda2_identifiers.Value_slot.Map.t ->
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 : Format.formatter -> t -> unitPrinting function for layouts.
val print_slot : Format.formatter -> slot -> unitPrinting functions for layout slots.