This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Merge changes from TFS - #1667
Merged
Merged
Conversation
….GetCustomerAttribute<> The Reflection Invoke logic gets tripped by the existence of enum parameters with default values in the method. NUTC generates reflection templates using the enum type , but Reflection searches for templates using the underlying type of the enum (in that case, type of int). These 2 parts of the system end up not agreeing with each other on the correct type of the parameter, and the Reflection Invoke operation ends up failing and not finding a template because of that. [tfs-changeset: 1622806]
…r and the runtime.
Overview - here's what generic instance descs were used for and how this functionality is provided now:
- They were needed to support generic unification. For the release scenario, this is no longer necessary because global analysis places generics.
For the F5 scenario, we will again have generic unification, but it will be done differently and is not in this code review yet.
- They were used for GC reporting of statics on generic types. Statics on statically built generic types are now merged into the static GC desc
of their containing module. Statics on dynamic types are reported via two new lists on the RuntimeInstance class, one for regular GC statics,
the other one for thread statics.
- They were also used to hold statics information for dynamically loaded types. This information is now attached to the EEType instead.
- Similarly, generic instance descs held information about the open generic type, the instantiation parameter, and the parameter variance information.
This information is now also attached to the EEType.
Detail notes:
- EEType.Constants.cs, EEType.cs, eetype.h, eetype.inl: Provide for attaching generic and static information to eetypes. The latter is only used for dynamic types.
- MiscHelpers.cpp, module.cpp, module.h, RuntimeInstance.cpp/.h: Remove GenericInstanceDesc logic, provide equivalent functionality.
- rhbinder.h, ZapHeaders.cpp: Bump version number, remove GenericInstanceDesc related fields from module header.
- EETypeCreator.cs: logic to set rareFlags appropriately for attached statics.
- TypeLoaderEnvironment.StaticsLookup.cs: the logic turned out to be wrong for the TLS index - the binder encoded always zero for the index, which cannot work
at runtime. So I changed the binder (see comment below), and I also changed the runtime logic to apply an indirection. For consistency, I did the same
for the thread static offset - this isn't necessary now but may become necessary for the F5 scenario.
- common.h: Add separateCompilation flag to g_BindOptions as prep work for F5 scenario.
- CompactLayoutReader.cpp: for release scenario, merge generic statics and their GC descs early rather than relying on generic instance descs.
- MethodTable.h, MakePdb.cpp, MdilModule.cpp/.h: attach "InstantiatedTypeZapNodes" data structure to method table rather than finding it via
a hash table lookup. This is just a cleanup change.
- MdilModule.cpp/.h: Remove generic instance desc logic, add logic to generate the "GenericComposition" data structure instead, attach that and
the generic definition to eetypes, add a rare flag for eetypes with sealed virtuals, add indirection cells where we used to indirect through generic
instance descs, remove unused "GetReadonlyBlobNode" method, change encoding of native layout info for thread statics (see comments above
for TypeLoaderEnvironment.StaticsLookup.cs).
- ZapImage.cpp/.h: remove generic instance desc sections.
- various copies of rhbind.exe and rhbindui.dll: these are used to build mrt100_app.dll. The change updates rhbind.exe to put the new version number
into the module header of mrt100_app.dll.
[tfs-changeset: 1622930]
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.
No description provided.