Implement classMustBeLoadedBeforeCodeIsRun in crossgen2 (#608)
authorJan Vorlicek <janvorli@microsoft.com>
Mon, 9 Dec 2019 21:21:26 +0000 (22:21 +0100)
committerGitHub <noreply@github.com>
Mon, 9 Dec 2019 21:21:26 +0000 (22:21 +0100)
commitaa4eb884d79cbd63ffdac8c8c199258dce653ba0
tree43eaab1206e7c8918688952d9e1a8c203878bb58
parent0d6af61871bf27b549574529f46f07b9eff137be
Implement classMustBeLoadedBeforeCodeIsRun in crossgen2 (#608)

* Implement classMustBeLoadedBeforeCodeIsRun in crossgen2

This fixes missing eager fixups for method call arguments and return
value for methods going through PreStub.
It fixes the coreclr JIT\Regression\CLR-x86-JIT\V1.2-M01\b02345\b02345
test that needed Span<byte> type during GC stack walk with PreStub of a
method with Span<byte> argument on the stack and failed as it couldn't
be loaded during the GC.
The same failure also happened in many if not all tests when I have
attempted to run them with GCStress 3.

* Reflect PR feedback on member / property naming and method location
src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodWithGCInfo.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs