Message177013
(2.6 is security fix only)
Stripping truly dead code after return is really tricky in general because
a) it might be in a conditional block, and
b) unreachable yield and assignment can affect compilation.
Assignments that make names local are detected on a first pass, but I do not know about yield. Anyway, I believe the policy has been to not do it.
The final patch will need a cpython-only test based on g(x), with dead code.
Possibly intersecting issues are proposals to change where optimization is done and, for testing, to add a generator to dis so its output can be directly captured and analyzed instead of having to redirect, capture, and parse stdout. |
|
Date |
User |
Action |
Args |
2012-12-05 22:39:06 | terry.reedy | set | recipients:
+ terry.reedy, brett.cannon, georg.brandl, ncoghlan, ikelly, Horpner, benjamin.peterson, mrabarnett, steven.daprano, alex, cvrebert, python-dev, DragonFireCK, bruno.dupuis |
2012-12-05 22:39:06 | terry.reedy | set | messageid: <1354747146.96.0.0540996081195.issue16619@psf.upfronthosting.co.za> |
2012-12-05 22:39:06 | terry.reedy | link | issue16619 messages |
2012-12-05 22:39:06 | terry.reedy | create | |
|