summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-13 12:34:55 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-03-13 12:34:55 -0700
commita1287af38f12b5ba3d2874424f67289fe1ea49e7 (patch)
treea9e385f1b99173779df3064f8ab32e3fc3dbaf8b
parent7702b4f1b46939c31666e0684f4db7d72f80e04f (diff)
parentd5a7f3ffe79a8c1169d40b21fb2d56f5ec1ab17f (diff)
downloadbinaryen-a1287af38f12b5ba3d2874424f67289fe1ea49e7.tar.gz
binaryen-a1287af38f12b5ba3d2874424f67289fe1ea49e7.tar.bz2
binaryen-a1287af38f12b5ba3d2874424f67289fe1ea49e7.zip
Merge pull request #245 from kingcheez/master
binaryen-shell does not have --print-before/after, only --print
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index a48ff1c60..9ea4265ec 100644
--- a/README.md
+++ b/README.md
@@ -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).