mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
if (!cond) X; else Y; -> if (cond) Y; else X; if (int1 == int2) X; else Y; -> if (int1 ^ int2) Y; else X; When 'cond' is of a type other than 'key': if (cond) ; else X; -> if (!cond) X; (this required changing if(str) to its compiled equivalent if(!(str == "")), so that 'cond' is always either key or integer). if (cond) ; -> cond; and folds it as a statement, which may eliminate it if it's SEF. This is done after eliminating 'else ;' so that it also optimizes 'if (cond) ; else ;' the same way. This removes a TODO item. |
||
---|---|---|
.. | ||
__init__.py | ||
lslbasefuncs.py | ||
lslcommon.py | ||
lsldeadcode.py | ||
lslextrafuncs.py | ||
lslfoldconst.py | ||
lslfuncopt.py | ||
lslfuncs.py | ||
lsljson.py | ||
lsllastpass.py | ||
lslloadlib.py | ||
lsloptimizer.py | ||
lsloutput.py | ||
lslparse.py | ||
lslrenamer.py |