Skip to content

✨ Support polymorphic catch #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2024
Merged

✨ Support polymorphic catch #49

merged 1 commit into from
Aug 27, 2024

Conversation

kammce
Copy link
Member

@kammce kammce commented Aug 26, 2024

Exception algorithm will now check if a parent type exists within the thrown object that can be caught by a catch block. There is a limit of up to 12 relationships that can exist for a thrown object. Any greater than that and the exception mechanism will call std::terminate(). A relationship is a connection from parent to child object. With virtual inheritance, an additional relationship is made for each virtual parent inheritance.

Resolves #6

  • 🐛 Fix read_sleb128(), incorrectly sign extends values.
  • 🐛 Fix get_action_decoder() next action record offset.

@kammce
Copy link
Member Author

kammce commented Aug 26, 2024

The multi_virtual demo currently segfaults due to the action table having a very large next action offset for some reason. Maybe this has exposed a bug we haven't seen before.

Exception algorithm will now check if a parent type exists within the
thrown object that can be caught by a catch block. There is a limit of
up to 12 relationships that can exist for a thrown object. Any greater
than that and the exception mechanism will call `std::terminate()`.
A relationship is a connection from parent to child object. With virtual
inheritance, an additional relationship is made for each virtual parent
inheritance.

- 🐛 Fix `read_sleb128()`, incorrectly sign extends values.
- 🐛 Fix `get_action_decoder()` next action record offset.

Resolves #6
@kammce kammce force-pushed the poly-morphic-catch branch from 6ffd52a to 85b06a5 Compare August 27, 2024 19:11
@kammce kammce merged commit b3f7a9e into main Aug 27, 2024
7 of 8 checks passed
@kammce kammce deleted the poly-morphic-catch branch August 27, 2024 19:16
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.

Support polymorphic catch
1 participant