| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Stuff like x + 5 != 2 => x != -3.
Also some cleanups of utility functions I noticed while writing this, isTypeFloat => isFloatType.
Inspired by
https://github.com/golang/go/blob/master/src/cmd/compile/internal/ssa/gen/generic.rules
|
|
|
|
| |
* rename WasmType to Type. it's in the wasm:: namespace anyhow, and without Wasm- it fits in better alongside Index, Address, Expression, Module, etc.
|
| |
|
|
|
|
|
|
| |
* fix interpreted code from wasm.js, when the result is none, we must return an empty Literal (the interpreter now asserts on this, it didn't before)
* update js builds
|
|
|
| |
This PR adds global variable support (addGlobal, getGlobal, setGlobal), host operations (currentMemory, growMemory), a few utility functions (removeImport, removeExport, getFunctionTypeBySignature with the latter being scheduled for removal once a better alternative is in place) and it introduces an additional argument to specify the result type in BinaryenBlock (effectively breaking the C-API but retaining previous behaviour by introducing the BinaryenUndefined() type for this purpose). Additionally, it enables compilation with exception support in build-js.sh as exceptions are thrown and caught when optimizing endless loops, intentionally resulting in an unreachable opcode. Affected test cases have been updated accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Always use scripts.test.shared for bin paths.
Update scripts/test/shared.py to add WASM_MERGE relative to build
directory. Update auto_update_tests.py to use scripts.test.shared
variables for all bin paths. Update check.py to use
scripts.test.shared for wasm-merge path (this was missing).
This allows check.py and auto_update_tests.py to be run from the
source directory using built binaries in a different location.
* --no-legalize-javascript-ffi disables JS FFI mangling.
For JS/Web platform, calls to JS imports are wrapped to convert i64 to
i32 and f32 to f64. Likewise calls from JS into exports do the inverse
wrapping. This change provides an option to disable that wrapping and
use the original types for the call.
Includes tests test/noffi_f32.asm.js and test/noffi_i64.asm.js to make
sure neither f32->f64 nor i64->i32 type mangling is happening when
--no-legalize-javascript-ffi is specified.
To fully disable JS FFI mangling when using emscripten, the fastcomp
FFI mangling must also be disabled using the
-emscripten-legalize-javascript-ffi=0 flag.
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move WasmType function implementations to wasm.cpp
* Move Literal methods to wasm.cpp
* Reorder wasm.cpp shared constants back to top
* Move expression functions to wasm.cpp
* Finish moving things to wasm.cpp
* Split out Literal into its own .h/.cpp. Also factor out common wasm-type module
* Remove unneeded/transitive includes from wasm.h
* Add comment to try/check methods
* Rename tryX/checkX methods to getXOrNull
* Add missing include that should fix appveyor build breakage
* More appveyor
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse file/line comments in asm.js into debug intrinsics
* convert debug intrinsics into annotations, and print them
* ignore --debuginfo if not emitting text, as wasm binaries don't support that yet
* emit full debug info when -g and emitting text; when -g and emitting binary, all we can do is the Names section
* update wasm.js
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add support for i64.store[N]
Previously storing i64 in the interpreter assumed an 8byte store. Stores
like i64.store8 would then use the special-case i64 storing code, when
they could just use the i32.store8 code.
* Add printf test for interpreter
* Update wasm.js
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* support i64 intrinsics from fastcomp, adding --wasm-only flag
* refactor callImport logic in asm2wasm to avoid recomputing wasm types again
* legalize illegal i64 params in exports and imports
* do safe i64 binary ops depending on precision
* fix addVar, only assert on names if we are using a name
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
address usage in wasm.js
|
| |
|
| |
|
|
|
|
| |
bits were trampled before we read them (#460)
|
| |
|
| |
|
|
|
|
| |
the distinction is not really that useful, and passes do need to allocate, so we would need to pass around AllocatingModules all around anyhow. (#361)
|
| |
|
| |
|
| |
|
|
|
|
| |
called
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The AST and everything that uses it treats the values as
pages. Javascript continues to use bytes.
This matches v8 and sexpr-wasm, and the consensus from live discussion
and PR209 in the spec.
|
|
|
|
| |
a memory like in the native code path
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
which is necessary for simple binary writing
|
| |
|