Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete some native AOT S.P.CoreLib compat suppressions #95380

Merged
merged 1 commit into from
Nov 29, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,6 @@
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.ExceptionIDs</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.InteropServices.InteropExtensions</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.InteropServices.NativeFunctionPointerWrapper</Target>
Expand All @@ -897,10 +893,6 @@
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.RuntimeImports</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.RuntimeObjectFactory</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.TypeLoaderExports</Target>
Expand All @@ -909,10 +901,6 @@
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.RuntimeExceptionHelpers</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Threading.Condition</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.ModuleHandle.#ctor(System.Reflection.Module)</Target>
Expand All @@ -925,10 +913,6 @@
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Reflection.MethodBase.GetParametersAsSpan</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.TypedReference.get_IsNull</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,``0):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute]</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,12 +688,6 @@ public static IntPtr GetTargetOfUnboxingAndInstantiatingStub(IntPtr functionPoin
return RuntimeImports.RhGetTargetOfUnboxingAndInstantiatingStub(functionPointer);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static IntPtr RuntimeCacheLookup(IntPtr context, IntPtr signature, RuntimeObjectFactory factory, object contextObject, out IntPtr auxResult)
{
return TypeLoaderExports.RuntimeCacheLookupInCache(context, signature, factory, contextObject, out auxResult);
}

//==============================================================================================
// Internals
//==============================================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@
namespace System.Runtime.InteropServices
{
/// <summary>
/// Hooks for System.Private.Interop.dll code to access internal functionality in System.Private.CoreLib.dll.
///
/// Methods added to InteropExtensions should also be added to the System.Private.CoreLib.InteropServices contract
/// in order to be accessible from System.Private.Interop.dll.
/// Hooks for interop code to access internal functionality in System.Private.CoreLib.dll.
/// </summary>
[CLSCompliant(false)]
public static class InteropExtensions
internal static class InteropExtensions
{
internal static bool MightBeBlittable(this EETypePtr eeType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,36 +94,6 @@ public static IntPtr GenericLookup(IntPtr context, IntPtr signature)
return v._result;
}

public static void GenericLookupAndCallCtor(object arg, IntPtr context, IntPtr signature)
{
Value v = LookupOrAdd(context, signature);
RawCalliHelper.Call(v._result, arg);
}

public static object GenericLookupAndAllocObject(IntPtr context, IntPtr signature)
{
Value v = LookupOrAdd(context, signature);
return RawCalliHelper.Call<object>(v._result, v._auxResult);
}

public static object GenericLookupAndAllocArray(IntPtr context, IntPtr arg, IntPtr signature)
{
Value v = LookupOrAdd(context, signature);
return RawCalliHelper.Call<object>(v._result, v._auxResult, arg);
}

public static void GenericLookupAndCheckArrayElemType(IntPtr context, object arg, IntPtr signature)
{
Value v = LookupOrAdd(context, signature);
RawCalliHelper.Call(v._result, v._auxResult, arg);
}

public static object GenericLookupAndCast(object arg, IntPtr context, IntPtr signature)
{
Value v = LookupOrAdd(context, signature);
return RawCalliHelper.Call<object>(v._result, arg, v._auxResult);
}

public static unsafe IntPtr GVMLookupForSlot(object obj, RuntimeMethodHandle slot)
{
if (TryGetFromCache((IntPtr)obj.GetMethodTable(), RuntimeMethodHandle.ToIntPtr(slot), out var v))
Expand Down Expand Up @@ -162,18 +132,6 @@ private static bool TryGetFromCache(IntPtr context, IntPtr signature, out Value
return s_cache.TryGet(k, out entry);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static IntPtr RuntimeCacheLookupInCache(IntPtr context, IntPtr signature, RuntimeObjectFactory factory, object contextObject, out IntPtr auxResult)
{
if (!TryGetFromCache(context, signature, out var v))
{
v = CacheMiss(context, signature, factory, contextObject);
}

auxResult = v._auxResult;
return v._result;
}

private static Value CacheMiss(IntPtr ctx, IntPtr sig)
{
return CacheMiss(ctx, sig,
Expand All @@ -198,7 +156,7 @@ private static unsafe Value CacheMiss(IntPtr context, IntPtr signature, RuntimeO
}
}

public delegate IntPtr RuntimeObjectFactory(IntPtr context, IntPtr signature, object contextObject, ref IntPtr auxResult);
internal delegate IntPtr RuntimeObjectFactory(IntPtr context, IntPtr signature, object contextObject, ref IntPtr auxResult);

internal static unsafe class RawCalliHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace System.Threading
{
public sealed class Condition
internal sealed class Condition
{
internal class Waiter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ public static object ToObject(TypedReference value)
public override bool Equals(object? o) { throw new NotSupportedException(SR.NotSupported_NYI); }
public override int GetHashCode() => _typeHandle.IsNull ? 0 : _typeHandle.GetHashCode();

// Not an api - declared public because of CoreLib/Reflection.Core divide.
public bool IsNull => _typeHandle.IsNull;
internal bool IsNull => _typeHandle.IsNull;

internal ref byte Value
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5152,7 +5152,7 @@ public ManifestBuilder(string providerName, Guid providerGuid, string? dllName,
}

/// <summary>
/// <term>Will NOT build a manifest!</term> If the intention is to build a manifest don’t use this constructor.
/// <term>Will NOT build a manifest!</term> If the intention is to build a manifest don't use this constructor.
///'resources, is a resource manager. If specified all messages are localized using that manager.
/// </summary>
internal ManifestBuilder(ResourceManager? resources, EventManifestOptions flags)
Expand Down
Loading