diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-11 20:49:51 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-11 20:49:51 -0800 |
commit | e53badb26a1a3d2de0c7df30bb7e656299d91b21 (patch) | |
tree | e8a349ca330abdb939b8c78e2f1a932f34ea27ee | |
parent | d66ced45eeab6f890972a4789789164f026cb259 (diff) | |
download | binaryen-e53badb26a1a3d2de0c7df30bb7e656299d91b21.tar.gz binaryen-e53badb26a1a3d2de0c7df30bb7e656299d91b21.tar.bz2 binaryen-e53badb26a1a3d2de0c7df30bb7e656299d91b21.zip |
text
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | test/example/find_div0s.cpp | 9 |
2 files changed, 10 insertions, 3 deletions
@@ -127,7 +127,7 @@ The `check.py` script supports some options: Same as Emscripten: MIT license. -(parts of `src/` are synced with `tools/optimizer/` in the main emscripten repo, for convenience) +(`src/emscripten-optimizer` is synced with `tools/optimizer/` in the main emscripten repo, for convenience) ## TODO @@ -138,5 +138,5 @@ Same as Emscripten: MIT license. **Binaryen** is a combination of **binary** - since WebAssembly is a *binary* format for the web - and **Emscripten** - which it can integrate with in order to compile C and C++ all the way to WebAssembly, via asm.js. Binaryen began as Emscripten's WebAssembly processing library (`wasm-emscripten`). -"Binaryen" is pronounced [in the same manner](http://www.makinggameofthrones.com/production-diary/2011/2/11/official-pronunciation-guide-for-game-of-thrones.html) as "[Targaryen](https://en.wikipedia.org/wiki/List_of_A_Song_of_Ice_and_Fire_characters#House_Targaryen)": bi-NAIR-ee-in. +"Binaryen" is pronounced [in the same manner](http://www.makinggameofthrones.com/production-diary/2011/2/11/official-pronunciation-guide-for-game-of-thrones.html) as "[Targaryen](https://en.wikipedia.org/wiki/List_of_A_Song_of_Ice_and_Fire_characters#House_Targaryen)": bi-NAIR-ee-in. Valar Morcodeis. diff --git a/test/example/find_div0s.cpp b/test/example/find_div0s.cpp index 77a5d2c61..be273390f 100644 --- a/test/example/find_div0s.cpp +++ b/test/example/find_div0s.cpp @@ -1,11 +1,18 @@ +// +// Tiny example, using Binaryen to walk a WebAssembly module in search +// for direct integer divisions by zero. To do so, we inherit from +// WasmWalker, and implement visitBinary, which is called on every +// Binary node in the module's functions. +// + #include <ostream> #include <wasm.h> using namespace wasm; int main() { - // A module with a function with a division by zero in the body + // A module with a function with a division by zero in the body. Module module; Function func; func.name = "func"; |