Open sbomer opened 3 years ago
CoreTypeMapStep
also control the possible removal of the dynamic registrar from the final app. I'm moving this out of CoreTypeMapStep
since it has no real interaction with the base type (or other code / optimization).
However it does, like other parts, assume all potential assemblies are known/loaded to make the decision (to keep or not the dynamic registrar). That decision does influence the optimization done later (before at at marking time).
The .NET 6 linker no longer runs TypeMapStep for assemblies up-front. Instead the linker discovers base types on-demand (and the known overrides at any given point may be incomplete).
CoreTypeMapStep is not part of the .NET 6 macios linker pipeline, so some optimizations are not enabled:
IsNSObject
checks are not cachedIsDirectBinding
checks are not optimized (since they rely on information normally cached by CoreTypeMapStep)edit: another missed opportunity is that
CollectUnmarkedMembersSubStep
runs before MarkStep so it will effectively track all members. Ideally this step would run after Mark.