ABT.FunctionType.Create C# (CSharp) Метод

Create() публичный статический Метод

public static Create ( ExprType ret_type, ExprType>.List args, System.Boolean is_varargs ) : FunctionType
ret_type ExprType
args ExprType>.List
is_varargs System.Boolean
Результат FunctionType
        public static FunctionType Create(ExprType ret_type, List<Tuple<String, ExprType>> args, Boolean is_varargs) {
            Tuple<Int32, IReadOnlyList<Int32>> r_pack = Utils.PackArguments(args.ConvertAll(_ => _.Item2));
            IReadOnlyList<Int32> offsets = r_pack.Item2;
            if (ret_type is StructOrUnionType) {
                offsets = offsets.Select(_ => _ + 3 * SIZEOF_POINTER).ToList();
            } else {
                offsets = offsets.Select(_ => _ + 2 * SIZEOF_POINTER).ToList();
            }
            return new FunctionType(
                ret_type,
                args.Zip(offsets,
                    (name_type, offset) => new Utils.StoreEntry(name_type.Item1, name_type.Item2, offset)
                ).ToList(),
                is_varargs
            );
        }

Same methods

FunctionType::Create ( ExprType returnType ) : FunctionType
FunctionType::Create ( ExprType returnType, ImmutableList args, System.Boolean hasVarArgs ) : FunctionType