summaryrefslogtreecommitdiff
path: root/test/example/find_div0s.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-11 13:40:07 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-11 13:40:07 -0700
commit65d9334b3066bae667e729f3202f7aa2d7c11530 (patch)
tree1e7b14252f63ee760810aac3c5727bae0edf7362 /test/example/find_div0s.cpp
parent675c045de41d609e431a5b97f8b00fe433dd18cd (diff)
downloadbinaryen-65d9334b3066bae667e729f3202f7aa2d7c11530.tar.gz
binaryen-65d9334b3066bae667e729f3202f7aa2d7c11530.tar.bz2
binaryen-65d9334b3066bae667e729f3202f7aa2d7c11530.zip
De-recurse traversals (#333)
* refactor core walking to not recurse * add a simplify-locals test * reuse parent's non-branchey scan logic in SimpleExecutionWalker, reduce code duplication * update wasm.js * rename things following comments
Diffstat (limited to 'test/example/find_div0s.cpp')
-rw-r--r--test/example/find_div0s.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/example/find_div0s.cpp b/test/example/find_div0s.cpp
index 22707f9ca..9f1cf911f 100644
--- a/test/example/find_div0s.cpp
+++ b/test/example/find_div0s.cpp
@@ -2,7 +2,7 @@
//
// 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
+// PostWalker, and implement visitBinary, which is called on every
// Binary node in the module's functions.
//
@@ -39,7 +39,7 @@ int main() {
// Search it for divisions by zero: Walk the module, looking for
// that operation.
- struct DivZeroSeeker : public WasmWalker<DivZeroSeeker> {
+ struct DivZeroSeeker : public PostWalker<DivZeroSeeker> {
void visitBinary(Binary* curr) {
// In every Binary, look for integer divisions
if (curr->op == BinaryOp::DivS || curr->op == BinaryOp::DivU) {