Author: Maciej Fijalkowski <fij...@gmail.com> Branch: optresult Changeset: r77856:27601b29a154 Date: 2015-06-04 14:14 +0200 http://bitbucket.org/pypy/pypy/changeset/27601b29a154/
Log: fix for llgraph backend diff --git a/rpython/jit/backend/test/runner_test.py b/rpython/jit/backend/test/runner_test.py --- a/rpython/jit/backend/test/runner_test.py +++ b/rpython/jit/backend/test/runner_test.py @@ -1808,15 +1808,19 @@ cpu = self.cpu class FakeGCCache(object): pass - - if not hasattr(cpu.gc_ll_descr, '_cache_gcstruct2vtable'): - cpu.gc_ll_descr._cache_gcstruct2vtable = {} - cpu.gc_ll_descr._cache_gcstruct2vtable.update({T: vtable_for_T}) - p = T - while hasattr(p, 'parent'): - vtable_for_parent = lltype.malloc(self.MY_VTABLE, immortal=True) - cpu.gc_ll_descr._cache_gcstruct2vtable[p.parent] = vtable_for_parent - p = p.parent + + if hasattr(cpu, 'gc_ll_descr'): + if not hasattr(cpu.gc_ll_descr, '_cache_gcstruct2vtable'): + cpu.gc_ll_descr._cache_gcstruct2vtable = {} + cpu.gc_ll_descr._cache_gcstruct2vtable.update({T: vtable_for_T}) + p = T + while hasattr(p, 'parent'): + vtable_for_parent = lltype.malloc(self.MY_VTABLE, immortal=True) + cpu.gc_ll_descr._cache_gcstruct2vtable[p.parent] = vtable_for_parent + p = p.parent + else: + descr = cpu.sizeof(T, True) + descr._corresponding_vtable = vtable_for_T t = lltype.malloc(T) if T == self.T: t.parent.parent.typeptr = vtable_for_T _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit