Author: Armin Rigo <ar...@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) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit