mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2024-11-21 14:18:57 -07:00
No description
5bfb218505
This is a first try at redundant jump removal (jumps that target the very next instruction). It's too basic in several ways. - The statement is replaced by a ';' instead of removed. - If the jump was the only statement in an if, when the if becomes empty, it's not folded. - Jumps that are last in the 'then' branch of if+else are not visible. This would need either to track multiple last statements, or to have some means to anticipate what the next statement is at every statement. A Control Flow Graph would help a lot. - When a label is immediately followed by a jump, all jumps to that label should target the destination of that jump if it's in scope. Added to TODO. - It misses some optimizations when not expanding WHILE and FOR into IF/JUMP. Moving everything to an earlier stage would help with some of these, especially with ';' and 'if' folding. Unconditionally expanding WHILE and FOR would also help. |
||
---|---|---|
lslopt | ||
unit_tests | ||
.gitignore | ||
builtins-unittest.txt | ||
builtins.txt | ||
COPYING | ||
fndata.txt | ||
main.py | ||
README.md | ||
run-tests.py | ||
testfuncs.py | ||
testparser.py |
LSL PyOptimizer
LSL PyOptimizer is a LSL2 script optimizer written in Python 2. Currently it only supports code memory optimization (no speed optimization), only for Mono (no LSO), and only for the Second Life flavour of LSL (no OpenSim etc.).
HTML introduction, list of features and documentation available at http://lsl.blacktulip-virtual.com/lsl-pyoptimizer/