swift
3c0b08db - Prototype an `@_addressable` attribute that puts an argument at a stable address.

Commit
301 days ago
Prototype an `@_addressable` attribute that puts an argument at a stable address. Many APIs using nonescapable types would like to vend interior pointers to their parameter bindings, but this isn't normally always possible because of representation changes the caller may do around the call, such as moving the value in or out of memory, bridging or reabstracting it, etc. `@_addressable` forces the corresponding parameter to be passed indirectly in memory, in its maximally-abstracted representation. [TODO] If return values have a lifetime dependency on this parameter, the caller must keep this in-memory representation alive for the duration of the dependent value's lifetime.
Author
Committer
Parents
Loading