summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-07 19:09:05 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-07 19:09:05 -0700
commit0a03aacd4ea32476714066eebe0cded77c87ca66 (patch)
tree4ec1b99e7dae8f43cdcf4f2baccf5dee0b5e6a11 /src
parente98b5a7d1866a9f29c5bf06a9b231894222ad30b (diff)
downloadbinaryen-0a03aacd4ea32476714066eebe0cded77c87ca66.tar.gz
binaryen-0a03aacd4ea32476714066eebe0cded77c87ca66.tar.bz2
binaryen-0a03aacd4ea32476714066eebe0cded77c87ca66.zip
blocks must mark as branching in effects analyzer, as control flow can join there if the end of the block was branched to
Diffstat (limited to 'src')
-rw-r--r--src/ast_utils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ast_utils.h b/src/ast_utils.h
index 190b2876e..bf42d10e1 100644
--- a/src/ast_utils.h
+++ b/src/ast_utils.h
@@ -61,6 +61,7 @@ struct EffectAnalyzer : public WasmWalker<EffectAnalyzer> {
|| (accessesMemory() && (other.writesMemory || other.calls)) || (accessesLocal() && other.writesLocal);
}
+ void visitBlock(Block *curr) { branches = true; }
void visitIf(If *curr) { branches = true; }
void visitBreak(Break *curr) { branches = true; }
void visitSwitch(Switch *curr) { branches = true; }