Implement the shrinknames option.

Fixes some bugs with the treatment of the shrink attribute, some others with the output of renamed stuff.
This commit is contained in:
Sei Lisa 2014-08-01 05:07:50 +02:00
parent 847d7b1e20
commit 6c248c46e3
5 changed files with 174 additions and 15 deletions

View file

@ -2,7 +2,9 @@
import lslfuncs
from lslparse import warning
class optimizer(object):
from lslrenamer import renamer
class optimizer(renamer):
# Default values per type when declaring variables
DefaultValues = {'integer': 0, 'float': 0.0, 'string': u'',
@ -606,6 +608,9 @@ class optimizer(object):
else:
self.FoldTree(tree, idx)
if 'shrinknames' in options:
self.AssignNewNames()
treesymtab = (self.tree, self.symtab)
del self.tree
del self.symtab