I kinda wonder what prompted this, since CallbackList.add is used only in two places:
FutureTrigger::handle: this function itself is not inlined (because it's not inlineable).
SignalTrigger::listen: this function is indeed inlined and having a lot of these calls will inline quite a bit of stuff into user code.
I would therefore propose to uninline SignalTrigger::listen instead. Makes generated code look closer to the original, also generates slightly less code (trigger.listen vs trigger.list.add) and has the same amount of method calls in the end.
Or if you're using CallbackList directly and see too much code, perhaps we can unline both and only inline the add call in SignalTrigger.
I kinda wonder what prompted this, since
CallbackList.add
is used only in two places:FutureTrigger::handle
: this function itself is not inlined (because it's not inlineable).SignalTrigger::listen
: this function is indeed inlined and having a lot of these calls will inline quite a bit of stuff into user code.I would therefore propose to uninline
SignalTrigger::listen
instead. Makes generated code look closer to the original, also generates slightly less code (trigger.listen
vstrigger.list.add
) and has the same amount of method calls in the end.Or if you're using
CallbackList
directly and see too much code, perhaps we can unline both and only inline theadd
call inSignalTrigger
.