Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r69902:32b8f8917322
Date: 2014-03-12 17:19 +0100
http://bitbucket.org/pypy/pypy/changeset/32b8f8917322/

Log:    import stmgc/c6ed145863b4

diff --git a/rpython/translator/stm/src_stm/revision 
b/rpython/translator/stm/src_stm/revision
--- a/rpython/translator/stm/src_stm/revision
+++ b/rpython/translator/stm/src_stm/revision
@@ -1,1 +1,1 @@
-3f0d8773b90b
+c6ed145863b4
diff --git a/rpython/translator/stm/src_stm/stm/prebuilt.c 
b/rpython/translator/stm/src_stm/stm/prebuilt.c
--- a/rpython/translator/stm/src_stm/stm/prebuilt.c
+++ b/rpython/translator/stm/src_stm/stm/prebuilt.c
@@ -17,9 +17,13 @@
         return;
 
     /* If the object was already moved, it is stored in 'tree_prebuilt_objs'.
+       For now we use this dictionary, with keys being equal to the double
+       of the numeric address of the prebuilt object.  We double them in
+       order to support addresses that are only 4-byte-aligned in the
+       static data.
      */
     wlog_t *item;
-    TREE_FIND(*tree_prebuilt_objs, (uintptr_t)obj, item, goto not_found);
+    TREE_FIND(*tree_prebuilt_objs, 2 * (uintptr_t)obj, item, goto not_found);
 
     *pstaticobj_invalid = (object_t *)item->val;    /* already moved */
     return;
@@ -39,7 +43,7 @@
     nobj->stm_flags = GCFLAG_WRITE_BARRIER;
 
     /* Add the object to the tree */
-    tree_insert(tree_prebuilt_objs, (uintptr_t)obj, (uintptr_t)nobj);
+    tree_insert(tree_prebuilt_objs, 2 * (uintptr_t)obj, (uintptr_t)nobj);
 
     /* Done */
     *pstaticobj_invalid = nobj;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to