[pypy-commit] pypy default: It seems that in an obscure case, get_constant_class() is called on a

arigo noreply at buildbot.pypy.org
Mon Feb 9 02:51:23 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r75778:97c2a0a39120
Date: 2015-02-09 02:51 +0100
http://bitbucket.org/pypy/pypy/changeset/97c2a0a39120/

Log:	It seems that in an obscure case, get_constant_class() is called on
	a box that is the constant null. Can't reproduce it with small
	tests though...

diff --git a/rpython/jit/metainterp/optimizeopt/optimizer.py b/rpython/jit/metainterp/optimizeopt/optimizer.py
--- a/rpython/jit/metainterp/optimizeopt/optimizer.py
+++ b/rpython/jit/metainterp/optimizeopt/optimizer.py
@@ -304,7 +304,7 @@
         level = self.getlevel()
         if level == LEVEL_KNOWNCLASS:
             return self.known_class
-        elif level == LEVEL_CONSTANT:
+        elif level == LEVEL_CONSTANT and not self.is_null():
             return cpu.ts.cls_of_box(self.box)
         else:
             return None


More information about the pypy-commit mailing list