summaryrefslogtreecommitdiff
path: root/src/passes/GlobalRefining.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-05-17 16:05:58 -0700
committerGitHub <noreply@github.com>2024-05-17 23:05:58 +0000
commit4e9f4953a2e5968c402eb2e950252294cfa02460 (patch)
tree8bb2abf0542fb1041ded4588ed218cfc74a769fe /src/passes/GlobalRefining.cpp
parentf4a83dd7370021caea7d3b4f97031e206a3ac223 (diff)
downloadbinaryen-4e9f4953a2e5968c402eb2e950252294cfa02460.tar.gz
binaryen-4e9f4953a2e5968c402eb2e950252294cfa02460.tar.bz2
binaryen-4e9f4953a2e5968c402eb2e950252294cfa02460.zip
Fix GlobalRefining's handling of gets in module code and add missing validation (#6603)
GlobalRefining did not traverse module code, so it did not update global.gets in other globals. Add missing validation that actually errors on that: We did not check global.get types. These could be separate PRs but it would be difficult to test them separately.
Diffstat (limited to 'src/passes/GlobalRefining.cpp')
-rw-r--r--src/passes/GlobalRefining.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/passes/GlobalRefining.cpp b/src/passes/GlobalRefining.cpp
index 129f34283..1313421d5 100644
--- a/src/passes/GlobalRefining.cpp
+++ b/src/passes/GlobalRefining.cpp
@@ -143,8 +143,9 @@ struct GlobalRefining : public Pass {
ReFinalize().walkFunctionInModule(curr, &wasm);
}
}
- };
- GetUpdater(*this, *module).run(getPassRunner(), module);
+ } updater(*this, *module);
+ updater.run(getPassRunner(), module);
+ updater.runOnModuleCode(getPassRunner(), module);
}
};