summaryrefslogtreecommitdiff
path: root/check.py
Commit message (Collapse)AuthorAgeFilesLines
...
* be more careful when deleting files when testing binaryen methods - the ↵Alon Zakai2017-05-241-5/+5
| | | | files may not exist, and it is not an error if they do not, we just want them to not be there (#1024)
* afl-fuzz bug fixes (#1018)Alon Zakai2017-05-201-1/+15
| | | | | | | | * values cannot flow through an if without an else, they never return a value * check pass tests in pass-debug mode too * add missing finalization in binary reading
* Address review feedback for #1014 (#1016)Alon Zakai2017-05-181-0/+3
| | | | | | * address review feedback for #1014
* Validate finalization (#1014)Alon Zakai2017-05-181-9/+28
| | | | | | | * validate that types are properly finalized, when in pass-debug mode (BINARYEN_PASS_DEBUG env var): check after each pass is run that the type of each node is equal to the proper type (when finalizing it, i.e., fully recomputing the type). * fix many fuzz bugs found by that. * in particular, fix dce bugs with type changes not being fully updated during code removal. add a new TypeUpdater helper class that lets a pass update types efficiently, by the helper tracking deps between blocks and branches etc., and updating/propagating type changes only as necessary.
* Unreachable typing fixes (#1004)Alon Zakai2017-05-091-3/+4
| | | | | | | | | | | | * fix type of drop, set_local, set_global, load, etc: when operand is unreachable, so is the node itself * support binary tests properly in test/passes * fix unreachable typing of blocks with no name and an unreachable child * fix continue emitting in asm2wasm * properly handle emitting of unreachable load
* --no-js-ffi opt to disable JS FFI mangling. (#984)Joel Martin2017-05-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Always use scripts.test.shared for bin paths. Update scripts/test/shared.py to add WASM_MERGE relative to build directory. Update auto_update_tests.py to use scripts.test.shared variables for all bin paths. Update check.py to use scripts.test.shared for wasm-merge path (this was missing). This allows check.py and auto_update_tests.py to be run from the source directory using built binaries in a different location. * --no-legalize-javascript-ffi disables JS FFI mangling. For JS/Web platform, calls to JS imports are wrapped to convert i64 to i32 and f32 to f64. Likewise calls from JS into exports do the inverse wrapping. This change provides an option to disable that wrapping and use the original types for the call. Includes tests test/noffi_f32.asm.js and test/noffi_i64.asm.js to make sure neither f32->f64 nor i64->i32 type mangling is happening when --no-legalize-javascript-ffi is specified. To fully disable JS FFI mangling when using emscripten, the fastcomp FFI mangling must also be disabled using the -emscripten-legalize-javascript-ffi=0 flag.
* ctor evaller (#982)Alon Zakai2017-04-281-0/+14
| | | | | Add wasm-ctor-eval, which evaluates functions at compile time - typically static constructor functions - and applies their effects into memory, saving work at startup. If we encounter something we can't evaluate at compile time in our interpreter, stop there. This is similar to ctor_evaller.py in emscripten (which was for asm.js).
* test interpreter on trap mode = js, as we try values that can trap. we ↵Alon Zakai (kripken)2017-04-181-0/+1
| | | | recently changed the default trap mode in emscripten, which makes this change necessary
* wasm-merge tool (#919)Alon Zakai2017-04-171-0/+22
| | | | wasm-merge tool: combines two wasm files into a larger one, handling collisions, and aware of the dynamic linking conventions. it does not do full static linking, but may eventually.
* New binaryen.js (#922)Alon Zakai2017-03-241-3/+3
| | | New binaryen.js implementation, based on the C API underneath and with a JS-friendly API on top. See docs under docs/ for API details.
* Use 3 modes for potentially trapping ops in asm2wasm (#929)Alon Zakai2017-03-071-2/+5
| | | * use 3 modes for potentially trapping ops in asm2wasm: allow (just emit a potentially trapping op), js (do exactly what js does, even if it takes a slow ffi to do it), and clamp (avoid the trap by clamping as necessary)
* Fix emitting of unreachable block/if/loop (#911)Alon Zakai2017-02-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | * an unreachable block is one with an unreachable child, plus no breaks * document new difference between binaryen IR and wasm * fix relooper missing finalize * add a bunch of tests * don't assume that test/*.wast files print to themselves exactly; print to from.wast. this allows wast tests with comments in them * emit unreachable blocks as (block .. unreachable) unreachable * if without else and unreachable ifTrue is still not unreachable, it should be none * update wasm.js * cleanups * empty blocks have none type
* asm2wasm debuginfo (#895)Alon Zakai2017-02-071-0/+2
| | | | | | | | | | | | * parse file/line comments in asm.js into debug intrinsics * convert debug intrinsics into annotations, and print them * ignore --debuginfo if not emitting text, as wasm binaries don't support that yet * emit full debug info when -g and emitting text; when -g and emitting binary, all we can do is the Names section * update wasm.js
* Improve handling of implicit traps (#898)Alon Zakai2017-02-061-1/+1
| | | | | | | | * add --ignore-implicit-traps option, and by default do not ignore them, to properly preserve semantics * implicit traps can be reordered, but are side effects and should not be removed * add testing for --ignore-implicit-traps
* Read/Write Abstraction (#889)Alon Zakai2017-01-261-5/+25
| | | | | * Added ModuleReader/Writer classes that support text and binary I/O * Use them in wasm-opt and asm2wasm
* Handle stacky code (#868)Alon Zakai2017-01-041-1/+15
| | | | * handle stacky code in binaries, using a block+local
* Refactor check.py so that groups of tests can be split into separate … (#849)jgravelle-google2016-12-061-345/+19
| | | | | | | | | | | | | | * Refactor check.py so that groups of tests can be split into separate files - Move helper util functions into test/shared.py - Move scripts/support.py to test/support.py - Split s2wasm tests into its own file * Fix flake8 warnings for shared.py and s2wasm.py * Move test scripts from test/ to scripts/test/ * Replace 'from shared import *' with explicit imports
* add a --memory-base options to asm2wasm, to fix the memory base instead of ↵Alon Zakai2016-10-311-0/+2
| | | | depending on an import
* Binary 0xd changes (#803)Derek Schuff2016-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | * Renumber opcodes for 0xd * Unified type encoding * Add reserved flags fields to host instructions and call_indirect * Rename flags->reserved * Fix line numbers in wast parser Also don't throw if the memory is defined in the same Element as the export of memory (the validity is checked later anyway). * Skip spec binary.wast The spec testsuite is still on 0xc, so 0xd doesn't match. In order to update to 0xd we need to implement some additional functionality for the import test, namely (register)
* support pass test files with -O plus a level, like -O1, -Os, etc.Alon Zakai2016-10-211-1/+1
|
* Add -O0,-O1,etc. options (#790)Alon Zakai2016-10-191-1/+4
| | | | And use them in wasm-opt and asm2wasm consistently and uniformly.
* Add support for running tests with valgrind. (#785)juj2016-10-171-34/+53
|
* Fix some relative paths to absolute to not depend on a fixed CWD. (#781)juj2016-10-171-6/+6
|
* Fix check.py to run on Windows and improve it to be configurable to be ↵juj2016-10-141-196/+253
| | | | | executed in different environments. (#771) Relates to #762.
* update spec tests, now using binary-0xc branch as our stack test refactoring ↵Alon Zakai2016-10-121-1/+1
| | | | landed in upstream (#754)
* Binary 0xc: Remove arity on return instruction (#740)Derek Schuff2016-10-041-0/+2
| | | | Also skip binary roundtrip on stacky spec tests
* More wasm-only opts (#727)Alon Zakai2016-10-021-1/+1
| | | | | | * wasm-only loads and stores * wasm-only 32-bit bitcasts
* asm2wasm i64 support (#723)Alon Zakai2016-09-301-0/+2
| | | | | | | | | | | | * support i64 intrinsics from fastcomp, adding --wasm-only flag * refactor callImport logic in asm2wasm to avoid recomputing wasm types again * legalize illegal i64 params in exports and imports * do safe i64 binary ops depending on precision * fix addVar, only assert on names if we are using a name
* Update waterfall to 11453 and re-enable torture tests (#721)Derek Schuff2016-09-291-2/+6
| | | | | | | | Torture tests from the clang were disabled with the first 0xc udpate. This PR updates the tests to a new waterfall build and turns them on (also updating the known failures for 0xc). It also updates the download URL since mac and windows bots have been added to the waterfall (they are not up yet and support in this script is not tested yet).
* Make wasm-as emit the names section/debug info only with -g (#705)Alon Zakai2016-09-261-4/+6
|
* update spec tests and check.py's handling of themAlon Zakai2016-09-211-8/+8
|
* Update s2wasm for 0xc changes (#698)Derek Schuff2016-09-151-76/+74
| | | | | | | | | | | Several updates for s2wasm and its tests: Add explicit drops where they are emitted by LLVM already Convert loops (which are still modeled in the old way by LLVM) to wrap them in an explicit block (for the exit label). This also allows simplifying the loop creation (no need to post-process the implicit block which is the loop's body). After the engines update to 0xc we should update LLVM to model loops in the 0xc way, but for now it remains compatible with 0xb and 0xc. Fix the order of the calls to setTee() when creating tee_locals Add an explicit drop when creating the _start entry function wrapper if needed Update dot_s and llvm_autogenerated tests to remove store-results optimization (and few other minor updates) Fix the test auto-updater to fail if subprocesses fail There still seems to be a validation failure when building libc (I think it's from the stricter drop rules, but it may be in the source rather than the compiler), but this at least makes Binaryen's tests pa
* Add flag to s2wasm to export __growWasmMemory function (#696)jgravelle-google2016-09-091-0/+6
| | | | | | | | | | | | | | | | | | | | | * Add a flag to s2wasm to export grow_memory Binaryen's wasm.js-post.js calls back in to wasm in order to grow the linear memory, via a function that asm2wasm exports called __growWasmMemory. This changes exposes that method through s2wasm when invoked with a flag. * Move AsmConstWalker from wasm-linker to wasm-emscripten * Add test for memory growth in s2wasm * Move makeDynCallThunks into wasm-emscripten module * Move mutation in getTableSegment into a separate method * Move emscripten metadata generation into wasm-emscripten Also make AsmConstWalker internal to the wasm-emscripten module, as it's only used for the metadata pass.
* re-enable spec testsAlon Zakai2016-09-071-2/+0
|
* add asm2wasm option to import a mem init fileAlon Zakai2016-09-071-7/+12
| | | | | | | | apply memory segments only if there isn't a memory initializer (which we need for asmjs and asm2wasm modes) use wasm-opt to check recreated wasts for validity, as wasm-shell would try to execute them add testing for combined modes like asmjs,interpret-binary
* FIXME disable spec tests on the bots for nowAlon Zakai2016-09-071-0/+2
|
* use globals in asm2wasmAlon Zakai2016-09-071-1/+1
|
* update check.py skip lists for spec testsAlon Zakai2016-09-071-1/+1
|
* WIP get spec tests to pass by ignoring stacky stuffAlon Zakai2016-09-071-2/+22
|
* TEMP no wasm backend tests for nowAlon Zakai2016-09-071-1/+1
|
* TEMP no torture tests for nowAlon Zakai2016-09-071-1/+1
|
* add drop and tee expressionsAlon Zakai2016-09-071-2/+1
|
* remove wasm2asm tests, temporarily disable .s testsAlon Zakai2016-09-071-104/+70
|
* support expressions in segment offsetsAlon Zakai2016-08-121-1/+1
|
* fix dce bug in non-parallel mode, which happens in debug mode, and add debug ↵Alon Zakai2016-07-161-0/+3
| | | | testing
* use with-openAlon Zakai2016-07-131-5/+5
|
* separate wasm-opt out from wasm-shell: opt optimizes, shell runs wast shell ↵Alon Zakai2016-07-131-66/+20
| | | | tests
* rename binaryen-shell to wasm-shellAlon Zakai2016-07-131-20/+20
|
* relooper tracing + fixesAlon Zakai2016-07-121-1/+1
|
* add a tracing option to the c api, which logs out a runnable program from c ↵Alon Zakai2016-07-121-9/+25
| | | | api calls