| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Reduce an interesting wasm to a smaller still interesting wasm. This takes an arbitrary command to run, and reduces the wasm as much as it can while keeping the behavior of that command fixed. This can be used to reduce compiler bugs in an arbitrary VM, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Get wasm2asm building again
Updates CMakeLists.txt to have wasm2asm built by default, updates
wasm2asm.h to account for recent interface changes, and restores
JSPrinter functionality.
* Implement splice for array values
* Clean up wasm2asm testing
* Print semicolons after statements in blocks
* Cleanups and semicolons for condition arms
* Prettify semicolon emission
|
|
|
|
| |
(#1088)
|
|
|
|
|
|
|
| |
* Add SSA pass which ensures a single assign for each local, except for merged locals where we ensure exactly a single assign from one of the paths leading to that use
* Also add InstrumentLocals pass, useful for debugging locals (similar to InstrumentMemory but for locals)
* Fix a PickLoadSigns bug with tees not being ignored, which was not noticed until now because we ran it on flatter output by default, but the ssa pass uncovered the bug
|
|
|
|
|
|
|
| |
Use Fatal() rather than stdout or report callImport error
Without this the write to stdout can be lost (Since the following line
aborts)
|
|
|
|
| |
1. Add a missing <functional> include
2. Put the // fallthrough comment after the closing bracket so the compiler does not emit a implicit fallthrough warning.
|
|
|
| |
New binaryen.js implementation, based on the C API underneath and with a JS-friendly API on top. See docs under docs/ for API details.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fully handle EM_ASM in s2wasm
* Iterate with size_ts, remember to erase from importsMap as well
* Fix dot_s test EM_ASM signatures
* Move Name out to its own file, support/name.h
* Move removeImportsWithSubstring out of Module class
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
* Fix Windows colors and update README.md
|
| |
|
|
|
|
| |
undefined behavior. (#769)
|
|
|
|
| |
initialized to null which caused dereferencing a garbage pointer. (#770)
|
|
|
|
| |
global ctors
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>(...).
|
|
|
| |
Adds support for aliases to objects, to go along with the existing support for aliases to functions.
|
|
|
|
| |
trouble with some new C++11 constructs. (#581)
|
|
|
|
| |
variables we only use in asserts (#579)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
safe_integer.cpp (#480)
|
|
|
|
| |
typename U in bits.h (#471)
|
|
|
|
| |
from #390 (#450)
|
|
|
|
|
|
|
|
|
|
|
| |
* Factor passes and emscripten-optimizer into static libs
This removes the redundancies from the source sets in the main
CMakeLists.txt.
* Make passes an object lib
* Use static libs with --whole-archive because Travis has old cmake
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Add a class to parse archive files.
Support linking archive files, with archive semantics (i.e. an archive
member is linked in if it satisfies an undefined reference).
Archive files must be gnu-format archives containing .s files.
Add tests for linking semantics.
|
|
|
| |
This puts us back where #404 wanted to be: all UB that ubsan knows about now causes an abort. This ins't to say that it's all gone, merely that our tests don't trigger any more UB which ubsan knows how to find :-)
|
|
|
|
| |
Check the binary representation of the float instead of converting it to
a float first.
|
|
|
| |
Changed type of flags (line 26) in read_file() from auto to std::ios_base::openmode to fix Visual Studio 2015 error.
|
|
|
| |
As in #382.
|
|\
| |
| | |
More 0xb work
|
| | |
|
|/
|
|
|
|
|
| |
Still making things nicer for #370
Pulling wasm-linker into its own file also necessitated pulling asm_v_wasm.h into a cpp file. It goes into a new lib directory, src/asmjs.
No actual code changes in this PR.
|
|
|
|
|
| |
Follow-on from #372. Probably we should do even better for error
handling, and that might mean a cpp file in support, but for now this is
a small improvement.
|
|
|
|
|
| |
This is the first of a couple of refactorings in for #370
No functionality change, and minimal code change to make it work.
|
|
|
|
| |
just one core, since then we run it all on the main thread anyhow
|
| |
|
|
|
|
| |
* allow traversals to mark themselves as function-parallel, in which case we run them using a thread pool. also mark some thread-safety risks (interned strings, arena allocators) with assertions they modify only on the main thread
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Properly align the stack pointer
By default (if no global base is given) the global base is 1, which
seems wrong. In this case the stack pointer gets an address of 1, which
is unaligned and definitely wrong. So, start the global base at 0 instead of
1 by default and align the stack pointer. Also factor allocation of
statics into a function.
* unconditionally allocate stack pointer; explicitly reserve address 0
|
| |
|
| |
|