[swift-evolution] Pitch: Cross-module inlining and specialization

Slava Pestov spestov at apple.com
Thu Oct 5 15:26:11 CDT 2017

> On Oct 5, 2017, at 1:17 PM, Michael Ilseman via swift-evolution <swift-evolution at swift.org> wrote:
> Another benefit of the always-emit-into-client-and-omit-from-libary-binary is cross-call consistency. A function foo could change in a way such that *all* calls using either the new or old version is fine, but some interleaving of calls to new and old versions is invalid. Having to reason about and test interleaving is very difficult. This further extends to groups of functions that want to maintain a cross-function-group call consistency (e.g. multiple methods on a struct).

This is not true though, because any calls to the inlinable function from inside its defining module will always use the ‘latest’ definition.

Or imagine if you link multiple frameworks that all inline different versions of an inlinable function. I don’t think there’s a way to make the guarantee you described.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171005/bae5217a/attachment.html>

More information about the swift-evolution mailing list