Author: Maciej Fijalkowski <fij...@gmail.com> Branch: jit-threshold-hooks Changeset: r65457:9970eb753fab Date: 2013-07-18 12:20 +0200 http://bitbucket.org/pypy/pypy/changeset/9970eb753fab/
Log: hack differently 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 @@ -6,7 +6,8 @@ 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.jit import JitDriver, hint, we_are_jitted, dont_look_inside,\ + BaseJitCell from rpython.rlib import jit from rpython.rlib.jit import current_trace_length, unroll_parameters import pypy.interpreter.pyopcode # for side-effects @@ -177,10 +178,8 @@ For testing. Set the threshold for this code object at position pos at value given. """ - from rpython.jit.metainterp.warmstate import JitCell - ref = w_code.jit_cells[pos << 1] - jitcell = cast_base_ptr_to_instance(JitCell, ref) + jitcell = cast_base_ptr_to_instance(BaseJitCell, ref) jitcell.counter = value @unwrap_spec(w_code=PyCode, value=int) diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py --- a/rpython/rlib/jit.py +++ b/rpython/rlib/jit.py @@ -684,7 +684,7 @@ # Annotation and rtyping of some of the JitDriver methods class BaseJitCell(object): - __slots__ = () + __slots__ = ('counter') class ExtEnterLeaveMarker(ExtRegistryEntry): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit