| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Give `catch_all` its own opcode:
Previously `catch_all` shared an opcode with `else`, but
the spec now allocates it the 0x19 opcode.
Adjust rethrow depth semantics:
Previously this had interpreted the rethrow depth argument
as counting only catch blocks, but the spec has clarified that
it should count all blocks (in a similar fashion as `br` and
related instructions).
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* [WIP] Added initial skeleton code for wasm-decompile.
* Code review changes.
|
|
`Opcode::FromCode` calculated the opcode given a prefix/code pair by
using lower_bound over the list of all `OpcodeInfo`s. This was happening
for every instruction, which is incredibly slow.
Since the interpreter's format is internal only, we can use any encoding
we want, so it's simpler and faster to use the `Opcode::Enum` directly
without calling `Opcode::FromCode`.
`Opcode::FromCode` is also used when reading a binary file, so it should
be optimized anyway. Instead of using the `infos_` table, which is
indexed by the opcode's `enum_` value, we create a new
statically-defined table that maps from prefix-code pair to its enum
value.
Unfortunately, this can't be done easily in C++ because it does not
currently support designated array initializers, so this table is
created in a C file instead, `opcode-code-table.c`.
|