Author: Armin Rigo <[email protected]>
Branch: continulet-jit-3
Changeset: r58133:a76d3d679e8a
Date: 2012-10-15 16:33 +0200
http://bitbucket.org/pypy/pypy/changeset/a76d3d679e8a/
Log: in-progress
diff --git a/pypy/jit/backend/llgraph/llimpl.py
b/pypy/jit/backend/llgraph/llimpl.py
--- a/pypy/jit/backend/llgraph/llimpl.py
+++ b/pypy/jit/backend/llgraph/llimpl.py
@@ -1064,33 +1064,10 @@
raise Exception("Nonsense type %s" % TYPE)
subframe = self.cpu._execute_token(loop_token)
- jd = loop_token.outermost_jitdriver_sd
- assert jd is not None, ("call_assembler(): the loop_token needs "
- "to have 'outermost_jitdriver_sd'")
- if jd.index_of_virtualizable != -1:
- vable = args[jd.index_of_virtualizable]
- else:
- vable = lltype.nullptr(llmemory.GCREF.TO)
- #
- # Emulate the fast path
- failindex = frame_descr_index(subframe)
- if failindex == self.cpu.done_with_this_frame_int_v:
- reset_vable(jd, vable)
- return self.cpu.get_latest_value_int(subframe, 0)
- if failindex == self.cpu.done_with_this_frame_ref_v:
- reset_vable(jd, vable)
- return self.cpu.get_latest_value_ref(subframe, 0)
- if failindex == self.cpu.done_with_this_frame_float_v:
- reset_vable(jd, vable)
- return self.cpu.get_latest_value_float(subframe, 0)
- if failindex == self.cpu.done_with_this_frame_void_v:
- reset_vable(jd, vable)
- return None
- #
assembler_helper_ptr = jd.assembler_helper_adr.ptr # fish
assembler_helper = assembler_helper_ptr._obj._callable
try:
- return assembler_helper(subframe, vable)
+ return assembler_helper(subframe)
except LLException, lle:
assert self._last_exception is None, "exception left behind"
self._last_exception = lle
@@ -1845,6 +1822,7 @@
return 0
def reset_vable(jd, vable):
+ xxxxxxxxxxxxx
if jd.index_of_virtualizable != -1:
fielddescr = jd.jit_frame_descr
do_setfield_gc_ptr(vable, fielddescr.ofs,
diff --git a/pypy/jit/backend/llsupport/jitframe.py
b/pypy/jit/backend/llsupport/jitframe.py
new file mode 100644
--- /dev/null
+++ b/pypy/jit/backend/llsupport/jitframe.py
@@ -0,0 +1,10 @@
+
+
+_LONGLONGARRAY = lltype.GcArray(lltype.SignedLongLong)
+
+JITFRAME = lltype.GcStruct('JITFRAME',
+ ('jf_descr', llmemory.GCREF),
+ ('jf_excvalue', llmemory.GCREF),
+ ('jf_nongcvalues', lltype.Ptr(_LONGLONGARRAY)),
+ ('jf_gcvalues', lltype.Array(llmemory.GCREF)))
+JITFRAMEPTR = lltype.Ptr(JITFRAME)
diff --git a/pypy/jit/metainterp/test/test_recursive.py
b/pypy/jit/metainterp/test/test_recursive.py
--- a/pypy/jit/metainterp/test/test_recursive.py
+++ b/pypy/jit/metainterp/test/test_recursive.py
@@ -6,8 +6,8 @@
from pypy.jit.metainterp.test.support import LLJitMixin, OOJitMixin
from pypy.jit.codewriter.policy import StopAtXPolicy
from pypy.rpython.annlowlevel import hlstr
+from pypy.rpython.lltypesystem import llmemory
from pypy.jit.metainterp.warmspot import get_stats
-from pypy.jit.metainterp.jitframe import JITFRAMEPTR
class RecursiveTests:
@@ -824,7 +824,7 @@
# at the level 2 is set to a non-zero value when doing the
# call to the level 3 only. This used to fail when the test
# is run via pypy.jit.backend.x86.test.test_recursive.
- assert ll_subframe.jit_frame == lltype.nullptr(JITFRAMEPTR.TO)
+ assert ll_subframe.jit_frame == lltype.nullptr(llmemory.GCREF.TO)
def main(codeno):
frame = Frame()
diff --git a/pypy/jit/metainterp/test/test_warmspot.py
b/pypy/jit/metainterp/test/test_warmspot.py
--- a/pypy/jit/metainterp/test/test_warmspot.py
+++ b/pypy/jit/metainterp/test/test_warmspot.py
@@ -6,7 +6,6 @@
from pypy.jit.metainterp.test.support import LLJitMixin, OOJitMixin
from pypy.jit.metainterp.optimizeopt import ALL_OPTS_NAMES
-from pypy.jit.metainterp.jitframe import JITFRAMEPTR
class Exit(Exception):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit