diff options
author | Alon Zakai <azakai@google.com> | 2023-05-17 09:10:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 09:10:08 -0700 |
commit | aab5f274773f4e1567b02e6950b4d22119cf801d (patch) | |
tree | 80e6c2dc4531f6a3822eb966695e1cfd770497bd /src/ir/effects.h | |
parent | 164c62b25f52c2263455d50852ca97890ac292ee (diff) | |
download | binaryen-aab5f274773f4e1567b02e6950b4d22119cf801d.tar.gz binaryen-aab5f274773f4e1567b02e6950b4d22119cf801d.tar.bz2 binaryen-aab5f274773f4e1567b02e6950b4d22119cf801d.zip |
EffectAnalyzer: Do not clear break targets before walk()/visit() (#5723)
We depend on repeated calls to walk/visit accumulating effects, so this
was a bug; if we want to clear stuff then we create a new EffectAnalyzer.
Removing that fixes the attached testcase. Also added a unit test.
Diffstat (limited to 'src/ir/effects.h')
-rw-r--r-- | src/ir/effects.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h index b4987b12b..833da2540 100644 --- a/src/ir/effects.h +++ b/src/ir/effects.h @@ -53,14 +53,12 @@ public: // Walk an expression and all its children. void walk(Expression* ast) { - pre(); InternalAnalyzer(*this).walk(ast); post(); } // Visit an expression, without any children. void visit(Expression* ast) { - pre(); InternalAnalyzer(*this).visit(ast); post(); } @@ -1024,11 +1022,6 @@ public: } private: - void pre() { - breakTargets.clear(); - delegateTargets.clear(); - } - void post() { assert(tryDepth == 0); |