    [NAME]
    ALL.daovm.architecture.instruction

    [TITLE]
    VM Instructions

    [DESCRIPTION]

       1  DVM_NOP      # no operation, the VM assumes maximum one NOP between two effective codes;
       2  DVM_DATA     # create primitive data: A: type<=DAO_COMPLEX, B: value, C: register;
       3  DVM_GETCL    # get local const: C = A::B; A=0; B, index of the constant;
       4  DVM_GETCK    # get class const: C = A::B; current class, A=0; parent class: A>=1;
       5  DVM_GETCG    # get global const: C = A::B; current namespace, A=0; loaded: A>=1;
       6  DVM_GETVH    # get host variable from code section: C = A::B; A, outer level;
       7  DVM_GETVS    # get static variable or captured up variable from closure;
       8  DVM_GETVO    # get instance object variables: C = A::B; A=0;
       9  DVM_GETVK    # get class global variables: C = A::B; A: the same as GETCK;
      10  DVM_GETVG    # get global variables: C = A::B; A: the same as GETCG;
      11  DVM_GETI     # GET Item(s) : C = A[B];
      12  DVM_GETDI    # GET Item(s) : C = A[B], B is the (direct) index;
      13  DVM_GETMI    # GET Item(s) : C = A[A+1, ..., A+B];
      14  DVM_GETF     # GET Field : C = A.B
      15  DVM_SETVH    # set host variable in code section: C::B = A; C, outer level;
      16  DVM_SETVS    # set static variable or captured up variable from closure;
      17  DVM_SETVO    # set object variables: C::B = A, C the same as A in DVM_GETVO
      18  DVM_SETVK    # set class variables: C::B = A, C the same as A in DVM_GETVK
      19  DVM_SETVG    # set global variables: C::B = A, C the same as A in DVM_GETVG
      20  DVM_SETI     # SET Item(s) : C[B] = A;
      21  DVM_SETDI    # SET Item(s) : C[B] = A, B is the (direct) index;
      22  DVM_SETMI    # SET Item(s) : C[C+1, ..., C+B] = A;
      23  DVM_SETF     # SET Field : C.B = A
      24  DVM_LOAD     # put local value A as reference at C;
      25  DVM_CAST     # convert A to C if they have different types;
      26  DVM_MOVE     # C = A; if B==0, XXX it is compile from assignment, for typing system only
      27  DVM_NOT      # C = ! A; not
      28  DVM_MINUS    # C = - A; unary minus;
      29  DVM_TILDE    # C = ~ A
      30  DVM_SIZE     # C = % A; size operation;
      31  DVM_ADD      # C = A + B;
      32  DVM_SUB      # C = A - B;
      33  DVM_MUL      # C = A * B;
      34  DVM_DIV      # C = A / B;
      35  DVM_MOD      # C = A % B;
      36  DVM_POW      # C = A ** B;
      37  DVM_AND      # C = A && B;
      38  DVM_OR       # C = A || B;
      39  DVM_LT       # C = A <  B;
      40  DVM_LE       # C = A <= B;
      41  DVM_EQ       # C = A == B;
      42  DVM_NE       # C = A != B;
      43  DVM_IN       # C = A in B;
      44  DVM_BITAND   # C = A & B
      45  DVM_BITOR    # C = A | B
      46  DVM_BITXOR   # C = A ^ B
      47  DVM_BITLFT   # C = A << B
      48  DVM_BITRIT   # C = A >> B
      49  DVM_CHECK    # check type: C = A ?= B; C = A ?< B, where A is data, B is data or type
      50  DVM_NAMEVA   # C = A => B: name A, local constant, value B, local register
      51  DVM_PAIR     # C = A : B; create a pair of index, as a tuple;
      52  DVM_TUPLE    # tuple: C = ( A, A+1, ..., A+B-1 ); B>=2, items can be: name=>value
      53  DVM_LIST     # list:  C = { A, A+1, ..., A+B-1 };
      54  DVM_MAP      # map:   C = { A => A+1, ..., A+B-2 => A+B-1 }; if B==0, empty;
      55  DVM_HASH     # hash:  C = { A -> A+1, ..., A+B-2 -> A+B-1 }; if B==0, empty;
      56  DVM_VECTOR   # vector: C = [ A, A+1, ..., A+B-1 ];
      57  DVM_MATRIX   # matrix: C=[A,..,A+c-1;..;A+c*(r-1),..,A+c*r-1]; B=rc;r,c:8-bits each.
      58  DVM_APLIST   # arithmetic progression list: C = { A : ... : A+B-1 }, B = 2 or 3;
      59  DVM_APVECTOR # arithmetic progression vector: C = [ A : ... : A+B-1 ], B = 2 or 3;
      60  DVM_CURRY    # class_or_routine_name: A{ A+1, ..., A+B }
      61  DVM_MCURRY   # object.method: A{ A+1, ..., A+B }
      62  DVM_ROUTINE  # create a function, possibly with closure
      63  DVM_CLASS    # C = class{}, A,A+1,..A+B: A, tuple, A+1, proto class, A+2,.. proto values
      64  DVM_GOTO     # go to B;
      65  DVM_SWITCH   # A: variable, B: location of default codes, C: number of cases
      66  DVM_CASE     # A: constant of the case, B: location of the case codes, C: case mode
      67  DVM_ITER     # create an iterator at C for A if B==0, else test an array of iterators;
      68  DVM_TEST     # if A, go to the next one; else, goto B-th instruction;
      69  DVM_MATH     # C = A( B ); A: sin,cos,...; B: double,complex
      70  DVM_CALL     # function call: C = A( A+1, A+2, ..., A+B ); If B==0, no parameters;
      71  DVM_MCALL    # method call: x.y(...), pass x as the first parameter;
      72  DVM_RETURN   # return A,A+1,..,A+B-1; B==0: no returns; C==1: return from functional;
      73  DVM_YIELD    # yield A, A+1,.., A+B-1; return data at C when resumed;
      74  DVM_EVAL     # evaluate a code section: C=@@(A){}, if B==1, otherwise, C=@@{};
      75  DVM_SECT     # code section label, parameters: A,A+1,...,A+B-1; C #explicit parameters;
      76  DVM_JITC     # run Just-In-Time compiled Code A, and skip the next B instructions;
      77  DVM_DEBUG    # prompt to debugging mode;