Author: Armin Rigo <[email protected]>
Branch:
Changeset: r48096:07c72584eb47
Date: 2011-10-16 23:08 +0200
http://bitbucket.org/pypy/pypy/changeset/07c72584eb47/
Log: Checking in a test for the previous fix. It fails with tonight's
pypy-c; hopefully it will pass with next night's.
diff --git a/pypy/module/pypyjit/test_pypy_c/test_misc.py
b/pypy/module/pypyjit/test_pypy_c/test_misc.py
--- a/pypy/module/pypyjit/test_pypy_c/test_misc.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_misc.py
@@ -329,4 +329,20 @@
guard_false(i28, descr=...)
i30 = int_lshift(i20, 24)
i31 = int_or(i26, i30)
- """ % {"32_bit_only": extra})
\ No newline at end of file
+ """ % {"32_bit_only": extra})
+
+ def test_eval(self):
+ def main():
+ i = 1
+ a = compile('x+x+x+x+x+x', 'eval', 'eval')
+ b = {'x': 7}
+ while i < 1000:
+ y = eval(a,b,b) # ID: eval
+ i += 1
+ return y
+
+ log = self.run(main)
+ assert log.result == 42
+ # the following assertion fails if the loop was cancelled due
+ # to "abort: vable escape"
+ assert len(log.loops_by_id("eval")) == 1
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit