Move the constant folding code to lslfoldconst.py.

lsloptimizer remains as the "conductor" and option handler.

As a result, new options have been added to enable DCR and constant folding.
This commit is contained in:
Sei Lisa 2014-08-13 14:19:58 +02:00
parent beea757a0a
commit 8e5166bb2e
3 changed files with 22 additions and 852 deletions

View file

@ -382,7 +382,7 @@ class Test03_Optimizer(UnitTestCase):
f(integer a, integer b, integer c, integer d, integer e){}
default{timer(){}}
''')
self.opt.optimize(p, ['optimize','shrinknames'])
self.opt.optimize(p, ['optimize','shrinknames','dcr','constfold'])
out = self.outscript.output(p)
self.assertEqual(out, 'default\n{\n timer()\n {\n }\n}\n')