Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

memory/gctransform/test/test_framework.py::test_remove_duplicate_write_barrier

def test_remove_duplicate_write_barrier():
        from rpython.translator.c.genc import CStandaloneBuilder
        from rpython.flowspace.model import summary
    
        class A(object):
            pass
        glob_a_1 = A()
        glob_a_2 = A()
    
        def f(a, cond):
            a.x = a
            a.z = a
            if cond:
                a.y = a
        def g():
            f(glob_a_1, 5)
            f(glob_a_2, 0)
        t = rtype(g, [])
        t.config.translation.gc = "minimark"
        cbuild = CStandaloneBuilder(t, g, t.config,
                                    gcpolicy=FrameworkGcPolicy2)
        cbuild.make_entrypoint_wrapper = False
>       db = cbuild.build_database()

memory/gctransform/test/test_framework.py:273: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
translator/c/genc.py:102: in build_database
    self.config.translation.reverse_debugger)
translator/c/database.py:64: in __init__
    self.gctransformer = self.gcpolicy.gettransformer(translator, gchooks)
translator/c/gc.py:309: in gettransformer
    return self.transformerclass(translator, gchooks=gchooks)
memory/gctransform/framework.py:132: in __init__
    GCClass, GC_PARAMS = choose_gc_from_config(translator.config)
memory/gc/base.py:593: in choose_gc_from_config
    globals(), locals(), [classname])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    """
    # XXX Should find a way to bound the major collection threshold by the
    # XXX total addressable size.  Maybe by keeping some minimarkpage arenas
    # XXX pre-reserved, enough for a few nursery collections?  What about
    # XXX raw-malloced memory?
    import sys
    from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup
    from rpython.rtyper.lltypesystem.lloperation import llop
    from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage
    from rpython.memory.gc.base import GCBase, MovingGCBase
>   from rpython.memory.gc import env
E     File "/build_dir/rpython-linux-x86-32/build/rpython/memory/gc/env.py", line 423
E   SyntaxError: Non-ASCII character '\xe2' in file /build_dir/rpython-linux-x86-32/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

memory/gc/minimark.py:55: SyntaxError
---------- Captured stderr call ----------
[rtyper] -=- specialized 7 blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] -=- specialized 25 more blocks -=-
builder: rpython-linux-x86-32 build #832
test: memory/gctransform/test/test_framework/py/test_remove_duplicate_write_barrier