Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use 3 modes for potentially trapping ops in asm2wasm (#929) | Alon Zakai | 2017-03-07 | 2 | -56/+132 |
| | | | * 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) | ||||
* | stop doing dce in -O0, which was just need temporarily while browsers figure ↵ | Alon Zakai | 2017-03-06 | 1 | -3/+0 |
| | | | | out the spec (#932) | ||||
* | do not merge a drop out of an if if the sides have different types, then the ↵ | Alon Zakai | 2017-02-28 | 1 | -5/+9 |
| | | | | if would be invalid (#927) | ||||
* | asm2wasm import overloading fix (#924) | Alon Zakai | 2017-02-28 | 1 | -1/+2 |
| | | | | * asm2wasm should not promote an overloaded import result to f64 if it is a single type and void | ||||
* | Fixes compilation error on clang (#925) | Kazuki Oikawa | 2017-02-27 | 1 | -1/+1 |
| | |||||
* | fix BINARYEN_PASS_DEBUG option (#908) | Alon Zakai | 2017-02-23 | 6 | -5/+25 |
| | | | | | * fix BINARYEN_PASS_DEBUG option * Add isNested property to passRunner | ||||
* | Refactor AsmConstWalker to use smaller subfunctions (#923) | jgravelle-google | 2017-02-23 | 1 | -35/+61 |
| | | | | | | * Refactor AsmConstWalker to use smaller subfunctions * Replace cashew::IStrings with Names | ||||
* | Default Walker subclasses to using Visitor<SubType> (#921) | jgravelle-google | 2017-02-23 | 28 | -58/+58 |
| | | | | Most module walkers use PostWalker<T, Visitor<T>>, let that pattern be expressed as simply PostWalker<T> | ||||
* | Fully handle EM_ASM in s2wasm (#910) | jgravelle-google | 2017-02-23 | 5 | -29/+83 |
| | | | | | | | | | | | | * Fully handle EM_ASM in s2wasm * Iterate with size_ts, remember to erase from importsMap as well * Fix dot_s test EM_ASM signatures * Move Name out to its own file, support/name.h * Move removeImportsWithSubstring out of Module class | ||||
* | fix asm2wasm import type setting - set the type of used calls based o… (#920) | Alon Zakai | 2017-02-21 | 1 | -9/+16 |
| | | | | * fix asm2wasm import type setting - set the type of used calls based on the context, early, so it's valid in the optimizer | ||||
* | read unknown users sections as binary data stored on the Module (#918) | Alon Zakai | 2017-02-21 | 4 | -4/+29 |
| | |||||
* | allow traversing the inits of globals (#917) | Alon Zakai | 2017-02-21 | 1 | -1/+6 |
| | |||||
* | clean up raw pointer import->functionType, make it a Name like everything ↵ | Alon Zakai | 2017-02-17 | 11 | -33/+36 |
| | | | | else (#915) | ||||
* | allow traversing the offset inits of table/memory segments (#916) | Alon Zakai | 2017-02-17 | 1 | -2/+18 |
| | |||||
* | fix a sign/unsigned compare compiler warning | Alon Zakai | 2017-02-16 | 1 | -2/+2 |
| | |||||
* | finish PickLoadSigns pass | Alon Zakai | 2017-02-16 | 2 | -8/+10 |
| | |||||
* | refactor sign/zero extension code into nice headers, and prepare ↵ | Alon Zakai | 2017-02-16 | 7 | -97/+258 |
| | | | | PickLoadSigns pass | ||||
* | fix and clean up fallthrough logic in OptimizeInstructions | Alon Zakai (kripken) | 2017-02-16 | 1 | -22/+18 |
| | |||||
* | optimize a compare of a load_s and a sign-extend into a load_u and a cheaper ↵ | Alon Zakai (kripken) | 2017-02-16 | 1 | -0/+18 |
| | | | | zero-extend | ||||
* | take into account loads into local info in OptimizeInstructions | Alon Zakai (kripken) | 2017-02-16 | 1 | -7/+10 |
| | |||||
* | use local info about maxBits and sign-extendedness in OptimizeInstructions | Alon Zakai (kripken) | 2017-02-16 | 1 | -11/+120 |
| | | | | fix the maxBits of a signed load, which this uncovered - all the bits may be used in such a case | ||||
* | remove unneeded masks using getMaxBits | Alon Zakai (kripken) | 2017-02-16 | 1 | -3/+16 |
| | |||||
* | tiny refactoring in OptimizeInstructions, for clarity | Alon Zakai (kripken) | 2017-02-16 | 1 | -7/+8 |
| | |||||
* | fix fuzz testcase, xor maxBits is the max, not the min | Alon Zakai (kripken) | 2017-02-16 | 1 | -2/+2 |
| | |||||
* | handle fallthrough values in load_s/u and sign/zero-extend optimization | Alon Zakai (kripken) | 2017-02-16 | 1 | -6/+30 |
| | |||||
* | handle load in getMaxBits | Alon Zakai (kripken) | 2017-02-16 | 1 | -0/+2 |
| | |||||
* | handle tee_local in getMaxBits | Alon Zakai (kripken) | 2017-02-16 | 1 | -0/+3 |
| | |||||
* | optimize out a sign-ext into a store of the same size | Alon Zakai (kripken) | 2017-02-16 | 1 | -0/+6 |
| | |||||
* | optimize out add/sub of 0 | Alon Zakai (kripken) | 2017-02-16 | 1 | -1/+9 |
| | |||||
* | optimize sign-extends to a boolean | Alon Zakai (kripken) | 2017-02-16 | 1 | -0/+4 |
| | |||||
* | optimize sign-extends to eqz | Alon Zakai (kripken) | 2017-02-16 | 1 | -0/+7 |
| | |||||
* | optimize sign-extends to ne | Alon Zakai (kripken) | 2017-02-16 | 1 | -2/+2 |
| | |||||
* | Optimize "squared" operations (#905) | Alon Zakai | 2017-02-16 | 1 | -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 Zakai | 2017-02-16 | 2 | -1/+111 |
| | |||||
* | Optimize sign-extends (#902) | Alon Zakai | 2017-02-16 | 1 | -18/+139 |
| | | | | | | * optimize sign-extend output * optimize sign-extend input | ||||
* | update wasm version to 0x01 (#913) | Alon Zakai | 2017-02-16 | 1 | -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 Zakai | 2017-02-16 | 4 | -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 Zakai | 2017-02-16 | 2 | -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 Jie | 2017-02-15 | 1 | -0/+8 |
| | |||||
* | asm2wasm debuginfo (#895) | Alon Zakai | 2017-02-07 | 6 | -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 Zakai | 2017-02-06 | 9 | -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 Holk | 2017-02-03 | 3 | -5/+3 |
| | |||||
* | only read first 4 bytes to check if a file is a wasm binary (#894) | Alon Zakai | 2017-02-02 | 1 | -3/+8 |
| | |||||
* | Merge pull request #893 from WebAssembly/shrink-asm-parser | Alon Zakai | 2017-02-01 | 10 | -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-31 | 3 | -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-31 | 6 | -651/+7 |
| | | | | | | | | asm.js anyhow, so knowing where ;s are is unnecessary bloat | ||||
| * | refactor asm.js ast to use an Assign node | Alon Zakai (kripken) | 2017-01-31 | 5 | -180/+216 |
| | | |||||
| * | use MixedArena in asm.js ast | Alon Zakai (kripken) | 2017-01-31 | 5 | -107/+99 |
| | | |||||
| * | refactor asm.js ast to use a string node directly instead of [NAME, string] | Alon Zakai (kripken) | 2017-01-31 | 6 | -108/+107 |
| | | |||||
| * | refactor asm.js ast to use a number node directly instead of [NUM, number] | Alon Zakai (kripken) | 2017-01-30 | 6 | -75/+86 |
| | |