dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.42k stars 200 forks source link

[NativeAOT-LLVM] Implement generic `IDynamicInterfaceCastable` #2693

Open SingleAccretion opened 1 month ago

SingleAccretion commented 1 month ago

See https://github.com/dotnet/runtime/pull/108235, which uses the thunk pool and will not work for us.

Rough idea: 1) Produce fat function pointers in interface resolve. 2) Teach interface call lowering fat function pointer dispatch. 3) Limit the impact of this on code quality by:

jkotas commented 1 month ago

I think it would be fine to not support this feature for wasm AOT until it is needed for something real.