jon.recoil.org

Module Flambda2_reaper.Field

type closure_entry_point =
  1. | Unknown_arity_code_pointer
    (*

    Entry point used for an Indirect_unknown_arity call.

    *)
  2. | Known_arity_code_pointer
    (*

    Entry point used for a Direct or Indirect_known_arity call.

    *)
type return_kind =
  1. | Normal of int
  2. | Exn
type view = private
  1. | Block of int * Flambda2_kinds.Flambda_kind.t
  2. | Value_slot of Flambda2_identifiers.Value_slot.t
  3. | Function_slot of Flambda2_identifiers.Function_slot.t
  4. | Call_witness of closure_entry_point
  5. | Is_int
  6. | Get_tag
  7. | Return_of_call of return_kind
  8. | Code_id_of_call_witness
type t
include Flambda2_datalog.Datalog.Column.S with type t := t
val print : Format.formatter -> t -> unit
val datalog_column_id : ('a Map.t, t, 'a) Flambda2_datalog.Datalog.Column.id
val view : t -> view

Constructing fields

Real fields

These are fields that "exist at runtime" in the sense that they can be accessed through primitives.

val block : int -> Flambda2_kinds.Flambda_kind.t -> t
val is_int : t
val get_tag : t

Virtual fields

These fields cannot be accessed through primitives and are used internally by the reaper to model function calls.

val known_arity_call_witness : t
val unknown_arity_call_witness : t
val call_witness : closure_entry_point -> t
val normal_return_of_call : int -> t
val exn_return_of_call : t
val code_id_of_call_witness : t

Inspecting fields

val is_virtual_field : t -> bool

is_virtual_field f returns true if f is a virtual field.

val is_real_field : t -> bool

is_real_field f returns true if f is a real field, i.e. not a virtual field.

val is_value_slot : t -> bool
val is_function_slot : t -> bool
val must_be_function_slot : t -> Flambda2_identifiers.Function_slot.t
val is_local : t -> bool
val print_for_variable_name : Format.formatter -> t -> unit