Add explicit layout checks to Crossgen2 (dotnet/coreclr#27054)
authorTomáš Rylek <trylek@microsoft.com>
Thu, 31 Oct 2019 20:59:18 +0000 (13:59 -0700)
committerGitHub <noreply@github.com>
Thu, 31 Oct 2019 20:59:18 +0000 (13:59 -0700)
commit72270297a0ecdb7bd159a88f40d96c364a510c89
tree23a0eed2feb22115b1b0e59b316e1a235f5e5337
parent62eae46f6a805f3f731432c690183d56292e6bb2
Add explicit layout checks to Crossgen2 (dotnet/coreclr#27054)

This change adds explicit layout checks using a loose port of the
CoreCLR algorithm i.e. creating an array representing the individual
bytes of the type layout and gradually filling it in with GC reference /
non-GC reference markers for the individual fields.

Thanks

Tomas

Commit migrated from https://github.com/dotnet/coreclr/commit/97c582975eed3260ef21e0bcc55c8c86d1e3bec8
src/coreclr/src/tools/crossgen2/Common/TypeSystem/Common/ExplicitLayoutValidator.cs [new file with mode: 0644]
src/coreclr/src/tools/crossgen2/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs
src/coreclr/src/tools/crossgen2/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj