mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
New upstream version of builtins.txt, and minor code style changes.
This commit is contained in:
parent
b5994b79fe
commit
61565470a2
2 changed files with 5 additions and 3 deletions
|
@ -1008,14 +1008,15 @@ class foldconst(object):
|
|||
elif self.optlistlength and node['name'] == 'llGetListLength':
|
||||
# Convert llGetListLength(expr) to (expr != [])
|
||||
node = {'nt':'CONST', 't':'list', 'value':[]}
|
||||
parent[index] = node = {'nt':'!=', 't':'list', 'ch':[child[0], node]}
|
||||
parent[index] = node = {'nt':'!=', 't':'list',
|
||||
'ch':[child[0], node]}
|
||||
elif (node['name'] == 'llDumpList2String'
|
||||
and child[1]['nt'] == 'CONST'
|
||||
and child[1]['t'] in ('string', 'key')
|
||||
and child[1]['value'] == u""):
|
||||
# Convert llDumpList2String(expr, "") to (string)(expr)
|
||||
del child[1]
|
||||
node['nt'] = 'CAST'
|
||||
del child[1]
|
||||
del node['name']
|
||||
elif SEFargs and 'SEF' in self.symtab[0][node['name']]:
|
||||
# The function is marked as SEF in the symbol table, and the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue