mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Remove the symbol table entry too when removing a global state/function/var.
This commit is contained in:
parent
b112494311
commit
562154e7aa
1 changed files with 3 additions and 0 deletions
|
@ -489,6 +489,9 @@ 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']]
|
||||
del self.tree[idx]
|
||||
del LocMap[idx]
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue