diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs index fb1d08b056eb89..0eeea7e127dfd0 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs @@ -111,6 +111,7 @@ internal unsafe class Continuation // See note in ContinuationFlags above for the computation of these offsets. + [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe object GetContinuationContext() { const uint mask = (1u << (int)ContinuationFlags.ContinuationContextIndexNumBits) - 1; @@ -120,12 +121,14 @@ public unsafe object GetContinuationContext() return Unsafe.As(ref Unsafe.Add(ref data, (DataOffset - PointerSize) + index * PointerSize)); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool HasException() { const uint mask = (1u << (int)ContinuationFlags.ExceptionIndexNumBits) - 1; return ((uint)Flags & (mask << (int)ContinuationFlags.ExceptionIndexFirstBit)) != 0; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetException(Exception ex) { const uint mask = (1u << (int)ContinuationFlags.ExceptionIndexNumBits) - 1; @@ -135,6 +138,7 @@ public void SetException(Exception ex) Unsafe.As(ref Unsafe.Add(ref data, (DataOffset - PointerSize) + index * PointerSize)) = ex; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ref byte GetResultStorageOrNull() { const uint mask = (1u << (int)ContinuationFlags.ResultIndexNumBits) - 1;