diff options
author | Sohail Somani <me@sohailsomani.com> | 2016-03-12 19:48:25 -0500 |
---|---|---|
committer | Sohail Somani <me@sohailsomani.com> | 2016-03-12 20:03:55 -0500 |
commit | d5a7f3ffe79a8c1169d40b21fb2d56f5ec1ab17f (patch) | |
tree | a9e385f1b99173779df3064f8ab32e3fc3dbaf8b | |
parent | 7702b4f1b46939c31666e0684f4db7d72f80e04f (diff) | |
download | binaryen-d5a7f3ffe79a8c1169d40b21fb2d56f5ec1ab17f.tar.gz binaryen-d5a7f3ffe79a8c1169d40b21fb2d56f5ec1ab17f.tar.bz2 binaryen-d5a7f3ffe79a8c1169d40b21fb2d56f5ec1ab17f.zip |
binaryen-shell does not have --print-before/after, only --print
-rw-r--r-- | README.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -55,16 +55,16 @@ bin/binaryen-shell [.wast file] [options] [passes, see --help] [--help] The binaryen shell receives a .wast file as input, and can run transformation passes on it, as well as print it (before and/or after the transformations). For example, try ```` -bin/binaryen-shell test/passes/lower-if-else.wast --print-before +bin/binaryen-shell test/passes/lower-if-else.wast --print ```` That will pretty-print out one of the test cases in the test suite. To run a transformation pass on it, try ```` -bin/binaryen-shell test/passes/lower-if-else.wast --print-before --print-after --lower-if-else +bin/binaryen-shell test/passes/lower-if-else.wast --print --lower-if-else ```` -The `lower-if-else` pass lowers if-else into a block and a break. You can see the change the transformation causes by comparing the print before versus after. +The `lower-if-else` pass lowers if-else into a block and a break. You can see the change the transformation causes by comparing the output of the two print commands. It's easy to add your own transformation passes to the shell, just add `.cpp` files into `src/passes`, and rebuild the shell. For example code, take a look at the [`lower-if-else` pass](https://github.com/WebAssembly/binaryen/blob/master/src/passes/LowerIfElse.cpp). |