[swift-dev] [swift] master: Turn on dynamic super method dispatch by default (bd8d85d)

David Farler dfarler at apple.com
Sun Jan 17 16:49:32 CST 2016


> On Jan 17, 2016, at 2:06 PM, Chris Lattner <clattner at apple.com> wrote:
> 
>> 
>> On Jan 15, 2016, at 1:37 PM, David Farler via swift-commits <swift-commits at swift.org> wrote:
>> 
>> Repository : github.com/apple/swift
>> On branch  : master
>> Link       : github.com/apple/swift/commit/bd8d85da0a55498394a1e2d26f01cda38879a0bf
>> 
>>> ---------------------------------------------------------------
>> 
>> commit bd8d85da0a55498394a1e2d26f01cda38879a0bf
>> Author: David Farler <dfarler at apple.com>
>> Date:   Fri Jan 15 11:55:28 2016 -0800
>> 
>>   Turn on dynamic super method dispatch by default
>> 
>>   This removes the -use-native-super-method flag and turns on dynamic
>>   dispatch for native method invocations on super by default.
>> 
>>   rdar://problem/22749732
> 
> Random question: does this still use static dispatch when the superclass is within the same resilience domain, or is it the SIL optimizer’s job to handle that?
> 
> -Chris

In SILGen, when the method isn't final, it does always emits a super_method instruction, but Roman added devirtualizer support for these, and it does look like they are getting optimized down to static dispatch when the nearest implementation is in the same module.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160117/4bc20de9/attachment.html>


More information about the swift-dev mailing list