summaryrefslogtreecommitdiff
path: root/src/emscripten-optimizer
Commit message (Collapse)AuthorAgeFilesLines
* i64 to i32 lowering for wasm2asm (#1134)Thomas Lively2017-09-011-3/+5
|
* wasm2asm test generation (#1124)Thomas Lively2017-08-163-61/+43
| | | | | | | | | | | | | | | | | * Translate assert_return invokes to asm * Translate assert_trap tests to JS * Enable wasm2asm tests * Fix wasm2asm translation of store * Update ubuntu nodejs in Travis * Free JSPrinter buffer * Use unique_ptr for Functions to prevent leaks * Add tests for assert translation
* wasm2asm i32 arithmetic support (#1120)Thomas Lively2017-08-072-0/+2
| | | * Rotations, popcnt, ctz, etc
* Get wasm2asm building again (#1107)Thomas Lively2017-08-021-0/+651
| | | | | | | | | | | | | | | | | | * Get wasm2asm building again Updates CMakeLists.txt to have wasm2asm built by default, updates wasm2asm.h to account for recent interface changes, and restores JSPrinter functionality. * Implement splice for array values * Clean up wasm2asm testing * Print semicolons after statements in blocks * Cleanups and semicolons for condition arms * Prettify semicolon emission
* Parallelize istring creation (#1008)Alon Zakai2017-05-161-14/+29
| | | | | | | | * parallelize istring creation, by having a thread-local set and a global set guarded by a mutex. each time a new string shows up in a thread, it will be added to that thread's set, after accessing the global set through the lock first, which means we lock at most once per new string per thread * don't leak strings in istring store * since we now create names in a parallel thread-safe manner, we don't need to pre-create names in RelooperJumpThreading
* Fix build with gcc 7 (#957)Morris Hafner2017-03-291-2/+1
| | | | 1. Add a missing <functional> include 2. Put the // fallthrough comment after the closing bracket so the compiler does not emit a implicit fallthrough warning.
* refactor asm.js ast to use an AssignName node, for the common case of ↵Alon Zakai (kripken)2017-01-312-9/+48
| | | | assigning to a name and not an arbitrary ast node
* refactor asm.js ast to not use STAT nodes - we don't need to print the ↵Alon Zakai (kripken)2017-01-315-643/+2
| | | | asm.js anyhow, so knowing where ;s are is unnecessary bloat
* refactor asm.js ast to use an Assign nodeAlon Zakai (kripken)2017-01-314-119/+149
|
* use MixedArena in asm.js astAlon Zakai (kripken)2017-01-312-78/+45
|
* refactor asm.js ast to use a string node directly instead of [NAME, string]Alon Zakai (kripken)2017-01-315-35/+33
|
* refactor asm.js ast to use a number node directly instead of [NUM, number]Alon Zakai (kripken)2017-01-305-20/+30
|
* fix large f32 consts, fixes #817 (#820)Alon Zakai2016-11-011-2/+2
|
* Fix some C6246: "Local declaration of 'i' hides declaration of the same name ↵juj2016-10-201-1/+1
| | | | in outer scope." warnings. (#795)
* asm2wasm i64 support (#723)Alon Zakai2016-09-304-8/+20
| | | | | | | | | | | | * 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
* Use more static libraries in the CMake build (#451)Derek Schuff2016-05-071-0/+6
| | | | | | | | | | | * Factor passes and emscripten-optimizer into static libs This removes the redundancies from the source sets in the main CMakeLists.txt. * Make passes an object lib * Use static libs with --whole-archive because Travis has old cmake
* do not leak in IStringSetAlon Zakai2016-04-272-14/+16
|
* clean up in emscripten-optimizer arenasAlon Zakai2016-04-272-0/+10
|
* Fixes typo in hex number parsing in asm2wasm. (#362)Yury Delendik2016-04-181-1/+1
| | | Fixes #352
* Function parallelism (#343)Alon Zakai2016-04-151-10/+14
| | | | * allow traversals to mark themselves as function-parallel, in which case we run them using a thread pool. also mark some thread-safety risks (interned strings, arena allocators) with assertions they modify only on the main thread
* AST Builder class, and use it to optimzie umoddi4 in asm2wasmAlon Zakai2016-04-082-0/+4
|
* optimize llvm.cttz.i32 into i32.ctzAlon Zakai2016-04-082-0/+2
|
* use strncpy #283Alon Zakai2016-03-282-6/+7
|
* Don't reinsert in set when interning strings.Michael Bebenita2016-03-151-1/+1
|
* Support startJF Bastien2016-02-051-2/+2
| | | | | | | | | | | | | | As spec'd in: https://github.com/WebAssembly/design/pull/495 And discussed in: https://github.com/WebAssembly/spec/issues/231 This will make it simpler and more uniform to add a start entry point. s2wasm is the right place to add start because it'll eventually need to do other basic setup, e.g. put code in start to setup the stack, as dschuff is doing in: https://github.com/WebAssembly/binaryen/pull/179 Or rather, the linker is the right place and s2wasm happens to act as our linker right now.
* Add Travis builds with sanitizersJF Bastien2016-01-104-44/+28
| | | | | | | | | | | | | | | | This triggers 5 independent build / test runs: - clang, no sanitizer; - clang, UB sanitizer; - clang, address sanitizer (disabled for now); - clang, thread sanitizer (disabled for now); - GCC. Enabling UBSan led to these changes: - Fix a bunch of undefined behavior throughout the code base. - Fix some tests that relied on that undefined behavior. - Make some of the tests easier to debug by printing their command line. - Add ubsan blacklist to work around libstdc++ bug. - Example testcase also needs sanitizer because libsupport.a uses it.
* parse for loops in asm2wasm #60Alon Zakai2016-01-042-1/+34
|
* Add a support static libraryJF Bastien2015-12-241-48/+0
| | | | For now I've only moved the color check (and made it check the environment only once, note function local static initialization is thread-safe in C++11). This will make the builds slightly faster and allow us to move platform-specific code out of header files (reducing the amount of #include gunk). I'll eventually move other parts of the code to support, especially the command-line parsing (once it's reusable).
* Change colors.h to isolate and minimize code that isn't compiled on all ↵Andrew Scheidecker2015-12-231-65/+19
| | | | platforms
* Fix a few Windows/VS2013 compile errorsAndrew Scheidecker2015-12-231-0/+14
|
* Fix / uniformize include guardsJF Bastien2015-12-226-12/+22
|
* Fix warnings found by GCCJF Bastien2015-12-221-16/+16
| | | | | | My previous patch addressed all LLVM warnings, this one addresses all the GCC ones as well (mostly signed / unsigned mix). The patch also turns on -Wall -Werror.
* Fix uninitialize variable warningJF Bastien2015-12-221-1/+3
|
* Fix the license headersJF Bastien2015-12-219-8/+139
| | | | This applies Apache 2.0 properly (as far as our lawyers have told me). We can do this early since all of the code was written by Alon Zakai.
* don't quote keys in object printing when not necessaryAlon Zakai2015-12-071-3/+14
|
* emit heap views in wasm2asmAlon Zakai2015-12-061-0/+7
|
* if is not statableAlon Zakai2015-12-061-1/+1
|
* add makeSigning methodAlon Zakai2015-12-052-0/+7
|
* wasm2asm fixesAlon Zakai2015-12-041-0/+6
|
* fixes for wasm2asmAlon Zakai2015-12-031-1/+1
|
* refactoring, and wasm2asm arags and localsAlon Zakai2015-12-013-6/+116
|
* finish first pass on wasm2asmAlon Zakai2015-12-011-0/+6
|
* wasm2asm progressAlon Zakai2015-12-011-0/+6
|
* be very careful when converting doubles to ints in asm2wasmAlon Zakai2015-11-282-1/+7
|
* wasm2asm progressAlon Zakai2015-11-271-0/+8
|
* fix makeCallAlon Zakai2015-11-271-3/+3
|
* wasm2asm progressAlon Zakai2015-11-261-0/+7
|
* wasm2asm progressAlon Zakai2015-11-261-0/+10
|
* wasm2asm progressAlon Zakai2015-11-261-1/+1
|
* wasm2asm progressAlon Zakai2015-11-241-0/+7
|