File: moduledef.py

package info (click to toggle)
pypy3 7.3.19%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 212,236 kB
  • sloc: python: 2,098,316; ansic: 540,565; sh: 21,462; asm: 14,419; cpp: 4,451; makefile: 4,209; objc: 761; xml: 530; exp: 499; javascript: 314; pascal: 244; lisp: 45; csh: 12; awk: 4
file content (41 lines) | stat: -rw-r--r-- 1,886 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from pypy.interpreter.mixedmodule import MixedModule


class Module(MixedModule):
    interpleveldefs = {
        'collect': 'interp_gc.collect',
        'enable': 'interp_gc.enable',
        'disable': 'interp_gc.disable',
        'isenabled': 'interp_gc.isenabled',
        'enable_finalizers': 'interp_gc.enable_finalizers',
        'disable_finalizers': 'interp_gc.disable_finalizers',
        'garbage': 'space.newlist([])',
        #'dump_heap_stats': 'interp_gc.dump_heap_stats',
    }
    appleveldefs = {}

    def __init__(self, space, w_name):
        if (not space.config.translating or
                space.config.translation.gctransformer == "framework"):
            self.appleveldefs.update({
                'dump_rpy_heap': 'app_referents.dump_rpy_heap',
                'get_stats': 'app_referents.get_stats',
                })
            self.interpleveldefs.update({
                'collect_step': 'interp_gc.collect_step',
                'get_rpy_roots': 'referents.get_rpy_roots',
                'get_rpy_referents': 'referents.get_rpy_referents',
                'get_rpy_memory_usage': 'referents.get_rpy_memory_usage',
                'get_rpy_type_index': 'referents.get_rpy_type_index',
                'get_objects': 'referents.get_objects',
                'get_referents': 'referents.get_referents',
                'get_referrers': 'referents.get_referrers',
                '_get_stats': 'referents.get_stats',
                '_dump_rpy_heap': 'referents._dump_rpy_heap',
                'get_typeids_z': 'referents.get_typeids_z',
                'get_typeids_list': 'referents.get_typeids_list',
                'GcRef': 'referents.W_GcRef',
                'hooks': 'space.fromcache(hook.W_AppLevelHooks)',
                'GcCollectStepStats': 'hook.W_GcCollectStepStats',
                })
        MixedModule.__init__(self, space, w_name)