Skip to content

Conversation

xtqqczze
Copy link
Contributor

No diffs expected.

No diffs expected.
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 12, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Aug 12, 2025
@EgorBo
Copy link
Member

EgorBo commented Aug 12, 2025

@MihuBot

@EgorBo
Copy link
Member

EgorBo commented Aug 12, 2025

Apparently, it's not no diffs
Feel free to file an issue against JIT with a repro

@EgorBo
Copy link
Member

EgorBo commented Aug 12, 2025

I think it's mostly around shared generics, e.g.:

using System;
using System.Runtime.CompilerServices;
using Microsoft.CodeAnalysis;

public class C
{
    public static void Main(string[] args)
    {
        Test<string>(new string[] { "Hello", "World" });
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    public static void Test<T>(object o)
    {
        if (o.GetType() == typeof(T[]))
            DoWork(Unsafe.As<T[]>(o));
            //DoWork((T[])o);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    static void DoWork<T>(T[] _) { }
}

@xtqqczze
Copy link
Contributor Author

@MihuBot

@EgorBo
Copy link
Member

EgorBo commented Aug 12, 2025

It's fine to merge single-line changes like this, I see the current change indeed is zero diff (as expected judging by the C# code), if you can find more candidates - the better 🙂

@EgorBo EgorBo added area-System.Runtime reduce-unsafe and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 12, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

@xtqqczze
Copy link
Contributor Author

@MihuBot

@xtqqczze
Copy link
Contributor Author

It's fine to merge single-line changes like this, I see the current change indeed is zero diff (as expected judging by the C# code), if you can find more candidates - the better 🙂

Looks like we have an improvement in System.Buffers.AhoCorasickBuilder:BuildTrie(byref):this

@AaronRobinsonMSFT
Copy link
Member

@EgorBo Do we have an Unsafe issue that we can record these PRs? We did this for the HelperMethodFrame removal and it was very helpful to track the body of work from so many.

@EgorBo
Copy link
Member

EgorBo commented Aug 12, 2025

@EgorBo Do we have an Unsafe issue that we can record these PRs? We did this for the HelperMethodFrame removal and it was very helpful to track the body of work from so many.

I think "reduce-unsafe" label should be enough.
Overall the main issue is #94941

@EgorBo EgorBo merged commit 38aa769 into dotnet:main Aug 13, 2025
135 of 138 checks passed
@EgorBo
Copy link
Member

EgorBo commented Aug 13, 2025

Thanks!

@xtqqczze xtqqczze deleted the rm-unsafeas branch August 13, 2025 14:37
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime community-contribution Indicates that the PR has been added by a community member reduce-unsafe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants