mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Add TODO item about side-effect analysis of UDFs
This commit is contained in:
parent
18d19b4653
commit
b9fe0b6c85
1 changed files with 7 additions and 0 deletions
|
@ -1530,6 +1530,13 @@ class foldconst(object):
|
|||
return
|
||||
|
||||
if nt == 'FNDEF':
|
||||
# FIXME: Fix SEFness of UDFs
|
||||
# A return statement does have side effects for the current
|
||||
# function, as removing it would change its behaviour drastically.
|
||||
# However, when seen from the outside, that does not make the
|
||||
# function as a whole have side effects: if all nodes except
|
||||
# return statements are SEF, the function is SEF.
|
||||
|
||||
# CurEvent is needed when folding llDetected* function calls
|
||||
if hasattr(node, 'scope'):
|
||||
# function definition
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue