class NSObjectBase: NSObject {
func Msg_normal(){ }
func Msg_Second(){}
func Msg_Third(){}
@objc func Msg_ObjcX(){}
@objc dynamic func Msg_Objc_DynamicX(){ }
func calltest(){self.Msg_normal()}
func callAgain(){self.Msg_Third()}
}
extension NSObjectBase{
@objc func OcExtensionFunc(){}
}
class DerivedOcclass:NSObjectBase{
override func Msg_normal() {}
override func OcExtensionFunc(){}
override func Msg_Objc_DynamicX() {}
}
swiftc -emit-sil BaseClass.swift | xcrun swift-demangle > ClassFunc.silgen
cat ClassFunc.silgen
class NSObjectBase : NSObject {
func Msg_normal()
func Msg_Second()
func Msg_Third()
@objc func Msg_ObjcX()
@objc dynamic func Msg_Objc_DynamicX()
func calltest()
func callAgain()
}
extension NSObjectBase {
@objc dynamic func OcExtensionFunc()
}
class DerivedOcclass : NSObjectBase {
override func Msg_normal()
override dynamic func OcExtensionFunc()
override dynamic func Msg_Objc_DynamicX()
}
sil_vtable NSObjectBase {
#NSObjectBase.Msg_normal!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.Msg_normal() -> () // NSObjectBase.Msg_normal()
#NSObjectBase.Msg_Second!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.Msg_Second() -> () // NSObjectBase.Msg_Second()
#NSObjectBase.Msg_Third!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.Msg_Third() -> () // NSObjectBase.Msg_Third()
#NSObjectBase.Msg_ObjcX!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.Msg_ObjcX() -> () // NSObjectBase.Msg_ObjcX()
#NSObjectBase.callTest!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.calltest() -> () // NSObjectBase.calltest()
#NSObjectBase.callAgain!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.callAgain() -> () // NSObjectBase.callAgain()
}
sil_vtable DerivedOcclass {
#NSObjectBase.Msg_normal!1: (NSObjectBase) -> () -> () : @NSObjectBase.DerivedOcclass.Msg_normal() -> () [override] // DerivedOcclass.Msg_normal()
#NSObjectBase.Msg_Second!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.Msg_Second() -> () [inherited] // NSObjectBase.Msg_Second()
#NSObjectBase.Msg_Third!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.Msg_Third() -> () [inherited] // NSObjectBase.Msg_Third()
#NSObjectBase.Msg_ObjcX!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.Msg_ObjcX() -> () [inherited] // NSObjectBase.Msg_ObjcX()
#NSObjectBase.callTest!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.calltest() -> () [inherited] // NSObjectBase.calltest()
#NSObjectBase.callAgain!1: (NSObjectBase) -> () -> () : @NSObjectBase.NSObjectBase.callAgain() -> () [inherited] // NSObjectBase.callAgain()
}
class BaseClass {
func normalFunc(){}
@objc func ObjcFunc(){}
@objc dynamic func ObjcDynamicFunc(){}
}
extension BaseClass{
@objc func Extensionnormal(){}
func ExtenNoneOcnormal(){}
}
class DerivedClass:BaseClass{
override func normalFunc() {}
override func ObjcFunc(){}
override func ObjcDynamicFunc(){}
override func Extensionnormal(){}
}
extension DerivedClass{}
class BaseClass {
func normalFunc()
@objc func ObjcFunc()
@objc dynamic func ObjcDynamicFunc()
init()
deinit
}
extension BaseClass {
@objc dynamic func Extensionnormal()
func ExtenNoneOcnormal()
}
class DerivedClass : BaseClass {
override func normalFunc()
override func ObjcFunc()
override dynamic func ObjcDynamicFunc()
override dynamic func Extensionnormal()
override init()
deinit
}
sil_vtable BaseClass {
#BaseClass.normalFunc!1: (BaseClass) -> () -> () : @BaseClass.BaseClass.normalFunc() -> () // BaseClass.normalFunc()
#BaseClass.ObjcFunc!1: (BaseClass) -> () -> () : @BaseClass.BaseClass.ObjcFunc() -> () // BaseClass.ObjcFunc()
}
sil_vtable DerivedClass {
#BaseClass.normalFunc!1: (BaseClass) -> () -> () : @BaseClass.DerivedClass.normalFunc() -> () [override] // DerivedClass.normalFunc()
#BaseClass.ObjcFunc!1: (BaseClass) -> () -> () : @BaseClass.DerivedClass.ObjcFunc() -> () [override] // DerivedClass.ObjcFunc()
}