Debian Codegraph @

lib/mlrisc-lib/MLRISC/gc-safety/gc-type-system.sig

raw
1 (*
2 * This signature describes the interface to a gc type system.
3 * This encapsulates everything dealing with GC safety analysis
4 * into one single signature.
5 *)
6 signature GC_TYPE_SYSTEM =
7 sig
8 structure GC : GC_TYPE
9 structure RTL : MLTREE_RTL
10
11 (* Given a RTL expression, return the gc type of the value *)
12 val typeOf : (RTL.T.var -> GC.gctype) -> RTL.exp -> GC.gctype
13
14 (* Given an RTL effect, return the change to gctype *)
15 val effectOf :
16 {lookup : RTL.var -> GC.gctype,
17 update : RTL.var * GC.gctype * 'e -> 'e
18 } ->
19 {action : RTL.rtl,
20 dst : RTL.var list,
21 src : RTL.var list,
22 effect : 'e
23 } -> 'e
24
25 (* Is a type recoverable? *)
26 val isRecoverable : GC.gctype -> bool
27 end