summaryrefslogtreecommitdiff
path: root/test/gen-wasm.py
Commit message (Collapse)AuthorAgeFilesLines
* Finish instruction renaming (#1792)Heejin Ahn2021-12-201-31/+31
| | | | | | | | | | | | | 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.
* Support for import/export info in dylink section (#1741)Sam Clegg2021-10-191-0/+2
|
* Support new dylink custom section format (#1707)Sam Clegg2021-09-101-0/+4
| | | | | | | | 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
* [EH] Replace event with tag (#1678)Heejin Ahn2021-06-221-1/+1
| | | | | | | | | | | 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
* Update rethrow depth handling and catch_all opcode (#1608)Asumu Takikawa2021-02-181-1/+1
| | | | | | | | | | | | | 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).
* Update exception handling support to current proposal (#1596)Asumu Takikawa2021-02-101-0/+4
| | | | | | | | | | 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.
* Fix assert when function has struct type (#1498)Ben Smith2020-07-251-0/+2
| | | | | | | 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.
* Remove support for python2 (#1321)Sam Clegg2020-01-311-2/+1
|
* Error on memory.init|data.drop without DataCount (#1297)Ben Smith2020-01-101-0/+9
| | | | | | 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.
* Switch python indentation from 2-space to 4-space (#1145)Sam Clegg2019-08-151-154/+154
| | | | | | | | 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.
* Run flake8 on the whole repository (#1144)Guanzhong Chen2019-08-151-3/+3
|
* Add support for comdat groups in the linking section (#1087)Sam Clegg2019-06-041-0/+1
|
* Add `Event` known section; remove `exception` (#1012)Ben Smith2019-02-111-0/+1
| | | | | | | 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.
* Implement parsing and writing of DataCount section (#998)Ben Smith2019-01-231-0/+1
|
* Add more tests for tail_call feature (#931)Ben Smith2018-10-161-0/+2
| | | | | | | | | | | | | | * 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.
* Require reserved instruction bytes to be one byte (#922)Ben Smith2018-10-051-2/+2
| | | | | 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.
* Remove old sub-sections types from linking section (#840)Sam Clegg2018-05-171-2/+0
|
* Read and write module names in the names section (#831)Ben Smith2018-05-011-0/+1
|
* Don't allow the `v128` type without the simd flag (#824)Ben Smith2018-04-041-0/+1
| | | See issue #823.
* Add support for new symbol table format (#769)Sam Clegg2018-03-051-1/+1
|
* Replace `run-gen-wasm*.py` with `RUN` commands (#738)Ben Smith2018-01-261-2/+2
| | | | | 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.
* Use `section` in gen-wasm tests for subsections (#718)Ben Smith2018-01-171-0/+11
| | | This is easier to read and handles the byte length automatically.
* Error out of parse errors in gen-wasm.py (#505)Sam Clegg2017-06-181-1/+1
| | | | 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 (#310)Derek Schuff2017-02-241-1/+1
| | | | | | | | | | | | * 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 (#276)Sam Clegg2017-01-181-227/+260
| | | | | | | | | | | | | | * 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.
* Parse arbitrary user sections (#220)Sam Clegg2016-11-181-2/+2
| | | | | | | Handle user sections interspersed with other section types and add tests for these. Switch from calling these sections "Unknown" to "User".
* Fix types for binary 0xdBen Smith2016-10-261-8/+8
| | | | | | | * 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
* Remap the operator encoding for binary 0xdBen Smith2016-10-261-171/+172
|
* append END opcode at end of functionBen Smith2016-09-301-0/+1
| | | | This fixes #132.
* fix binary tests for binary_0xcBen Smith2016-09-291-3/+34
|
* WIP on tables + memoriesBen Smith2016-09-291-0/+1
|
* fix binary/* testsBen Smith2016-09-291-3/+5
|
* python3 supportBen Smith2016-09-011-5/+5
|
* fix binary reader bug popping past a labelBen Smith2016-05-061-1/+1
| | | | Also add test, and make the gen-wasm.py line comment into ";;"
* put ply output files in out/ directoryBen Smith2016-05-031-1/+3
|
* more binary reader testsBen Smith2016-04-301-2/+6
| | | | Also check for WASM_MAX_PAGES in wasm-ast-checker.
* add {run-,}gen-wasm.py; used to generate .wasmBen Smith2016-04-281-20/+19
| | | | These will be useful for testing the binary reader.
* add {run-,}gen-wasm.py; used to generate .wasmBen Smith2016-04-271-0/+461
These will be useful for testing the binary reader.