[pypy-commit] pypy op_malloc_gc: fixes

arigo noreply at buildbot.pypy.org
Thu Dec 15 18:16:31 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: op_malloc_gc
Changeset: r50589:6caef25ddb53
Date: 2011-12-15 18:16 +0100
http://bitbucket.org/pypy/pypy/changeset/6caef25ddb53/

Log:	fixes

diff --git a/pypy/jit/backend/llsupport/gc.py b/pypy/jit/backend/llsupport/gc.py
--- a/pypy/jit/backend/llsupport/gc.py
+++ b/pypy/jit/backend/llsupport/gc.py
@@ -702,6 +702,9 @@
         # make the varsize malloc function, with three arguments
         def malloc_gc_variable(basesize, num_elem, itemsize):
             xx
+        self.malloc_gc_variable = malloc_gc_variable
+        self.MALLOC_GC_VARIABLE = lltype.Ptr(
+            lltype.FuncType([lltype.Signed] * 3, llmemory.GCREF))
         #
         self.WB_FUNCPTR = lltype.Ptr(lltype.FuncType(
             [llmemory.Address, llmemory.Address], lltype.Void))
diff --git a/pypy/jit/backend/llsupport/rewrite.py b/pypy/jit/backend/llsupport/rewrite.py
--- a/pypy/jit/backend/llsupport/rewrite.py
+++ b/pypy/jit/backend/llsupport/rewrite.py
@@ -36,7 +36,6 @@
         # one, both for performance and to reduce the number of write
         # barriers.  We do this on each "basic block" of operations, which in
         # this case means between CALLs or unknown-size mallocs.
-        # (XXX later: or LABELs)
         #
         for op in operations:
             if op.getopnum() == rop.DEBUG_MERGE_POINT:
@@ -45,7 +44,7 @@
             if op.is_malloc():
                 self.handle_malloc_operation(op)
                 continue
-            elif op.can_malloc():
+            elif op.can_malloc() or op.getopnum() == rop.LABEL:
                 self.emitting_an_operation_that_can_collect()
             # ---------- write barriers ----------
             if self.gc_ll_descr.write_barrier_descr is not None:


More information about the pypy-commit mailing list