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