[swift-dev] Emitting redundant protocol conformances to support type lookup

Luke Howard lukeh at padl.com
Wed Jan 13 01:37:07 CST 2016


Also, what’s the best way of doing alignment when emitting C structs from IRGen?

For now I added this to ConstantBuilderBase: 

    void alignToWordBoundary() {
      NextOffset.roundUpToAlignment(IGM.getPointerAlignment());
    }

— Luke

> On 13 Jan 2016, at 6:18 PM, Luke Howard <lukeh at padl.com> wrote:
> 
> NB – presently the Protocols list is at the very end of GenericParameterDescriptor but it’s cleaner (if ABI disruptive) to put nest it inside Parameter.
> 
>> On 13 Jan 2016, at 2:46 PM, Luke Howard via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>> 
>> Would it be possible to extend GenericParameterDescriptor to include a tail-emplaced set of references to ProtocolDescriptors for any parameter type constraints that require witness tables? This would be useful plumbing for a future API that can dynamically instantiate generic types.
>> 
>> See:
>> 
>> https://github.com/lhoward/swift/blob/SR-381/include/swift/Runtime/Metadata.h#L1199 <https://github.com/lhoward/swift/blob/SR-381/include/swift/Runtime/Metadata.h#L1199>
>> 
>> https://github.com/lhoward/swift/blob/SR-381/stdlib/public/runtime/MetadataLookup.cpp#L338 <https://github.com/lhoward/swift/blob/SR-381/stdlib/public/runtime/MetadataLookup.cpp#L338>
>> 
>> — Luke
>> 
>> _______________________________________________
>> swift-dev mailing list
>> swift-dev at swift.org <mailto:swift-dev at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-dev
> 
> --
> www.lukehoward.com <http://www.lukehoward.com/>
> soundcloud.com/lukehoward
> 

--
www.lukehoward.com
soundcloud.com/lukehoward

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160113/3e629f21/attachment.html>


More information about the swift-dev mailing list