Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ private static unsafe Continuation AllocContinuationClass(Continuation prevConti
}
#endif

[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
private static unsafe void AwaitTask(Task task, ConfigureAwaitOptions options)
{
Expand Down Expand Up @@ -384,7 +383,6 @@ private static unsafe void AwaitTask(Task task, ConfigureAwaitOptions options)
AsyncSuspend(taskCont);
}

[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
private static unsafe T AwaitTask<T>(Task<T> task, ConfigureAwaitOptions options)
{
Expand Down Expand Up @@ -430,7 +428,6 @@ private static unsafe T AwaitTask<T>(Task<T> task, ConfigureAwaitOptions options
/// awaiting a completion of an underlying Task or ValueTaskSource.
/// </summary>
/// <param name="valueTask">ValueTask whose completion we are awaiting.</param>
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
private static unsafe void TransparentAwaitValueTask(ValueTask valueTask)
{
Expand Down Expand Up @@ -479,7 +476,6 @@ private static unsafe void TransparentAwaitValueTask(ValueTask valueTask)
AsyncSuspend(nextCont);
}

[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
private static unsafe void AwaitValueTaskSource(IValueTaskSource source, short token, bool continueOnCapturedContext)
{
Expand Down Expand Up @@ -516,7 +512,6 @@ private static unsafe void AwaitValueTaskSource(IValueTaskSource source, short t
AsyncSuspend(vtsCont);
}

[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
private static unsafe T TransparentAwaitValueTaskOfT<T>(ValueTask<T> valueTask)
{
Expand Down Expand Up @@ -565,7 +560,6 @@ private static unsafe T TransparentAwaitValueTaskOfT<T>(ValueTask<T> valueTask)
return default!;
}

[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
private static unsafe T AwaitValueTaskSource<T>(IValueTaskSource<T> source, short token, bool continueOnCapturedContext)
{
Expand Down Expand Up @@ -607,7 +601,6 @@ private static unsafe T AwaitValueTaskSource<T>(IValueTaskSource<T> source, shor
/// Used by internal thunks that implement awaiting on Task.
/// </summary>
/// <param name="task">Task whose completion we are awaiting.</param>
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
private static unsafe void TransparentAwait(Task task)
{
Expand Down Expand Up @@ -637,7 +630,6 @@ private static unsafe void TransparentAwait(Task task)
/// Used by internal thunks that implement awaiting on Task.
/// </summary>
/// <param name="task">Task whose completion we are awaiting.</param>
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
private static unsafe T TransparentAwaitOfT<T>(Task<T> task)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace System.Runtime.CompilerServices
public static partial class AsyncHelpers
{
#if CORECLR || NATIVEAOT
// "BypassReadyToRun" is until AOT/R2R typesystem has support for MethodImpl.Async
// Must be NoInlining because we use AsyncSuspend to manufacture an explicit suspension point.
// It will not capture/restore any local state that is live across it.

Expand All @@ -23,7 +22,6 @@ public static partial class AsyncHelpers
/// </summary>
/// <typeparam name="TAwaiter">The awaiter type.</typeparam>
/// <param name="awaiter">The awaiter to await.</param>
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
[StackTraceHidden]
public static unsafe void AwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : INotifyCompletion
Expand All @@ -43,7 +41,6 @@ public static unsafe void AwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaite
/// </summary>
/// <typeparam name="TAwaiter">The awaiter type.</typeparam>
/// <param name="awaiter">The awaiter to await.</param>
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
[StackTraceHidden]
public static unsafe void UnsafeAwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : ICriticalNotifyCompletion
Expand All @@ -61,7 +58,6 @@ public static unsafe void UnsafeAwaitAwaiter<TAwaiter>(TAwaiter awaiter) where T
/// <typeparam name="T">The result type produced by the task.</typeparam>
/// <param name="task">The task to await.</param>
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[StackTraceHidden]
public static T Await<T>(Task<T> task)
Expand All @@ -81,7 +77,6 @@ public static T Await<T>(Task<T> task)
/// </summary>
/// <param name="task">The task to await.</param>
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[StackTraceHidden]
public static void Await(Task task)
Expand All @@ -102,7 +97,6 @@ public static void Await(Task task)
/// <typeparam name="T">The result type produced by the value task.</typeparam>
/// <param name="task">The value task to await.</param>
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[StackTraceHidden]
public static T Await<T>(ValueTask<T> task)
Expand Down Expand Up @@ -141,7 +135,6 @@ public static T Await<T>(ValueTask<T> task)
/// </summary>
/// <param name="task">The value task to await.</param>
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[StackTraceHidden]
public static void Await(ValueTask task)
Expand Down Expand Up @@ -182,7 +175,6 @@ public static void Await(ValueTask task)
/// </summary>
/// <param name="configuredAwaitable">The configured awaitable to await.</param>
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[StackTraceHidden]
public static void Await(ConfiguredTaskAwaitable configuredAwaitable)
Expand All @@ -206,7 +198,6 @@ public static void Await(ConfiguredTaskAwaitable configuredAwaitable)
}

[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async | MethodImplOptions.NoInlining)]
[StackTraceHidden]
private static void AwaitTaskWithRareOptions(ConfiguredTaskAwaitable.ConfiguredTaskAwaiter awaiter)
Expand All @@ -224,7 +215,6 @@ private static void AwaitTaskWithRareOptions(ConfiguredTaskAwaitable.ConfiguredT
/// </summary>
/// <param name="configuredAwaitable">The configured value task awaitable to await.</param>
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[StackTraceHidden]
public static void Await(ConfiguredValueTaskAwaitable configuredAwaitable)
Expand Down Expand Up @@ -267,7 +257,6 @@ public static void Await(ConfiguredValueTaskAwaitable configuredAwaitable)
/// <typeparam name="T">The result type produced by the awaitable.</typeparam>
/// <param name="configuredAwaitable">The configured awaitable to await.</param>
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[StackTraceHidden]
public static T Await<T>(ConfiguredTaskAwaitable<T> configuredAwaitable)
Expand All @@ -292,7 +281,6 @@ public static T Await<T>(ConfiguredTaskAwaitable<T> configuredAwaitable)
/// <typeparam name="T">The result type produced by the awaitable.</typeparam>
/// <param name="configuredAwaitable">The configured awaitable to await.</param>
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[StackTraceHidden]
public static T Await<T>(ConfiguredValueTaskAwaitable<T> configuredAwaitable)
Expand Down
Loading