internal void CopyFrom(ref EvalStack stack) { this.buffer.CopyFrom(ref stack.buffer); this.frames = stack.frames; this.stack = stack.stack; this.contextOnTopOfStack = stack.contextOnTopOfStack; }
internal void CopyFrom(ref EvalStack stack) { this.buffer.CopyFrom(ref stack.buffer); this.frames = stack.frames; this.stack = stack.stack; this.contextOnTopOfStack = stack.contextOnTopOfStack; }
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; }
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; }
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); }
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; }