Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r76828:b1dac6be879a
Date: 2015-04-18 21:09 +0200
http://bitbucket.org/pypy/pypy/changeset/b1dac6be879a/

Log:    Explain this assertion error. Maybe it would be better to simply
        ignore the operation if vinfo is None, but I feel that this really
        occurs only in case of mistake.

diff --git a/rpython/jit/codewriter/jtransform.py 
b/rpython/jit/codewriter/jtransform.py
--- a/rpython/jit/codewriter/jtransform.py
+++ b/rpython/jit/codewriter/jtransform.py
@@ -1972,7 +1972,10 @@
     def rewrite_op_jit_force_virtualizable(self, op):
         # this one is for virtualizables
         vinfo = self.get_vinfo(op.args[0])
-        assert vinfo is not None
+        assert vinfo is not None, (
+            "%r is a class with _virtualizable_, but no jitdriver was found"
+            " with a 'virtualizable' argument naming a variable of that class"
+            % op.args[0].concretetype)
         self.vable_flags[op.args[0]] = op.args[2].value
         return []
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to