| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
This makes things easier for users and packagers of libwabt.
|
|
|
|
|
|
|
| |
Use the text format convention of putting the table before the
type. Also track type names so they can be reported along with
the table name, if available.
Fixes: #1865
|
|
|
|
|
| |
Now that we have C++17 we don't need our own string_view class anymore.
Depends on #1825
|
|
|
| |
Fixes #1815
|
| |
|
|
|
| |
Currently implemented just for disassembly. It could be added for other sections/functionality in the future.
|
|
|
|
|
|
|
|
|
|
|
| |
We recently decided to change 'event' to 'tag', and 'event section' to
'tag section', out of the rationale that the section contains a
generalized tag that references a type, which may be used for something
other than exceptions, and the name 'event' can be confusing in the web
context.
See
- https://github.com/WebAssembly/exception-handling/issues/159#issuecomment-857910130
- https://github.com/WebAssembly/exception-handling/pull/161
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We add relocations for table numbers on each place where we reify a
table number (call_indirect, table.get, table.set...), but only if
reference types are enabled.
Also, fix symbol table generation with unnamed definitions, to allow for
relocating references to anonymous functions or tables.
As tests, add variants of the relocations and symbol-tables dump tests,
with and without all features enabled. Enabling reference types causes
relocs to be emitted. We also add --details to the relocations dump
tests, so that we can see the target symbols for the relocations.
|
|
|
|
| |
Fixes: #1520
|
|
|
|
| |
Use `ObjdumpNames` struct to share similar code for mapping indexes to
names.
|
| |
|
|
|
|
|
|
| |
* Added except_ref to be legal in a block type signature
* Added more support for event symbols.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Objdump should really make a best effort to display
anything its given. There are other tools that are
better suited for validation.
|
|
|
| |
This way the names won't conflict with other headers with the same name.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add saturating truncation operators as described here:
https://github.com/webassembly/nontrapping-float-to-int-conversions.
This change also codifies the mechanism for enabling new WebAssembly features
by passing the `Features` object. Opcode now has a `IsEnabled(const Features&)`
member function to query if the opcode is enabled. This means that the
`--future-exceptions` flag has been renamed to `--enable-exceptions` for
consistency. Checking whether the feature is enabled always happens at input;
either WastParser or BinaryReader.
|
|
|
|
| |
There are no functional changes.
|
|
|
|
|
|
|
|
| |
* Allow wasm-objdump to handle exceptions.
* Fix writing exception section.
* Make wasm-objdump handle exceptions, and add tests.
|
|
|
|
|
|
|
| |
Use the virtual address (init offset) when display
the data rather that the file offset.
Show the segment size in the header.
|
|
|
|
|
| |
Also, use C++ constructor inheritance to avoid some
boilerplate constructors.
|
|
|
|
| |
This mimick how objdump behaves. Also makes the code more
readable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This propagates through a lot of code since std::vector will call
constructors and destructors. In particular, this CL adds many default
constructors and destructors to previously POD types. Many of them are
only there to construct `Var` and `StringSlice` types, so they likely
can be removed when those have their own constructors.
Since unions members cannot contain constructors or destructors
(without additional implementation), this CL changes those members to
pointers instead. (Perhaps in a future CL these will be std::variant
instead of union, so the members can be value types again.)
|
|
|
|
|
|
|
|
|
|
|
| |
This brings wabt into line with what llvm is now
producing and what is soon that land in the
tool-conventions "spec" for static linking.
Adds 'index' and (options) 'addend' to relocations.
Define Reloc in common.h rather than once for each
tool.
|
|
|
|
|
| |
Enable logging in the binary reader when the --debug
flag is passed to wasmdump and wasm-link
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly this involves adding additional casts. Though there are a few
more substantial changes:
* The default method for relocating parser stacks no longer works
because Bison assumes that C++ values can't be memcpy'd. Ours can, but
there's no easy way to make the generated code do the right thing, so
we do it manually
* Removed all uses of WabtBool and replaced with bool
* Renamed all uses of export and mutable -> export_ and mutable_
* Casting an invalid value to an enum triggers ubsan, so we have to be a
little more careful about when we do it (see binary-reader.c:read_sections())
* It's illegal to forward-declare enums, so we just #include instead.
* Designated initializers are not allowed in g++, so we have to switch
them to lazily initialized structures instead. Pretty horrible, so it
will be nice to have a better solution for C++.
|
|
|
|
| |
It complicates the code everywhere. It's faster to use a stack
allocator, but not worth the trouble for maintainability.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Improve wasmdump command line options
These changes make wasmdump more closely match objdump.
Change -v/--verbose to -x/--details. Change -r/--raw to
-s/--full-contents. Error out unless on of -x/-d/-r/-h is
specified. Previously wasmdump would simply print nothing
at all which was confusing.
|
|
|