Skip to content

Unify generic lookup helper exception classification - #138635

Open
jkotas wants to merge 1 commit into
mainfrom
jkotas-fix-r2r-generic-handle-classification
Open

jkotas wants to merge 1 commit into
mainfrom
jkotas-fix-r2r-generic-handle-classification

Conversation

@jkotas

@jkotas jkotas commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Classify CORINFO_HELP_READYTORUN_GENERIC_HANDLE as non-throwing for NativeAOT, matching CoreCLR, and remove the NativeAOT-specific exception bookkeeping. The helper can throw out-of-memory or type-load exceptions. We do not guarantee the precise timing of these exceptions or that they will be thrown at all, so the JIT need not account for them when optimizing.

Resolves #137616

Note

This description was generated by GitHub Copilot.

Classify CORINFO_HELP_READYTORUN_GENERIC_HANDLE as non-throwing for
NativeAOT, matching CoreCLR, and remove the NativeAOT-specific exception
bookkeeping. The helper can throw out-of-memory or type-load exceptions.
We do not guarantee the precise timing of these exceptions or that they
will be thrown at all, so the JIT need not account for them when
optimizing.

Windows x64 Checked NativeAOT tests: 24,967 passed, 566 skipped.
Eight skipped tests expect TypeLoadException.

Addresses #137616

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 2, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@jkotas

jkotas commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

@MichalStrehovsky Are you aware of any problems that this change may cause?

@MichalStrehovsky

Copy link
Copy Markdown
Member

@MichalStrehovsky Are you aware of any problems that this change may cause?

I think this is referring to the situation when native AOT could throw when generic cutoff was reached. Native AOT will not throw under any other circumstances I'm aware of right now. There could be more opportunities on native AOT if we ever add back lazy generics. But like you say, I don't think we care about the timing, this should be the same as with CoreCLR ReadyToRun.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

CORINFO_HELP_READYTORUN_GENERIC_HANDLE helper classification

2 participants