summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* remove unneeded masks using getMaxBitsAlon Zakai (kripken)2017-02-161-3/+16
|
* tiny refactoring in OptimizeInstructions, for clarityAlon Zakai (kripken)2017-02-161-7/+8
|
* fix fuzz testcase, xor maxBits is the max, not the minAlon Zakai (kripken)2017-02-161-2/+2
|
* handle fallthrough values in load_s/u and sign/zero-extend optimizationAlon Zakai (kripken)2017-02-161-6/+30
|
* handle load in getMaxBitsAlon Zakai (kripken)2017-02-161-0/+2
|
* handle tee_local in getMaxBitsAlon Zakai (kripken)2017-02-161-0/+3
|
* optimize out a sign-ext into a store of the same sizeAlon Zakai (kripken)2017-02-161-0/+6
|
* optimize out add/sub of 0Alon Zakai (kripken)2017-02-161-1/+9
|
* optimize sign-extends to a booleanAlon Zakai (kripken)2017-02-161-0/+4
|
* optimize sign-extends to eqzAlon Zakai (kripken)2017-02-161-0/+7
|
* optimize sign-extends to neAlon Zakai (kripken)2017-02-161-2/+2
|
* Optimize "squared" operations (#905)Alon Zakai2017-02-161-23/+86
| | | | * optimize 'almost' sign extends: when we can remove one entirely, then extra shifts can be left behind. with that in place, we can then optimize 'squared' operations like shl on shl, as doing so does not break our sign extend opts
* optimize linear sums (#904)Alon Zakai2017-02-162-1/+111
|
* Optimize sign-extends (#902)Alon Zakai2017-02-161-18/+139
| | | | | | * optimize sign-extend output * optimize sign-extend input
* update wasm version to 0x01 (#913)Alon Zakai2017-02-161-1/+1
| | | | | | * update wasm version to 0x01, in prep for release, and since browsers are ready to accept it * update wasm.js
* Fix emitting of unreachable block/if/loop (#911)Alon Zakai2017-02-164-10/+69
| | | | | | | | | | | | | | | | | | | | | | * 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
* Optimize precise mode integer ops (#907)Alon Zakai2017-02-162-383/+83
| | | | | | * improve precise integer operations: call into a wasm function to do the possibly-trapping div/rem, which handles the corner cases, instead of an ffi. also fix a bug in the existing parallel 64-bit code for this * remove no longer needed wasm.js-post.js file (it moved into emscripten repo)
* Hide dead code (#909)Loo Rong Jie2017-02-151-0/+8
|
* asm2wasm debuginfo (#895)Alon Zakai2017-02-076-8/+204
| | | | | | | | | | | | * 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-069-60/+121
| | | | | | | | * 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
* Remove unused captures to fix warnings/errors when compiling with Clang (#896)Eric Holk2017-02-033-5/+3
|
* only read first 4 bytes to check if a file is a wasm binary (#894)Alon Zakai2017-02-021-3/+8
|
* Merge pull request #893 from WebAssembly/shrink-asm-parserAlon Zakai2017-02-0110-1088/+521
|\ | | | | Shrink asm.js ast
| * refactor asm.js ast to use an AssignName node, for the common case of ↵Alon Zakai (kripken)2017-01-313-61/+100
| | | | | | | | 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-316-651/+7
| | | | | | | | asm.js anyhow, so knowing where ;s are is unnecessary bloat
| * refactor asm.js ast to use an Assign nodeAlon Zakai (kripken)2017-01-315-180/+216
| |
| * use MixedArena in asm.js astAlon Zakai (kripken)2017-01-315-107/+99
| |
| * refactor asm.js ast to use a string node directly instead of [NAME, string]Alon Zakai (kripken)2017-01-316-108/+107
| |
| * refactor asm.js ast to use a number node directly instead of [NUM, number]Alon Zakai (kripken)2017-01-306-75/+86
| |
* | Make ast_utils into a library (#892)Derek Schuff2017-01-316-651/+717
|/ | | | Split ExpressionAnalyzer and ExpressionManipulator into cpp files, and turn their giant template functions into simple functions which take a callback. More organization, fewer mammoth headers, makes the build a few seconds faster, and the binaries a couple MB smaller.
* Read/Write Abstraction (#889)Alon Zakai2017-01-265-13/+194
| | | | | * Added ModuleReader/Writer classes that support text and binary I/O * Use them in wasm-opt and asm2wasm
* code-pushing fix: we cannot push a set_local with side effects, as it may ↵Alon Zakai2017-01-261-1/+8
| | | | not execute any more (#890)
* Export memalign along with malloc and friends (#888)Derek Schuff2017-01-241-9/+5
| | | Emscripten's mmap2 syscall started using memalign instead of malloc with kripken/emscripten#4874, so we need to export that as well.
* DCE even in -O0 (#884)Alon Zakai2017-01-191-1/+3
|
* handle an unreachable param to an export in asm2wasm, which is ignorable (#885)Alon Zakai2017-01-191-1/+3
|
* asm2wasm: when a switch is too big, create an if-else chain instead (#877)Alon Zakai2017-01-121-52/+112
|
* add a dce at the end of asm2wasm, so it handles code changes from ↵Alon Zakai (kripken)2017-01-121-0/+1
| | | | intermediate optimization passes
* Merge pull request #865 from WebAssembly/fix-abAlon Zakai2017-01-102-7/+30
|\ | | | | Fix AngryBots parsing
| * handle a binary that breaks to returnAlon Zakai (kripken)2017-01-042-6/+28
| |
| * handle a module which has no globals at allAlon Zakai (kripken)2017-01-041-1/+2
| |
* | Merge pull request #863 from WebAssembly/linking-fixAlon Zakai2017-01-052-18/+23
|\ \ | | | | | | Linking cleanups
| * | do not add memoryBase/tableBase if already thereAlon Zakai2016-12-301-4/+4
| | |
| * | memoryBase and tableBase should not be mutable, as we need to use them in ↵Alon Zakai2016-12-301-10/+15
| | | | | | | | | | | | segment/element offsets
| * | emit globals before table and memory, because they may use a global for ↵Alon Zakai2016-12-301-4/+4
| | | | | | | | | | | | their element/segment offsets
* | | Merge pull request #871 from WebAssembly/fix-c-api-unused-memAlon Zakai2017-01-053-4/+7
|\ \ \ | |_|/ |/| | Mark memory as existing when it is created in the C API
| * | mark memory as existing when it is created in the C APIAlon Zakai (kripken)2017-01-041-0/+1
| | |
| * | ensure exports are added deterministically from binariesAlon Zakai (kripken)2017-01-042-4/+6
| |/
* | Handle stacky code (#868)Alon Zakai2017-01-042-22/+49
| | | | | | | | * handle stacky code in binaries, using a block+local
* | Print long string in one call (#864)Loo Rong Jie2017-01-032-23/+23
|/
* Merge pull request #859 from WebAssembly/linkingAlon Zakai2016-12-2715-154/+369
|\ | | | | Dynamic linking