Example #1
0
def test_make_boehm_tracer():
    a = lltype.malloc(rffi.CArray(lltype.Signed), 3, flavor='raw')
    base = rffi.cast(lltype.Signed, a)
    lst = [123, 456, 789]
    tr = make_boehm_tracer(base, lst)
    assert a[0] == 123
    assert a[1] == 456
    assert a[2] == 789
    assert tr is lst
    lltype.free(a, flavor='raw')
Example #2
0
def test_make_boehm_tracer():
    a = lltype.malloc(rffi.CArray(lltype.Signed), 3, flavor='raw')
    base = rffi.cast(lltype.Signed, a)
    lst = [123, 456, 789]
    tr = make_boehm_tracer(base, lst)
    assert a[0] == 123
    assert a[1] == 456
    assert a[2] == 789
    assert tr is lst
    lltype.free(a, flavor='raw')
Example #3
0
 def make_gcref_tracer(self, array_base_addr, gcrefs):
     # for tests, or for Boehm.  Overridden for framework GCs
     from rpython.jit.backend.llsupport import gcreftracer
     return gcreftracer.make_boehm_tracer(array_base_addr, gcrefs)
Example #4
0
File: gc.py Project: mozillazg/pypy
 def make_gcref_tracer(self, array_base_addr, gcrefs):
     # for tests, or for Boehm.  Overridden for framework GCs
     from rpython.jit.backend.llsupport import gcreftracer
     return gcreftracer.make_boehm_tracer(array_base_addr, gcrefs)