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

  • 相关阅读:
    JDK6的switch支持不是很好
    团队作业(2)
    团队作业(1)
    4月30日
    重构:改善既有代码的设计有感
    4月28日
    4月27日
    4月26日
    4月25日
    4月24日
  • 原文地址:https://www.cnblogs.com/feng9exe/p/10601810.html
Copyright © 2011-2022 走看看