mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Prepare for the incoming Dead Code Removal module.
This commit is contained in:
parent
bcc7fe3524
commit
58e22f77ce
3 changed files with 30 additions and 14 deletions
|
@ -626,7 +626,8 @@ class optimizer(renamer, deadcode):
|
|||
if nt in self.ignored_stmts:
|
||||
return
|
||||
|
||||
assert False, 'Internal error: This should not happen, node type = ' + nt # pragma: no cover
|
||||
assert False, 'Internal error: This should not happen,' \
|
||||
' node type = ' + nt # pragma: no cover
|
||||
|
||||
def IsValidGlobalConstant(self, decl):
|
||||
if 'ch' not in decl:
|
||||
|
@ -648,6 +649,8 @@ class optimizer(renamer, deadcode):
|
|||
|
||||
self.foldtabs = 'foldtabs' in options
|
||||
|
||||
self.shrinknames = 'shrinknames' in options
|
||||
|
||||
tree, symtab = self.tree, self.symtab = treesymtab
|
||||
|
||||
self.globalmode = False
|
||||
|
@ -666,6 +669,8 @@ class optimizer(renamer, deadcode):
|
|||
if 'shrinknames' in options:
|
||||
self.ShrinkNames()
|
||||
|
||||
#self.RemoveDeadCode()
|
||||
|
||||
treesymtab = (self.tree, self.symtab)
|
||||
del self.tree
|
||||
del self.symtab
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue