[interp] Don't share interp_in signatures for different valuetypes (#36520)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Sat, 16 May 2020 20:47:39 +0000 (16:47 -0400)
committerGitHub <noreply@github.com>
Sat, 16 May 2020 20:47:39 +0000 (23:47 +0300)
commitce1123f166944422b3d1171fed86a402149c17e8
tree5736a11b6b6993b63acb840d2eebf67763990ef5
parent0aa560bba9c4f477867a9187370763ba198e860e
[interp] Don't share interp_in signatures for different valuetypes (#36520)

We share interp_in wrappers for different types of signatures if the corresponding params are equivalent. This was added in https://github.com/mono/mono/commit/5cbe93884798684efbb81abd79e0e2a170544b75. This was reusing some sharing mechanism used by gsharedvt. Those wrappers are shared with regard to managed->managed transitions so it takes additional freedoms, converting all valuetypes to ValueTuples instances. These can end up being marshalled differently from the initial struct so we can't use this valuetype sharing infrastructure in the interp_in_wrappers which can operate on native structs.

Fixes test_0_marshal_struct_delegate from pinvoke3.cs

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
src/mono/mono/mini/mini-generic-sharing.c