mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Remove line that does nothing useful.
This commit is contained in:
parent
954b8d81d4
commit
7a6e13b786
2 changed files with 3 additions and 3 deletions
|
@ -95,7 +95,6 @@ class optimizer(renamer, deadcode):
|
|||
Also optimizes away IF, WHILE, etc.
|
||||
"""
|
||||
node = parent[index]
|
||||
if node is None: return # Deleted statement
|
||||
nt = node['nt']
|
||||
child = node['ch'] if 'ch' in node else None
|
||||
|
||||
|
@ -785,7 +784,7 @@ class optimizer(renamer, deadcode):
|
|||
if 'shrinknames' in options:
|
||||
self.ShrinkNames()
|
||||
|
||||
#self.RemoveDeadCode()
|
||||
self.RemoveDeadCode()
|
||||
|
||||
treesymtab = (self.tree, self.symtab)
|
||||
del self.tree
|
||||
|
|
|
@ -390,6 +390,8 @@ class Test03_Optimizer(UnitTestCase):
|
|||
self.opt.optimize(p, ['optimize','shrinknames'])
|
||||
print self.outscript.output(p)
|
||||
|
||||
#
|
||||
|
||||
def test_regression(self):
|
||||
|
||||
|
||||
|
@ -432,7 +434,6 @@ class Test03_Optimizer(UnitTestCase):
|
|||
['extendedglobalexpr'])
|
||||
self.opt.optimize(p)
|
||||
out = self.outscript.output(p)
|
||||
print out
|
||||
self.assertEqual(out, 'list L;\nfloat f = 0;\n'
|
||||
'default\n{\n timer()\n {\n'
|
||||
' L = [];\n f = 3;\n'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue