internal void CopyFrom(ref EvalStack stack)
 {
     this.buffer.CopyFrom(ref stack.buffer);
     this.frames = stack.frames;
     this.stack = stack.stack;
     this.contextOnTopOfStack = stack.contextOnTopOfStack;
 }
Beispiel #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;
 }
Beispiel #3
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;
 }
Beispiel #4
0
 internal EvalStack(int frameCapacity, int stackCapacity)
 {
     this.buffer = new QueryBuffer <Value>(frameCapacity + stackCapacity);
     this.stack  = new StackRegion(new QueryRange(0, stackCapacity - 1));
     this.buffer.Reserve(stackCapacity);
     this.frames = new StackRegion(new QueryRange(stackCapacity, (stackCapacity + frameCapacity) - 1));
     this.buffer.Reserve(frameCapacity);
     this.contextOnTopOfStack = false;
 }
 internal EvalStack(int frameCapacity, int stackCapacity)
 {
     this.buffer = new QueryBuffer<Value>(frameCapacity + stackCapacity);
     this.stack = new StackRegion(new QueryRange(0, stackCapacity - 1));
     this.buffer.Reserve(stackCapacity);
     this.frames = new StackRegion(new QueryRange(stackCapacity, (stackCapacity + frameCapacity) - 1));
     this.buffer.Reserve(frameCapacity);
     this.contextOnTopOfStack = false;
 }
Beispiel #6
0
        internal void Init(Value[] buffer, int stackCapacity, int frameCapacity)
        {
            Fx.Assert(null != buffer, "");
            this.stackCapacity = stackCapacity;
            this.frameCapacity = frameCapacity;

            this.buffer = new QueryBuffer <Value>(buffer);
            this.stack  = new StackRegion(new QueryRange(0, stackCapacity - 1));
            this.buffer.Reserve(stackCapacity);
            this.frames = new StackRegion(new QueryRange(stackCapacity, stackCapacity + frameCapacity - 1));
            this.buffer.Reserve(frameCapacity);
        }
Beispiel #7
0
        internal EvalStack(int frameCapacity, int stackCapacity)
        {
            Fx.Assert(frameCapacity >= 0 && stackCapacity >= 0, "");

            // All structs! Cost of allocation is relatively mild...
            this.buffer = new QueryBuffer <Value>(frameCapacity + stackCapacity);
            this.stack  = new StackRegion(new QueryRange(0, stackCapacity - 1));
            this.buffer.Reserve(stackCapacity);
            this.frames = new StackRegion(new QueryRange(stackCapacity, stackCapacity + frameCapacity - 1));
            this.buffer.Reserve(frameCapacity);
            this.contextOnTopOfStack = false;
        }