It used `a = lst[i]` instead of taking the stride index into account (that is, it should have been `a = lst[i+idx]`). Anyway, the exact same value is in b, so use that instead.
Test case by Tapple Gao.
When the tree has a unary minus node (NEG) whose child is a product node (*), and the left operand of the product node starts with a minus sign but is not a NEG node, this produced at least two minus signs in sequence without any spaces.
Normally, OptSigns hides this problem, but when it is disabled, or when the left factor is a pre-decrement (--V) node, the problem is visible.
Fix by creating a function that detects all kinds of leading minus signs, and use it in place of the comparison with NEG.
Fixes#31. Reported by @KrsityKu, who also provided a repro.
- Fix case where CONST < FNCALL or FNCALL < CONST, when the function was marked as SEF but the args were not SEF, could result in the FNCALL being optimized out, thus failing to apply the side effects of the arguments.
- Copy the function's `min` and `max` present in the symbol table, to the node; use the node's `min` and `max` properties in the `<` operator instead of looking up the symbol and using that.
- Extend it to cover all cases where CONST < SEFexpr and SEFexpr < CONST where SEFexpr.min and SEFexpr.max are defined.
llSignRSA and llVerifyRSA had an algorithm parameter. Not checked, but it's presumable that an error will be emitted if the alg is not among the supported ones.
The node containing the separator was not being copied; if it was modified by a later optimization step, the modification propagated to all previous nodes that contained it, causing incorrect results.
Many thanks to @KrsityKu for reporting and providing a repro.
Fixes#23.
llGetEnv() is not computable now, so remove it from the computable functions unit test.
The test generated lists inside a list, and after the llGetEnv() change, that caused a weird side effect that hasn't been investigated (see test result of previous commit). To be on the safe side, take all list-generating results out of the list, into their own llSetPrimitiveParams call.
The unstable flag does not make sense in void functions; add warning.
Also, new upstream version of builtins.txt with new functions that have been added to fndata.txt.
In Python 2, function type names from buiiltins.txt were entered into the tables as Unicode, causing the output module to promote strings to Unicode, and causing trouble further down the line.
Entering them as str fixes the issue.
Thanks a lot to @PeterStindberg for reporting the issue and providing a script that reproduces it.
Fixes#21
Incoming Unicode regular expressions allow brackets inside brackets, therefore POSIX semantics no longer apply. Python warns about possible future breakage, so add backslash escape to square bracket opening inside the character class.