mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The signature is: (T, @inout @unowned(unsafe) Optional<T>) -> () The reason for the weird signature is that currently the Builtin infrastructure does not handle results well. The semantics of this builtin is that it enables one to store the first argument into an unowned unsafe address without any reference counting operations. It does this just by SILGening the relevant code. The optimizer chews through this code well, so we get the expected behavior. I also included a small proof of concept to validate that this builtin works as expected.
23 KiB
23 KiB