Prepare for the incoming Dead Code Removal module.

This commit is contained in:
Sei Lisa 2014-08-05 15:47:14 +02:00
parent bcc7fe3524
commit 58e22f77ce
3 changed files with 30 additions and 14 deletions

View file

@ -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