bazel /
crubit /
f99db3e3540f06c7e7eaf40f984543131b8c021a Implement upcast to virtual base, via synthesized C++ thunk.
This (or rather, the preceding work from earlier CLs) is probably the rest of the questionable part for implementing casting in C++. We need some infrastructure somewhere to support dynamic casts -- not just casting to virtual base (which isn't super interesting right now), but even `dynamic_cast` in its full generality.
Remaining work:
* Fix the hacks in the implementation: this doesn't support cross-crate inheritance, name collisions, etc. -- it's a very rough first pass still.
* Flesh out the matrix of conversions. Right now, this still only does &T->&U, but of course we also need to support this for (pinned) mutable references, and raw pointers.
* Flesh out the casting directions: in particular, we also need to support downcasting.
So, you know, first 90% down, only 90% left. :)
PiperOrigin-RevId: 445065670
10 files changed