Add support for parsing and working with CustomModifiers in field signatures and make TypeSystemMetadataEmitter more flexible#70593
Merged
davidwrighton merged 2 commits intodotnet:mainfrom Jun 10, 2022
Conversation
Member
davidwrighton
commented
Jun 10, 2022
- Update TypeSystemMetadataEmitter to be able to generate a field signature given an appropriate array of EmbeddedSignatureData[]
- Add api to FieldDesc to allow the custom modifier data to be handled using the same scheme as custom modifier data on method signatures
- Adjust TypeSystemMetadataEmitter to be able to generate metadata not just for the Mibc emitter
- The current implementation has some default behavior around creating metadata that is in the constructor. Break that out into helper functions so that other scenarios don't need to run that code.
- Add an entrypoint for generating metadata for an arbitrary TypeSystemEntity
- Add a feature to allow it the ResolutionScope of a non-nested type to be managed specially. This will be needed by Add support for cross module inlining and cross module generic compilation to Crossgen2 #68919
…natures and make TypeSystemMetadataEmitter more flexible - Update TypeSystemMetadataEmitter to be able to generate a field signature given an appropriate array of EmbeddedSignatureData[] - Add api to FieldDesc to allow the custom modifier data to be handled using the same scheme as custom modifier data on method signatures - Adjust TypeSystemMetadataEmitter to be able to generate metadata not just for the Mibc emitter - The current implementation has some default behavior around creating metadata that is in the constructor. Break that out into helper functions so that other scenarios don't need to run that code. - Add an entrypoint for generating metadata for an arbitrary TypeSystemEntity - Add a feature to allow it the ResolutionScope of a non-nested type to be managed specially. This will be needed by dotnet#68919
Member
|
/cc @mdh1418 |
trylek
reviewed
Jun 10, 2022
| var ilLookupModule = (EcmaModule)lookupContext.GetModuleForSimpleName("Lookup"); | ||
| FieldDesc fieldFound = ilLookupModule.GetField(token); | ||
|
|
||
| Assert.Equal("fieldWithModOpt", fieldFound.Name); |
Member
There was a problem hiding this comment.
Should we also check the modopt on the field?
trylek
reviewed
Jun 10, 2022
| get; | ||
| } | ||
|
|
||
| // Get the embedded signature data used to hold custommodifiers and such within a field signature |
Member
There was a problem hiding this comment.
Nit / typo - it seems to me it would be a tad more readable if we used a blank to turn these into normal words custom modifiers, after all it's not a direct reference to a type name or some such.
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.