zoukankan      html  css  js  c++  java
  • swift的类型描述符

    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 : $@convention(method) (@thin NormalStruct.Type) -> NormalStruct // user: %3

  • 相关阅读:
    Ceph相关
    Redis学习
    docker mysql
    WebSocket学习与使用
    nginx学习与使用
    python学习小记
    基数计数——HyperLogLog
    Swagger使用小记
    理解Java枚举类型
    Jenkins使用
  • 原文地址:https://www.cnblogs.com/feng9exe/p/10601810.html
Copyright © 2011-2022 走看看