4251d4c7f937c5f92521a6cab0c0dad1a1bc33a8
Reorganize into different statements with early return. Add constants, unary operators and binary operators. Check if operator is commutative and check with operands swapped when so. Constant equality is somewhat sketchy at the moment: just compare the values with Python's ==.
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.project.zone/lsl-pyoptimizer/
Description
Optimizes a LSL2 script, folding constants, removing unused code and more. Adds new syntax features too.
Languages
Python
73.5%
LSL
26.5%