Author: Maciej Fijalkowski <fij...@gmail.com> Branch: jit-threshold-hooks Changeset: r65453:845e217b0aea Date: 2013-07-17 23:43 +0200 http://bitbucket.org/pypy/pypy/changeset/845e217b0aea/
Log: try to please the annotator 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 @@ -4,6 +4,7 @@ """ from rpython.tool.pairtype import extendabletype +from rpython.rtyper.annlowlevel import cast_base_ptr_to_instance from rpython.rlib.rarithmetic import r_uint, intmask from rpython.rlib.jit import JitDriver, hint, we_are_jitted, dont_look_inside from rpython.rlib import jit @@ -169,14 +170,18 @@ the JIT follow the call.''' return space.call_args(w_callable, __args__) -@unwrap_spec(w_code=PyCode, pos=int, value=int) +@unwrap_spec(w_code=PyCode, pos=r_uint, value=int) def set_local_threshold(space, w_code, pos, value): """ set_local_threshold(code, pos, value) For testing. Set the threshold for this code object at position pos at value given. """ - w_code.jit_cells[pos << 1] = r_uint(value) # we ignore the profiling case + from rpython.jit.metainterp.warmstate import JitCell + + ref = w_code.jit_cells[pos << 1] + jitcell = cast_base_ptr_to_instance(JitCell, ref) + jitcell.counter = value @unwrap_spec(w_code=PyCode, value=int) def set_local_bridge_threshold(space, w_code, value): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit