LSL-PyOptimizer/unit_tests/regression.suite
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
..
aggressive-local-removal.lsl Add forgotten unit tests for the identifier substitution fiasco 2019-01-11 21:20:21 +01:00
aggressive-local-removal.out Add forgotten unit tests for the identifier substitution fiasco 2019-01-11 21:20:21 +01:00
aggressive-local-removal.run Add forgotten unit tests for the identifier substitution fiasco 2019-01-11 21:20:21 +01:00
assign-x-to-x.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
assign-x-to-x.out Add the new test suite. 2019-01-04 20:27:36 +01:00
assign-x-to-x.run Add the new test suite. 2019-01-04 20:27:36 +01:00
bitshift.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
bitshift.out Add the new test suite. 2019-01-04 20:27:36 +01:00
bitwise.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
bitwise.out Add the new test suite. 2019-01-04 20:27:36 +01:00
boolean-and.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
boolean-and.out Add the new test suite. 2019-01-04 20:27:36 +01:00
boolexpr.lsl Check min and max to determine truth value of condition 2019-01-07 00:15:38 +01:00
boolexpr.out Check min and max to determine truth value of condition 2019-01-07 00:15:38 +01:00
breakcont-n.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
breakcont-n.out Add the new test suite. 2019-01-04 20:27:36 +01:00
breakcont-n.run Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-1.out Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-1.run Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-2.err Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-2.run Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-3.err Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-3.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-3.run Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-4.err Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-4.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-4.run Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-5.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-5.out Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-checks-5.run Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-list2xxx-explicit.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-list2xxx-explicit.out Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-list2xxx-explicit.run Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-list2xxx.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
cast-list2xxx.out Add the new test suite. 2019-01-04 20:27:36 +01:00
chained-assignment.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
chained-assignment.out Add the new test suite. 2019-01-04 20:27:36 +01:00
chained-assignment.run Add the new test suite. 2019-01-04 20:27:36 +01:00
comparetrees.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
comparetrees.out Add the new test suite. 2019-01-04 20:27:36 +01:00
comparison-min-max.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
comparison-min-max.out Add the new test suite. 2019-01-04 20:27:36 +01:00
comparisons.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
comparisons.out Add the new test suite. 2019-01-04 20:27:36 +01:00
comparisons.run Add the new test suite. 2019-01-04 20:27:36 +01:00
computable.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
computable.out Add the new test suite. 2019-01-04 20:27:36 +01:00
computable.run Add the new test suite. 2019-01-04 20:27:36 +01:00
conditions.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
conditions.out Add the new test suite. 2019-01-04 20:27:36 +01:00
declaration-chain-dcr.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
declaration-chain-dcr.out Fix swaps and other misoptimizations 2019-01-11 02:09:15 +01:00
detect-computable.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
detect-computable.out Add the new test suite. 2019-01-04 20:27:36 +01:00
detect-computable.run Add the new test suite. 2019-01-04 20:27:36 +01:00
detect-non-computable.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
detect-non-computable.out Add the new test suite. 2019-01-04 20:27:36 +01:00
detect-non-computable.run Add the new test suite. 2019-01-04 20:27:36 +01:00
dumplist2str.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
dumplist2str.out Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-1.err Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-2.err Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-3.err Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-3.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-4.err Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-4.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-5.err Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-5.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-6.err Add the new test suite. 2019-01-04 20:27:36 +01:00
dup-id-6.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
empty.err Add the new test suite. 2019-01-04 20:27:36 +01:00
empty.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
explicitcast.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
explicitcast.out Add the new test suite. 2019-01-04 20:27:36 +01:00
explicitcast.run Add the new test suite. 2019-01-04 20:27:36 +01:00
expressions-1.err Add the new test suite. 2019-01-04 20:27:36 +01:00
expressions-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
expressions-1.run Add the new test suite. 2019-01-04 20:27:36 +01:00
flow.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
flow.out Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-code.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-code.out Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-1.err Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-2.out Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-2.run Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-3.err Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-3.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-4.err Add the new test suite. 2019-01-04 20:27:36 +01:00
func-in-globals-4.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
func-params-opt.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
func-params-opt.out Add the new test suite. 2019-01-04 20:27:36 +01:00
global-key-in-list-dcr.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
global-key-in-list-dcr.out Add the new test suite. 2019-01-04 20:27:36 +01:00
global-key-in-list-dcr.run Add the new test suite. 2019-01-04 20:27:36 +01:00
global-key-in-list-dcr2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
global-key-in-list-dcr2.out Add the new test suite. 2019-01-04 20:27:36 +01:00
global-key-in-list-no-extgexp.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
global-key-in-list-no-extgexp.out Add the new test suite. 2019-01-04 20:27:36 +01:00
global-key-in-list-no-extgexp.run Add the new test suite. 2019-01-04 20:27:36 +01:00
global-list-in-list-dcr.err Add the new test suite. 2019-01-04 20:27:36 +01:00
global-list-in-list-dcr.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
global-list-in-list-dcr.run Add the new test suite. 2019-01-04 20:27:36 +01:00
global-syntax.err Add the new test suite. 2019-01-04 20:27:36 +01:00
global-syntax.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
global-syntax.run Add the new test suite. 2019-01-04 20:27:36 +01:00
if-stmt.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
if-stmt.out Add the new test suite. 2019-01-04 20:27:36 +01:00
inliner-for-bug.lsl Fix bug in inlining of empty for() initializer 2019-02-02 00:50:05 +01:00
inliner-for-bug.out Fix bug in inlining of empty for() initializer 2019-02-02 00:50:05 +01:00
inliner-for-bug.run Fix bug in inlining of empty for() initializer 2019-02-02 00:50:05 +01:00
inliner-keyerror-bug.lsl Add regression test for the keyerror bug 2019-02-26 02:28:21 +01:00
inliner-keyerror-bug.out Add regression test for the keyerror bug 2019-02-26 02:28:21 +01:00
inliner-keyerror-bug.run Add regression test for the keyerror bug 2019-02-26 02:28:21 +01:00
invalid-options.err Add the new test suite. 2019-01-04 20:27:36 +01:00
invalid-options.run Add the new test suite. 2019-01-04 20:27:36 +01:00
issue-3.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
issue-3.out Add the new test suite. 2019-01-04 20:27:36 +01:00
issue-5.err Add the new test suite. 2019-01-04 20:27:36 +01:00
issue-5.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-next-stmt.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-next-stmt.out Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-next-stmt.run Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-single-stmt-dcr.err Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-single-stmt-dcr.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-single-stmt-dcr.run Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-single-stmt.err Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-single-stmt.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
jump-single-stmt.run Add the new test suite. 2019-01-04 20:27:36 +01:00
lazylist-in-for.err Add the new test suite. 2019-01-04 20:27:36 +01:00
lazylist-in-for.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
lazylist-in-for.run Add the new test suite. 2019-01-04 20:27:36 +01:00
list-in-list-code.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list-in-list-code.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list-in-list-code.run Add the new test suite. 2019-01-04 20:27:36 +01:00
list-in-list-globals.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list-in-list-globals.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list-in-list-globals.run Add the new test suite. 2019-01-04 20:27:36 +01:00
list-length-cond.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list-length-cond.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list-plus-elem.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list-plus-elem.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list2xxx-objectdetails.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list2xxx-objectdetails.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list2xxx-objectdetails.run Add the new test suite. 2019-01-04 20:27:36 +01:00
list2xxx-primparams.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list2xxx-primparams.out Add the new test suite. 2019-01-04 20:27:36 +01:00
listadd.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
listadd.out Add the new test suite. 2019-01-04 20:27:36 +01:00
listlength-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
listlength-1.out Add the new test suite. 2019-01-04 20:27:36 +01:00
listlength-1.run Add the new test suite. 2019-01-04 20:27:36 +01:00
listlength-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
listlength-2.out Add the new test suite. 2019-01-04 20:27:36 +01:00
lldialog.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
lldialog.out Add the new test suite. 2019-01-04 20:27:36 +01:00
local-key-in-list-dcr.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
local-key-in-list-dcr.out Add the new test suite. 2019-01-04 20:27:36 +01:00
loops.err Add the new test suite. 2019-01-04 20:27:36 +01:00
loops.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
loops2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
loops2.out Add the new test suite. 2019-01-04 20:27:36 +01:00
minusneg.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
minusneg.out Add the new test suite. 2019-01-04 20:27:36 +01:00
minusneg.run Add the new test suite. 2019-01-04 20:27:36 +01:00
minustrue.err Add the new test suite. 2019-01-04 20:27:36 +01:00
minustrue.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
minustrue.run Add the new test suite. 2019-01-04 20:27:36 +01:00
multiline-string.err Add the new test suite. 2019-01-04 20:27:36 +01:00
multiline-string.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
multiline-string.run Add the new test suite. 2019-01-04 20:27:36 +01:00
nan-fcast-vcast-minus0.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
nan-fcast-vcast-minus0.out Add the new test suite. 2019-01-04 20:27:36 +01:00
nan-fcast-vcast-minus0.run Add the new test suite. 2019-01-04 20:27:36 +01:00
non-computable.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
non-computable.out Add the new test suite. 2019-01-04 20:27:36 +01:00
non-computable.run Add the new test suite. 2019-01-04 20:27:36 +01:00
non-utf8-nopre.err Add the new test suite. 2019-01-04 20:27:36 +01:00
non-utf8-nopre.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
non-utf8-nopre.run Add the new test suite. 2019-01-04 20:27:36 +01:00
non-utf8.err Add the new test suite. 2019-01-04 20:27:36 +01:00
non-utf8.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
operators.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
operators.out Add the new test suite. 2019-01-04 20:27:36 +01:00
operators.run Add the new test suite. 2019-01-04 20:27:36 +01:00
parens.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
parens.out Add the new test suite. 2019-01-04 20:27:36 +01:00
parens.run Add the new test suite. 2019-01-04 20:27:36 +01:00
print.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
print.out Add the new test suite. 2019-01-04 20:27:36 +01:00
side-effects.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
side-effects.out Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-1.out Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-1.run Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-2.out Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-2.run Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-3.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-3.out Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-3.run Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-4.err Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-4.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-5.err Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-5.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-6.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
state-in-udf-6.out Add the new test suite. 2019-01-04 20:27:36 +01:00
state-non-empty.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
state-non-empty.out Add the new test suite. 2019-01-04 20:27:36 +01:00
state-scope.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
state-scope.out Add the new test suite. 2019-01-04 20:27:36 +01:00
state-scope.run Add the new test suite. 2019-01-04 20:27:36 +01:00
strlen.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
strlen.out Add the new test suite. 2019-01-04 20:27:36 +01:00
svc-1710.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
svc-1710.out Add the new test suite. 2019-01-04 20:27:36 +01:00
unicode-error-msg.err Add the new test suite. 2019-01-04 20:27:36 +01:00
unicode-error-msg.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-1.err Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-2.err Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-3.err Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-3.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-4.err Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-4.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-5.err Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-5.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-6.err Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-6.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-7.err Add the new test suite. 2019-01-04 20:27:36 +01:00
vecrot-type-check-7.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
vector-dot-assign.err Add the new test suite. 2019-01-04 20:27:36 +01:00
vector-dot-assign.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-for.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-for.out Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-for.run Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-list-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-list-1.out Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-list-1.run Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-list-2.err Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-list-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-list-2.run Add the new test suite. 2019-01-04 20:27:36 +01:00
void-in-return.lsl Allow returning void expressions where state changes are allowed 2019-05-01 04:28:58 +02:00
void-in-return.out Allow returning void expressions where state changes are allowed 2019-05-01 04:28:58 +02:00
void-in-return.run Allow returning void expressions where state changes are allowed 2019-05-01 04:28:58 +02:00