LSL-PyOptimizer/lslopt
Sei Lisa 9e7a5d1cdf Change strategy for the checking of function input types.
Rather than assert that the types are correct, use the force type functions on the parameters:
ff, fk, fs, q2f, v2f, and the new fi, fl.

These functions have also been modified to ensure that the input type supports an implicit typecast to the target type and perform it, or emit ELSLInvalidType otherwise, rather than an assertion failure. fl in particular returns the original list if it isn't changed, or a copy if it is.

A couple bugs were found in testfuncs.py as a result, which have been fixed as well. A test has been added to ensure that the exception that caught these bugs remains in place.

The isxxxx functions are no longer necessary, so they are removed. Same goes for the painful cast handling process in foldconst, which was basically performing this task, and not necessarily well.

This approach is much more robust and should have been used since the beginning, but I didn't figure it out then.
2017-10-12 17:16:16 +02:00
..
__init__.py Initial commit. Status so far: 2014-07-26 02:43:44 +02:00
lslbasefuncs.py Change strategy for the checking of function input types. 2017-10-12 17:16:16 +02:00
lslcommon.py Separate library function optimization into a different file. 2017-08-25 20:35:24 +02:00
lsldeadcode.py Bump copyright year. 2017-08-09 19:45:46 +02:00
lslextrafuncs.py Change strategy for the checking of function input types. 2017-10-12 17:16:16 +02:00
lslfoldconst.py Change strategy for the checking of function input types. 2017-10-12 17:16:16 +02:00
lslfuncopt.py Minor cleanups; no functional changes. 2017-09-22 15:42:42 +02:00
lslfuncs.py Bump copyright year. 2017-08-09 19:45:46 +02:00
lsljson.py Change strategy for the checking of function input types. 2017-10-12 17:16:16 +02:00
lsllastpass.py Minor cleanups; no functional changes. 2017-09-22 15:42:42 +02:00
lsloptimizer.py Implement transformation of lists into additions. 2017-09-15 22:30:22 +02:00
lsloutput.py Format LIST nodes; don't add indent to CONST list in calc mode 2017-08-25 20:35:24 +02:00
lslparse.py Add some more functions with predictable results. 2017-10-12 12:43:54 +02:00
lslrenamer.py Add TODO item to lslrenamer. 2017-08-16 22:00:16 +02:00