public GetAggregate ( |
||
agg | ||
atsOuter | ||
typeArgs | ||
return |
public AggregateType GetAts() { if (ats == null) { AggregateSymbol aggNullable = typeManager.GetNullable(); CType typePar = GetUnderlyingType(); CType[] typeParArray = { typePar }; TypeArray ta = symmgr.AllocParams(1, typeParArray); ats = typeManager.GetAggregate(aggNullable, ta); } return(ats); }
public AggregateType getThisType() { if (_atsInst == null) { Debug.Assert(GetTypeVars() == GetTypeVarsAll() || isNested()); AggregateType pOuterType = isNested() ? GetOuterAgg().getThisType() : null; _atsInst = TypeManager.GetAggregate(this, pOuterType, GetTypeVars()); } //Debug.Assert(GetTypeVars().Size == atsInst.GenericArguments.Count); return(_atsInst); }
public AggregateType GetAts(ErrorHandling errorContext) { AggregateSymbol aggNullable = typeManager.GetNullable(); if (aggNullable == null) { throw Error.InternalCompilerError(); } if (ats == null) { CType typePar = GetUnderlyingType(); CType[] typeParArray = new CType[] { typePar }; TypeArray ta = symmgr.AllocParams(1, typeParArray); ats = typeManager.GetAggregate(aggNullable, ta); } return(ats); }
private static CType LoadTypeFromSignature(int[] signature, ref int indexIntoSignatures, TypeArray classTyVars) { Debug.Assert(signature != null); MethodSignatureEnum current = (MethodSignatureEnum)signature[indexIntoSignatures]; indexIntoSignatures++; switch (current) { case MethodSignatureEnum.SIG_SZ_ARRAY: return(TypeManager.GetArray(LoadTypeFromSignature(signature, ref indexIntoSignatures, classTyVars), 1, true)); case MethodSignatureEnum.SIG_METH_TYVAR: return(TypeManager.GetStdMethTypeVar(signature[indexIntoSignatures++])); case MethodSignatureEnum.SIG_CLASS_TYVAR: return(classTyVars[signature[indexIntoSignatures++]]); case (MethodSignatureEnum)PredefinedType.PT_VOID: return(VoidType.Instance); default: Debug.Assert(current >= 0 && (int)current < (int)PredefinedType.PT_COUNT); AggregateSymbol agg = GetPredefAgg((PredefinedType)current); int typeCount = agg.GetTypeVars().Count; if (typeCount == 0) { return(TypeManager.GetAggregate(agg, TypeArray.Empty)); } CType[] typeArgs = new CType[typeCount]; for (int iTypeArg = 0; iTypeArg < typeArgs.Length; iTypeArg++) { typeArgs[iTypeArg] = LoadTypeFromSignature(signature, ref indexIntoSignatures, classTyVars); } return(TypeManager.GetAggregate(agg, TypeArray.Allocate(typeArgs))); } }
public AggregateType GetAts(ErrorHandling errorContext) { AggregateSymbol aggNullable = typeManager.GetNullable(); if (aggNullable == null) { throw Error.InternalCompilerError(); } if (ats == null) { if (aggNullable == null) { typeManager.ReportMissingPredefTypeError(errorContext, PredefinedType.PT_G_OPTIONAL); return(null); } CType typePar = GetUnderlyingType(); CType[] typeParArray = new CType[] { typePar }; TypeArray ta = symmgr.AllocParams(1, typeParArray); ats = typeManager.GetAggregate(aggNullable, ta); } return(ats); }
public AggregateType GetAts() => _ats ?? (_ats = _typeManager.GetAggregate( _typeManager.GetNullable(), _symmgr.AllocParams(UnderlyingType)));
public override AggregateType GetAts() => _ats ?? (_ats = TypeManager.GetAggregate(TypeManager.GetNullable(), TypeArray.Allocate(UnderlyingType)));