Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix asm2wasm dead lock caused by empty modules. | Logan Chien | 2016-08-26 | 5 | -0/+20 |
| | | | | | | | | | This commit fixes an asm2wasm dead lock when asm2wasm is compiling an empty module, i.e. a module without any functions. Without this commit, worker threads are likely to leave `workerMain()` and decrease `liveWorkers` early. Consequently, `waitUntilAllReady()` will never observe `liveWorkers == numWorkers`. | ||||
* | offset support in table | Alon Zakai | 2016-08-15 | 31 | -36/+36 |
| | |||||
* | support function table initial and max sizes, and new printing format | Alon Zakai | 2016-08-12 | 31 | -35/+70 |
| | |||||
* | support expressions in segment offsets | Alon Zakai | 2016-08-12 | 69 | -237/+169 |
| | |||||
* | Implement asm.js style exception handling for Wasm (#664) | Heejin Ahn | 2016-08-11 | 5 | -1/+208 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement asm.js style exception handling for Wasm Converts invoke wrapper names generated by LLVM backend to real invoke wrapper names that are expected by JavaScript glue code. This is required to support wasm exception handling (asm.js style). LLVM backend lowers invoke @func(arg1, arg2) to label %invoke.cont unwind label %lpad into ... (some code) call @invoke_SIG(func, arg1, arg2) ... (some code) SIG is a mangled string generated based on the LLVM IR-level function signature. In LLVM IR, types are not lowered yet, so this mangling scheme simply takes LLVM's string representtion of parameter types and concatenate them with '_'. For example, the name of an invoke wrapper for function void foo(struct mystruct*, int) will be "__invoke_void_%struct.mystruct*_int". This function converts the names of invoke wrappers based on their lowered argument types and a return type. In the example above, the resulting new wrapper name becomes "invoke_vii". * Address comments Change variable names to camelcase Add a small (semi-)handwritten test case * Export malloc and free from wasm when available * Add a test case for exporting malloc/free feature + cosmetic 'file' name change in text_before_type.s * fixInvokeWrapper -> fixEmExceptionInvoke * Add a TODO | ||||
* | in DemoteFloat64, if the truncated value is exactly at the limit, return it ↵ | Alon Zakai | 2016-08-08 | 1 | -0/+0 |
| | | | | | (#665) and update spec tests | ||||
* | Fix a parsing bug introduced by #615 (#661) | Heejin Ahn | 2016-08-05 | 2 | -0/+31 |
| | | | | | | | | | | | | | | | Name lhs = getStrToSep(); if (!skipEqual()){ s = strchr(s, '\n'); if (!s) break; continue; } The above code snippet introduced by #615 has a bug when there is only one word (e.g. ".text") in a line. If there is only one word in a line, skipEqual() also skips the newline character at the end of the line, and strchr(s, '\n') moves the cursor to the end of the next line, effectively skipping the whole next line. | ||||
* | Update waterfall build revision to 9397 (#662) | Derek Schuff | 2016-08-04 | 52 | -3722/+3604 |
| | | | Includes torture tests and new expected passes | ||||
* | Create a dummy function to prevent NULL miscomparisons, if necessary (#658) | Dominic Chen | 2016-08-03 | 8 | -28/+49 |
| | | | Resolves WebAssembly/spec#312 | ||||
* | support pre-assigning indexes for functions that are called indirectly (#616) | Dominic Chen | 2016-08-02 | 2 | -0/+150 |
| | | | This patch adds support for an ".indidx" primitive that pre-assigns table indexes for functions that are called indirectly. It is used by the upstream LLVM WebAssembly backend to support fine-grained control-flow integrity for indirect function calls by emitting instrumentation at each indirect call site to check that the destination index is within certain ranges that correspond to disjoint equivalence classes of indirect call targets. The reason that this primitive is necessary is because the layout of the table section isn't determined until the WebAssembly linker is executed, but indirect function to table index mappings need to be known when opt is executed to generate the correct range checking in the LLVM IR. | ||||
* | wast function type name desugaring is changing in spec:301 (#654) | Alon Zakai | 2016-07-28 | 26 | -316/+428 |
| | |||||
* | Merge pull request #648 from WebAssembly/relooper-opts | Alon Zakai | 2016-07-20 | 17 | -6777/+8897 |
|\ | | | | | Relooper improvements | ||||
| * | more RemoveUnusedName opts: merge names when possible, and do block/loop ↵ | Alon Zakai | 2016-07-20 | 8 | -5407/+5403 |
| | | | | | | | | merging based on their names | ||||
| * | remove unused labels from loops too, and general clean ups for RemoveUnusedNames | Alon Zakai | 2016-07-20 | 10 | -5520/+5560 |
| | | |||||
| * | avoid label variable usage in relooper for forward branches, just use a ↵ | Alon Zakai | 2016-07-20 | 4 | -977/+841 |
| | | | | | | | | stack of blocks for them. after this change, only irreducible control flow should cause label variable usage | ||||
| * | add more relooper testing and improve existing | Alon Zakai | 2016-07-20 | 7 | -342/+2562 |
| | | |||||
* | | Update waterfall to build 8774 (#649) | Derek Schuff | 2016-07-20 | 1236 | -6147/+6342 |
|/ | | | Also update torture test .s files | ||||
* | try natural and reverse order in coalese-locals | Alon Zakai | 2016-07-17 | 2 | -2868/+2938 |
| | |||||
* | optimize to remove as many copies as possible in coalesce-locals | Alon Zakai | 2016-07-16 | 8 | -6960/+6086 |
| | |||||
* | fix dce bug in non-parallel mode, which happens in debug mode, and add debug ↵ | Alon Zakai | 2016-07-16 | 2 | -0/+13 |
| | | | | testing | ||||
* | eq/ne are ok to optimize even if they are nans (#640) | Alon Zakai | 2016-07-15 | 4 | -34/+47 |
| | |||||
* | don't simplify using de-morgan's rules on floats, because of nans (#638) | Alon Zakai | 2016-07-15 | 4 | -26/+91 |
| | |||||
* | emit safe calls for i32 div/rem when in precise mode in asm2wasm, as they ↵ | Alon Zakai | 2016-07-14 | 8 | -53/+84 |
| | | | | can trap (#637) | ||||
* | Fix waterfall submodule (#634) | Dominic Chen | 2016-07-14 | 1 | -0/+0 |
| | | | This brings in the updates for the renaming of the binaries from 5936f05 | ||||
* | Merge pull request #632 from WebAssembly/too | Alon Zakai | 2016-07-13 | 1 | -0/+0 |
|\ | | | | | Tool renaming and refactoring | ||||
| * | separate wasm-opt out from wasm-shell: opt optimizes, shell runs wast shell ↵ | Alon Zakai | 2016-07-13 | 1 | -0/+0 |
| | | | | | | | | tests | ||||
* | | Don't emit empty array literals in trace output (#631) | Alon Zakai | 2016-07-13 | 1 | -39/+39 |
|/ | | | | * don't emit empty array literals in trace output | ||||
* | Handle aliases without size (e.g. weak symbol), add redefinition warnings (#630) | Dominic Chen | 2016-07-13 | 1 | -6/+10 |
| | |||||
* | handle param overloading in asm2wasm ffis (#629) | Alon Zakai | 2016-07-12 | 5 | -16/+62 |
| | |||||
* | relooper tracing + fixes | Alon Zakai | 2016-07-12 | 3 | -236/+1369 |
| | |||||
* | allow multiple traces | Alon Zakai | 2016-07-12 | 2 | -9/+6 |
| | |||||
* | add a tracing option to the c api, which logs out a runnable program from c ↵ | Alon Zakai | 2016-07-12 | 4 | -0/+1070 |
| | | | | api calls | ||||
* | add support for symbol assignments, closes #4422 (#615) | Dominic Chen | 2016-07-11 | 2 | -9/+36 |
| | | | Adds support for aliases to objects, to go along with the existing support for aliases to functions. | ||||
* | add a relooper test for duff's device, showing irreducible control flow and ↵ | Alon Zakai | 2016-07-07 | 2 | -0/+106 |
| | | | | helper var use | ||||
* | update spec tests, and handle some flux in call_indirect in upstream | Alon Zakai | 2016-07-06 | 1 | -0/+0 |
| | |||||
* | validate set_local types against the function #618 (#620) | Alon Zakai | 2016-07-06 | 2 | -1/+33 |
| | |||||
* | quote names in s-format that need it | Alon Zakai | 2016-07-05 | 2 | -7/+7 |
| | |||||
* | Relooper switch support (#617) | Alon Zakai | 2016-07-02 | 2 | -2/+52 |
| | | | | | | * support switches in relooper and c api * update relooper fuzzer for switches | ||||
* | update emscripten submodule | Alon Zakai | 2016-06-29 | 1 | -0/+0 |
| | |||||
* | add c api method to interpret a module, calling its start method (#601) | Alon Zakai | 2016-06-25 | 2 | -0/+34 |
| | |||||
* | finalize blocks properly in relooper (#600) | Alon Zakai | 2016-06-24 | 2 | -0/+25 |
| | |||||
* | add BinaryenExpressionPrint to c api (#599) | Alon Zakai | 2016-06-24 | 2 | -0/+5 |
| | |||||
* | test only c api examples; c++ api is internal and unstable, it is tested by ↵ | Alon Zakai | 2016-06-21 | 2 | -67/+0 |
| | | | | our own codebase | ||||
* | run precompute after every optimize-instructions | Alon Zakai | 2016-06-18 | 2 | -264/+48 |
| | |||||
* | add a precompute pass | Alon Zakai | 2016-06-18 | 12 | -296/+117 |
| | |||||
* | Do not create dyncall thunks for functions with i64 results or params (#586) | Derek Schuff | 2016-06-14 | 4 | -68/+30 |
| | | | | | | Dyncall thunks are meant to be used with emscripten on the web; however on the web, functions with i64 results or params are not allowed to be exported. | ||||
* | Add mode to wasm validator to check for web-environment constraints (#584) | Derek Schuff | 2016-06-14 | 3 | -0/+4 |
| | | | | | | | In the web embedding, modules are not allowed to import or export functions which have i64 params or return values. Add a mode to the validator to check for this, and add flags to s2wasm and wasm-as to enable or disable this check. Also add tests. | ||||
* | Merge pull request #583 from WebAssembly/br-more | Alon Zakai | 2016-06-11 | 13 | -96/+238 |
|\ | | | | | Fix and improve br optimizations | ||||
| * | run remove-unused-brs after simplify-locals | Alon Zakai | 2016-06-11 | 8 | -104/+80 |
| | | |||||
| * | fix br_if with value optimization in remove-unused-brs | Alon Zakai | 2016-06-11 | 7 | -0/+166 |
| | |