fixed bug in jpeg2000 decoding
[swftools.git] / lib / as3 / optimizations.txt
1 * "push<anything>;pop" can be removed (if there's no jumppoint)
2 * "push<anything>;coerce;pop" can be removed (if there's no jumppoint)
3 * "getlocal_i;pop" can be removed
4 * "goto next;next:" can be removed (if there's no jumppoint)
5 * "setlocal_i;getlocal_i" can be changed to "dup;setlocal_i"
6 * for a variable without any getlocal_i, all dup;setlocal_i can be removed
7 * getlocal <i> can be changed to getlocal_i for i<4, same for setlocal
8 * greater followed by iftrue can be reduced to ifgt
9 * equals followed by iffalse can be reduced to ifne (etc.)
10 * callproperty;(coerce);pop can changed to callpropvoid
11 * label can be removed
12 * "getlocal_i;setlocal_i" can be removed
13 * "dup;xxx;pop" can be reduced to xxx (xxx=setlocal_i, setglobalslot, pushscope)
14 * "getlocal_i;increment;setlocal_i" can be replaced by inclocal_i
15 * [iffalse xx;jump yy;xx: -> iftrue yy]
16 * a jump to a jump can be redirected
17 * sort variable indices by usage
18 * coerce*;returnvalue can be reduced to returnvalue
19 * a kill before a return can be eliminated
20 * setlocal_i;getlocal_j;getlocal_i can be changed to dup;setlocal_i;getlocal_j,swap (makes it possible to remove i if not otherwise used)