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

Initial support for exceptions in spec interpreter - #28

Closed
eholk wants to merge 3 commits into
WebAssembly:masterfrom
eholk:spec-interpreter
Closed

eholk wants to merge 3 commits into
WebAssembly:masterfrom
eholk:spec-interpreter

Conversation

@eholk

@eholk eholk commented Aug 15, 2017

Copy link
Copy Markdown
Contributor

This change provides some initial support for exceptions in the spec interpreter.

We support basic exception declarations, try blocks, catch_all clauses and throw. This includes type checking, encoding, decoding, printing and execution.

There are still some limitations. Exceptions cannot yet take arguments. We do not support catch or rethrow yet. The allowed locations for the exceptions section is overly strict now, in part because the location is still an open question (#25).

Future PRs will add the missing functionality, but this is sufficient to give initial support and help clarify some of the details of the spec.

eholk added 3 commits August 11, 2017 13:53
The spec interpreter can now parse and validate basic try, throw and catch_all
instructions. The interpreter can also evaluate these, although support for all
possibilities is not all there yet.
This also adds dynamic scopes for error messages to pin down better where
end of stream errors come from.
@eholk

eholk commented Aug 15, 2017

Copy link
Copy Markdown
Contributor Author

@rossberg-chromium - Could you take a look at this? Thanks!

@eholk

eholk commented Aug 16, 2017

Copy link
Copy Markdown
Contributor Author

One clarification: this change requires try blocks to have a catch_all clause. The reason is that catch clauses are not supported yet. Once catch is added, try blocks will be required to have at least one catch clause or a catch_all.

ioannad pushed a commit to ioannad/exception-handling that referenced this pull request Jun 6, 2020
…ly#28)

The current state seems to remove the placeholder table/memory index from the encoding to use it as an active flag.
@aheejin

aheejin commented Jun 25, 2021

Copy link
Copy Markdown
Member

This is for the old spec. Superceded by #151 and #160.

@aheejin aheejin closed this Jun 25, 2021
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.

2 participants