Add TODO item about side-effect analysis of UDFs

This commit is contained in:
Sei Lisa 2018-11-19 21:15:52 +01:00
parent 18d19b4653
commit b9fe0b6c85

View file

@ -1530,6 +1530,13 @@ class foldconst(object):
return return
if nt == 'FNDEF': 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 # CurEvent is needed when folding llDetected* function calls
if hasattr(node, 'scope'): if hasattr(node, 'scope'):
# function definition # function definition