[pypy-commit] pypy gc-incminimark-pinning: fixed translation problem for RFile example.
groggi
noreply at buildbot.pypy.org
Mon Jun 2 17:23:58 CEST 2014
Author: Gregor Wegberg <code at gregorwegberg.com>
Branch: gc-incminimark-pinning
Changeset: r71819:efb1928f2226
Date: 2014-05-14 14:29 +0200
http://bitbucket.org/pypy/pypy/changeset/efb1928f2226/
Log: fixed translation problem for RFile example.
Still not completly understanding the translation process, but
getting there step by step.
diff --git a/rpython/memory/gc/incminimark.py b/rpython/memory/gc/incminimark.py
--- a/rpython/memory/gc/incminimark.py
+++ b/rpython/memory/gc/incminimark.py
@@ -979,7 +979,7 @@
def unpin(self, obj):
# Unpins a previously pinned 'obj'. This should only be called
# after a pin(obj).
- ll_assert(self.header(obj) & GCFLAG_PINNED != 0,
+ ll_assert(self.header(obj).tid & GCFLAG_PINNED != 0,
"unpin: object is already not pinned")
self.header(obj).tid &= ~GCFLAG_PINNED
self.pinned_objects_in_nursery -= 1
diff --git a/rpython/memory/gc/test/test_object_pinning.py b/rpython/memory/gc/test/test_object_pinning.py
--- a/rpython/memory/gc/test/test_object_pinning.py
+++ b/rpython/memory/gc/test/test_object_pinning.py
@@ -58,6 +58,7 @@
assert not self.gc.pin(adr)
# XXX test with multiple mallocs, and only part of them is pinned
+ # XXX test unpin()
class TestIncminimark(PinningGCTest):
diff --git a/rpython/memory/gctransform/framework.py b/rpython/memory/gctransform/framework.py
--- a/rpython/memory/gctransform/framework.py
+++ b/rpython/memory/gctransform/framework.py
@@ -458,12 +458,12 @@
# XXX understand this, correct? (groggi)
self.pin_ptr = getfn(GCClass.pin,
- [s_gc, s_gcref],
+ [s_gc, SomeAddress()],
annmodel.SomeBool())
# XXX understand this, correct? (groggi)
self.unpin_ptr = getfn(GCClass.unpin,
- [s_gc, s_gcref],
+ [s_gc, SomeAddress()],
annmodel.s_None)
self.write_barrier_ptr = None
More information about the pypy-commit
mailing list