Antoine Pitrou wrote: > Thomas Lee <tom <at> vector-seven.com> writes: > >> By the way, you were right about JUMP_IF_TRUE/JUMP_IF_FALSE. It's far >> too late. Apologies. >> >> I'm still pretty sure this is the peepholer's doing, >> > > Yes indeed. > > >> Which is what's being achieved with the AST optimization I originally >> proposed, right? >> > > Well, not exactly, your optimization eliminates the UNARY_NOT by swapping the > if/else blocks, while the peepholer eliminates the UNARY_NOT by fusing it with > the subsequent jump opcode. In this case it doesn't make much of a difference, > but if there is only an "if" without an "else", the peepholer's optimization is > still possible while yours is not. > > Unless a pass is injected into the if body, which will generate no additional bytecode and still have the same net effect. > (bottom line: the peepholer is not dead!) > > We'll see ;) Thanks for all your help, I'm looking forward to getting my hands on that patch. Cheers, T
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4