Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | clean up unnecessary spacing | Alon Zakai | 2017-06-01 | 1 | -1/+1 | |
| | ||||||
* | use atoll in getCheckedAddress string parsing | Alon Zakai | 2017-06-01 | 1 | -1/+1 | |
| | ||||||
* | refactor s-expr parsing code to remove duplication and unnecessary things | Alon Zakai | 2017-06-01 | 2 | -39/+23 | |
| | ||||||
* | remove unneeded code in interpreter | Alon Zakai (kripken) | 2017-06-01 | 1 | -1/+0 | |
| | ||||||
* | error if select sides are concrete but different | Alon Zakai (kripken) | 2017-06-01 | 1 | -0/+3 | |
| | ||||||
* | fix fuzz-exec catching of traps, they can occur during init, not just call | Alon Zakai (kripken) | 2017-06-01 | 1 | -6/+7 | |
| | ||||||
* | handle out of range memory size values in s-expr parsing | Alon Zakai (kripken) | 2017-06-01 | 1 | -2/+10 | |
| | ||||||
* | handle out of range break offset parsing | Alon Zakai | 2017-06-01 | 1 | -0/+2 | |
| | ||||||
* | verify s-expr parsing of alignments | Alon Zakai | 2017-06-01 | 1 | -2/+6 | |
| | ||||||
* | validate memory/table Address values in s-expr parsing | Alon Zakai (kripken) | 2017-06-01 | 1 | -4/+20 | |
| | ||||||
* | trap on bad result types in shell-interface callTable | Alon Zakai (kripken) | 2017-06-01 | 1 | -0/+3 | |
| | ||||||
* | handle empty stack in sourceToUnique | Alon Zakai (kripken) | 2017-06-01 | 1 | -1/+4 | |
| | ||||||
* | host op parsing error handling | Alon Zakai (kripken) | 2017-06-01 | 2 | -2/+11 | |
| | ||||||
* | handle duplicate functions in s-expr parsing | Alon Zakai (kripken) | 2017-06-01 | 1 | -0/+1 | |
| | ||||||
* | throw parse errors in UniqueNameMapper | Alon Zakai (kripken) | 2017-06-01 | 1 | -2/+8 | |
| | ||||||
* | handle duplicate function types in s-expr parsing | Alon Zakai (kripken) | 2017-06-01 | 1 | -0/+2 | |
| | ||||||
* | handle duplicate imports and globals in s-expr parsing | Alon Zakai (kripken) | 2017-06-01 | 1 | -0/+6 | |
| | ||||||
* | handle a parse error of a function declaration with mixed import inside | Alon Zakai (kripken) | 2017-06-01 | 1 | -0/+1 | |
| | ||||||
* | s-expr parsing: handle empty switch | Alon Zakai (kripken) | 2017-06-01 | 1 | -0/+1 | |
| | ||||||
* | harden parsing.h | Alon Zakai (kripken) | 2017-06-01 | 1 | -46/+50 | |
| | ||||||
* | harden s-expr parsing | Alon Zakai (kripken) | 2017-06-01 | 1 | -25/+29 | |
| | ||||||
* | fix call depth detection in wasm-opt interpreting | Alon Zakai (kripken) | 2017-06-01 | 2 | -2/+2 | |
| | ||||||
* | handle the wrong number of functions being provided in binary format | Alon Zakai (kripken) | 2017-06-01 | 1 | -0/+8 | |
| | ||||||
* | in extra pass-debug validation, don't assume there is always a function, the ↵ | Alon Zakai (kripken) | 2017-06-01 | 1 | -1/+1 | |
| | | | | error may be in a global init | |||||
* | Exporting/importing debug location information from .wast/.asm.js/.s formats ↵ | Yury Delendik | 2017-06-01 | 15 | -27/+438 | |
| | | | | | | | | (#1017) * Extends wasm-as, wasm-dis and s2wasm to consume debug locations. * Exports source map from asm2wasm | |||||
* | Refactor optimization opts (#1023) | Alon Zakai | 2017-05-24 | 3 | -98/+129 | |
| | | | | * refactor optimization opts helper code to a class | |||||
* | More fuzz fixes (#1021) | Alon Zakai | 2017-05-22 | 1 | -4/+16 | |
| | | | | | | * validate that memory/table segment values fit in the initial range * validate that select condition should be i32 | |||||
* | add --fuzz-exec option to wasm-opt, which (when possible) executes results ↵ | Alon Zakai (kripken) | 2017-05-20 | 1 | -0/+73 | |
| | | | | before and after optimizations are run, checking for changes. this can be used when fuzzing | |||||
* | relooper improvements | Alon Zakai (kripken) | 2017-05-20 | 2 | -1/+9 | |
| | ||||||
* | use TypeUpdater in vacuum | Alon Zakai (kripken) | 2017-05-20 | 2 | -36/+48 | |
| | ||||||
* | afl-fuzz bug fixes (#1018) | Alon Zakai | 2017-05-20 | 2 | -0/+7 | |
| | | | | | | | | * values cannot flow through an if without an else, they never return a value * check pass tests in pass-debug mode too * add missing finalization in binary reading | |||||
* | Address review feedback for #1014 (#1016) | Alon Zakai | 2017-05-18 | 8 | -35/+77 | |
| | | | | | | * address review feedback for #1014 | |||||
* | optimize dceing of blocks and known-to-exist children (#1015) | Alon Zakai | 2017-05-18 | 1 | -57/+34 | |
| | ||||||
* | Validate finalization (#1014) | Alon Zakai | 2017-05-18 | 27 | -142/+809 | |
| | | | | | | | * validate that types are properly finalized, when in pass-debug mode (BINARYEN_PASS_DEBUG env var): check after each pass is run that the type of each node is equal to the proper type (when finalizing it, i.e., fully recomputing the type). * fix many fuzz bugs found by that. * in particular, fix dce bugs with type changes not being fully updated during code removal. add a new TypeUpdater helper class that lets a pass update types efficiently, by the helper tracking deps between blocks and branches etc., and updating/propagating type changes only as necessary. | |||||
* | optimize if and select in the case their values are identical (#1013) | Alon Zakai | 2017-05-17 | 1 | -0/+39 | |
| | ||||||
* | Re-reloop pass (#1009) | Alon Zakai | 2017-05-16 | 7 | -14/+342 | |
| | | | | | This adds a pass that converts to a CFG, runs the relooper, and re-generates wasm from that. This depends on flatten-control-flow being run before. The main goal here is to help code generators other than asm2wasm (which already receives relooped code from fastcomp). | |||||
* | Parallelize istring creation (#1008) | Alon Zakai | 2017-05-16 | 2 | -42/+37 | |
| | | | | | | | | * parallelize istring creation, by having a thread-local set and a global set guarded by a mutex. each time a new string shows up in a thread, it will be added to that thread's set, after accessing the global set through the lock first, which means we lock at most once per new string per thread * don't leak strings in istring store * since we now create names in a parallel thread-safe manner, we don't need to pre-create names in RelooperJumpThreading | |||||
* | merge blocks before and after remove-unused-brs | Alon Zakai (kripken) | 2017-05-10 | 1 | -1/+2 | |
| | ||||||
* | allow values to flow out of loops in RemoveUnneededBrs, and simplify some ↵ | Alon Zakai (kripken) | 2017-05-10 | 1 | -12/+4 | |
| | | | | unnecessary complexity in that pass as well | |||||
* | Flatten control flow pass (#999) | Alon Zakai | 2017-05-10 | 5 | -0/+479 | |
| | | | | | | | | | | | This pass flattens out control flow in order to achieve 2 properties: * Control flow structures (block, loop, if) and control flow operations (br, br_if, br_table, return, unreachable) may only be block children, a loop body, or an if-true or if-false. (I.e., they cannot be nested inside an i32.add, a drop, a call, an if-condition, etc.) * Disallow block, loop, and if return values, i.e., do not use control flow to pass around values. As a result, expressions cannot contain control flow, and overall control flow is simpler, more structured, and more "flat". This should make things like re-relooping wasm code much easier, as they can run after the cfg is flattened | |||||
* | asm2wasm: properly infer return type of a call inside a sequence (#1006) | Alon Zakai | 2017-05-09 | 1 | -2/+8 | |
| | ||||||
* | fix autoDrop, now that we properly set block types, unreachable can easily ↵ | Alon Zakai | 2017-05-09 | 1 | -1/+1 | |
| | | | | happen, and autoDrop wasn't handling it (#1005) | |||||
* | Unreachable typing fixes (#1004) | Alon Zakai | 2017-05-09 | 6 | -5/+95 | |
| | | | | | | | | | | | | * fix type of drop, set_local, set_global, load, etc: when operand is unreachable, so is the node itself * support binary tests properly in test/passes * fix unreachable typing of blocks with no name and an unreachable child * fix continue emitting in asm2wasm * properly handle emitting of unreachable load | |||||
* | text format parsing fixes (#1002) | Alon Zakai | 2017-05-08 | 1 | -4/+5 | |
| | ||||||
* | fix an afl-fuzz bug where precompute alters a br to remove its condition, ↵ | Alon Zakai | 2017-05-08 | 1 | -0/+1 | |
| | | | | but does not properly modify the type (#1000) | |||||
* | ctor-eval fixes (#996) | Alon Zakai | 2017-05-05 | 2 | -3/+74 | |
| | | | | | | | | * fix wasm-ctor-eval, we need to look for the STACKTOP etc. imports, they may not be named, if this build is not with -g * pack memory after ctor evalling, since we merge it up which is less efficient * do some useful opts after ctor-evalling, to clean things up | |||||
* | Make header guards consistent (#997) | Sam Clegg | 2017-05-04 | 9 | -26/+23 | |
| | ||||||
* | optimize duplication checks in binary format reading (#995) | Alon Zakai | 2017-05-04 | 1 | -7/+5 | |
| | ||||||
* | make function name duplicate testing handle the case of just some functions ↵ | Alon Zakai | 2017-05-03 | 1 | -5/+8 | |
| | | | | being named, and colliding with others' original names (#994) | |||||
* | fix unreachable typing: for all nodes, if they are not reached - e.g., a ↵ | Alon Zakai (kripken) | 2017-05-02 | 3 | -16/+29 | |
| | | | | binary with either side unreachable - then they are unreachable. this makes our usage of the unreachable type consistent |