diff options
author | Thomas Lively <tlively@google.com> | 2024-09-05 13:09:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 13:09:42 -0700 |
commit | fbbdc64a5bf69d47bab5a33b6ec148e9b79a6a84 (patch) | |
tree | 3c410ee1342ab0854e3d5c38ebd753d8b624e809 /scripts/fuzz_shell.js | |
parent | 7562a6b7da0ba517a46db1f1792677f3ebbf2a27 (diff) | |
download | binaryen-fbbdc64a5bf69d47bab5a33b6ec148e9b79a6a84.tar.gz binaryen-fbbdc64a5bf69d47bab5a33b6ec148e9b79a6a84.tar.bz2 binaryen-fbbdc64a5bf69d47bab5a33b6ec148e9b79a6a84.zip |
[NFC] Add a more powerful API for collecting heap types (#6904)
Many passes need to know both the set of all used types and also the
sets of private or public types. Previously there was no API to get both
at once, so getting both required two API calls that internally
collected all the types twice.
Furthermore, there are many reasons to collect heap types, and they have
different requirements about precisely which types need to be collected.
For example, in some edge cases the IR can reference heap types that do
not need to be emitted into a binary; passes that replace all types
would need to collect these types, but the binary writer would not. The
existing APIs for collecting types did not distinguish between these use
cases, so the code conservatively collected extra types that were not
always needed.
Refactor the type collecting code to expose a new API that takes a
description of which types need to be collected and returns the
appropriate types, their use counts, and optionally whether they are
each public or private.
Keep this change non-functional by commenting on places where the code
could be cleaned up or improved rather than actually making the changes.
Follow-up PRs will implement the improvements, which will necessarily
come with test changes.
Diffstat (limited to 'scripts/fuzz_shell.js')
0 files changed, 0 insertions, 0 deletions