Merge branch 'upstream'
Former-commit-id: abe52173795680dcc47a5ae626dc34e3fb8e6203
This commit is contained in:
commit
ba9936ed7f
@ -1 +1 @@
|
||||
7ea109857e824ef015de7d2a2c808d994f6356b7
|
||||
b796426724e7961d0e254ca3f7d9ac4049499d5d
|
@ -1 +1 @@
|
||||
38a8192e8bea043bb0bc52e78aa307fb8fade1b7
|
||||
edc8bec4f4b607c3a97b3df060a00581a5ec2e30
|
@ -89,8 +89,12 @@ namespace System.Globalization
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(year), SR.ArgumentOutOfRange_Year);
|
||||
}
|
||||
|
||||
int P(int y) => (y + (y / 4) - (y / 100) + (y / 400)) % 7;
|
||||
#if __MonoCS__ // mcs doesn't support local functions
|
||||
Func<int, int> P = y =>
|
||||
#else
|
||||
int P(int y) =>
|
||||
#endif
|
||||
(y + (y / 4) - (y / 100) + (y / 400)) % 7;
|
||||
|
||||
if (P(year) == 4 || P(year - 1) == 3)
|
||||
{
|
||||
|
@ -25,6 +25,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace System.IO
|
||||
{
|
||||
#if MONO
|
||||
[Serializable]
|
||||
#endif
|
||||
public abstract partial class Stream : MarshalByRefObject, IDisposable
|
||||
{
|
||||
public static readonly Stream Null = new NullStream();
|
||||
@ -35,8 +38,14 @@ namespace System.IO
|
||||
private const int DefaultCopyBufferSize = 81920;
|
||||
|
||||
// To implement Async IO operations on streams that don't support async IO
|
||||
|
||||
#if MONO
|
||||
[NonSerialized]
|
||||
#endif
|
||||
private ReadWriteTask _activeReadWriteTask;
|
||||
|
||||
#if MONO
|
||||
[NonSerialized]
|
||||
#endif
|
||||
private SemaphoreSlim _asyncActiveSemaphore;
|
||||
|
||||
internal SemaphoreSlim EnsureAsyncActiveSemaphoreInitialized()
|
||||
@ -372,8 +381,9 @@ namespace System.IO
|
||||
else
|
||||
{
|
||||
byte[] sharedBuffer = ArrayPool<byte>.Shared.Rent(buffer.Length);
|
||||
return FinishReadAsync(ReadAsync(sharedBuffer, 0, buffer.Length, cancellationToken), sharedBuffer, buffer);
|
||||
|
||||
#if !__MonoCS__
|
||||
return FinishReadAsync(ReadAsync(sharedBuffer, 0, buffer.Length, cancellationToken), sharedBuffer, buffer);
|
||||
async ValueTask<int> FinishReadAsync(Task<int> readTask, byte[] localBuffer, Memory<byte> localDestination)
|
||||
{
|
||||
try
|
||||
@ -387,9 +397,27 @@ namespace System.IO
|
||||
ArrayPool<byte>.Shared.Return(localBuffer);
|
||||
}
|
||||
}
|
||||
#else
|
||||
return new ValueTask<int> (FinishReadAsync(ReadAsync(sharedBuffer, 0, buffer.Length, cancellationToken), sharedBuffer, buffer));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if __MonoCS__
|
||||
internal async Task<int> FinishReadAsync(Task<int> readTask, byte[] localBuffer, Memory<byte> localDestination)
|
||||
{
|
||||
try
|
||||
{
|
||||
int result = await readTask.ConfigureAwait(false);
|
||||
new Span<byte>(localBuffer, 0, result).CopyTo(localDestination.Span);
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ArrayPool<byte>.Shared.Return(localBuffer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
private Task<int> BeginEndReadAsync(byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (!HasOverriddenBeginEndRead())
|
||||
|
@ -33,7 +33,7 @@ namespace System
|
||||
number.sign = double.IsNegative(value);
|
||||
*dst = '\0';
|
||||
|
||||
if (value == 0.0)
|
||||
if (BitConverter.DoubleToInt64Bits (value) == 0)
|
||||
{
|
||||
for (int j = 0; j < precision; j++)
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "5.20.0.180";
|
||||
public const string MonoVersion = "5.20.0.184";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -1 +1 @@
|
||||
4f4391e937dcc54a4359d358a1c775bdef279ec8
|
||||
865e5662e29da2a52bb18b2500ddc7bd5f45d50f
|
@ -1 +1 @@
|
||||
0a6705fab6968dae1904e86f6543c5f877d5a4a8
|
||||
6a865dece6532c6139ed10e8bfc0b21b1525bed6
|
@ -1 +1 @@
|
||||
a03e85c37ce0d3d08fae6dea915d62fb4c71b5aa
|
||||
5a096ae0d88faf3f76e9e3a8950467a4a409c735
|
Binary file not shown.
@ -1 +1 @@
|
||||
32ddda617ddf4b5f8efd69a8440738ca362f1599
|
||||
36de3a387d536149b60018901ae19b8a27886712
|
@ -1 +1 @@
|
||||
5b76c9eff6ad5174965dbaae00f687535380c3a1
|
||||
b11e33b00feef3ef153728eefb46a0b6e937b126
|
@ -1 +1 @@
|
||||
1d3ebea05d4f45721fc50683072d60048f65e461
|
||||
1caba0de2880f7ce16a6137889542db4278b682d
|
@ -1 +1 @@
|
||||
783746cb55609a3dee958691967fb240f9fe1146
|
||||
58981cf12840e74fa15ccaae8ebaacf740707edf
|
@ -1 +1 @@
|
||||
4f4391e937dcc54a4359d358a1c775bdef279ec8
|
||||
865e5662e29da2a52bb18b2500ddc7bd5f45d50f
|
@ -1 +1 @@
|
||||
0a6705fab6968dae1904e86f6543c5f877d5a4a8
|
||||
6a865dece6532c6139ed10e8bfc0b21b1525bed6
|
@ -1 +1 @@
|
||||
a03e85c37ce0d3d08fae6dea915d62fb4c71b5aa
|
||||
5a096ae0d88faf3f76e9e3a8950467a4a409c735
|
Binary file not shown.
@ -1 +1 @@
|
||||
32ddda617ddf4b5f8efd69a8440738ca362f1599
|
||||
36de3a387d536149b60018901ae19b8a27886712
|
@ -1 +1 @@
|
||||
5b76c9eff6ad5174965dbaae00f687535380c3a1
|
||||
b11e33b00feef3ef153728eefb46a0b6e937b126
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user