mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Remove a TODO item that was already done
This commit is contained in:
parent
6ef4c03994
commit
4a554d60e8
1 changed files with 2 additions and 4 deletions
|
@ -378,7 +378,7 @@ class deadcode(object):
|
||||||
# NOTE: Should not depend on 'Loc', since the nodes that are the
|
# NOTE: Should not depend on 'Loc', since the nodes that are the
|
||||||
# destination of 'Loc' are renumbered as we delete stuff from globals.
|
# destination of 'Loc' are renumbered as we delete stuff from globals.
|
||||||
|
|
||||||
index = int(curnode.nt in self.assign_ops) # don't recurse into a lvalue
|
index = int(curnode.nt in self.assign_ops) # don't recurse into lvalues
|
||||||
|
|
||||||
while index < len(curnode.ch):
|
while index < len(curnode.ch):
|
||||||
node = curnode.ch[index]
|
node = curnode.ch[index]
|
||||||
|
@ -483,9 +483,6 @@ class deadcode(object):
|
||||||
# sophisticated (yet).
|
# sophisticated (yet).
|
||||||
|
|
||||||
# TODO: Inlining of functions that are a single 'return' line.
|
# TODO: Inlining of functions that are a single 'return' line.
|
||||||
# TODO: Remove empty events if they are side effect-free.
|
|
||||||
# Note that e.g. touch/* events are not SEF, because their presence
|
|
||||||
# causes the hand to be shown, so we need a list of SEF events.
|
|
||||||
|
|
||||||
if lslfuncs.lslcommon.IsCalc:
|
if lslfuncs.lslcommon.IsCalc:
|
||||||
# Do nothing if in calculator mode (there's no default event
|
# Do nothing if in calculator mode (there's no default event
|
||||||
|
@ -494,6 +491,7 @@ class deadcode(object):
|
||||||
|
|
||||||
statedef = self.tree[self.symtab[0]['default']['Loc']]
|
statedef = self.tree[self.symtab[0]['default']['Loc']]
|
||||||
assert statedef.nt == 'STDEF' and statedef.name == 'default'
|
assert statedef.nt == 'STDEF' and statedef.name == 'default'
|
||||||
|
|
||||||
self.MarkReferences(statedef)
|
self.MarkReferences(statedef)
|
||||||
|
|
||||||
# Track removal of global lines, to reasign locations later.
|
# Track removal of global lines, to reasign locations later.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue