[pypy-commit] pypy default: Don't inline rffi.free_nonmovingbuffer in the JIT, it just raise an error during translation.

alex_gaynor noreply at buildbot.pypy.org
Wed Dec 14 21:31:04 CET 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r50516:0be914199ee6
Date: 2011-12-14 15:30 -0500
http://bitbucket.org/pypy/pypy/changeset/0be914199ee6/

Log:	Don't inline rffi.free_nonmovingbuffer in the JIT, it just raise an
	error during translation.

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
@@ -16,6 +16,7 @@
 from pypy.rpython.annlowlevel import llhelper
 from pypy.rlib.objectmodel import we_are_translated
 from pypy.rlib.rstring import StringBuilder, UnicodeBuilder
+from pypy.rlib import jit
 from pypy.rpython.lltypesystem import llmemory
 import os, sys
 
@@ -249,8 +250,7 @@
     wrapper = func_with_new_name(wrapper, name)
 
     if calling_conv != "c":
-        from pypy.rlib.jit import dont_look_inside
-        wrapper = dont_look_inside(wrapper)
+        wrapper = jit.dont_look_inside(wrapper)
 
     return wrapper
 
@@ -717,6 +717,8 @@
     get_nonmovingbuffer._annenforceargs_ = [strtype]
 
     # (str, char*) -> None
+    # Can't inline this because of the raw address manipulation.
+    @jit.dont_look_inside
     def free_nonmovingbuffer(data, buf):
         """
         Either free a non-moving buffer or keep the original storage alive.


More information about the pypy-commit mailing list