Fix determinism bug when mapping type names (#8956)
When we rewrite module types, we must associate the old type names and indices with the new types they are being mapped to. The code for this was previously sensitive to the iteration order over the old-to-new type map because it modified the module's type names as it traversed them and because visitation order determined which name was kept in cases where multiple old types map to the same new type. Fix both problems by keeping the lesser names and indices in the case of merges and by not updating the module type names until after the new type names have been fully populated.
T
Thomas Lively committed
16272bac649b8f93682cebd0cd7fce6e3834c286
Parent: a979100
Committed by GitHub <noreply@github.com>
on 7/30/2026, 8:58:23 PM