Allow CORINFO_BOX_THIS for primitives and enums (dotnet/coreclr#24644)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Wed, 22 May 2019 22:59:43 +0000 (15:59 -0700)
committerGitHub <noreply@github.com>
Wed, 22 May 2019 22:59:43 +0000 (15:59 -0700)
commitd56269e3fc3d8a4b3e50de469fdcd69bac5cd15f
tree1d1f8684d78a5a3f873578d17e6f8c91adc6fd17
parent40c8e869f577e33ab8ab743b55124495b4c0343b
Allow CORINFO_BOX_THIS for primitives and enums (dotnet/coreclr#24644)

We abort R2R compiling methods with `thisTransform == CORINFO_BOX_THIS`. This means we don't R2R compile some methods that do virtual calls on valuetypes (e.g. calling `ToString` on a struct that doesn't itself provide a `ToString` method).

We can't allow this in general, but enums and primitives should be fine.

Commit migrated from https://github.com/dotnet/coreclr/commit/85e4ce49ecdcfa51d4c1d7fd9ab9b57658ba92fa
src/coreclr/src/zap/zapinfo.cpp
src/coreclr/tests/src/readytorun/tests/main.cs
src/coreclr/tests/src/readytorun/tests/test.cs