Author: Armin Rigo <[email protected]>
Branch:
Changeset: r69416:8ccaadbf0ecf
Date: 2014-02-25 12:58 +0100
http://bitbucket.org/pypy/pypy/changeset/8ccaadbf0ecf/
Log: More precise crash, better explanation
diff --git a/rpython/jit/codewriter/call.py b/rpython/jit/codewriter/call.py
--- a/rpython/jit/codewriter/call.py
+++ b/rpython/jit/codewriter/call.py
@@ -240,13 +240,19 @@
extraeffect = EffectInfo.EF_CAN_RAISE
else:
extraeffect = EffectInfo.EF_CANNOT_RAISE
- else:
- assert not loopinvariant, (
+ #
+ # check that the result is really as expected
+ if loopinvariant:
+ assert extraeffect == EffectInfo.EF_LOOPINVARIANT, (
"in operation %r: this calls a _jit_loop_invariant_ function,"
- " but it can have random effects")
- assert not elidable, (
+ " but this contradicts other sources (e.g. it can have random"
+ " effects)" % (op,))
+ if elidable:
+ assert extraeffect in (EffectInfo.EF_ELIDABLE_CANNOT_RAISE,
+ EffectInfo.EF_ELIDABLE_CAN_RAISE), (
"in operation %r: this calls an _elidable_function_,"
- " but it can have random effects")
+ " but this contradicts other sources (e.g. it can have random"
+ " effects)" % (op,))
#
effectinfo = effectinfo_from_writeanalyze(
self.readwrite_analyzer.analyze(op, self.seen), self.cpu,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit