Skip to content

Instantly share code, notes, and snippets.

@srv7
Created Aug 25, 2020
Embed
What would you like to do?
import Foundation
class Foo: NSObject {
private func privateFunc() {}
func normalFunc() { privateFunc() }
final func finalFunc() {}
dynamic func dynamicFunc() {}
@objc func objcFunc() {}
@objc dynamic func objcDynamicFunc() {}
@objc final func objcFinalFunc() {}
@objc dynamic final func objcDynamicFinalFunc() {}
@objc private func objcPrivateFunc() {}
}
extension Foo {
private func privateExtensionFunc() {}
func extensionFunc() { privateExtensionFunc()}
final func finalExtensionFunc() {}
dynamic func dynamicExtensionFunc() {}
@objc func objcExtensionFunc() {}
@objc dynamic func objcDynamicExtensionFunc() {}
@objc final func objcFinalExtensionFunc() {}
@objc dynamic final func objcDynamicFinalExtensionFunc() {}
}
let foo = Foo()
foo.normalFunc()
foo.finalFunc()
foo.dynamicFunc()
foo.objcFunc()
foo.objcDynamicFunc()
foo.objcFinalFunc()
foo.objcDynamicFinalFunc()
foo.extensionFunc()
foo.finalExtensionFunc()
foo.dynamicExtensionFunc()
foo.objcExtensionFunc()
foo.objcDynamicExtensionFunc()
foo.objcFinalExtensionFunc()
foo.objcDynamicFinalExtensionFunc()
sil_stage canonical
import Builtin
import Swift
import SwiftShims
import Foundation
@objc @_inheritsConvenienceInitializers class Foo : NSObject {
private func privateFunc()
func normalFunc()
final func finalFunc()
dynamic func dynamicFunc()
@objc func objcFunc()
@objc dynamic func objcDynamicFunc()
@objc final func objcFinalFunc()
@objc dynamic final func objcDynamicFinalFunc()
@objc private func objcPrivateFunc()
@objc deinit
override dynamic init()
}
extension Foo {
private func privateExtensionFunc()
func extensionFunc()
final func finalExtensionFunc()
dynamic func dynamicExtensionFunc()
@objc dynamic func objcExtensionFunc()
@objc dynamic func objcDynamicExtensionFunc()
@objc final func objcFinalExtensionFunc()
@objc dynamic final func objcDynamicFinalExtensionFunc()
}
@_hasStorage @_hasInitialValue let foo: Foo { get }
// foo
sil_global hidden [let] @$s8nsobject3fooAA3FooCvp : $Foo
// main
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
alloc_global @$s8nsobject3fooAA3FooCvp // id: %2
%3 = global_addr @$s8nsobject3fooAA3FooCvp : $*Foo // users: %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17, %14, %11, %8, %7
%4 = metatype $@thick Foo.Type // user: %6
// function_ref Foo.__allocating_init()
%5 = function_ref @$s8nsobject3FooCACycfC : $@convention(method) (@thick Foo.Type) -> @owned Foo // user: %6
%6 = apply %5(%4) : $@convention(method) (@thick Foo.Type) -> @owned Foo // user: %7
store %6 to %3 : $*Foo // id: %7
%8 = load %3 : $*Foo // users: %9, %10
%9 = class_method %8 : $Foo, #Foo.normalFunc!1 : (Foo) -> () -> (), $@convention(method) (@guaranteed Foo) -> () // user: %10
%10 = apply %9(%8) : $@convention(method) (@guaranteed Foo) -> ()
%11 = load %3 : $*Foo // user: %13
// function_ref Foo.finalFunc()
%12 = function_ref @$s8nsobject3FooC9finalFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %13
%13 = apply %12(%11) : $@convention(method) (@guaranteed Foo) -> ()
%14 = load %3 : $*Foo // users: %15, %16
%15 = class_method %14 : $Foo, #Foo.dynamicFunc!1 : (Foo) -> () -> (), $@convention(method) (@guaranteed Foo) -> () // user: %16
%16 = apply %15(%14) : $@convention(method) (@guaranteed Foo) -> ()
%17 = load %3 : $*Foo // users: %18, %19
%18 = class_method %17 : $Foo, #Foo.objcFunc!1 : (Foo) -> () -> (), $@convention(method) (@guaranteed Foo) -> () // user: %19
%19 = apply %18(%17) : $@convention(method) (@guaranteed Foo) -> ()
%20 = load %3 : $*Foo // users: %21, %22
%21 = objc_method %20 : $Foo, #Foo.objcDynamicFunc!1.foreign : (Foo) -> () -> (), $@convention(objc_method) (Foo) -> () // user: %22
%22 = apply %21(%20) : $@convention(objc_method) (Foo) -> ()
%23 = load %3 : $*Foo // user: %25
// function_ref Foo.objcFinalFunc()
%24 = function_ref @$s8nsobject3FooC13objcFinalFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %25
%25 = apply %24(%23) : $@convention(method) (@guaranteed Foo) -> ()
%26 = load %3 : $*Foo // users: %27, %28
%27 = objc_method %26 : $Foo, #Foo.objcDynamicFinalFunc!1.foreign : (Foo) -> () -> (), $@convention(objc_method) (Foo) -> () // user: %28
%28 = apply %27(%26) : $@convention(objc_method) (Foo) -> ()
%29 = load %3 : $*Foo // user: %31
// function_ref Foo.extensionFunc()
%30 = function_ref @$s8nsobject3FooC13extensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %31
%31 = apply %30(%29) : $@convention(method) (@guaranteed Foo) -> ()
%32 = load %3 : $*Foo // user: %34
// function_ref Foo.finalExtensionFunc()
%33 = function_ref @$s8nsobject3FooC18finalExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %34
%34 = apply %33(%32) : $@convention(method) (@guaranteed Foo) -> ()
%35 = load %3 : $*Foo // user: %37
// dynamic_function_ref Foo.dynamicExtensionFunc()
%36 = dynamic_function_ref @$s8nsobject3FooC20dynamicExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %37
%37 = apply %36(%35) : $@convention(method) (@guaranteed Foo) -> ()
%38 = load %3 : $*Foo // users: %39, %40
%39 = objc_method %38 : $Foo, #Foo.objcExtensionFunc!1.foreign : (Foo) -> () -> (), $@convention(objc_method) (Foo) -> () // user: %40
%40 = apply %39(%38) : $@convention(objc_method) (Foo) -> ()
%41 = load %3 : $*Foo // users: %42, %43
%42 = objc_method %41 : $Foo, #Foo.objcDynamicExtensionFunc!1.foreign : (Foo) -> () -> (), $@convention(objc_method) (Foo) -> () // user: %43
%43 = apply %42(%41) : $@convention(objc_method) (Foo) -> ()
%44 = load %3 : $*Foo // user: %46
// function_ref Foo.objcFinalExtensionFunc()
%45 = function_ref @$s8nsobject3FooC22objcFinalExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %46
%46 = apply %45(%44) : $@convention(method) (@guaranteed Foo) -> ()
%47 = load %3 : $*Foo // users: %48, %49
%48 = objc_method %47 : $Foo, #Foo.objcDynamicFinalExtensionFunc!1.foreign : (Foo) -> () -> (), $@convention(objc_method) (Foo) -> () // user: %49
%49 = apply %48(%47) : $@convention(objc_method) (Foo) -> ()
%50 = integer_literal $Builtin.Int32, 0 // user: %51
%51 = struct $Int32 (%50 : $Builtin.Int32) // user: %52
return %51 : $Int32 // id: %52
} // end sil function 'main'
// Foo.privateFunc()
sil private @$s8nsobject3FooC11privateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC11privateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF'
// Foo.normalFunc()
sil hidden @$s8nsobject3FooC10normalFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // users: %3, %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
// function_ref Foo.privateFunc()
%2 = function_ref @$s8nsobject3FooC11privateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> ()
%4 = tuple () // user: %5
return %4 : $() // id: %5
} // end sil function '$s8nsobject3FooC10normalFuncyyF'
// Foo.finalFunc()
sil hidden @$s8nsobject3FooC9finalFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC9finalFuncyyF'
// Foo.dynamicFunc()
sil hidden [dynamically_replacable] @$s8nsobject3FooC11dynamicFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC11dynamicFuncyyF'
// Foo.objcFunc()
sil hidden @$s8nsobject3FooC8objcFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC8objcFuncyyF'
// @objc Foo.objcFunc()
sil hidden [thunk] @$s8nsobject3FooC8objcFuncyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcFunc()
%2 = function_ref @$s8nsobject3FooC8objcFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC8objcFuncyyFTo'
// Foo.objcDynamicFunc()
sil hidden @$s8nsobject3FooC15objcDynamicFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC15objcDynamicFuncyyF'
// @objc Foo.objcDynamicFunc()
sil hidden [thunk] @$s8nsobject3FooC15objcDynamicFuncyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcDynamicFunc()
%2 = function_ref @$s8nsobject3FooC15objcDynamicFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC15objcDynamicFuncyyFTo'
// Foo.objcFinalFunc()
sil hidden @$s8nsobject3FooC13objcFinalFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC13objcFinalFuncyyF'
// @objc Foo.objcFinalFunc()
sil hidden [thunk] @$s8nsobject3FooC13objcFinalFuncyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcFinalFunc()
%2 = function_ref @$s8nsobject3FooC13objcFinalFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC13objcFinalFuncyyFTo'
// Foo.objcDynamicFinalFunc()
sil hidden @$s8nsobject3FooC20objcDynamicFinalFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC20objcDynamicFinalFuncyyF'
// @objc Foo.objcDynamicFinalFunc()
sil hidden [thunk] @$s8nsobject3FooC20objcDynamicFinalFuncyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcDynamicFinalFunc()
%2 = function_ref @$s8nsobject3FooC20objcDynamicFinalFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC20objcDynamicFinalFuncyyFTo'
// Foo.objcPrivateFunc()
sil private @$s8nsobject3FooC15objcPrivateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC15objcPrivateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF'
// @objc Foo.objcPrivateFunc()
sil private [thunk] @$s8nsobject3FooC15objcPrivateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcPrivateFunc()
%2 = function_ref @$s8nsobject3FooC15objcPrivateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC15objcPrivateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyFTo'
// Foo.__deallocating_deinit
sil hidden @$s8nsobject3FooCfD : $@convention(method) (@owned Foo) -> () {
// %0 // users: %3, %2, %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = objc_super_method %0 : $Foo, #NSObject.deinit!deallocator.1.foreign : (NSObject) -> () -> (), $@convention(objc_method) (NSObject) -> () // user: %4
%3 = upcast %0 : $Foo to $NSObject // user: %4
%4 = apply %2(%3) : $@convention(objc_method) (NSObject) -> ()
%5 = tuple () // user: %6
return %5 : $() // id: %6
} // end sil function '$s8nsobject3FooCfD'
// Foo.__allocating_init()
sil hidden @$s8nsobject3FooCACycfC : $@convention(method) (@thick Foo.Type) -> @owned Foo {
// %0 // user: %1
bb0(%0 : $@thick Foo.Type):
%1 = thick_to_objc_metatype %0 : $@thick Foo.Type to $@objc_metatype Foo.Type // user: %2
%2 = alloc_ref_dynamic [objc] %1 : $@objc_metatype Foo.Type, $Foo // users: %4, %3
%3 = objc_method %2 : $Foo, #Foo.init!initializer.1.foreign : (Foo.Type) -> () -> Foo, $@convention(objc_method) (@owned Foo) -> @owned Foo // user: %4
%4 = apply %3(%2) : $@convention(objc_method) (@owned Foo) -> @owned Foo // user: %5
return %4 : $Foo // id: %5
} // end sil function '$s8nsobject3FooCACycfC'
// Foo.init()
sil hidden @$s8nsobject3FooCACycfc : $@convention(method) (@owned Foo) -> @owned Foo {
// %0 // user: %2
bb0(%0 : $Foo):
%1 = alloc_stack $Foo, let, name "self" // users: %10, %3, %2, %11, %12
store %0 to %1 : $*Foo // id: %2
%3 = load %1 : $*Foo // user: %4
%4 = upcast %3 : $Foo to $NSObject // users: %5, %7
%5 = unchecked_ref_cast %4 : $NSObject to $Foo // user: %6
%6 = objc_super_method %5 : $Foo, #NSObject.init!initializer.1.foreign : (NSObject.Type) -> () -> NSObject, $@convention(objc_method) (@owned NSObject) -> @owned NSObject // user: %7
%7 = apply %6(%4) : $@convention(objc_method) (@owned NSObject) -> @owned NSObject // user: %8
%8 = unchecked_ref_cast %7 : $NSObject to $Foo // users: %13, %10, %9
strong_retain %8 : $Foo // id: %9
store %8 to %1 : $*Foo // id: %10
destroy_addr %1 : $*Foo // id: %11
dealloc_stack %1 : $*Foo // id: %12
return %8 : $Foo // id: %13
} // end sil function '$s8nsobject3FooCACycfc'
// @objc Foo.init()
sil hidden [thunk] @$s8nsobject3FooCACycfcTo : $@convention(objc_method) (@owned Foo) -> @owned Foo {
// %0 // user: %2
bb0(%0 : $Foo):
// function_ref Foo.init()
%1 = function_ref @$s8nsobject3FooCACycfc : $@convention(method) (@owned Foo) -> @owned Foo // user: %2
%2 = apply %1(%0) : $@convention(method) (@owned Foo) -> @owned Foo // user: %3
return %2 : $Foo // id: %3
} // end sil function '$s8nsobject3FooCACycfcTo'
// Foo.privateExtensionFunc()
sil private @$s8nsobject3FooC20privateExtensionFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC20privateExtensionFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF'
// Foo.extensionFunc()
sil hidden @$s8nsobject3FooC13extensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // users: %3, %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
// function_ref Foo.privateExtensionFunc()
%2 = function_ref @$s8nsobject3FooC20privateExtensionFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> ()
%4 = tuple () // user: %5
return %4 : $() // id: %5
} // end sil function '$s8nsobject3FooC13extensionFuncyyF'
// Foo.finalExtensionFunc()
sil hidden @$s8nsobject3FooC18finalExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC18finalExtensionFuncyyF'
// Foo.dynamicExtensionFunc()
sil hidden [dynamically_replacable] @$s8nsobject3FooC20dynamicExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC20dynamicExtensionFuncyyF'
// Foo.objcExtensionFunc()
sil hidden @$s8nsobject3FooC17objcExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC17objcExtensionFuncyyF'
// @objc Foo.objcExtensionFunc()
sil hidden [thunk] @$s8nsobject3FooC17objcExtensionFuncyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcExtensionFunc()
%2 = function_ref @$s8nsobject3FooC17objcExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC17objcExtensionFuncyyFTo'
// Foo.objcDynamicExtensionFunc()
sil hidden @$s8nsobject3FooC24objcDynamicExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC24objcDynamicExtensionFuncyyF'
// @objc Foo.objcDynamicExtensionFunc()
sil hidden [thunk] @$s8nsobject3FooC24objcDynamicExtensionFuncyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcDynamicExtensionFunc()
%2 = function_ref @$s8nsobject3FooC24objcDynamicExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC24objcDynamicExtensionFuncyyFTo'
// Foo.objcFinalExtensionFunc()
sil hidden @$s8nsobject3FooC22objcFinalExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC22objcFinalExtensionFuncyyF'
// @objc Foo.objcFinalExtensionFunc()
sil hidden [thunk] @$s8nsobject3FooC22objcFinalExtensionFuncyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcFinalExtensionFunc()
%2 = function_ref @$s8nsobject3FooC22objcFinalExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC22objcFinalExtensionFuncyyFTo'
// Foo.objcDynamicFinalExtensionFunc()
sil hidden @$s8nsobject3FooC29objcDynamicFinalExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () {
// %0 // user: %1
bb0(%0 : $Foo):
debug_value %0 : $Foo, let, name "self", argno 1 // id: %1
%2 = tuple () // user: %3
return %2 : $() // id: %3
} // end sil function '$s8nsobject3FooC29objcDynamicFinalExtensionFuncyyF'
// @objc Foo.objcDynamicFinalExtensionFunc()
sil hidden [thunk] @$s8nsobject3FooC29objcDynamicFinalExtensionFuncyyFTo : $@convention(objc_method) (Foo) -> () {
// %0 // users: %4, %3, %1
bb0(%0 : $Foo):
strong_retain %0 : $Foo // id: %1
// function_ref Foo.objcDynamicFinalExtensionFunc()
%2 = function_ref @$s8nsobject3FooC29objcDynamicFinalExtensionFuncyyF : $@convention(method) (@guaranteed Foo) -> () // user: %3
%3 = apply %2(%0) : $@convention(method) (@guaranteed Foo) -> () // user: %5
strong_release %0 : $Foo // id: %4
return %3 : $() // id: %5
} // end sil function '$s8nsobject3FooC29objcDynamicFinalExtensionFuncyyFTo'
sil_vtable Foo {
#Foo.privateFunc!1: (Foo) -> () -> () : @$s8nsobject3FooC11privateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF // Foo.privateFunc()
#Foo.normalFunc!1: (Foo) -> () -> () : @$s8nsobject3FooC10normalFuncyyF // Foo.normalFunc()
#Foo.dynamicFunc!1: (Foo) -> () -> () : @$s8nsobject3FooC11dynamicFuncyyF // Foo.dynamicFunc()
#Foo.objcFunc!1: (Foo) -> () -> () : @$s8nsobject3FooC8objcFuncyyF // Foo.objcFunc()
#Foo.objcPrivateFunc!1: (Foo) -> () -> () : @$s8nsobject3FooC15objcPrivateFunc33_822DDE5D8DB73F031A56B4AF8FDCAF7FLLyyF // Foo.objcPrivateFunc()
#Foo.deinit!deallocator.1: @$s8nsobject3FooCfD // Foo.__deallocating_deinit
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment