Author: Maciej Fijalkowski <[email protected]>
Branch: callback-jit
Changeset: r59569:1a0cbddf904c
Date: 2012-12-26 20:23 +0200
http://bitbucket.org/pypy/pypy/changeset/1a0cbddf904c/

Log:    register it at runtime

diff --git a/pypy/module/pypyjit/interp_jit.py 
b/pypy/module/pypyjit/interp_jit.py
--- a/pypy/module/pypyjit/interp_jit.py
+++ b/pypy/module/pypyjit/interp_jit.py
@@ -106,8 +106,6 @@
 def callback_hook(name):
     pass
 
-objectmodel.register_around_callback_hook(callback_hook)
-
 def _get_adapted_tick_counter():
     # Normally, the tick counter is decremented by 100 for every
     # Python opcode.  Here, to better support JIT compilation of
diff --git a/pypy/translator/goal/targetpypystandalone.py 
b/pypy/translator/goal/targetpypystandalone.py
--- a/pypy/translator/goal/targetpypystandalone.py
+++ b/pypy/translator/goal/targetpypystandalone.py
@@ -31,7 +31,10 @@
     def entry_point(argv):
         if withjit:
             from pypy.jit.backend.hlinfo import highleveljitinfo
+            from pypy.module.pypyjit.interp_jit import callback_hook
+            from pypy.rlib import objectmodel
             highleveljitinfo.sys_executable = argv[0]
+            objectmodel.register_around_callback_hook(callback_hook)
 
         #debug("entry point starting") 
         #for arg in argv: 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to