[pypy-commit] pypy py3.5: translation fix?

arigo pypy.commits at gmail.com
Sat Oct 15 04:22:00 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r87799:eb9826862295
Date: 2016-10-15 10:21 +0200
http://bitbucket.org/pypy/pypy/changeset/eb9826862295/

Log:	translation fix?

diff --git a/pypy/module/sys/vm.py b/pypy/module/sys/vm.py
--- a/pypy/module/sys/vm.py
+++ b/pypy/module/sys/vm.py
@@ -41,6 +41,11 @@
         f = ec.getnextframe_nohidden(f)
 
 
+def _stack_check_noinline():
+    from rpython.rlib.rstack import stack_check
+    stack_check()
+_stack_check_noinline._dont_inline_ = True
+
 @jit.dont_look_inside
 @unwrap_spec(new_limit="c_int")
 def setrecursionlimit(space, new_limit):
@@ -51,13 +56,13 @@
 depending on the compiler settings) for ~1400 calls.  Setting the
 value to N reserves N/1000 times 768KB of stack space.
 """
-    from rpython.rlib.rstack import _stack_set_length_fraction, stack_check
+    from rpython.rlib.rstack import _stack_set_length_fraction
     from rpython.rlib.rstackovf import StackOverflow
     if new_limit <= 0:
         raise oefmt(space.w_ValueError, "recursion limit must be positive")
     try:
         _stack_set_length_fraction(new_limit * 0.001)
-        stack_check()
+        _stack_check_noinline()
     except StackOverflow:
         old_limit = space.sys.recursionlimit
         _stack_set_length_fraction(old_limit * 0.001)


More information about the pypy-commit mailing list