Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Merge pull request #24187 from dotnet-maestro-bot/master-UpdateDepend…
Browse files Browse the repository at this point in the history
…encies

Update CoreClr, CoreSetup, ProjectNTfs, ProjectNTfsTestILC, Standard to preview1-25720-03, preview1-25719-04, beta-25721-01, beta-25721-01, preview1-25721-01, respectively (master)
  • Loading branch information
stephentoub authored Sep 22, 2017
2 parents 95f68c4 + 786195a commit 6ae4ff3
Show file tree
Hide file tree
Showing 20 changed files with 66 additions and 63 deletions.
22 changes: 11 additions & 11 deletions dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
-->
<PropertyGroup>
<CoreFxCurrentRef>ed8cf4ba3c0e143c142542aaf53a8cdaa6cb0023</CoreFxCurrentRef>
<CoreClrCurrentRef>ed8cf4ba3c0e143c142542aaf53a8cdaa6cb0023</CoreClrCurrentRef>
<CoreSetupCurrentRef>ed8cf4ba3c0e143c142542aaf53a8cdaa6cb0023</CoreSetupCurrentRef>
<CoreClrCurrentRef>790f084a4cfcc9f4559edc92988809906ebb6b6b</CoreClrCurrentRef>
<CoreSetupCurrentRef>790f084a4cfcc9f4559edc92988809906ebb6b6b</CoreSetupCurrentRef>
<ExternalCurrentRef>96dc7805f5df4a70a55783964ce69dcd91bfca80</ExternalCurrentRef>
<ProjectNTfsCurrentRef>568fb017cade704dcf611a1c991e7b8e2e27972b</ProjectNTfsCurrentRef>
<ProjectNTfsTestILCCurrentRef>568fb017cade704dcf611a1c991e7b8e2e27972b</ProjectNTfsTestILCCurrentRef>
<ProjectNTfsCurrentRef>790f084a4cfcc9f4559edc92988809906ebb6b6b</ProjectNTfsCurrentRef>
<ProjectNTfsTestILCCurrentRef>790f084a4cfcc9f4559edc92988809906ebb6b6b</ProjectNTfsTestILCCurrentRef>
<SniCurrentRef>8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd</SniCurrentRef>
<StandardCurrentRef>ed8cf4ba3c0e143c142542aaf53a8cdaa6cb0023</StandardCurrentRef>
<StandardCurrentRef>790f084a4cfcc9f4559edc92988809906ebb6b6b</StandardCurrentRef>
<BuildToolsCurrentRef>8cd983ea0756ec0b094cce18c820b9d1b9d2b107</BuildToolsCurrentRef>
</PropertyGroup>

<!-- Auto-upgraded properties for each build info dependency. -->
<PropertyGroup>
<PlatformPackageVersion>2.1.0-preview1-25718-03</PlatformPackageVersion>
<CoreFxExpectedPrerelease>preview1-25718-03</CoreFxExpectedPrerelease>
<CoreClrPackageVersion>2.1.0-preview1-25718-02</CoreClrPackageVersion>
<CoreClrPackageVersion>2.1.0-preview1-25720-03</CoreClrPackageVersion>
<ExternalExpectedPrerelease>beta-25627-00</ExternalExpectedPrerelease>
<ProjectNTfsExpectedPrerelease>beta-25715-00</ProjectNTfsExpectedPrerelease>
<ProjectNTfsTestILCExpectedPrerelease>beta-25715-00</ProjectNTfsTestILCExpectedPrerelease>
<ProjectNTfsTestILCPackageVersion>1.0.0-beta-25715-00</ProjectNTfsTestILCPackageVersion>
<NETStandardPackageVersion>2.1.0-preview1-25718-01</NETStandardPackageVersion>
<ProjectNTfsExpectedPrerelease>beta-25721-01</ProjectNTfsExpectedPrerelease>
<ProjectNTfsTestILCExpectedPrerelease>beta-25721-01</ProjectNTfsTestILCExpectedPrerelease>
<ProjectNTfsTestILCPackageVersion>1.0.0-beta-25721-01</ProjectNTfsTestILCPackageVersion>
<NETStandardPackageVersion>2.1.0-preview1-25721-01</NETStandardPackageVersion>
<NETStandardPackageId>NETStandard.Library</NETStandardPackageId>
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview1-25717-02</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview1-25719-04</MicrosoftNETCoreAppPackageVersion>
<!-- Use the SNI runtime package -->
<SniPackageVersion>4.4.0</SniPackageVersion>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions external/test-runtime/optional.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"net45": {
"dependencies": {
"Microsoft.DotNet.IBCMerge": "4.6.0-alpha-00001",
"TestILC.amd64ret": "1.0.0-beta-25715-00",
"TestILC.armret": "1.0.0-beta-25715-00",
"TestILC.x86ret": "1.0.0-beta-25715-00"
"TestILC.amd64ret": "1.0.0-beta-25721-01",
"TestILC.armret": "1.0.0-beta-25721-01",
"TestILC.x86ret": "1.0.0-beta-25721-01"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Common/tests/System/Buffers/NativeOwnedMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override bool IsRetained
}
}

public override unsafe Span<byte> AsSpan() => new Span<byte>((void*)_ptr, _length);
public override unsafe Span<byte> Span => new Span<byte>((void*)_ptr, _length);

public override unsafe MemoryHandle Pin() => new MemoryHandle(this, (void*)_ptr);

Expand Down
4 changes: 2 additions & 2 deletions src/System.IO/tests/Stream/Stream.ReadWriteSpan.netcoreapp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public async Task ReadAsyncMemory_WrapsNative_DelegatesToReadAsyncArrayWithPool_

using (var totalNativeMemory = new NativeOwnedMemory(30))
{
Memory<byte> totalMemory = totalNativeMemory.AsMemory;
Memory<byte> totalMemory = totalNativeMemory.Memory;
Memory<byte> targetMemory = totalMemory.Slice(5, 20);

Assert.Equal(10, await s.ReadAsync(targetMemory));
Expand Down Expand Up @@ -176,7 +176,7 @@ public async Task WriteAsyncMemory_WrapsNative_DelegatesToWrite_Success()

using (var nativeMemory = new NativeOwnedMemory(10))
{
Memory<byte> memory = nativeMemory.AsMemory;
Memory<byte> memory = nativeMemory.Memory;
memory.Span[2] = 0;
memory.Span[3] = 1;
memory.Span[4] = 2;
Expand Down
4 changes: 2 additions & 2 deletions src/System.Memory/ref/System.Memory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ public interface IRetainable

public abstract class OwnedMemory<T> : IDisposable, IRetainable
{
public Memory<T> AsMemory { get { throw null; } }
public Memory<T> Memory { get { throw null; } }
public abstract bool IsDisposed { get; }
protected abstract bool IsRetained { get; }
public abstract int Length { get; }
public abstract Span<T> AsSpan();
public abstract Span<T> Span { get; }
public void Dispose() { throw null; }
protected abstract void Dispose(bool disposing);
public abstract MemoryHandle Pin();
Expand Down
4 changes: 2 additions & 2 deletions src/System.Memory/src/System/Buffers/OwnedMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ public abstract class OwnedMemory<T> : IDisposable, IRetainable
/// <summary>
/// Returns a span wrapping the underlying memory.
/// </summary>
public abstract Span<T> AsSpan();
public abstract Span<T> Span { get; }

/// <summary>
/// Returns a Memory<typeparamref name="T"/> if the underlying memory has not been freed.
/// </summary>
/// <exception cref="System.ObjectDisposedException">
/// Thrown when the underlying memory has already been disposed.
/// </exception>
public Memory<T> AsMemory
public Memory<T> Memory
{
get
{
Expand Down
2 changes: 1 addition & 1 deletion src/System.Memory/src/System/Memory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public Span<T> Span
get
{
if (_index < 0)
return ((OwnedMemory<T>)_arrayOrOwnedMemory).AsSpan().Slice(_index & RemoveOwnedFlagBitMask, _length);
return ((OwnedMemory<T>)_arrayOrOwnedMemory).Span.Slice(_index & RemoveOwnedFlagBitMask, _length);
return new Span<T>((T[])_arrayOrOwnedMemory, _index, _length);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/System.Memory/src/System/ReadOnlyMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public ReadOnlySpan<T> Span
get
{
if (_index < 0)
return ((OwnedMemory<T>)_arrayOrOwnedMemory).AsSpan().Slice(_index & RemoveOwnedFlagBitMask, _length);
return ((OwnedMemory<T>)_arrayOrOwnedMemory).Span.Slice(_index & RemoveOwnedFlagBitMask, _length);
return new ReadOnlySpan<T>((T[])_arrayOrOwnedMemory, _index, _length);
}
}
Expand Down
11 changes: 7 additions & 4 deletions src/System.Memory/tests/Memory/CustomMemoryForTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ public CustomMemoryForTest(T[] array)

protected override bool IsRetained => _referenceCount > 0;

public override Span<T> AsSpan()
public override Span<T> Span
{
if (IsDisposed)
throw new ObjectDisposedException(nameof(CustomMemoryForTest<T>));
return new Span<T>(_array, 0, _array.Length);
get
{
if (IsDisposed)
throw new ObjectDisposedException(nameof(CustomMemoryForTest<T>));
return new Span<T>(_array, 0, _array.Length);
}
}

public override MemoryHandle Pin()
Expand Down
10 changes: 5 additions & 5 deletions src/System.Memory/tests/Memory/OwnedMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void MemoryFromOwnedMemoryInt()
{
int[] a = { 91, 92, -93, 94 };
OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
Memory<int> memory = owner.AsMemory;
Memory<int> memory = owner.Memory;
memory.Validate(91, 92, -93, 94);
}

Expand All @@ -27,7 +27,7 @@ public static void MemoryFromOwnedMemoryLong()
{
long[] a = { 91, -92, 93, 94, -95 };
OwnedMemory<long> owner = new CustomMemoryForTest<long>(a);
Memory<long> memory = owner.AsMemory;
Memory<long> memory = owner.Memory;
memory.Validate(91, -92, 93, 94, -95);
}

Expand All @@ -38,7 +38,7 @@ public static void MemoryFromOwnedMemoryObject()
object o2 = new object();
object[] a = { o1, o2 };
OwnedMemory<object> owner = new CustomMemoryForTest<object>(a);
Memory<object> memory = owner.AsMemory;
Memory<object> memory = owner.Memory;
memory.ValidateReferenceType(o1, o2);
}

Expand All @@ -47,7 +47,7 @@ public static void ImplicitReadOnlyMemoryFromOwnedMemory()
{
long[] a = { 91, -92, 93, 94, -95 };
OwnedMemory<long> owner = new CustomMemoryForTest<long>(a);
Memory<long> memory = owner.AsMemory;
Memory<long> memory = owner.Memory;
CastReadOnly<long>(memory, 91, -92, 93, 94, -95);
}

Expand All @@ -67,7 +67,7 @@ public static void MemoryFromOwnedMemoryAfterDispose()
int[] a = { 91, 92, -93, 94 };
OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
owner.Dispose();
Assert.Throws<ObjectDisposedException>(() => owner.AsMemory);
Assert.Throws<ObjectDisposedException>(() => owner.Memory);
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions src/System.Memory/tests/Memory/Retain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void OwnedMemoryRetainWithoutPinning()
{
int[] array = { 1, 2, 3, 4, 5 };
OwnedMemory<int> owner = new CustomMemoryForTest<int>(array);
Memory<int> memory = owner.AsMemory;
Memory<int> memory = owner.Memory;
MemoryHandle handle = memory.Retain();
unsafe
{
Expand All @@ -65,7 +65,7 @@ public static void OwnedMemoryRetainWithPinning()
{
int[] array = { 1, 2, 3, 4, 5 };
OwnedMemory<int> owner = new CustomMemoryForTest<int>(array);
Memory<int> memory = owner.AsMemory;
Memory<int> memory = owner.Memory;
MemoryHandle handle = memory.Retain(pin: true);
unsafe
{
Expand Down
12 changes: 6 additions & 6 deletions src/System.Memory/tests/Memory/Slice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void SliceWithStart()
Assert.True(Unsafe.AreSame(ref a[6], ref memory.Span.DangerousGetPinnableReference()));

OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
Memory<int> memoryFromOwner = owner.AsMemory.Slice(6);
Memory<int> memoryFromOwner = owner.Memory.Slice(6);

Assert.Equal(4, memoryFromOwner.Length);
Assert.True(Unsafe.AreSame(ref a[6], ref memoryFromOwner.Span.DangerousGetPinnableReference()));
Expand All @@ -34,7 +34,7 @@ public static void SliceWithStartPastEnd()
Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memory.Span.DangerousGetPinnableReference(), 1)));

OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
Memory<int> memoryFromOwner = owner.AsMemory.Slice(a.Length);
Memory<int> memoryFromOwner = owner.Memory.Slice(a.Length);

Assert.Equal(0, memoryFromOwner.Length);
Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memoryFromOwner.Span.DangerousGetPinnableReference(), 1)));
Expand All @@ -49,7 +49,7 @@ public static void SliceWithStartAndLength()
Assert.True(Unsafe.AreSame(ref a[3], ref memory.Span.DangerousGetPinnableReference()));

OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
Memory<int> memoryFromOwner = owner.AsMemory.Slice(3, 5);
Memory<int> memoryFromOwner = owner.Memory.Slice(3, 5);

Assert.Equal(5, memoryFromOwner.Length);
Assert.True(Unsafe.AreSame(ref a[3], ref memoryFromOwner.Span.DangerousGetPinnableReference()));
Expand All @@ -64,7 +64,7 @@ public static void SliceWithStartAndLengthUpToEnd()
Assert.True(Unsafe.AreSame(ref a[4], ref memory.Span.DangerousGetPinnableReference()));

OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
Memory<int> memoryFromOwner = owner.AsMemory.Slice(4, 6);
Memory<int> memoryFromOwner = owner.Memory.Slice(4, 6);

Assert.Equal(6, memoryFromOwner.Length);
Assert.True(Unsafe.AreSame(ref a[4], ref memoryFromOwner.Span.DangerousGetPinnableReference()));
Expand All @@ -79,7 +79,7 @@ public static void SliceWithStartAndLengthPastEnd()
Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memory.Span.DangerousGetPinnableReference(), 1)));

OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
Memory<int> memoryFromOwner = owner.AsMemory.Slice(a.Length, 0);
Memory<int> memoryFromOwner = owner.Memory.Slice(a.Length, 0);

Assert.Equal(0, memoryFromOwner.Length);
Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memoryFromOwner.Span.DangerousGetPinnableReference(), 1)));
Expand All @@ -98,7 +98,7 @@ public static void SliceRangeChecks()
Assert.Throws<ArgumentOutOfRangeException>(() => new Memory<int>(a).Slice(a.Length, 1));

OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
Memory<int> memory = owner.AsMemory;
Memory<int> memory = owner.Memory;

Assert.Throws<ArgumentOutOfRangeException>(() => memory.Slice(-1));
Assert.Throws<ArgumentOutOfRangeException>(() => memory.Slice(a.Length + 1));
Expand Down
10 changes: 5 additions & 5 deletions src/System.Memory/tests/Memory/Span.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void SpanFromCtorArrayInt()
memory.Span.Validate(91, 92, -93, 94);

OwnedMemory<int> owner = new CustomMemoryForTest<int>(a);
owner.AsMemory.Span.Validate(91, 92, -93, 94);
owner.Memory.Span.Validate(91, 92, -93, 94);
}

[Fact]
Expand All @@ -38,7 +38,7 @@ public static void SpanFromCtorArrayLong()
memory.Span.Validate(91, -92, 93, 94, -95);

OwnedMemory<long> owner = new CustomMemoryForTest<long>(a);
owner.AsMemory.Span.Validate(91, -92, 93, 94, -95);
owner.Memory.Span.Validate(91, -92, 93, 94, -95);
}

[ActiveIssue(23952, TargetFrameworkMonikers.UapAot)]
Expand All @@ -57,7 +57,7 @@ public static void SpanFromCtorArrayObject()
memory.Span.ValidateReferenceType(o1, o2);

OwnedMemory<object> owner = new CustomMemoryForTest<object>(a);
owner.AsMemory.Span.ValidateReferenceType(o1, o2);
owner.Memory.Span.ValidateReferenceType(o1, o2);
}

[Fact]
Expand All @@ -73,7 +73,7 @@ public static void SpanFromCtorArrayZeroLength()
memory.Span.Validate();

OwnedMemory<int> owner = new CustomMemoryForTest<int>(empty);
owner.AsMemory.Span.Validate();
owner.Memory.Span.Validate();
}

[Fact]
Expand All @@ -92,7 +92,7 @@ public static void SpanFromCtorArrayWrongValueType()
memory.Span.Validate(42, -1);

OwnedMemory<int> owner = new CustomMemoryForTest<int>(aAsIntArray);
owner.AsMemory.Span.Validate(42, -1);
owner.Memory.Span.Validate(42, -1);
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/System.Memory/tests/Memory/TryGetArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void OwnedMemoryTryGetArray()
{
int[] array = new int[10];
OwnedMemory<int> owner = new CustomMemoryForTest<int>(array);
Memory<int> memory = owner.AsMemory;
Memory<int> memory = owner.Memory;
Assert.True(memory.TryGetArray(out ArraySegment<int> segment));
Assert.Equal(array.Length, segment.Count);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void OwnedMemoryTryGetArray()
{
int[] array = new int[10];
OwnedMemory<int> owner = new CustomMemoryForTest<int>(array);
ReadOnlyMemory<int> memory = owner.AsMemory;
ReadOnlyMemory<int> memory = owner.Memory;
Assert.True(memory.DangerousTryGetArray(out ArraySegment<int> segment));
Assert.Equal(array.Length, segment.Count);

Expand Down
4 changes: 2 additions & 2 deletions src/System.Memory/tests/ReadOnlyMemory/Retain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void OwnedMemoryRetainWithoutPinning()
{
int[] array = { 1, 2, 3, 4, 5 };
OwnedMemory<int> owner = new CustomMemoryForTest<int>(array);
ReadOnlyMemory<int> memory = owner.AsMemory;
ReadOnlyMemory<int> memory = owner.Memory;
MemoryHandle handle = memory.Retain();
unsafe
{
Expand All @@ -65,7 +65,7 @@ public static void OwnedMemoryRetainWithPinning()
{
int[] array = { 1, 2, 3, 4, 5 };
OwnedMemory<int> owner = new CustomMemoryForTest<int>(array);
ReadOnlyMemory<int> memory = owner.AsMemory;
ReadOnlyMemory<int> memory = owner.Memory;
MemoryHandle handle = memory.Retain(pin: true);
unsafe
{
Expand Down
Loading

0 comments on commit 6ae4ff3

Please sign in to comment.