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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComPtr<T> improvements, new __uuidof<T> macro #151
ComPtr<T> improvements, new __uuidof<T> macro #151
Changes from 11 commits
d3573d0
fe450d3
e9aea0c
85f4dde
d31ef1f
681a840
7b1dea4
bcebd35
2aef133
b0c9282
1f66ef1
294d735
650cef5
b90b27e
19c79e3
8702e3d
c0bd665
b358ae9
b2a4be6
3f93d6e
e10f572
65b7f00
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had only called out the doc comment syntax mismatch on the type, but it applies to all added doc comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right. Fixed in b358ae9 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need
AggressiveInlining
on these. They are extremely small and the JIT should handle it already.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in 65b7f00.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the codegen look like for this and the other implicit operator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say it looks quite nice 😄
Plus there's the fact that the tiered JIT could even elide the static constructor check entirely.
But other than this there's basically just the call to the static constructor (which we would've had anyway since
Windows
has statically initialized fields as well), and then all the rest is completely elided by the JIT.Guid* converter (click to expand):
Guid converter (click to expand):
In particular for this as we have a direct comparison, the codegen is slightly smaller than just suing static GUIDs from the
Windows
class, but of course this approach is still much easier to use and less error prone.Accessing Windows.IID_Foo (click to expand):
Considering that here we also have the prologue/epilogue that'd just go away once this method is just inlined 🚀