예제 #1
0
        internal override Opcode Eval(ProcessingContext context)
        {
            StackFrame topArg    = context.TopArg;
            StackFrame secondArg = context.SecondArg;
            int        basePtr   = topArg.basePtr;

            for (int i = secondArg.basePtr; basePtr <= topArg.endPtr; i++)
            {
                NodeSequence otherSeq = context.Values[basePtr].Sequence;
                NodeSequence sequence = context.Values[i].Sequence;
                context.SetValue(context, i, sequence.Union(context, otherSeq));
                basePtr++;
            }
            context.PopFrame();
            return(base.next);
        }
예제 #2
0
        internal override Opcode Eval(ProcessingContext context)
        {
            StackFrame topArg    = context.TopArg;
            StackFrame secondArg = context.SecondArg;

            Fx.Assert(topArg.Count == secondArg.Count, "");
            for (int x = topArg.basePtr, y = secondArg.basePtr; x <= topArg.endPtr; ++x, ++y)
            {
                NodeSequence seqX = context.Values[x].Sequence;
                NodeSequence seqY = context.Values[y].Sequence;

                // Replace with a new sequence that is the union of the two
                context.SetValue(context, y, seqY.Union(context, seqX));
            }

            context.PopFrame();
            return(this.next);
        }