
On Tue, Jun 2, 2020 at 2:32 AM Alexander Grund via Boost < boost@lists.boost.org> wrote:
By "generally no" I meant that the work is mostly limited to try_catch. <deleted details> Doesn't this state the opposite of "generally, no" or am I missing anything?
The happy path includes everything that happens when there is no exception thrown, not only what happens at the try...catch, that's what I meant.
So I think the request for a comparison of the happy cases for LEAF and exceptions is justified.
A benchmark can be added, sure. Here's the initialization code generated by leaf::try_catch that deals with a context that has a struct e_info { int value; }: mov dword ptr [rsp + 8], 0 mov rax, qword ptr fs:[0] lea rax, [rax + boost::leaf::leaf_detail::slot<e_info>*& boost::leaf::leaf_detail::tl_slot_ptr<e_info>()::s@TPOFF] mov qword ptr [rsp + 16], rax mov rax, qword ptr fs:[boost::leaf::leaf_detail::slot<e_info>*& boost::leaf::leaf_detail::tl_slot_ptr<e_info>()::s@TPOFF] mov qword ptr [rsp + 24], rax lea rax, [rsp + 8] mov qword ptr fs:[boost::leaf::leaf_detail::slot<e_info>*& boost::leaf::leaf_detail::tl_slot_ptr<e_info>()::s@TPOFF], rax This initialization does not depend on the type of ::value. The long gnarly names are TLS offset constants.