forked from ocaml-flambda/flambda-backend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgeneric_fns.mli
66 lines (47 loc) · 1.89 KB
/
generic_fns.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Copyright 2023 Jane Street Group *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
module Partition : sig
type t
module Set : Stdlib.Set.S with type elt = t
val to_cu : t -> Compilation_unit.t
val to_string : t -> string
val name : t -> string
end
(** Generate generic functions *)
module Tbl : sig
type t
val make : unit -> t
val add :
imports:Partition.Set.t -> t -> Cmx_format.generic_fns -> Partition.Set.t
val of_fns : Cmx_format.generic_fns -> t
val entries : t -> Cmx_format.generic_fns
end
module Cache : sig
type send =
Cmm.machtype_component array list
* Cmm.machtype_component array
* Cmx_format.alloc_mode
type apply =
Cmm.machtype_component array list
* Cmm.machtype_component array
* Cmx_format.alloc_mode
type curry =
Lambda.function_kind
* Cmm.machtype_component array list
* Cmm.machtype_component array
val mem_send : send -> bool
val mem_apply : apply -> bool
val mem_curry : curry -> bool
val all : unit -> (Partition.t, Tbl.t) Hashtbl.t
end
val compile : shared:bool -> Tbl.t -> Cmm.phrase list
val imported_units : Partition.Set.t -> Compilation_unit.t list