summaryrefslogtreecommitdiff
path: root/src/binary-reader-logging.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename {memory,table}.drop to {data,elem}.drop (#1000)Alex Crichton2019-01-301-2/+2
| | | Carrying over renames from WebAssembly/bulk-memory-operations#46
* Implement parsing and writing of DataCount section (#998)Ben Smith2019-01-231-0/+4
|
* The great renaming (#985)Ben Smith2018-12-191-9/+9
| | | | | | | | 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.
* Pass function body size in BinaryReader callback (#975)Ben Smith2018-12-121-1/+1
| | | This is useful for finding large functions with wasm-objdump.
* Add needed_dynlibs to dylink section (#974)Sam Clegg2018-12-121-0/+2
| | | | | This field was recently added: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
* Add support for dylink section (#955)Sam Clegg2018-11-141-0/+7
| | | | | See: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
* Implemented tail call instructions: (#926)Francis McCabe2018-10-121-0/+2
| | | | | | return_call return_call_indirect with some simple tests thereof.
* Add bulk memory opcode definitions (#927)Alex Crichton2018-10-121-2/+9
| | | | | | | | | | | | 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
* Replace ErrorHandler with Errors and FormatErrors*Ben Smith2018-09-041-1/+1
| | | | | | | | | | | | | `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}`.
* Add support for multi-value proposal (#861)Ben Smith2018-06-141-8/+7
| | | | | | | | | | | | | | | 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
* Add support for new relocation types used in DWARF sections (#846)Sam Clegg2018-05-291-0/+3
|
* Update spec tests; rename {grow,current}_memory (#849)Ben Smith2018-05-271-2/+2
| | | | | | | | | `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.
* Remove old sub-sections types from linking section (#840)Sam Clegg2018-05-171-2/+0
|
* Print "warning" for ignored custom section errors (#843)Ben Smith2018-05-161-1/+1
| | | | | | | 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.
* Refer to target section by index in relocation section (#830)Sam Clegg2018-05-031-3/+1
| | | | Also add parsing of linking metadata version.
* Read and write module names in the names section (#831)Ben Smith2018-05-011-0/+4
|
* Run clang-format over all the files (#814)Ben Smith2018-03-161-8/+4
| | | | I also fixed some for/if to use braces if I noticed it. This is a non-functional change.
* SIMD v8x16.shuffle implementation. (#811)lizhengxing2018-03-151-0/+1
|
* Simd i8x16.extract_lane_s instruction implementation. (#802)lizhengxing2018-03-131-0/+1
| | | | | Including: 1. All necessary code for SIMD lanes accessing. 2. i8x16.extract_lane_s implementation.
* Add support for new symbol table format (#769)Sam Clegg2018-03-051-2/+16
|
* WIP on support for level1 exception spec (#773)Ben Smith2018-03-021-3/+5
| | | | | | | | | | | | Implemented: * Parsing `try`, `if_except`, `throw`, `rethrow` * Validation * Binary and text output Still missing: * `except_ref` for locals * Interpreter implementation
* SIMD v128.bitselect instruction implementation. (#759)lizhengxing2018-02-191-0/+1
|
* Add support for init function in linking metadata (#699)Sam Clegg2018-01-021-1/+2
| | | | | | Also remove support for DataAlignment which was removed from the "spec" (Linking.md) and only output DataSize if its non-zero.
* Wabt simd v128.const instruction initial PR: (#677)lizhengxing2017-12-151-0/+3
| | | | | | | | | | | | | 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....
* Rename {wake,wait} -> atomic.{wake,wait} (#672)Ben Smith2017-11-211-6/+6
| | | | This was recently changed in the spec.
* wasm-objdump: Add support for data segment info (#656)Sam Clegg2017-10-171-1/+6
|
* Add `i{32,64}.wait` and `wake` operators (#646)Ben Smith2017-10-051-0/+6
| | | This implements everything except the interpreter.
* Add Atomic instructions (#633)Ben Smith2017-09-201-0/+12
| | | | | | | | 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.
* Append trailing underscore on private member names (#615)Ben Smith2017-09-071-3/+3
| | | | Most classes already did this, but there were some that needed to be fixed.
* Add support data-size and alignment linking metadata (#555)Sam Clegg2017-09-011-0/+2
|
* Always include quoted headers like "src/foo.h" (#601)Ben Smith2017-08-301-1/+1
| | | This way the names won't conflict with other headers with the same name.
* Use string_view for all BinaryReader callbacks (#561)Ben Smith2017-07-101-18/+18
| | | | Pass string_view by value.
* Extend binary reader to handle exception constructs. (#545)KarlSchimpf2017-07-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Add parsing and objdump support for updated "linking" section (#483)Sam Clegg2017-06-221-0/+6
|
* Clean up BinaryReader; rename to BinaryReaderDelegate (#451)Ben Smith2017-05-231-3/+3
| | | | This removes the use of setjmp/longjmp as well.
* [wasmdump] Display function names at call sites in disassembly (#441)Sam Clegg2017-05-191-0/+1
| | | | Also print Index types as decimal rather than hex since this seems to be the convention elsewhere.
* Use Index/Address/Offset instead of uint32_t (#433)Ben Smith2017-05-151-199/+200
| | | | | | | | | | | | 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.
* Improve wasmdump output for relocations and data segments (#406)Sam Clegg2017-04-251-1/+1
| | | | | | | | 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)
* Refactor Stream/Writer; write as C++ (#399)Ben Smith2017-04-161-1/+1
|
* Use classes + virtual functions for BinaryReader (#376)Ben Smith2017-03-301-0/+242
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++.