Add raw untyped pointer type
This PR adds a raw_ptr type to sway. These are implemented in sway-core as TypeInfo::RawUntypedPtr, but are (currently) lowered to Uint(64) in sway-ir. Raw pointers can only be created and manipulated using asm blocks or by using the memory-manipulating functions in the standard library which have been updated to use this type rather than u64.
It's still possible to return a raw_ptr across a script boundary, so #2551 isn't fixed yet. But this PR puts the groundwork in place so that the necessary checks can be added in a follow-up PR.
CI failure @canndrew
@otrho: This should be good to go now.
Marking as a draft pending discussions w/ SDK team and an RFC.
This is certainly the right approach here and I think this is a good change! Thanks @canndrew.
Thant being said, this feels a bit rushed and I'm not comfortable with disabling tests until further notice. I'd like to sync up with the SDK team on this first and make sure we have path forward before merging it and breaking a bunch of things.
I will turn this into a draft in the mean time.
There are a bunch of new functions in std related to the gtf opcode which are explicitly meant to return pointers (but currently return u64s). They would probably be good candidates for using this new type when it lands.
i.e: https://github.com/FuelLabs/sway/blob/69ea1c9b787929d3cfc942ece5f9df7fdc675ef9/sway-lib-std/src/tx.sw#L156
Closing this in favor of https://github.com/FuelLabs/sway/pull/2828.