Module IR.Const

The Smallfoot Intermediate Language: Constants

module F = Stdlib.Format
type t =
  1. | Cint of IntLit.t
    (*

    integer constants

    *)
  2. | Cfun of Procname.t
    (*

    function names

    *)
  3. | Cstr of string
    (*

    string constants

    *)
  4. | Cfloat of float
    (*

    float constants

    *)
  5. | Cclass of Ident.name
    (*

    class constant

    *)

Constants

include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val hash_normalize : t -> t
val hash_normalize_opt : t option -> t option
val hash_normalize_list : t list -> t list
val kind_equal : t -> t -> bool

Return true if the constants have the same kind (both integers, ...)

val pp : IStdlib.Pp.env -> F.formatter -> t -> unit

Pretty print a const

val iszero_int_float : t -> bool
val isone_int_float : t -> bool
val isminusone_int_float : t -> bool