[pypy-commit] pypy small-unroll-improvements: bad handling in one place
cfbolz
noreply at buildbot.pypy.org
Tue Apr 8 18:10:09 CEST 2014
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: small-unroll-improvements
Changeset: r70489:de9db9c889d3
Date: 2014-04-08 17:50 +0200
http://bitbucket.org/pypy/pypy/changeset/de9db9c889d3/
Log: bad handling in one place
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
@@ -41,10 +41,13 @@
'virtual states but not in the other.')
else:
renum[self.position] = other.position
- self._generate_guards(other, value, cpu, extra_guards, renum, bad)
+ try:
+ self._generate_guards(other, value, cpu, extra_guards, renum, bad)
+ except InvalidLoop:
+ bad[self] = bad[other] = None
+ raise
def _generate_guards(self, other, value, cpu, extra_guards, renum, bad):
- bad[self] = bad[other] = None
raise InvalidLoop('Generating guards for making the VirtualStates ' +
'at hand match have not been implemented')
@@ -284,13 +287,11 @@
def _generate_guards(self, other, value, cpu, extra_guards, renum, bad):
box = value.box
if not isinstance(other, NotVirtualStateInfo):
- bad[self] = bad[other] = None
raise InvalidLoop('The VirtualStates does not match as a ' +
'virtual appears where a pointer is needed ' +
'and it is too late to force it.')
if self.is_opaque:
- bad[self] = bad[other] = None
raise InvalidLoop('Generating guards for opaque pointers is not safe')
if self.lenbound and not self.lenbound.generalization_of(other.lenbound):
@@ -369,7 +370,6 @@
raise InvalidLoop("XXX")
if self.lenbound or other.lenbound:
- bad[self] = bad[other] = None
raise InvalidLoop('The array length bounds does not match.')
More information about the pypy-commit
mailing list