mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
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. |
||
---|---|---|
.. | ||
__init__.py | ||
lslbasefuncs.py | ||
lslcommon.py | ||
lsldeadcode.py | ||
lslextrafuncs.py | ||
lslfoldconst.py | ||
lslfuncopt.py | ||
lslfuncs.py | ||
lslinliner.py | ||
lsljson.py | ||
lsllastpass.py | ||
lslloadlib.py | ||
lsloptimizer.py | ||
lsloutput.py | ||
lslparse.py | ||
lslrenamer.py |