Author: Armin Rigo <[email protected]>
Branch: stm-thread
Changeset: r55065:e2984bea9a93
Date: 2012-05-12 21:17 +0200
http://bitbucket.org/pypy/pypy/changeset/e2984bea9a93/
Log: Move the import statement to be local.
diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -12,7 +12,6 @@
from pypy.tool.sourcetools import func_with_new_name
from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib import jit, rstackovf
-from pypy.rlib import rstm
from pypy.rlib.rarithmetic import r_uint, intmask
from pypy.rlib.unroll import unrolling_iterable
from pypy.rlib.debug import check_nonneg
@@ -90,6 +89,7 @@
return self.popvalue()
def dispatch_with_stm(self, next_instr):
+ from pypy.rlib import rstm
self.last_instr = intmask(next_instr)
rstm.perform_transaction(pyframe.PyFrame._dispatch_stm_transaction,
self.space.FrameClass, self)
@@ -318,8 +318,10 @@
if jit.we_are_jitted():
return next_instr
- if rstm.should_break_transaction():
- return next_instr
+ if self.space.config.translation.stm:
+ from pypy.rlib import rstm
+ if rstm.should_break_transaction():
+ return next_instr
@jit.unroll_safe
def unrollstack(self, unroller_kind):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit