Move TypeReference.ToObject to managed (CoreCLR) (#70055)
authorSergio Pedri <sergio0694@live.com>
Thu, 2 Jun 2022 15:09:29 +0000 (17:09 +0200)
committerGitHub <noreply@github.com>
Thu, 2 Jun 2022 15:09:29 +0000 (08:09 -0700)
commit59a3093bda7a4058d5f3603200326559b1ba98a5
tree3e1a4435951e45435b2d54a2b8483fa42313f2ac
parent2fb5b3b4e2ad8b0fe5dd4d352558bbaddb544506
Move TypeReference.ToObject to managed (CoreCLR) (#70055)

* Initial partial TypedReference.ToObject managed port

* Port rest of mamaged TypeDesc method table logic

* Add RuntimeTypeHandle.GetElementTypeMethodTable FCall

* Remove TypedReference.InternalToObject FCall

* Remove throwing path, add an assert

* Remove unnecessary TypeDesc paths

* Remove ParamTypeDesc::m_TemplateMT and related code

* Fix TypeDesc::GetMethodTable

* Reuse RuntimeTypeHandle.GetValueInternal to drop an FCall

* Add unit tests for TypedReference.ToObject and type desc

* Move ifdef methods to TypedReference.Mono file

* Skip new TypedReference tests on Mono

* Use [ActiveIssue] instead of [SkipOnMono]

* Commented tests out to skip Mono AOT failure
14 files changed:
src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs
src/coreclr/System.Private.CoreLib/src/System/TypedReference.CoreCLR.cs
src/coreclr/vm/clsload.cpp
src/coreclr/vm/ecalllist.h
src/coreclr/vm/reflectioninvocation.cpp
src/coreclr/vm/reflectioninvocation.h
src/coreclr/vm/runtimehandles.h
src/coreclr/vm/typedesc.cpp
src/coreclr/vm/typedesc.h
src/coreclr/vm/typedesc.inl
src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs
src/libraries/System.Private.CoreLib/src/System/TypedReference.cs
src/libraries/System.Runtime/tests/System/TypedReferenceTests.cs
src/mono/System.Private.CoreLib/src/System/TypedReference.Mono.cs