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