-
Notifications
You must be signed in to change notification settings - Fork 217
Initial fixed size list implementation #1277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
/// Pops all fields for a fixed list off the stack and then composes them | ||
/// into an array. | ||
FixedSizeListLift { | ||
element: &'a Type, | ||
size: u32, | ||
id: TypeId, | ||
} : [*size as usize] => [1], | ||
|
||
/// Pops an array off the stack, decomposes the elements and then pushes them onto the stack. | ||
FixedSizeListLower { | ||
element: &'a Type, | ||
size: u32, | ||
id: TypeId, | ||
} : [1] => [*size as usize], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this I'll echo some of my thoughts on the sibling PRs: I think we'll want to have this with a different shape where the size of the list isn't affecting the O(...) processing here. For example this is pushing/popping the list items from the operand stack of the ABI code, but I think we're going to want something different more akin to how dynamically sized lists work to avoid generating an exponential amount of code in the code generators
See WebAssembly/component-model#384 for the commit which added fixed size lists to the component model standard documents.