This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Merge changes from TFS - #1438
Merged
Merged
Conversation
1. Remove unnecessary CCwVTable = GetFuncAddr(GetVtable { return 0; }) code - and simply leave the field uninitialized (StaticInitData transform seem to choke on IntPtr.Zero)
2. Move all GetVTable functions inside __Impl class for better organization/locality
3. Remove unnecessary index constants that defines vtbl offsets - it doesn't buy us anything (other than looking nice) and we should simply emit the constant instead.
4. Move our vtable index calculation into type importing code - it is the most natural place to calculate the vtable index and we record the index in the FuncDecl
5. More refactoring to move hard coded names into Names.cs and adjusted some of the names that we have
6. Making more stuff internal/private - this should speed up shared PIA consumption if we were to go that route again
7. remove the unnecessaarily word vtable field name - change it from pfnFunc_IFoo to pfnFunc_. it seems pretty silly to pay for the full name of the interface just to avoid duplication from the 3 possible base interface names.
Some initial non-scientific testing shows that this gives 6.8% reduction on C# size and 10% reduction on interop untransformed IL size, and 94K native size (under CHK, so take with a lot of salts :) ) savings, on twitter:
C#: before: 19,639,921 after:18,307,693 = -6.78%
IL: before: 4,834,304 after: 4,349,952 = -10.02%
native: before: 27,060,224 after: 26,966,016 = -94K
[tfs-changeset: 1614730]
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.