Author: Nicolas Truessel <[email protected]>
Branch: quad-color-gc
Changeset: r86894:7c5c4f76938f
Date: 2016-09-05 22:08 +0200
http://bitbucket.org/pypy/pypy/changeset/7c5c4f76938f/

Log:    Register weakrefs (test failing due to not collected targets)

diff --git a/rpython/memory/gctransform/qcgcframework.py 
b/rpython/memory/gctransform/qcgcframework.py
--- a/rpython/memory/gctransform/qcgcframework.py
+++ b/rpython/memory/gctransform/qcgcframework.py
@@ -120,7 +120,7 @@
         # Register weakref
         v_fieldaddr = hop.genop("direct_fieldptr", [v_result, c_weakptr],
                             resulttype=llmemory.Address)
-        #hop.genop("qcgc_register_weakref", [v_result, v_fieldaddr])
+        hop.genop("qcgc_register_weakref", [v_result, v_fieldaddr])
         hop.cast_result(v_weakref)
 
 class QcgcRootWalker(BaseRootWalker):
diff --git a/rpython/translator/c/funcgen.py b/rpython/translator/c/funcgen.py
--- a/rpython/translator/c/funcgen.py
+++ b/rpython/translator/c/funcgen.py
@@ -963,3 +963,8 @@
     def OP_QCGC_WRITE_BARRIER(self, op):
         obj = self.expr(op.args[0])
         return 'qcgc_write(%s);' % (obj,)
+
+    def OP_QCGC_REGISTER_WEAKREF(self, op):
+        weakref = self.expr(op.args[0])
+        fieldaddr = self.expr(op.args[1])
+        return 'qcgc_register_weakref(%s, %s);' % (weakref, fieldaddr)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to