示例#1
0
        public override string ToString(Context cx)
        {
            if (!cx.IsLocal(A))
            {
                cx.DefineLocal(A);                                 //this fails, if this Register is used otherwise later
            }
            if (cx.IsLocal(A))
            {
                return("local " + cx.SR(A) + " = " + cx.SKst(BX));
            }

            if (!ObjLuaFunction.DEBUG)
            {
                return("");
            }
            return("// " + R(A) + " = " + cx.SKst(BX));
        }
示例#2
0
 public void Run(Context cx)
 {
     cx.SetReg(A, new Table(Context.TblFbp(B), Context.TblSz(C)));
     if (cx.IsLocal(A))
     {
         cx.SetSReg(A, cx.LocalName(A) + "[]");
     }
     else
     {
         cx.SetSReg(A, "{}");
     }
 }
示例#3
0
 public override string ToString(Context cx)
 {
     if (cx.IsLocal(A))
     {
         return(cx.LocalName(A) + " = !" + cx.SR(B));
     }
     else
     {
         if (!ObjLuaFunction.DEBUG)
         {
             return("");
         }
         return("// " + R(A) + " = !" + cx.SR(B));
     }
 }
示例#4
0
 protected string Assign(ushort reg, Context cx, object val)
 {
     if (cx.IsLocal(reg))
     {
         return(cx.LocalName(reg) + " = " + val);
     }
     else if (R(reg).ToString().StartsWith("{R"))
     {
         if (!ObjLuaFunction.DEBUG)
         {
             return("");
         }
         return("// " + R(reg) + " = " + val);
     }
     else
     {
         return(R(reg) + " = " + val);
     }
 }