From 3ddf9405cf887c1e0e0034b364c453e7c31acf4c Mon Sep 17 00:00:00 2001 From: jgravelle-google Date: Thu, 23 Feb 2017 10:22:02 -0800 Subject: Default Walker subclasses to using Visitor (#921) Most module walkers use PostWalker>, let that pattern be expressed as simply PostWalker --- src/ast_utils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ast_utils.h') diff --git a/src/ast_utils.h b/src/ast_utils.h index 35ad96987..00b755bf7 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -27,7 +27,7 @@ namespace wasm { // Finds if there are breaks targeting a name. Note that since names are // unique in our IR, we just need to look for the name, and do not need // to analyze scoping. -struct BreakSeeker : public PostWalker> { +struct BreakSeeker : public PostWalker { Name target; Index found; WasmType valueType; @@ -70,7 +70,7 @@ struct BreakSeeker : public PostWalker> { // Look for side effects, including control flow // TODO: optimize -struct EffectAnalyzer : public PostWalker> { +struct EffectAnalyzer : public PostWalker { EffectAnalyzer(PassOptions& passOptions, Expression *ast = nullptr) { ignoreImplicitTraps = passOptions.ignoreImplicitTraps; if (ast) analyze(ast); @@ -350,7 +350,7 @@ struct ExpressionAnalyzer { // Finalizes a node -struct ReFinalize : public WalkerPass>> { +struct ReFinalize : public WalkerPass> { ReFinalize() { name = "refinalize"; } void visitBlock(Block *curr) { curr->finalize(); } @@ -380,7 +380,7 @@ struct ReFinalize : public WalkerPass // Adds drop() operations where necessary. This lets you not worry about adding drop when // generating code. -struct AutoDrop : public WalkerPass>> { +struct AutoDrop : public WalkerPass> { bool isFunctionParallel() override { return true; } Pass* create() override { return new AutoDrop; } -- cgit v1.2.3