Add optimizer option 'listlength' to optimize llGetListLength.

llGetListLength(arg) was transformed to arg!=[] whenever constant folding was active. This option allows disabling that optimization.
This commit is contained in:
Sei Lisa 2017-01-25 19:22:36 +01:00
parent e8852ad124
commit f0c115f924
3 changed files with 5 additions and 2 deletions

View file

@ -74,6 +74,7 @@ class optimizer(foldconst, renamer, deadcode):
self.shrinknames = 'shrinknames' in options
self.constfold = 'constfold' in options
self.optlistlength = 'listlength' in options
self.dcr = 'dcr' in options
# Math that works fine except in rare corner-cases can be optimized.