LSL-PyOptimizer/lslopt
Sei Lisa e123866e6e Apply DeMorgan in some cases that were not caught.
Example: the optimization of if(i < 2 || i) was suboptimal, because FoldTree was done before FoldCond. In a first stage, the || was removed: if(!!(i < 2 | i)); when folded, the inner ! was optimized first and the result was if(!(1 < i & (!i))), which FoldCond wasn't smart enough to handle.

The new optimization takes over from there, and converts if(!(!a & b)) with b boolean, in any order, to if(a | !b). When applied to the above expression, it gets folded to if(i < 2 | i) as expected, which is optimal.

Also, new function: IsAndBool (see docstring), used on b in the above example.
2018-12-24 17:18:48 +01:00
..
__init__.py Initial commit. Status so far: 2014-07-26 02:43:44 +02:00
lslbasefuncs.py Refine the denormal check for Mono 2018-05-09 19:04:09 +02:00
lslcommon.py Remove commented-out print_node function (superseded by nr.__str__) 2018-06-07 02:14:15 +02:00
lsldeadcode.py Get rid of DoesSomething() in favour of SEF 2018-05-17 09:08:48 +02:00
lslextrafuncs.py Bump copyright year 2018-03-23 16:36:45 +01:00
lslfoldconst.py Apply DeMorgan in some cases that were not caught. 2018-12-24 17:18:48 +01:00
lslfuncopt.py Reorganize the checks, and eliminate the fn call check 2018-12-22 10:27:37 +01:00
lslfuncs.py Bump copyright year 2018-03-23 16:36:45 +01:00
lsljson.py Bump copyright year 2018-03-23 16:36:45 +01:00
lsllastpass.py Change the AST node type from dict to object 2018-04-01 02:14:00 +02:00
lslloadlib.py Add 'listto' to fndata.txt; remove more magic names from the code 2018-12-22 15:44:14 +01:00
lsloptimizer.py Change the AST node type from dict to object 2018-04-01 02:14:00 +02:00
lsloutput.py Add blank lines to make the output somewhat prettier 2018-12-23 18:12:10 +01:00
lslparse.py Add 'listto' to fndata.txt; remove more magic names from the code 2018-12-22 15:44:14 +01:00
lslrenamer.py Change the AST node type from dict to object 2018-04-01 02:14:00 +02:00