summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs')
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs b/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs
index 080e42f46f..b86835f778 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/jithelpers.cs
@@ -16,8 +16,8 @@ using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
using System.Security;
-namespace System.Runtime.CompilerServices {
-
+namespace System.Runtime.CompilerServices
+{
// Wrapper for address of a string variable on stack
internal struct StringHandleOnStack
{
@@ -114,14 +114,14 @@ namespace System.Runtime.CompilerServices {
static internal int UnsafeEnumCast<T>(T val) where T : struct // Actually T must be 4 byte (or less) enum
{
- Debug.Assert(typeof(T).IsEnum
- && (Enum.GetUnderlyingType(typeof(T)) == typeof(int)
- || Enum.GetUnderlyingType(typeof(T)) == typeof(uint)
+ Debug.Assert(typeof(T).IsEnum
+ && (Enum.GetUnderlyingType(typeof(T)) == typeof(int)
+ || Enum.GetUnderlyingType(typeof(T)) == typeof(uint)
|| Enum.GetUnderlyingType(typeof(T)) == typeof(short)
|| Enum.GetUnderlyingType(typeof(T)) == typeof(ushort)
|| Enum.GetUnderlyingType(typeof(T)) == typeof(byte)
|| Enum.GetUnderlyingType(typeof(T)) == typeof(sbyte)),
- "Error, T must be an 4 byte (or less) enum JitHelpers.UnsafeEnumCast!");
+ "Error, T must be an 4 byte (or less) enum JitHelpers.UnsafeEnumCast!");
return UnsafeEnumCastInternal<T>(val);
}
@@ -134,9 +134,9 @@ namespace System.Runtime.CompilerServices {
static internal long UnsafeEnumCastLong<T>(T val) where T : struct // Actually T must be 8 byte enum
{
- Debug.Assert(typeof(T).IsEnum
- && (Enum.GetUnderlyingType(typeof(T)) == typeof(long)
- || Enum.GetUnderlyingType(typeof(T)) == typeof(ulong)),
+ Debug.Assert(typeof(T).IsEnum
+ && (Enum.GetUnderlyingType(typeof(T)) == typeof(long)
+ || Enum.GetUnderlyingType(typeof(T)) == typeof(ulong)),
"Error, T must be an 8 byte enum JitHelpers.UnsafeEnumCastLong!");
return UnsafeEnumCastLongInternal<T>(val);
}
@@ -213,7 +213,7 @@ namespace System.Runtime.CompilerServices {
#if _DEBUG
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static bool IsAddressInStack(IntPtr ptr);
+ private extern static bool IsAddressInStack(IntPtr ptr);
#endif
static internal bool ByRefLessThan<T>(ref T refA, ref T refB)
@@ -223,14 +223,6 @@ namespace System.Runtime.CompilerServices {
throw new InvalidOperationException();
}
- /// <returns>true if given type is reference type or value type that contains references</returns>
- static internal bool ContainsReferences<T>()
- {
- // The body of this function will be replaced by the EE with unsafe code!!!
- // See getILIntrinsicImplementation for how this happens.
- throw new InvalidOperationException();
- }
-
static internal ref T GetArrayData<T>(T[] array)
{
// The body of this function will be replaced by the EE with unsafe code!!!