Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2019-08-08 05:00:43 +0300
committerMarek Safar <marek.safar@gmail.com>2019-08-08 11:10:47 +0300
commitc189afd4f5ccdd5792a09245b5026d8a383c97ec (patch)
tree534a272367e4cc0af79fd853267caa6dc2c10b29 /netcore
parent240202cd90277eb9403b1c229bebcb177ffe1ca2 (diff)
Delete PROJECTN ifdefs from Corelib (dotnet/coreclr#26058)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'netcore')
-rw-r--r--netcore/System.Private.CoreLib/shared/System/AppDomain.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/AppDomainSetup.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Array.cs7
-rw-r--r--netcore/System.Private.CoreLib/shared/System/ByReference.cs6
-rw-r--r--netcore/System.Private.CoreLib/shared/System/CannotUnloadAppDomainException.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Collections/ArrayList.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Collections/IEnumerable.cs2
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Diagnostics/DebuggerStepThroughAttribute.cs4
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolder.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolderOption.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/EnvironmentVariableTarget.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/IntPtr.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/LocalDataStoreSlot.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Numerics/Vector.cs6
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Numerics/Vector.tt6
-rw-r--r--netcore/System.Private.CoreLib/shared/System/OperatingSystem.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/PlatformID.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/ReadOnlySpan.Fast.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs6
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs41
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/IPermission.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/ISecurityEncodable.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/IStackWalk.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/PermissionSet.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/Permissions/PermissionState.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/Principal/IIdentity.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/Principal/IPrincipal.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/Principal/PrincipalPolicy.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Security/SecurityElement.cs6
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Span.Fast.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/SpanHelpers.cs2
-rw-r--r--netcore/System.Private.CoreLib/shared/System/String.cs27
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs6
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Threading/Tasks/TaskContinuation.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Threading/Thread.cs3
-rw-r--r--netcore/System.Private.CoreLib/shared/System/UIntPtr.cs3
37 files changed, 3 insertions, 216 deletions
diff --git a/netcore/System.Private.CoreLib/shared/System/AppDomain.cs b/netcore/System.Private.CoreLib/shared/System/AppDomain.cs
index addef77035c..86f31b76011 100644
--- a/netcore/System.Private.CoreLib/shared/System/AppDomain.cs
+++ b/netcore/System.Private.CoreLib/shared/System/AppDomain.cs
@@ -17,9 +17,6 @@ using System.Threading;
namespace System
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public sealed partial class AppDomain : MarshalByRefObject
{
private static readonly AppDomain s_domain = new AppDomain();
diff --git a/netcore/System.Private.CoreLib/shared/System/AppDomainSetup.cs b/netcore/System.Private.CoreLib/shared/System/AppDomainSetup.cs
index 4537dcdf94e..925ef7404b2 100644
--- a/netcore/System.Private.CoreLib/shared/System/AppDomainSetup.cs
+++ b/netcore/System.Private.CoreLib/shared/System/AppDomainSetup.cs
@@ -4,9 +4,6 @@
namespace System
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public sealed class AppDomainSetup
{
internal AppDomainSetup() { }
diff --git a/netcore/System.Private.CoreLib/shared/System/Array.cs b/netcore/System.Private.CoreLib/shared/System/Array.cs
index 0613abeb0e6..a603640528b 100644
--- a/netcore/System.Private.CoreLib/shared/System/Array.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Array.cs
@@ -1017,8 +1017,6 @@ namespace System
ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
}
- // Hits a code generation bug on ProjectN
-#if !PROJECTN
if (RuntimeHelpers.IsBitwiseEquatable<T>())
{
if (Unsafe.SizeOf<T>() == sizeof(byte))
@@ -1054,7 +1052,6 @@ namespace System
return (result >= 0 ? startIndex : 0) + result;
}
}
-#endif
#if CORECLR
return EqualityComparer<T>.Default.IndexOf(array, value, startIndex, count);
@@ -1221,8 +1218,6 @@ namespace System
ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
}
- // Hits a code generation bug on ProjectN
-#if !PROJECTN
if (RuntimeHelpers.IsBitwiseEquatable<T>())
{
if (Unsafe.SizeOf<T>() == sizeof(byte))
@@ -1266,8 +1261,6 @@ namespace System
return (result >= 0 ? endIndex : 0) + result;
}
}
-
-#endif
#if CORECLR
return EqualityComparer<T>.Default.LastIndexOf(array, value, startIndex, count);
diff --git a/netcore/System.Private.CoreLib/shared/System/ByReference.cs b/netcore/System.Private.CoreLib/shared/System/ByReference.cs
index 5da3c99f41b..492979a2d75 100644
--- a/netcore/System.Private.CoreLib/shared/System/ByReference.cs
+++ b/netcore/System.Private.CoreLib/shared/System/ByReference.cs
@@ -11,11 +11,7 @@ namespace System
// around lack of first class support for byref fields in C# and IL. The JIT and
// type loader has special handling for it that turns it into a thin wrapper around ref T.
[NonVersionable]
- internal
-#if !PROJECTN // readonly breaks codegen contract and asserts UTC
- readonly
-#endif
- ref struct ByReference<T>
+ internal readonly ref struct ByReference<T>
{
// CS0169: The private field '{blah}' is never used
#pragma warning disable 169
diff --git a/netcore/System.Private.CoreLib/shared/System/CannotUnloadAppDomainException.cs b/netcore/System.Private.CoreLib/shared/System/CannotUnloadAppDomainException.cs
index 6d68f08c5c5..865eb093e67 100644
--- a/netcore/System.Private.CoreLib/shared/System/CannotUnloadAppDomainException.cs
+++ b/netcore/System.Private.CoreLib/shared/System/CannotUnloadAppDomainException.cs
@@ -8,9 +8,6 @@ namespace System
{
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public class CannotUnloadAppDomainException : SystemException
{
internal const int COR_E_CANNOTUNLOADAPPDOMAIN = unchecked((int)0x80131015); // corresponds to __HResults.COR_E_CANNOTUNLOADAPPDOMAIN in corelib
diff --git a/netcore/System.Private.CoreLib/shared/System/Collections/ArrayList.cs b/netcore/System.Private.CoreLib/shared/System/Collections/ArrayList.cs
index 7fdfaa03da1..828f587f662 100644
--- a/netcore/System.Private.CoreLib/shared/System/Collections/ArrayList.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Collections/ArrayList.cs
@@ -28,9 +28,6 @@ namespace System.Collections
[DebuggerDisplay("Count = {Count}")]
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public class ArrayList : IList, ICloneable
{
private object?[] _items = null!; // Do not rename (binary serialization)
diff --git a/netcore/System.Private.CoreLib/shared/System/Collections/IEnumerable.cs b/netcore/System.Private.CoreLib/shared/System/Collections/IEnumerable.cs
index e787bde2ee6..e3b74317320 100644
--- a/netcore/System.Private.CoreLib/shared/System/Collections/IEnumerable.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Collections/IEnumerable.cs
@@ -6,10 +6,8 @@ using System.Runtime.InteropServices;
namespace System.Collections
{
-#if !PROJECTN // Hitting a bug in MCG, see VSO:743654
[Guid("496B0ABE-CDEE-11d3-88E8-00902754C43A")]
[ComVisible(true)]
-#endif
public interface IEnumerable
{
// Returns an IEnumerator for this enumerable Object. The enumerator provides
diff --git a/netcore/System.Private.CoreLib/shared/System/Diagnostics/DebuggerStepThroughAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Diagnostics/DebuggerStepThroughAttribute.cs
index 82a164771e8..1a62b922e07 100644
--- a/netcore/System.Private.CoreLib/shared/System/Diagnostics/DebuggerStepThroughAttribute.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Diagnostics/DebuggerStepThroughAttribute.cs
@@ -4,10 +4,6 @@
namespace System.Diagnostics
{
-#if PROJECTN
- // Used by the IL2IL toolchain to mark generated code to control debugger stepping policy
- [System.Runtime.CompilerServices.DependencyReductionRoot]
-#endif
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public sealed class DebuggerStepThroughAttribute : Attribute
{
diff --git a/netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolder.cs b/netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolder.cs
index ae2add730d2..a5a4d2abfde 100644
--- a/netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolder.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolder.cs
@@ -6,9 +6,6 @@ namespace System
{
public static partial class Environment
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public enum SpecialFolder
{
ApplicationData = SpecialFolderValues.CSIDL_APPDATA,
diff --git a/netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolderOption.cs b/netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolderOption.cs
index 929e3d9036a..cd0e5714ef0 100644
--- a/netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolderOption.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Environment.SpecialFolderOption.cs
@@ -6,9 +6,6 @@ namespace System
{
public static partial class Environment
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public enum SpecialFolderOption
{
None = 0,
diff --git a/netcore/System.Private.CoreLib/shared/System/EnvironmentVariableTarget.cs b/netcore/System.Private.CoreLib/shared/System/EnvironmentVariableTarget.cs
index 581c4aa30b1..42b93215697 100644
--- a/netcore/System.Private.CoreLib/shared/System/EnvironmentVariableTarget.cs
+++ b/netcore/System.Private.CoreLib/shared/System/EnvironmentVariableTarget.cs
@@ -4,9 +4,6 @@
namespace System
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public enum EnvironmentVariableTarget
{
Process = 0,
diff --git a/netcore/System.Private.CoreLib/shared/System/IntPtr.cs b/netcore/System.Private.CoreLib/shared/System/IntPtr.cs
index ee9da7ae785..697599a8c45 100644
--- a/netcore/System.Private.CoreLib/shared/System/IntPtr.cs
+++ b/netcore/System.Private.CoreLib/shared/System/IntPtr.cs
@@ -217,9 +217,6 @@ namespace System
[CLSCompliant(false)]
[Intrinsic]
[NonVersionable]
-#if PROJECTN
- [System.Runtime.CompilerServices.DependencyReductionRootAttribute]
-#endif
public unsafe void* ToPointer()
{
return _value;
diff --git a/netcore/System.Private.CoreLib/shared/System/LocalDataStoreSlot.cs b/netcore/System.Private.CoreLib/shared/System/LocalDataStoreSlot.cs
index 41e384e90b2..64648784581 100644
--- a/netcore/System.Private.CoreLib/shared/System/LocalDataStoreSlot.cs
+++ b/netcore/System.Private.CoreLib/shared/System/LocalDataStoreSlot.cs
@@ -6,9 +6,6 @@ using System.Threading;
namespace System
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Threading.Thread")]
-#endif
public sealed class LocalDataStoreSlot
{
internal LocalDataStoreSlot(ThreadLocal<object?> data)
diff --git a/netcore/System.Private.CoreLib/shared/System/Numerics/Vector.cs b/netcore/System.Private.CoreLib/shared/System/Numerics/Vector.cs
index e85b48f01ac..200681fac6f 100644
--- a/netcore/System.Private.CoreLib/shared/System/Numerics/Vector.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Numerics/Vector.cs
@@ -61,13 +61,7 @@ namespace System.Numerics
get
{
ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-#if PROJECTN
- // Hits an active bug in ProjectN (887908). This code path is actually only used rarely,
- // since get_Count is an intrinsic.
- throw new NotImplementedException();
-#else
return Unsafe.SizeOf<Vector<T>>() / Unsafe.SizeOf<T>();
-#endif
}
}
diff --git a/netcore/System.Private.CoreLib/shared/System/Numerics/Vector.tt b/netcore/System.Private.CoreLib/shared/System/Numerics/Vector.tt
index 46824941fbf..ed2b606e556 100644
--- a/netcore/System.Private.CoreLib/shared/System/Numerics/Vector.tt
+++ b/netcore/System.Private.CoreLib/shared/System/Numerics/Vector.tt
@@ -65,13 +65,7 @@ namespace System.Numerics
get
{
ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-#if PROJECTN
- // Hits an active bug in ProjectN (887908). This code path is actually only used rarely,
- // since get_Count is an intrinsic.
- throw new NotImplementedException();
-#else
return Unsafe.SizeOf<Vector<T>>() / Unsafe.SizeOf<T>();
-#endif
}
}
diff --git a/netcore/System.Private.CoreLib/shared/System/OperatingSystem.cs b/netcore/System.Private.CoreLib/shared/System/OperatingSystem.cs
index 046ce263b40..952c05b852f 100644
--- a/netcore/System.Private.CoreLib/shared/System/OperatingSystem.cs
+++ b/netcore/System.Private.CoreLib/shared/System/OperatingSystem.cs
@@ -7,9 +7,6 @@ using System.Runtime.Serialization;
namespace System
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public sealed class OperatingSystem : ISerializable, ICloneable
{
private readonly Version _version;
diff --git a/netcore/System.Private.CoreLib/shared/System/PlatformID.cs b/netcore/System.Private.CoreLib/shared/System/PlatformID.cs
index 2eda3c05f30..1e0a688ba69 100644
--- a/netcore/System.Private.CoreLib/shared/System/PlatformID.cs
+++ b/netcore/System.Private.CoreLib/shared/System/PlatformID.cs
@@ -6,9 +6,6 @@ using System.ComponentModel;
namespace System
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public enum PlatformID
{
[EditorBrowsable(EditorBrowsableState.Never)] Win32S = 0,
diff --git a/netcore/System.Private.CoreLib/shared/System/ReadOnlySpan.Fast.cs b/netcore/System.Private.CoreLib/shared/System/ReadOnlySpan.Fast.cs
index 8a5b7e7d972..a1d554bdcdb 100644
--- a/netcore/System.Private.CoreLib/shared/System/ReadOnlySpan.Fast.cs
+++ b/netcore/System.Private.CoreLib/shared/System/ReadOnlySpan.Fast.cs
@@ -30,9 +30,6 @@ namespace System
/// <summary>A byref or a native ptr.</summary>
internal readonly ByReference<T> _pointer;
/// <summary>The number of elements this ReadOnlySpan contains.</summary>
-#if PROJECTN
- [Bound]
-#endif
private readonly int _length;
/// <summary>
@@ -134,13 +131,6 @@ namespace System
/// </exception>
public ref readonly T this[int index]
{
-#if PROJECTN
- [BoundsChecking]
- get
- {
- return ref Unsafe.Add(ref _pointer.Value, index);
- }
-#else
[Intrinsic]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[NonVersionable]
@@ -150,7 +140,6 @@ namespace System
ThrowHelper.ThrowIndexOutOfRangeException();
return ref Unsafe.Add(ref _pointer.Value, index);
}
-#endif
}
/// <summary>
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs
index 6fc5706897f..a18b685358b 100644
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs
@@ -26,15 +26,9 @@ namespace System.Runtime.CompilerServices
/// <summary>Creates an instance of the <see cref="AsyncIteratorMethodBuilder"/> struct.</summary>
/// <returns>The initialized instance.</returns>
public static AsyncIteratorMethodBuilder Create() =>
-#if PROJECTN
- // ProjectN's AsyncTaskMethodBuilder.Create() currently does additional debugger-related
- // work, so we need to delegate to it.
- new AsyncIteratorMethodBuilder() { _methodBuilder = AsyncTaskMethodBuilder.Create() };
-#else
// _methodBuilder should be initialized to AsyncTaskMethodBuilder.Create(), but on coreclr
// that Create() is a nop, so we can just return the default here.
default;
-#endif
/// <summary>Invokes <see cref="IAsyncStateMachine.MoveNext"/> on the state machine while guarding the <see cref="ExecutionContext"/>.</summary>
/// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
index 3af525e6f0f..f2d8379bfb6 100644
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
@@ -39,15 +39,10 @@ namespace System.Runtime.CompilerServices
{
SynchronizationContext? sc = SynchronizationContext.Current;
sc?.OperationStarted();
-#if PROJECTN
- // ProjectN's AsyncTaskMethodBuilder.Create() currently does additional debugger-related
- // work, so we need to delegate to it.
- return new AsyncVoidMethodBuilder() { _synchronizationContext = sc, _builder = AsyncTaskMethodBuilder.Create() };
-#else
+
// _builder should be initialized to AsyncTaskMethodBuilder.Create(), but on coreclr
// that Create() is a nop, so we can just return the default here.
return new AsyncVoidMethodBuilder() { _synchronizationContext = sc };
-#endif
}
/// <summary>Initiates the builder's execution with the associated state machine.</summary>
@@ -192,11 +187,7 @@ namespace System.Runtime.CompilerServices
public struct AsyncTaskMethodBuilder
{
/// <summary>A cached VoidTaskResult task used for builders that complete synchronously.</summary>
-#if PROJECTN
- private static readonly Task<VoidTaskResult> s_cachedCompleted = AsyncTaskCache.CreateCacheableTask<VoidTaskResult>(default(VoidTaskResult));
-#else
private static readonly Task<VoidTaskResult> s_cachedCompleted = AsyncTaskMethodBuilder<VoidTaskResult>.s_defaultResultTask;
-#endif
/// <summary>The generic builder object to which this non-generic instance delegates.</summary>
private AsyncTaskMethodBuilder<VoidTaskResult> m_builder; // mutable struct: must not be readonly. Debugger depends on the exact name of this field.
@@ -204,15 +195,9 @@ namespace System.Runtime.CompilerServices
/// <summary>Initializes a new <see cref="AsyncTaskMethodBuilder"/>.</summary>
/// <returns>The initialized <see cref="AsyncTaskMethodBuilder"/>.</returns>
public static AsyncTaskMethodBuilder Create() =>
-#if PROJECTN
- // ProjectN's AsyncTaskMethodBuilder<VoidTaskResult>.Create() currently does additional debugger-related
- // work, so we need to delegate to it.
- new AsyncTaskMethodBuilder { m_builder = AsyncTaskMethodBuilder<VoidTaskResult>.Create() };
-#else
// m_builder should be initialized to AsyncTaskMethodBuilder<VoidTaskResult>.Create(), but on coreclr
// that Create() is a nop, so we can just return the default here.
default;
-#endif
/// <summary>Initiates the builder's execution with the associated state machine.</summary>
/// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
@@ -313,10 +298,8 @@ namespace System.Runtime.CompilerServices
/// </remarks>
public struct AsyncTaskMethodBuilder<TResult>
{
-#if !PROJECTN
/// <summary>A cached task for default(TResult).</summary>
internal static readonly Task<TResult> s_defaultResultTask = AsyncTaskCache.CreateCacheableTask<TResult>(default);
-#endif
/// <summary>The lazily-initialized built task.</summary>
private Task<TResult> m_task; // lazily-initialized: must not be readonly. Debugger depends on the exact name of this field.
@@ -325,20 +308,10 @@ namespace System.Runtime.CompilerServices
/// <returns>The initialized <see cref="AsyncTaskMethodBuilder"/>.</returns>
public static AsyncTaskMethodBuilder<TResult> Create()
{
-#if PROJECTN
- var result = new AsyncTaskMethodBuilder<TResult>();
- if (System.Threading.Tasks.Task.s_asyncDebuggingEnabled)
- {
- // This allows the debugger to access m_task directly without evaluating ObjectIdForDebugger for ProjectN
- result.InitializeTaskAsStateMachineBox();
- }
- return result;
-#else
// NOTE: If this method is ever updated to perform more initialization,
// other Create methods like AsyncTaskMethodBuilder.Create and
// AsyncValueTaskMethodBuilder.Create must be updated to call this.
return default;
-#endif
}
/// <summary>Initiates the builder's execution with the associated state machine.</summary>
@@ -843,12 +816,6 @@ namespace System.Runtime.CompilerServices
[MethodImpl(MethodImplOptions.AggressiveInlining)] // method looks long, but for a given TResult it results in a relatively small amount of asm
internal static Task<TResult> GetTaskForResult(TResult result)
{
-#if PROJECTN
- // Currently NUTC does not perform the optimization needed by this method. The result is that
- // every call to this method results in quite a lot of work, including many allocations, which
- // is the opposite of the intent. For now, let's just return a new Task each time.
- // Bug 719350 tracks re-optimizing this in ProjectN.
-#else
// The goal of this function is to be give back a cached task if possible,
// or to otherwise give back a new task. To give back a cached task,
// we need to be able to evaluate the incoming result value, and we need
@@ -921,7 +888,6 @@ namespace System.Runtime.CompilerServices
{
return s_defaultResultTask;
}
-#endif
// No cached task is available. Manufacture a new one for this result.
return new Task<TResult>(result);
@@ -931,7 +897,6 @@ namespace System.Runtime.CompilerServices
/// <summary>Provides a cache of closed generic tasks for async methods.</summary>
internal static class AsyncTaskCache
{
-#if !PROJECTN
// All static members are initialized inline to ensure type is beforefieldinit
/// <summary>A cached Task{Boolean}.Result == true.</summary>
@@ -956,7 +921,6 @@ namespace System.Runtime.CompilerServices
}
return tasks;
}
-#endif
/// <summary>Creates a non-disposable task.</summary>
/// <typeparam name="TResult">Specifies the result type.</typeparam>
@@ -1086,9 +1050,6 @@ namespace System.Runtime.CompilerServices
/// <summary>This helper routine is targeted by the debugger. Its purpose is to remove any delegate wrappers introduced by
/// the framework that the debugger doesn't want to see.</summary>
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
internal static Action TryGetStateMachineForDebugger(Action action) // debugger depends on this exact name/signature
{
object? target = action.Target;
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
index 897de6e27db..7075110876e 100644
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
@@ -22,15 +22,9 @@ namespace System.Runtime.CompilerServices
/// <summary>Creates an instance of the <see cref="AsyncValueTaskMethodBuilder"/> struct.</summary>
/// <returns>The initialized instance.</returns>
public static AsyncValueTaskMethodBuilder Create() =>
-#if PROJECTN
- // ProjectN's AsyncTaskMethodBuilder.Create() currently does additional debugger-related
- // work, so we need to delegate to it.
- new AsyncValueTaskMethodBuilder() { _methodBuilder = AsyncTaskMethodBuilder.Create() };
-#else
// _methodBuilder should be initialized to AsyncTaskMethodBuilder.Create(), but on coreclr
// that Create() is a nop, so we can just return the default here.
default;
-#endif
/// <summary>Begins running the builder with the associated state machine.</summary>
/// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
@@ -122,15 +116,9 @@ namespace System.Runtime.CompilerServices
/// <summary>Creates an instance of the <see cref="AsyncValueTaskMethodBuilder{TResult}"/> struct.</summary>
/// <returns>The initialized instance.</returns>
public static AsyncValueTaskMethodBuilder<TResult> Create() =>
-#if PROJECTN
- // ProjectN's AsyncTaskMethodBuilder<TResult>.Create() currently does additional debugger-related
- // work, so we need to delegate to it.
- new AsyncValueTaskMethodBuilder<TResult>() { _methodBuilder = AsyncTaskMethodBuilder<TResult>.Create() };
-#else
// _methodBuilder should be initialized to AsyncTaskMethodBuilder<TResult>.Create(), but on coreclr
// that Create() is a nop, so we can just return the default here.
default;
-#endif
/// <summary>Begins running the builder with the associated state machine.</summary>
/// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/IPermission.cs b/netcore/System.Private.CoreLib/shared/System/Security/IPermission.cs
index efb7e593c45..f593b88d398 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/IPermission.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/IPermission.cs
@@ -4,9 +4,6 @@
namespace System.Security
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public partial interface IPermission : ISecurityEncodable
{
IPermission Copy();
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/ISecurityEncodable.cs b/netcore/System.Private.CoreLib/shared/System/Security/ISecurityEncodable.cs
index 64a96875665..2c4865ac10a 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/ISecurityEncodable.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/ISecurityEncodable.cs
@@ -4,9 +4,6 @@
namespace System.Security
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public partial interface ISecurityEncodable
{
void FromXml(SecurityElement e);
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/IStackWalk.cs b/netcore/System.Private.CoreLib/shared/System/Security/IStackWalk.cs
index 9e6986a7520..f8d472e1bf9 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/IStackWalk.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/IStackWalk.cs
@@ -4,9 +4,6 @@
namespace System.Security
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public partial interface IStackWalk
{
void Assert();
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/PermissionSet.cs b/netcore/System.Private.CoreLib/shared/System/Security/PermissionSet.cs
index 0c1a2d2c8b8..fcf1f36c3b3 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/PermissionSet.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/PermissionSet.cs
@@ -9,9 +9,6 @@ using System.Runtime.Serialization;
namespace System.Security
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public partial class PermissionSet : ICollection, IEnumerable, IDeserializationCallback, ISecurityEncodable, IStackWalk
{
public PermissionSet(PermissionState state) { }
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/Permissions/PermissionState.cs b/netcore/System.Private.CoreLib/shared/System/Security/Permissions/PermissionState.cs
index 3ce1e703e07..aace3dc6ada 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/Permissions/PermissionState.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/Permissions/PermissionState.cs
@@ -4,9 +4,6 @@
namespace System.Security.Permissions
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public enum PermissionState
{
None = 0,
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/Principal/IIdentity.cs b/netcore/System.Private.CoreLib/shared/System/Security/Principal/IIdentity.cs
index cc6765c41f6..c5b7042c70e 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/Principal/IIdentity.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/Principal/IIdentity.cs
@@ -10,9 +10,6 @@ using System;
namespace System.Security.Principal
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Security.Principal")]
-#endif
public interface IIdentity
{
// Access to the name string
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/Principal/IPrincipal.cs b/netcore/System.Private.CoreLib/shared/System/Security/Principal/IPrincipal.cs
index 03fffd6a41a..2540bff8024 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/Principal/IPrincipal.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/Principal/IPrincipal.cs
@@ -10,9 +10,6 @@ using System;
namespace System.Security.Principal
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Security.Principal")]
-#endif
public interface IPrincipal
{
// Retrieve the identity object
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/Principal/PrincipalPolicy.cs b/netcore/System.Private.CoreLib/shared/System/Security/Principal/PrincipalPolicy.cs
index 3884b101a8b..53a8ba7d2f2 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/Principal/PrincipalPolicy.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/Principal/PrincipalPolicy.cs
@@ -9,9 +9,6 @@
namespace System.Security.Principal
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Security.Principal")]
-#endif
public enum PrincipalPolicy
{
// Note: it's important that the default policy has the value 0.
diff --git a/netcore/System.Private.CoreLib/shared/System/Security/SecurityElement.cs b/netcore/System.Private.CoreLib/shared/System/Security/SecurityElement.cs
index a79616aa5e6..9dfe8247b0d 100644
--- a/netcore/System.Private.CoreLib/shared/System/Security/SecurityElement.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Security/SecurityElement.cs
@@ -10,9 +10,6 @@ using System.Text;
namespace System.Security
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
internal interface ISecurityElementFactory
{
SecurityElement CreateSecurityElement();
@@ -24,9 +21,6 @@ namespace System.Security
string? Attribute(string attributeName);
}
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
-#endif
public sealed class SecurityElement : ISecurityElementFactory
{
internal string _tag = null!;
diff --git a/netcore/System.Private.CoreLib/shared/System/Span.Fast.cs b/netcore/System.Private.CoreLib/shared/System/Span.Fast.cs
index 75faa0780d3..bff8d4cf559 100644
--- a/netcore/System.Private.CoreLib/shared/System/Span.Fast.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Span.Fast.cs
@@ -30,9 +30,6 @@ namespace System
/// <summary>A byref or a native ptr.</summary>
internal readonly ByReference<T> _pointer;
/// <summary>The number of elements this Span contains.</summary>
-#if PROJECTN
- [Bound]
-#endif
private readonly int _length;
/// <summary>
@@ -140,13 +137,6 @@ namespace System
/// </exception>
public ref T this[int index]
{
-#if PROJECTN
- [BoundsChecking]
- get
- {
- return ref Unsafe.Add(ref _pointer.Value, index);
- }
-#else
[Intrinsic]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[NonVersionable]
@@ -156,7 +146,6 @@ namespace System
ThrowHelper.ThrowIndexOutOfRangeException();
return ref Unsafe.Add(ref _pointer.Value, index);
}
-#endif
}
/// <summary>
diff --git a/netcore/System.Private.CoreLib/shared/System/SpanHelpers.cs b/netcore/System.Private.CoreLib/shared/System/SpanHelpers.cs
index c919d6e6312..acc68c55b5d 100644
--- a/netcore/System.Private.CoreLib/shared/System/SpanHelpers.cs
+++ b/netcore/System.Private.CoreLib/shared/System/SpanHelpers.cs
@@ -22,7 +22,7 @@ namespace System
if (byteLength == 0)
return;
-#if !PROJECTN && (AMD64 || ARM64)
+#if AMD64 || ARM64
// The exact matrix on when RhZeroMemory is faster than InitBlockUnaligned is very complex. The factors to consider include
// type of hardware and memory aligment. This threshold was chosen as a good balance accross different configurations.
if (byteLength > 768)
diff --git a/netcore/System.Private.CoreLib/shared/System/String.cs b/netcore/System.Private.CoreLib/shared/System/String.cs
index e2b5cd4e857..d3c7842c493 100644
--- a/netcore/System.Private.CoreLib/shared/System/String.cs
+++ b/netcore/System.Private.CoreLib/shared/System/String.cs
@@ -44,9 +44,6 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern String(char[] value);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
@@ -67,9 +64,6 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern String(char[] value, int startIndex, int length);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
@@ -103,9 +97,6 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern unsafe String(char* value);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
@@ -128,9 +119,6 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern unsafe String(char* value, int startIndex, int length);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
@@ -164,9 +152,6 @@ namespace System
[MethodImpl(MethodImplOptions.InternalCall)]
public extern unsafe String(sbyte* value);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
@@ -185,9 +170,6 @@ namespace System
[MethodImpl(MethodImplOptions.InternalCall)]
public extern unsafe String(sbyte* value, int startIndex, int length);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
@@ -247,9 +229,6 @@ namespace System
[MethodImpl(MethodImplOptions.InternalCall)]
public extern unsafe String(sbyte* value, int startIndex, int length, Encoding enc);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
@@ -284,9 +263,6 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern String(char c, int count);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
@@ -336,9 +312,6 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern String(ReadOnlySpan<char> value);
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
#if !CORECLR
static
#endif
diff --git a/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs b/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs
index 705f196fb7b..ea4c2a615ef 100644
--- a/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs
@@ -6204,9 +6204,6 @@ namespace System.Threading.Tasks
return new UnwrapPromise<TResult>(outerTask, lookForOce);
}
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
internal virtual Delegate[]? GetDelegateContinuationsForDebugger()
{
//Avoid an infinite loop by making sure the continuation object is not a reference to istelf.
@@ -6268,9 +6265,6 @@ namespace System.Threading.Tasks
return null;
}
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
//Do not remove: VS debugger calls this API directly using func-eval to populate data in the tasks window
private static Task? GetActiveTaskFromId(int taskId)
{
diff --git a/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/TaskContinuation.cs b/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/TaskContinuation.cs
index 91ee4b853d1..a3c010751f9 100644
--- a/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/TaskContinuation.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/TaskContinuation.cs
@@ -253,9 +253,6 @@ namespace System.Threading.Tasks
//
// This helper routine is targeted by the debugger.
//
-#if PROJECTN
- [DependencyReductionRoot]
-#endif
internal abstract Delegate[]? GetDelegateContinuationsForDebugger();
}
diff --git a/netcore/System.Private.CoreLib/shared/System/Threading/Thread.cs b/netcore/System.Private.CoreLib/shared/System/Threading/Thread.cs
index 28b2e6eb8f5..9b7abbf9fbb 100644
--- a/netcore/System.Private.CoreLib/shared/System/Threading/Thread.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Threading/Thread.cs
@@ -11,9 +11,6 @@ using System.Security.Principal;
namespace System.Threading
{
-#if PROJECTN
- [Internal.Runtime.CompilerServices.RelocatedType("System.Threading.Thread")]
-#endif
public sealed partial class Thread : CriticalFinalizerObject
{
private static AsyncLocal<IPrincipal?>? s_asyncLocalPrincipal;
diff --git a/netcore/System.Private.CoreLib/shared/System/UIntPtr.cs b/netcore/System.Private.CoreLib/shared/System/UIntPtr.cs
index 28d7ffb15f8..4d33029c1d6 100644
--- a/netcore/System.Private.CoreLib/shared/System/UIntPtr.cs
+++ b/netcore/System.Private.CoreLib/shared/System/UIntPtr.cs
@@ -208,9 +208,6 @@ namespace System
[Intrinsic]
[NonVersionable]
-#if PROJECTN
- [System.Runtime.CompilerServices.DependencyReductionRootAttribute]
-#endif
public unsafe void* ToPointer()
{
return _value;