Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / mini / mini-gc.h
1 /**
2  * \file
3  */
4
5 #ifndef __MONO_MINI_GC_H__
6 #define __MONO_MINI_GC_H__
7
8 #include "mini.h"
9
10 /*
11  * The GC type of a stack slot or register.
12  * This can change through the method as follows:
13  * - a SLOT_REF can become SLOT_NOREF and vice-versa when it becomes live/dead.
14  * - a SLOT_PIN can become SLOT_REF after it has been definitely assigned.
15  */
16 typedef enum {
17         /* Stack slot doesn't contain a reference */
18         SLOT_NOREF = 0,
19         /* Stack slot contains a reference */
20         SLOT_REF = 1,
21         /* No info or managed pointer, slot needs to be scanned conservatively */
22         SLOT_PIN = 2
23 } GCSlotType;
24
25 void mini_gc_init (void);
26
27 void mini_gc_init_cfg (MonoCompile *cfg);
28
29 void mini_gc_enable_gc_maps_for_aot (void);
30
31 void mini_gc_create_gc_map (MonoCompile *cfg);
32
33 void mini_gc_set_slot_type_from_fp (MonoCompile *cfg, int slot_offset, GCSlotType type);
34
35 void mini_gc_set_slot_type_from_cfa (MonoCompile *cfg, int slot_offset, GCSlotType type);
36
37 #endif