[pypy-commit] stmgc card-marking: Another interface needed for the PyPy JIT

arigo noreply at buildbot.pypy.org
Tue Jul 1 10:45:33 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: card-marking
Changeset: r1266:2f4d07820293
Date: 2014-06-30 17:48 +0200
http://bitbucket.org/pypy/stmgc/changeset/2f4d07820293/

Log:	Another interface needed for the PyPy JIT

diff --git a/c7/stm/core.c b/c7/stm/core.c
--- a/c7/stm/core.c
+++ b/c7/stm/core.c
@@ -244,6 +244,14 @@
     return mark_card;
 }
 
+char *_stm_write_slowpath_card_extra_base(void)
+{
+    /* for the PyPy JIT: _stm_write_slowpath_card_extra_base[obj >> 4]
+       is the byte that must be set to CARD_MARKED.  The logic below
+       does the same, but more explicitly. */
+    return (char *)write_locks - WRITELOCK_START + 1;
+}
+
 void _stm_write_slowpath_card(object_t *obj, uintptr_t index)
 {
     /* If CARDS_SET is not set so far, issue a normal write barrier.
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -109,6 +109,7 @@
 void _stm_write_slowpath(object_t *);
 void _stm_write_slowpath_card(object_t *, uintptr_t);
 char _stm_write_slowpath_card_extra(object_t *);
+char *_stm_write_slowpath_card_extra_base(void);
 object_t *_stm_allocate_slowpath(ssize_t);
 object_t *_stm_allocate_external(ssize_t);
 void _stm_become_inevitable(const char*);


More information about the pypy-commit mailing list