What language are CLR internal calls written in?
Methods, like mentioned CanCompareBits
or FastEqualsCheck
are marked with [MethodImpl(MethodImplOptions.InternalCall)]
, which informs clr that it needs to find implementation in it's internals. In terms of CLR it's called FCall, see Calling from managed to native code
Since coreclr is opensourced it's easy to find actual implementation on github.
For FastEqualsCheck
see comutilnative.cpp.
CoreCLR is written with C++ as well as Mono, so all code for all such internal calls is C/C++.
In runtime, in opposite to regular .net code which will produce IL (Intermediate language), such internal calls is platform-dependent assember instructions