[libcxx-commits] [PATCH] D158620: [libcxx] [libcxxabi] don't throw+catch in std::make_exception_ptr when building with libcxxabi
Ivan via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 24 04:05:35 PDT 2023
itrofimow created this revision.
Herald added a project: All.
itrofimow updated this revision to Diff 552718.
itrofimow added a comment.
itrofimow updated this revision to Diff 552784.
Herald added a subscriber: smeenai.
itrofimow updated this revision to Diff 552852.
itrofimow retitled this revision from "[libcxx] [libcxxabi] don't throw+catch in std::make_exception_ptr, if possible" to "[libcxx] [libcxxabi] don't throw+catch in std::make_exception_ptr when building with libcxxabi".
itrofimow edited the summary of this revision.
itrofimow published this revision for review.
Herald added projects: libc++, libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
- + clang-format
itrofimow added a comment.
- cleanup
itrofimow added a comment.
- + clang-format, fix libcxx.imp
itrofimow added a comment.
Hi!
Inspired by what libstdc++ does: we don't have to throw + catch (thus unwinding) an exception when creating exception_ptr,
because libcxxabi knows exactly how to create an exception_ptr from the given object.
Could you please validate this idea and if this seems reasonable guide me on what and where should be adjusted to make
generated_files/modules/etc. tests pass?
Instead of throwing an exception allocate its memory and initialize it
explicitly. Makes std::make_exception_ptr more efficient since no stack
unwinding is needed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158620
Files:
libcxx/include/CMakeLists.txt
libcxx/include/__exception/exception_ptr.h
libcxx/include/__typeinfo/typeinfo.h
libcxx/include/libcxx.imp
libcxx/include/module.modulemap.in
libcxx/include/typeinfo
libcxx/src/support/runtime/exception_pointer_cxxabi.ipp
libcxxabi/include/cxxabi.h
libcxxabi/src/cxa_exception.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158620.552852.patch
Type: text/x-patch
Size: 35171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230824/ca230fb0/attachment-0001.bin>
More information about the libcxx-commits
mailing list