コード例 #1
0
        internal void PopSequenceFrameTo(ref EvalStack dest)
        {
            StackFrame topFrame = this.TopArg;

            dest.PushFrame();
            int argCount = topFrame.Count;

            switch (argCount)
            {
            default:
                dest.Push(this.buffer.buffer, topFrame.basePtr, argCount);
                break;

            case 0:
                break;

            case 1:
                dest.Push(this.buffer.buffer[topFrame.basePtr].Sequence);
                break;
            }

            // Pop original fame
            this.stack.stackPtr = topFrame.basePtr - 1;
            this.frames.stackPtr--;
        }
コード例 #2
0
 internal void CopyFrom(ref EvalStack stack)
 {
     this.buffer.CopyFrom(ref stack.buffer);
     this.frames = stack.frames;
     this.stack  = stack.stack;
     this.contextOnTopOfStack = stack.contextOnTopOfStack;
 }
コード例 #3
0
 internal void CopyFrom(ref EvalStack stack)
 {
     this.buffer.CopyFrom(ref stack.buffer);
     this.frames = stack.frames;
     this.stack = stack.stack;
     this.contextOnTopOfStack = stack.contextOnTopOfStack;
 }
コード例 #4
0
 internal EvalStack(ref EvalStack stack)
 {
     this.buffer        = new QueryBuffer <Value>(stack.buffer);
     this.stackCapacity = stack.stackCapacity;
     this.frameCapacity = stack.frameCapacity;
     this.stack         = stack.stack;
     this.frames        = stack.frames;
 }
コード例 #5
0
        internal void TransferSequenceSizeTo(ref EvalStack stack)
        {
            StackFrame topArg = this.TopArg;

            stack.PushFrame();
            for (int i = topArg.basePtr; i <= topArg.endPtr; i++)
            {
                NodeSequence sequence = this.buffer.buffer[i].Sequence;
                int          count    = sequence.Count;
                if ((this.stack.stackPtr + count) > this.stack.bounds.end)
                {
                    this.GrowStack(count);
                }
                for (int j = 0; j < count; j++)
                {
                    stack.Push((double)NodeSequence.GetContextSize(sequence, j));
                }
            }
        }
コード例 #6
0
        internal void TransferPositionsTo(ref EvalStack stack)
        {
            StackFrame topArg = this.TopArg;

            stack.PushFrame();
            for (int i = topArg.basePtr; i <= topArg.endPtr; i++)
            {
                NodeSequence sequence = this.buffer.buffer[i].Sequence;
                int          count    = sequence.Count;
                if ((this.stack.stackPtr + count) > this.stack.bounds.end)
                {
                    this.GrowStack(count);
                }
                for (int j = 0; j < count; j++)
                {
                    stack.Push((double)sequence.Items[j].Position);
                }
            }
        }
コード例 #7
0
        internal void TransferSequenceSizeTo(ref EvalStack stack)
        {
            StackFrame arg = this.TopArg;

            stack.PushFrame();
            for (int i = arg.basePtr; i <= arg.endPtr; ++i)
            {
                NodeSequence seq       = this.buffer.buffer[i].Sequence;
                int          nodeCount = seq.Count;

                if ((this.stack.stackPtr + nodeCount) > this.stack.bounds.end)
                {
                    this.GrowStack(nodeCount);
                }

                for (int n = 0; n < nodeCount; ++n)
                {
                    stack.Push((double)NodeSequence.GetContextSize(seq, n));
                }
            }
        }
コード例 #8
0
        internal void TransferPositionsTo(ref EvalStack stack)
        {
            StackFrame arg = this.TopArg;

            stack.PushFrame();
            for (int i = arg.basePtr; i <= arg.endPtr; ++i)
            {
                NodeSequence seq       = this.buffer.buffer[i].Sequence;
                int          nodeCount = seq.Count;

                if ((this.stack.stackPtr + nodeCount) > this.stack.bounds.end)
                {
                    this.GrowStack(nodeCount);
                }

                for (int n = 0; n < nodeCount; ++n)
                {
                    stack.Push((double)seq.Items[n].Position);
                }
            }
        }
コード例 #9
0
        internal void PopSequenceFrameTo(ref EvalStack dest)
        {
            StackFrame topArg = this.TopArg;

            dest.PushFrame();
            int count = topArg.Count;

            switch (count)
            {
            case 0:
                break;

            case 1:
                dest.Push(this.buffer.buffer[topArg.basePtr].Sequence);
                break;

            default:
                dest.Push(this.buffer.buffer, topArg.basePtr, count);
                break;
            }
            this.stack.stackPtr = topArg.basePtr - 1;
            this.frames.stackPtr--;
        }
コード例 #10
0
 internal void Push(ref EvalStack source)
 {
     this.Push(source.buffer.buffer, source.stack.bounds.start, source.frames.bounds.end + 1);
 }
コード例 #11
0
 internal ProcessingContext()
 {
     this.valueStack = new EvalStack(2, 4);
     this.sequenceStack = new EvalStack(1, 2);
     this.nodeCount = -1;
 }
コード例 #12
0
ファイル: QueryProcessor.cs プロジェクト: dox0/DotNet471RS3
 internal ProcessingContext()
 {
     this.valueStack    = new EvalStack(2, 4);
     this.sequenceStack = new EvalStack(1, 2);
     this.nodeCount     = -1;
 }
コード例 #13
0
 internal void TransferSequenceSizeTo(ref EvalStack stack)
 {
     StackFrame topArg = this.TopArg;
     stack.PushFrame();
     for (int i = topArg.basePtr; i <= topArg.endPtr; i++)
     {
         NodeSequence sequence = this.buffer.buffer[i].Sequence;
         int count = sequence.Count;
         if ((this.stack.stackPtr + count) > this.stack.bounds.end)
         {
             this.GrowStack(count);
         }
         for (int j = 0; j < count; j++)
         {
             stack.Push((double) NodeSequence.GetContextSize(sequence, j));
         }
     }
 }
コード例 #14
0
 internal void TransferPositionsTo(ref EvalStack stack)
 {
     StackFrame topArg = this.TopArg;
     stack.PushFrame();
     for (int i = topArg.basePtr; i <= topArg.endPtr; i++)
     {
         NodeSequence sequence = this.buffer.buffer[i].Sequence;
         int count = sequence.Count;
         if ((this.stack.stackPtr + count) > this.stack.bounds.end)
         {
             this.GrowStack(count);
         }
         for (int j = 0; j < count; j++)
         {
             stack.Push((double) sequence.Items[j].Position);
         }
     }
 }
コード例 #15
0
        internal void PopSequenceFrameTo(ref EvalStack dest)
        {
            StackFrame topArg = this.TopArg;
            dest.PushFrame();
            int count = topArg.Count;
            switch (count)
            {
                case 0:
                    break;

                case 1:
                    dest.Push(this.buffer.buffer[topArg.basePtr].Sequence);
                    break;

                default:
                    dest.Push(this.buffer.buffer, topArg.basePtr, count);
                    break;
            }
            this.stack.stackPtr = topArg.basePtr - 1;
            this.frames.stackPtr--;
        }