Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79274:96a9549fcabf
Date: 2015-08-28 12:07 +0200
http://bitbucket.org/pypy/pypy/changeset/96a9549fcabf/
Log: fix the case of bound <-> no bound comparisons
diff --git a/rpython/jit/metainterp/optimizeopt/virtualstate.py
b/rpython/jit/metainterp/optimizeopt/virtualstate.py
--- a/rpython/jit/metainterp/optimizeopt/virtualstate.py
+++ b/rpython/jit/metainterp/optimizeopt/virtualstate.py
@@ -3,7 +3,7 @@
from rpython.jit.metainterp.optimizeopt.info import ArrayPtrInfo,\
ArrayStructInfo, AbstractStructPtrInfo
from rpython.jit.metainterp.optimizeopt.intutils import \
- MININT, MAXINT, IntBound
+ MININT, MAXINT, IntBound, IntLowerBound
from rpython.jit.metainterp.resoperation import rop, ResOperation,\
InputArgInt, InputArgRef, InputArgFloat
from rpython.rlib.debug import debug_print
@@ -391,9 +391,13 @@
extra_guards = state.extra_guards
cpu = state.cpu
- if (self.lenbound and other.lenbound and
- not self.lenbound.contains_bound(other.lenbound)):
- raise VirtualStatesCantMatch("length bound does not match")
+ if self.lenbound:
+ if other.lenbound is None:
+ other_bound = IntLowerBound(0)
+ else:
+ other_bound = other.lenbound
+ if not self.lenbound.contains_bound(other_bound):
+ raise VirtualStatesCantMatch("length bound does not match")
if self.level == LEVEL_UNKNOWN:
# confusingly enough, this is done also for pointers
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit