Author: Maciej Fijalkowski <[email protected]>
Branch: kill-gen-store-back-in
Changeset: r63650:462cd771b59a
Date: 2013-04-26 15:52 +0200
http://bitbucket.org/pypy/pypy/changeset/462cd771b59a/
Log: in-progress
diff --git a/rpython/jit/metainterp/pyjitpl.py
b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -1209,7 +1209,7 @@
CIF_DESCRIPTION_P)
kind, descr, itemsize = get_arg_descr(self.metainterp.cpu,
cif_description.rtype)
-
+
if kind != 'v':
ofs = cif_description.exchange_result
assert ofs % itemsize == 0 # alignment check (result)
@@ -1694,6 +1694,11 @@
def finishframe(self, resultbox):
# handle a non-exceptional return from the current frame
self.last_exc_value_box = None
+ if len(self.framestack) == 1:
+ # we should call store_token_in_vable here and not in
+ # compile_done_with_this_frame, so we have the frame to implement
+ # guard not forced
+ self.store_token_in_vable()
self.popframe()
if self.framestack:
if resultbox is not None:
@@ -2229,7 +2234,6 @@
def compile_done_with_this_frame(self, exitbox):
# temporarily put a JUMP to a pseudo-loop
- self.store_token_in_vable()
sd = self.staticdata
result_type = self.jitdriver_sd.result_type
if result_type == history.VOID:
@@ -2264,6 +2268,8 @@
# in case the force_token has not been recorded, record it here
# to make sure we know the virtualizable can be broken. However, the
# contents of the virtualizable should be generally correct
+ assert len(self.framestack) == 1
+ self.framestack[0].generate_guard(rop.GUARD_NOT_FORCED, None)
self.history.record(rop.FORCE_TOKEN, [], force_token_box)
self.history.record(rop.SETFIELD_GC, [vbox, force_token_box],
None, descr=vinfo.vable_token_descr)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit