| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This finishes #985. This
- replaces the old names in the tests with the new names
- drops support for the deprecated names
- renames test files to match new instruction names
I don't think dropping support for the old names will be a problem at
this point. #985 says the old names are supported for convenience but we
should remove those too at some point; that "some point" may have well
arrived given that three years have passed.
The lists of names updated are in #933, #1564, WebAssembly/spec#720.
|
| |
|
|
|
|
|
|
|
|
| |
This section is now based on sub-sections making it more
extensible.
See also:
llvm change: https://reviews.llvm.org/D109595
binaryen change: https://github.com/WebAssembly/binaryen/pull/4141
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Function types and struct types share an index space, but a function can
only be defined using a function type.
Since `Module::GetFuncType` already returns `nullptr` for an OOB index,
it makes sense to return `nullptr` for an invalid type too.
|
| |
|
|
|
|
|
|
| |
See #1176. This was working in the spec interpreter because of the way
the segment indexes are handled, but it's better to handle it earlier in
the binary reader.
|
|
|
|
|
|
|
|
| |
pep8 specifies 4 space indentation. The use of 2 spaces is, I believe,
a historical anomaly where certain large organizations such as google
chose 2 over 4 and have yet to make the switch.
For a project like wabt with little python code I think the cost of
switching is small enough to justify the churn.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix a few places where `call`/`call_indirect` are used instead of
`return_call`, `return_call_indirect`
* Fix `TypeChecker::CheckReturnSignature` to print a better error when
the signatures don't match.
* Don't allow `return_call`/`return_call_indirect` instructions in the
parser unless the tail-call feature is enabled.
* Support folding of `return_call`/`return_call_indirect`
Fixes #929.
|
|
|
|
|
| |
The spec requires that the reserved bytes in `call_indirect`,
`memory.grow`, and `memory.size` to be one zero byte. This means that we
cannot accept `0x80 0x00`, or other "long" LEB128 encodings of zero.
|
| |
|
| |
|
|
|
| |
See issue #823.
|
| |
|
|
|
|
|
| |
This adds a new TOOL: `run-gen-wasm-bad` which is the same as
`run-gen-wasm`, but assumes that both `wasm2wat` and `wasm-validate`
will fail with an error.
|
|
|
| |
This is easier to read and handles the byte length automatically.
|
|
|
|
| |
Previously gen-wasm.py would return 0 on parse errors
rather than bailing out and causing tests to fail.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update wasm binary format label to 1
Rebaseline tests, but no other changes.
* Revert test/spec/globals.txt
* Update testsuite
* Update spec binary.wast test and testsuite repo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add support for yapf python formatting tool
This changs adds .style.yapf to define the python style
we are using.
I also ran yapf over all the python files:
$ yapf -i `git ls-files *.py`
Going forward, we should probably add a travis test to
prevent regressions. We should probably also switch to
more conventional 4-space indentation, which is used by
almost everybody outside of Google.
|
|
|
|
|
|
|
| |
Handle user sections interspersed with other section
types and add tests for these.
Switch from calling these sections "Unknown" to
"User".
|
|
|
|
|
|
|
| |
* All types are unified (i32,i64,f32,f64,func,anyfunc,void)
* Can't use array to get type name; use `wasm_get_type_name` instead
* Encode types as vs7 (i.e. Signed LEB128 with max length 1 byte)
* Change version to 0xd
|
| |
|
|
|
|
| |
This fixes #132.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also add test, and make the gen-wasm.py line comment into ";;"
|
| |
|
|
|
|
| |
Also check for WASM_MAX_PAGES in wasm-ast-checker.
|
|
|
|
| |
These will be useful for testing the binary reader.
|
|
These will be useful for testing the binary reader.
|