Open jakobnissen opened 5 months ago
This is a tricky one. I've started an implementation at https://github.com/JuliaLang/AllocCheck.jl/commit/75112007e700880eaaaf3948a71160b2e38ba3dc but I need to figure out how to re-construct the Union return type from the returned selector + payload, which I'm not sure is possible/legal from the Julia side. If that fails, we'll be forced to fall back to the slower invoke
ABI that passes all arguments/return types in boxes.
Since this is a dynamic dispatch + cache lookup anyway, it's probably a tolerable performance cost (certainly not ideal though).
MWE: