This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Move Name, Namespace and OwningType to DefType - #1553
Merged
MichalStrehovsky merged 1 commit intoJul 20, 2016
Merged
Conversation
The motivation for this change is:
* To make the type name formatter general purpose (it can now handle
`NoMetadata` types)
* To make `NameMangler` able to mangle canon types and runtime
determined types without special casing
For situation where we have a NoMetadataType, the expectation is that
we're asking for the name for diagnostic purposes only (i.e. name
formatter wants it). In that case:
* In checked builds, the name can actually be retrieved from diagnostic
mapping tables, along with the owning type (we have a metadata TypeRef
for this).
* In the absence of diagnostic mapping tables, the name can be faked up
and the type pretended to be non-nested
("System.Runtime.NoMetadataTypes.EEType1234ABCD")
As an additional change, I'm also adding `Name` property on
`GenericParameterDesc`. We can compute a useful fallback value for this
in absence of metadata ("T" + index).
Member
Author
|
@davidwrighton PTAL I'm mostly happy with how this change turned out, except for runtime determined types, where it feels a bit weird. But I'm not sure if we can do anything with runtime determined types that wouldn't be weird. I can do the proposed changes on the NoMetadata side once this change trickles down to TFS. No fallout is expected at the time of merging (except for having to adapt |
Member
|
I think this is reasonable, and I don't have any particular objections to the changes presented (especially if you're volunteering to do the followon work for NoMetadata stuff in TFS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The motivation for this change is:
NoMetadatatypes)NameManglerable to mangle canon types and runtimedetermined types without special casing
For situation where we have a NoMetadataType, the expectation is that
we're asking for the name for diagnostic purposes only (i.e. name
formatter wants it). In that case:
mapping tables, along with the owning type (we have a metadata TypeRef
for this).
and the type pretended to be non-nested
("System.Runtime.NoMetadataTypes.EEType1234ABCD")
As an additional change, I'm also adding
Nameproperty onGenericParameterDesc. We can compute a useful fallback value for thisin absence of metadata ("T" + index).