mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Fix bug broken by 562154e7aa
.
Referencing a global that was optimized out, caused a crash. ``` integer DEBUG = 1; default { state_entry() { if (DEBUG) llOwnerSay("DEBUG"); } } ```
This commit is contained in:
parent
3d965f13e0
commit
fc7abc7d99
1 changed files with 4 additions and 3 deletions
|
@ -489,9 +489,10 @@ class deadcode(object):
|
|||
delete = self.SymbolReplacedOrDeleted(node)
|
||||
|
||||
if delete:
|
||||
if node['nt'] in ('DECL', 'STDEF', 'FNDEF'):
|
||||
# Delete the symbol table entry too
|
||||
del self.symtab[0][node['name']]
|
||||
# FIXME: This makes sense but it doesn't work. Analyze why and fix.
|
||||
#if node['nt'] in ('DECL', 'STDEF', 'FNDEF'):
|
||||
# # Delete the symbol table entry too
|
||||
# del self.symtab[0][node['name']]
|
||||
del self.tree[idx]
|
||||
del LocMap[idx]
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue