/////////////////////////////////////// public void CopyFrom(ValList lst) { Clear(); for (int i = 0; i < lst.Count; ++i) { Add(lst[i]); } }
static void Del(ValList lst) { if (lst.refs != 0) { throw new Exception("Freeing invalid object, refs " + lst.refs); } lst.refs = -1; lst.Clear(); lst.vm.vlsts_pool.stack.Push(lst); if (lst.vm.vlsts_pool.stack.Count > lst.vm.vlsts_pool.miss) { throw new Exception("Unbalanced New/Del"); } }
public override void CreateArr(VM.Frame frm, ref Val v, IType type) { v.SetObj(ValList.New(frm.vm), type); }