Commits
Doug Gregor committed 0c554b77da7
For Swift-rooted class hierarchies, emit self_downcast as a bitcast. Swift-rooted class hierarchies don't permit the replacement of "self", so it's guaranteed that the 'self' returned from a 'super.init' invocation is identical to the previous self. Elide the unconditional checked downcast (that manifests as a call to swift_dynamicCastClassUnconditional in the runtime) by simply putting a bitcast in its place. For Objective-C-rooted hierarchies, 'self' can be replaced so memory safety dictates that we keep the swift_dynamicCastClassUnconditional(). Note that this path is still unsafe against nil returns. Swift SVN r12384