No description
Find a file
Sei Lisa 5bfb218505 Perform redundant jump elimination in lastpass
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.
2019-01-06 22:32:19 +01:00
lslopt Perform redundant jump elimination in lastpass 2019-01-06 22:32:19 +01:00
unit_tests Perform redundant jump elimination in lastpass 2019-01-06 22:32:19 +01:00
.gitignore Yet another follow-up to 2f4f403 (lslcalc support) 2016-12-15 04:15:26 +01:00
builtins-unittest.txt Get rid of builtins.txt.dat by adding a parameter to the parser ctor. 2015-07-09 20:35:14 +02:00
builtins.txt Upstream version of builtins.txt; update fndata.txt 2018-12-08 19:30:26 +01:00
COPYING Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
fndata.txt New copyright year 2019-01-01 22:54:34 +01:00
main.py Disable inline by default, due to the impact it has on WHILE/FOR loops 2019-01-06 01:18:14 +01:00
README.md Update link to point to lsl.blacktulip-virtual.com instead of lsl.project.zone 2018-01-18 15:41:28 +01:00
run-tests.py Make mismatches fail with assertTrue instead of assertEqual 2019-01-05 22:50:12 +01:00
testfuncs.py New copyright year 2019-01-01 22:54:34 +01:00
testparser.py Fix some comments 2019-01-02 00:38:44 +01:00

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/