| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Previously the Print pass searched the imports for a table import and skipped printing a local table declaration if found. Instead this refactors to make importation explicit, and also create importation records (previously we were inconsistent about whether such records were created in the IR depending on the wast syntax).
|
| |
|
|
|
|
| |
anyhow, and it just adds overhead to not ignore it
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
In wast files, the spec and WABT require imports to appear before any
non-import definitions (see also
https://github.com/WebAssembly/wabt/issues/152). This patch re-orders
visitModule in the wast printer to meet this requirement, and more or
less match the order of the binary sections. Also remove extraneous
whitespace around table definitions.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Support block signatures in s2wasm's .s format
* Autogenerate tests
* update cfg-stackify tests
* Remove conflict files
|
|
|
|
| |
Corresponds to LLVM change https://reviews.llvm.org/D25122, r283502
|
|
|
|
| |
Corresponds to LLVM change https://reviews.llvm.org/D25122
|
| |
|
|
|
|
|
| |
* fix a dce bug where it is invalid to truncate a block if it leaves a final element with a bad type (wasm doesn't always allow removing unreachable code)
* add wast pass fuzzer
|
| |
|
|
|
|
| |
Also skip binary roundtrip on stacky spec tests
|
|
|
|
|
| |
For compatibility with 0xc
Also update opcode for get_global
|
|
|
|
|
|
|
|
|
|
| |
* Update i64 stores for 0xc
* Update autogenerated LLVM tests
* Update known torture test failures
* Add i64.store32 test to unit.wast
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refine tables to explicitly exist or not. Previously they were printed
or encoded if it had any segments, or an initial or max size. However
tables can be defined but empty, so we had a special hack that defined
an empty segment when we really just wanted an empty table. Now, just
make the existence explicit.
Update Function table encoding for 0xc (Table and Element sections)
Add end opcodes after function bodies (these are consumed by
getMaybeBlock with the same behavior that it had before when it reached
the function end, so no explicit decode)
Update call_indirect encoding for 0xc (no arity, call target is last)
|
|
|
|
| |
isn't a default (#734)
|
| |
|
|
|
|
| |
* document and clean up validation options
|
|
|
|
|
|
| |
* use new WebAssembly.Instance/Module API
* detect presence of wasm with WebAssembly object
|
| |
|
| |
|
|
|
|
|
|
| |
* wasm-only loads and stores
* wasm-only 32-bit bitcasts
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
Previously a table was only created if there were any address-taken
functions. New module validation rules require the existence of
a table for any call-indirects to validate (even if they are dead and
never called). However this use case seems common enough that we might
want to make it continue to work. So the linker now always creates an empty table segment (indicating an empty table).
|
| |
|
|
|
|
|
| |
Otherwise when we export it as "$0" it's an undefined name.
The spec interpreter actually rejects this, although I think it's
intended to work, given the tests in export.wast. wabt also accepts it.
|
| |
|
|
|
| |
Fixes #708
|
|
|
|
|
|
| |
* type check using block/loop/if types provided in text and binary formats.
* print if and loop sigs which were missing.
* remove dsl from OptimizeInstructions as after those changes it needs rethinking.
|
|
|
|
|
|
| |
Also updates the tests and has a few other changes for binary 0xc:
Update nop/unrechable opcodes
Fix for "name" section
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Autodrop fixes
|
| |
| |
| |
| | |
value
|
| | |
|
| | |
|
|/
|
|
|
| |
* Call instructions no longer encode the arity
* Segments encode the linear memory index (0 for MVP)
|
|
|
|
|
|
| |
Updates section headers and formats for type, import, function, table,
memory, and export sections, as well as "names" section, which is now a
user section.
|
| |
|
| |
|
| |
|
| |
|
| |
|