Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 981d764

Browse files
committed
Removes final FEATURE_CORECLR defines
1 parent 724aa17 commit 981d764

File tree

118 files changed

+118
-5949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+118
-5949
lines changed

src/mscorlib/Common/PinnableBufferCache.cs

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,6 @@ private void Setup(Func<object, bool> callback, object targetObj)
546546
#endregion
547547
}
548548

549-
550-
#if FEATURE_CORECLR
551549
internal sealed class PinnableBufferCacheEventSource
552550
{
553551
public static readonly PinnableBufferCacheEventSource Log = new PinnableBufferCacheEventSource();
@@ -584,80 +582,4 @@ static internal unsafe long AddressOfObject(byte[] array)
584582
return 0;
585583
}
586584
}
587-
#else
588-
/// <summary>
589-
/// PinnableBufferCacheEventSource is a private eventSource that we are using to
590-
/// debug and monitor the effectiveness of PinnableBufferCache
591-
/// </summary>
592-
#if PINNABLEBUFFERCACHE_MSCORLIB
593-
[EventSource(Name = "Microsoft-DotNETRuntime-PinnableBufferCache")]
594-
#else
595-
[EventSource(Name = "Microsoft-DotNETRuntime-PinnableBufferCache-System")]
596-
#endif
597-
internal sealed class PinnableBufferCacheEventSource : EventSource
598-
{
599-
public static readonly PinnableBufferCacheEventSource Log = new PinnableBufferCacheEventSource();
600-
601-
[Event(1, Level = EventLevel.Verbose)]
602-
public void DebugMessage(string message) { if (IsEnabled()) WriteEvent(1, message); }
603-
[Event(2, Level = EventLevel.Verbose)]
604-
public void DebugMessage1(string message, long value) { if (IsEnabled()) WriteEvent(2, message, value); }
605-
[Event(3, Level = EventLevel.Verbose)]
606-
public void DebugMessage2(string message, long value1, long value2) { if (IsEnabled()) WriteEvent(3, message, value1, value2); }
607-
[Event(18, Level = EventLevel.Verbose)]
608-
public void DebugMessage3(string message, long value1, long value2, long value3) { if (IsEnabled()) WriteEvent(18, message, value1, value2, value3); }
609-
610-
[Event(4)]
611-
public void Create(string cacheName) { if (IsEnabled()) WriteEvent(4, cacheName); }
612-
613-
[Event(5, Level = EventLevel.Verbose)]
614-
public void AllocateBuffer(string cacheName, ulong objectId, int objectHash, int objectGen, int freeCountAfter) { if (IsEnabled()) WriteEvent(5, cacheName, objectId, objectHash, objectGen, freeCountAfter); }
615-
[Event(6)]
616-
public void AllocateBufferFromNotGen2(string cacheName, int notGen2CountAfter) { if (IsEnabled()) WriteEvent(6, cacheName, notGen2CountAfter); }
617-
[Event(7)]
618-
public void AllocateBufferCreatingNewBuffers(string cacheName, int totalBuffsBefore, int objectCount) { if (IsEnabled()) WriteEvent(7, cacheName, totalBuffsBefore, objectCount); }
619-
[Event(8)]
620-
public void AllocateBufferAged(string cacheName, int agedCount) { if (IsEnabled()) WriteEvent(8, cacheName, agedCount); }
621-
[Event(9)]
622-
public void AllocateBufferFreeListEmpty(string cacheName, int notGen2CountBefore) { if (IsEnabled()) WriteEvent(9, cacheName, notGen2CountBefore); }
623-
624-
[Event(10, Level = EventLevel.Verbose)]
625-
public void FreeBuffer(string cacheName, ulong objectId, int objectHash, int freeCountBefore) { if (IsEnabled()) WriteEvent(10, cacheName, objectId, objectHash, freeCountBefore); }
626-
[Event(11)]
627-
public void FreeBufferStillTooYoung(string cacheName, int notGen2CountBefore) { if (IsEnabled()) WriteEvent(11, cacheName, notGen2CountBefore); }
628-
629-
[Event(13)]
630-
public void TrimCheck(string cacheName, int totalBuffs, bool neededMoreThanFreeList, int deltaMSec) { if (IsEnabled()) WriteEvent(13, cacheName, totalBuffs, neededMoreThanFreeList, deltaMSec); }
631-
[Event(14)]
632-
public void TrimFree(string cacheName, int totalBuffs, int freeListCount, int toBeFreed) { if (IsEnabled()) WriteEvent(14, cacheName, totalBuffs, freeListCount, toBeFreed); }
633-
[Event(15)]
634-
public void TrimExperiment(string cacheName, int totalBuffs, int freeListCount, int numTrimTrial) { if (IsEnabled()) WriteEvent(15, cacheName, totalBuffs, freeListCount, numTrimTrial); }
635-
[Event(16)]
636-
public void TrimFreeSizeOK(string cacheName, int totalBuffs, int freeListCount) { if (IsEnabled()) WriteEvent(16, cacheName, totalBuffs, freeListCount); }
637-
[Event(17)]
638-
public void TrimFlush(string cacheName, int totalBuffs, int freeListCount, int notGen2CountBefore) { if (IsEnabled()) WriteEvent(17, cacheName, totalBuffs, freeListCount, notGen2CountBefore); }
639-
[Event(20)]
640-
public void AgePendingBuffersResults(string cacheName, int promotedToFreeListCount, int heldBackCount) { if (IsEnabled()) WriteEvent(20, cacheName, promotedToFreeListCount, heldBackCount); }
641-
[Event(21)]
642-
public void WalkFreeListResult(string cacheName, int freeListCount, int gen0BuffersInFreeList) { if (IsEnabled()) WriteEvent(21, cacheName, freeListCount, gen0BuffersInFreeList); }
643-
644-
645-
static internal ulong AddressOf(object obj)
646-
{
647-
var asByteArray = obj as byte[];
648-
if (asByteArray != null)
649-
return (ulong)AddressOfByteArray(asByteArray);
650-
return 0;
651-
}
652-
653-
654-
static internal unsafe long AddressOfByteArray(byte[] array)
655-
{
656-
if (array == null)
657-
return 0;
658-
fixed (byte* ptr = array)
659-
return (long)(ptr - 2 * sizeof(void*));
660-
}
661-
}
662-
#endif
663585
}

src/mscorlib/corefx/System/IO/FileStreamCompletionSource.Win32.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ internal FileStreamCompletionSource(FileStream stream, int numBufferedBytes, byt
5858

5959
internal NativeOverlapped* Overlapped
6060
{
61+
get { return _overlapped; }
6162
}
6263

6364
public void SetCompletedSynchronously(int numBytes)

src/mscorlib/mscorlib.shared.sources.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
<InteropSources Include="$(BclSourcesRoot)\System\Runtime\InteropServices\IRegistrationServices.cs" />
134134
<InteropSources Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ITypeLibConverter.cs" />
135135
<InteropSources Include="$(BclSourcesRoot)\System\Runtime\InteropServices\RegistrationServices.cs" />
136-
<InteropSources Include="$(BclSourcesRoot)\System\Runtime\InteropServices\TypeLibConverter.cs" />
137136
<InteropSources Include="$(BclSourcesRoot)\System\Runtime\InteropServices\UCOMIBindCtx.cs" />
138137
<InteropSources Include="$(BclSourcesRoot)\System\Runtime\InteropServices\UCOMIConnectionPointContainer.cs" />
139138
<InteropSources Include="$(BclSourcesRoot)\System\Runtime\InteropServices\UCOMIConnectionPoint.cs" />

src/mscorlib/src/Microsoft/Win32/RegistryKey.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ public RegistryKey CreateSubKey(String subkey, bool writable, RegistryOptions op
290290
return CreateSubKeyInternal(subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree, null, options);
291291
}
292292

293-
294293
[ComVisible(false)]
295294
private unsafe RegistryKey CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, object registrySecurityObj, RegistryOptions registryOptions)
296295
{

src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,8 @@
33
// See the LICENSE file in the project root for more information.
44

55
namespace Microsoft.Win32 {
6-
using Microsoft.Win32;
76
using Microsoft.Win32.SafeHandles;
8-
using System;
9-
using System.Runtime.CompilerServices;
10-
using System.Runtime.ConstrainedExecution;
11-
using System.Runtime.InteropServices;
12-
using System.Runtime.Serialization;
13-
using System.Runtime.Versioning;
14-
using System.Security;
157
using System.Security.Permissions;
16-
using System.Text;
178

189
[HostProtectionAttribute(MayLeakOnAbort = true)]
1910
sealed internal class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid {

src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLocalAllocHandle.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
4-
namespace Microsoft.Win32.SafeHandles {
4+
5+
namespace Microsoft.Win32.SafeHandles
6+
{
57
using System;
68
using System.Runtime.CompilerServices;
79
using System.Runtime.InteropServices;

src/mscorlib/src/Microsoft/Win32/Win32Native.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,18 +1737,11 @@ int SystemFunction041 (
17371737
[In] uint dwFlags);
17381738
#endif // FEATURE_LEGACYSURFACE
17391739

1740-
#if FEATURE_CORECLR
17411740
[DllImport(NTDLL, CharSet=CharSet.Unicode, SetLastError=true)]
17421741
internal static extern
17431742
int RtlNtStatusToDosError (
17441743
[In] int status);
1745-
#else
1746-
// identical to RtlNtStatusToDosError, but we are in ask mode for desktop CLR
1747-
[DllImport(ADVAPI32, CharSet = CharSet.Unicode, SetLastError = true)]
1748-
internal static extern
1749-
int LsaNtStatusToWinError (
1750-
[In] int status);
1751-
#endif
1744+
17521745
// Get the current FIPS policy setting on Vista and above
17531746
[DllImport("bcrypt.dll")]
17541747
internal static extern uint BCryptGetFipsAlgorithmMode(
@@ -2295,7 +2288,6 @@ int LsaRegisterLogonProcess (
22952288
byte[] dacl,
22962289
byte[] sacl );
22972290

2298-
#if FEATURE_CORECLR
22992291
[DllImport(KERNEL32, CharSet=CharSet.Unicode)]
23002292
[SuppressUnmanagedCodeSecurityAttribute()]
23012293
internal unsafe static extern int WideCharToMultiByte(
@@ -2317,13 +2309,11 @@ internal unsafe static extern int MultiByteToWideChar(
23172309
int cchMultiByte,
23182310
char* lpWideCharStr,
23192311
int cchWideChar);
2320-
#endif // FEATURE_CORECLR
23212312

23222313
[DllImport(KERNEL32, SetLastError = true)]
23232314
[return: MarshalAs(UnmanagedType.Bool)]
23242315
internal extern static bool QueryUnbiasedInterruptTime(out ulong UnbiasedTime);
23252316

2326-
#if FEATURE_CORECLR
23272317
#if FEATURE_PAL
23282318
[DllImport(KERNEL32, EntryPoint = "PAL_Random")]
23292319
internal extern static bool Random(bool bStrong,
@@ -2349,7 +2339,6 @@ internal static void Random(bool bStrong, byte[] buffer, int length)
23492339
}
23502340
}
23512341
}
2352-
#endif
23532342
#endif
23542343
}
23552344
}

0 commit comments

Comments
 (0)