summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--test/example/find_div0s.cpp9
2 files changed, 10 insertions, 3 deletions
diff --git a/README.md b/README.md
index ee9f0aaa6..5d90644b4 100644
--- a/README.md
+++ b/README.md
@@ -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";