From 65d9334b3066bae667e729f3202f7aa2d7c11530 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 11 Apr 2016 13:40:07 -0700 Subject: 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 --- test/example/find_div0s.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/example/find_div0s.cpp') 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 { + struct DivZeroSeeker : public PostWalker { void visitBinary(Binary* curr) { // In every Binary, look for integer divisions if (curr->op == BinaryOp::DivS || curr->op == BinaryOp::DivU) { -- cgit v1.2.3