summaryrefslogtreecommitdiff
path: root/src/tools/wasm-dis.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add categories to --help text (#4421)Alon Zakai2022-01-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The general shape of the --help output is now: ======================== wasm-foo Does the foo operation ======================== wasm-foo opts: -------------- --foo-bar .. Tool opts: ---------- .. The options are now in categories, with the more specific ones - most likely to be wanted by the user - first. I think this makes the list a lot less confusing. In particular, in wasm-opt all the opt passes are now in their own category. Also add a script to make it easy to update the help tests.
* Apply features from the commandline first (#3960)Alon Zakai2021-07-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested in https://github.com/WebAssembly/binaryen/pull/3955#issuecomment-871016647 This applies commandline features first. If the features section is present, and disallows some of them, then we warn. Otherwise, the features can combine (for example, a wasm may enable feature X because it has to use it, and a user can simply add the flag for feature Y if they want the optimizer to try to use it; both flags will then be enabled). This is important because in some cases we need to know the features before parsing the wasm, in the case that the wasm does not use the features section. In particular, non-nullable GC locals have an effect during parsing. (Typed function references also does, but we found a way to apply its effect all the time, that is, always use the refined type, and that happened to not break the case where the feature is disabled - but such a workaround is not possible with non-nullable locals.) To make this less error-prone, add a FeatureSet input as a parameter to WasmBinaryBuilder. That is, when building a module, we must give it the features to use while doing so. This will unblock #3955 . That PR will also add a test for the actual usage of a feature during loading (the test can only be added there, after that PR unbreaks things).
* Comment on validation in wasm-dis (#3556)Alon Zakai2021-02-101-0/+6
|
* Add feature options to wasm-dis (#3548)Abbas Mashayekh2021-02-081-4/+7
| | | | | | This will allow .fromBinary tests be executed with the desired featurs so there will be no difference between those tests and .from-wast tests. Fixes #3545
* Refactor printing code so that printing Expressions always works (#3450)Alon Zakai2020-12-171-3/+1
| | | | | | | | This avoids needing to add include wasm-printing if a file doesn't already have it. To achieve that, add the std::ostream hooks in wasm.h, and also use them when possible, removing the need for the special WasmPrinter object. Also stop printing in "full" (print types on each line) in error messages by default. The user can still get that, as always, using BINARYEN_PRINT_FULL=1 in the env.
* Use wat over wast for text format filenames (#2518)Sam Clegg2019-12-081-1/+1
|
* Convert to using DEBUG macros (#2497)Sam Clegg2019-12-041-3/+1
| | | | | | This means that debugging/tracing can now be enabled and controlled centrally without managing and passing state around the codebase.
* Allow color API to enable and disable colors (#2111)Siddharth2019-05-171-1/+1
| | | | | | This is useful for front-ends which wish to selectively enable or disable coloring. Also expose these APIs from the C API.
* clang-tidy braces changes (#2075)Alon Zakai2019-05-011-3/+6
| | | Applies the changes in #2065, and temprarily disables the hook since it's too slow to run on a change this large. We should re-enable it in a later commit.
* Apply format changes from #2048 (#2059)Alon Zakai2019-04-261-19/+35
| | | Mass change to apply clang-format to everything. We are applying this in a PR by me so the (git) blame is all mine ;) but @aheejin did all the work to get clang-format set up and all the manual work to tidy up some things to make the output nicer in #2048
* wasm-opt source map support (#1557)Alon Zakai2018-06-071-14/+2
| | | | | | | | | | * support source map input in wasm-opt, refactoring the loading code into wasm-io * use wasm-io in wasm-as * support output source maps in wasm-opt * add a test for wasm-opt and source maps
* Better binary error reporting (#1505)Alon Zakai2018-04-131-0/+2
| | | | | Report the offset with the error. Also fix a compiler warning about comparing signed/unsigned types in the LEB code.
* 'std::string &' => 'std::string& ' (#1403)Alon Zakai2018-02-051-3/+3
| | | The & on the type is the proper convention.
* Exporting/importing debug location information from .wast/.asm.js/.s formats ↵Yury Delendik2017-06-011-0/+16
| | | | | | | | (#1017) * Extends wasm-as, wasm-dis and s2wasm to consume debug locations. * Exports source map from asm2wasm
* move console tool sources into src/tools (#490)Alon Zakai2016-05-121-0/+62