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)); }
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, "{}"); } }
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)); } }
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); } }