public TLFieldOffset(string mangledName, SwiftName module, SwiftClassType classType, bool direct, SwiftName ident, SwiftType type, ulong offset)
     : base(CoreCompoundType.FieldOffset, mangledName, module, classType, offset)
 {
     IsDirect   = direct;
     Identifier = ident;
     FieldType  = type;
 }
 public TLProtocolConformanceDescriptor(string mangledName, SwiftName module, SwiftType implementingType,
                                        SwiftClassType forProtocol, ulong offset)
     : base(CoreCompoundType.ProtocolConformanceDescriptor, mangledName, module, offset)
 {
     ImplementingType = Ex.ThrowOnNull(implementingType, nameof(implementingType));
     Protocol         = forProtocol;
 }
Exemplo n.º 3
0
 public static bool IsWitnessTable(SwiftType signature, SwiftClassType cl)
 {
     if (cl == null)
     {
         return(false);
     }
     return(signature is SwiftWitnessTableType);
 }
Exemplo n.º 4
0
 public static bool IsInitializer(SwiftType signature, SwiftClassType cl)
 {
     if (cl == null)
     {
         return(false);
     }
     return(signature is SwiftInitializerType);
 }
 protected TLFunction(string mangledName, SwiftName module, SwiftName functionName,
                      SwiftClassType classType, SwiftBaseFunctionType signature, ulong offset, OperatorType oper = OperatorType.None,
                      CoreCompoundType type = CoreCompoundType.Function)
     : base(type, mangledName, module, classType, offset)
 {
     Name      = functionName;
     Signature = signature;
     Operator  = oper;
 }
        SLSimpleType ToProtocol(SLImportModules modules, SwiftProtocolListType protocol)
        {
            if (protocol.Protocols.Count > 1)
            {
                throw new NotSupportedException("Protocol lists > 1 not supported (yet).");
            }
            SwiftClassType cl = protocol.Protocols [0];

            return(ToClass(modules, cl));
        }
Exemplo n.º 7
0
        static bool IsDestructor(SwiftType signature, SwiftClassType cl)
        {
            if (cl == null)
            {
                return(false);
            }
            SwiftDestructorType des = signature as SwiftDestructorType;

            if (des == null)
            {
                return(false);
            }
            return(des.Name.Equals(Decomposer.kSwiftDeallocatingDestructorName) ||
                   des.Name.Equals(Decomposer.kSwiftNonDeallocatingDestructorName));
        }
Exemplo n.º 8
0
        static bool IsMethodOnClass(SwiftType signature, SwiftClassType cl)
        {
            if (cl == null)
            {
                return(false);
            }
            if (signature is SwiftWitnessTableType)
            {
                return(false);
            }
            SwiftUncurriedFunctionType ucf = signature as SwiftUncurriedFunctionType;

            if (ucf == null)
            {
                return(false);
            }
            return(ucf.UncurriedParameter is SwiftClassType && ucf.UncurriedParameter.Equals(cl));
        }
Exemplo n.º 9
0
        static bool IsSubscript(SwiftType signature, SwiftClassType cl)
        {
            SwiftPropertyType prop = signature as SwiftPropertyType;

            return(prop != null && prop.IsSubscript);
        }
Exemplo n.º 10
0
        static bool IsPrivateProperty(SwiftType signature, SwiftClassType cl)
        {
            SwiftPropertyType pt = signature as SwiftPropertyType;

            return(pt != null && pt.IsPrivate);
        }
Exemplo n.º 11
0
 public TLFunction(string mangledName, SwiftName module, SwiftName functionName,
                   SwiftClassType classType, SwiftBaseFunctionType signature, ulong offset, OperatorType oper = OperatorType.None)
     : this(mangledName, module, functionName, classType, signature, offset, oper, CoreCompoundType.Function)
 {
 }
Exemplo n.º 12
0
 static bool IsProperty(SwiftType signature, SwiftClassType cl)
 {
     return(signature is SwiftPropertyType);
 }
Exemplo n.º 13
0
 public TLLazyCacheVariable(string mangledName, SwiftName module, SwiftClassType cl, ulong offset)
     : base(CoreCompoundType.LazyCache, mangledName, module, cl, offset)
 {
 }
Exemplo n.º 14
0
 public TLMethodDescriptor(string mangledName, SwiftName module, SwiftName functionName,
                           SwiftClassType classType, SwiftBaseFunctionType signature, ulong offset, OperatorType oper = OperatorType.None)
     : base(mangledName, module, functionName, classType, signature, offset, oper, CoreCompoundType.MethodDescriptor)
 {
 }
Exemplo n.º 15
0
 public TLVariable(string mangledName, SwiftName module, SwiftClassType classType, SwiftName ident, SwiftType ofType,
                   bool isStatic, ulong offset, SwiftType extensionOn = null)
     : this(CoreCompoundType.Variable, mangledName, module, classType, ident, ofType, isStatic, offset, extensionOn)
 {
 }
Exemplo n.º 16
0
 public TLNominalTypeDescriptor(string mangledName, SwiftName module, SwiftClassType cl, ulong offset)
     : base(CoreCompoundType.NominalTypeDescriptor, mangledName, module, cl, offset)
 {
 }
 SLSimpleType ToClass(SLImportModules modules, SwiftClassType st)
 {
     return(ToClass(modules, st.ClassName));
 }
Exemplo n.º 18
0
 public TLUnsafeMutableAddressor(string mangledName, SwiftName module, SwiftClassType classType, SwiftName ident, SwiftType ofType, ulong offset)
     : base(CoreCompoundType.UnsafeMutableAddressor, mangledName, module, classType, offset)
 {
     Name   = Ex.ThrowOnNull(ident, nameof(ident));
     OfType = Ex.ThrowOnNull(ofType, nameof(ofType));
 }
Exemplo n.º 19
0
 static bool IsStaticMethod(SwiftType signature, SwiftClassType cl)
 {
     return(signature is SwiftStaticFunctionType);
 }
Exemplo n.º 20
0
 public TLProtocolRequirementsBaseDescriptor(string mangledName, SwiftName module, SwiftClassType cl, ulong offset)
     : base(CoreCompoundType.ProtocolRequirementsBaseDescriptor, mangledName, module, cl, offset)
 {
 }
Exemplo n.º 21
0
 public TLGenericMetadataPattern(string mangledName, SwiftName module, SwiftClassType cl, ulong offset)
     : base(CoreCompoundType.DirectMetadata, mangledName, module, cl, offset)
 {
 }
Exemplo n.º 22
0
        static bool IsStaticProperty(SwiftType signature, SwiftClassType classType)
        {
            SwiftPropertyType pt = signature as SwiftPropertyType;

            return(pt != null && pt.IsStatic);
        }
Exemplo n.º 23
0
 protected TLVariable(CoreCompoundType type, string mangledName, SwiftName module, SwiftClassType classType, SwiftName ident, SwiftType ofType,
                      bool isStatic, ulong offset, SwiftType extensionOn)
     : base(type, mangledName, module, classType, offset)
 {
     Name        = Ex.ThrowOnNull(ident, nameof(ident));
     OfType      = Ex.ThrowOnNull(ofType, nameof(ofType));
     IsStatic    = isStatic;
     ExtensionOn = extensionOn;
 }
Exemplo n.º 24
0
 public TLBaseConformanceDescriptor(string mangledName, SwiftName module, SwiftClassType protocol, SwiftClassType requirement, ulong offset)
     : base(CoreCompoundType.BaseConformanceDescriptor, mangledName, module, protocol, offset)
 {
     ProtocolRequirement = Ex.ThrowOnNull(requirement, nameof(requirement));
 }
Exemplo n.º 25
0
 public TLMetaclass(string mangledName, SwiftName module, SwiftClassType cl, ulong offset)
     : base(CoreCompoundType.MetaClass, mangledName, module, cl, offset)
 {
 }
 public PropertyContents(SwiftClassType ofClass, SwiftName propName, int sizeofMachinePointer)
 {
     Class = Ex.ThrowOnNull(ofClass, nameof(ofClass));
     Name  = Ex.ThrowOnNull(propName, nameof(propName));
     this.sizeofMachinePointer = sizeofMachinePointer;
 }
Exemplo n.º 27
0
 protected TLClassElem(CoreCompoundType type, string mangledName, SwiftName module, SwiftClassType classType, ulong offset)
     : base(type, mangledName, module, offset)
 {
     Class = classType;
 }
Exemplo n.º 28
0
 public TLThunk(ThunkType thunkType, string mangledName, SwiftName module, SwiftClassType classType, ulong offset)
     : base(CoreCompoundType.Thunk, mangledName, module, classType, offset)
 {
     Thunk = thunkType;
 }
Exemplo n.º 29
0
 public TLPropertyDescriptor(string mangledName, SwiftName module, SwiftClassType classType, SwiftName ident, SwiftType ofType,
                             bool isStatic, ulong offset, SwiftType extensionOn = null)
     : base(CoreCompoundType.PropertyDescriptor, mangledName, module, classType, ident, ofType, isStatic, offset, extensionOn)
 {
 }