Skip to content

Commit

Permalink
[2018-04] Add non-generic AsyncValueTaskMethodBuilder, etc (#11747)
Browse files Browse the repository at this point in the history
Fixes #11731
  • Loading branch information
EgorBo authored and marek-safar committed Nov 20, 2018
1 parent 969357a commit 000780c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 10 deletions.
Expand Up @@ -22,14 +22,14 @@
//

[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncMethodBuilderAttribute))]
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<>))]
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<>))]
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter<>))]

//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ValueTask))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ValueTask))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ValueTask<>))]

[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.IValueTaskSource))]
Expand Down
10 changes: 8 additions & 2 deletions mcs/class/corlib/corlib.dll.sources
Expand Up @@ -1627,6 +1627,12 @@ corert/RuntimeAugments.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Diagnostics/Debug.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/DeferredDisposableLifetime.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/Tasks/Sources/IValueTaskSource.cs

../../../external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/ValueTaskAwaiter.cs
#../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/Tasks/ValueTask.cs
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
Expand Down Expand Up @@ -1746,8 +1752,8 @@ corefx/MemoryExtensions.cs
../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ContentType.cs
../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509KeyStorageFlags.cs

../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Threading/Tasks/ValueTask.cs
../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Runtime/CompilerServices/*.cs
#../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Threading/Tasks/ValueTask.cs
#../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Runtime/CompilerServices/*.cs

../../../external/corefx/src/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/*.cs

Expand Down
Expand Up @@ -710,7 +710,10 @@ internal void SetNotificationForWaitCompletion(bool enabled)
/// <param name="result">The result for which we need a task.</param>
/// <returns>The completed task containing the result.</returns>
[SecuritySafeCritical] // for JitHelpers.UnsafeCast
private Task<TResult> GetTaskForResult(TResult result)
#if MONO
internal static
#endif
Task<TResult> GetTaskForResult(TResult result)
{
Contract.Ensures(
EqualityComparer<TResult>.Default.Equals(result, Contract.Result<Task<TResult>>().Result),
Expand Down Expand Up @@ -775,7 +778,9 @@ private Task<TResult> GetTaskForResult(TResult result)
(typeof(TResult) == typeof(Byte) && default(Byte) == (Byte)(object)result) ||
(typeof(TResult) == typeof(SByte) && default(SByte) == (SByte)(object)result) ||
(typeof(TResult) == typeof(Char) && default(Char) == (Char)(object)result) ||
#if !MONO
(typeof(TResult) == typeof(Decimal) && default(Decimal) == (Decimal)(object)result) ||
#endif
(typeof(TResult) == typeof(Int64) && default(Int64) == (Int64)(object)result) ||
(typeof(TResult) == typeof(UInt64) && default(UInt64) == (UInt64)(object)result) ||
(typeof(TResult) == typeof(Int16) && default(Int16) == (Int16)(object)result) ||
Expand Down
5 changes: 4 additions & 1 deletion mcs/class/referencesource/mscorlib/system/throwhelper.cs
Expand Up @@ -566,7 +566,10 @@ internal enum ExceptionArgument {
exceptions,
exception,
action,
comparison
comparison,
state,
task,
source
#endif
}

Expand Down

0 comments on commit 000780c

Please sign in to comment.