[pypy-svn] r71300 - pypy/trunk/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Thu Feb 18 17:05:35 CET 2010


Author: arigo
Date: Thu Feb 18 17:05:33 2010
New Revision: 71300

Modified:
   pypy/trunk/pypy/jit/metainterp/optimizeopt.py
Log:
A case that should not occur, but which I've seen just once.


Modified: pypy/trunk/pypy/jit/metainterp/optimizeopt.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/optimizeopt.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/optimizeopt.py	Thu Feb 18 17:05:33 2010
@@ -197,7 +197,18 @@
         self._fields[ofs] = fieldvalue
 
     def _really_force(self):
-        assert self.source_op is not None
+        if self.source_op is None:
+            # this case should not occur; I only managed to get it once
+            # in pypy-c-jit and couldn't reproduce it.  The point is
+            # that it relies on optimizefindnode.py computing exactly
+            # the right level of specialization, and it seems that there
+            # is still a corner case where it gets too specialized for
+            # optimizeopt.py.  Let's not crash in release-built
+            # pypy-c-jit's.  XXX find out when
+            from pypy.rlib.debug import ll_assert
+            ll_assert(False, "_really_force: source_op is None")
+            raise InvalidLoop
+        #
         newoperations = self.optimizer.newoperations
         newoperations.append(self.source_op)
         self.box = box = self.source_op.result



More information about the Pypy-commit mailing list