Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Add helpers to compute type hashcode from native metadata - #1616

Merged
MichalStrehovsky merged 1 commit into
dotnet:nmirrorfrom
MichalStrehovsky:metadataHashcode
Aug 4, 2016
Merged

MichalStrehovsky merged 1 commit into
dotnet:nmirrorfrom
MichalStrehovsky:metadataHashcode

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

We will be converting the type reflection mapping table (the one that
converts between EETypes and type metadata handles) to a hashtable.

In order to do that, we need to be able to compute the type hash code
from metadata. In this commit:

  • I'm making it possible to compute the type hash code without
    allocating and formatting the complete type name (to cut down on
    allocations)
  • I'm adding a helper to compute hash codes from TypeReferenceHandle
    and TypeDefinitionHandle
  • A bunch of unit tests for both.

We will be converting the type reflection mapping table (the one that
converts between EETypes and type metadata handles) to a hashtable.

In order to do that, we need to be able to compute the type hash code
from metadata. In this commit:

* I'm making it possible to compute the type hash code without
allocating and formatting the complete type name (to cut down on
allocations)
* I'm adding a helper to compute hash codes from `TypeReferenceHandle`
and `TypeDefinitionHandle`
* A bunch of unit tests for both.
@MichalStrehovsky

Copy link
Copy Markdown
Member Author

(I'm submitting this against the nmirror branch because I'll be using this from TFS side very soon and don't want to wait/block on full integration.)

@jkotas

jkotas commented Aug 4, 2016

Copy link
Copy Markdown
Member

👍

@MichalStrehovsky
MichalStrehovsky merged commit ecd46ef into dotnet:nmirror Aug 4, 2016
@MichalStrehovsky
MichalStrehovsky deleted the metadataHashcode branch August 4, 2016 18:09
@MichalStrehovsky

Copy link
Copy Markdown
Member Author

@davidwrighton If you have any comments, I can make adjustments in subsequent commits.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants