Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Oct 22, 2025

When updating field names, that pass looped over the number of
field names. If all fields are named, that is fine, but if only some are,
we did not reach later ones.

Fixes #7982

for (Index i = 0; i < oldFieldNames.size(); i++) {
for (Index i = 0; i < indexesAfterRemoval.size(); i++) {
auto newIndex = indexesAfterRemoval[i];
if (newIndex != RemovedField && oldFieldNames.count(i)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use oldFieldNames.find() to remove the number of map lookups while we're here.

@kripken kripken merged commit 04930ab into WebAssembly:main Oct 23, 2025
16 checks passed
@kripken kripken deleted the gto.partname branch October 23, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep field names of struct types when changing/merging types

2 participants