Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

[libcxx] [libcxxabi] don't throw+catch in std::make_exception_ptr when building with libcxxabi
Needs ReviewPublic

Authored by itrofimow on Aug 23 2023, 7:35 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Restricted Project
Summary

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.

Diff Detail

Event Timeline

itrofimow created this revision.Aug 23 2023, 7:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 7:35 AM
itrofimow updated this revision to Diff 552718.Aug 23 2023, 7:59 AM
  • + clang-format
  • + clang-format, fix libcxx.imp
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.Aug 24 2023, 3:47 AM
itrofimow edited the summary of this revision. (Show Details)
itrofimow published this revision for review.Aug 24 2023, 4:05 AM

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?

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 24 2023, 4:05 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
itrofimow updated this revision to Diff 554263.Tue, Aug 29, 4:38 AM
  • wip on making the build green
itrofimow updated this revision to Diff 554392.Tue, Aug 29, 9:26 AM
  • wip on making the build green
itrofimow updated this revision to Diff 554633.Wed, Aug 30, 1:52 AM
  • regenerate ignore_format.txt
itrofimow updated this revision to Diff 554667.Wed, Aug 30, 4:45 AM
  • + clang-format
  • cleanup
  • + clang-format, fix libcxx.imp
  • wip on making the build green
  • wip on making the build green
  • regenerate ignore_format.txt
  • bits of formatting
  • wip on making the build green
itrofimow updated this revision to Diff 554695.Wed, Aug 30, 6:39 AM
  • wip on making the build green
itrofimow updated this revision to Diff 554965.Thu, Aug 31, 3:50 AM
  • rebase to trigger build

Since we are moving to GitHub PRs and there hasn't been any activity here yet, could you move this patch over?