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

Remove Helper Method Frames (HMF) from Reflection #110377

Merged
merged 8 commits into from
Dec 5, 2024

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Dec 3, 2024

Remove HMF from RuntimeFieldHandle.GetLoaderAllocator() and RuntimeMethodHandle.GetLoaderAllocator().
Convert RuntimeTypeHandle.IsEquivalentTo() to QCall.
Convert RuntimeTypeHandle.GetMethodAt() to QCall.
Remove HMF from Signature.GetParameterOffset().
Clean up TypeEquivalence feature defines.
Convert RuntimeTypeHandle.GetArgumentTypesFromFunctionPointer() to QCall.

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@AaronRobinsonMSFT
Copy link
Member Author

AaronRobinsonMSFT commented Dec 4, 2024

@EgorBot -windows_intel

using System;
using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;

public class Bench
{
    [Benchmark]
    public bool IsEquivalentTo() => typeof(A.IFoo).IsEquivalentTo(typeof(B.IFoo));
}

namespace A
{
    [TypeIdentifier]
    [ComImport]
    [Guid("8eabdc2b-1689-459d-9726-8b2454aadef5")]
    public interface IFoo
    {
    }
}

namespace B
{
    [TypeIdentifier]
    [ComImport]
    [Guid("8eabdc2b-1689-459d-9726-8b2454aadef5")]
    public interface IFoo
    {
    }
}

@AaronRobinsonMSFT
Copy link
Member Author

@EgorBot -windows_intel

using System;
using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;

public class Bench
{
    [Benchmark]
    public bool IsEquivalentTo() => typeof(A.IFoo).IsEquivalentTo(typeof(B.IFoo));
}

namespace A
{
    [TypeIdentifier]
    [ComImport]
    [Guid("8eabdc2b-1689-459d-9726-8b2454aadef5")]
    public interface IFoo
    {
    }
}

namespace B
{
    [TypeIdentifier]
    [ComImport]
    [Guid("8eabdc2b-1689-459d-9726-8b2454aadef5")]
    public interface IFoo
    {
    }
}

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 223dea5 into dotnet:main Dec 5, 2024
86 of 90 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the hmf_remove07 branch December 5, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants