Debian Codegraph @

rpython/jit/metainterp/gc.py

raw symbols SCIP
1 """
2 Support for the various GCs.
3 """
4
5 class GcDescription:
6 def __init__(self, config):
7 self.config = config
8
9
10 class GC_none(GcDescription):
11 malloc_zero_filled = True
12
13 class GC_boehm(GcDescription):
14 malloc_zero_filled = True
15
16 class GC_semispace(GcDescription):
17 malloc_zero_filled = True
18
19 class GC_generation(GcDescription):
20 malloc_zero_filled = True
21
22 class GC_hybrid(GcDescription):
23 malloc_zero_filled = True
24
25 class GC_minimark(GcDescription):
26 malloc_zero_filled = True
27
28 class GC_incminimark(GcDescription):
29 malloc_zero_filled = False
30
31
32 def get_description(config):
33 name = config.translation.gc
34 try:
35 cls = globals()['GC_' + name]
36 except KeyError:
37 raise NotImplementedError('GC %r not supported by the JIT' % (name,))
38 return cls(config)