Toby Hutton
Toby Hutton
...but if there is a better span available which we aren't using we should switch.
Does this have a related issue?
I took a birds eye view of what's in `asm_generation` and the pipeline from IR to ASM and took some notes. Might be useful in a refactor. Of note is...
This has changed a bit with #2843 but is still desperately needed.
Yeah, I was going to say, zero sized probably is too short. :slightly_smiling_face:
Related: #2429
So we definitely need empty structs (which we probably should be able to declare `struct S;` like Rust) and we definitely need them to be zero sized for storage's sake....
Well, we can write a tonne of integration testing for these cases _and_ switch `Unit` to be an empty tuple in the IR to restore consistency.
In https://github.com/FuelLabs/sway/issues/1230 it's suggested that single element structs which fit in a register and so that should also be specified explicitly (if it isn't already). 'Fits in a word' is...
Yep. Doing an aloc would be just: ``` let buf_addr = asm(size: size) { aloc size; hp: u64 } ``` ...as per the discussion in https://github.com/FuelLabs/sway/pull/1627