[pypy-commit] pypy stm-gc: Test and fix

arigo noreply at buildbot.pypy.org
Fri Feb 24 11:57:02 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r52847:329e75aa0c0e
Date: 2012-02-24 11:56 +0100
http://bitbucket.org/pypy/pypy/changeset/329e75aa0c0e/

Log:	Test and fix

diff --git a/pypy/translator/stm/test/targetdemo.py b/pypy/translator/stm/test/targetdemo.py
--- a/pypy/translator/stm/test/targetdemo.py
+++ b/pypy/translator/stm/test/targetdemo.py
@@ -72,6 +72,11 @@
     if res is not arg:
         debug_print("ERROR: bogus pointer equality")
         raise AssertionError
+    raw1 = rffi.cast(rffi.CCHARP, retry_counter)
+    raw2 = rffi.cast(rffi.CCHARP, -1)
+    if raw1 == raw2:
+        debug_print("ERROR: retry_counter == -1")
+        raise AssertionError
 
 def run_me():
     rstm.descriptor_init()
diff --git a/pypy/translator/stm/transform.py b/pypy/translator/stm/transform.py
--- a/pypy/translator/stm/transform.py
+++ b/pypy/translator/stm/transform.py
@@ -182,6 +182,10 @@
         newoperations.append(op)
 
     def pointer_comparison(self, newoperations, op):
+        T = op.args[0].concretetype.TO
+        if T._gckind == 'raw':
+            newoperations.append(op)
+            return
         if (self.localtracker.is_local(op.args[0]) and
             self.localtracker.is_local(op.args[1])):
             newoperations.append(op)


More information about the pypy-commit mailing list