jon.recoil.org

Module Closure_conversion_aux.IR

type simple =
  1. | Var of Ident.t
  2. | Const of Lambda.structured_constant
type trap_action =
  1. | Push of {
    1. exn_handler : Flambda2_identifiers.Continuation.t;
    }
  2. | Pop of {
    1. exn_handler : Flambda2_identifiers.Continuation.t;
    }
type user_visible =
  1. | User_visible
  2. | Not_user_visible
type named =
  1. | Simple of simple
  2. | Get_tag of Ident.t
  3. | Begin_region of {
    1. ghost : bool;
    2. is_try_region : bool;
    3. parent_region : Ident.t option;
    }
  4. | End_region of {
    1. is_try_region : bool;
    2. region : Ident.t;
    3. ghost : bool;
    }
    (*

    Begin_region and End_region are needed because these primitives don't exist in Lambda

    *)
  5. | Prim of {
    1. prim : Lambda.primitive;
    2. args : simple list list;
    3. loc : Lambda.scoped_location;
    4. exn_continuation : exn_continuation option;
    5. region : Ident.t option;
    6. ghost_region : Ident.t option;
    }
type apply_kind =
  1. | Function
  2. | Method of {
    1. kind : Lambda.meth_kind;
    2. obj : simple;
    }
type apply = {
  1. kind : apply_kind;
  2. func : Ident.t;
  3. args : simple list;
  4. continuation : Flambda2_identifiers.Continuation.t;
  5. exn_continuation : exn_continuation;
  6. loc : Lambda.scoped_location;
  7. region_close : Lambda.region_close;
  8. inlined : Lambda.inlined_attribute;
  9. probe : Lambda.probe;
  10. mode : Lambda.locality_mode;
  11. region : Ident.t option;
  12. ghost_region : Ident.t option;
  13. args_arity : [ `Complex ] Flambda2_kinds.Flambda_arity.t;
  14. return_arity : [ `Unarized ] Flambda2_kinds.Flambda_arity.t;
}
type switch = {
  1. numconsts : int;
  2. consts : (int * Flambda2_identifiers.Continuation.t * Debuginfo.t * trap_action option * simple list) list;
  3. failaction : (Flambda2_identifiers.Continuation.t * Debuginfo.t * trap_action option * simple list) option;
}
val print_simple : Format.formatter -> simple -> unit
val print_named : Format.formatter -> named -> unit