Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r75989:92e947fa8014
Date: 2015-02-19 00:39 +0100
http://bitbucket.org/pypy/pypy/changeset/92e947fa8014/
Log: Kill the mostly pointless sharing of PropagateExceptionDescr(). It
is wrong now! The backend assumes it can store
_x86_stm_guard_failure on the guard's descrs. Check added.
diff --git a/rpython/jit/backend/x86/assembler.py
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -1983,6 +1983,9 @@
p.fail_descr = fail_descr
p.jump_target = target
p.gcmap = guardtok.gcmap
+ # xxx this code is only translated, so the following check is
+ # good enough to say "nobody stored _x86_stm_guard_failure yet"
+ assert not guardtok.faildescr._x86_stm_guard_failure
guardtok.faildescr._x86_stm_guard_failure = p
addr = rffi.cast(lltype.Signed, p)
addr += llmemory.offsetof(STM_GUARD_FAILURE, 'jump_target')
diff --git a/rpython/jit/metainterp/compile.py
b/rpython/jit/metainterp/compile.py
--- a/rpython/jit/metainterp/compile.py
+++ b/rpython/jit/metainterp/compile.py
@@ -882,7 +882,7 @@
finishargs = []
#
jd = jitdriver_sd
- faildescr = jitdriver_sd.propagate_exc_descr
+ faildescr = PropagateExceptionDescr()
operations = [
ResOperation(rop.CALL, callargs, result, descr=jd.portal_calldescr),
ResOperation(rop.GUARD_NO_EXCEPTION, [], None, descr=faildescr),
diff --git a/rpython/jit/metainterp/jitdriver.py
b/rpython/jit/metainterp/jitdriver.py
--- a/rpython/jit/metainterp/jitdriver.py
+++ b/rpython/jit/metainterp/jitdriver.py
@@ -20,7 +20,6 @@
# self.no_loop_header ... rpython.jit.metainterp.warmspot
# self.stm_report_location.. rpython.jit.metainterp.warmspot
# self.portal_finishtoken... rpython.jit.metainterp.pyjitpl
- # self.propagate_exc_descr.. rpython.jit.metainterp.pyjitpl
# self.index ... rpython.jit.codewriter.call
# self.mainjitcode ... rpython.jit.codewriter.call
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
@@ -1628,7 +1628,6 @@
#
# store this information for fastpath of call_assembler
# (only the paths that can actually be taken)
- exc_descr = compile.PropagateExceptionDescr()
for jd in self.jitdrivers_sd:
name = {history.INT: 'int',
history.REF: 'ref',
@@ -1636,9 +1635,6 @@
history.VOID: 'void'}[jd.result_type]
tokens = getattr(self, 'loop_tokens_done_with_this_frame_%s' %
name)
jd.portal_finishtoken = tokens[0].finishdescr
- jd.propagate_exc_descr = exc_descr
- #
- self.cpu.propagate_exception_descr = exc_descr
#
self.globaldata = MetaInterpGlobalData(self)
diff --git a/rpython/jit/metainterp/test/test_compile.py
b/rpython/jit/metainterp/test/test_compile.py
--- a/rpython/jit/metainterp/test/test_compile.py
+++ b/rpython/jit/metainterp/test/test_compile.py
@@ -121,7 +121,6 @@
portal_runner_adr = llmemory.cast_ptr_to_adr(portal_runner_ptr)
portal_calldescr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT, None)
portal_finishtoken = compile.DoneWithThisFrameDescrInt()
- propagate_exc_descr = compile.PropagateExceptionDescr()
num_red_args = 2
result_type = INT
#
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit