From 315544804f22191915b890a1efade5c25c24f12f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:36:46 -0700 Subject: [PATCH] Put AO back to AwaitUnsafeOnCompleted (#90980) Co-authored-by: EgorBo --- .../src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs index 02a60f5..c3064ad 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs @@ -93,6 +93,9 @@ namespace System.Runtime.CompilerServices AwaitUnsafeOnCompleted(ref awaiter, box); } + // Tier0 codegen for this function may still allocate (while FullOpts won't). + // TODO: remove once https://github.com/dotnet/runtime/issues/90965 is implemented + [MethodImpl(MethodImplOptions.AggressiveOptimization)] internal static void AwaitUnsafeOnCompleted( ref TAwaiter awaiter, IAsyncStateMachineBox box) where TAwaiter : ICriticalNotifyCompletion -- 2.7.4