-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mono][jit] Pass generic context when ldftn of generic method #66350
Conversation
Also fixes #66337 (which is the same as mono/mono#20962) |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need something for llvm, too, I think:
runtime/src/mono/mono/mini/jit-icalls.c
Lines 50 to 52 in 906146a
if (mono_method_needs_static_rgctx_invoke (method, FALSE)) | |
/* The caller doesn't pass it */ | |
g_assert_not_reached (); |
Looks ok, but the last time I tried this in mono, it broke some other tests. |
The original change was https://github.com/mono/mono/pull/20969/files. That change assumed that it needs to pass a rgctx for every indirect call. The problem with it is that it is not true in the case of tailcalls, where the called method is already known and the rgctx is passed as part of the call. OP_TAILCALL uses a MONO_PATCH_INFO_METHOD_JUMP. Also the jump trampolines used as part of ldftn are not optimal, since no patching is taking place. They always go into the common_call_trampoline. We will probably need something else there at some point. |
b7494ea
to
616583f
Compare
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
azdo reports an all clean build : https://dev.azure.com/dnceng/public/_build/results?buildId=1668431&view=results |
Fixes cases like mono/mono#20962