Skip to content
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

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Mar 8, 2022

Fixes cases like mono/mono#20962

@lambdageek
Copy link
Member

lambdageek commented Mar 8, 2022

Also fixes #66337 (which is the same as mono/mono#20962)

@lambdageek
Copy link
Member

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@lambdageek lambdageek left a 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:

if (mono_method_needs_static_rgctx_invoke (method, FALSE))
/* The caller doesn't pass it */
g_assert_not_reached ();

@SamMonoRT
Copy link
Member

SamMonoRT commented Mar 8, 2022

Contributes to #63548 via #49904

@vargaz
Copy link
Contributor

vargaz commented Mar 10, 2022

Looks ok, but the last time I tried this in mono, it broke some other tests.

@BrzVlad
Copy link
Member Author

BrzVlad commented Mar 10, 2022

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.

@SamMonoRT
Copy link
Member

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@SamMonoRT
Copy link
Member

radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants