<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 17, 2016, at 2:06 PM, Chris Lattner &lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><blockquote type="cite" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">On Jan 15, 2016, at 1:37 PM, David Farler via swift-commits &lt;<a href="mailto:swift-commits@swift.org" class="">swift-commits@swift.org</a>&gt; wrote:<br class=""><br class="">Repository : <a href="http://github.com/apple/swift" class="">github.com/apple/swift</a><br class="">On branch &nbsp;: master<br class="">Link &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: <a href="http://github.com/apple/swift/commit/bd8d85da0a55498394a1e2d26f01cda38879a0bf" class="">github.com/apple/swift/commit/bd8d85da0a55498394a1e2d26f01cda38879a0bf</a><br class=""><br class=""><blockquote type="cite" class="">---------------------------------------------------------------<br class=""></blockquote><br class="">commit bd8d85da0a55498394a1e2d26f01cda38879a0bf<br class="">Author: David Farler &lt;<a href="mailto:dfarler@apple.com" class="">dfarler@apple.com</a>&gt;<br class="">Date: &nbsp;&nbsp;Fri Jan 15 11:55:28 2016 -0800<br class=""><br class="">&nbsp;&nbsp;Turn on dynamic super method dispatch by default<br class=""><br class="">&nbsp;&nbsp;This removes the -use-native-super-method flag and turns on dynamic<br class="">&nbsp;&nbsp;dispatch for native method invocations on super by default.<br class=""><br class="">&nbsp;&nbsp;<a href="rdar://problem/22749732" class="">rdar://problem/22749732</a><br class=""></blockquote><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">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?</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">-Chris</span></div></blockquote></div><br class=""><div class="">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.</div><div class=""><br class=""></div><div class="">David</div></body></html>