Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix asm2wasm dead lock caused by empty modules. | Logan Chien | 2016-08-26 | 1 | -1/+9 |
| | | | | | | | | | 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`. | ||||
* | Remove unnecessary type cast. | Logan Chien | 2016-08-26 | 1 | -2/+1 |
| | | | | | std::thread can forward the arguments to main function properly. We don't have to cast them from/to void*. | ||||
* | Replace std::unique<T>(new T()) with make_unique<T>(). | Logan Chien | 2016-08-26 | 6 | -8/+9 |
| | | | | | | | | | | | | | | | | This commit modernize the code base by replacing: std::unique_ptr<T>(new T(...)) with: make_unique<T>(...) or: wasm::make_unique<T>(...) This is a step closer to adopt C++14 std::make_unique<T>(...). | ||||
* | Merge pull request #668 from WebAssembly/tables_n_memories | Alon Zakai | 2016-08-16 | 18 | -100/+306 |
|\ | | | | | Tables and memories | ||||
| * | offset support in table | Alon Zakai | 2016-08-15 | 14 | -66/+204 |
| | | |||||
| * | support function table initial and max sizes, and new printing format | Alon Zakai | 2016-08-12 | 9 | -2/+44 |
| | | |||||
| * | support expressions in segment offsets | Alon Zakai | 2016-08-12 | 14 | -40/+66 |
| | | |||||
* | | interpreter debugging fixes (#672) | Alon Zakai | 2016-08-15 | 1 | -11/+13 |
|/ | |||||
* | parsing fix in compiled-to-js parser (#669) | Alon Zakai | 2016-08-12 | 1 | -4/+4 |
| | |||||
* | Implement asm.js style exception handling for Wasm (#664) | Heejin Ahn | 2016-08-11 | 2 | -8/+61 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+6 |
| | | | | | (#665) and update spec tests | ||||
* | Fix a parsing bug introduced by #615 (#661) | Heejin Ahn | 2016-08-05 | 1 | -0/+4 |
| | | | | | | | | | | | | | | | 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. | ||||
* | Create a dummy function to prevent NULL miscomparisons, if necessary (#658) | Dominic Chen | 2016-08-03 | 2 | -16/+49 |
| | | | Resolves WebAssembly/spec#312 | ||||
* | support pre-assigning indexes for functions that are called indirectly (#616) | Dominic Chen | 2016-08-02 | 3 | -2/+38 |
| | | | 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 | 2 | -12/+49 |
| | |||||
* | Fix trailing whitespace, single-character strings, checking map element ↵ | Dominic Chen | 2016-07-22 | 5 | -64/+55 |
| | | | | presence, and eliminate explicit index counter (#633) | ||||
* | binary support for wasm globals (#652) | Alon Zakai | 2016-07-22 | 2 | -13/+71 |
| | |||||
* | support wasm globals (#650) | Alon Zakai | 2016-07-21 | 9 | -9/+256 |
| | |||||
* | more RemoveUnusedName opts: merge names when possible, and do block/loop ↵ | Alon Zakai | 2016-07-20 | 1 | -5/+42 |
| | | | | merging based on their names | ||||
* | remove unused labels from loops too, and general clean ups for RemoveUnusedNames | Alon Zakai | 2016-07-20 | 1 | -7/+28 |
| | |||||
* | avoid label variable usage in relooper for forward branches, just use a ↵ | Alon Zakai | 2016-07-20 | 2 | -54/+121 |
| | | | | stack of blocks for them. after this change, only irreducible control flow should cause label variable usage | ||||
* | improve a validation error | Alon Zakai | 2016-07-20 | 1 | -1/+6 |
| | |||||
* | refactor calling of MakeMultiple in relooper | Alon Zakai | 2016-07-18 | 1 | -5/+4 |
| | |||||
* | remove an unneeded param in the relooper | Alon Zakai | 2016-07-18 | 1 | -4/+5 |
| | |||||
* | remove some old code in relooper | Alon Zakai | 2016-07-18 | 2 | -52/+5 |
| | |||||
* | optimize updating of interference and copy table in CoalesceLocals | Alon Zakai | 2016-07-17 | 1 | -2/+3 |
| | |||||
* | optimize types in CoalesceLocals | Alon Zakai | 2016-07-17 | 1 | -19/+20 |
| | |||||
* | try natural and reverse order in coalese-locals | Alon Zakai | 2016-07-17 | 1 | -2/+20 |
| | |||||
* | optimize to remove as many copies as possible in coalesce-locals | Alon Zakai | 2016-07-16 | 1 | -4/+32 |
| | |||||
* | make sure to create instances of function-parallel functions, even in debug mode | Alon Zakai | 2016-07-16 | 1 | -1/+8 |
| | |||||
* | fix dce bug in non-parallel mode, which happens in debug mode, and add debug ↵ | Alon Zakai | 2016-07-16 | 1 | -1/+6 |
| | | | | testing | ||||
* | fix unreachable constructor without allocator (#643) | Alon Zakai | 2016-07-16 | 1 | -2/+2 |
| | |||||
* | eq/ne are ok to optimize even if they are nans (#640) | Alon Zakai | 2016-07-15 | 2 | -0/+32 |
| | |||||
* | don't simplify using de-morgan's rules on floats, because of nans (#638) | Alon Zakai | 2016-07-15 | 2 | -64/+0 |
| | |||||
* | emit safe calls for i32 div/rem when in precise mode in asm2wasm, as they ↵ | Alon Zakai | 2016-07-14 | 4 | -0/+45 |
| | | | | can trap (#637) | ||||
* | Merge pull request #632 from WebAssembly/too | Alon Zakai | 2016-07-13 | 3 | -47/+107 |
|\ | | | | | Tool renaming and refactoring | ||||
| * | validate properly in wasm-opt | Alon Zakai | 2016-07-13 | 1 | -1/+4 |
| | | |||||
| * | separate wasm-opt out from wasm-shell: opt optimizes, shell runs wast shell ↵ | Alon Zakai | 2016-07-13 | 3 | -46/+103 |
| | | | | | | | | tests | ||||
| * | rename binaryen-shell to wasm-shell | Alon Zakai | 2016-07-13 | 1 | -1/+1 |
| | | |||||
* | | Don't emit empty array literals in trace output (#631) | Alon Zakai | 2016-07-13 | 2 | -7/+19 |
|/ | | | | * 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 | 2 | -12/+8 |
| | |||||
* | handle param overloading in asm2wasm ffis (#629) | Alon Zakai | 2016-07-12 | 1 | -6/+21 |
| | |||||
* | comment | Alon Zakai | 2016-07-12 | 1 | -0/+3 |
| | |||||
* | relooper tracing + fixes | Alon Zakai | 2016-07-12 | 1 | -49/+40 |
| | |||||
* | allow multiple traces | Alon Zakai | 2016-07-12 | 1 | -15/+24 |
| | |||||
* | add a tracing option to the c api, which logs out a runnable program from c ↵ | Alon Zakai | 2016-07-12 | 2 | -14/+439 |
| | | | | api calls | ||||
* | fix relooper leak | Alon Zakai | 2016-07-12 | 1 | -0/+3 |
| | |||||
* | add support for symbol assignments, closes #4422 (#615) | Dominic Chen | 2016-07-11 | 5 | -32/+122 |
| | | | Adds support for aliases to objects, to go along with the existing support for aliases to functions. | ||||
* | clarify the local/var/param distinction | Alon Zakai | 2016-07-07 | 2 | -4/+15 |
| | |||||
* | update spec tests, and handle some flux in call_indirect in upstream | Alon Zakai | 2016-07-06 | 2 | -0/+9 |
| |