LSL-PyOptimizer/lslopt
Sei Lisa 097c054494 Optimize 'if' statements better.
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.
2017-10-30 19:23:01 +01:00
..
__init__.py Initial commit. Status so far: 2014-07-26 02:43:44 +02:00
lslbasefuncs.py Fix compare and llListSort for LSO. 2017-10-21 12:32:41 +02:00
lslcommon.py Internal code reorganization. 2017-10-20 18:19:48 +02:00
lsldeadcode.py Remove "magic names" where possible, using new data from fndata.txt 2017-10-27 23:39:26 +02:00
lslextrafuncs.py Remove "magic names" where possible, using new data from fndata.txt 2017-10-27 23:39:26 +02:00
lslfoldconst.py Optimize 'if' statements better. 2017-10-30 19:23:01 +01:00
lslfuncopt.py Comment fix. 2017-10-20 10:18:44 +02:00
lslfuncs.py Bump copyright year. 2017-08-09 19:45:46 +02:00
lsljson.py Change strategy for the checking of function input types. 2017-10-12 17:16:16 +02:00
lsllastpass.py Minor cleanups; no functional changes. 2017-09-22 15:42:42 +02:00
lslloadlib.py Implement flags aimed at removing "magic names" in the code. 2017-10-27 18:49:58 +02:00
lsloptimizer.py Remove "magic names" where possible, using new data from fndata.txt 2017-10-27 23:39:26 +02:00
lsloutput.py Add a space between a minus sign and a negative constant. 2017-10-27 21:02:00 +02:00
lslparse.py Add side-effect-free information for events. 2017-10-25 17:46:50 +02:00
lslrenamer.py Reuse state names for function parameters; restart UsedNames. 2017-10-28 23:39:25 +02:00