Author: Lars Wassermann <[email protected]>
Branch: 
Changeset: r462:87173d05b6c2
Date: 2013-06-18 15:55 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/87173d05b6c2/

Log:    restructured sqGetInterpreterProxy, because the JIT can't be
        generated when exposed functions are called in rpython code

diff --git a/spyvm/interpreter_proxy.py b/spyvm/interpreter_proxy.py
--- a/spyvm/interpreter_proxy.py
+++ b/spyvm/interpreter_proxy.py
@@ -941,6 +941,11 @@
 
 @entrypoint('main', [], c_name='sqGetInterpreterProxy')
 def sqGetInterpreterProxy():
+    return getInterpreterProxy()
+
+# Redirect of sqGetInterpreterProxy, because the JIT doesn't allow calling of
+# functions annotated with @entrypoint.
+def getInterpreterProxy():
     if not IProxy.vm_initialized:
         vm_proxy = lltype.malloc(VirtualMachine, flavor='raw')
         for func_name, signature, func in proxy_functions:
@@ -1073,7 +1078,7 @@
                 raise error.PrimitiveFailedError
             else:
                 setInterpreter = rffi.cast(func_bool_vm, _setInterpreter)
-                if not setInterpreter(sqGetInterpreterProxy()):
+                if not setInterpreter(getInterpreterProxy()):
                     print "Failed setting interpreter on: %s" % module_name
                     raise error.PrimitiveFailedError
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to