mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Globals appearing in vectors or rotations inside a list still caused a crash. Fixes #3 again.
This commit is contained in:
parent
877d5fc10c
commit
2b14acc8a0
1 changed files with 8 additions and 0 deletions
|
@ -226,6 +226,14 @@ class deadcode(object):
|
||||||
sym = self.symtab[0][subnode['name']]
|
sym = self.symtab[0][subnode['name']]
|
||||||
sym['W'] = False
|
sym['W'] = False
|
||||||
self.tree[sym['Loc']]['X'] = True
|
self.tree[sym['Loc']]['X'] = True
|
||||||
|
elif subnode['nt'] in ('VECTOR', 'ROTATION'):
|
||||||
|
for sub2node in subnode['ch']:
|
||||||
|
# can only happen in globals
|
||||||
|
if sub2node['nt'] == 'IDENT':
|
||||||
|
assert sub2node['scope'] == 0
|
||||||
|
sym = self.symtab[0][sub2node['name']]
|
||||||
|
sym['W'] = False
|
||||||
|
self.tree[sym['Loc']]['X'] = True
|
||||||
else:
|
else:
|
||||||
self.MarkReferences(child[0])
|
self.MarkReferences(child[0])
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue