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

Delete parts of type system that deal with layouts #79366

Merged
merged 3 commits into from
Dec 8, 2022

Conversation

MichalStrehovsky
Copy link
Member

The layout of type is always the same as the template so we don't need the logic. This gets rid of uncertainities around "can I reliably ask type system questions around layouts" (see the deleted FieldLayoutAlgorithms). Now the answer is: "you can't ask those questions", which is better than "you could get an answer that you might not like" (an assert).

Cc @dotnet/ilc-contrib

The layout of type is always the same as the template so we don't need the logic. This gets rid of uncertainities around "can I reliably ask type system questions around layouts" (see the deleted FieldLayoutAlgorithms). Now the answer is: "you can't ask those questions", which is better than "you could get an answer that you might not like" (an assert).
@ghost
Copy link

ghost commented Dec 7, 2022

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

Issue Details

The layout of type is always the same as the template so we don't need the logic. This gets rid of uncertainities around "can I reliably ask type system questions around layouts" (see the deleted FieldLayoutAlgorithms). Now the answer is: "you can't ask those questions", which is better than "you could get an answer that you might not like" (an assert).

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: MichalStrehovsky
Labels:

area-NativeAOT-coreclr

Milestone: -


// Interfaces, sealed types, and non-DefTypes cannot be derived from
if (_type.IsInterface || !_type.IsDefType || (_type.IsSealed() && !_type.IsValueType))
// Only valuetypes need to compute the padding.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also be a small size saving - because of universal shared code, most MethodTables had rare flags with this value (making rare flags not so rare).

@MichalStrehovsky
Copy link
Member Author

Filed #79387 for the segfault while installing build tools.

@MichalStrehovsky MichalStrehovsky merged commit 8767b38 into dotnet:main Dec 8, 2022
@MichalStrehovsky MichalStrehovsky deleted the blayout branch December 8, 2022 07:51
@ghost ghost locked as resolved and limited conversation to collaborators Jan 7, 2023
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.

2 participants