Debian Codegraph @

lib/mlrisc-lib/MLRISC/gc-safety/gc-gen.sig

raw
1 (*
2 * This module is reponsible for generating garbage collection
3 * code for all gc-points in the program. That is, we delay the generation
4 * of garbage collection code until all optimizations have been performed.
5 * A callback is invoked at all GC safe-points with the appropriate type
6 * information. The callback is responsible for generating the appropriate
7 * code to save and restore all roots and call the garbage collector.
8 *)
9 signature GC_CALLBACK =
10 sig
11 structure C : CELLS
12 structure GC : GC_TYPE
13 structure T : MLTREE
14 val callgcCallback :
15 { id : int, (* basic block id *)
16 msg : string, (* some auxiliary text *)
17 gcLabel : Label.label, (* label of gc block *)
18 returnLabel : Label.label, (* label of return block *)
19 roots : (C.cell * GC.gctype) list, (* root set *)
20 stream : (T.stm,T.mlrisc list) T.stream
21 (* code generator *)
22 } -> unit
23 end