Split the phases of EEClassLayoutInfo::CollectLayoutFieldMetadataThrowing (#23013)
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Thu, 16 May 2019 17:39:33 +0000 (10:39 -0700)
committerGitHub <noreply@github.com>
Thu, 16 May 2019 17:39:33 +0000 (10:39 -0700)
commit5885379686cd854361735a09907d654e80f44f05
treee6c50a23bc8a0dc873fca29ee02be9534ea4ab58
parent9bccf17d09c9fe7e57fb81fff56726e1dfc007f0
Split the phases of EEClassLayoutInfo::CollectLayoutFieldMetadataThrowing (#23013)

* Split the phases of EEClassLayoutInfo::CollectLayoutFieldMetadataThrowing into separate private static functions.

* Combine native and managed-sequential field offset and size calculations (since they are the exact same algorithm)

* Remove TypeLayoutHelper because it's was only used in CalculateSizeAndFieldOffsets after having combined the offset/size calculations.

* Remove unused members in LayoutRawFieldInfo.

* Comment boolean parameter.

* Add comments to parameters.

* Remove unused prototypes.

* Make sure we consistently use managed in the managed paths and native in the native paths.

* Add to m_numCTMFields instead of setting it (need to make sure we account for fields in a non-trivial parent).

* Track native alignment in a field.

* Refactor field placement info to remove lots of repeated branching.

* PR Feedback.
src/vm/class.cpp
src/vm/class.h
src/vm/fieldmarshaler.cpp
src/vm/fieldmarshaler.h
src/vm/methodtablebuilder.cpp