Author: Maciej Fijalkowski <[email protected]>
Branch: jit-threshold-hooks
Changeset: r66324:c0ebbcc09d60
Date: 2013-08-26 17:48 +0100
http://bitbucket.org/pypy/pypy/changeset/c0ebbcc09d60/
Log: maybe like that?
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
@@ -43,7 +43,7 @@
def set_jitcell_at(newcell, next_instr, is_being_profiled, bytecode):
key = (next_instr << 1) | r_uint(intmask(is_being_profiled))
- bytecode.jit_cells[key] = newcell
+ bytecode.jit_cells[key] = cast_instance_to_base_ptr(newcell)
def should_unroll_one_iteration(next_instr, is_being_profiled, bytecode):
@@ -178,6 +178,6 @@
ref = w_code.jit_cells[pos << 1]
if not ref:
ref = jit_hooks.new_jitcell()
- w_code.jit_cells[pos << 1] = ref
+ w_code.jit_cells[pos << 1] = cast_base_ptr_to_instance(BaseJitCell,
ref)
jitcell = cast_base_ptr_to_instance(BaseJitCell, ref)
jitcell.counter = value
diff --git a/rpython/rlib/jit_hooks.py b/rpython/rlib/jit_hooks.py
--- a/rpython/rlib/jit_hooks.py
+++ b/rpython/rlib/jit_hooks.py
@@ -4,6 +4,7 @@
cast_base_ptr_to_instance, llstr)
from rpython.rtyper.extregistry import ExtRegistryEntry
from rpython.rtyper.lltypesystem import llmemory, lltype, rclass
+from rpython.rtyper.lltypesystem.rclass import OBJECTPTR
def register_helper(s_result):
@@ -135,7 +136,7 @@
from rpython.jit.metainterp.history import Const
return isinstance(_cast_to_box(llbox), Const)
-@register_helper(annmodel.SomePtr(llmemory.GCREF))
+@register_helper(annmodel.SomePtr(OBJECTPTR))
def new_jitcell():
from rpython.jit.metainterp.warmstate import JitCell
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit