Skip to content

Remove dep between __cxa_rethrow_primary_exception and __cxa_rethrow (NFC)#26518

Open
aheejin wants to merge 3 commits intoemscripten-core:mainfrom
aheejin:rethrow_primary_refactor
Open

Remove dep between __cxa_rethrow_primary_exception and __cxa_rethrow (NFC)#26518
aheejin wants to merge 3 commits intoemscripten-core:mainfrom
aheejin:rethrow_primary_refactor

Conversation

@aheejin
Copy link
Member

@aheejin aheejin commented Mar 22, 2026

Currently __cxa_rethrow_primary_exception calls __cxa_rethrow, and __cxa_rethrow is unnecessarily complicated to split logic when it is called from __cxa_rethrow_primary_exception and when it is not.

This just decouples the two and duplicates the necessary logic in __cxa_rethrow_primary_exception. This makes __cxa_rethrow simple and easy to follow.

Currently `__cxa_rethrow_primary_exception` calls `__cxa_rethrow`, and
`__cxa_rethrow` is unnecessarily complicated to split logic when it is
called from `__cxa_rethrow_primary_exception` and when it is not.

This just decouples the two and duplicates the necessary logic in
`__cxa_rethrow_primary_exception`. This makes `__cxa_rethrow` simple and
easy to follow.
@aheejin aheejin requested a review from sbc100 March 22, 2026 03:35
aheejin added 2 commits March 22, 2026 05:32
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (8) test expectation files were updated by
running the tests with `--rebaseline`:

```
codesize/test_codesize_cxx_except.json: 195391 => 195372 [-19 bytes / -0.01%]
codesize/test_codesize_cxx_mangle.json: 261882 => 261863 [-19 bytes / -0.01%]
codesize/test_codesize_hello_dylink_all.json: 821851 => 821662 [-189 bytes / -0.02%]
codesize/test_codesize_minimal_pthreads.json: 26629 => 26630 [+1 bytes / +0.00%]
codesize/test_codesize_minimal_pthreads_memgrowth.json: 27032 => 27033 [+1 bytes / +0.00%]
codesize/test_minimal_runtime_code_size_hello_embind.json: 14909 => 14908 [-1 bytes / -0.01%]
codesize/test_minimal_runtime_code_size_hello_embind_val.json: 11642 => 11641 [-1 bytes / -0.01%]
codesize/test_minimal_runtime_code_size_hello_wasm_worker.json: 4055 => 4060 [+5 bytes / +0.12%]

Average change: +0.01% (-0.02% - +0.12%)
```
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (6) test expectation files were updated by
running the tests with `--rebaseline`:

```
codesize/test_codesize_hello_dylink_all.json: 821662 => 821851 [+189 bytes / +0.02%]
codesize/test_codesize_minimal_pthreads.json: 26630 => 26629 [-1 bytes / -0.00%]
codesize/test_codesize_minimal_pthreads_memgrowth.json: 27033 => 27032 [-1 bytes / -0.00%]
codesize/test_minimal_runtime_code_size_hello_embind.json: 14908 => 14909 [+1 bytes / +0.01%]
codesize/test_minimal_runtime_code_size_hello_embind_val.json: 11641 => 11642 [+1 bytes / +0.01%]
codesize/test_minimal_runtime_code_size_hello_wasm_worker.json: 4060 => 4055 [-5 bytes / -0.12%]

Average change: -0.02% (-0.12% - +0.02%)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant