Mosa.Compiler.Framework.MosaTypeLayout.GetMethodTableFromBaseType C# (CSharp) Method

GetMethodTableFromBaseType() private method

private GetMethodTableFromBaseType ( MosaType type ) : List
type MosaType
return List
        private List<MosaMethod> GetMethodTableFromBaseType(MosaType type)
        {
            var methodTable = new List<MosaMethod>();

            if (type.BaseType != null)
            {
                List<MosaMethod> baseMethodTable;

                if (!typeMethodTables.TryGetValue(type.BaseType, out baseMethodTable))
                {
                    // Method table for the base type has not been create yet, so create it now
                    baseMethodTable = CreateMethodTable(type.BaseType);
                }

                methodTable = new List<MosaMethod>(baseMethodTable);
            }

            return methodTable;
        }