diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-06-02 20:20:23 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-06-02 20:20:23 -0700 |
commit | f64e1852dc065c17d7c78b43a7cfb7fbe64e3cb4 (patch) | |
tree | 571bf874365e41a50976da0d15604e5d6f1edebb /src/wasm-traversal.h | |
parent | b37bd96ea3345cf7015e9e925e0d33524cd1c3db (diff) | |
parent | e4a81f9ea487441e0c01f399d15026672fdeadf9 (diff) | |
download | binaryen-f64e1852dc065c17d7c78b43a7cfb7fbe64e3cb4.tar.gz binaryen-f64e1852dc065c17d7c78b43a7cfb7fbe64e3cb4.tar.bz2 binaryen-f64e1852dc065c17d7c78b43a7cfb7fbe64e3cb4.zip |
Merge pull request #560 from WebAssembly/func-running
Option to optimize while building modules
Diffstat (limited to 'src/wasm-traversal.h')
-rw-r--r-- | src/wasm-traversal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index 9ed02027e..e5da420b0 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -187,6 +187,7 @@ struct Walker : public VisitorType { void walkFunction(Function* func) { setFunction(func); static_cast<SubType*>(this)->doWalkFunction(func); + static_cast<SubType*>(this)->visitFunction(func); } // override this to provide custom functionality @@ -197,6 +198,7 @@ struct Walker : public VisitorType { void walkModule(Module *module) { setModule(module); static_cast<SubType*>(this)->doWalkModule(module); + static_cast<SubType*>(this)->visitModule(module); } // override this to provide custom functionality @@ -223,7 +225,6 @@ struct Walker : public VisitorType { allocated = std::unique_ptr<SubType>(instance); } instance->walkFunction(func); - instance->visitFunction(func); }; // if this is not a function-parallel traversal, run @@ -259,7 +260,6 @@ struct Walker : public VisitorType { } self->visitTable(&module->table); self->visitMemory(&module->memory); - self->visitModule(module); } // Walk implementation. We don't use recursion as ASTs may be highly |