package ocaml-base-compiler

  1. Overview
  2. Docs
type function_label = string
type ustructured_constant =
  1. | Uconst_float of float
  2. | Uconst_int32 of int32
  3. | Uconst_int64 of int64
  4. | Uconst_nativeint of nativeint
  5. | Uconst_block of int * uconstant list
  6. | Uconst_float_array of float list
  7. | Uconst_string of string
  8. | Uconst_closure of ufunction list * string * uconstant list
and uconstant =
  1. | Uconst_ref of string * ustructured_constant option
  2. | Uconst_int of int
and uphantom_defining_expr =
  1. | Uphantom_const of uconstant
    (*

    The phantom-let-bound variable is a constant.

    *)
  2. | Uphantom_var of Backend_var.t
    (*

    The phantom-let-bound variable is an alias for another variable.

    *)
  3. | Uphantom_offset_var of {
    1. var : Backend_var.t;
    2. offset_in_words : int;
    }
    (*

    The phantom-let-bound-variable's value is defined by adding the given number of words to the pointer contained in the given identifier.

    *)
  4. | Uphantom_read_field of {
    1. var : Backend_var.t;
    2. field : int;
    }
    (*

    The phantom-let-bound-variable's value is found by adding the given number of words to the pointer contained in the given identifier, then dereferencing.

    *)
  5. | Uphantom_read_symbol_field of {
    1. sym : string;
    2. field : int;
    }
    (*

    As for Uphantom_read_var_field, but with the pointer specified by a symbol.

    *)
  6. | Uphantom_block of {
    1. tag : int;
    2. fields : Backend_var.t list;
    }
    (*

    The phantom-let-bound variable points at a block with the given structure.

    *)
and ulambda =
  1. | Uvar of Backend_var.t
  2. | Uconst of uconstant
  3. | Udirect_apply of function_label * ulambda list * Debuginfo.t
  4. | Ugeneric_apply of ulambda * ulambda list * Debuginfo.t
  5. | Uclosure of ufunction list * ulambda list
  6. | Uoffset of ulambda * int
  7. | Ulet of Asttypes.mutable_flag * Lambda.value_kind * Backend_var.With_provenance.t * ulambda * ulambda
  8. | Uphantom_let of Backend_var.With_provenance.t * uphantom_defining_expr option * ulambda
  9. | Uletrec of (Backend_var.With_provenance.t * ulambda) list * ulambda
  10. | Uprim of Clambda_primitives.primitive * ulambda list * Debuginfo.t
  11. | Uswitch of ulambda * ulambda_switch * Debuginfo.t
  12. | Ustringswitch of ulambda * (string * ulambda) list * ulambda option
  13. | Ustaticfail of int * ulambda list
  14. | Ucatch of int * (Backend_var.With_provenance.t * Lambda.value_kind) list * ulambda * ulambda
  15. | Utrywith of ulambda * Backend_var.With_provenance.t * ulambda
  16. | Uifthenelse of ulambda * ulambda * ulambda
  17. | Usequence of ulambda * ulambda
  18. | Uwhile of ulambda * ulambda
  19. | Ufor of Backend_var.With_provenance.t * ulambda * ulambda * Asttypes.direction_flag * ulambda
  20. | Uassign of Backend_var.t * ulambda
  21. | Usend of Lambda.meth_kind * ulambda * ulambda * ulambda list * Debuginfo.t
  22. | Uunreachable
and ufunction = {
  1. label : function_label;
  2. arity : int;
  3. params : (Backend_var.With_provenance.t * Lambda.value_kind) list;
  4. return : Lambda.value_kind;
  5. body : ulambda;
  6. dbg : Debuginfo.t;
  7. env : Backend_var.t option;
}
and ulambda_switch = {
  1. us_index_consts : int array;
  2. us_actions_consts : ulambda array;
  3. us_index_blocks : int array;
  4. us_actions_blocks : ulambda array;
}
type function_description = {
  1. fun_label : function_label;
  2. fun_arity : int;
  3. mutable fun_closed : bool;
  4. mutable fun_inline : (Backend_var.With_provenance.t list * ulambda) option;
  5. mutable fun_float_const_prop : bool;
}
type value_approximation =
  1. | Value_closure of function_description * value_approximation
  2. | Value_tuple of value_approximation array
  3. | Value_unknown
  4. | Value_const of uconstant
  5. | Value_global_field of string * int
val compare_structured_constants : ustructured_constant -> ustructured_constant -> int
val compare_constants : uconstant -> uconstant -> int
type usymbol_provenance = {
  1. original_idents : Ident.t list;
  2. module_path : Path.t;
}
type uconstant_block_field =
  1. | Uconst_field_ref of string
  2. | Uconst_field_int of int
type preallocated_block = {
  1. symbol : string;
  2. exported : bool;
  3. tag : int;
  4. fields : uconstant_block_field option list;
  5. provenance : usymbol_provenance option;
}
type preallocated_constant = {
  1. symbol : string;
  2. exported : bool;
  3. definition : ustructured_constant;
  4. provenance : usymbol_provenance option;
}
type with_constants = ulambda * preallocated_block list * preallocated_constant list