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

Merge changes from TFS - #1627

Merged
jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs
Aug 9, 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. Rename McgMarshal.ThrowFailed to McgMarshal.ThrowOnExternalCallFailed to indicate the failure is coming from external component
2. Rename McgInterop to __Interop to indicate that this is internal implementation detail in compiler and avoids the question "what the hell is McgInterop". I'm open to other name suggestions as well.
3. We represent IFoo * in the code using IFoo__Impl.Vtbl** which is unnecessarily complicated (try answering this question: what is IFoo__Impl.Vtbl***?). Change to use void*. This also avoids a external dependency to Vtbl type so that we can actually remove Vtbl type
4. Shorten type name argument mangling by replacing common names with common short prefixes - otherwise it can be too verbose. This is unfortunately breaking change in terms of shared library, but should be fine since we are releasing a new one. I'm also thinking about using a hash/GUID encoding but we also need to avoid conflicts in a stable manner so I need to think about this a bit more.
5. use index instead of verbose Proc_Type1_Type2_Type3 (which can get very long) in our shared stub names. The names are internal only so no need to be stable.
6. Remove unnecessary "Class" name from various Mcg codegen artifacts such as StubClass/RCWAdapterClass/etc. Instead, i'll just be Stubs, RCWAdapter, etc

As a bonus, this reduce interop C# codegen by 5.3% and interop IL by 6.7% in twitter. Local performance runs are rather noisy but it does show a marginal improvement on C# compilation time.

[tfs-changeset: 1621516]
@jkotas
jkotas merged commit 8bf6ece into dotnet:nmirror Aug 9, 2016
@dotnet-bot
dotnet-bot deleted the from-tfs branch August 9, 2016 01:01
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