Skip to content

Refactor Sequential/Explicit layout to happen in the same phase where we do Auto layout #113454

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 14 commits into from
May 21, 2025

Conversation

jkoritzinsky
Copy link
Member

This will make it easier to implement #100896

Copy link
Contributor

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

@jkoritzinsky jkoritzinsky marked this pull request as ready for review March 27, 2025 20:54
@Copilot Copilot AI review requested due to automatic review settings March 27, 2025 20:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 12 changed files in this pull request and generated no comments.

Files not reviewed (10)
  • src/coreclr/vm/class.cpp: Language not supported
  • src/coreclr/vm/class.h: Language not supported
  • src/coreclr/vm/classcompat.h: Language not supported
  • src/coreclr/vm/fieldmarshaler.cpp: Language not supported
  • src/coreclr/vm/fieldmarshaler.h: Language not supported
  • src/coreclr/vm/jitinterface.cpp: Language not supported
  • src/coreclr/vm/method.hpp: Language not supported
  • src/coreclr/vm/methodtable.cpp: Language not supported
  • src/coreclr/vm/methodtable.h: Language not supported
  • src/coreclr/vm/methodtablebuilder.h: Language not supported

@jkoritzinsky jkoritzinsky added this to the 10.0.0 milestone Apr 11, 2025
Comment on lines +189 to +195
/// @brief Read the offsets for a type's fields from metadata for explicit layout.
/// @param pModule The module containing the type.
/// @param cl The metadata token of the type.
/// @param pFieldInfoArray The information about the instance fields of the type.
/// @param cInstanceFields The numer of instance fields in the type.
/// @param parentSize The size of the parent type's layout.
/// @return The end of the last field in this layout
Copy link
Member

Choose a reason for hiding this comment

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

Is this doxygen? Do we have any other comments like this in runtime?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah this is the doxygen format. Got auto-inserted and was useful for setting things up. I see usages in Mono and the repo minipal, but not in coreclr. I can remove them if you want

@jkoritzinsky
Copy link
Member Author

/azp run runtime-coreclr crossgen2 outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

The only failure is an existing issue in the crossgen2 outerloop pipeline.

We've now validated the new implementation in CoreCLR matches crossgen2 for all types in the BCL and in the runtime test tree.

Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

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

Looks like a very nice simplification of quite a lot of code. I only saw 1 very small nit, and 1 straightforward issue to fix.

…form that can have an 8-byte alignment requirement
@jkoritzinsky
Copy link
Member Author

/ba-g host failure unrelated

@jkoritzinsky jkoritzinsky merged commit febe8b1 into dotnet:main May 21, 2025
88 of 95 checks passed
@jkoritzinsky jkoritzinsky deleted the refactor-layout branch May 21, 2025 17:53
SimaTian pushed a commit that referenced this pull request May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants