mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
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:
parent
beea757a0a
commit
8e5166bb2e
3 changed files with 22 additions and 852 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue