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

Emit instantiated types as external references if possible #105816

Merged
merged 3 commits into from
Aug 2, 2024

Conversation

MichalStrehovsky
Copy link
Member

@MichalStrehovsky MichalStrehovsky commented Aug 1, 2024

Fixes #105397.

The repro case hits an interesting problem in native layout - we emit the IEnumerable<IEnumerable<double?>> type as a constructed type, however the components of it are only generated as necessary. Because native layout expresses it as a decomposed instantiation, we're not able to find the type because the component of it is not constructed and we don't really keep track of those.

This can be fixed by simply not generating types as composed out of various components if the MethodTable already exists in the compilation.

Cc @dotnet/ilc-contrib

Fixes dotnet#105397.

The repro case hits an interesting problem in native layout - we emit the `IEnumerable<IEnumerable<double?>>` type as a constructed type, however the components of it are only generated as necessary. Because native layout expresses it as a decomposed instantiation, we're not able to find the type because the component of it is not constructed and we don't really keep track of those.

This can be fixed by simply not generating types as composed out of various components if the `MethodTable` already exists in the compilation.
@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky MichalStrehovsky merged commit e60db07 into dotnet:main Aug 2, 2024
115 checks passed
@MichalStrehovsky MichalStrehovsky deleted the fix105397 branch August 2, 2024 07:48
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2024
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.

[AOT] In special generate argument, the aot application will crash
2 participants