mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Avoid a possibly unnecessary expansion
When transforming if(!non-bool | !bool) to if(!(non-bool & -bool)), don't negate the bool if non-bool is actually an AND-bool.
This commit is contained in:
parent
c9f73bd429
commit
b329b2b28e
1 changed files with 1 additions and 1 deletions
|
@ -504,7 +504,7 @@ class foldconst(object):
|
|||
if not self.IsBool(child[b].ch[0]):
|
||||
a, b = 1, 0
|
||||
if self.IsBool(child[b].ch[0]):
|
||||
if not self.IsBool(child[a].ch[0]):
|
||||
if not self.IsAndBool(child[a].ch[0]):
|
||||
child[b].ch[0] = nr(nt='NEG', t='integer',
|
||||
ch=[child[b].ch[0]])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue