-
Notifications
You must be signed in to change notification settings - Fork 1.5k
C++ Interop: Toolchain Implementation for Function Calls #6254
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
base: trunk
Are you sure you want to change the base?
C++ Interop: Toolchain Implementation for Function Calls #6254
Conversation
a67dc02 to
078bf5b
Compare
This proposal details the mechanism for calling imported C++ functions from Carbon code. It covers how C++ overload sets are handled, the process of overload resolution leveraging Clang, and the generation of "thunks" – intermediate functions – when necessary to bridge Application Binary Interface (ABI) differences between Carbon and C++.
|
FWIW, I've started documenting some of this in #6358. |
zygoloid
left a comment
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.
There seems to be some overlap between this and https://docs.google.com/document/d/1KUxumZtNe3mY3TsjW2s_ZADOlAaFlrtsLKHVILtqIaM/edit -- but actually not very much. (And Chandler or I should turn that document into a proposal...)
Also, this document reads to me like it's mostly describing a design for implementing C++ function calls in the toolchain in particular (thunks, ABI, type representation, etc. are concerns at that level, I think), so perhaps we could very slightly adjust the framing here to be about that. I think that would also remove the appearance of overlap between the two proposals.
… calls in the toolchain.
Done. |
This proposal details the toolchain implementation for calling imported C++
functions from Carbon. It covers how C++ overload sets are handled, the process
of overload resolution leveraging Clang, and the generation of "thunks"
(intermediate functions) when necessary to bridge Application Binary Interface
(ABI) differences between Carbon and C++.