Skip to content

Inject IJW Copy Constructor calls in the JIT instead of in the IL stubs #106424

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

Merged
merged 37 commits into from
Aug 21, 2024

Conversation

jkoritzinsky
Copy link
Member

Try 2 for #106000 after CI decided to not run on it for some reason.

Fixes Issue #100751 and #100033 by injecting copy constructor calls in the JIT instead of injecting them in the IL and then using special hooks/interceptors to handle non-IL-supported/accessible scenarios.

Re-enable GS checks in Reverse P/Invokes now that we handle them correctly.

…he tests in JitStress (as they won't be fixed when the JIT introduces these extra checks when not asking the VM)"

This reverts commit 35d0de9.
…to do the generic method instantiation on every call (only when jitting)
…he original arg and don't do intermediate copy-constructor calls.

The bitwise copies are invalid, but there's no possible way for the user to see them. They'll always get passed a correctly copy-constructed value.
…rguments to the arg slot instead of tracing through locals.
…e parameter of this type will likely have multiple.
…ructor scenarios (by counting args in the correct direction)
@jkoritzinsky jkoritzinsky changed the title Copy ctor jit inject Inject IJW Copy Constructor calls in the JIT instead of in the IL stubs Aug 14, 2024
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky
Copy link
Member Author

Looks like there's one spot I missed with callis. There's some place that (only when running lots of the tests for some reason) that the modreqs get dropped in the calli signature. Still need to narrow it down.

…ructor scenarios (by counting args in the correct direction)
…already depend on a resolver to depend on the new token map
@jkoritzinsky
Copy link
Member Author

Solved the issue, this is ready for review/merge.

@jkoritzinsky jkoritzinsky removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Aug 15, 2024
…rnal modifier" type for modifiers in internal signatures.
@jkoritzinsky jkoritzinsky merged commit cfa0cc5 into dotnet:main Aug 21, 2024
157 checks passed
@jkoritzinsky jkoritzinsky deleted the copy-ctor-jit-inject branch August 21, 2024 21:43
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants