Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Formal overview: add uncaught exceptions #221

Merged
merged 2 commits into from
Sep 16, 2022

Conversation

ioannad
Copy link
Collaborator

@ioannad ioannad commented Sep 6, 2022

Based on this previous discussion:
https://github.com/WebAssembly/exception-handling/pull/143/files#r761207853

Also:

  • fixed throw contexts to include situations where val* T instr* in general.

Based on this previous discussion:
https://github.com/WebAssembly/exception-handling/pull/143/files#r761207853

Also:
- fixed throw contexts to include situations where `val* T instr*` in general.
@ioannad ioannad requested a review from rossberg September 6, 2022 16:13
## TODO Uncaught Exceptions
## Uncaught Exceptions

To describe uncaught exceptions we add a new terminal value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rossberg suggested we should avoid 'we': #180 (comment)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it seems to have slipped my mind!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest commit. By the way I noticed other usages of "we" in the formal overview, will fix those, including some other nits in an upcoming PR.

To describe uncaught exceptions we add a new terminal value.

```
result ::= ... | T[val* (throw tagaddr)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What result are we talking about? Can we expand ... if that's not too long?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refers to these result values. I now expanded ... and added this link in the document as well.


```
result ::= val* | trap
| T[val* (throw tagaddr)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • What @rossberg suggested was val* T[throw e] instr*... Is this different from T[val* (throw tagaddr)]?
  • How are the cases, which a throw context contains not only a throw and vals but other things... such as label, caught, or frame as listed in the throw context section, covered?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What @rossberg suggested was val* T[throw e] instr*... Is this different from T[val* (throw tagaddr)]?

They were different when @rossberg suggested the former formulation, but in this PR I also changed throw contexts from T ::= val* '[_]' instr* | ... to T ::= '[_]' | val* T instr* | ..., so now these two things val* T[throw e] instr* and T[val* (throw tagaddr)] are really the same.

How are the cases, which a throw context contains not only a throw and vals but other things... such as label, caught, or frame as listed in the throw context section, covered?

So now throw contexts surrounded by values and instructions are also throw contexts. Meaning that val* T instr* is a throw context too.

@ioannad ioannad merged commit 0062d05 into WebAssembly:main Sep 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants