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 useless delegate virtual methods #97959

Merged
merged 6 commits into from
Feb 7, 2024

Commits on Feb 5, 2024

  1. Delete useless delegate virtual methods

    The split between `Delegate` and `MulticastDelegate` is a wart that likely has some history behind it. Types that inherit from `Delegate` directly would not be considered delegates by the runtime. They need to inherit `MulticastDelegate. I can't find a reason why we'd need some useless base implementation of these methods that immediately gets overriden in `MulticastDelegate`. This deletes the useless base implementation and moves the useful implementation from `MulticastDelegate` to `Delegate`.
    
    This along with dotnet#97951 saves ~40 bytes per delegate `MethodTable` because the virtual methods can now be devirtualized or placed into the sealed vtable. We might be able to do even more since technically sealed virtuals could be reshuffled after the codegen phase and slots eliminated then.
    MichalStrehovsky committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    e55812f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce430d5 View commit details
    Browse the repository at this point in the history
  3. FB

    MichalStrehovsky committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    ba07eed View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. FB

    MichalStrehovsky committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    900add5 View commit details
    Browse the repository at this point in the history
  2. Duh

    MichalStrehovsky committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    3e281d0 View commit details
    Browse the repository at this point in the history
  3. FB

    MichalStrehovsky committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    bf859d6 View commit details
    Browse the repository at this point in the history