| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
| |
Carrying over renames from WebAssembly/bulk-memory-operations#46
|
| |
|
|
|
|
|
|
|
|
| |
This huge PR does all the renaming as described in issue #933. It also
updates to the latest testsuite so the new names are used.
The old names of the MVP instructions are still supported for
convenience (though we should remove those too at some point), but the
old simd and atomic instruction names are no longer supported.
|
|
|
| |
This is useful for finding large functions with wasm-objdump.
|
|
|
|
|
| |
This field was recently added:
https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
|
|
|
|
|
| |
See: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
|
|
|
|
|
|
| |
return_call
return_call_indirect
with some simple tests thereof.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit starts to add support in wabt's various tools for the
upcoming [bulk memory proposal][1]. This is based off the current
proposal's overview, although these may get tweaked over time!
This is also the first time I've significantly contributed to wabt, and
what I thought would be a relatively simple addition ended up being much
larger than I imagined! I didn't add many negative tests yet but if more
tests are desired please let me know!
[1]: https://github.com/webassembly/bulk-memory-operations
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`ErrorHandler` complicated all error handling in wabt, since it was
callback-based. Callbacks would be useful if we ever wanted to change
behavior when an error occurred, but instead all that the handler ever
did was write the errors to stdout/stderr or to a buffer.
This change adds a new class `Error`, which contains an `ErrorLevel`, a
`Location` and an error message. It also replaces ErrorHandler with
`Errors` (a typedef for `std::vector<Error>`), and adds a couple of
functions that can format a list of `Errors` for output:
`FormatErrorsTo{String,File}`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the `--enable-multi-value` flag to enable.
A lot of code already "worked" with multi-value, and just needed to
remove the restrictions. Most of the other changes are modifying the
callback APIs to be more general, e.g. taking more than 1 result type.
* Types are now stored as the negative values; this works nicely with
the encoding of inline function types (used for block signatures),
which are always positive values.
* Remove `BlockSignature` and use `BlockDeclaration` instead, which
is just a typedef to `FuncSignature`. This allows for explicit or
implicit type specifications on the block signatures.
* Allow for >1 "keep" values in the DropKeep interpreter instruction
|
| |
|
|
|
|
|
|
|
|
|
| |
`grow_memory` -> `memory.grow`
`current_memory` -> `memory.size`
This could have been a smaller change, but I took the opportunity to
rename the Token types, Expr types, and callback functions too. Many of
these are sorted alphabetically, so I resorted based on their new names.
|
| |
|
|
|
|
|
|
|
| |
The previous message said "error", which makes it look like the output
is not created, so change the message to "warning" instead.
The error handling code is pretty ugly and can use a refactor, but that
would be a much larger change.
|
|
|
|
| |
Also add parsing of linking metadata version.
|
| |
|
|
|
|
| |
I also fixed some for/if to use braces if I noticed it. This is a
non-functional change.
|
| |
|
|
|
|
|
| |
Including:
1. All necessary code for SIMD lanes accessing.
2. i8x16.extract_lane_s implementation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented:
* Parsing `try`, `if_except`, `throw`, `rethrow`
* Validation
* Binary and text output
Still missing:
* `except_ref` for locals
* Interpreter implementation
|
| |
|
|
|
|
|
|
| |
Also remove support for DataAlignment which was removed
from the "spec" (Linking.md) and only output DataSize
if its non-zero.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an initial PR for Wabt simd support.
This PR only implement the v128.const instruction.
It will construct a simd 128-bits const.
The expected wat format is:
v128.const i32 0x00000000 0x11111111 0x22222222 0x33333333
For simplify, this PR only implement the wat2wasm and wasm2wat functions.
The following PRs will implement the full functions in Wabt.
such as: Interp, objdump, logging, etc....
|
|
|
|
| |
This was recently changed in the spec.
|
| |
|
|
|
| |
This implements everything except the interpreter.
|
|
|
|
|
|
|
|
| |
This adds support for all atomic instructions, enabled via the
`--enable-threads` flag.
It supports all tools: parsing text, decoding binary, validation, and
interpreting. It does not currently ensure that the memory is marked as
shared; that flag is not supported in wabt yet.
|
|
|
|
| |
Most classes already did this, but there were some that needed to be
fixed.
|
| |
|
|
|
| |
This way the names won't conflict with other headers with the same name.
|
|
|
|
| |
Pass string_view by value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Save state.
* Start changing binary reader to handle exceptions.
* Add framework for parsing binary IR.
* Initial binary reader for exceptions working.
* Add no-fold option to wasm2wast.
* Remove unnecessary code change.
* Completed implementation of binary reader.
* Added round trip tests.
* Fix issue caused by merge with master.
* Fix for exprlist change.
* Fix nits and add error messages if exceptions not allowed.
* Fix issues raised by binji.
* Initialize label in OnTryExpr.
|
| |
|
|
|
|
| |
This removes the use of setjmp/longjmp as well.
|
|
|
|
| |
Also print Index types as decimal rather than hex
since this seems to be the convention elsewhere.
|
|
|
|
|
|
|
|
|
|
|
|
| |
An `Index` is an index into one of the WebAssembly index spaces. It also
is used for counts for these spaces, as well as parameter counts and
result counts.
An `Address` is an index into linear memory, or the size of a data
region in linear memory.
An `Offset` is an offset into the host's file or memory buffer.
This fixes issue #322.
|
|
|
|
|
|
|
|
| |
For data segments, print the file offsets so they match
the file offsets shown when dumping relocations.
For relocations, only show the addend when one is present
and correctly display negative addends in the same way that
objdump does (e.g. symbol_foo-0x10 and symbol_foo+0x10)
|
| |
|
|
This adds a few new classes:
* BinaryReader: the abstract base class
* BinaryReaderNop: implements all of BinaryReader, but does nothing
* BinaryReaderLogging: logs calls through BinaryReader, and forwards to
another BinaryReader
Typically this means we can remove the Context structs from these
implementations, since that data can just move into the BinaryReader
subclasses.
I also took the opportunity to rename the new member functions to
MixedCase instead of snake_case, since that's more common in C++.
|