Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r69418:040f3ac28afb
Date: 2014-02-25 14:02 +0100
http://bitbucket.org/pypy/pypy/changeset/040f3ac28afb/

Log:    Replace the crash with a warning for now

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
@@ -243,13 +243,15 @@
         #
         # check that the result is really as expected
         if loopinvariant:
-            assert extraeffect == EffectInfo.EF_LOOPINVARIANT, (
+            if extraeffect != EffectInfo.EF_LOOPINVARIANT:
+                from rpython.jit.codewriter.policy import log; log.WARNING(
                 "in operation %r: this calls a _jit_loop_invariant_ function,"
                 " 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), (
+            if extraeffect not in (EffectInfo.EF_ELIDABLE_CANNOT_RAISE,
+                                   EffectInfo.EF_ELIDABLE_CAN_RAISE):
+                from rpython.jit.codewriter.policy import log; log.WARNING(
                 "in operation %r: this calls an _elidable_function_,"
                 " but this contradicts other sources (e.g. it can have random"
                 " effects)" % (op,))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to