[swift-dev] Preparing metadata records for ABI stability
John McCall
rjmccall at apple.com
Mon Nov 13 14:10:18 CST 2017
> On Nov 13, 2017, at 2:42 PM, Slava Pestov <spestov at apple.com> wrote:
>
>
>> On Nov 13, 2017, at 11:40 AM, John McCall via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>>
>> - I feel like we're not boxing ourselves in too much to assume a layout of the generic requirements. Having a base offset already imposes a pretty steep compatibility requirement — e.g. even if we significantly generalized a type's generic signature, we would still need to store old requirements (when actually obeyed) in the appropriate places for the old signature, or else the old pattern just doesn't work at all. As long as we can extend that with more information later, we don't really suffer from making layout assumptions today.
>
> Do you mean if we significantly generalized the schema for generic requirements, or if we changed the definition of a single type to be more general? I would rather the latter did not happen.
I mean changing the definition of a type to be more general, and I think it's probably inevitable. I mean, we're already anticipating at least generalizing things to accept move-only types, although that at least has the advantage of not corresponding to a change in runtime protocol conformances.
> Accessing generic arguments efficiently is important for extension methods, I think. In fact right now even thin functions recover metadata from a thick metatype argument if its the last parameter, although perhaps this is not intentional.
We recover metadata from all arguments, I think, unless it's a protocol witness.
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20171113/df37bbf1/attachment.html>
More information about the swift-dev
mailing list