Beispiel #1
0
        //$TODO(work in progress): fix the NI -> TI mapping
        private void BuildTypeMap()
        {
            uint minTi = Tpi.Header.MinTypeIndex;
            uint maxTi = minTi + Tpi.Header.MaxTypeIndex - 1;

            for (uint ti = minTi; ti <= maxTi; ti++)
            {
                ILeafContainer leafC = resolver.GetTypeByIndex(ti);
                if (leafC == null || !(leafC.Data is LeafBase leaf))
                {
                    continue;
                }

                if (!leaf.IsDefnUdt)
                {
                    continue;
                }

                string typeName = leaf.UdtName;

                if (leaf.IsLocalDefnUdtWithUniqueName)
                {
                    throw new NotImplementedException();
                }

                if (!GetIndex(typeName, out uint nameIndex))
                {
                    //$TODO: how do i handle this?
                    continue;
                }

                NameIndex_TypeIndex.Add(nameIndex, ti);
            }
        }
Beispiel #2
0
 private ILeafContainer ReadLeaf()
 {
     return(resolver.GetTypeByIndex(typeIndex));
 }