mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
No description
SymbolReplacedOrDeleted had an "emergency fix" that disabled several kinds of substitutions, because they generated code that didn't compile. The cause was actually elsewhere. The actual problem was the marking of function parameters as being written to by function calls. This is true in a sense, but there's a big scope change that totally destroys the possibility of substituting identifiers, for example. We were not removing the function parameters, anyway, therefore that code has just been disabled. Note that removal of function parameters may be impossible if one parameter has side effects. Consider this: f(string x, integer y, string z) { llOwnerSay(x + z); } integer n = 2; default{state_entry(){ f("a" + (string)n, n=llSetRegionPos(<100,100,100>), "c" + (string)n); }} Even worse if the expression for the x argument has side effects too and x and y need to be performed in the right order. Fortunately, such case is highly unlikely. But if we ever implement removal of function parameters, that's an additional difficulty to take care of. |
||
---|---|---|
lslopt | ||
.gitignore | ||
builtins-unittest.txt | ||
builtins.txt | ||
COPYING | ||
fndata.txt | ||
main.py | ||
README.md | ||
testfuncs.py | ||
testparser.py |
LSL PyOptimizer
LSL PyOptimizer is a LSL2 script optimizer written in Python 2. Currently it only supports code memory optimization (no speed optimization), only for Mono (no LSO), and only for the Second Life flavour of LSL (no OpenSim etc.).
HTML introduction, list of features and documentation available at http://lsl.blacktulip-virtual.com/lsl-pyoptimizer/