Message316935
| Author |
serhiy.storchaka |
| Recipients |
Sergey.Kirpichev, THRlWiTi, Trip.Volpe, ajaksu2, alex, amaury.forgeotdarc, barry, belopolsky, brett.cannon, diana, eric.araujo, eric.snow, ethan.furman, flox, nedbat, pgimeno, rhettinger, serhiy.storchaka, terry.reedy, tshepang, vstinner |
| Date |
2018年05月17日.14:17:50 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1526566671.04.0.682650639539.issue2506@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Few different optimizations work together here. Folding constants at the AST level allows to eliminate the constant expression statement in the code generation stage. This makes 'continue' a first statement in the 'if' body. Boolean expressions optimizations (performed in the code generation stage now) creates a conditional jump to the start of the 'if' body (which is 'continue' now). If 'continue' is not nested in 'try' or 'with' blocks, it is compiled to an unconditional jump. And finally the jump optimization in the peepholer retargets the conditional jump from the unconditional jump to the start of the loop. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2018年05月17日 14:17:51 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, brett.cannon, rhettinger, terry.reedy, amaury.forgeotdarc, belopolsky, vstinner, ajaksu2, nedbat, eric.araujo, alex, flox, THRlWiTi, ethan.furman, tshepang, eric.snow, diana, Trip.Volpe, pgimeno, Sergey.Kirpichev |
| 2018年05月17日 14:17:51 | serhiy.storchaka | set | messageid: <1526566671.04.0.682650639539.issue2506@psf.upfronthosting.co.za> |
| 2018年05月17日 14:17:51 | serhiy.storchaka | link | issue2506 messages |
| 2018年05月17日 14:17:50 | serhiy.storchaka | create |
|