Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Merge changes from TFS - #1438

Merged
jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs
Jun 25, 2016
Merged

jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

No description provided.

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]
@jkotas
jkotas merged commit cd66bf7 into dotnet:nmirror Jun 25, 2016
@dotnet-bot
dotnet-bot deleted the from-tfs branch June 25, 2016 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants