[netcore] Optimize Buffer.BlockCopy and Buffer.IsPrimitiveArray (mono/mono#16692)
authorEgor Bogatov <egorbo@gmail.com>
Mon, 7 Oct 2019 10:29:22 +0000 (13:29 +0300)
committerMarek Safar <marek.safar@gmail.com>
Mon, 7 Oct 2019 10:29:22 +0000 (12:29 +0200)
commit6f6928038f2833943ac3ea53e56095b5f9a97e4d
tree08e2fd4c554969701b36d5d1b4c6e10343a7037c
parente1ee50c9fdd9b565d34dde382e5af86df51b9892
[netcore] Optimize Buffer.BlockCopy and Buffer.IsPrimitiveArray (mono/mono#16692)

* Optimize Buffer.BlockCopy and IsPrimitiveArray (make them icalls)

* wrap with ENABLE_NETCORE

* fix formatting

* fix check for "is primitive"

* use m_class_is_primitive

* fix build errors

* fix typo

* fix failing test

* use mono_error_set_argument_out_of_range

* fix argument names for exceptions

Commit migrated from https://github.com/mono/mono/commit/35c6b7691f4043fd49d8393b84224f0d1df1e7fe
src/mono/mono/metadata/icall-def-netcore.h
src/mono/mono/metadata/icall.c
src/mono/netcore/System.Private.CoreLib/src/System/Buffer.cs