[pypy-commit] pypy default: Corner case, probably not testable, if we get a bound that has no lower
arigo
pypy.commits at gmail.com
Tue Apr 4 14:48:56 EDT 2017
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r90949:d7fc76979470
Date: 2017-04-04 20:32 +0200
http://bitbucket.org/pypy/pypy/changeset/d7fc76979470/
Log: Corner case, probably not testable, if we get a bound that has no
lower bound but a greater-than-zero 'lower' value (which should not
be read). Worst case here is that we'd generate a dummy STRLEN.
diff --git a/rpython/jit/metainterp/optimizeopt/vstring.py b/rpython/jit/metainterp/optimizeopt/vstring.py
--- a/rpython/jit/metainterp/optimizeopt/vstring.py
+++ b/rpython/jit/metainterp/optimizeopt/vstring.py
@@ -122,7 +122,8 @@
def make_guards(self, op, short, optimizer):
info.AbstractVirtualPtrInfo.make_guards(self, op, short, optimizer)
- if self.lenbound and self.lenbound.lower >= 1:
+ if (self.lenbound and
+ self.lenbound.has_lower and self.lenbound.lower >= 1):
if self.mode is mode_string:
lenop = ResOperation(rop.STRLEN, [op])
else:
More information about the pypy-commit
mailing list