If I'm remembering correctly, Cranelift doesn't have any builtin way to work with composites, so my question is, would that mean that the simplest way to deal with composites in function parameters is to pass by pointer?
Yes, exactly. You'll want to define an ABI or convention of some sort in your compiler, but the gist of it is: put the storage somewhere (perhaps on a shadow stack?) and pass a pointer to it.
What exactly do you mean by "shadow stack"?
A mechanism to allocate storage via a bump-decrement pointer, sometimes used for stack-local storage; you can also use Cranelift stackslots for this, either way
Last updated: Dec 23 2024 at 12:05 UTC