[pypy-commit] pypy fast-gil: Translation fix
arigo
noreply at buildbot.pypy.org
Tue Jun 24 12:28:00 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch: fast-gil
Changeset: r72187:9fe8251182d4
Date: 2014-06-24 12:27 +0200
http://bitbucket.org/pypy/pypy/changeset/9fe8251182d4/
Log: Translation fix
diff --git a/rpython/jit/backend/llsupport/callbuilder.py b/rpython/jit/backend/llsupport/callbuilder.py
--- a/rpython/jit/backend/llsupport/callbuilder.py
+++ b/rpython/jit/backend/llsupport/callbuilder.py
@@ -1,5 +1,6 @@
from rpython.rlib.clibffi import FFI_DEFAULT_ABI
from rpython.rlib import rgil
+from rpython.rtyper.lltypesystem import lltype, rffi
class AbstractCallBuilder(object):
diff --git a/rpython/rlib/objectmodel.py b/rpython/rlib/objectmodel.py
--- a/rpython/rlib/objectmodel.py
+++ b/rpython/rlib/objectmodel.py
@@ -584,11 +584,13 @@
rffi.aroundstate.after = after
rffi.aroundstate.enter_callback = after
rffi.aroundstate.leave_callback = before
- # the 'aroundstate' contains regular function and not ll pointers to them,
- # but let's call llhelper() anyway to force their annotation
- from rpython.rtyper.annlowlevel import llhelper
- llhelper(rffi.AroundFnPtr, before)
- llhelper(rffi.AroundFnPtr, after)
+ # force the annotation of before() and after()
+ from rpython.rlib.nonconst import NonConstant
+ if NonConstant(0):
+ if before:
+ before()
+ if after:
+ after()
def is_in_callback():
from rpython.rtyper.lltypesystem import rffi
More information about the pypy-commit
mailing list