Skip to content

Conversation

kripken
Copy link
Member

@kripken kripken commented Apr 9, 2024

Previously we did not optimize a struct or an array with a packed field. As a result a
single packed field in a struct prevented the entire struct from being localized,
which this fixes. This is also useful for arrays as packed arrays are common (e.g. for
string data).

@kripken kripken requested a review from tlively April 9, 2024 20:44
return false;
}
return true;
return TypeUpdating::canHandleAsLocal(field.type);
Copy link
Member

Choose a reason for hiding this comment

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

FWIW this is always true, and I can't imagine that we would allow a future proposal to make this anything but true.

@kripken kripken merged commit 738e8fc into WebAssembly:main Apr 9, 2024
@kripken kripken deleted the heap2local.3 branch April 9, 2024 22:31
kripken added a commit that referenced this pull request Apr 10, 2024
In #6480 I forgot that StructGet can be signed, which means we need to emit a sign-extend. Arrays already copied the field as part of Array2Struct.
@gkdn gkdn mentioned this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants