No description
Find a file
Sei Lisa 9d540798b4 Allow returning void expressions where state changes are allowed
In the same places as state changes are allowed, i.e. in places where a parent of the AST node is a WHILE/DO/FOR or an IF without ELSE, it's allowed to use return statements with expressions that return void, e.g. llDie(), provided the function itself is declared as returning void.

The construction, when found, is rewritten to '{<void expression>; return;}' because the optimizer is not designed to deal with these monsters.

We've renamed the variable SuspiciousStSw to PruneBug, because it's used for both purposes now, though a better name might have been PruneBugPendingChecks, because these are only errors if the IF has an ELSE. We've also added the exception to raise as part of the data stored in the list.

Per report by Tonaie Resident.
2019-05-01 04:28:58 +02:00
lslopt Allow returning void expressions where state changes are allowed 2019-05-01 04:28:58 +02:00
pcpp@ed3b3f02e8 Update to latest pcpp (fixes __LINE__) 2019-01-18 16:46:12 +01:00
unit_tests Allow returning void expressions where state changes are allowed 2019-05-01 04:28:58 +02:00
.gitignore Add the outfile.tmp file generated by a test to .gitignore 2019-01-15 23:22:02 +01:00
.gitmodules Don't report pcpp as modified if it has untracked files 2019-01-12 20:33:52 +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 New upstream version of builtins.txt 2019-02-23 02:06:03 +01:00
COPYING Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
cpreproc.py Fix non-compliance problem with octal/hex literals without U suffix 2019-01-21 16:28:15 +01:00
fndata.txt Add missing functions to fndata.txt 2019-02-08 18:30:33 +01:00
main.py The encoding of sys.stderr can exist and be None. 2019-05-01 01:22:54 +02: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 Allow returning void expressions where state changes are allowed 2019-05-01 04:28:58 +02:00
strutil.py Style fixes 2019-02-04 00:07:12 +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/