Ejemplo n.º 1
0
 public static void arith_op(lua_State L, op_delegate op, TMS tm, StkId base_, Instruction i, TValue[] k, StkId ra, InstructionPtr pc)
 {
     TValue rb = RKB(L, base_, i, k);
         TValue rc = RKC(L, base_, i, k);
         if (ttisnumber(rb) && ttisnumber(rc))
         {
             lua_Number nb = nvalue(rb), nc = nvalue(rc);
             setnvalue(ra, op(nb, nc));
         }
         else
         {
             //Protect(
             L.savedpc = InstructionPtr.Assign(pc);
             Arith(L, ra, rb, rc, tm);
             base_ = L.base_;
             //);
         }
 }
Ejemplo n.º 2
0
        public static void arith_op(lua_State L, op_delegate op, TMS tm, StkId base_, Instruction i, TValue[] k, StkId ra, InstructionPtr pc)
        {
            TValue rb = RKB(L, base_, i, k);
            TValue rc = RKC(L, base_, i, k);

            if (ttisnumber(rb) && ttisnumber(rc))
            {
                lua_Number nb = nvalue(rb), nc = nvalue(rc);
                setnvalue(ra, op(nb, nc));
            }
            else
            {
                //Protect(
                L.savedpc = InstructionPtr.Assign(pc);
                Arith(L, ra, rb, rc, tm);
                base_ = L.base_;
                //);
            }
        }