[pypy-commit] pypy stm: Move and add comments.
arigo
noreply at buildbot.pypy.org
Sun Oct 30 15:59:08 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: stm
Changeset: r48607:795b3e474cce
Date: 2011-10-30 15:58 +0100
http://bitbucket.org/pypy/pypy/changeset/795b3e474cce/
Log: Move and add comments.
diff --git a/pypy/translator/stm/llstminterp.py b/pypy/translator/stm/llstminterp.py
--- a/pypy/translator/stm/llstminterp.py
+++ b/pypy/translator/stm/llstminterp.py
@@ -74,6 +74,13 @@
self.check_stm_mode(lambda m: False)
xxx
+ def opstm_malloc(self, TYPE, flags):
+ # non-GC must not occur in a regular transaction,
+ # but can occur in inevitable mode or outside a transaction
+ if flags['flavor'] != 'gc':
+ self.check_stm_mode(lambda m: m != "regular_transaction")
+ return LLFrame.op_malloc(self, TYPE, flags)
+
# ---------- stm-only operations ----------
# Note that for these tests we assume no real multithreading,
# so that we just emulate the operations the easy way
@@ -108,8 +115,3 @@
def opstm_stm_try_inevitable(self):
self.check_stm_mode(lambda m: m != "not_in_transaction")
self.llinterpreter.stm_mode = "inevitable_transaction"
-
- def opstm_malloc(self, TYPE, flags):
- if flags['flavor'] != 'gc':
- self.check_stm_mode(lambda m: m != "regular_transaction")
- return LLFrame.op_malloc(self, TYPE, flags)
More information about the pypy-commit
mailing list