コード例 #1
0
        // Combines the effect of checkpop and pop.
        public void SafePop(int lastslot)
        {
            if (this.lastslot != lastslot)
            {
                Exn.internalError("pop: wrong number of slots.  Expected "
                                  + lastslot.ToString()
                                  + ", got "
                                  + this.lastslot.ToString());
            }

            if (this.s0.entrypoint != Reg.ProcRegister0.entrypoint)
            {
                Exn.internalError("pop: can't pop someone else's frame!");
            }

            Cont.pop();
        }
コード例 #2
0
        public override CodeAddress call(int jumpIndex)
        {
            ContinuationFrame frame = Cont.cont;

            for (int i = 0; i < Reg.NREGS; ++i)
            {
                Reg.setRegister(i, frame.getSlot(i + 1));
            }
            if (frame.getSlot(Reg.LASTREG + 3) == Factory.True)
            {
                Reg.Result = frame.getSlot(Reg.LASTREG + 2);
            }
            Procedure p0 = Reg.ProcRegister0;

            Cont.cont.checkPop(Reg.NREGS + 2, singletonProcedure);
            Cont.pop();
            return(Call.call(p0.entrypoint, jumpIndex));
        }