No description
Find a file
Sei Lisa 1946acf3a4 Proper fix for unwanted substitutions in function calls
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.
2019-01-03 02:33:23 +01:00
lslopt Proper fix for unwanted substitutions in function calls 2019-01-03 02:33:23 +01:00
.gitignore Yet another follow-up to 2f4f403 (lslcalc support) 2016-12-15 04:15:26 +01:00
builtins-unittest.txt Get rid of builtins.txt.dat by adding a parameter to the parser ctor. 2015-07-09 20:35:14 +02:00
builtins.txt Upstream version of builtins.txt; update fndata.txt 2018-12-08 19:30:26 +01:00
COPYING Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
fndata.txt New copyright year 2019-01-01 22:54:34 +01:00
main.py New copyright year 2019-01-01 22:54:34 +01:00
README.md Update link to point to lsl.blacktulip-virtual.com instead of lsl.project.zone 2018-01-18 15:41:28 +01:00
testfuncs.py New copyright year 2019-01-01 22:54:34 +01:00
testparser.py Fix some comments 2019-01-02 00:38:44 +01:00

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/