[pypy-svn] r66718 - pypy/branch/pyjitpl5/pypy/module/pypyjit
arigo at codespeak.net
arigo at codespeak.net
Fri Jul 31 17:12:23 CEST 2009
Author: arigo
Date: Fri Jul 31 17:12:21 2009
New Revision: 66718
Modified:
pypy/branch/pyjitpl5/pypy/module/pypyjit/interp_jit.py
Log:
This small change is enough to add in every loop a check for the global
variable set by various actions like the signal handler and the GC.
This means that with smallish overhead, it should now handle Ctrl-C and
app-level __del__()s correctly.
Modified: pypy/branch/pyjitpl5/pypy/module/pypyjit/interp_jit.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/module/pypyjit/interp_jit.py (original)
+++ pypy/branch/pyjitpl5/pypy/module/pypyjit/interp_jit.py Fri Jul 31 17:12:21 2009
@@ -6,7 +6,7 @@
import sys
from pypy.tool.pairtype import extendabletype
from pypy.rlib.rarithmetic import r_uint, intmask
-from pypy.rlib.jit import JitDriver, hint
+from pypy.rlib.jit import JitDriver, hint, we_are_jitted
import pypy.interpreter.pyopcode # for side-effects
from pypy.interpreter.error import OperationError
from pypy.interpreter.gateway import ObjSpace, Arguments
@@ -73,7 +73,11 @@
except ExitFrame:
return self.popvalue()
- def JUMP_ABSOLUTE(f, jumpto, next_instr, ec=None):
+ def JUMP_ABSOLUTE(f, jumpto, _, ec=None):
+ if we_are_jitted():
+ f.last_instr = intmask(jumpto)
+ ec.bytecode_trace(f)
+ jumpto = r_uint(f.last_instr)
pypyjitdriver.can_enter_jit(frame=f, ec=ec, next_instr=jumpto,
pycode=f.getcode())
return jumpto
More information about the Pypy-commit
mailing list