public int CompareTo(ProgramCounter pc)
 {
     int result;
     result = methodNumber.CompareTo(pc.methodNumber);
     if (result != 0)
         return result;
     else
         return nextBlock.CompareTo(pc.nextBlock);
 }
 public bool Equals(ProgramCounter pc)
 {
     return (methodNumber == pc.methodNumber && nextBlock == pc.nextBlock);
 }
 public ProgramCounterTuple(ProgramCounter[] counters)
 {
     pcs = counters;
 }
示例#4
0
        public ProgramCounterTuple ProgramCounters()
        {
            ProgramCounter[] pcs = new ProgramCounter[stateImpl.NumProcesses];
            for (int i = 0; i < stateImpl.NumProcesses; i++)
            {
                ZingMethod topOfStack = stateImpl.GetProcess(i).TopOfStack;

                if (topOfStack == null)
                    pcs[i] = new ProgramCounter();
                else
                    pcs[i] = new ProgramCounter(topOfStack);
            }
            return new ProgramCounterTuple(pcs);
        }