Author: wenzhuman <manwen...@gmail.com> Branch: gc_no_cleanup_nursery Changeset: r72248:8b1c02cea49c Date: 2014-06-26 16:37 -0400 http://bitbucket.org/pypy/pypy/changeset/8b1c02cea49c/
Log: fix the test_direct tests diff --git a/rpython/memory/gc/base.py b/rpython/memory/gc/base.py --- a/rpython/memory/gc/base.py +++ b/rpython/memory/gc/base.py @@ -149,14 +149,14 @@ assert not needs_finalizer itemsize = self.varsize_item_sizes(typeid) offset_to_length = self.varsize_offset_to_length(typeid) - if zero or not hasattr(self, 'malloc_varsize'): + if zero and not hasattr(self, 'malloc_varsize'): malloc_varsize = self.malloc_varsize_clear else: malloc_varsize = self.malloc_varsize ref = malloc_varsize(typeid, length, size, itemsize, offset_to_length) else: - if zero or not hasattr(self, 'malloc_fixedsize'): + if zero and not hasattr(self, 'malloc_fixedsize'): malloc_fixedsize = self.malloc_fixedsize_clear else: malloc_fixedsize = self.malloc_fixedsize diff --git a/rpython/memory/test/test_transformed_gc.py b/rpython/memory/test/test_transformed_gc.py --- a/rpython/memory/test/test_transformed_gc.py +++ b/rpython/memory/test/test_transformed_gc.py @@ -767,7 +767,7 @@ def g(): r = lltype.malloc(P) r.x = 1 - p = llop.do_malloc_fixedsize_clear(llmemory.GCREF) # placeholder + p = llop.do_malloc_fixedsize(llmemory.GCREF) # placeholder p = lltype.cast_opaque_ptr(lltype.Ptr(P), p) p.x = r.x return p.x @@ -794,10 +794,10 @@ type_id = layoutbuilder.get_type_id(P) # - # now fix the do_malloc_fixedsize_clear in the graph of g + # now fix the do_malloc_fixedsize in the graph of g graph = graphof(translator, g) for op in graph.startblock.operations: - if op.opname == 'do_malloc_fixedsize_clear': + if op.opname == 'do_malloc_fixedsize': op.args = [Constant(type_id, llgroup.HALFWORD), Constant(llmemory.sizeof(P), lltype.Signed), Constant(False, lltype.Bool), # has_finalizer @@ -815,7 +815,7 @@ def define_do_malloc_operations_in_call(cls): P = lltype.GcStruct('P', ('x', lltype.Signed)) def g(): - llop.do_malloc_fixedsize_clear(llmemory.GCREF) # placeholder + llop.do_malloc_fixedsize(llmemory.GCREF) # placeholder def f(): q = lltype.malloc(P) q.x = 1 @@ -831,10 +831,10 @@ layoutbuilder = cls.ensure_layoutbuilder(translator) type_id = layoutbuilder.get_type_id(P) # - # now fix the do_malloc_fixedsize_clear in the graph of g + # now fix the do_malloc_fixedsize in the graph of g graph = graphof(translator, g) for op in graph.startblock.operations: - if op.opname == 'do_malloc_fixedsize_clear': + if op.opname == 'do_malloc_fixedsize': op.args = [Constant(type_id, llgroup.HALFWORD), Constant(llmemory.sizeof(P), lltype.Signed), Constant(False, lltype.Bool), # has_finalizer _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit