| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Without this change, when bulk memory is enabled, the DataCount is
always written when then removed if it proves that its not needed by any
instruction.
However, if we know there are no data segments we can avoid writing it
altogether. This happens to be more compact but I'm hoping to land this
now in anticipation of enabled bulk memory by default. Once we do that
we don't want all the `dump` tests to include the writing and truncating
of the DataCount section in cases when there is no data.
|
|
|
|
|
|
|
|
|
|
|
| |
We recently decided to change 'event' to 'tag', and 'event section' to
'tag section', out of the rationale that the section contains a
generalized tag that references a type, which may be used for something
other than exceptions, and the name 'event' can be confusing in the web
context.
See
- https://github.com/WebAssembly/exception-handling/issues/159#issuecomment-857910130
- https://github.com/WebAssembly/exception-handling/pull/161
|
|
|
|
|
|
|
|
|
|
| |
This PR updates the support of exception handling to the latest proposal (that is compatible with future 2-phase exception handling) described in https://github.com/WebAssembly/exception-handling/pull/137 and https://github.com/WebAssembly/exception-handling/pull/143.
* Adds back tagged `catch $e`, `catch_all`, and `rethrow N` from a previous version of wabt, but with updates to match the current spec (e.g., `catch_all` shares an opcode with `else`, `rethrow`'s depth indexes only catch blocks, etc).
* Adds `unwind` and `delegate` instructions.
* Removes `exnref` and `br_on_exn`.
* Updates relevant tests.
There are some details that could still change (e.g., maybe how `delegate`'s depth is validated), but I'd be happy to submit further PRs if the spec details change.
|
|
|
|
| |
I'm not sure why we were using stdout but the convention is normally to
write all logging and error message to stderr.
|
|
|
| |
Signed-off-by: Radu M <root@radu.sh>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The exnref type was already supported in the type checker, and other
parts of the code, but there was no way to name the type in the text
format.
This PR also fixes makes binary-reader.cc check for just the
exceptions_enabled flag to enable exnref. The exception-handling
proposal depends on the reference types proposal, but that is now
handled at a higher level, in the `UpdateDependencies` function.
Fixes issue #1388.
|
|
|
|
|
|
|
|
|
|
|
|
| |
An event has a type-section index, like a function definition. The
current proposal doesn't specify the text format, so I assumed that it
would match the format of the other sections that reference function
types. This means that the following declaration styles are allowed:
```
(type $t (func (param i32)))
(event $e1 (type $t))
(event $e2 (param f32))
```
|
| |
|
|
|
|
|
|
|
| |
The exception section is now a known section with code 13, and is known
as the "Event" section.
The structure of the section has changed too, but I'll fix that in
another PR.
|
|
|
| |
This is useful for finding large functions with wasm-objdump.
|
|
Implemented:
* Parsing `try`, `if_except`, `throw`, `rethrow`
* Validation
* Binary and text output
Still missing:
* `except_ref` for locals
* Interpreter implementation
|