| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
s2wasm is no longer used my emscripten and as far as I know now
as no other users.
|
|
|
|
|
|
|
|
|
|
| |
Remove executable bit and #! from scripts that don't have
entry point.
Add missing licence test.
Move arg parsing into a function.
Remove legacy --only_prepare (with underscrore) argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Failing test cases often start out with:
```
incorrect output, diff:
--- expected
+++ actual
```
which makes it difficult to figure out where the expected output might
live. That information can be derived from examining the tests, of
course, but it'd be much nicer if it were provided in the diff to see
straightaway.
We do this by introducing a new check, one which takes a filename of
expected output, which then enables us to display the failing file,
e.g.:
```
incorrect output, diff:
--- /home/froydnj/src/binaryen.git/test/passes/code-folding.txt
+++ actual
```
which is arguably nicer. Having this new check also enables reducing
some boilerplate `open(...).read()` calls in various places.
There are still a few places using `fail_if_not_identical`, usually
because `.strip()` is used on the expected output.
|
|
|
| |
This adds necessary command line options for addFunction support, and generates required jsCall imports and generates jsCall thunk functions.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Add --trap-mode=allow/clamp/js argument to asm2wasm and s2wasm
* Update asm2wasm and auto_update_tests scripts to use --trap-mode
* Throw std::invalid_argument instead of adding a new Invalid TrapMode type
* Remove legacy asm2wasm trap mode arguments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Extract Asm2WasmBuilder::TrapMode to shared FloatTrapMode
* Extract makeTrappingI32Binary
* Extract makeTrappingI64Binary
* Extract asm2wasm test script into scripts/test/asm2wasm.py
This matches s2wasm.py, and makes iterating on asm2wasm slightly faster.
* Simplify callsites with an arg struct
* Combine func adding across i32 and i64
* Support f32-to-int in asm2wasm
* Add BinaryenTrapMode pass, run pass from s2wasm
* BinaryenTrapMode pass takes trap context as a parameter
* Pass fully supports non-trapping binary ops
* Defer adding functions until after iteration (hackily)
* Update asm2wasm to work with deferred function adding, rebuild tests
* Extract makeTrappingFloatToInt32
* Extract makeTrappingFloatToInt64
* Add unary conversions to trap pass
* Add functions in the pass itself
* Set s2wasm trap mode with command-line arguments
* Print BINARYEN_PASS_DEBUG state when testing
* Get asm2wasm using the BinaryenTrapMode pass instead of handling it inline
* Also handle f32 to int in asm2wasm
* Make BinaryenTrapMode only need a FloatTrapMode from the caller
* Just pass the current binary Expression directly
* Combine makeTrappingI32Binary with makeTrappingI64Binary
* Pass Unary expr to makeTrappingFloatToInt32
* Unify makeTrappingFloatToInt32 & 64
* Move makeTrapping* functions inside BinaryenTrapMode, make addedFunctions non-static
* Remove FloatTrapContext
* Minor cleanups
* Extract some smaller subfunctions
* Emit name switch/casing, rename is32Bit to isI64 for consistency
* Rename BinaryenTrapMode to FloatTrap, make trap mode a nested enum
* Add some comments explaining why FloatTrap is non-parallel
* Rename addedFunctions to generatedFunctions for precision
* Rename move and split float-clamp.h to passes/FloatTrap.(h|cpp)
* Use builder instead of allocator
* Instantiate trap handling passes via the pass manager
* Move passes/FloatTrap.h to ast/trapping.h
* Add helper function to add trap-handling passes
* Add trap mode pass tests
* Rename FloatTrap.cpp to TrapMode.cpp
* Add s2wasm trap mode tests. Force float->int conversion to be signed
* Add trapping_sint_div_s test to unit.asm.js
* Fix flake8 issues with test scripts
* Update pass description comment
* Extract building functions methods
* Make generate functions into top-level functions
* Add GeneratedTrappingFunctions class to manage function/import additions
* Move ensure/makeTrapping functions outside class scope
* Use GeneratedTrappingFunctions to add immediately in asm2wasm mode
* Remove trapping_sint_div_s test
We only added it to test that trapping divisions would get
constant-folded at the correct time. Now that we're not changing the
timing of trapping modes, the test is unneeded (and problematic).
* Review feedback, add validator/*.wasm to .gitignore
* Add support for unsigned float-to-int conversion
* Use opcode directly instead of bools
* Update s2wasm clamp test for unsigned ftoi
|
|
|
|
|
| |
Begin to implement wasm threading proposal in https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md
This PR just has shared memory attribute with wast and binary support.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Generate stackSave function in s2wasm
* Generate stackAlloc in s2wasm
* Generate stackRestore in s2wasm
* Update dot_s tests for runtime functions
* Add s2wasm check for exporting runtime functions
* Fix flake8 for s2wasm.py
* Rename wasmBuilder to builder
|
| |
|
|
|
|
|
|
| |
This option allows to import the linear memory from JS code instead of exporting it.
--emscripten-glue does this too but often the emscripten glue isn't needed, so this option only affects the memory.
All the code necessary for importing the memory basically already exists, so nothing except for the command line option itself had to be added.
|
|
* 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
|