@@ -14,9 +14,6 @@ namespace System.Runtime.CompilerServices
1414 public static partial class AsyncHelpers
1515 {
1616#if CORECLR || NATIVEAOT
17- // "BypassReadyToRun" keeps these MethodImpl.Async helpers out of AOT/R2R images on platforms
18- // that don't support runtime-async (RUNTIME_ASYNC_SUPPORTED is not defined there). On those
19- // platforms the JIT cannot emit code for runtime-async returns, so the helpers must be JITted.
2017 // Must be NoInlining because we use AsyncSuspend to manufacture an explicit suspension point.
2118 // It will not capture/restore any local state that is live across it.
2219
@@ -25,9 +22,6 @@ public static partial class AsyncHelpers
2522 /// </summary>
2623 /// <typeparam name="TAwaiter">The awaiter type.</typeparam>
2724 /// <param name="awaiter">The awaiter to await.</param>
28- #if ! RUNTIME_ASYNC_SUPPORTED
29- [ BypassReadyToRun ]
30- #endif
3125 [ MethodImpl ( MethodImplOptions . NoInlining | MethodImplOptions . Async ) ]
3226 [ StackTraceHidden ]
3327 public static unsafe void AwaitAwaiter < TAwaiter > ( TAwaiter awaiter ) where TAwaiter : INotifyCompletion
@@ -47,9 +41,6 @@ public static unsafe void AwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaite
4741 /// </summary>
4842 /// <typeparam name="TAwaiter">The awaiter type.</typeparam>
4943 /// <param name="awaiter">The awaiter to await.</param>
50- #if ! RUNTIME_ASYNC_SUPPORTED
51- [ BypassReadyToRun ]
52- #endif
5344 [ MethodImpl ( MethodImplOptions . NoInlining | MethodImplOptions . Async ) ]
5445 [ StackTraceHidden ]
5546 public static unsafe void UnsafeAwaitAwaiter < TAwaiter > ( TAwaiter awaiter ) where TAwaiter : ICriticalNotifyCompletion
@@ -67,9 +58,6 @@ public static unsafe void UnsafeAwaitAwaiter<TAwaiter>(TAwaiter awaiter) where T
6758 /// <typeparam name="T">The result type produced by the task.</typeparam>
6859 /// <param name="task">The task to await.</param>
6960 [ Intrinsic ]
70- #if ! RUNTIME_ASYNC_SUPPORTED
71- [ BypassReadyToRun ]
72- #endif
7361 [ MethodImpl ( MethodImplOptions . Async ) ]
7462 [ StackTraceHidden ]
7563 public static T Await < T > ( Task < T > task )
@@ -89,9 +77,6 @@ public static T Await<T>(Task<T> task)
8977 /// </summary>
9078 /// <param name="task">The task to await.</param>
9179 [ Intrinsic ]
92- #if ! RUNTIME_ASYNC_SUPPORTED
93- [ BypassReadyToRun ]
94- #endif
9580 [ MethodImpl ( MethodImplOptions . Async ) ]
9681 [ StackTraceHidden ]
9782 public static void Await ( Task task )
@@ -112,9 +97,6 @@ public static void Await(Task task)
11297 /// <typeparam name="T">The result type produced by the value task.</typeparam>
11398 /// <param name="task">The value task to await.</param>
11499 [ Intrinsic ]
115- #if ! RUNTIME_ASYNC_SUPPORTED
116- [ BypassReadyToRun ]
117- #endif
118100 [ MethodImpl ( MethodImplOptions . Async ) ]
119101 [ StackTraceHidden ]
120102 public static T Await < T > ( ValueTask < T > task )
@@ -153,9 +135,6 @@ public static T Await<T>(ValueTask<T> task)
153135 /// </summary>
154136 /// <param name="task">The value task to await.</param>
155137 [ Intrinsic ]
156- #if ! RUNTIME_ASYNC_SUPPORTED
157- [ BypassReadyToRun ]
158- #endif
159138 [ MethodImpl ( MethodImplOptions . Async ) ]
160139 [ StackTraceHidden ]
161140 public static void Await ( ValueTask task )
@@ -196,9 +175,6 @@ public static void Await(ValueTask task)
196175 /// </summary>
197176 /// <param name="configuredAwaitable">The configured awaitable to await.</param>
198177 [ Intrinsic ]
199- #if ! RUNTIME_ASYNC_SUPPORTED
200- [ BypassReadyToRun ]
201- #endif
202178 [ MethodImpl ( MethodImplOptions . Async ) ]
203179 [ StackTraceHidden ]
204180 public static void Await ( ConfiguredTaskAwaitable configuredAwaitable )
@@ -222,9 +198,6 @@ public static void Await(ConfiguredTaskAwaitable configuredAwaitable)
222198 }
223199
224200 [ Intrinsic ]
225- #if ! RUNTIME_ASYNC_SUPPORTED
226- [ BypassReadyToRun ]
227- #endif
228201 [ MethodImpl ( MethodImplOptions . Async | MethodImplOptions . NoInlining ) ]
229202 [ StackTraceHidden ]
230203 private static void AwaitTaskWithRareOptions ( ConfiguredTaskAwaitable . ConfiguredTaskAwaiter awaiter )
@@ -242,9 +215,6 @@ private static void AwaitTaskWithRareOptions(ConfiguredTaskAwaitable.ConfiguredT
242215 /// </summary>
243216 /// <param name="configuredAwaitable">The configured value task awaitable to await.</param>
244217 [ Intrinsic ]
245- #if ! RUNTIME_ASYNC_SUPPORTED
246- [ BypassReadyToRun ]
247- #endif
248218 [ MethodImpl ( MethodImplOptions . Async ) ]
249219 [ StackTraceHidden ]
250220 public static void Await ( ConfiguredValueTaskAwaitable configuredAwaitable )
@@ -287,9 +257,6 @@ public static void Await(ConfiguredValueTaskAwaitable configuredAwaitable)
287257 /// <typeparam name="T">The result type produced by the awaitable.</typeparam>
288258 /// <param name="configuredAwaitable">The configured awaitable to await.</param>
289259 [ Intrinsic ]
290- #if ! RUNTIME_ASYNC_SUPPORTED
291- [ BypassReadyToRun ]
292- #endif
293260 [ MethodImpl ( MethodImplOptions . Async ) ]
294261 [ StackTraceHidden ]
295262 public static T Await < T > ( ConfiguredTaskAwaitable < T > configuredAwaitable )
@@ -314,9 +281,6 @@ public static T Await<T>(ConfiguredTaskAwaitable<T> configuredAwaitable)
314281 /// <typeparam name="T">The result type produced by the awaitable.</typeparam>
315282 /// <param name="configuredAwaitable">The configured awaitable to await.</param>
316283 [ Intrinsic ]
317- #if ! RUNTIME_ASYNC_SUPPORTED
318- [ BypassReadyToRun ]
319- #endif
320284 [ MethodImpl ( MethodImplOptions . Async ) ]
321285 [ StackTraceHidden ]
322286 public static T Await < T > ( ConfiguredValueTaskAwaitable < T > configuredAwaitable )
0 commit comments