LSL-PyOptimizer/lslopt
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
..
__init__.py Initial commit. Status so far: 2014-07-26 02:43:44 +02:00
lslbasefuncs.py Style fixes 2019-02-04 00:07:12 +01:00
lslcommon.py Style fixes 2019-02-04 00:07:12 +01:00
lsldeadcode.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lslextrafuncs.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lslfoldconst.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lslfuncopt.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lslfuncs.py Style fixes 2019-02-04 00:07:12 +01:00
lslinliner.py Fix a couple of slips that can cause crashes 2019-02-25 19:59:59 +01:00
lsljson.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lsllastpass.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lslloadlib.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lsloptimizer.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lsloutput.py First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
lslparse.py Allow returning void expressions where state changes are allowed 2019-05-01 04:28:58 +02:00
lslrenamer.py New copyright year 2019-01-01 22:54:34 +01:00