private void exec_syscall(NakoILCode code) { int funcNo = (int)code.value; NakoAPIFunc s = NakoAPIFuncBank.Instance.FuncList[funcNo]; NakoFuncCallInfo f = new NakoFuncCallInfo(this); object result = s.FuncDl(f); if (s.updateSore) { globalVar.SetValue(0, result); // 変数「それ」に値をセット } StackPush(result); // 関数の結果を PUSH する }
/// <summary> /// 説明を得る /// </summary> /// <returns></returns> public string GetDescription() { string r = ""; switch (type) { case NakoILType.NOP: if (value is string) { r += ":" + value; } break; case NakoILType.LD_CONST_INT: case NakoILType.LD_CONST_REAL: case NakoILType.LD_CONST_STR: case NakoILType.LD_GLOBAL: case NakoILType.ST_GLOBAL: case NakoILType.LD_LOCAL: case NakoILType.ST_LOCAL: case NakoILType.LD_GLOBAL_REF: case NakoILType.LD_LOCAL_REF: case NakoILType.USRCALL: r += ":" + value; break; case NakoILType.SYSCALL: int funcNo = (int)value; NakoAPIFunc s = NakoAPIFuncBank.Instance.FuncList[funcNo]; r += ":" + s.name + "@" + s.PluginInstance.Name + "(" + value + ")"; break; case NakoILType.JUMP: case NakoILType.BRANCH_FALSE: case NakoILType.BRANCH_TRUE: r += "->" + string.Format("{0,0:X4}", (long)value); break; } return(r); }