/// <summary> /// Initializes a new instance of the <see cref="MemoryStack{T}"/> class. /// </summary> /// <param name="oldStack">The old stack.</param> public MemoryStack(MemoryStack <T> oldStack) { localIndex = oldStack.Length - 1; stack = new T[oldStack.Length]; copy(oldStack.stack, this.stack, oldStack.Length); }
/// <summary> /// Initializes a new instance of the <see cref="MemoryStack{T}"/> class. /// </summary> /// <param name="oldStack">The old stack.</param> /// <param name="local">The local.</param> public MemoryStack(MemoryStack <T> oldStack, T local) { localIndex = oldStack.Length; stack = new T[oldStack.Length + 1]; copy(oldStack.stack, this.stack, oldStack.Length); stack[oldStack.Length] = local; }
/// <summary> /// Initializes a new instance of the <see cref="VariableStack"/> class. /// </summary> /// <param name="oldStack">The old stack.</param> /// <param name="local">The local.</param> public VariableStack(MemoryStack <IndexContainer> oldStack, IndexContainer local) : base(oldStack, local) { }
/// <summary> /// Initializes a new instance of the <see cref="VariableStack"/> class. /// </summary> /// <param name="oldStack">The old stack.</param> public VariableStack(MemoryStack <IndexContainer> oldStack) : base(oldStack) { }