JIT: optimize more array covariant store checks in the importer (#189)
The importer was already optimizing away some array covariant store checks, for cases where the value being stored was null, or the value being stored came from the same array. Change this to only optimize array covariant store checks in the importer when optimization is enabled. For minopts, invoking the store helper produces smaller code. Update `gtGetClassHandle` to obtain the array handle from array newobjs, and use this to also optimize cases where the destination array is exactly `object[]` or is `T[]` where `T` is final and not itself subject to special casting logic. In particular this gets the common case where `T` is `string`. Closes dotnet/coreclr#6537.
Showing
想要评论请 注册 或 登录