Example #1
0
        private void Override(Dictionary <VTableSignature, List <VTableSlot> > slotDict, VTableSignature sig, VTableSlot slot, MethodDef target)
        {
            List <VTableSlot> slotList   = slotDict[sig];
            VTableSlot        targetSlot = slotList.Single(baseSlot => baseSlot.MethodDef == target);

            if (slot.MethodDef.IsReuseSlot || targetSlot.MethodDef.DeclaringType.IsInterface)
            {
                slot.Override(targetSlot);
            }
            slotList.Remove(targetSlot);

            if (!slot.MethodDef.IsFinal)
            {
                slotDict.AddListEntry(slot.Signature, slot);
                Slots.Add(slot);
            }
            else
            {
                Finals.Add(slot);
            }
        }
Example #2
0
        private void Override(Dictionary <VTableSignature, List <VTableSlot> > slotDict, VTableSignature sig, VTableSlot slot)
        {
            List <VTableSlot> slotList = slotDict[sig];

            foreach (VTableSlot baseSlot in slotList)
            {
                if (slot.MethodDef.IsReuseSlot || baseSlot.MethodDef.DeclaringType.IsInterface)
                {
                    slot.Override(baseSlot);
                }
                bool k = Slots.Remove(baseSlot);
                Debug.Assert(k);
            }
            slotList.Clear();
            if (!slot.MethodDef.IsFinal)
            {
                slotList.Add(slot);
                Slots.Add(slot);
            }
            else
            {
                Finals.Add(slot);
            }
        }
Example #3
0
        private void Override(Dictionary<VTableSignature, List<VTableSlot>> slotDict, VTableSignature sig, VTableSlot slot, MethodDef target)
        {
            List<VTableSlot> slotList = slotDict[sig];
            VTableSlot targetSlot = slotList.Single(baseSlot => baseSlot.MethodDef == target);

            if (slot.MethodDef.IsReuseSlot || targetSlot.MethodDef.DeclaringType.IsInterface)
                slot.Override(targetSlot);
            slotList.Remove(targetSlot);

            if (!slot.MethodDef.IsFinal) {
                slotDict.AddListEntry(slot.Signature, slot);
                Slots.Add(slot);
            }
            else
                Finals.Add(slot);
        }
Example #4
0
        private void Override(Dictionary<VTableSignature, List<VTableSlot>> slotDict, VTableSignature sig, VTableSlot slot)
        {
            List<VTableSlot> slotList = slotDict[sig];

            foreach (VTableSlot baseSlot in slotList) {
                if (slot.MethodDef.IsReuseSlot || baseSlot.MethodDef.DeclaringType.IsInterface)
                    slot.Override(baseSlot);
                bool k = Slots.Remove(baseSlot);
                Debug.Assert(k);
            }
            slotList.Clear();
            if (!slot.MethodDef.IsFinal) {
                slotList.Add(slot);
                Slots.Add(slot);
            }
            else
                Finals.Add(slot);
        }