[pypy-svn] r30746 - in pypy/dist/pypy/translator/stackless: . test
mwh at codespeak.net
mwh at codespeak.net
Sun Jul 30 20:18:29 CEST 2006
Author: mwh
Date: Sun Jul 30 20:18:27 2006
New Revision: 30746
Modified:
pypy/dist/pypy/translator/stackless/test/test_resume_point.py
pypy/dist/pypy/translator/stackless/transform.py
Log:
at least SAY which resume point doesn't cover enough values!
Modified: pypy/dist/pypy/translator/stackless/test/test_resume_point.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/test/test_resume_point.py (original)
+++ pypy/dist/pypy/translator/stackless/test/test_resume_point.py Sun Jul 30 20:18:27 2006
@@ -104,7 +104,8 @@
f(one(),one()+one())
return 0
e = py.test.raises(Exception, transform_stackless_function, example)
- assert e.value.args == ('not covered needed value at resume_point',)
+ msg, = e.value.args
+ assert msg.startswith('not covered needed value at resume_point') and 'rp1' in msg
def test_chained_states():
def g(x, y):
Modified: pypy/dist/pypy/translator/stackless/transform.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/transform.py (original)
+++ pypy/dist/pypy/translator/stackless/transform.py Sun Jul 30 20:18:27 2006
@@ -568,6 +568,9 @@
link = support.split_block_with_keepalive(block, i+1)
i = 0
nextblock = link.target
+
+ label = op.args[0].value
+
parms = op.args[1:]
if not isinstance(parms[0], model.Variable):
assert parms[0].value is None
@@ -575,7 +578,7 @@
args = vars_to_save(block)
for a in args:
if a not in parms:
- raise Exception, "not covered needed value at resume_point"
+ raise Exception, "not covered needed value at resume_point %r"%(label,)
if parms[0] is not None: # returns= case
res = parms[0]
args = [arg for arg in args if arg is not res]
@@ -587,8 +590,6 @@
fieldnames,
varsforcall, saver) = self.frametyper.frame_type_for_vars(parms[1:])
- label = op.args[0].value
-
if label in self.explicit_resume_point_data:
other_type = self.explicit_resume_point_data[label]
assert frame_type == other_type, "inconsistent types for label %r"%(label,)
More information about the Pypy-commit
mailing list