mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-12-26 09:13:46 -05:00
308a113445
MSVC and Itanium C++ ABIs agree that for simple inheritance the basic structure of a vtable contains metadata fields at a "negative offset" from the vtable pointer, and at zero or positive offsets come the virtual function pointers in the order of declaration. The only difference between the two is that MSVC only places the virtual deleting destructor in the vtable while Itanium ABI places both the deleting and the complete object destructors in it, leading to a vtable that is one pointer larger in Itanium / on Linux. Also MSVC only has a single metadata field instead of two for Itanium. Itanium inlines the base offset into the vtable while MSVC keeps it in what is essentially the entry point into the type info data. Since the two are so similar, creating a custom vtable on Rust-side is pretty easy and can be done entirely at compile-time, meaning that instances of the class can also be created entirely at compile time. This leads to fully const external strings being possible. |
||
---|---|---|
.. | ||
compile_fail | ||
slots.rs | ||
test_api.rs | ||
test_api_entropy_source.rs | ||
test_api_flags.rs | ||
test_concurrent_isolate_creation_and_disposal.rs | ||
test_platform_atomics_pump_message_loop.rs | ||
test_single_threaded_default_platform.rs | ||
test_ui.rs |