Skip to content

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

Merged
jkoritzinsky merged 14 commits into
dotnet:mainfrom
jkoritzinsky:refactor-layout
May 21, 2025
Merged

jkoritzinsky merged 14 commits into
dotnet:mainfrom
jkoritzinsky:refactor-layout

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

This will make it easier to implement #100896

@dotnet-policy-service

Copy link
Copy Markdown
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 AI review requested due to automatic review settings March 27, 2025 20:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 thread src/coreclr/vm/methodtablebuilder.cpp Resolved
Comment thread src/coreclr/vm/methodtablebuilder.cpp Resolved
Comment thread src/coreclr/vm/classlayoutinfo.cpp Resolved
Comment thread src/coreclr/vm/classlayoutinfo.cpp Resolved
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
Copy Markdown
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
Copy Markdown
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

Comment thread src/coreclr/vm/classlayoutinfo.cpp Resolved
@jkoritzinsky

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr crossgen2 outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky

Copy link
Copy Markdown
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.

@davidwrighton davidwrighton left a comment

Copy link
Copy Markdown
Member

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.

Comment thread src/coreclr/vm/methodtablebuilder.cpp Resolved
Comment thread src/coreclr/vm/methodtablebuilder.cpp Resolved
…form that can have an 8-byte alignment requirement
@jkoritzinsky

Copy link
Copy Markdown
Member Author

/ba-g host failure unrelated

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.

4 participants