|
|
|
@ -73,18 +73,6 @@ module T = struct
|
|
|
|
|
| Ap3 of op3 * Typ.t * t * t * t
|
|
|
|
|
| ApN of opN * Typ.t * t iarray
|
|
|
|
|
[@@deriving compare, equal, hash, sexp]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
include T
|
|
|
|
|
|
|
|
|
|
module Set = struct
|
|
|
|
|
include Set.Make (T)
|
|
|
|
|
include Provide_hash (T)
|
|
|
|
|
include Provide_of_sexp (T)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
module Map = Map.Make (T)
|
|
|
|
|
module Tbl = HashTable.Make (T)
|
|
|
|
|
|
|
|
|
|
let demangle = ref (fun _ -> None)
|
|
|
|
|
|
|
|
|
@ -166,7 +154,20 @@ and pp_record fs elts =
|
|
|
|
|
| _ -> raise_notrace (Invalid_argument "not a string") )
|
|
|
|
|
with
|
|
|
|
|
| s -> Format.fprintf fs "@[<h>%s@]" (String.escaped s)
|
|
|
|
|
| exception _ -> Format.fprintf fs "@[<hv>%a@]" (IArray.pp ",@ " pp) elts
|
|
|
|
|
| exception _ ->
|
|
|
|
|
Format.fprintf fs "@[<hv>%a@]" (IArray.pp ",@ " pp) elts
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
include T
|
|
|
|
|
|
|
|
|
|
module Set = struct
|
|
|
|
|
include Set.Make (T)
|
|
|
|
|
include Provide_hash (T)
|
|
|
|
|
include Provide_of_sexp (T)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
module Map = Map.Make (T)
|
|
|
|
|
module Tbl = HashTable.Make (T)
|
|
|
|
|
|
|
|
|
|
(** Invariant *)
|
|
|
|
|
|
|
|
|
@ -281,18 +282,13 @@ and typ_of exp =
|
|
|
|
|
typ
|
|
|
|
|
[@@warning "-9"]
|
|
|
|
|
|
|
|
|
|
let pp_exp = pp
|
|
|
|
|
|
|
|
|
|
(** Registers are the expressions constructed by [Reg] *)
|
|
|
|
|
module Reg = struct
|
|
|
|
|
include T
|
|
|
|
|
|
|
|
|
|
let pp = pp
|
|
|
|
|
|
|
|
|
|
module Set = struct
|
|
|
|
|
include Set
|
|
|
|
|
|
|
|
|
|
let pp = Set.pp pp_exp
|
|
|
|
|
include Provide_pp (T)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
let invariant x =
|
|
|
|
@ -313,12 +309,9 @@ end
|
|
|
|
|
module Global = struct
|
|
|
|
|
include T
|
|
|
|
|
|
|
|
|
|
let pp = pp
|
|
|
|
|
|
|
|
|
|
module Set = struct
|
|
|
|
|
include Set
|
|
|
|
|
|
|
|
|
|
let pp = Set.pp pp_exp
|
|
|
|
|
include Provide_pp (T)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
let invariant x =
|
|
|
|
@ -339,7 +332,6 @@ end
|
|
|
|
|
module Function = struct
|
|
|
|
|
include T
|
|
|
|
|
|
|
|
|
|
let pp = pp
|
|
|
|
|
let name = function Function x -> x.name | r -> violates invariant r
|
|
|
|
|
let typ = function Function x -> x.typ | r -> violates invariant r
|
|
|
|
|
|
|
|
|
|