[pypy-commit] pypy stm: Revert 0782958b144f. No longer needed.

arigo noreply at buildbot.pypy.org
Mon Jan 16 14:59:35 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm
Changeset: r51342:382a5969beda
Date: 2012-01-16 14:58 +0100
http://bitbucket.org/pypy/pypy/changeset/382a5969beda/

Log:	Revert 0782958b144f. No longer needed.

diff --git a/pypy/doc/discussion/stm_todo.txt b/pypy/doc/discussion/stm_todo.txt
--- a/pypy/doc/discussion/stm_todo.txt
+++ b/pypy/doc/discussion/stm_todo.txt
@@ -7,4 +7,3 @@
     e23ab2c195c1  Added a number of "# XXX --- custom version for STM ---"
     31f2ed861176  One more
 
-    0782958b144f  Hard-coded the STM logic in rffi.aroundstate
diff --git a/pypy/rpython/lltypesystem/rffi.py b/pypy/rpython/lltypesystem/rffi.py
--- a/pypy/rpython/lltypesystem/rffi.py
+++ b/pypy/rpython/lltypesystem/rffi.py
@@ -313,21 +313,11 @@
 
 AroundFnPtr = lltype.Ptr(lltype.FuncType([], lltype.Void))
 class AroundState:
-    # XXX for stm with need to comment out this, and use a custom logic
-##    def _freeze_(self):
-##        self.before = None    # or a regular RPython function
-##        self.after = None     # or a regular RPython function
-##        return False
-    @staticmethod
-    def before():
-        from pypy.translator.stm import rstm
-        rstm.commit_transaction()
-    @staticmethod
-    def after():
-        from pypy.translator.stm import rstm
-        rstm.begin_inevitable_transaction()
+    _alloc_flavor_ = "raw"
     def _freeze_(self):
-        return True
+        self.before = None    # or a regular RPython function
+        self.after = None     # or a regular RPython function
+        return False
 aroundstate = AroundState()
 aroundstate._freeze_()
 


More information about the pypy-commit mailing list