|
|
|
@ -154,6 +154,12 @@
@@ -154,6 +154,12 @@
|
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::AsPointer |
|
|
|
|
|
|
|
|
|
.method public hidebysig static void SkipInit<T> ([out] !!T& 'value') cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 0 |
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::SkipInit |
|
|
|
|
|
|
|
|
|
.method public hidebysig static int32 SizeOf<T>() cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 1 |
|
|
|
@ -255,7 +261,7 @@
@@ -255,7 +261,7 @@
|
|
|
|
|
.method public hidebysig static !!T& AsRef<T>(void* source) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
// For .NET Core the roundtrip via a local is no longer needed see: |
|
|
|
|
// https://github.com/dotnet/coreclr/issues/13341 |
|
|
|
|
// https://github.com/dotnet/runtime/issues/8730 |
|
|
|
|
// and |
|
|
|
|
// https://github.com/dotnet/coreclr/pull/11218 |
|
|
|
|
#ifdef netcoreapp |
|
|
|
@ -336,6 +342,17 @@
@@ -336,6 +342,17 @@
|
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::Add |
|
|
|
|
|
|
|
|
|
.method public hidebysig static !!T& Add<T>(!!T& source, native uint elementOffset) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 3 |
|
|
|
|
ldarg.0 |
|
|
|
|
ldarg.1 |
|
|
|
|
sizeof !!T |
|
|
|
|
mul |
|
|
|
|
add |
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::Add |
|
|
|
|
|
|
|
|
|
.method public hidebysig static !!T& AddByteOffset<T>(!!T& source, native int byteOffset) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 2 |
|
|
|
@ -345,6 +362,15 @@
@@ -345,6 +362,15 @@
|
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::AddByteOffset |
|
|
|
|
|
|
|
|
|
.method public hidebysig static !!T& AddByteOffset<T>(!!T& source, native uint byteOffset) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 2 |
|
|
|
|
ldarg.0 |
|
|
|
|
ldarg.1 |
|
|
|
|
add |
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::AddByteOffset |
|
|
|
|
|
|
|
|
|
.method public hidebysig static !!T& Subtract<T>(!!T& source, int32 elementOffset) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 3 |
|
|
|
@ -380,6 +406,17 @@
@@ -380,6 +406,17 @@
|
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::Subtract |
|
|
|
|
|
|
|
|
|
.method public hidebysig static !!T& Subtract<T>(!!T& source, native uint elementOffset) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 3 |
|
|
|
|
ldarg.0 |
|
|
|
|
ldarg.1 |
|
|
|
|
sizeof !!T |
|
|
|
|
mul |
|
|
|
|
sub |
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::Subtract |
|
|
|
|
|
|
|
|
|
.method public hidebysig static !!T& SubtractByteOffset<T>(!!T& source, native int byteOffset) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 2 |
|
|
|
@ -389,6 +426,15 @@
@@ -389,6 +426,15 @@
|
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::SubtractByteOffset |
|
|
|
|
|
|
|
|
|
.method public hidebysig static !!T& SubtractByteOffset<T>(!!T& source, native uint byteOffset) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 2 |
|
|
|
|
ldarg.0 |
|
|
|
|
ldarg.1 |
|
|
|
|
sub |
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::SubtractByteOffset |
|
|
|
|
|
|
|
|
|
.method public hidebysig static native int ByteOffset<T>(!!T& origin, !!T& target) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 2 |
|
|
|
@ -425,6 +471,24 @@
@@ -425,6 +471,24 @@
|
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::IsAddressLessThan |
|
|
|
|
|
|
|
|
|
.method public hidebysig static bool IsNullRef<T>(!!T& source) cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 2 |
|
|
|
|
ldarg.0 |
|
|
|
|
ldc.i4.0 |
|
|
|
|
conv.u |
|
|
|
|
ceq |
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::IsNullRef |
|
|
|
|
|
|
|
|
|
.method public hidebysig static !!T& NullRef<T>() cil managed aggressiveinlining |
|
|
|
|
{ |
|
|
|
|
.maxstack 1 |
|
|
|
|
ldc.i4.0 |
|
|
|
|
conv.u |
|
|
|
|
ret |
|
|
|
|
} // end of method Unsafe::NullRef |
|
|
|
|
|
|
|
|
|
} // end of class System.Runtime.CompilerServices.Unsafe |
|
|
|
|
|
|
|
|
|
#ifdef netcoreapp |
|
|
|
|