jon.recoil.org

Module Flambda2_terms.Static_const

Language terms that represent statically-allocated values, bound to symbols.

type t = private
  1. | Set_of_closures of Flambda2_terms.Set_of_closures.t
  2. | Block of Flambda2_kinds.Tag.Scannable.t * Flambda2_terms.Mutability.t * Flambda2_kinds.Flambda_kind.Scannable_block_shape.t * Flambda2_term_basics.Simple.With_debuginfo.t list
  3. | Boxed_float32 of Flambda2_numbers.Numeric_types.Float32_by_bit_pattern.t Flambda2_term_basics.Or_variable.t
  4. | Boxed_float of Flambda2_numbers.Numeric_types.Float_by_bit_pattern.t Flambda2_term_basics.Or_variable.t
  5. | Boxed_int32 of Stdlib.Int32.t Flambda2_term_basics.Or_variable.t
  6. | Boxed_int64 of Stdlib.Int64.t Flambda2_term_basics.Or_variable.t
  7. | Boxed_nativeint of Flambda2_numbers.Targetint_32_64.t Flambda2_term_basics.Or_variable.t
  8. | Boxed_vec128 of Flambda2_numbers.Vector_types.Vec128.Bit_pattern.t Flambda2_term_basics.Or_variable.t
  9. | Boxed_vec256 of Flambda2_numbers.Vector_types.Vec256.Bit_pattern.t Flambda2_term_basics.Or_variable.t
  10. | Boxed_vec512 of Flambda2_numbers.Vector_types.Vec512.Bit_pattern.t Flambda2_term_basics.Or_variable.t
  11. | Immutable_float_block of Flambda2_numbers.Numeric_types.Float_by_bit_pattern.t Flambda2_term_basics.Or_variable.t list
  12. | Immutable_float_array of Flambda2_numbers.Numeric_types.Float_by_bit_pattern.t Flambda2_term_basics.Or_variable.t list
  13. | Immutable_float32_array of Flambda2_numbers.Numeric_types.Float32_by_bit_pattern.t Flambda2_term_basics.Or_variable.t list
  14. | Immutable_int_array of Flambda2_numbers.Target_ocaml_int.t Flambda2_term_basics.Or_variable.t list
  15. | Immutable_int8_array of Flambda2_numbers.Numeric_types.Int8.t Flambda2_term_basics.Or_variable.t list
  16. | Immutable_int16_array of Flambda2_numbers.Numeric_types.Int16.t Flambda2_term_basics.Or_variable.t list
  17. | Immutable_int32_array of Stdlib.Int32.t Flambda2_term_basics.Or_variable.t list
  18. | Immutable_int64_array of Stdlib.Int64.t Flambda2_term_basics.Or_variable.t list
  19. | Immutable_nativeint_array of Flambda2_numbers.Targetint_32_64.t Flambda2_term_basics.Or_variable.t list
  20. | Immutable_vec128_array of Flambda2_numbers.Vector_types.Vec128.Bit_pattern.t Flambda2_term_basics.Or_variable.t list
  21. | Immutable_vec256_array of Flambda2_numbers.Vector_types.Vec256.Bit_pattern.t Flambda2_term_basics.Or_variable.t list
  22. | Immutable_vec512_array of Flambda2_numbers.Vector_types.Vec512.Bit_pattern.t Flambda2_term_basics.Or_variable.t list
  23. | Immutable_value_array of Flambda2_term_basics.Simple.With_debuginfo.t list
    (*

    Immutable_*_array constructors always have at least one field. For empty arrays, Empty_array must be used.

    *)
  24. | Empty_array of Flambda2_term_basics.Empty_array_kind.t
    (*

    Empty_array must specify the kind of the empty array. Arrays of unboxed numbers such as int32 and int64 have a slightly different representation (currently using custom blocks) from regular arrays of values. This affects all operations, most importantly the computation of the length of the array.

    *)
  25. | Mutable_string of {
    1. initial_value : string;
    }
  26. | Immutable_string of string

The static structure of a symbol, possibly with holes, ready to be filled with values computed at runtime.

include Flambda2_algorithms.Container_types.S with type t := Flambda2_terms.Static_const.t
include Flambda2_algorithms.Container_types_intf.Thing with type t := Flambda2_terms.Static_const.T.t
include Stdlib.Hashtbl.HashedType with type t := Flambda2_terms.Static_const.T.t

The equality predicate used to compare keys.

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Stdlib.Map.OrderedType with type t := Flambda2_terms.Static_const.T.t

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

include Flambda2_nominal.Contains_names.S with type t := Flambda2_terms.Static_const.t

Compute the free names of a term. Such computation covers all kinds of bindable names (variables, continuations, ...)

Apply a renaming throughout a term.

include Flambda2_nominal.Contains_ids.S with type t := Flambda2_terms.Static_const.t

Gather all table identifiers to export them.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

This function can accept empty lists of fields; Empty_array will be produced.

val mutable_string : initial_value:string -> Flambda2_terms.Static_const.t
val immutable_string : string -> Flambda2_terms.Static_const.t
val is_block : Flambda2_terms.Static_const.t -> bool
val is_set_of_closures : Flambda2_terms.Static_const.t -> bool
val is_fully_static : Flambda2_terms.Static_const.t -> bool
val can_share : Flambda2_terms.Static_const.t -> bool