Skip to content

Remove unused AssemblySpecHash class#126761

Merged
elinor-fung merged 1 commit intomainfrom
copilot/remove-assemblyspechash
Apr 11, 2026
Merged

Remove unused AssemblySpecHash class#126761
elinor-fung merged 1 commit intomainfrom
copilot/remove-assemblyspechash

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Description

AssemblySpecHash has no callers anywhere in the codebase. Remove the class definition from assemblyspec.hpp and its two method implementations (~AssemblySpecHash, CompareSpecs) from assemblyspec.cpp.

The INITIAL_ASM_SPEC_HASH_SIZE macro is retained as it is still used by AssemblySpecBindingCache.

cc @dotnet/appmodel @AaronRobinsonMSFT

Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/c56ec791-9666-4079-a195-ef8a88686ec6

Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 10, 2026 19:02
Copilot AI review requested due to automatic review settings April 10, 2026 19:02
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @elinor-fung
See info in area-owners.md if you want to be subscribed.

@elinor-fung elinor-fung marked this pull request as ready for review April 10, 2026 20:50
Copilot AI review requested due to automatic review settings April 10, 2026 20:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the unused AssemblySpecHash helper from CoreCLR’s assembly binding implementation, keeping the existing AssemblySpecBindingCache behavior intact.

Changes:

  • Removed the AssemblySpecHash class definition from assemblyspec.hpp.
  • Removed AssemblySpecHash’s destructor and CompareSpecs implementation from assemblyspec.cpp.
  • Retained INITIAL_ASM_SPEC_HASH_SIZE since it is still used by AssemblySpecBindingCache.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/coreclr/vm/assemblyspec.hpp Deletes the unused AssemblySpecHash type while keeping the shared initial hash size constant.
src/coreclr/vm/assemblyspec.cpp Removes the now-dead AssemblySpecHash method implementations.

@elinor-fung elinor-fung merged commit cf7fcfa into main Apr 11, 2026
116 of 118 checks passed
@github-project-automation github-project-automation bot moved this to Done in AppModel Apr 11, 2026
@elinor-fung elinor-fung deleted the copilot/remove-assemblyspechash branch April 11, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants