2015-04-07 09:35:12 +01:00
|
|
|
|
|
|
|
namespace System.Runtime.CompilerServices {
|
|
|
|
|
|
|
|
[FriendAccessAllowed]
|
|
|
|
internal static class JitHelpers
|
|
|
|
{
|
|
|
|
static internal T UnsafeCast<T>(Object o) where T : class
|
|
|
|
{
|
2015-08-26 07:17:56 -04:00
|
|
|
return Array.UnsafeMov<object, T> (o);
|
|
|
|
}
|
|
|
|
|
|
|
|
static internal int UnsafeEnumCast<T>(T val) where T : struct
|
|
|
|
{
|
|
|
|
return Array.UnsafeMov<T, int> (val);
|
|
|
|
}
|
|
|
|
|
|
|
|
static internal long UnsafeEnumCastLong<T>(T val) where T : struct
|
|
|
|
{
|
2016-02-22 11:00:01 -05:00
|
|
|
return Array.UnsafeMov<T, long> (val);
|
2015-04-07 09:35:12 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|