From 0a03aacd4ea32476714066eebe0cded77c87ca66 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 7 Apr 2016 19:09:05 -0700 Subject: blocks must mark as branching in effects analyzer, as control flow can join there if the end of the block was branched to --- src/ast_utils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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 { || (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; } -- cgit v1.2.3