Beispiel #1
0
        public override ICoroutine Clear(VM.Frame frame, FuncArgsInfo args_info, ref BHS status)
        {
            var arr = frame.stack.Pop();
            var lst = AsList(arr);

            lst.Clear();
            arr.Release();
            return(null);
        }
Beispiel #2
0
        public override ICoroutine Clear(VM.Frame frame, FuncArgsInfo args_info, ref BHS status)
        {
            int idx = (int)frame.stack.PopRelease().num;
            var arr = frame.stack.Pop();
            var lst = (IList <T>)arr.obj;

            lst.Clear();
            arr.Release();
            return(null);
        }
Beispiel #3
0
        public override ICoroutine RemoveAt(VM.Frame frame, FuncArgsInfo args_info, ref BHS status)
        {
            int idx = (int)frame.stack.PopRelease().num;
            var arr = frame.stack.Pop();
            var lst = AsList(arr);

            lst.RemoveAt(idx);
            arr.Release();
            return(null);
        }
Beispiel #4
0
        //NOTE: follows special Opcodes.ArrIdx conventions
        public override ICoroutine ArrIdx(VM.Frame frame, FuncArgsInfo args_info, ref BHS status)
        {
            int idx = (int)frame.stack.PopRelease().num;
            var arr = frame.stack.Pop();
            var lst = (IList <T>)arr.obj;
            var res = Val.NewObj(frame.vm, lst[idx], item_type.Get());

            frame.stack.Push(res);
            arr.Release();
            return(null);
        }
Beispiel #5
0
        public override ICoroutine Add(VM.Frame frm, FuncArgsInfo args_info, ref BHS status)
        {
            var val = frm.stack.Pop();
            var arr = frm.stack.Pop();
            var lst = (IList <T>)arr.obj;

            lst.Add((T)val.obj);
            val.Release();
            arr.Release();
            return(null);
        }
Beispiel #6
0
        //NOTE: follows special Opcodes.ArrIdx conventions
        public override ICoroutine ArrIdx(VM.Frame frame, FuncArgsInfo args_info, ref BHS status)
        {
            int idx = (int)frame.stack.PopRelease().num;
            var arr = frame.stack.Pop();
            var lst = AsList(arr);
            var res = lst[idx];

            frame.stack.PushRetain(res);
            arr.Release();
            return(null);
        }
Beispiel #7
0
        public override ICoroutine Add(VM.Frame frm, FuncArgsInfo args_info, ref BHS status)
        {
            var val = frm.stack.Pop();
            var arr = frm.stack.Pop();
            var lst = AsList(arr);

            lst.Add(val);
            val.Release();
            arr.Release();
            return(null);
        }
Beispiel #8
0
        //NOTE: follows special Opcodes.ArrIdxW conventions
        public override ICoroutine ArrIdxW(VM.Frame frame, FuncArgsInfo args_info, ref BHS status)
        {
            int idx = (int)frame.stack.PopRelease().num;
            var arr = frame.stack.Pop();
            var val = frame.stack.Pop();
            var lst = AsList(arr);

            lst[idx] = val;
            val.Release();
            arr.Release();
            return(null);
        }
Beispiel #9
0
 public abstract ICoroutine Clear(VM.Frame frame, FuncArgsInfo args_info, ref BHS status);
Beispiel #10
0
 public abstract ICoroutine RemoveAt(VM.Frame frame, FuncArgsInfo args_info, ref BHS status);