diff options
author | Thomas Lively <tlively@google.com> | 2023-01-19 14:41:41 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-19 20:41:41 +0000 |
commit | 4471b81a0a0b94c75bad6e81d0413860944ecb1f (patch) | |
tree | 8487379cf5c61fffa629adbbf8696aa003e027c0 /src/tools/wasm-split/split-options.h | |
parent | 1e4d215f085316f01d1530e857640fe746517f0f (diff) | |
download | binaryen-4471b81a0a0b94c75bad6e81d0413860944ecb1f.tar.gz binaryen-4471b81a0a0b94c75bad6e81d0413860944ecb1f.tar.bz2 binaryen-4471b81a0a0b94c75bad6e81d0413860944ecb1f.zip |
[Wasm GC] Fix supertype ordering bug in GlobalTypeRewriter (#5442)
GlobalTypeRewriter made sure to order supertypes before their subtypes so that
type building would succeed, but this ordering previously did not account for
the fact that supertypes might be replaced by the type updating. When a
supertype is replaced, the replacement might not previously have had a
supertype/subtype relationship with the subtype, so it might have happened to be
ordered after the subtype.
Fix the problem by taking supertype replacements into account when ordering
types in the GlobalTypeRewriter. This requires generalizing the
`SupertypesFirst` utility in wasm-type-ordering.h to allow users to modify how
supertypes are found.
Diffstat (limited to 'src/tools/wasm-split/split-options.h')
0 files changed, 0 insertions, 0 deletions