[pypy-commit] pypy stm-thread-2: Fixes. test_stmrewrite.py seems to pass now.

arigo noreply at buildbot.pypy.org
Tue Sep 11 14:35:43 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-thread-2
Changeset: r57277:4625b316dd5f
Date: 2012-09-11 14:33 +0200
http://bitbucket.org/pypy/pypy/changeset/4625b316dd5f/

Log:	Fixes. test_stmrewrite.py seems to pass now.

diff --git a/pypy/jit/backend/llsupport/stmrewrite.py b/pypy/jit/backend/llsupport/stmrewrite.py
--- a/pypy/jit/backend/llsupport/stmrewrite.py
+++ b/pypy/jit/backend/llsupport/stmrewrite.py
@@ -141,13 +141,13 @@
     def handle_copystrcontent(self, op):
         # first, a write barrier on the target string
         lst = op.getarglist()
-        lst[1] = self.gen_write_barrier(lst[1])
+        lst[1] = self.gen_barrier(lst[1], 'W')
         op = op.copy_and_change(op.getopnum(), args=lst)
-        # then a normal STM_READ_BEFORE/AFTER pair on the source string
-        self.handle_getfield_operations(op)
+        # then a read barrier the source string
+        self.handle_category_operations(op, 'R')
 
     def fallback_inevitable(self, op):
-        self.known_local.clear()
+        self.known_category.clear()
         if not self.always_inevitable:
             addr = self.gc_ll_descr.get_malloc_fn_addr('stm_try_inevitable')
             descr = self.gc_ll_descr.stm_try_inevitable_descr
diff --git a/pypy/jit/backend/llsupport/test/test_stmrewrite.py b/pypy/jit/backend/llsupport/test/test_stmrewrite.py
--- a/pypy/jit/backend/llsupport/test/test_stmrewrite.py
+++ b/pypy/jit/backend/llsupport/test/test_stmrewrite.py
@@ -345,20 +345,6 @@
             jump(i3, i4)
         """)
 
-    def test_getinteriorfield_raw(self):
-        self.check_rewrite("""
-            [i1, i2]
-            i3 = getinteriorfield_raw(i1, 5, descr=?)
-            i4 = getinteriorfield_raw(i2, i3, descr=?)
-            jump(i3, i4)
-        """, """
-            [i1, i2]
-            $INEV
-            i3 = getinteriorfield_raw(i1, 5, descr=?)
-            i4 = getinteriorfield_raw(i2, i3, descr=?)
-            jump(i3, i4)
-        """)
-
     def test_rewrite_unrelated_setarrayitem_gcs(self):
         self.check_rewrite("""
             [p1, i1, p2, p3, i3, p4]


More information about the pypy-commit mailing list