Author: Maciej Fijalkowski <fij...@gmail.com> Branch: better-jit-hooks Changeset: r50995:fb9acc31d2e9 Date: 2012-01-03 15:02 +0200 http://bitbucket.org/pypy/pypy/changeset/fb9acc31d2e9/
Log: adjust pypyjit module to use the new API diff --git a/pypy/module/pypyjit/policy.py b/pypy/module/pypyjit/policy.py --- a/pypy/module/pypyjit/policy.py +++ b/pypy/module/pypyjit/policy.py @@ -5,7 +5,7 @@ from pypy.jit.metainterp.jitprof import counter_names class PyPyPortal(JitPortal): - def on_abort(self, reason): + def on_abort(self, reason, jitdriver, greenkey): space = self.space cache = space.fromcache(Cache) if cache.in_recursion: diff --git a/pypy/module/pypyjit/test/test_jit_hook.py b/pypy/module/pypyjit/test/test_jit_hook.py --- a/pypy/module/pypyjit/test/test_jit_hook.py +++ b/pypy/module/pypyjit/test/test_jit_hook.py @@ -3,7 +3,7 @@ from pypy.conftest import gettestobjspace, option from pypy.interpreter.pycode import PyCode from pypy.interpreter.gateway import interp2app -from pypy.jit.metainterp.history import JitCellToken +from pypy.jit.metainterp.history import JitCellToken, ConstInt, ConstPtr from pypy.jit.metainterp.resoperation import ResOperation, rop from pypy.jit.metainterp.logger import Logger from pypy.rpython.annlowlevel import (cast_instance_to_base_ptr, @@ -41,6 +41,7 @@ debug_merge_point(0, 0, 0, 0, ConstPtr(ptr0)) guard_true(i3) [] """, namespace={'ptr0': code_gcref}).operations + greenkey = [ConstInt(0), ConstInt(0), ConstPtr(code_gcref)] def interp_on_compile(): pypyjitdriver.on_compile(logger, JitCellToken(), oplist, 'loop', @@ -50,7 +51,7 @@ pypyjitdriver.on_compile_bridge(logger, JitCellToken(), oplist, 0) def interp_on_abort(): - pypy_portal.on_abort(ABORT_TOO_LONG) + pypy_portal.on_abort(ABORT_TOO_LONG, pypyjitdriver, greenkey) cls.w_on_compile = space.wrap(interp2app(interp_on_compile)) cls.w_on_compile_bridge = space.wrap(interp2app(interp_on_compile_bridge)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit