summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix UB with FP divide by zero (#424)JF Bastien2016-05-021-2/+40
| | | | | | Another fix for #404.
* | f32.demote/f64 fix UB (#423)JF Bastien2016-05-021-1/+8
| | | | | | Another fix for #404.
* | Fix memcpy UB (#422)JF Bastien2016-05-021-1/+1
|/ | | Can't call memcpy with size of 0 and nullptr init.
* Fix {i32,i64}.trunc_{s,u}/{f32,f64} in interpreter (#421)Ben Smith2016-05-023-8/+124
| | | | Check the binary representation of the float instead of converting it to a float first.
* Changed type of flags to fix Visual Studio 2015 error (#418)BSalita2016-04-301-1/+1
| | | Changed type of flags (line 26) in read_file() from auto to std::ios_base::openmode to fix Visual Studio 2015 error.
* Check LEB128 encoding fits in destination integer (#408)JF Bastien2016-04-301-7/+23
| | | | | | | | | | | * Check LEB128 encoding fits in destination integer As found by #404, the insignificant LEB128 bits were silently dropped when dealing with signed LEB values which tripped UBSAN in hello_world. This fixes #409. * Fix typo.
* validate in binaryen shell and on wasm binaries, and fix type checkingAlon Zakai2016-04-294-26/+167
|
* add wasm.cpp which does full type detection for blocks, and prepare for full ↵Alon Zakai2016-04-292-5/+96
| | | | type checking everywhere
* warning on BreakSeekerAlon Zakai2016-04-291-1/+1
|
* get the reinterpret opcodes right on float/intAlon Zakai2016-04-281-6/+6
|
* fix size detection on reinterpret operations in binary formatAlon Zakai2016-04-281-2/+2
|
* fix asm2wasm f64->f32->i32 bitcast (#412)Alon Zakai2016-04-281-0/+4
|
* Merge pull request #411 from WebAssembly/flexible-methodsAlon Zakai2016-04-281-95/+108
|\ | | | | Refactor js/wasm glue to defer the wasm/wasm-polyfill/asmjs-fallback point
| * fall back from wasm compilation errors, and add loggingAlon Zakai2016-04-281-3/+12
| |
| * refactor js/wasm glue to defer the wasm/wasm-polyfill/asmjs-fallback as late ↵Alon Zakai2016-04-281-96/+100
| | | | | | | | as possible. this lets us recover from wasm compilation failures and still do a fallback method
* | avoid dynamic allocas (#410)Alon Zakai2016-04-282-5/+7
|/
* cleanups following review commentsAlon Zakai2016-04-271-1/+1
|
* avoid leaks when s-parsing hits an errorAlon Zakai2016-04-271-6/+6
|
* don't leak currFunction in s-parserAlon Zakai2016-04-271-5/+4
|
* don't leak when parsing segments in s-parserAlon Zakai2016-04-271-2/+2
|
* just use a simple vector in data segmentsAlon Zakai2016-04-278-42/+51
|
* do not leak in IStringSetAlon Zakai2016-04-272-14/+16
|
* clean up import if not passed to wasm module in asm2wasmAlon Zakai2016-04-271-0/+1
|
* clean up in emscripten-optimizer arenasAlon Zakai2016-04-272-0/+10
|
* use an arena vector for switch targetsAlon Zakai2016-04-271-3/+2
|
* allocate only expressions in arenas - functions, imports, exports, function ↵Alon Zakai2016-04-2713-82/+82
| | | | types, can more simply be held by unique_ptrs on the owning module. this avoids need to coordinate arena allocation for their elements, and only the far more plentiful expression nodes are a perf factor anyhow
* don't leak when running tests in shellAlon Zakai2016-04-271-6/+6
|
* use arena allocation for s-expr ElementsAlon Zakai2016-04-271-3/+2
|
* Merge pull request #406 from WebAssembly/i64.load32_uAlon Zakai2016-04-271-4/+4
|\ | | | | Fix zero-extension in i64.load32_u.
| * Fix zero-extension in i64.load32_u.Dan Gohman2016-04-271-4/+4
| |
* | Remove UB (#405)JF Bastien2016-04-271-8/+6
|/ | | | | ubsan fails with: wasm-binary.h:97:32: runtime error: left shift of negative value -1 Also use type_traits for is_signed.
* Split construction, scanning, and building phases of S2WasmBuilder (#400)Derek Schuff2016-04-2713-80/+250
| | | | | | | | | | | Instead of doing all of the S2Wasm work in the constructor, split construction, scanning (to determine implemented functions) and building of the wasm module. This allows the linker to get the symbol information (e.g. implemented functions) without having to build an entire module (which will be useful for archives) and to allow the linker to link a new object into the existing one by building the wasm module in place on the existing module.
* add an ArenaVector for internal array allocations in expression nodesAlon Zakai2016-04-2615-278/+456
|
* make chunk size flexible in arenasAlon Zakai2016-04-261-5/+9
|
* refactor arena to allow allocating space directlyAlon Zakai2016-04-261-8/+13
|
* remove old globalAllocatorAlon Zakai2016-04-262-6/+0
|
* ast_utils improvements (#399)Alon Zakai2016-04-263-13/+25
| | | | | | | | | * make EffectAnalyzer a little more fun to use * create a convert() method that can turn a node into a smaller node, reusing its memory, and use that in nop() * use convert in wasm-linker
* Defer creation of CallImports to link time (#395)Derek Schuff2016-04-263-21/+41
| | | s2wasm currently creates a Call AST node if the target is implemented in the current object (thus far assumed to be the final executable) and a CallImport node if not. In preparation for adding additional objects to the link before layout time, we make only Call nodes until link time, and then convert them to CallImport if they are undefined at that time.
* emit ifs in an optimized way in binary formatAlon Zakai2016-04-261-2/+16
|
* BreakSeeker needs to look at br_table tooAlon Zakai2016-04-261-0/+6
|
* Merge pull request #393 from WebAssembly/aritiesAlon Zakai2016-04-261-15/+23
|\ | | | | Arities
| * use arities in callsAlon Zakai2016-04-251-3/+9
| |
| * use arities on switchAlon Zakai2016-04-251-4/+4
| |
| * use arities on returnsAlon Zakai2016-04-251-4/+6
| |
| * use arities on breaksAlon Zakai2016-04-251-4/+4
| |
* | selectify if-elses with no control flow in themAlon Zakai2016-04-252-1/+31
| |
* | optimize returns that flow outAlon Zakai2016-04-251-3/+21
| |
* | optimize breaks with values in RemoveUnusedBrs, check if their value can ↵Alon Zakai2016-04-251-14/+32
|/ | | | flow to the target anyhow
* Separate LinkerObject from Linker (#383)Derek Schuff2016-04-254-141/+171
| | | | | Create the LinkerObject class, which has a wasm Module and represents the module plus the information needed to relocate and lay it out. Each Linker owns a "main executable" LinkerObject, and S2WasmBuilder requires a LinkerObject instead of just a Module because LLVM asm files require relocation/linking before they represent a full wasm module. No merging support yet, but the real functionality for #370 is coming soon.
* Use Module instead of AllocatingModule in binaryen.js tests (#391)Jan Wolski2016-04-251-0/+1
| | | | | | * Use Module instead of AllocatingModule in binaryen.js tests * include compiled binaryen.js, too