Multi-commit:

- Fix a bunch of bugs found during the debut of the LSL calculator.
- Add infrastructure for functions to be able to produce a result or not depending on arguments. Fixes the llBase64ToInteger/llXorBase64/llXorBase64StringsCorrect cases where they are not deterministic, and allows for the addition of some extra functions whose value can be determined in some cases (e.g. llDetectedType(-1) is always 0). Added several such functions in a new module.
- Add the constant folding option to the help and the default options.
This commit is contained in:
Sei Lisa 2015-02-11 05:43:13 +01:00
parent 716be215f2
commit db862bb4a6
6 changed files with 175 additions and 28 deletions

View file

@ -37,6 +37,7 @@ Options (+ means active by default, - means inactive by default):
optimize + Runs the optimizer.
optsigns + Optimize signs in float and integer constants.
optfloats + Optimize a float when it is an integral value.
constfold + Fold constant expressions to their values.
foldtabs - Tabs can't be copy-pasted, so they aren't optimized by
default. But with support from the viewer, they can be
folded too and make it to the uploaded source. This
@ -62,7 +63,7 @@ means that e.g. a + 3 + 5 is not optimized to a + 8; however a + (3 + 5) is.
options = set(('extendedglobalexpr','extendedtypecast','extendedassignment',
'allowkeyconcat','allowmultistrings','skippreproc','optimize',
'optsigns','optfloats'
'optsigns','optfloats','constfold'
))
if sys.argv[1] == '-O':