Module Textual.Exp

type call_kind =
  1. | Virtual
  2. | NonVirtual
val equal_call_kind : call_kind -> call_kind -> bool
type t =
  1. | Var of Ident.t
    (*

    pure variable: it is not an lvalue

    *)
  2. | Load of {
    1. exp : t;
    2. typ : Typ.t option;
    }
  3. | Lvar of VarName.t
    (*

    the address of a program variable

    *)
  4. | Field of {
    1. exp : t;
    2. field : qualified_fieldname;
    }
    (*

    field offset

    *)
  5. | Index of t * t
    (*

    an array index offset: exp1[exp2]

    *)
  6. | Const of Const.t
  7. | If of {
    1. cond : BoolExp.t;
    2. then_ : t;
    3. else_ : t;
    }
  8. | Call of {
    1. proc : QualifiedProcName.t;
    2. args : t list;
    3. kind : call_kind;
    4. caller_ret_annots : IR.Annot.Item.t;
      (*

      Annotations the caller has decided about this specific call's return value, independent of any annotations on the callee's procdesc. Defaults to the empty list and is generally only populated by frontends that recover caller-side type information (e.g. Swift recognising Optional<T> at the call site of an unannotated ObjC method). Threaded down to CallFlags.cf_caller_ret_annots by TextualSil.module_to_sil.

      *)
    }
  9. | Closure of {
    1. proc : QualifiedProcName.t;
    2. captured : t list;
    3. params : VarName.t list;
    4. attributes : Attr.t list;
    }
  10. | Apply of {
    1. closure : t;
    2. args : t list;
    }
  11. | Typ of Typ.t
val call_non_virtual : QualifiedProcName.t -> t list -> t
val call_virtual : QualifiedProcName.t -> t -> t list -> t
val call_sig : QualifiedProcName.t -> int -> Lang.t -> ProcSig.t
val allocate_object : TypeName.t -> t
val not : t -> t
val cast : Typ.t -> t -> t
val vars : t -> Ident.Set.t
val is_zero_exp : t -> bool
val is_one_exp : t -> bool
val pp : F.formatter -> t -> unit