be made public somehow? It does a fairly non-trivial amount of work that would be useful, especially in migrating to the new API
d
dmitriy.novozhilov
05/20/2025, 6:04 AM
cc @Wojciech Litewka
w
Wojciech Litewka
05/20/2025, 8:09 AM
Hi, it could of course, but when would you need to call it yourself? This function is simply what `dispatch/extensionReceiverParameter`'s setter calls, if you are uncertain which receiver to set, you can just
(if (...) func.DRP else func.ERP) = ...
.
(Just to be clear,
setReceiverParameter
is an implementation of the deprecated API. If made public, it would be marked as deprecated too.)
Wojciech Litewka
05/20/2025, 8:44 AM
With the new API the way to replace or insert any parameter is via changing the
IrFunction.parameters
list. I know it is less convenient as it's
var List
, we might change it to
MutableList
in the future. It will also apply the same logic as
setReceiverParameter
. Btw. all of that logic is only needed to bridge the old API with the new one, it will be gone when the latter is gone.
z
Zac Sweers
05/20/2025, 1:38 PM
I think the main concern is needing to update the indices of all the other parameters after them when inserting later
w
Wojciech Litewka
05/20/2025, 1:44 PM
Actually not, indices in
IrValueParameter
are (and will be) updated automatically. You of course need to update argument list of calls, but that's not new, right?