summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Require unique_ptr to Module::addFunctionType() (#1672)Paweł Bylica2019-01-109-26/+23
| | | | | This fixes the memory leak in WasmBinaryBuilder::readSignatures() caused probably the exception thrown there before the FunctionType object is safe. This also makes it clear that the Module becomes the owner of the FunctionType objects.
* Merge pull request #1823 from juj/fix_vs2017_15.8_buildjuj2019-01-101-0/+3
|\ | | | | Fix Visual Studio 2017 15.8 build
| * Fix Visual Studio 2017 15.8 buildJukka Jylänki2018-12-131-0/+3
| |
* | remove wasm.js reference from CMakeLists.txt (#1859)Alon Zakai2019-01-091-5/+2
| |
* | Remove wasm.js references (#1860)Sergey Rubanov2019-01-093-11/+4
| | | | | | following #1859
* | Aligned allocation fixes. Fixes #1845 (#1846)Alon Zakai2019-01-094-9/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The error in #1845 shows: /<<PKGBUILDDIR>>/src/mixed_arena.h: In member function 'void* MixedArena::allocSpace(size_t, size_t)': /<<PKGBUILDDIR>>/src/mixed_arena.h:125:43: error: 'new' of type 'MixedArena::Chunk' {aka 'std::aligned_storage<32768, 16>::type'} with extended alignment 16 [-Werror=aligned-new=] chunks.push_back(new Chunk[numChunks]); ^ /<<PKGBUILDDIR>>/src/mixed_arena.h:125:43: note: uses 'void* operator new [](std::size_t)', which does not have an alignment parameter /<<PKGBUILDDIR>>/src/mixed_arena.h:125:43: note: use '-faligned-new' to enable C++17 over-aligned new support It turns out I had misread the aligned_storage docs, and they don't actually do what we need, which is a convenient cross-platform way to do aligned allocation, since new itself doesn't support that. Sadly it seems there is no cross-platform way to do it right now, so I added a header in support which abstracts over the windows and everything-else ways. Also add some ctest testing, which runs on windows, so we get basic windows coverage in our CI.
* | Remove interp and fix tests (#1858)Alon Zakai2019-01-087-752/+15
| | | | | | Updates tests to the latest notation changes, and also remove wasm.js (see kripken/emscripten#7831 ) as we'd need to either rebuild it or update it for the new notation as well, and it's not used at this point.
* | determinism fix for code-folding (#1852)Alon Zakai2019-01-084-10/+109
| | | | | | Don't depend on the hash values for ordering - use a fixed order based on order of appearance.
* | Massive renaming (#1855)Thomas Lively2019-01-07647-109238/+109252
| | | | | | | | | | | | Automated renaming according to https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
* | Fix SIMD test placement (#1853)Thomas Lively2019-01-061-2/+2
| |
* | wasm-opt fuzz script improvements (#1851)Alon Zakai2019-01-031-19/+43
| | | | | | | | | | | | | | * Allow fuzzing from other directories, by looking for wasm-opt relative to the script itself. * Ignore some VM debug assertions which are fuzz bugs that have already been filed. * Pick the random seed based on the process ID too, for better parallel fuzzing. * Remove commandline parsing stuff in fuzz_opt.py, which won't work with the other commandline parsing in test.shared - but we don't need it anyhow.
* | determinism fix for SSAify::computeGetsAndPhis (#1850)Alon Zakai2019-01-031-3/+3
| |
* | Don't emit simd in fuzzer unless requested (some code paths we missed) (#1849)Alon Zakai2019-01-021-17/+28
| |
* | Determinism fix for SSA pass (#1841)Alon Zakai2019-01-024-27/+32
| | | | | | We iterated over a set. Instead, iterate over the relevant items in their order in the IR.
* | Refactor Features code (#1848)Alon Zakai2019-01-023-4/+183
| | | | | | Add features.h which centralizes all the feature detection code. (I'll need this in another place than the validator which is where it was til now.)
* | Minor code style cleanups (#1844)Alon Zakai2019-01-022-26/+25
| |
* | Fix fuzzing JS glue code (#1843)Alon Zakai2018-12-276-12/+115
| | | | | | | | | | | | | | | | | | After we added logging to the fuzzer, we forgot to add to the JS glue code the necessary imports so it can be run there too. Also adds legalization for the JS glue code imports and exports. Also adds a missing validator check on imports having a function type (the fuzzing code was missing one). Fixes #1842
* | LocalCSE: Consider pass options, both size and cost (#1840)Alon Zakai2018-12-218-2/+85
| | | | | | With this we can optimize redundant global accesses fairly well (at least locally; licm also works), see #1831
* | Do not precompute v128 expressions (#1839)Thomas Lively2018-12-193-0/+15
| | | | | | | | | | | | | | Without this change, sequences like `i32.const 0, i32x4.splat` will get precomputed to v128.const ops, which are much larger and also not implemented in V8 yet. Until we have SIMD-aware optimization passes or at least engine support for v128.const, do not perform such transformations.
* | Use interned Names in NoExitRuntime (#1837)Alon Zakai2018-12-191-8/+8
| |
* | remove-unused-brs: do not flow a value through a block if the block does not ↵Alon Zakai2018-12-183-14/+81
| | | | | | | | actually flow a value. fixes #1833 (#1835)
* | Rename `idx` to `index` in SIMD code for consistency (#1836)Thomas Lively2018-12-1818-161/+161
| |
* | Do not attempt to optimize v128s yet (#1834)Thomas Lively2018-12-181-12/+15
| | | | | | Until the `Abstract` interface gains a notion of SIMD lanes, these optimizations will crash on v128 types.
* | Partial legalization (#1824) review followup (#1832)Alon Zakai2018-12-174-6/+8
| |
* | Fix i64 select lowering. (#1773)Yury Delendik2018-12-175-17/+116
| |
* | Consistent spacing around the namespace keyword (#1829)Alon Zakai2018-12-153-0/+6
| |
* | Fuzzing v128 and associated bug fixes (#1827)Thomas Lively2018-12-1412-895/+748
| | | | | | | | * Fuzzing v128 and associated bug fixes
* | wasm-emscripten-finalize: Delay function creation until after module walk ↵Sam Clegg2018-12-141-2/+11
| | | | | | | | | | | | | | (#1828) This fixes a crash where startSave/stackRestore could be created while iterating through `module.functions`.
* | Minimal JS legalization (#1824)Alon Zakai2018-12-149-52/+175
| | | | | | | | | | Even when we don't want to fully legalize code for JS, we should still legalize things that only JS cares about. In particular, dynCall_* methods are used from JS to call into the wasm table, and if they exist they are only for JS, so we should only legalize them. The use case motivating this is that in dynamic linking you may want to disable legalization, so that wasm=>wasm module calls are fast even with i64s, but you do still need dynCalls to be legalized even in that case, otherwise an invoke with an i64 parameter would fail.
* | wasm-emscripten-finalize: Add tableSize to metadata (#1826)Sam Clegg2018-12-1410-0/+10
| | | | | | | | This allows emscripten to generate table of the correct size. Right now is simply defaults to creating a table to size 1024.
* | wasm-emscripten-finalize: Don't add a table max if none is present in the ↵Sam Clegg2018-12-141-3/+6
| | | | | | | | | | | | input (#1825)
* | SIMD (#1820)Thomas Lively2018-12-1350-2378/+19516
| | | | | | | | | | | | | | | | | | Implement and test the following functionality for SIMD. - Parsing and printing - Assembling and disassembling - Interpretation - C API - JS API
* | No exit runtime pass (#1816)Alon Zakai2018-12-1310-5/+116
|/ | | When emscripten knows that the runtime will not be exited, it can tell codegen to not emit atexit() calls (since those callbacks will never be run). This saves both code size and startup time. In asm2wasm the JSBackend does it directly. For the wasm backend, this pass does the same on the output wasm.
* Don't error on too many locals - just oom (#1822)Alon Zakai2018-12-132-8/+0
| | | I think I added this error for fuzzing, but it is harmful as it prevents a module with too many locals from being loaded - if we could load it, we might be able to optimize it to have fewer locals...
* Create API for feature dependent picking in fuzzer (#1821)Thomas Lively2018-12-122-48/+69
|
* Update wrap and demote literal op names (#1817)Thomas Lively2018-12-123-22/+16
| | | | | | * Update literal op names * Remove `demoteToF32` in favor of `demote`
* wasm-emscripten-finalize: import env.STACKTOP, like asm2wasm doesAlon Zakai2018-12-1112-14/+43
|
* wasm-ctor-eval: handle the stack going either up or downAlon Zakai2018-12-114-10/+48
|
* constant refactoring for STACKTOP and STACK_MAXAlon Zakai2018-12-113-8/+12
|
* Use template magic for tracing expressions (#1815)Thomas Lively2018-12-103-105/+122
|
* Remove unused tests from test/dot_s (#1814)Sam Clegg2018-12-0740-3383/+0
| | | | We have a bug open (#1813) to verify that we don't loose coverage but there is no point in keeping these unused files for now.
* Fix comment in src/ir/module-utils.h (#1810)Sam Clegg2018-12-071-2/+4
| | | | | Followup from #1808
* wasm-emscripten-finalize: Fix type in JSON output (#1812)Sam Clegg2018-12-071-1/+1
|
* Wasm2js error handling improvement (#1807)Alon Zakai2018-12-061-22/+24
| | | Move the code around so the assertions are not caught in the big try-catch that reports errors as parsing errors.
* Handle missing function in renameFunctions (#1808)Sam Clegg2018-12-061-2/+6
| | | | | In this case simple update all the uses of the missing function. This fixed the current emscripten failures.
* Add function rename utility (#1805)Alon Zakai2018-12-052-21/+48
| | | And use it in wasm-emscripten
* Revert accidental change to auto_update_tests.py (#1806)Sam Clegg2018-12-051-1/+1
|
* Format metadata json using mutliple lines for readability (#1804)Sam Clegg2018-12-0512-67/+400
|
* Fix initializerFunctions output by wasm-emscripten-finalize (#1803)Sam Clegg2018-12-059-9/+10
| | | I broke this to be alwasy empty in #1795.
* Properly optimize loop values (#1800)Alon Zakai2018-12-0516-5824/+5927
| | | Remove the existing hack, and optimize them just like we do for ifs and blocks. This is now able to handle a few more cases than before.