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; }
public static bool IsWitnessTable(SwiftType signature, SwiftClassType cl) { if (cl == null) { return(false); } return(signature is SwiftWitnessTableType); }
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)); }
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)); }
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)); }
static bool IsSubscript(SwiftType signature, SwiftClassType cl) { SwiftPropertyType prop = signature as SwiftPropertyType; return(prop != null && prop.IsSubscript); }
static bool IsPrivateProperty(SwiftType signature, SwiftClassType cl) { SwiftPropertyType pt = signature as SwiftPropertyType; return(pt != null && pt.IsPrivate); }
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) { }
static bool IsProperty(SwiftType signature, SwiftClassType cl) { return(signature is SwiftPropertyType); }
public TLLazyCacheVariable(string mangledName, SwiftName module, SwiftClassType cl, ulong offset) : base(CoreCompoundType.LazyCache, mangledName, module, cl, offset) { }
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) { }
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) { }
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)); }
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)); }
static bool IsStaticMethod(SwiftType signature, SwiftClassType cl) { return(signature is SwiftStaticFunctionType); }
public TLProtocolRequirementsBaseDescriptor(string mangledName, SwiftName module, SwiftClassType cl, ulong offset) : base(CoreCompoundType.ProtocolRequirementsBaseDescriptor, mangledName, module, cl, offset) { }
public TLGenericMetadataPattern(string mangledName, SwiftName module, SwiftClassType cl, ulong offset) : base(CoreCompoundType.DirectMetadata, mangledName, module, cl, offset) { }
static bool IsStaticProperty(SwiftType signature, SwiftClassType classType) { SwiftPropertyType pt = signature as SwiftPropertyType; return(pt != null && pt.IsStatic); }
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; }
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)); }
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; }
protected TLClassElem(CoreCompoundType type, string mangledName, SwiftName module, SwiftClassType classType, ulong offset) : base(type, mangledName, module, offset) { Class = classType; }
public TLThunk(ThunkType thunkType, string mangledName, SwiftName module, SwiftClassType classType, ulong offset) : base(CoreCompoundType.Thunk, mangledName, module, classType, offset) { Thunk = thunkType; }
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) { }