Beispiel #1
0
        private bool IsEmpty(long slot)
        {
            long tag = Miscellanea.UnsignedLeftShift64(slot, 62);

            Debug.Assert(tag == 0 | tag == 1 | tag == 2);
            return(tag == 2);
        }
Beispiel #2
0
        private long ReindexedSlot(long slot, int next)
        {
            int tag = (int)Miscellanea.UnsignedLeftShift64(slot, 62);

            Debug.Assert(tag == 0 | tag == 1);
            return(tag == 0 ? FilledValueSlot((int)slot, next) : FilledIdxSlot((int)slot, next));
        }
Beispiel #3
0
        private long Value(long slot)
        {
            Debug.Assert(!IsEmpty(slot));
            int tag = (int)Miscellanea.UnsignedLeftShift64(slot, 62);

            Debug.Assert(tag == 0 | tag == 1);
            return(tag == 0 ? (int)slot : largeInts.Get((int)slot));
        }
Beispiel #4
0
 private int Next(long slot)
 {
     Debug.Assert(!IsEmpty(slot));
     return((int)(Miscellanea.UnsignedLeftShift64(slot, 32) & 0x3FFFFFFF));
 }