Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Update dependencies #7896

Merged
merged 1 commit into from Dec 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions dependencies.props
@@ -1,10 +1,10 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RyuJITVersion Condition="'$(RyuJITVersion)' == ''">5.0.0-alpha1.19559.4</RyuJITVersion>
<RyuJITVersion Condition="'$(RyuJITVersion)' == ''">5.0.0-alpha1.19563.3</RyuJITVersion>
<ObjectWriterVersion Condition="'$(ObjectWriterVersion)' == ''">1.0.0-alpha-28204-03</ObjectWriterVersion>
<CoreFxVersion Condition="'$(CoreFxVersion)' == ''">5.0.0-alpha.1.19555.8</CoreFxVersion>
<CoreFxVersion Condition="'$(CoreFxVersion)' == ''">5.0.0-alpha.1.19563.6</CoreFxVersion>
<CoreFxUapVersion Condition="'$(CoreFxUapVersion)' == ''">4.7.0-preview6.19265.2</CoreFxUapVersion>
<MicrosoftNETCoreNativeVersion Condition="'$(MicrosoftNETCoreNativeVersion)' == ''">5.0.0-alpha1.19559.4</MicrosoftNETCoreNativeVersion>
<MicrosoftNETCoreNativeVersion Condition="'$(MicrosoftNETCoreNativeVersion)' == ''">5.0.0-alpha1.19563.3</MicrosoftNETCoreNativeVersion>
<MicrosoftNETCoreAppPackageVersion Condition="'$(MicrosoftNETCoreAppPackageVersion)' == ''">2.1.11</MicrosoftNETCoreAppPackageVersion>
<MicrosoftDotNetTestSdkVersion Condition="'$(MicrosoftDotNetTestSdkVersion)' == ''">15.8.0</MicrosoftDotNetTestSdkVersion>
<XUnitPackageVersion Condition="'$(XUnitPackageVersion)' == ''">2.4.1-pre.build.4059</XUnitPackageVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/Framework/Framework.depproj
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<PropertyGroup>
<NuGetTargetMoniker>.NETCoreApp,Version=v3.0</NuGetTargetMoniker>
<TargetFramework>netcoreapp3.0</TargetFramework>
<NuGetTargetMoniker>.NETCoreApp,Version=v5.0</NuGetTargetMoniker>
<TargetFramework>netcoreapp5.0</TargetFramework>
<RuntimeIdentifiers>$(NuPkgRid)</RuntimeIdentifiers>
<RidSpecificAssets>true</RidSpecificAssets>
</PropertyGroup>
Expand Down
Expand Up @@ -1365,7 +1365,7 @@ private void getCallInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESO
}
}

pResult->_secureDelegateInvoke = 0;
pResult->_wrapperDelegateInvoke = 0;
}

private void embedGenericHandle(ref CORINFO_RESOLVED_TOKEN pResolvedToken, bool fEmbedParent, ref CORINFO_GENERICHANDLE_RESULT pResult)
Expand Down
6 changes: 3 additions & 3 deletions src/JitInterface/src/CorInfoTypes.cs
Expand Up @@ -926,7 +926,7 @@ public struct InlinedCallFrameInfo
public uint offsetOfDelegateFirstTarget;

// Secure delegate offsets
public uint offsetOfSecureDelegateIndirectCell;
public uint offsetOfWrapperDelegateIndirectCell;

// Remoting offsets
public uint offsetOfTransparentProxyRP;
Expand Down Expand Up @@ -1103,8 +1103,8 @@ public unsafe struct CORINFO_CALL_INFO
// Used by Ready-to-Run
public CORINFO_CONST_LOOKUP instParamLookup;

public uint _secureDelegateInvoke;
public bool secureDelegateInvoke { get { return _secureDelegateInvoke != 0; } set { _secureDelegateInvoke = value ? (byte)1 : (byte)0; } }
public uint _wrapperDelegateInvoke;
public bool wrapperDelegateInvoke { get { return _wrapperDelegateInvoke != 0; } set { _wrapperDelegateInvoke = value ? (byte)1 : (byte)0; } }
}


Expand Down
6 changes: 3 additions & 3 deletions src/JitInterface/src/ThunkGenerator/corinfo.h
Expand Up @@ -1703,7 +1703,7 @@ struct CORINFO_CALL_INFO

CORINFO_CONST_LOOKUP instParamLookup; // Used by Ready-to-Run

BOOL secureDelegateInvoke;
BOOL wrapperDelegateInvoke;
};

//----------------------------------------------------------------------------
Expand Down Expand Up @@ -1830,8 +1830,8 @@ struct CORINFO_EE_INFO
unsigned offsetOfDelegateInstance;
unsigned offsetOfDelegateFirstTarget;

// Secure delegate offsets
unsigned offsetOfSecureDelegateIndirectCell;
// Wrapper delegate offsets
unsigned offsetOfWrapperDelegateIndirectCell;

// Remoting offsets
unsigned offsetOfTransparentProxyRP;
Expand Down
Expand Up @@ -23,7 +23,6 @@ internal static bool InternalExists(string fullPath)
/// Returns 0 on success, otherwise a Win32 error code. Note that
/// classes should use -1 as the uninitialized state for dataInitialized.
/// </summary>
/// <param name="returnErrorOnNotFound">Return the error code for not found errors?</param>
internal static int FillAttributeInfo(string path, ref Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data, bool returnErrorOnNotFound)
{
int errorCode = Interop.Errors.ERROR_SUCCESS;
Expand Down
Expand Up @@ -11,16 +11,11 @@
#pragma warning disable SA1121 // explicitly using type aliases instead of built-in types
#if BIT64
using nuint = System.UInt64;
#else
using nuint = System.UInt32;
#endif
#if !CORECLR
#if BIT64
using nint = System.Int64;
#else
using nuint = System.UInt32;
using nint = System.Int32;
#endif
#endif

//
// The implementations of most the methods in this file are provided as intrinsics.
Expand Down Expand Up @@ -150,12 +145,25 @@ public static int SizeOf<T>()
#endif
}

#if BIT64
/// <summary>
/// Adds an element offset to the given reference.
/// </summary>
[Intrinsic]
[NonVersionable]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static ref T Add<T>(ref T source, nint elementOffset)
{
return ref Unsafe.Add(ref source, (IntPtr)(void*)elementOffset);
}
#endif

/// <summary>
/// Adds an byte offset to the given reference.
/// </summary>
[Intrinsic]
[NonVersionable]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static ref T AddByteOffset<T>(ref T source, nuint byteOffset)
{
return ref AddByteOffset(ref source, (IntPtr)(void*)byteOffset);
Expand Down Expand Up @@ -295,7 +303,7 @@ public static void WriteUnaligned<T>(ref byte destination, T value)
}

/// <summary>
/// Adds an element offset to the given reference.
/// Adds an byte offset to the given reference.
/// </summary>
[Intrinsic]
[NonVersionable]
Expand Down
Expand Up @@ -7,7 +7,6 @@
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;

internal static partial class Interop
{
Expand Down
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
Expand Down
Expand Up @@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;
using System.Security;

internal static partial class Interop
{
Expand Down
Expand Up @@ -4,7 +4,6 @@

using System;
using System.Runtime.InteropServices;
using System.Security;

internal static partial class Interop
{
Expand Down
18 changes: 1 addition & 17 deletions src/System.Private.CoreLib/shared/README.md
@@ -1,19 +1,3 @@
# System.Private.CoreLib Shared Sources

This directory contains the shared sources for System.Private.CoreLib. These are shared between [mono/mono](https://github.com/mono/mono/tree/master/netcore/System.Private.CoreLib/shared), [dotnet/coreclr](https://github.com/dotnet/coreclr/tree/master/src/System.Private.CoreLib/shared) and [dotnet/corefx](https://github.com/dotnet/corefx/tree/master/src/Common/src/CoreLib).

The sources are synchronized with a mirroring tool that watches for new commits on either side and creates new pull requests (as @dotnet-bot) in the other repository.

## Conventions

Code in the shared directory should have no code specific to CoreCLR, CoreRT or CoreFX. Parts of classes that need to have different implementations on different runtimes should use partial classes and &#42;.CoreCLR.cs/&#42;.CoreFX.cs files in the non shared portion. Code that is different based on platform (Windows/Unix) is fine to leave in the shared portion. Remember to follow the [style guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md).

## Getting clean CI and merging the mirror PRs

Once the mirror PR is created there is a chance that the new code will require changes to get a clean CI. Any changes can be added to the PR by checking out the PR branch and adding new commits. Please follow the following guidelines for modifying these PRs.

- **DO NOT** modify the commits made by @dotnet-bot in any way.
- **TRY** to only make changes outside of shared.
- Changes made in the shared folder in additional commits will get mirrored properly if the mirror PR is merged with a **REBASE**
- **ALWAYS** Merge the mirror PR with the **REBASE** option.
- Using one of the other options will cause the mirror to miss commits
This directory contains the shared sources for System.Private.CoreLib. It represents the majority of the CoreLib implementation. Each flavor of the runtime (e.g. coreclr, mono) provides a few additional files as part of its build of CoreLib to complement this directory's contents.
@@ -1,6 +1,5 @@
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>c5ed3c1d-b572-46f1-8f96-522a85ce1179</SharedGUID>
</PropertyGroup>
Expand All @@ -10,16 +9,6 @@
<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<TargetsWindows Condition="'$(TargetsWindows)' != 'true'">false</TargetsWindows>
<TargetsUnix Condition="'$(TargetsUnix)' != 'true'">false</TargetsUnix>
<TargetsOSX Condition="'$(TargetsOSX)' != 'true'">false</TargetsOSX>
</PropertyGroup>
<ItemDefinitionGroup>
<Compile>
<Visible>true</Visible>
</Compile>
</ItemDefinitionGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Internal\IO\File.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Internal\Padding.cs" />
Expand Down Expand Up @@ -1029,7 +1018,7 @@
</Content>
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\Vector_Operations.cs" />
</ItemGroup>
<ItemGroup Condition="$(TargetsWindows)">
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Advapi32\Interop.EventActivityIdControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Advapi32\Interop.EventRegister.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Advapi32\Interop.EventSetInformation.cs" />
Expand Down Expand Up @@ -1075,7 +1064,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetSystemTime.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetSystemTimeAsFileTime.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetSystemTimePreciseAsFileTime.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetSystemTimes.cs" Condition="'$(FeaturePerfTracing)' == 'true' OR '$(FeaturePortableThreadPool)' == 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetSystemTimes.cs" Condition="'$(FeaturePerfTracing)' == 'true' or '$(FeaturePortableThreadPool)' == 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetTempFileNameW.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetTempPathW.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetVersionExW.cs" />
Expand Down Expand Up @@ -1158,7 +1147,7 @@
<ItemGroup Condition="'$(FeatureCominterop)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\WindowsRuntime\EventRegistrationToken.cs" />
</ItemGroup>
<ItemGroup Condition="$(TargetsWindows)">
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)Internal\Win32\RegistryKey.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Advapi32\Interop.RegCloseKey.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Advapi32\Interop.RegCreateKeyEx.cs" />
Expand Down Expand Up @@ -1193,7 +1182,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.Win32.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\TimeZoneInfo.Win32.cs" />
</ItemGroup>
<ItemGroup Condition="$(TargetsWindows) or '$(FeaturePal)'=='true'">
<ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(FeaturePal)'=='true'">
<Compile Include="$(MSBuildThisFileDirectory)Microsoft\Win32\SafeHandles\SafeWaitHandle.Windows.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Interop.Errors.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\OleAut32\Interop.SysAllocStringLen.cs" />
Expand Down Expand Up @@ -1221,7 +1210,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Internal\Resources\WindowsRuntimeResourceManagerBase.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Resources\ResourceManager.Uap.cs" />
</ItemGroup>
<ItemGroup Condition="$(TargetsUnix)">
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\Interop.Errors.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\Interop.IOErrors.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Unix\Interop.Libraries.cs" />
Expand Down Expand Up @@ -1306,7 +1295,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\TimerQueue.Unix.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\TimeZoneInfo.Unix.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' == 'true' AND ('$(Platform)' == 'x64' OR ('$(Platform)' == 'x86' AND '$(TargetsUnix)' != 'true'))">
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' == 'true' and ('$(Platform)' == 'x64' or ('$(Platform)' == 'x86' and '$(TargetsUnix)' != 'true'))">
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Aes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx2.cs" />
Expand All @@ -1323,7 +1312,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Sse42.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Ssse3.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' != 'true' OR ('$(Platform)' != 'x64' AND ('$(Platform)' != 'x86' OR ('$(Platform)' == 'x86' AND '$(TargetsUnix)' == 'true')))">
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' != 'true' or ('$(Platform)' != 'x64' and ('$(Platform)' != 'x86' or ('$(Platform)' == 'x86' and '$(TargetsUnix)' == 'true')))">
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Aes.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Avx2.PlatformNotSupported.cs" />
Expand All @@ -1340,15 +1329,15 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Sse42.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Ssse3.PlatformNotSupported.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' == 'true' AND '$(Platform)' == 'arm64'">
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' == 'true' and '$(Platform)' == 'arm64'">
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\AdvSimd.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Aes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\ArmBase.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Crc32.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Sha1.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Sha256.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' != 'true' OR '$(Platform)' != 'arm64'">
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' != 'true' or '$(Platform)' != 'arm64'">
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\AdvSimd.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Aes.PlatformNotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\ArmBase.PlatformNotSupported.cs" />
Expand All @@ -1369,11 +1358,11 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.WaitThread.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.WorkerThread.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.CpuUtilizationReader.Unix.cs" Condition="'$(TargetsUnix)' == 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.CpuUtilizationReader.Windows.cs" Condition="'$(TargetsWindows)'=='true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.CpuUtilizationReader.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelLifoSemaphore.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelLifoSemaphore.Windows.cs" Condition="'$(TargetsWindows)'=='true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelLifoSemaphore.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
</ItemGroup>
<ItemGroup Condition="'$(FeaturePortableThreadPool)' == 'true' OR '$(FeatureThreadInt64PersistentCounter)' == 'true'">
<ItemGroup Condition="'$(FeaturePortableThreadPool)' == 'true' or '$(FeatureThreadInt64PersistentCounter)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadInt64PersistentCounter.cs" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion src/System.Private.CoreLib/shared/System/Buffer.cs
Expand Up @@ -7,7 +7,6 @@
#endif

using System.Diagnostics;
using System.Runtime;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

Expand Down
Expand Up @@ -544,7 +544,7 @@ private static T GetItemWhenAvailable(ConcurrentQueueSegment<T> segment, int i)
}

// Return the value from the slot.
return segment._slots[i].Item;
return segment._slots[i].Item!;
}

private IEnumerator<T> Enumerate(ConcurrentQueueSegment<T> head, int headHead, ConcurrentQueueSegment<T> tail, int tailTail)
Expand Down
Expand Up @@ -160,7 +160,7 @@ public bool TryDequeue([MaybeNullWhen(false)] out T item)
{
// Successfully reserved the slot. Note that after the above CompareExchange, other threads
// trying to dequeue from this slot will end up spinning until we do the subsequent Write.
item = slots[slotsIndex].Item;
item = slots[slotsIndex].Item!;
if (!Volatile.Read(ref _preservedForObservation))
{
// If we're preserving, though, we don't zero out the slot, as we need it for
Expand Down Expand Up @@ -230,7 +230,7 @@ public bool TryPeek([MaybeNullWhen(false)] out T result, bool resultUsed)
int diff = sequenceNumber - (currentHead + 1);
if (diff == 0)
{
result = resultUsed ? slots[slotsIndex].Item : default!;
result = resultUsed ? slots[slotsIndex].Item! : default!;
return true;
}
else if (diff < 0)
Expand Down
2 changes: 2 additions & 0 deletions src/System.Private.CoreLib/shared/System/Decimal.DecCalc.cs
Expand Up @@ -874,6 +874,8 @@ private static bool Add32To96(ref Buf12 bufNum, uint value)
/// Adds or subtracts two decimal values.
/// On return, d1 contains the result of the operation and d2 is trashed.
/// </summary>
/// <param name="d1">First decimal to add or subtract.</param>
/// <param name="d2">Second decimal to add or subtract.</param>
/// <param name="sign">True means subtract and false means add.</param>
internal static unsafe void DecAddSub(ref DecCalc d1, ref DecCalc d2, bool sign)
{
Expand Down