You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[wasm][coreclr] Avoid using calli thunks for delegates #121222
We hit an assert, but then the output follows and is as expected, so I think we don't need to use the thunk here and possibly just try to get it during interpreter compilation?
possibly just try to get it during interpreter compilation
I think it should be the other way around: We should get the thunk during interpreter execution only once it is actually needed to invoke native code here:
possibly just try to get it during interpreter compilation
I think it should be the other way around: We should get the thunk during interpreter execution only once it is actually needed to invoke native code here:
Line 2482 in 3683bd5
InvokeCalliStub(calliFunctionPointer, cookie, callArgsAddress, returnValueAddress);
. The thunk should be cached in the portable entrypoint so that we do not need to fetch it every time.
I forgot to finish my comment, what I mean is that we try to get it only in case we need it. Doing it lazily during execution phase can be even better, I will take a look at details.
Activity
dotnet-policy-service commentedon Oct 30, 2025
Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.
jkotas commentedon Oct 31, 2025
That because we take this path during the interpreter execution:
runtime/src/coreclr/vm/interpexec.cpp
Lines 2471 to 2481 in 3683bd5
I think it should be the other way around: We should get the thunk during interpreter execution only once it is actually needed to invoke native code here:
runtime/src/coreclr/vm/interpexec.cpp
Line 2482 in 3683bd5
dotnet-policy-service commentedon Oct 31, 2025
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.
radekdoulik commentedon Nov 3, 2025
I forgot to finish my comment, what I mean is that we try to get it only in case we need it. Doing it lazily during execution phase can be even better, I will take a look at details.
Currently we hit the assert during compilation.
[wasm][interpreter] Defer managed calli cookie resolution to executio…
radekdoulik commentedon Apr 1, 2026
Implemented in #125455