summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | ...Heejin Ahn2019-04-271-1/+1
| | |
| * | Does it succeed if we don't have wrong style?Heejin Ahn2019-04-272-1/+3
| | |
| * | ┬─┬ノ( ゜-゜ノ) (╯°□°)╯︵ ┻━┻Heejin Ahn2019-04-271-1/+1
| | |
| * | (╯°□°)╯︵ ┻━┻Heejin Ahn2019-04-271-1/+1
| | |
| * | Missing 'then'Heejin Ahn2019-04-271-0/+1
| | |
| * | Typo fixHeejin Ahn2019-04-271-1/+1
| | |
| * | Finally?Heejin Ahn2019-04-272-6/+7
| | |
| * | Ah whateverHeejin Ahn2019-04-272-2/+2
| | |
| * | Directory queriesHeejin Ahn2019-04-271-0/+3
| | |
| * | Fix an unintended clang-format errorHeejin Ahn2019-04-271-1/+1
| | |
| * | cd to ${TRAVIS_BUILD_DIR} before running clang-tidyHeejin Ahn2019-04-272-6/+3
| | |
| * | Run clang-tidy in TRAVIS_BUILD_DIRHeejin Ahn2019-04-271-1/+1
| | |
| * | Where is the current directory?Heejin Ahn2019-04-271-0/+5
| | |
| * | Add -DCMAKE_EXPORT_COMPILE_COMMANDS=ON againHeejin Ahn2019-04-271-1/+1
| | |
| * | Run clang-tidy after cmakeHeejin Ahn2019-04-271-2/+2
| | |
| * | Add -DCMAKE_EXPORT_COMPILE_COMMANDS=ON to cmakeHeejin Ahn2019-04-271-1/+1
| | |
| * | Add missint 'exit 1'Heejin Ahn2019-04-261-0/+1
| | |
| * | Add clang-tidy Travis hook + testHeejin Ahn2019-04-263-2/+14
| | |
| * | Do we have clang-tidy-diff.py?Heejin Ahn2019-04-261-0/+1
| | |
| * | Where is clang-tidy binary?Heejin Ahn2019-04-261-1/+1
| | |
| * | clang-tidy hook test (DO NOT SUBMIT)Heejin Ahn2019-04-261-0/+1
| | |
* | | wasm2js: optimize away casts going into a suitable store (#2069)Alon Zakai2019-04-304-15/+128
| |/ |/|
* | I64ToI32Lowering: don't use alignment 1 everywhere (#2070)Alon Zakai2019-04-306-10/+298
| | | | | | If an i64 load/store that is being broken up has higher alignment, use that.
* | wasm2js: optimize switches (#2067)Alon Zakai2019-04-307-73953/+34
| | | | | | | | | | | | | | | | | | | | Don't emit unneeded breaks in switch cases, instead do case X: case Y: .. case W: break .. for each group. Also, the group with the default doesn't need any cases but the default itself.
* | Add .clang-tidy (#2062)Heejin Ahn2019-04-291-0/+16
| | | | | | | | | | | | | | We can add more checks later, but for now, this checks - If the styles for variables, functions, and classes match what we currently have - If bodies of if/for/while/do_while are inside braces - Some clang-tidy default checks that are related to possibly buggy code
* | Properly handle optimizing out a set from inside the value of another set in ↵Alon Zakai2019-04-293-3/+107
| | | | | | | | | | | | | | SimplifyLocals (#2064) Details in lengthy comment in the source. Fixes #2063
* | Fix CI (#2061)Alon Zakai2019-04-262-2/+2
|/ | | | | | | We had CI breakage that prevented this from being noticed before. * Make binaryen.js not use NO_FILESYSTEM - need to investigate why recent emscripten changes broke our usage of that flag. * Update a binaryen.js test.
* Apply format changes from #2048 (#2059)Alon Zakai2019-04-26198-13655/+22447
| | | Mass change to apply clang-format to everything. We are applying this in a PR by me so the (git) blame is all mine ;) but @aheejin did all the work to get clang-format set up and all the manual work to tidy up some things to make the output nicer in #2048
* Add clang-format-diff hook (#2057)Heejin Ahn2019-04-265-0/+28
| | | | | | | This adds a commit hook to Travis CI that errors out if incoming PRs' diffs are not clang-formatted. Turns out clang-format is also capable of formatting JavaScript, but we haven't agreed on a style for JS yet, this PR disables JavaScript formatting for now. This also adds clang-format exempt header/footer to a generated source file.
* wasm2js: remove unneeded break/continue labels (#2058)Alon Zakai2019-04-2615-126/+181
|
* wasm2js2: optimize call_indirect and select operands (#2056)Alon Zakai2019-04-2516-144/+330
| | | Don't use temp vars to reorder them unless we need to.
* wasm2js: support non-constant indexes for memory and table segments (#2055)Alon Zakai2019-04-254-37/+134
| | | Mostly what we need for dynamic linking, at least on the binaryen side.
* wasm2js: optimize loops and eqz (#2051)Alon Zakai2019-04-2519-213/+188
|
* Remove f32 legalization from LegalizeJSInterface (#2052)Sam Clegg2019-04-2542-1266/+489
| | | | | As well as i64 splitting this pass was also converting f32 to f64 at the wasm boundry. However it appears this is not actually useful and makes somethings (such as dynamic linking) harder.
* wasm2js: more js optimization (#2050)Alon Zakai2019-04-2452-2465/+1568
| | | | | | * Emit ints as signed, so -1 isn't a big unsigned number. * x - -c (where c is a constant) is larger than x + c in js (but not wasm) * +(+x) => +x * Avoid unnecessary coercions on calls, return, load, etc. - we just need coercions when entering or exiting "wasm" (not internally), and on actual operations that need them.
* Fix typo in C API: BinaryeGlobalImportGetModule -> ↵Bastian Müller2019-04-241-1/+1
| | | | BinaryenGlobalImportGetModule (#2047)
* wasm2js: start to optionally optimize the JS (#2046)Alon Zakai2019-04-2453-5188/+5121
| | | Removes redundant | 0s and similar things. (Apparently closure compiler doesn't do that, so makes sense to do here.)
* wasm2js: emit quoted properties for the exports, to support closure compiler ↵Alon Zakai2019-04-2359-1006/+1021
| | | | (#2043)
* Don't allow short if/case/blocks on a single line (#2044)Heejin Ahn2019-04-231-3/+0
| | | | | | | While looking at code changes after mass clang-formatting our current codebase, I think this rather hurts readability than improves it. And none of preset styles (LLVM, Chrome, Google, Mozilla, and WebKit) allows these, with only exception that Google allows short ifs on a single line.
* wasm2js: emit calls for memory growth helper only if memory growth is used ↵Alon Zakai2019-04-232-10/+11
| | | | (#2042)
* wasm2js: avoid non-ES5 stuff like "let" (#2041)Alon Zakai2019-04-2366-1184/+1190
| | | Also fix the fuzzer's handling of feature flags so that wasm2js can work.
* wasm2js: remove more code we don't need since we have flat IR (#2039)Alon Zakai2019-04-2217-637/+269
| | | Also run remove-unused-names which became more noticeably necessary after this change.
* Don't binpack arguments and parameters (#2038)Heejin Ahn2019-04-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looking at the current codebase, we don't mostly binpack arguments and parameters when they don't fit in a single line. BinPackArguments: ``` true: void f() { f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); } false: void f() { f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); } ``` BinPackParameters: ``` true: void f(int aaaaaaaaaaaaaaaaaaaa, int aaaaaaaaaaaaaaaaaaaa, int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {} false: void f(int aaaaaaaaaaaaaaaaaaaa, int aaaaaaaaaaaaaaaaaaaa, int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {} ```
* Finish bulk memory support (#2030)Thomas Lively2019-04-228-32/+286
| | | | | | | Implement interpretation of remaining bulk memory ops, add bulk memory spec tests with light modifications, fix bugs preventing the fuzzer from running correctly with bulk memory, and fix bugs found by the fuzzer.
* wasm2js: get rid of some non-flat code assumptions (#2036)Alon Zakai2019-04-2216-827/+274
| | | We run flatten there, which lets us simplify things a lot. Turns out that for assertions we didn't run it, which is why we still needed the old non-flat code paths. This adds flatten there and removes that old code and assumptions.
* wasm2js: unreachability fixes (#2037)Alon Zakai2019-04-2218-1898/+2488
| | | Also test in pass-debug mode, for better coverage.
* wasm-emscripten-finalize: Handle relocatable code in AsmConstWalker (#2035)Sam Clegg2019-04-224-39/+40
| | | | | | | | | When replacing the first argument to an asm call, allow more complex expressions for expressing the address. This fixes the case where the first argument might be the result of adding a constant to __memory_base.
* wasm2js: fix printing of negated negative constants (#2034)Alon Zakai2019-04-223-0/+61
| | | It is invalid to print --5, we need to add a space - -5 so that it is valid JS to parse.
* wasm2js: remove some unneeded code, which also has some risks of ↵Alon Zakai2019-04-221-13/+4
| | | | | incorrectness (#2032) The risk is that the children's type may be unreachable, in which case we may have forgotten the signing, and could get incorrect results.
* wasm2js: use scratch memory properly (#2033)Alon Zakai2019-04-2221-2241/+2677
| | | | | | | This replaces all uses of __tempMemory__, the old scratch space location, with calls to function imports for scratch memory access. This lets us then implement those in a way that does not use the same heap as main memory. This avoids possible bugs with scratch memory overwriting something, or just in general that it has observable side effects, which can confuse fuzzing etc. The intrinsics are currently implemented in the glue. We could perhaps emit them inline instead (but that might limit asm.js optimizations, so I wanted to keep our options open for now - easy to change later). Also fixes some places where we used 0 as the scratch space address.