mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Refine a comment.
Powers of two can't be zero anyway.
This commit is contained in:
parent
4ba71993a4
commit
106bb81543
1 changed files with 2 additions and 2 deletions
|
@ -322,8 +322,8 @@ class foldconst(object):
|
|||
return
|
||||
del a, b
|
||||
|
||||
# Specific optimization to catch a bitwise test appearing frequently.
|
||||
# If b and c are nonzero constant powers of two:
|
||||
# Specific optimization to catch a frequent bitwise test.
|
||||
# If b and c are constant powers of two:
|
||||
# !(a & b) | !(a & c) -> ~(a|~(b|c))
|
||||
# e.g. if (a & 4 && a & 8) -> if (!~(a|-13))
|
||||
if (child[0]['nt'] == '!' and child[0]['ch'][0]['nt'] == '&'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue