[pypy-svn] r67630 - pypy/branch/spine-of-frames/pypy/module/pypyjit

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Sep 10 19:44:24 CEST 2009


Author: cfbolz
Date: Thu Sep 10 19:44:23 2009
New Revision: 67630

Modified:
   pypy/branch/spine-of-frames/pypy/module/pypyjit/interp_jit.py
Log:
actually add a leave hook in the Python interpreter's JIT driver.


Modified: pypy/branch/spine-of-frames/pypy/module/pypyjit/interp_jit.py
==============================================================================
--- pypy/branch/spine-of-frames/pypy/module/pypyjit/interp_jit.py	(original)
+++ pypy/branch/spine-of-frames/pypy/module/pypyjit/interp_jit.py	Thu Sep 10 19:44:23 2009
@@ -51,6 +51,10 @@
     name = opcode_method_names[ord(bytecode.co_code[next_instr])]
     return '%s #%d %s' % (bytecode.get_repr(), next_instr, name)
 
+def leave(next_instr, pycode, frame, ec):
+    from pypy.interpreter.executioncontext import ExecutionContext
+    ExecutionContext._jit_rechain_frame(ec, frame)
+
 class PyPyJitDriver(JitDriver):
     reds = ['frame', 'ec']
     greens = ['next_instr', 'pycode']
@@ -65,7 +69,8 @@
 ##        return (valuestackdepth, blockstack)
 
 pypyjitdriver = PyPyJitDriver(can_inline = can_inline,
-                              get_printable_location = get_printable_location)
+                              get_printable_location = get_printable_location,
+                              leave = leave)
 
 class __extend__(PyFrame):
 



More information about the Pypy-commit mailing list