[pypy-commit] pypy default: Use only uints as keys in the jit_cells dict, rather than
arigo
noreply at buildbot.pypy.org
Tue Apr 30 13:36:20 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r63769:2c3d5d1a6245
Date: 2013-04-30 13:38 +0200
http://bitbucket.org/pypy/pypy/changeset/2c3d5d1a6245/
Log: Use only uints as keys in the jit_cells dict, rather than a tuple
(next_instr, is_being_profiled).
Kill a deprecated method ("return False" is the default).
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
@@ -33,15 +33,16 @@
return '%s #%d %s' % (bytecode.get_repr(), next_instr, name)
def get_jitcell_at(next_instr, is_being_profiled, bytecode):
- return bytecode.jit_cells.get((next_instr, is_being_profiled), None)
+ # use only uints as keys in the jit_cells dict, rather than
+ # a tuple (next_instr, is_being_profiled)
+ key = (next_instr << 1) | r_uint(intmask(is_being_profiled))
+ return bytecode.jit_cells.get(key, None)
def set_jitcell_at(newcell, next_instr, is_being_profiled, bytecode):
- bytecode.jit_cells[next_instr, is_being_profiled] = newcell
+ key = (next_instr << 1) | r_uint(intmask(is_being_profiled))
+ bytecode.jit_cells[key] = newcell
-def can_never_inline(next_instr, is_being_profiled, bytecode):
- return False
-
def should_unroll_one_iteration(next_instr, is_being_profiled, bytecode):
return (bytecode.co_flags & CO_GENERATOR) != 0
@@ -53,7 +54,6 @@
pypyjitdriver = PyPyJitDriver(get_printable_location = get_printable_location,
get_jitcell_at = get_jitcell_at,
set_jitcell_at = set_jitcell_at,
- can_never_inline = can_never_inline,
should_unroll_one_iteration =
should_unroll_one_iteration,
name='pypyjit')
More information about the pypy-commit
mailing list