mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
The llGetListLength optimization can be applied to arbitrary expressions.
This commit is contained in:
parent
d35ab22c42
commit
1636e56266
1 changed files with 2 additions and 2 deletions
|
@ -951,8 +951,8 @@ class foldconst(object):
|
|||
except lslfuncs.ELSLCantCompute:
|
||||
# Don't transform the tree if function is not computable
|
||||
pass
|
||||
elif node['name'] == 'llGetListLength' and child[0]['nt'] == 'IDENT':
|
||||
# Convert llGetListLength(ident) to (ident != [])
|
||||
elif node['name'] == 'llGetListLength':
|
||||
# Convert llGetListLength(expr) to (expr != [])
|
||||
node = {'nt':'CONST', 't':'list', 'value':[]}
|
||||
parent[index] = node = {'nt':'!=', 't':'list', 'ch':[child[0], node]}
|
||||
elif SEFargs and 'SEF' in self.symtab[0][node['name']]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue