summaryrefslogtreecommitdiff
path: root/test/update-spec-tests.py
Commit message (Collapse)AuthorAgeFilesLines
* binary/wat: Implement EHv4 (#2470)Soni L.2024-11-201-1/+0
| | | | This pull request implements EHv4. Binary is mostly untested until interp is working.
* update-spec-tests.py: Include wasm2c version of proposals tests (#2085)Sam Clegg2022-12-011-0/+4
|
* Implement Relaxed SIMD proposal (#1994)Marcus Better2022-11-301-0/+1
| | | | | | | | This adds support for the new opcodes from the Relaxed SIMD proposal (https://github.com/WebAssembly/relaxed-simd) behind the "--enable-relaxed-simd" flag. The exception is the f32x4.relaxed_dot_bf16x8_add_f32x4 instruction which is not yet implemented.
* Add tail-call spec tests and fix related parser issue (#2049)Sam Clegg2022-11-081-1/+1
| | | Fixes: #2018
* Mark extended-const as implemented. NFC (#1919)Sam Clegg2022-05-101-1/+0
|
* Initial implementation of extended-const proposal. (#1824)Sam Clegg2022-02-151-1/+3
| | | | | | | | | | The primary changes here are to the interpreter and how it handles initializer expressions. With this change we model these are normal function that we run during module initialization. I imagine we could optimize this further by creating one long function and encoding the `global.set`/`memory.init`/`table.init` into the function itself, but this change seems like a good first step to make the current tests pass.
* Add specification tests for exception handling proposal (#1764)Asumu Takikawa2021-12-061-2/+2
| | | | | | | | This PR imports the spec tests from the Wasm testsuite repo and adds infrastructure to run them correctly. * Adds test expectations for exception handling proposal spec tests. * Adds missing tag signature matching code for import tests. * Adds support for the `assert_exception` command used in new tests. * Fix filename normalization for the spec test runner.
* Add multi-memory feature support (#1751)Yuhan Deng2021-11-301-2/+2
|
* update-spec-tests.py: Process all proposal directories. (#1754)Sam Clegg2021-11-041-8/+29
| | | | | Maintain an explict list of exclusions and process all other directories. This means that we will notice as new proposals get added.
* Re-enable simd in update-spec-tests.py (#1753)Sam Clegg2021-11-041-0/+1
| | | | | This was removed as part of #1712 but I think it still needs to be here until simd is actually merge into the main spec repo and no longer exists as proposal in the testsuite repo.
* Enable reference types by default (#1729)Sam Clegg2021-10-131-1/+0
| | | | | | | | | This features was finished earlier this year: https://github.com/WebAssembly/proposals/blob/master/finished-proposals.md One thing to note is that the version of the spec tests we currently have in third_party/testsuite doesn't have ref types merged yet so this change disables ref types when running some of those tests. This can be removed in a followup when we update the testsuite.
* Enable bulk memory by default (#1728)Sam Clegg2021-10-131-1/+0
| | | | | | | | | | | This features was finished earlier this year: https://github.com/WebAssembly/proposals/blob/master/finished-proposals.md One thing to note is that the version of the spec tests we currently have in third_party/testsuite doesn't have bulk memory merged yet so this change disables bulk memory when running some of those tests. This will be removed in a followup when we update the testsuite. Fixes: #1717
* SIMD is now phase 5, enable it by default (#1712)Ng Zhi An2021-09-201-1/+0
| | | | | * SIMD is now phase 5, enable it by default * Update test flags, rebase test, and docs
* Changes required to make the new Memory64 spec tests run (#1560)Wouter van Oortmerssen2020-10-261-0/+1
| | | | | These uncovered some things the previous tests didn't! Also required the switching of the location of the index as discussed in https://github.com/WebAssembly/memory64/issues/5 Also one small .py change that ensures the new tests have consistent posix paths.
* Update testsuite to 646b43e (#1555)Wouter van Oortmerssen2020-09-301-1/+1
| | | (this is HEAD~1 as of this writing, HEAD containing the Memory64 tests which I want to land separately)
* Update testsuite (for SIMD) (#1373)Ben Smith2020-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of changes necessary to make this work, as well as some bug fixes. The main change is allowing `nan:canonical` and `nan:arithmetic` as a possible value for each lane of a `v128`. This needs to propogate through the parser, IR, the JSON format, and the spec interpreter. This also changes the format of the spec JSON file, where a SIMD value is now stored as a list of values instead of a single u128: ``` {"type": "v128", "lane_type": "i32", "value": ["0", "0", "0", "0"]} ``` Since the lane type can be `i8` and `i16`, these types can now be used in more places (not just the decompiler). They'll be used for the GC proposal too (for packed values), so I've updated them to use the binary value specified for that proposal. Here are the actual SIMD fixes: * SIMD lanes are malformed if they don't match the binary format, but invalid if they are smaller than the lane width. For example, `i8x16.extract_lane_s` is malformed if the lane is >= 256, because the lane is stored as a byte. But it is invalid if the lane is >= 16. * The `i8x16.narrow_i16x8_u`, `i16x8.narrow_i32x4_u` and `i64x2.load_32x2_u` instructions were not handling sign-extension propoerly. TODO: This code is pretty clumsy now; it would be better to have a universal `Value` and `ExpectedValue` that can be used everywhere, so the logic doesn't need to be duplicated.
* Remove support for python2 (#1321)Sam Clegg2020-01-311-2/+1
|
* Run update-spec-tests.py and add resulting missing tests (#1263)Sam Clegg2019-12-121-0/+1
| | | | This found one bug in the parsing of active elem segments with uncref style elements.
* Switch python indentation from 2-space to 4-space (#1145)Sam Clegg2019-08-151-52/+52
| | | | | | | | 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-7/+1
|
* Implement bulk memory in the interpreter (#1074)Ben Smith2019-05-071-0/+1
| | | | | | | | | * Implement bulk memory in interpreter * Read/Write elem_type in element segments * Binary format * Text format (`(elem passive funcref...)`) * Add DataSegment runtime objects * Only initialize active data segments when instantiating
* Run more proposal spec tests (#964)Ben Smith2018-11-301-5/+12
| | | | These tests are already included in third_party/testsuite. The `update-spec-tests.py` script just needs to be updated to include them.
* Fix some multi-value bugs; run spec testsBen Smith2018-09-061-16/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | Running the multi-value spec tests found a few bugs: * DropKeep needs to copy the kept values backward when the regions overlap. * Type names need to be resolved to indexes in block declarations (e.g. `block (type $foo)`) * `if` without an `else` is valid, it just behaves as though the `else` is empty, which will pass the params through as results. * When validating function signatures, we need to also check block declaration signatures. * Split `ResolveFuncType` into two functions: `ResolveFuncTypeWithEmptySignature` and `ResolveImplicitlyDefinedFunctionType`. * When resolving implicitly defined function types, we only create an implicit function type when the type is not inlinable; i.e. only for block/loop/if with 0 or 1 result values and no params. * Change `update-spec-tests` to include the `multi-value` proposal repo from the testsuite.
* [wasm2c] Add spec tests; fix update-spec-tests.py (#891)Ben Smith2018-08-141-13/+20
| | | | `update-spec-tests.py` now will update the tests in the `test/wasm2c/spec` directory.
* Add support for yapf python formatting tool (#276)Sam Clegg2017-01-181-2/+4
| | | | | | | | | | | | | | * 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.
* fix the interp/ tests, move the spec tests outBen Smith2016-09-291-1/+1
| | | | | Mostly just requires proper implementation of drop/tee_local in wasm-binary-reader-interpreter.c and wasm-interpreter.c.
* python3 supportBen Smith2016-09-011-2/+3
|
* update testsuite, handle implicit func types (#96)Ben Smith2016-08-041-0/+68
Change 7c482b1a of the spec repo now requires that implicit function types are created when creating a new func or import, but only when the type is not explicitly specified, and the have not been specified. For example: ``` (func (param i32)) (import "foo" "bar" (result i32) ``` This was previously done in sexpr-wasm when writing the binary, but now these types can be referenced by `call_import`, so it has to be handled earlier. Since all signatures are now defined in the module, I made it so the function signature is shared with the module function types. The tricky part here is when a function type and an explicit signature are both specified: ``` (func (type $t) (param f32) ...) ``` In this case, we need to keep the explicit signature around long enough to be checked against the function type, so it must be owned by the function. The WASM_FUNC_DECLARATION_FLAG_SHARED_SIGNATURE flag specifies this case. To simplify code that uses the AST, I reverted many of the changes introduced in 73e5bc7d. Now the function declaration's signature is always valid to access, and will have been resolved if it was specified with a func type instead of an explicit signature. Some other changes: * There was a bug in the interpreter's `f32.demote/f64` rounding when given a value that is very close to positive or negative F32_MAX * Added `update-spec-tests.py` to more easily update the spec tests in `test/interp/spec/*.txt` from the files in `third_party/testsuite/*.wast`. Previously I would just do it manually.