コード例 #1
0
        public override void Execute(AbstractMachineState state)
        {
            AMProgram program = (AMProgram)state.Program;
            AMHeap    heap    = (AMHeap)state.DataArea;
            AMTrail   trail   = (AMTrail)state.Trail;

            state.B.UnsaveRegisters(state, state.B.Arity);

            state.E    = state.B.CE;
            program.CP = state.B.CP;

            trail.Unwind(state.B.TR);

            trail.TR = state.B.TR;

            heap.H = state.B.H;

            state.B = state.B.B;

            program.Next();
        }
コード例 #2
0
        public override void Execute(AbstractMachineState state)
        {
            AMProgram program = (AMProgram)state.Program;
            AMTrail   trail   = (AMTrail)state.Trail;
            AMHeap    heap    = (AMHeap)state.DataArea;

            int n = state.B.Arity;

            state.B.UnsaveRegisters(state, n);

            state.E            = state.B.CE;
            program.CP         = state.B.CP;
            state.B.NextClause = program[_label];

            trail.Unwind(state.B.TR);

            trail.TR = state.B.TR;

            heap.H = state.B.H;

            // TODO: what about HB ?

            program.Next();
        }