Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r88481:a17f5a7b79d0
Date: 2016-11-19 18:06 +0100
http://bitbucket.org/pypy/pypy/changeset/a17f5a7b79d0/
Log: this case is optimized as well, now that we don't need to search the
frame chain.
diff --git a/pypy/module/sys/test/test_sysmodule.py
b/pypy/module/sys/test/test_sysmodule.py
--- a/pypy/module/sys/test/test_sysmodule.py
+++ b/pypy/module/sys/test/test_sysmodule.py
@@ -908,12 +908,15 @@
def test_call_in_subfunction(self):
import sys
def g():
- # this case is not optimized, because we need to search the
- # frame chain. it's probably not worth the complications
+ # new in PyPy3: this case is optimized as well, now that we
+ # don't need to search the frame chain. This can be
+ # regarded as an advantage of the PyPy3 sys_exc_info stored
+ # on the ExecutionContext: although it forces the exception
+ # itself more often, it forces frames less often.
return sys.exc_info()[1]
e = KeyError("boom")
try:
raise e
except:
assert g() is e
- test_call_in_subfunction.expected = 'n'
+ test_call_in_subfunction.expected = 'y'
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit