加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

swift的类型描述符

发布时间:2020-12-14 04:58:36 所属栏目:百科 来源:网络整理
导读:Metatype Types A concrete or existential metatype in SIL must describe its representation. This can be: @thin,meaning that it requires no storage and thus necessarily represents an exact type (only allowed for concrete metatypes); @thick,m

Metatype Types

A concrete or existential metatype in SIL must describe its representation. This can be:

  • @thin,meaning that it requires no storage and thus necessarily represents an exact type (only allowed for concrete metatypes);
  • @thick,meaning that it stores a reference to a type or (if a concrete class) a subclass of that type; or
  • @objc,meaning that it stores a reference to a class type (or a subclass thereof) using an Objective-C class object representation rather than the native Swift type-object representation.

?

用于类型和函数类型的描述

?

https://github.com/apple/swift/blob/master/docs/SIL.rst#metatype-types

?

%2 = function_ref @ProtocolCase.NormalStruct.init() -> ProtocolCase.NormalStruct : [email?protected](method) (@thin NormalStruct.Type) -> NormalStruct // user: %3

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读