Closed tkoolen closed 5 years ago
I suppose the vararg branch should be fixed as well, right?
I've cleaned up the offset calculation code a little (removed the is_calloverload
special case). I believe the vararg handling is (and was) right as well.
I verified that the example from https://github.com/jrevels/Cassette.jl/issues/127#issue-451158553 still works with this change.
Do you need anything else from me?
Thanks!
I'm still trying to wrap my head around the package internals, but this seems to fix #89 and I think this kind of makes sense. The old behavior of adding a constant
invoke_offset
of 2 to all argument slots seemed kind of weird to me, sinceuntagged_args
in__overdub_generator__
ends up looking like(typeof(invoke), typeof(f), Type{Tuple{Int64}}, Int64)
, i.e. the first and third arguments should be skipped, rather than the first two.