1
0
Эх сурвалжийг харах

style: 修改了较长名字的宏

SongZihuan 4 жил өмнө
parent
commit
ff229d2e21
51 өөрчлөгдсөн 1192 нэмэгдсэн , 1195 устгасан
  1. 12 12
      VirtulMathCore/include/__macro.h
  2. 1 1
      VirtulMathCore/include/clib.h
  3. 11 11
      VirtulMathCore/include/parameter.h
  4. 51 51
      VirtulMathCore/include/run.h
  5. 12 13
      VirtulMathCore/include/value.h
  6. 2 2
      VirtulMathCore/include/var.h
  7. 2 2
      VirtulMathCore/ofunc/clib/manager.c
  8. 7 7
      VirtulMathCore/ofunc/include/__ofunc.h
  9. 1 1
      VirtulMathCore/ofunc/include/bool.h
  10. 1 1
      VirtulMathCore/ofunc/include/dict.h
  11. 1 1
      VirtulMathCore/ofunc/include/dictiter.h
  12. 1 1
      VirtulMathCore/ofunc/include/error_.h
  13. 1 1
      VirtulMathCore/ofunc/include/function.h
  14. 1 1
      VirtulMathCore/ofunc/include/io.h
  15. 1 1
      VirtulMathCore/ofunc/include/list.h
  16. 1 1
      VirtulMathCore/ofunc/include/listiter.h
  17. 1 1
      VirtulMathCore/ofunc/include/num.h
  18. 1 1
      VirtulMathCore/ofunc/include/object.h
  19. 1 1
      VirtulMathCore/ofunc/include/pass.h
  20. 1 1
      VirtulMathCore/ofunc/include/str.h
  21. 1 1
      VirtulMathCore/ofunc/include/sys.h
  22. 1 1
      VirtulMathCore/ofunc/include/vobject.h
  23. 19 19
      VirtulMathCore/ofunc/src/__ofunc.c
  24. 8 8
      VirtulMathCore/ofunc/src/bool.c
  25. 41 41
      VirtulMathCore/ofunc/src/dict.c
  26. 23 23
      VirtulMathCore/ofunc/src/dictiter.c
  27. 5 5
      VirtulMathCore/ofunc/src/error_.c
  28. 10 10
      VirtulMathCore/ofunc/src/function.c
  29. 8 8
      VirtulMathCore/ofunc/src/io.c
  30. 65 65
      VirtulMathCore/ofunc/src/list.c
  31. 19 19
      VirtulMathCore/ofunc/src/listiter.c
  32. 8 8
      VirtulMathCore/ofunc/src/num.c
  33. 15 15
      VirtulMathCore/ofunc/src/object.c
  34. 5 5
      VirtulMathCore/ofunc/src/pass.c
  35. 33 33
      VirtulMathCore/ofunc/src/str.c
  36. 37 37
      VirtulMathCore/ofunc/src/sys.c
  37. 30 30
      VirtulMathCore/ofunc/src/vobject.c
  38. 19 19
      VirtulMathCore/parser/__grammar.c
  39. 134 134
      VirtulMathCore/parser/grammar.c
  40. 35 36
      VirtulMathCore/parser/include/__grammar.h
  41. 78 78
      VirtulMathCore/src/__run.c
  42. 20 20
      VirtulMathCore/src/include/__run.h
  43. 2 2
      VirtulMathCore/src/ofunc.c
  44. 55 55
      VirtulMathCore/src/parameter.c
  45. 60 60
      VirtulMathCore/src/run.c
  46. 114 114
      VirtulMathCore/src/runbranch.c
  47. 50 50
      VirtulMathCore/src/runcall.c
  48. 38 38
      VirtulMathCore/src/runfile.c
  49. 108 108
      VirtulMathCore/src/runoperation.c
  50. 39 40
      VirtulMathCore/src/value.c
  51. 2 2
      VirtulMathCore/src/var.c

+ 12 - 12
VirtulMathCore/include/__macro.h

@@ -10,18 +10,18 @@
 
 #define FREE_BASE(element, return_) do{if(element == NULL)goto return_;}while(0)
 
-#define INTER_FUNCTIONSIG_CORE struct Inter *inter, struct VarList *var_list
-#define INTER_FUNCTIONSIG_NOT_ST struct LinkValue *belong, struct Result *result, INTER_FUNCTIONSIG_CORE
-#define INTER_FUNCTIONSIG struct Statement *st, INTER_FUNCTIONSIG_NOT_ST
-
-#define CALL_INTER_FUNCTIONSIG_CORE(var_list) inter, var_list
-#define CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong) belong, result, CALL_INTER_FUNCTIONSIG_CORE(var_list)
-#define CALL_INTER_FUNCTIONSIG(st, var_list, result, belong) st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)
-
-#define OFFICAL_FUNCTIONSIG struct Argument *arg, INTER_FUNCTIONSIG_NOT_ST
-#define CALL_OFFICAL_FUNCTION(arg, var_list, result, belong) arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)
-#define REGISTERED_FUNCTIONSIG struct LinkValue *belong, INTER_FUNCTIONSIG_CORE
-#define CALL_REGISTERED_FUNCTION(belong, var_list) belong, CALL_INTER_FUNCTIONSIG_CORE(var_list)
+#define FUNC_CORE struct Inter *inter, struct VarList *var_list
+#define FUNC_NT struct LinkValue *belong, struct Result *result, FUNC_CORE
+#define FUNC struct Statement *st, FUNC_NT
+
+#define CFUNC_CORE(var_list) inter, var_list
+#define CFUNC_NT(var_list, result, belong) belong, result, CFUNC_CORE(var_list)
+#define CFUNC(st, var_list, result, belong) st, CFUNC_NT(var_list, result, belong)
+
+#define O_FUNC struct Argument *arg, FUNC_NT
+#define CO_FUNC(arg, var_list, result, belong) arg, CFUNC_NT(var_list, result, belong)
+#define R_FUNC struct LinkValue *belong, FUNC_CORE
+#define CR_FUNC(belong, var_list) belong, CFUNC_CORE(var_list)
 
 #define MD5_SIZE (16)
 #define MD5_STR_LEN (MD5_SIZE * 2)

+ 1 - 1
VirtulMathCore/include/clib.h

@@ -4,6 +4,6 @@
 
 struct Inter;
 struct LinkValue;
-void importClibCore(char *file, struct LinkValue *belong, INTER_FUNCTIONSIG_CORE);
+void importClibCore(char *file, struct LinkValue *belong, FUNC_CORE);
 bool checkCLib(char *file);
 #endif //VIRTUALMATH_CLIB_H

+ 11 - 11
VirtulMathCore/include/parameter.h

@@ -77,26 +77,26 @@ Parameter *connectNameParameter(struct Statement *value, struct Statement *name,
 Parameter *connectArgsParameter(Statement *st, Parameter *base, bool is_sep);
 Parameter *connectKwargsParameter(struct Statement *st, Parameter *base);
 void freeParameter(Parameter *pt, bool free_st);
-Argument *listToArgument(LinkValue *list_value, long line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-Argument *dictToArgument(LinkValue *dict_value, long line, char *file, INTER_FUNCTIONSIG_NOT_ST);
+Argument *listToArgument(LinkValue *list_value, long line, char *file, FUNC_NT);
+Argument *dictToArgument(LinkValue *dict_value, long line, char *file, FUNC_NT);
 
-ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *function_base, VarList *function_var, INTER_FUNCTIONSIG_NOT_ST);
-ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, INTER_FUNCTIONSIG_NOT_ST);
-Argument *getArgument(Parameter *call, bool is_dict, INTER_FUNCTIONSIG_NOT_ST);
+ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *function_base, VarList *function_var, FUNC_NT);
+ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, FUNC_NT);
+Argument *getArgument(Parameter *call, bool is_dict, FUNC_NT);
 
-ResultType defaultParameter(Parameter **function_ad, vnum *num, INTER_FUNCTIONSIG_NOT_ST);
-ResultType argumentToVar(Argument **call_ad, vnum *num, INTER_FUNCTIONSIG_NOT_ST);
+ResultType defaultParameter(Parameter **function_ad, vnum *num, FUNC_NT);
+ResultType argumentToVar(Argument **call_ad, vnum *num, FUNC_NT);
 ResultType parameterFromVar(Parameter **function_ad, VarList *function_var, vnum *num, vnum max, bool *status,
-                            INTER_FUNCTIONSIG_NOT_ST);
-ResultType argumentToParameter(Argument **call_ad, Parameter **function_ad, VarList *function_var, INTER_FUNCTIONSIG_NOT_ST);
+                            FUNC_NT);
+ResultType argumentToParameter(Argument **call_ad, Parameter **function_ad, VarList *function_var, FUNC_NT);
 
 Inherit *setFatherCore(Inherit *father_tmp);
 Inherit *setFather(Argument *call);
 bool checkFormal(Parameter *pt);
 
 Argument *parserValueArgument(ArgumentParser *ap, Argument *arg, int *status, ArgumentParser **bak);
-int parserNameArgument(ArgumentParser ap[], Argument *arg, ArgumentParser **bak, INTER_FUNCTIONSIG_NOT_ST);
-int parserArgumentUnion(ArgumentParser ap[], Argument *arg, INTER_FUNCTIONSIG_NOT_ST);
+int parserNameArgument(ArgumentParser ap[], Argument *arg, ArgumentParser **bak, FUNC_NT);
+int parserArgumentUnion(ArgumentParser ap[], Argument *arg, FUNC_NT);
 Argument *parserArgumentValueCore(Argument *arg, ArgumentParser *ap);
 ArgumentParser *parserArgumentNameDefault(ArgumentParser *ap);
 ArgumentParser *parserArgumentValueDefault(ArgumentParser *ap);

+ 51 - 51
VirtulMathCore/include/run.h

@@ -14,66 +14,66 @@ typedef struct Parameter Parameter;
 typedef struct Argument Argument;
 typedef struct DecorationStatement DecorationStatement;
 
-typedef ResultType (*VarInfo)(wchar_t **name, int *times, INTER_FUNCTIONSIG);
+typedef ResultType (*VarInfo)(wchar_t **name, int *times, FUNC);
 
 ResultType globalIterStatement(Result *result, Inter *inter, Statement *st);
-bool operationSafeInterStatement(INTER_FUNCTIONSIG);
-bool ifBranchSafeInterStatement(INTER_FUNCTIONSIG);
-bool functionSafeInterStatement(INTER_FUNCTIONSIG);
-bool blockSafeInterStatement(INTER_FUNCTIONSIG);
-bool cycleBranchSafeInterStatement(INTER_FUNCTIONSIG);
-bool withBranchSafeInterStatement(INTER_FUNCTIONSIG);
-bool tryBranchSafeInterStatement(INTER_FUNCTIONSIG);
+bool operationSafeInterStatement(FUNC);
+bool ifBranchSafeInterStatement(FUNC);
+bool functionSafeInterStatement(FUNC);
+bool blockSafeInterStatement(FUNC);
+bool cycleBranchSafeInterStatement(FUNC);
+bool withBranchSafeInterStatement(FUNC);
+bool tryBranchSafeInterStatement(FUNC);
 Statement *checkLabel(Statement *base, wchar_t *label);
 
-ResultType operationStatement(INTER_FUNCTIONSIG);
-ResultType setClass(INTER_FUNCTIONSIG);
-ResultType setFunction(INTER_FUNCTIONSIG);
-ResultType setLambda(INTER_FUNCTIONSIG);
-ResultType callBack(INTER_FUNCTIONSIG);
-ResultType elementSlice(INTER_FUNCTIONSIG);
+ResultType operationStatement(FUNC);
+ResultType setClass(FUNC);
+ResultType setFunction(FUNC);
+ResultType setLambda(FUNC);
+ResultType callBack(FUNC);
+ResultType elementSlice(FUNC);
 
-ResultType callBackCore(LinkValue *function_value, Argument *arg, fline line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST);
-ResultType callBackCorePt(LinkValue *function_value, Parameter *pt, long line, char *file, INTER_FUNCTIONSIG_NOT_ST);
+ResultType callBackCore(LinkValue *function_value, Argument *arg, fline line, char *file, int pt_sep, FUNC_NT);
+ResultType callBackCorePt(LinkValue *function_value, Parameter *pt, long line, char *file, FUNC_NT);
 
-ResultType setDecoration(DecorationStatement *ds, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST);
-ResultType getVar(INTER_FUNCTIONSIG, VarInfo var_info);
-ResultType getBaseValue(INTER_FUNCTIONSIG);
-ResultType getList(INTER_FUNCTIONSIG);
-ResultType getDict(INTER_FUNCTIONSIG);
-ResultType setDefault(INTER_FUNCTIONSIG);
+ResultType setDecoration(DecorationStatement *ds, LinkValue *value, FUNC_NT);
+ResultType getVar(FUNC, VarInfo var_info);
+ResultType getBaseValue(FUNC);
+ResultType getList(FUNC);
+ResultType getDict(FUNC);
+ResultType setDefault(FUNC);
 
-ResultType ifBranch(INTER_FUNCTIONSIG);
-ResultType whileBranch(INTER_FUNCTIONSIG);
-ResultType forBranch(INTER_FUNCTIONSIG);
-ResultType withBranch(INTER_FUNCTIONSIG);
-ResultType tryBranch(INTER_FUNCTIONSIG);
-ResultType breakCycle(INTER_FUNCTIONSIG);
-ResultType continueCycle(INTER_FUNCTIONSIG);
-ResultType regoIf(INTER_FUNCTIONSIG);
-ResultType restartCode(INTER_FUNCTIONSIG);
-ResultType returnCode(INTER_FUNCTIONSIG);
-ResultType yieldCode(INTER_FUNCTIONSIG);
-ResultType raiseCode(INTER_FUNCTIONSIG);
-ResultType assertCode(INTER_FUNCTIONSIG);
-ResultType gotoLabel(INTER_FUNCTIONSIG);
-ResultType runLabel(INTER_FUNCTIONSIG);
+ResultType ifBranch(FUNC);
+ResultType whileBranch(FUNC);
+ResultType forBranch(FUNC);
+ResultType withBranch(FUNC);
+ResultType tryBranch(FUNC);
+ResultType breakCycle(FUNC);
+ResultType continueCycle(FUNC);
+ResultType regoIf(FUNC);
+ResultType restartCode(FUNC);
+ResultType returnCode(FUNC);
+ResultType yieldCode(FUNC);
+ResultType raiseCode(FUNC);
+ResultType assertCode(FUNC);
+ResultType gotoLabel(FUNC);
+ResultType runLabel(FUNC);
 
-ResultType includeFile(INTER_FUNCTIONSIG);
-ResultType importFile(INTER_FUNCTIONSIG);
-ResultType fromImportFile(INTER_FUNCTIONSIG);
+ResultType includeFile(FUNC);
+ResultType importFile(FUNC);
+ResultType fromImportFile(FUNC);
 
-ResultType pointAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST);
-ResultType listAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST);
-ResultType assCore(Statement *name, LinkValue *value, bool check_aut, bool setting, INTER_FUNCTIONSIG_NOT_ST);
-ResultType downAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST);
-ResultType varAss(Statement *name, LinkValue *value, bool check_aut, bool setting, INTER_FUNCTIONSIG_NOT_ST);
+ResultType pointAss(Statement *name, LinkValue *value, FUNC_NT);
+ResultType listAss(Statement *name, LinkValue *value, FUNC_NT);
+ResultType assCore(Statement *name, LinkValue *value, bool check_aut, bool setting, FUNC_NT);
+ResultType downAss(Statement *name, LinkValue *value, FUNC_NT);
+ResultType varAss(Statement *name, LinkValue *value, bool check_aut, bool setting, FUNC_NT);
 
-ResultType delOperation(INTER_FUNCTIONSIG);
-ResultType delCore(Statement *name, bool check_aut, INTER_FUNCTIONSIG_NOT_ST);
-ResultType listDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST);
-ResultType varDel(Statement *name, bool check_aut, INTER_FUNCTIONSIG_NOT_ST);
-ResultType pointDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST);
-ResultType downDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST);
+ResultType delOperation(FUNC);
+ResultType delCore(Statement *name, bool check_aut, FUNC_NT);
+ResultType listDel(Statement *name, FUNC_NT);
+ResultType varDel(Statement *name, bool check_aut, FUNC_NT);
+ResultType pointDel(Statement *name, FUNC_NT);
+ResultType downDel(Statement *name, FUNC_NT);
 bool is_quitExc(LinkValue *value, Inter *inter);
 #endif //VIRTUALMATH_RUN_H

+ 12 - 13
VirtulMathCore/include/value.h

@@ -27,8 +27,8 @@ typedef struct Error Error;
 typedef struct Inherit Inherit;
 typedef struct Package Package;
 
-typedef enum ResultType (*OfficialFunction)(OFFICAL_FUNCTIONSIG);
-typedef void (*Registered)(REGISTERED_FUNCTIONSIG);
+typedef enum ResultType (*OfficialFunction)(O_FUNC);
+typedef void (*Registered)(R_FUNC);
 
 enum ValueAuthority {
     auto_aut,
@@ -203,27 +203,26 @@ LinkValue *makeLinkValue(Value *value, LinkValue *belong, Inter *inter);
 void freeLinkValue(LinkValue **value);
 LinkValue *copyLinkValue(LinkValue *value, Inter *inter);
 Value *useNoneValue(Inter *inter, Result *result);
-Value *makeBoolValue(bool bool_num, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-Value *makePassValue(fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-Value *makeNumberValue(vnum num, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-Value *makeStringValue(wchar_t *str, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-Value *makeVMFunctionValue(struct Statement *st, struct Parameter *pt, INTER_FUNCTIONSIG_NOT_ST);
-Value *makeCFunctionValue(OfficialFunction of, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
+Value *makeBoolValue(bool bool_num, fline line, char *file, FUNC_NT);
+Value *makePassValue(fline line, char *file, FUNC_NT);
+Value *makeNumberValue(vnum num, fline line, char *file, FUNC_NT);
+Value *makeStringValue(wchar_t *str, fline line, char *file, FUNC_NT);
+Value *makeVMFunctionValue(struct Statement *st, struct Parameter *pt, FUNC_NT);
+Value *makeCFunctionValue(OfficialFunction of, fline line, char *file, FUNC_NT);
 LinkValue *makeCFunctionFromOf(OfficialFunction of, LinkValue *func, OfficialFunction function_new, OfficialFunction function_init, LinkValue *belong, VarList *var_list, Inter *inter);
 Value *makeClassValue(VarList *var_list, Inter *inter, Inherit *father);
-Value *makeListValue(Argument *arg, fline line, char *file, enum ListType type, INTER_FUNCTIONSIG_NOT_ST);
-Value *makeDictValue(Argument *arg, bool new_hash, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
+Value *makeListValue(Argument *arg, fline line, char *file, enum ListType type, FUNC_NT);
+Value *makeDictValue(Argument *arg, bool new_hash, fline line, char *file, FUNC_NT);
 
 void setResultCore(Result *ru);
 void setResult(Result *ru, Inter *inter);
 void setResultBase(Result *ru, Inter *inter);
-void setResultErrorSt(BaseErrorType type, wchar_t *error_message, bool new, INTER_FUNCTIONSIG);
-void setResultError(BaseErrorType type, wchar_t *error_message, fline line, char *file, bool new, INTER_FUNCTIONSIG_NOT_ST);
+void setResultErrorSt(BaseErrorType type, wchar_t *error_message, bool new, FUNC);
+void setResultError(BaseErrorType type, wchar_t *error_message, fline line, char *file, bool new, FUNC_NT);
 void setResultOperationNone(Result *ru, Inter *inter, LinkValue *belong);
 void setResultOperation(Result *ru, LinkValue *value);
 void setResultOperationBase(Result *ru, LinkValue *value);
 void freeResult(Result *ru);
-void freeResultSafe(Result *ru);
 
 Package *makePackage(Value *value, char *md5, char *name, Package *base);
 void freePackage(Package *base);

+ 2 - 2
VirtulMathCore/include/var.h

@@ -55,10 +55,10 @@ VarList *freeVarList(VarList *vl);
 
 vhashn time33(wchar_t *key);
 LinkValue *findVar(wchar_t *name, VarOperation operating, Inter *inter, HashTable *ht);
-LinkValue *findFromVarList(wchar_t *name, vnum times, VarOperation operating, INTER_FUNCTIONSIG_CORE);
+LinkValue *findFromVarList(wchar_t *name, vnum times, VarOperation operating, FUNC_CORE);
 void addVar(wchar_t *name, LinkValue *value, LinkValue *name_, Inter *inter, HashTable *ht);
 void updateHashTable(HashTable *update, HashTable *new, Inter *inter);
-void addFromVarList(wchar_t *name, LinkValue *name_, vnum times, LinkValue *value, INTER_FUNCTIONSIG_CORE);
+void addFromVarList(wchar_t *name, LinkValue *name_, vnum times, LinkValue *value, FUNC_CORE);
 
 VarList *pushVarList(VarList *base, Inter *inter);
 VarList *popVarList(VarList *base);

+ 2 - 2
VirtulMathCore/ofunc/clib/manager.c

@@ -14,9 +14,9 @@ bool checkCLib(char *file) {
     return false;
 }
 
-void importClibCore(char *file, struct LinkValue *belong, INTER_FUNCTIONSIG_CORE){
+void importClibCore(char *file, struct LinkValue *belong, FUNC_CORE){
     for (struct InFo *info = ManagerInFo; info->name != NULL; info++) {
         if (eqString(file, info->name))
-            info->reg(CALL_REGISTERED_FUNCTION(belong, var_list));
+            info->reg(CR_FUNC(belong, var_list));
     }
 }

+ 7 - 7
VirtulMathCore/ofunc/include/__ofunc.h

@@ -5,16 +5,16 @@
 #include "__run.h"
 
 void newObjectSettingPresetting(LinkValue *func, LinkValue *name, Inter *inter);
-LinkValue *registeredFunctionCore(OfficialFunction of, wchar_t *name, INTER_FUNCTIONSIG_NOT_ST);
+LinkValue *registeredFunctionCore(OfficialFunction of, wchar_t *name, FUNC_NT);
 
-bool iterNameFunc(NameFunc *list, INTER_FUNCTIONSIG_NOT_ST);
-bool iterClassFunc(NameFunc *list, INTER_FUNCTIONSIG_NOT_ST);
+bool iterNameFunc(NameFunc *list, FUNC_NT);
+bool iterClassFunc(NameFunc *list, FUNC_NT);
 
-void iterBaseNameFunc(NameFunc *list, struct LinkValue *father, INTER_FUNCTIONSIG_CORE);
-void iterBaseClassFunc(NameFunc *list, LinkValue *father, INTER_FUNCTIONSIG_CORE);
+void iterBaseNameFunc(NameFunc *list, struct LinkValue *father, FUNC_CORE);
+void iterBaseClassFunc(NameFunc *list, LinkValue *father, FUNC_CORE);
 LinkValue *makeBaseChildClass(LinkValue *inherit, Inter *inter);
 
-bool checkIndex(vnum *index, const vnum *size, INTER_FUNCTIONSIG_NOT_ST);
-bool checkSlice(vnum *first, vnum *second, const vnum *stride, vnum size, INTER_FUNCTIONSIG_NOT_ST);
+bool checkIndex(vnum *index, const vnum *size, FUNC_NT);
+bool checkSlice(vnum *first, vnum *second, const vnum *stride, vnum size, FUNC_NT);
 void addBaseClassVar(wchar_t *name, LinkValue *obj, LinkValue *belong, Inter *inter);
 #endif //VIRTUALMATH___OFUNC_H

+ 1 - 1
VirtulMathCore/ofunc/include/bool.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_BOOL_H
 #define VIRTUALMATH_BOOL_H
-void registeredBool(REGISTERED_FUNCTIONSIG);
+void registeredBool(R_FUNC);
 void makeBaseBool(Inter *inter);
 #endif //VIRTUALMATH_BOOL_H

+ 1 - 1
VirtulMathCore/ofunc/include/dict.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_DICT_H
 #define VIRTUALMATH_DICT_H
-void registeredDict(REGISTERED_FUNCTIONSIG);
+void registeredDict(R_FUNC);
 void makeBaseDict(Inter *inter);
 #endif //VIRTUALMATH_DICT_H

+ 1 - 1
VirtulMathCore/ofunc/include/dictiter.h

@@ -1,6 +1,6 @@
 #ifndef VIRTUALMATH_DICTITER_H
 #define VIRTUALMATH_DICTITER_H
 
-void registeredDictIter(REGISTERED_FUNCTIONSIG);
+void registeredDictIter(R_FUNC);
 void makeBaseDictIter(Inter *inter);
 #endif //VIRTUALMATH_DICTITER_H

+ 1 - 1
VirtulMathCore/ofunc/include/error_.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_ERROR__H
 #define VIRTUALMATH_ERROR__H
 void makeExcIter(Inter *inter);
-void registeredExcIter(REGISTERED_FUNCTIONSIG);
+void registeredExcIter(R_FUNC);
 #endif //VIRTUALMATH_ERROR__H

+ 1 - 1
VirtulMathCore/ofunc/include/function.h

@@ -1,6 +1,6 @@
 #ifndef VIRTUALMATH_FUNCTION_H
 #define VIRTUALMATH_FUNCTION_H
-void registeredFunction(REGISTERED_FUNCTIONSIG);
+void registeredFunction(R_FUNC);
 void functionPresetting(LinkValue *func, LinkValue **func_new, LinkValue **func_init, Inter *inter);
 void functionPresettingLast(LinkValue *func, LinkValue *func_new, LinkValue *func_init, Inter *inter);
 void makeBaseFunction(Inter *inter);

+ 1 - 1
VirtulMathCore/ofunc/include/io.h

@@ -1,4 +1,4 @@
 #ifndef VIRTUALMATH_IO_H
 #define VIRTUALMATH_IO_H
-void registeredIOFunction(REGISTERED_FUNCTIONSIG);
+void registeredIOFunction(R_FUNC);
 #endif //VIRTUALMATH_IO_H

+ 1 - 1
VirtulMathCore/ofunc/include/list.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_LIST_H
 #define VIRTUALMATH_LIST_H
-void registeredList(REGISTERED_FUNCTIONSIG);
+void registeredList(R_FUNC);
 void makeBaseList(Inter *inter);
 #endif //VIRTUALMATH_BOOL_H

+ 1 - 1
VirtulMathCore/ofunc/include/listiter.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_LISTITER_H
 #define VIRTUALMATH_LISTITER_H
-void registeredListIter(REGISTERED_FUNCTIONSIG);
+void registeredListIter(R_FUNC);
 void makeBaseListIter(Inter *inter);
 #endif //VIRTUALMATH_LISTITER_H

+ 1 - 1
VirtulMathCore/ofunc/include/num.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_NUM_H
 #define VIRTUALMATH_NUM_H
-void registeredNum(REGISTERED_FUNCTIONSIG);
+void registeredNum(R_FUNC);
 void makeBaseNum(Inter *inter);
 #endif //VIRTUALMATH_NUM_H

+ 1 - 1
VirtulMathCore/ofunc/include/object.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_OBJECT_H
 #define VIRTUALMATH_OBJECT_H
-void registeredObject(REGISTERED_FUNCTIONSIG);
+void registeredObject(R_FUNC);
 void makeBaseObject(Inter *inter, LinkValue *belong);
 #endif //VIRTUALMATH_OBJECT_H

+ 1 - 1
VirtulMathCore/ofunc/include/pass.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_PASS_H
 #define VIRTUALMATH_PASS_H
-void registeredEllipisis(REGISTERED_FUNCTIONSIG);
+void registeredEllipisis(R_FUNC);
 void makeBaseEllipisis(Inter *inter);
 #endif //VIRTUALMATH_PASS_H

+ 1 - 1
VirtulMathCore/ofunc/include/str.h

@@ -1,6 +1,6 @@
 #ifndef VIRTUALMATH_STR_H
 #define VIRTUALMATH_STR_H
-void registeredStr(REGISTERED_FUNCTIONSIG);
+void registeredStr(R_FUNC);
 void makeBaseStr(Inter *inter);
 void strFunctionPresetting(LinkValue *func, LinkValue *func_new, LinkValue *func_init, Inter *inter);
 #endif //VIRTUALMATH_STR_H

+ 1 - 1
VirtulMathCore/ofunc/include/sys.h

@@ -1,4 +1,4 @@
 #ifndef VIRTUALMATH_SYS_H
 #define VIRTUALMATH_SYS_H
-void registeredSysFunction(REGISTERED_FUNCTIONSIG);
+void registeredSysFunction(R_FUNC);
 #endif //VIRTUALMATH_SYS_H

+ 1 - 1
VirtulMathCore/ofunc/include/vobject.h

@@ -1,5 +1,5 @@
 #ifndef VIRTUALMATH_VOBJECT_H
 #define VIRTUALMATH_VOBJECT_H
-void registeredVObject(REGISTERED_FUNCTIONSIG);
+void registeredVObject(R_FUNC);
 void makeBaseVObject(Inter *inter);
 #endif //VIRTUALMATH_VOBJECT_H

+ 19 - 19
VirtulMathCore/ofunc/src/__ofunc.c

@@ -1,20 +1,20 @@
 #include "__ofunc.h"
 
-LinkValue *registeredFunctionCore(OfficialFunction of, wchar_t *name, INTER_FUNCTIONSIG_NOT_ST) {
+LinkValue *registeredFunctionCore(OfficialFunction of, wchar_t *name, FUNC_NT) {
     LinkValue *value = NULL;
-    makeCFunctionValue(of, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeCFunctionValue(of, 0, "sys", CFUNC_NT(var_list, result, belong));
     value = result->value;
     result->value = NULL;
     freeResult(result);
-    addStrVar(name, false, true, value, 0, "sys", false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    addStrVar(name, false, true, value, 0, "sys", false, CFUNC_NT(var_list, result, belong));
     gc_freeTmpLink(&value->gc_status);
     return value;
 }
 
-bool iterNameFunc(NameFunc *list, INTER_FUNCTIONSIG_NOT_ST){
+bool iterNameFunc(NameFunc *list, FUNC_NT){
     setResultCore(result);
     for (PASS; list->of != NULL; list++) {
-        LinkValue *value = registeredFunctionCore(list->of, list->name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        LinkValue *value = registeredFunctionCore(list->of, list->name, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return false;
         value->value->data.function.function_data.pt_type = list->type;
@@ -23,7 +23,7 @@ bool iterNameFunc(NameFunc *list, INTER_FUNCTIONSIG_NOT_ST){
     return true;
 }
 
-bool iterClassFunc(NameFunc *list, INTER_FUNCTIONSIG_NOT_ST){
+bool iterClassFunc(NameFunc *list, FUNC_NT){
     VarList *object_var = belong->value->object.var;
     VarList *object_backup = object_var->next;
     enum FunctionPtType bak = inter->data.default_pt_type;
@@ -35,7 +35,7 @@ bool iterClassFunc(NameFunc *list, INTER_FUNCTIONSIG_NOT_ST){
 
     gc_freeze(inter, object_backup, NULL, true);
     for (PASS; list->of != NULL; list++) {
-        LinkValue *value = registeredFunctionCore(list->of, list->name, CALL_INTER_FUNCTIONSIG_NOT_ST(object_var, result, belong));
+        LinkValue *value = registeredFunctionCore(list->of, list->name, CFUNC_NT(object_var, result, belong));
         if (!CHECK_RESULT(result)) {
             return_ = false;
             break;
@@ -51,18 +51,18 @@ bool iterClassFunc(NameFunc *list, INTER_FUNCTIONSIG_NOT_ST){
     return return_;
 }
 
-void iterBaseNameFunc(NameFunc *list, LinkValue *father, INTER_FUNCTIONSIG_CORE){
+void iterBaseNameFunc(NameFunc *list, LinkValue *father, FUNC_CORE){
     Result result;
     setResultCore(&result);
-    if (!iterNameFunc(list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &result, father)))
+    if (!iterNameFunc(list, CFUNC_NT(var_list, &result, father)))
         printError(&result, inter, true);
     freeResult(&result);
 }
 
-void iterBaseClassFunc(NameFunc *list, LinkValue *father, INTER_FUNCTIONSIG_CORE){
+void iterBaseClassFunc(NameFunc *list, LinkValue *father, FUNC_CORE){
     Result result;
     setResultCore(&result);
-    if (!iterClassFunc(list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &result, father)))
+    if (!iterClassFunc(list, CFUNC_NT(var_list, &result, father)))
         printError(&result, inter, true);
     freeResult(&result);
 }
@@ -81,34 +81,34 @@ LinkValue *makeBaseChildClass(LinkValue *inherit, Inter *inter) {
     return makeLinkValue(new, inter->base_belong, inter);
 }
 
-bool checkIndex(vnum *index, const vnum *size, INTER_FUNCTIONSIG_NOT_ST){
+bool checkIndex(vnum *index, const vnum *size, FUNC_NT){
     setResultCore(result);
     if (*index < 0)
         *index = *size + *index;
     if (*index >= *size){
-        setResultError(E_IndexException, L"Index too max", 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_IndexException, L"Index too max", 0, "sys", true, CFUNC_NT(var_list, result, belong));
         return false;
     } else if (*index < 0){
-        setResultError(E_IndexException, L"Index is less than 0", 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_IndexException, L"Index is less than 0", 0, "sys", true, CFUNC_NT(var_list, result, belong));
         return false;
     }
     return true;  // true - 保持result为setResultCore的结果
 }
 
-bool checkSlice(vnum *first, vnum *second, const vnum *stride, vnum size, INTER_FUNCTIONSIG_NOT_ST){
+bool checkSlice(vnum *first, vnum *second, const vnum *stride, vnum size, FUNC_NT){
     setResultCore(result);
     *first = *first < 0 ? *first + size : *first;
     *second = *second < 0 ? *second + size : *second;
     if (*second > size || *first >= size){
-        setResultError(E_IndexException, L"Index too max", 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_IndexException, L"Index too max", 0, "sys", true, CFUNC_NT(var_list, result, belong));
         return false;
     } else if (*first < 0 || *second <= 0){
-        setResultError(E_IndexException, L"Index is less than 0", 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_IndexException, L"Index is less than 0", 0, "sys", true, CFUNC_NT(var_list, result, belong));
         return false;
     }
 
     if (*stride == 0 || *first > *second && stride > 0 || *first < *second && stride < 0){
-        setResultError(E_StrideException, L"Stride is 0 or Unfinished iteration", 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_StrideException, L"Stride is 0 or Unfinished iteration", 0, "sys", true, CFUNC_NT(var_list, result, belong));
         return false;
     }
     return true;
@@ -117,7 +117,7 @@ bool checkSlice(vnum *first, vnum *second, const vnum *stride, vnum size, INTER_
 void addBaseClassVar(wchar_t *name, LinkValue *obj, LinkValue *belong, Inter *inter) {
     Result result;
     setResultCore(&result);
-    addStrVar(name, false, true, obj, 0, "sys", false, CALL_INTER_FUNCTIONSIG_NOT_ST(inter->var_list, &result, belong));
+    addStrVar(name, false, true, obj, 0, "sys", false, CFUNC_NT(inter->var_list, &result, belong));
     if (!RUN_TYPE(result.type))
         printError(&result, inter, true);
     freeResult(&result);

+ 8 - 8
VirtulMathCore/ofunc/src/bool.c

@@ -1,13 +1,13 @@
 #include "__ofunc.h"
 
-ResultType bool_new(OFFICAL_FUNCTIONSIG){
+ResultType bool_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     int status = 1;
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "bool.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, 0, "bool.new", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
@@ -15,25 +15,25 @@ ResultType bool_new(OFFICAL_FUNCTIONSIG){
     value = make_new(inter, belong, ap[0].value);
     value->value->type = V_bool;
     value->value->data.bool_.bool_ = false;
-    run_init(value, arg, 0, "bool.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    run_init(value, arg, 0, "bool.new", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType bool_init(OFFICAL_FUNCTIONSIG){
+ResultType bool_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
                            {.must=-1}};
     LinkValue *base;
     bool new = false;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     base = ap[0].value;
     if (ap[1].value != NULL) {
-        new = checkBool(ap[1].value, 0, "bool.init", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        new = checkBool(ap[1].value, 0, "bool.init", CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -43,14 +43,14 @@ ResultType bool_init(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-void registeredBool(REGISTERED_FUNCTIONSIG){
+void registeredBool(R_FUNC){
     LinkValue *object = inter->data.bool_;
     NameFunc tmp[] = {{inter->data.object_new, bool_new, class_free_},
                       {inter->data.object_init, bool_init, object_free_},
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"bool", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 

+ 41 - 41
VirtulMathCore/ofunc/src/dict.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType dict_new(OFFICAL_FUNCTIONSIG){
+ResultType dict_new(O_FUNC){
     LinkValue *value = NULL;
     VarList *hash = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
@@ -8,12 +8,12 @@ ResultType dict_new(OFFICAL_FUNCTIONSIG){
     int status = 1;
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "bool.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, 0, "bool.new", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     if (arg != NULL && arg->type == value_arg) {
-        setResultError(E_ArgumentException, L"Too many argument", 0, "dict.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, L"Too many argument", 0, "dict.new", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
@@ -24,27 +24,27 @@ ResultType dict_new(OFFICAL_FUNCTIONSIG){
     value->value->data.dict.dict = hash->hashtable;
 
     gc_addTmpLink(&value->gc_status);
-    argumentToVar(&arg, &value->value->data.dict.size, CALL_INTER_FUNCTIONSIG_NOT_ST(hash, result, belong));
+    argumentToVar(&arg, &value->value->data.dict.size, CFUNC_NT(hash, result, belong));
     gc_freeTmpLink(&value->gc_status);
     popVarList(hash);
 
     freeResult(result);
-    run_init(value, arg, 0, "dict.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    run_init(value, arg, 0, "dict.new", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType dict_down(OFFICAL_FUNCTIONSIG){
+ResultType dict_down(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     {
@@ -55,7 +55,7 @@ ResultType dict_down(OFFICAL_FUNCTIONSIG){
             setResultOperationBase(result, copyLinkValue(element, inter));
         else {
             wchar_t *message = memWidecat(L"Dict could not find key value: ", name, false, false);
-            setResultError(E_KeyException, message, 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_KeyException, message, 0, "dict", true, CFUNC_NT(var_list, result, belong));
             memFree(message);
         }
         memFree(name);
@@ -63,18 +63,18 @@ ResultType dict_down(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType dict_down_del(OFFICAL_FUNCTIONSIG){
+ResultType dict_down_del(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     {
@@ -85,7 +85,7 @@ ResultType dict_down_del(OFFICAL_FUNCTIONSIG){
             setResult(result, inter);
         else{
             wchar_t *message = memWidecat(L"Cannot delete non-existent keys: ", name, false, false);
-            setResultError(E_KeyException, message, 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_KeyException, message, 0, "dict", true, CFUNC_NT(var_list, result, belong));
             memFree(message);
         }
         memFree(name);
@@ -93,20 +93,20 @@ ResultType dict_down_del(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType dict_down_assignment(OFFICAL_FUNCTIONSIG){
+ResultType dict_down_assignment(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *name = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
@@ -116,17 +116,17 @@ ResultType dict_down_assignment(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType dict_keys(OFFICAL_FUNCTIONSIG){
+ResultType dict_keys(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     Argument *list = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
     if (ap[0].value->value->type != V_dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     for (int index=0; index < MAX_SIZE; index++){
@@ -134,66 +134,66 @@ ResultType dict_keys(OFFICAL_FUNCTIONSIG){
         for (PASS; tmp != NULL; tmp = tmp->next)
             list = connectValueArgument(copyLinkValue(tmp->name_, inter), list);
     }
-    makeListValue(list, 0, "dict", L_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeListValue(list, 0, "dict", L_list, CFUNC_NT(var_list, result, belong));
     freeArgument(list, true);
     return result->type;
 }
 
-ResultType dict_iter(OFFICAL_FUNCTIONSIG){
+ResultType dict_iter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     {
         Argument *dict_iter_arg = makeValueArgument(ap[0].value);
         callBackCore(inter->data.dict_iter, dict_iter_arg, 0, "dict", 0,
-                     CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                     CFUNC_NT(var_list, result, belong));
         freeArgument(dict_iter_arg, true);
     }
     return result->type;
 }
 
-ResultType dictRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
+ResultType dictRepoStrCore(O_FUNC, bool is_repo){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *repo = NULL;
     Value *value = NULL;
     LinkValue *again = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
     value = ap[0].value->value;
 
     if (value->type != V_dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
-    again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+    again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, 0, "dict", true, CFUNC_NT(var_list, result, ap[0].value));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (again != NULL){
-        bool again_ = checkBool(again, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        bool again_ = checkBool(again, 0, "sys", CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         if (again_) {
-            makeStringValue(L"{...}", 0, "dict.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            makeStringValue(L"{...}", 0, "dict.repo", CFUNC_NT(var_list, result, belong));
             return result->type;
         }
     }
 
-    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "dict.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "dict.repo", ap[0].value, CFUNC_NT(var_list, result, belong));
     repo = memWidecpy(L"{");
     for (int i = 0, count = 0; i < MAX_SIZE; i++) {
         for (Var *var = value->data.dict.dict->hashtable[i]; var != NULL; var = var->next, count++) {
@@ -203,14 +203,14 @@ ResultType dictRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
                 repo = memWidecat(repo, L", ", true, false);
 
             freeResult(result);
-            name_tmp = getRepoStr(var->name_, is_repo, 0, "dict", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            name_tmp = getRepoStr(var->name_, is_repo, 0, "dict", CFUNC_NT(var_list, result, belong));
             if (!CHECK_RESULT(result))
                 goto return_;
             repo = memWidecat(repo, name_tmp, true, false);
             repo = memWidecat(repo, L": ", true, false);
 
             freeResult(result);
-            value_tmp = getRepoStr(var->value, is_repo, 0, "dict", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            value_tmp = getRepoStr(var->value, is_repo, 0, "dict", CFUNC_NT(var_list, result, belong));
             if (!CHECK_RESULT(result))
                 goto return_;
             repo = memWidecat(repo, value_tmp, true, false);
@@ -219,13 +219,13 @@ ResultType dictRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
 
     freeResult(result);
     repo = memWidecat(repo, L"}", true, false);
-    makeStringValue(repo, 0, "dict.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(repo, 0, "dict.repo", CFUNC_NT(var_list, result, belong));
 
     return_:
     {
         Result tmp;
         setResultCore(&tmp);
-        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "dict.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &tmp, belong));
+        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "dict.repo", ap[0].value, CFUNC_NT(var_list, &tmp, belong));
         if (!RUN_TYPE(tmp.type)) {
             freeResult(result);
             *result = tmp;
@@ -236,15 +236,15 @@ ResultType dictRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
     return result->type;
 }
 
-ResultType dict_repo(OFFICAL_FUNCTIONSIG){
-    return dictRepoStrCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), true);
+ResultType dict_repo(O_FUNC){
+    return dictRepoStrCore(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType dict_str(OFFICAL_FUNCTIONSIG){
-    return dictRepoStrCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), false);
+ResultType dict_str(O_FUNC){
+    return dictRepoStrCore(CO_FUNC(arg, var_list, result, belong), false);
 }
 
-void registeredDict(REGISTERED_FUNCTIONSIG){
+void registeredDict(R_FUNC){
     LinkValue *object = inter->data.dict;
     NameFunc tmp[] = {{L"keys", dict_keys, object_free_},
                       {inter->data.object_new, dict_new, class_free_},
@@ -257,7 +257,7 @@ void registeredDict(REGISTERED_FUNCTIONSIG){
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"dict", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 

+ 23 - 23
VirtulMathCore/ofunc/src/dictiter.c

@@ -1,18 +1,18 @@
 #include "__ofunc.h"
 
-ResultType dictiter_init(OFFICAL_FUNCTIONSIG){
+ResultType dictiter_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"dict_", .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *list = NULL;
     LinkValue *list_iter = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
     if (ap[1].value->value->type != V_dict){
-        setResultError(E_TypeException, ONLY_ACC(dictiter, dict), 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(dictiter, dict), 0, "dictiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     {
@@ -21,17 +21,17 @@ ResultType dictiter_init(OFFICAL_FUNCTIONSIG){
         LinkValue *listiter_class = NULL;
 
         freeResult(result);
-        keys = findAttributes(L"keys", false, 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[1].value));
+        keys = findAttributes(L"keys", false, 0, "dictiter", true, CFUNC_NT(var_list, result, ap[1].value));
         if (!CHECK_RESULT(result))
             return result->type;
         if (keys == NULL){
-            setResultError(E_TypeException, L"Object non-key-value pairs (there is no keys method)", 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, L"Object non-key-value pairs (there is no keys method)", 0, "dictiter", true, CFUNC_NT(var_list, result, belong));
             return R_error;
         }
 
         gc_addTmpLink(&keys->gc_status);
         freeResult(result);
-        callBackCore(keys, NULL, 0, "dictiter", 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(keys, NULL, 0, "dictiter", 0, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&keys->gc_status);
         if (!CHECK_RESULT(result)) {
             return R_error;
@@ -45,7 +45,7 @@ ResultType dictiter_init(OFFICAL_FUNCTIONSIG){
         list_arg = makeValueArgument(list);
         freeResult(result);
         callBackCore(listiter_class, list_arg, 0, "dictiter", 0,
-                     CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                     CFUNC_NT(var_list, result, belong));
         freeArgument(list_arg, true);
 
         if (!CHECK_RESULT(result)) {
@@ -61,73 +61,73 @@ ResultType dictiter_init(OFFICAL_FUNCTIONSIG){
         gc_freeTmpLink(&listiter_class->gc_status);
     }
     freeResult(result);
-    if (addAttributes(L"__list", false, list_iter, 0, "dictiter.init", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value))) {
+    if (addAttributes(L"__list", false, list_iter, 0, "dictiter.init", true, CFUNC_NT(var_list, result, ap[0].value))) {
         freeResult(result);
-        addAttributes(L"__dict", false, ap[1].value, 0, "dictiter.init", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+        addAttributes(L"__dict", false, ap[1].value, 0, "dictiter.init", true, CFUNC_NT(var_list, result, ap[0].value));
     }
     gc_freeTmpLink(&list_iter->gc_status);
     setResult(result, inter);
     return result->type;
 }
 
-ResultType dictiter_next(OFFICAL_FUNCTIONSIG){
+ResultType dictiter_next(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *list_ = NULL;
     LinkValue *list_next = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    list_ = findAttributes(L"__list", false, 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+    list_ = findAttributes(L"__list", false, 0, "dictiter", true, CFUNC_NT(var_list, result, ap[0].value));
     if (!CHECK_RESULT(result))
         return result->type;
     if (list_ == NULL){
-        setResultError(E_TypeException, VALUE_ERROR(__list, listiter), 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(__list, listiter), 0, "dictiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     freeResult(result);
-    list_next = findAttributes(inter->data.object_next, false, 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, list_));
+    list_next = findAttributes(inter->data.object_next, false, 0, "dictiter", true, CFUNC_NT(var_list, result, list_));
     if (!CHECK_RESULT(result))
         return result->type;
     if (list_next == NULL){
-        setResultError(E_TypeException, L"Object is not iterable", 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, L"Object is not iterable", 0, "dictiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     freeResult(result);
-    callBackCore(list_next, NULL, 0, "sys", 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(list_next, NULL, 0, "sys", 0, CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType dictiter_down(OFFICAL_FUNCTIONSIG){
+ResultType dictiter_down(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *dict_ = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    dict_ = findAttributes(L"__dict", false, 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+    dict_ = findAttributes(L"__dict", false, 0, "dictiter", true, CFUNC_NT(var_list, result, ap[0].value));
     if (!CHECK_RESULT(result))
         return result->type;
     if (dict_ == NULL || dict_->value->type != V_dict){
-        setResultError(E_TypeException, VALUE_ERROR(__dict, dict), 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(__dict, dict), 0, "dictiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     freeResult(result);
-    getElement(dict_, ap[1].value, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    getElement(dict_, ap[1].value, 0, "sys", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-void registeredDictIter(REGISTERED_FUNCTIONSIG){
+void registeredDictIter(R_FUNC){
     LinkValue *object = inter->data.dict_iter;
     NameFunc tmp[] = {{inter->data.object_init, dictiter_init, object_free_},
                       {inter->data.object_next, dictiter_next, object_free_},
@@ -135,7 +135,7 @@ void registeredDictIter(REGISTERED_FUNCTIONSIG){
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"dictiter", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 

+ 5 - 5
VirtulMathCore/ofunc/src/error_.c

@@ -7,22 +7,22 @@ static LinkValue *makeException(LinkValue *father, Inter *inter){
     return exc;
 }
 
-ResultType base_exception_init(OFFICAL_FUNCTIONSIG){
+ResultType base_exception_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"message", .must=0, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
     if (addAttributes(inter->data.object_message, false, ap[1].value, 0, "BaseException.init", true,
-                      CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value)))
+                      CFUNC_NT(var_list, result, ap[0].value)))
         setResult(result, inter);
     return result->type;
 }
 
-void registeredExcIter(REGISTERED_FUNCTIONSIG){
+void registeredExcIter(R_FUNC){
     struct {
         wchar_t *name;
         LinkValue *value;
@@ -51,7 +51,7 @@ void registeredExcIter(REGISTERED_FUNCTIONSIG){
                           {NULL, NULL}};
         gc_addTmpLink(&object->gc_status);
         addBaseClassVar(L"BaseException", object, belong, inter);
-        iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+        iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
         gc_freeTmpLink(&object->gc_status);
     }
     for (int i=0; setList[i].name != NULL; i++)

+ 10 - 10
VirtulMathCore/ofunc/src/function.c

@@ -6,7 +6,7 @@ static void setFunctionData(Value *value, LinkValue *cls, Inter *inter) {
     value->data.function.function_data.run = false;
 }
 
-ResultType function_new(OFFICAL_FUNCTIONSIG){
+ResultType function_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -14,7 +14,7 @@ ResultType function_new(OFFICAL_FUNCTIONSIG){
     setResultCore(result);
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "func.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, 0, "func.new", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
@@ -32,23 +32,23 @@ ResultType function_new(OFFICAL_FUNCTIONSIG){
     value->value->data.function.of = NULL;
     setFunctionData(value->value, ap->value, inter);
 
-    run_init(value, arg, 0, "func.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    run_init(value, arg, 0, "func.new", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType function_init(OFFICAL_FUNCTIONSIG){
+ResultType function_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
                            {.must=-1}};
     LinkValue *func;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
     if ((func = ap[0].value)->value->type != V_func) {
         setResultError(E_TypeException, INSTANCE_ERROR(func), 0, "func", true,
-                       CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                       CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
@@ -63,12 +63,12 @@ ResultType function_init(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-void registeredFunction(REGISTERED_FUNCTIONSIG){
+void registeredFunction(R_FUNC){
     LinkValue *object = inter->data.function;
     NameFunc tmp[] = {{NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"func", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 
@@ -90,8 +90,8 @@ void functionPresettingLast(LinkValue *func, LinkValue *func_new, LinkValue *fun
     VarList *object_var = func->value->object.var;
     setResultCore(&result);
 
-    addStrVar(inter->data.object_new, false, true, func_new, 0, "sys", false, CALL_INTER_FUNCTIONSIG_NOT_ST(object_var, &result, func));
+    addStrVar(inter->data.object_new, false, true, func_new, 0, "sys", false, CFUNC_NT(object_var, &result, func));
     freeResult(&result);
-    addStrVar(inter->data.object_init, false, true, func_init, 0, "sys", false, CALL_INTER_FUNCTIONSIG_NOT_ST(object_var, &result, func));
+    addStrVar(inter->data.object_init, false, true, func_init, 0, "sys", false, CFUNC_NT(object_var, &result, func));
     freeResult(&result);
 }

+ 8 - 8
VirtulMathCore/ofunc/src/io.c

@@ -1,11 +1,11 @@
 #include "__ofunc.h"
 
-ResultType vm_print(OFFICAL_FUNCTIONSIG){
+ResultType vm_print(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=true},
                            {.type=name_value, .name=L"end", .must=0, .value=NULL},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -13,7 +13,7 @@ ResultType vm_print(OFFICAL_FUNCTIONSIG){
     arg = ap[0].arg;
     for (int i=0; i < ap[0].c_count; arg = arg->next,i++){
         freeResult(result);
-        wchar_t *tmp = getRepoStr(arg->data.value, true, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        wchar_t *tmp = getRepoStr(arg->data.value, true, 0, "sys", CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         if (i != 0)
@@ -30,13 +30,13 @@ ResultType vm_print(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType vm_input(OFFICAL_FUNCTIONSIG){
+ResultType vm_input(O_FUNC){
     setResultCore(result);
     ArgumentParser ap[] = {{.type=name_value, .name=L"message", .must=0, .value=NULL},
                            {.must=-1}};
     wchar_t *str = memWidecpy(L"\0");
     wint_t ch;
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -47,14 +47,14 @@ ResultType vm_input(OFFICAL_FUNCTIONSIG){
     while ((ch = fgetwc(inter->data.inter_stdin)) != '\n' && ch != WEOF)
         str = memWideCharcpy(str, 1, true, true, ch);
 
-    makeStringValue(str, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(str, 0, "sys", CFUNC_NT(var_list, result, belong));
     memFree(str);
     return result->type;
 }
 
-void registeredIOFunction(REGISTERED_FUNCTIONSIG){
+void registeredIOFunction(R_FUNC){
     NameFunc tmp[] = {{L"print", vm_print, free_},
                       {L"input", vm_input, free_},
                       {NULL, NULL}};
-    iterBaseNameFunc(tmp, belong, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    iterBaseNameFunc(tmp, belong, CFUNC_CORE(var_list));
 }

+ 65 - 65
VirtulMathCore/ofunc/src/list.c

@@ -1,12 +1,12 @@
 #include "__ofunc.h"
 
-ResultType tuple_list_newCore(OFFICAL_FUNCTIONSIG, enum ListType type){
+ResultType tuple_list_newCore(O_FUNC, enum ListType type){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=true},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -23,19 +23,19 @@ ResultType tuple_list_newCore(OFFICAL_FUNCTIONSIG, enum ListType type){
         value->value->data.list.list[value->value->data.list.size - 1] = at->data.value;
     }
 
-    run_init(value, NULL, 0, "list/tuple.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    run_init(value, NULL, 0, "list/tuple.new", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType tuple_new(OFFICAL_FUNCTIONSIG) {
-    return tuple_list_newCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), L_tuple);
+ResultType tuple_new(O_FUNC) {
+    return tuple_list_newCore(CO_FUNC(arg, var_list, result, belong), L_tuple);
 }
 
-ResultType list_new(OFFICAL_FUNCTIONSIG) {
-    return tuple_list_newCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), L_list);
+ResultType list_new(O_FUNC) {
+    return tuple_list_newCore(CO_FUNC(arg, var_list, result, belong), L_list);
 }
 
-ResultType list_slice(OFFICAL_FUNCTIONSIG){
+ResultType list_slice(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
@@ -46,13 +46,13 @@ ResultType list_slice(OFFICAL_FUNCTIONSIG){
     vnum second;
     vnum stride;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_list) {
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
@@ -64,12 +64,12 @@ ResultType list_slice(OFFICAL_FUNCTIONSIG){
         if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == V_num)
             *(list[i]) = ap[i + 1].value->value->data.num.num;
         else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != V_none) {
-            setResultError(E_TypeException, ONLY_ACC(first/second/stride, V_num or V_none), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, V_num or V_none), 0, "list", true, CFUNC_NT(var_list, result, belong));
             return R_error;
         }
     }
 
-    if (!checkSlice(&first, &second, &stride, size, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!checkSlice(&first, &second, &stride, size, CFUNC_NT(var_list, result, belong)))
         return result->type;
 
     {
@@ -78,13 +78,13 @@ ResultType list_slice(OFFICAL_FUNCTIONSIG){
             LinkValue *element = ap[0].value->value->data.list.list[i];
             new_list = connectValueArgument(element, new_list);
         }
-        makeListValue(new_list, 0, "list.slice", L_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeListValue(new_list, 0, "list.slice", L_list, CFUNC_NT(var_list, result, belong));
         freeArgument(new_list, true);
     }
     return result->type;
 }
 
-ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
+ResultType list_slice_assignment(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
@@ -97,17 +97,17 @@ ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
     vnum stride;
     LinkValue *iter_obj = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_list) {
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "sys", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
-    getIter(ap[1].value, 1, 0, "list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    getIter(ap[1].value, 1, 0, "list", CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     iter_obj = result->value;
@@ -121,20 +121,20 @@ ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
         if (ap[i + 2].value != NULL && ap[i + 2].value->value->type == V_num)
             *(list[i]) = ap[i + 2].value->value->data.num.num;
         else if (ap[i + 2].value != NULL && ap[i + 2].value->value->type != V_none) {
-            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), 0, "list", true, CFUNC_NT(var_list, result, belong));
             goto return_;
         }
     }
 
-    if (!checkSlice(&first, &second, &stride, size, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!checkSlice(&first, &second, &stride, size, CFUNC_NT(var_list, result, belong)))
         goto return_;
 
     {
         for (vnum i = stride > 0 ? first : second; stride > 0 ? (i < second) : (i > first); i += stride) {
             freeResult(result);
-            getIter(iter_obj, 0, 0, "list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            getIter(iter_obj, 0, 0, "list", CFUNC_NT(var_list, result, belong));
             if (is_iterStop(result->value, inter)){
-                setResultError(E_TypeException, L"Iter Object Too Short", 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                setResultError(E_TypeException, L"Iter Object Too Short", 0, "list", true, CFUNC_NT(var_list, result, belong));
                 goto return_;
             }
             else if (!CHECK_RESULT(result))
@@ -142,9 +142,9 @@ ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
             ap[0].value->value->data.list.list[i] = result->value;
         }
         freeResult(result);
-        getIter(iter_obj, 0, 0, "list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        getIter(iter_obj, 0, 0, "list", CFUNC_NT(var_list, result, belong));
         if (CHECK_RESULT(result)) {
-            setResultError(E_TypeException, L"Iter Object Too Long", 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, L"Iter Object Too Long", 0, "list", true, CFUNC_NT(var_list, result, belong));
             goto return_;
         } else if (!is_iterStop(result->value, inter))
             goto return_;
@@ -155,7 +155,7 @@ ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType list_slice_del(OFFICAL_FUNCTIONSIG){
+ResultType list_slice_del(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
@@ -166,13 +166,13 @@ ResultType list_slice_del(OFFICAL_FUNCTIONSIG){
     vnum second;
     vnum stride;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_list) {
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
@@ -184,12 +184,12 @@ ResultType list_slice_del(OFFICAL_FUNCTIONSIG){
         if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == V_num)
             *(list[i]) = ap[i + 1].value->value->data.num.num;
         else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != V_none) {
-            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), 0, "list", true, CFUNC_NT(var_list, result, belong));
             return R_error;
         }
     }
 
-    if (!checkSlice(&first, &second, &stride, size, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!checkSlice(&first, &second, &stride, size, CFUNC_NT(var_list, result, belong)))
         return result->type;
 
     {
@@ -213,7 +213,7 @@ ResultType list_slice_del(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType list_down_assignment(OFFICAL_FUNCTIONSIG){
+ResultType list_down_assignment(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
@@ -221,17 +221,17 @@ ResultType list_down_assignment(OFFICAL_FUNCTIONSIG){
     vnum size;
     vnum index;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     if (ap[2].value->value->type != V_num){
-        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
@@ -240,10 +240,10 @@ ResultType list_down_assignment(OFFICAL_FUNCTIONSIG){
     if (index < 0)
         index = size + index;
     if (index >= size){
-        setResultError(E_IndexException, L"Index too max", 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_IndexException, L"Index too max", 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     } else if (index < 0){
-        setResultError(E_IndexException, L"Index less than 0", 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_IndexException, L"Index less than 0", 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     ap[0].value->value->data.list.list[index] = ap[1].value;
@@ -251,30 +251,30 @@ ResultType list_down_assignment(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType list_down_del(OFFICAL_FUNCTIONSIG){
+ResultType list_down_del(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     vnum size;
     vnum index;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     if (ap[1].value->value->type != V_num){
-        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     size = ap[0].value->value->data.list.size;
     index = ap[1].value->value->data.num.num;
-    if (!checkIndex(&index, &size, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!checkIndex(&index, &size, CFUNC_NT(var_list, result, belong)))
         return result->type;
     {
         LinkValue **new = NULL;
@@ -289,7 +289,7 @@ ResultType list_down_del(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType list_down(OFFICAL_FUNCTIONSIG){
+ResultType list_down(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -297,52 +297,52 @@ ResultType list_down(OFFICAL_FUNCTIONSIG){
     vnum index;
     LinkValue *element = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     if (ap[1].value->value->type != V_num){
-        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     size = ap[0].value->value->data.list.size;
     index = ap[1].value->value->data.num.num;
-    if (!checkIndex(&index, &size, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!checkIndex(&index, &size, CFUNC_NT(var_list, result, belong)))
         return result->type;
     element = ap[0].value->value->data.list.list[index];
     setResultOperationBase(result, copyLinkValue(element, inter));
     return result->type;
 }
 
-ResultType list_iter(OFFICAL_FUNCTIONSIG){
+ResultType list_iter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     {
         Argument *list_iter_arg = makeValueArgument(ap[0].value);
         callBackCore(inter->data.list_iter, list_iter_arg, 0, "list", 0,
-                     CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                     CFUNC_NT(var_list, result, belong));
         freeArgument(list_iter_arg, true);
     }
     return result->type;
 }
 
-ResultType listRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
+ResultType listRepoStrCore(O_FUNC, bool is_repo){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *repo = NULL;
@@ -350,31 +350,31 @@ ResultType listRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
     LinkValue *again = NULL;
     enum ListType lt;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
     value = ap[0].value->value;
 
     if (value->type != V_list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list.repo", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list.repo", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     lt = value->data.list.type;
-    again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, 0, "list.repo", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+    again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, 0, "list.repo", true, CFUNC_NT(var_list, result, ap[0].value));
     if (!CHECK_RESULT(result))
         return result->type;
     if (again != NULL){
-        bool again_ = checkBool(again, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        bool again_ = checkBool(again, 0, "sys", CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         if (again_) {
-            makeStringValue((lt == L_list ? L"[...]" : L"(...)"), 0, "list.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            makeStringValue((lt == L_list ? L"[...]" : L"(...)"), 0, "list.repo", CFUNC_NT(var_list, result, belong));
             return result->type;
         }
     }
 
-    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "list.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "list.repo", ap[0].value, CFUNC_NT(var_list, result, belong));
     if (lt == L_list)
         repo = memWidecpy(L"[");
     else
@@ -384,7 +384,7 @@ ResultType listRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
         freeResult(result);
         if (i > 0)
             repo = memWidecat(repo, L", ", true, false);
-        tmp = getRepoStr(value->data.list.list[i], is_repo, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        tmp = getRepoStr(value->data.list.list[i], is_repo, 0, "sys", CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto return_;
         repo = memWidecat(repo, tmp, true, false);
@@ -395,12 +395,12 @@ ResultType listRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
         repo = memWidecat(repo, L")", true, false);
 
     freeResult(result);
-    makeStringValue(repo, 0, "list.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(repo, 0, "list.repo", CFUNC_NT(var_list, result, belong));
     return_:
     {
         Result tmp;
         setResultCore(&tmp);
-        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "list.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &tmp, belong));
+        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "list.repo", ap[0].value, CFUNC_NT(var_list, &tmp, belong));
         if (!RUN_TYPE(tmp.type)) {
             freeResult(result);
             *result = tmp;
@@ -411,15 +411,15 @@ ResultType listRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
     return result->type;
 }
 
-ResultType list_repo(OFFICAL_FUNCTIONSIG){
-    return listRepoStrCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), true);
+ResultType list_repo(O_FUNC){
+    return listRepoStrCore(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType list_str(OFFICAL_FUNCTIONSIG){
-    return listRepoStrCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), false);
+ResultType list_str(O_FUNC){
+    return listRepoStrCore(CO_FUNC(arg, var_list, result, belong), false);
 }
 
-void registeredList(REGISTERED_FUNCTIONSIG){
+void registeredList(R_FUNC){
     {
         LinkValue *object = inter->data.tuple;
         NameFunc tmp[] = {{inter->data.object_new, tuple_new, class_free_},
@@ -433,7 +433,7 @@ void registeredList(REGISTERED_FUNCTIONSIG){
                           {NULL, NULL}};
         gc_addTmpLink(&object->gc_status);
         addBaseClassVar(L"tuple", object, belong, inter);
-        iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+        iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
         gc_freeTmpLink(&object->gc_status);
     }
 
@@ -445,7 +445,7 @@ void registeredList(REGISTERED_FUNCTIONSIG){
                           {NULL, NULL}};
         gc_addTmpLink(&object->gc_status);
         addBaseClassVar(L"list", object, belong, inter);
-        iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+        iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
         gc_freeTmpLink(&object->gc_status);
     }
 }

+ 19 - 19
VirtulMathCore/ofunc/src/listiter.c

@@ -1,84 +1,84 @@
 #include "__ofunc.h"
 
-ResultType listiter_init(OFFICAL_FUNCTIONSIG){
+ResultType listiter_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"list_", .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *index = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
     if (ap[1].value->value->type != V_list){
-        setResultError(E_TypeException, ONLY_ACC(listiter, list), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(listiter, list), 0, "listiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
-    index = makeLinkValue(makeNumberValue(0, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)), ap[0].value, inter);
+    index = makeLinkValue(makeNumberValue(0, 0, "sys", CFUNC_NT(var_list, result, belong)), ap[0].value, inter);
     if (!CHECK_RESULT(result))
         return result->type;
 
     freeResult(result);
-    if (addAttributes(L"__list", false, ap[1].value, 0, "listiter.init", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value))) {
+    if (addAttributes(L"__list", false, ap[1].value, 0, "listiter.init", true, CFUNC_NT(var_list, result, ap[0].value))) {
         freeResult(result);
-        addAttributes(L"__index", false, index, 0, "listiter.init", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+        addAttributes(L"__index", false, index, 0, "listiter.init", true, CFUNC_NT(var_list, result, ap[0].value));
     }
 
     setResult(result, inter);
     return result->type;
 }
 
-ResultType listiter_next(OFFICAL_FUNCTIONSIG){
+ResultType listiter_next(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *list_ = NULL;
     LinkValue *index = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    list_ = findAttributes(L"__list", false, 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+    list_ = findAttributes(L"__list", false, 0, "listiter", true, CFUNC_NT(var_list, result, ap[0].value));
     if (!CHECK_RESULT(result))
         return result->type;
     if (list_ == NULL){
-        setResultError(E_TypeException, VALUE_ERROR(__list, listiter), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(__list, listiter), 0, "listiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     freeResult(result);
-    index = findAttributes(L"__index", false, 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+    index = findAttributes(L"__index", false, 0, "listiter", true, CFUNC_NT(var_list, result, ap[0].value));
     if (!CHECK_RESULT(result))
         return result->type;
     if (index == NULL){
-        setResultError(E_TypeException, VALUE_ERROR(__index, listiter), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(__index, listiter), 0, "listiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     if (list_->value->type != V_list){
-        setResultError(E_TypeException, VALUE_ERROR(listiter.__list, list), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(listiter.__list, list), 0, "listiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     if (index->value->type != V_num){
-        setResultError(E_TypeException, VALUE_ERROR(listiter.__index, V_num), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(listiter.__index, V_num), 0, "listiter", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
 
     freeResult(result);
-    getElement(list_, index, 0, "listiter", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    getElement(list_, index, 0, "listiter", CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         if (is_indexException(result->value, inter))
-            setResultError(E_StopIterException, L"Stop Iter", 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_StopIterException, L"Stop Iter", 0, "listiter", true, CFUNC_NT(var_list, result, belong));
         else
             return result->type;
     else {
         Result tmp_result;
         setResultCore(&tmp_result);
         index->value->data.num.num ++;
-        if (addAttributes(L"__index", false, index, 0, "listiter.next", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &tmp_result, ap[0].value)))
+        if (addAttributes(L"__index", false, index, 0, "listiter.next", true, CFUNC_NT(var_list, &tmp_result, ap[0].value)))
             freeResult(&tmp_result);
         else {
             freeResult(result);
@@ -88,14 +88,14 @@ ResultType listiter_next(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-void registeredListIter(REGISTERED_FUNCTIONSIG){
+void registeredListIter(R_FUNC){
     LinkValue *object = inter->data.list_iter;
     NameFunc tmp[] = {{inter->data.object_init, listiter_init, object_free_},
                       {inter->data.object_next, listiter_next, object_free_},
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"listiter", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 

+ 8 - 8
VirtulMathCore/ofunc/src/num.c

@@ -1,13 +1,13 @@
 #include "__ofunc.h"
 
-ResultType num_new(OFFICAL_FUNCTIONSIG){
+ResultType num_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     int status = 1;
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "num", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, 0, "num", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
@@ -15,17 +15,17 @@ ResultType num_new(OFFICAL_FUNCTIONSIG){
     value = make_new(inter, belong, ap[0].value);
     value->value->type = V_num;
     value->value->data.num.num = 0;
-    run_init(value, arg, 0, "num.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    run_init(value, arg, 0, "num.new", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType num_init(OFFICAL_FUNCTIONSIG){
+ResultType num_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"num", .must=0, .long_arg=false},
                            {.must=-1}};
     LinkValue *base = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -48,7 +48,7 @@ ResultType num_init(OFFICAL_FUNCTIONSIG){
             base->value->data.num.num = 0;
             break;
         default:
-            setResultError(E_TypeException, ERROR_INIT(num), 0, "num", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, ERROR_INIT(num), 0, "num", true, CFUNC_NT(var_list, result, belong));
             return result->type;
     }
 
@@ -57,14 +57,14 @@ ResultType num_init(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-void registeredNum(REGISTERED_FUNCTIONSIG){
+void registeredNum(R_FUNC){
     LinkValue *object = inter->data.num;
     NameFunc tmp[] = {{inter->data.object_new, num_new, class_free_},
                       {inter->data.object_init, num_init, object_free_},
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"num", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 

+ 15 - 15
VirtulMathCore/ofunc/src/object.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType object_new(OFFICAL_FUNCTIONSIG){
+ResultType object_new(O_FUNC){
     LinkValue *value = NULL;
     setResultCore(result);
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
@@ -8,16 +8,16 @@ ResultType object_new(OFFICAL_FUNCTIONSIG){
     int status = 1;
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "object.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, 0, "object.new", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     value = make_new(inter, belong, ap[0].value);
-    run_init(value, arg, 0, "obj.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    run_init(value, arg, 0, "obj.new", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType objectRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
+ResultType objectRepoStrCore(O_FUNC, bool is_repo){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *repo;
@@ -25,19 +25,19 @@ ResultType objectRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
     wchar_t *type;
     LinkValue *name_value;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    name_value = findAttributes(inter->data.object_name, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+    name_value = findAttributes(inter->data.object_name, false, 0, "sys", true, CFUNC_NT(var_list, result, ap[0].value));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (name_value != NULL){
         gc_addTmpLink(&name_value->gc_status);
-        name = getRepoStr(name_value, is_repo, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        name = getRepoStr(name_value, is_repo, 0, "sys", CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&name_value->gc_status);
         if (!CHECK_RESULT(result))
             return result->type;
@@ -58,20 +58,20 @@ ResultType objectRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
         swprintf(repo, len, L"(%ls: %ls on %p)", type, name, ap[0].value->value);
     }
 
-    makeStringValue(repo, 0, "object.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(repo, 0, "object.repo", CFUNC_NT(var_list, result, belong));
     memFree(repo);
     return result->type;
 }
 
-ResultType object_repo(OFFICAL_FUNCTIONSIG){
-    return objectRepoStrCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), true);
+ResultType object_repo(O_FUNC){
+    return objectRepoStrCore(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType object_str(OFFICAL_FUNCTIONSIG){
-    return objectRepoStrCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), false);
+ResultType object_str(O_FUNC){
+    return objectRepoStrCore(CO_FUNC(arg, var_list, result, belong), false);
 }
 
-void registeredObject(REGISTERED_FUNCTIONSIG){
+void registeredObject(R_FUNC){
     LinkValue *object = inter->data.object;
     NameFunc tmp[] = {{inter->data.object_new,  object_new,  class_free_},
                       {inter->data.object_repo, object_repo, all_free_},
@@ -79,7 +79,7 @@ void registeredObject(REGISTERED_FUNCTIONSIG){
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"object", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 
@@ -106,7 +106,7 @@ void makeBaseObject(Inter *inter, LinkValue *belong){
         Result result;
         Argument *arg = makeValueArgument(makeLinkValue(object, g_belong, inter));
         setResultCore(&result);
-        object_new(CALL_OFFICAL_FUNCTION(arg, inter->var_list, &result, g_belong));
+        object_new(CO_FUNC(arg, inter->var_list, &result, g_belong));
 
         result.value->value->type = V_none;
         inter->data.none = result.value;

+ 5 - 5
VirtulMathCore/ofunc/src/pass.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType pass_new(OFFICAL_FUNCTIONSIG){
+ResultType pass_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -8,22 +8,22 @@ ResultType pass_new(OFFICAL_FUNCTIONSIG){
     setResultCore(result);
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "pass.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, 0, "pass.new", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     value = make_new(inter, belong, ap[0].value);
     value->value->type = V_ell;
-    run_init(value, arg, 0, "pass.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    run_init(value, arg, 0, "pass.new", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-void registeredEllipisis(REGISTERED_FUNCTIONSIG){
+void registeredEllipisis(R_FUNC){
     LinkValue *object = inter->data.pass_;
     NameFunc tmp[] = {{inter->data.object_new, pass_new, class_free_},
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"ellipsis", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 

+ 33 - 33
VirtulMathCore/ofunc/src/str.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType str_new(OFFICAL_FUNCTIONSIG){
+ResultType str_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -8,7 +8,7 @@ ResultType str_new(OFFICAL_FUNCTIONSIG){
     setResultCore(result);
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "str.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, 0, "str.new", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     freeResult(result);
@@ -16,25 +16,25 @@ ResultType str_new(OFFICAL_FUNCTIONSIG){
     value = make_new(inter, belong, ap[0].value);
     value->value->type = V_str;
     value->value->data.str.str = memWidecpy(L"");
-    run_init(value, arg, 0, "str.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    run_init(value, arg, 0, "str.new", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType str_init(OFFICAL_FUNCTIONSIG){
+ResultType str_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
                            {.must=-1}};
     LinkValue *base;
     wchar_t *str = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     base = ap[0].value;
     if (ap[1].value != NULL){
-        str = getRepoStr(ap[1].value, false, 0, "str.init", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        str = getRepoStr(ap[1].value, false, 0, "str.init", CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         memFree(base->value->data.str.str);
@@ -44,7 +44,7 @@ ResultType str_init(OFFICAL_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType str_slice(OFFICAL_FUNCTIONSIG){
+ResultType str_slice(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
@@ -55,13 +55,13 @@ ResultType str_slice(OFFICAL_FUNCTIONSIG){
     vnum second;
     vnum stride;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_str) {
-        setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     size = memWidelen(ap[0].value->value->data.str.str);
@@ -73,25 +73,25 @@ ResultType str_slice(OFFICAL_FUNCTIONSIG){
         if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == V_num)
             *(list[i]) = ap[i + 1].value->value->data.num.num;
         else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != V_none) {
-            setResultError(E_TypeException, VALUE_ERROR(first/second/stride, num or null), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, VALUE_ERROR(first/second/stride, num or null), 0, "str", true, CFUNC_NT(var_list, result, belong));
             return R_error;
         }
     }
 
-    if (!checkSlice(&first, &second, &stride, size, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!checkSlice(&first, &second, &stride, size, CFUNC_NT(var_list, result, belong)))
         return result->type;
 
     {
         wchar_t *str = NULL;
         for (vnum i = stride > 0 ? first : second; stride > 0 ? (i < second) : (i > first); i += stride)
             str = memWideCharcpy(str, 1, true, true, ap[0].value->value->data.str.str[i]);
-        makeStringValue(str, 0, "str.slice", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeStringValue(str, 0, "str.slice", CFUNC_NT(var_list, result, belong));
         memFree(str);
     }
     return result->type;
 }
 
-ResultType str_down(OFFICAL_FUNCTIONSIG){
+ResultType str_down(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -99,41 +99,41 @@ ResultType str_down(OFFICAL_FUNCTIONSIG){
     vnum index;
     wchar_t element[2] = {};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_str){
-        setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     if (ap[1].value->value->type != V_num){
-        setResultError(E_TypeException, ONLY_ACC(str index, V_num), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(str index, V_num), 0, "str", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     size = memWidelen(ap[0].value->value->data.str.str);
     index = ap[1].value->value->data.num.num;
-    if (!checkIndex(&index, &size, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!checkIndex(&index, &size, CFUNC_NT(var_list, result, belong)))
         return result->type;
     *element = ap[0].value->value->data.str.str[index];
-    makeStringValue(element, 0, "str.down", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(element, 0, "str.down", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType str_to_list(OFFICAL_FUNCTIONSIG){
+ResultType str_to_list(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     vnum size;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
     if (ap[0].value->value->type != V_str){
-        setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     size = memWidelen(ap[0].value->value->data.str.str);
@@ -143,48 +143,48 @@ ResultType str_to_list(OFFICAL_FUNCTIONSIG){
         for (vnum i = 0; i < size; i ++) {
             wchar_t str[2] = {};
             str[0] = ap[0].value->value->data.str.str[i];
-            makeStringValue(str, 0, "str.to_list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            makeStringValue(str, 0, "str.to_list", CFUNC_NT(var_list, result, belong));
             new_list = connectValueArgument(result->value, new_list);
             freeResult(result);
         }
-        makeListValue(new_list, 0, "str", L_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeListValue(new_list, 0, "str", L_list, CFUNC_NT(var_list, result, belong));
         freeArgument(new_list, true);
     }
     return result->type;
 }
 
-ResultType str_iter(OFFICAL_FUNCTIONSIG){
+ResultType str_iter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *to_list = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    to_list = findAttributes(L"to_list", false, 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, ap[0].value));
+    to_list = findAttributes(L"to_list", false, 0, "str", true, CFUNC_NT(var_list, result, ap[0].value));
     if (!CHECK_RESULT(result))
         return result->type;
     if (to_list == NULL){
-        setResultError(E_TypeException, L"String cannot be converted to list", 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, L"String cannot be converted to list", 0, "str", true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
     gc_addTmpLink(&to_list->gc_status);
-    callBackCore(to_list, NULL, 0, "str", 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(to_list, NULL, 0, "str", 0, CFUNC_NT(var_list, result, belong));
     gc_freeTmpLink(&to_list->gc_status);
     if (CHECK_RESULT(result)) {
         LinkValue *str_list = NULL;
         str_list = result->value;
         result->value = NULL;
         freeResult(result);
-        getIter(str_list, 1, 0, "str", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        getIter(str_list, 1, 0, "str", CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&str_list->gc_status);
     }
     return result->type;
 }
 
-void registeredStr(REGISTERED_FUNCTIONSIG){
+void registeredStr(R_FUNC){
     LinkValue *object = inter->data.str;
     NameFunc tmp[] = {{L"to_list", str_to_list, object_free_},
                       {inter->data.object_iter, str_iter, object_free_},
@@ -192,7 +192,7 @@ void registeredStr(REGISTERED_FUNCTIONSIG){
                       {inter->data.object_slice, str_slice, object_free_},
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     addBaseClassVar(L"str", object, belong, inter);
     gc_freeTmpLink(&object->gc_status);
 }
@@ -255,8 +255,8 @@ void strFunctionPresetting(LinkValue *func, LinkValue *func_new, LinkValue *func
     new_name = makeStrFromOf(obj, new_func, init_func, inter->data.object_new, inter);
     init_name = makeStrFromOf(obj, new_func, init_func, inter->data.object_init, inter);
 
-    addFromVarList(new_name_, new_name, 0, new_func, CALL_INTER_FUNCTIONSIG_CORE(obj->value->object.var));
-    addFromVarList(init_name_, init_name, 0, init_func, CALL_INTER_FUNCTIONSIG_CORE(obj->value->object.var));
+    addFromVarList(new_name_, new_name, 0, new_func, CFUNC_CORE(obj->value->object.var));
+    addFromVarList(init_name_, init_name, 0, init_func, CFUNC_CORE(obj->value->object.var));
 
     newObjectSettingPresetting(new_func, new_name, inter);
     newObjectSettingPresetting(init_func, init_name, inter);

+ 37 - 37
VirtulMathCore/ofunc/src/sys.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType vm_super(OFFICAL_FUNCTIONSIG){
+ResultType vm_super(O_FUNC){
     Value *arg_father = NULL;
     Value *arg_child = NULL;
     LinkValue *next_father = NULL;
@@ -8,7 +8,7 @@ ResultType vm_super(OFFICAL_FUNCTIONSIG){
                            {.type=name_value, .name=L"obj_", .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -21,7 +21,7 @@ ResultType vm_super(OFFICAL_FUNCTIONSIG){
             result->type = R_opt;
             gc_addTmpLink(&result->value->gc_status);
         } else
-            setResultError(E_SuperException, L"Object has no next father", 0, "super", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_SuperException, L"Object has no next father", 0, "super", true, CFUNC_NT(var_list, result, belong));
         return result->type;
     }
 
@@ -39,17 +39,17 @@ ResultType vm_super(OFFICAL_FUNCTIONSIG){
         gc_addTmpLink(&result->value->gc_status);
     }
     else
-        setResultError(E_SuperException, L"Object has no next father", 0, "super", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_SuperException, L"Object has no next father", 0, "super", true, CFUNC_NT(var_list, result, belong));
 
     return result->type;
 }
 
-ResultType vm_setNowRunCore(OFFICAL_FUNCTIONSIG, bool type){
+ResultType vm_setNowRunCore(O_FUNC, bool type){
     LinkValue *function_value = NULL;
     ArgumentParser ap[] = {{.type=name_value, .name=L"func", .must=1, .long_arg=false}, {.must=-1}};
     setResultCore(result);
     {
-        parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -62,12 +62,12 @@ ResultType vm_setNowRunCore(OFFICAL_FUNCTIONSIG, bool type){
     return R_opt;
 }
 
-ResultType vm_setMethodCore(OFFICAL_FUNCTIONSIG, enum FunctionPtType type){
+ResultType vm_setMethodCore(O_FUNC, enum FunctionPtType type){
     LinkValue *function_value = NULL;
     ArgumentParser ap[] = {{.type=name_value, .name=L"func", .must=1, .long_arg=false}, {.must=-1}};
     setResultCore(result);
     {
-        parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -80,63 +80,63 @@ ResultType vm_setMethodCore(OFFICAL_FUNCTIONSIG, enum FunctionPtType type){
     return R_opt;
 }
 
-ResultType vm_clsfreemethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), cls_free_);
+ResultType vm_clsfreemethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), cls_free_);
 }
 
-ResultType vm_clsmethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), cls_static_);
+ResultType vm_clsmethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), cls_static_);
 }
 
-ResultType vm_freemethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), free_);
+ResultType vm_freemethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), free_);
 }
 
-ResultType vm_staticmethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), static_);
+ResultType vm_staticmethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), static_);
 }
 
-ResultType vm_classmethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), class_static_);
+ResultType vm_classmethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), class_static_);
 }
 
-ResultType vm_objectmethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), object_static_);
+ResultType vm_objectmethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), object_static_);
 }
 
-ResultType vm_classfreemethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), class_free_);
+ResultType vm_classfreemethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), class_free_);
 }
 
-ResultType vm_objectfreemethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), object_free_);
+ResultType vm_objectfreemethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), object_free_);
 }
 
-ResultType vm_allfreemethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), all_free_);
+ResultType vm_allfreemethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), all_free_);
 }
 
-ResultType vm_allstaticmethod(OFFICAL_FUNCTIONSIG){
-    return vm_setMethodCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), all_static_);
+ResultType vm_allstaticmethod(O_FUNC){
+    return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), all_static_);
 }
 
-ResultType vm_isnowrun(OFFICAL_FUNCTIONSIG){
-    return vm_setNowRunCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), true);
+ResultType vm_isnowrun(O_FUNC){
+    return vm_setNowRunCore(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType vm_disnowrun(OFFICAL_FUNCTIONSIG){
-    return vm_setNowRunCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), false);
+ResultType vm_disnowrun(O_FUNC){
+    return vm_setNowRunCore(CO_FUNC(arg, var_list, result, belong), false);
 }
 
-ResultType vm_quit(OFFICAL_FUNCTIONSIG){
+ResultType vm_quit(O_FUNC){
     if (arg != NULL)
-        setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
     else
-        setResultError(E_QuitException, L"VirtualMath Quit", 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_QuitException, L"VirtualMath Quit", 0, "sys", true, CFUNC_NT(var_list, result, belong));
     return R_error;
 }
 
-void registeredSysFunction(REGISTERED_FUNCTIONSIG){
+void registeredSysFunction(R_FUNC){
     NameFunc tmp[] = {{L"super", vm_super, free_},
                       {L"freemethod", vm_freemethod, free_},
                       {L"staticmethod", vm_staticmethod, free_},
@@ -152,5 +152,5 @@ void registeredSysFunction(REGISTERED_FUNCTIONSIG){
                       {L"disnowrun", vm_disnowrun, free_},
                       {L"quit", vm_quit, free_},
                       {NULL, NULL}};
-    iterBaseNameFunc(tmp, belong, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    iterBaseNameFunc(tmp, belong, CFUNC_CORE(var_list));
 }

+ 30 - 30
VirtulMathCore/ofunc/src/vobject.c

@@ -5,28 +5,28 @@ typedef void (*base_opt)(LinkValue *, Result *, struct Inter *, VarList *var_lis
 void vobject_add_base(LinkValue *belong, Result *result, struct Inter *inter, VarList *var_list, Value *left, Value *right) {
     setResultCore(result);
     if (left->type == V_num && right->type == V_num)
-        makeNumberValue(left->data.num.num + right->data.num.num, 0, "vobject.add", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeNumberValue(left->data.num.num + right->data.num.num, 0, "vobject.add", CFUNC_NT(var_list, result, belong));
     else if(left->type == V_str && right->type == V_str){
         wchar_t *new_string = memWidecat(left->data.str.str, right->data.str.str, false, false);
-        makeStringValue(new_string, 0, "vobject.add", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeStringValue(new_string, 0, "vobject.add", CFUNC_NT(var_list, result, belong));
         memFree(new_string);
     }
     else
-        setResultError(E_TypeException, CUL_ERROR(Add), 0, "vobject.add", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, CUL_ERROR(Add), 0, "vobject.add", true, CFUNC_NT(var_list, result, belong));
 }
 
 void vobject_sub_base(LinkValue *belong, Result *result, struct Inter *inter, VarList *var_list, Value *left, Value *right) {
     setResultCore(result);
     if (left->type == V_num && right->type == V_num)
-        makeNumberValue(left->data.num.num - right->data.num.num, 0, "vobject.sub", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeNumberValue(left->data.num.num - right->data.num.num, 0, "vobject.sub", CFUNC_NT(var_list, result, belong));
     else
-        setResultError(E_TypeException, CUL_ERROR(Sub), 0, "vobject.sub", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, CUL_ERROR(Sub), 0, "vobject.sub", true, CFUNC_NT(var_list, result, belong));
 }
 
 void vobject_mul_base(LinkValue *belong, Result *result, struct Inter *inter, VarList *var_list, Value *left, Value *right) {
     setResultCore(result);
     if (left->type == V_num && right->type == V_num)
-        makeNumberValue(left->data.num.num * right->data.num.num, 0, "vobject.mul", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeNumberValue(left->data.num.num * right->data.num.num, 0, "vobject.mul", CFUNC_NT(var_list, result, belong));
     else if(left->type == V_num && right->type == V_str) {
         Value *tmp = left;
         left = right;
@@ -35,24 +35,24 @@ void vobject_mul_base(LinkValue *belong, Result *result, struct Inter *inter, Va
     }
     else if(left->type == V_str && right->type == V_num) mul_str: {
         wchar_t *new_string = memWidecpySelf(left->data.str.str, right->data.num.num);
-        makeStringValue(new_string, 0, "vobject.mul", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeStringValue(new_string, 0, "vobject.mul", CFUNC_NT(var_list, result, belong));
         memFree(new_string);
     }
     else
-        setResultError(E_TypeException, CUL_ERROR(Mul), 0, "vobject.mul", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, CUL_ERROR(Mul), 0, "vobject.mul", true, CFUNC_NT(var_list, result, belong));
 }
 
 void vobject_div_base(LinkValue *belong, Result *result, struct Inter *inter, VarList *var_list, Value *left, Value *right) {
     setResultCore(result);
     if (left->type == V_num && right->type == V_num) {
         lldiv_t div_result = lldiv(left->data.num.num, right->data.num.num);
-        makeNumberValue(div_result.quot, 0, "vobject.div", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeNumberValue(div_result.quot, 0, "vobject.div", CFUNC_NT(var_list, result, belong));
     }
     else
-        setResultError(E_TypeException, CUL_ERROR(Div), 0, "vobject.div", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, CUL_ERROR(Div), 0, "vobject.div", true, CFUNC_NT(var_list, result, belong));
 }
 
-ResultType vobject_opt_core(OFFICAL_FUNCTIONSIG, base_opt func){
+ResultType vobject_opt_core(O_FUNC, base_opt func){
     Value *left = NULL;
     Value *right = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
@@ -60,7 +60,7 @@ ResultType vobject_opt_core(OFFICAL_FUNCTIONSIG, base_opt func){
                            {.must=-1}};
     setResultCore(result);
     {
-        parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -73,30 +73,30 @@ ResultType vobject_opt_core(OFFICAL_FUNCTIONSIG, base_opt func){
     return result->type;
 }
 
-ResultType vobject_add(OFFICAL_FUNCTIONSIG){
-    return vobject_opt_core(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), vobject_add_base);
+ResultType vobject_add(O_FUNC){
+    return vobject_opt_core(CO_FUNC(arg, var_list, result, belong), vobject_add_base);
 }
 
-ResultType vobject_sub(OFFICAL_FUNCTIONSIG){
-    return vobject_opt_core(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), vobject_sub_base);
+ResultType vobject_sub(O_FUNC){
+    return vobject_opt_core(CO_FUNC(arg, var_list, result, belong), vobject_sub_base);
 }
 
-ResultType vobject_mul(OFFICAL_FUNCTIONSIG){
-    return vobject_opt_core(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), vobject_mul_base);
+ResultType vobject_mul(O_FUNC){
+    return vobject_opt_core(CO_FUNC(arg, var_list, result, belong), vobject_mul_base);
 }
 
-ResultType vobject_div(OFFICAL_FUNCTIONSIG){
-    return vobject_opt_core(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), vobject_div_base);
+ResultType vobject_div(O_FUNC){
+    return vobject_opt_core(CO_FUNC(arg, var_list, result, belong), vobject_div_base);
 }
 
-ResultType vobject_bool(OFFICAL_FUNCTIONSIG){
+ResultType vobject_bool(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     bool result_ = false;
     Value *value = NULL;
     setResultCore(result);
     {
-        parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -123,20 +123,20 @@ ResultType vobject_bool(OFFICAL_FUNCTIONSIG){
             result_ = value->data.dict.size > 0;
             break;
         default:
-            setResultError(E_TypeException, CUL_ERROR(bool), 0, "vobject", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, CUL_ERROR(bool), 0, "vobject", true, CFUNC_NT(var_list, result, belong));
             return R_error;
     }
-    makeBoolValue(result_, 0, "vobject.bool", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeBoolValue(result_, 0, "vobject.bool", CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType vobject_repo(OFFICAL_FUNCTIONSIG){
+ResultType vobject_repo(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *repo = NULL;
     Value *value = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -174,15 +174,15 @@ ResultType vobject_repo(OFFICAL_FUNCTIONSIG){
             repo = memStrToWcs("...", false);
             break;
         default:
-            setResultError(E_TypeException, CUL_ERROR(repo/str), 0, "vobject", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, CUL_ERROR(repo/str), 0, "vobject", true, CFUNC_NT(var_list, result, belong));
             return R_error;
     }
-    makeStringValue(repo, 0, "vobject.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(repo, 0, "vobject.repo", CFUNC_NT(var_list, result, belong));
     memFree(repo);
     return result->type;
 }
 
-void registeredVObject(REGISTERED_FUNCTIONSIG){
+void registeredVObject(R_FUNC){
     LinkValue *object = inter->data.vobject;
     NameFunc tmp[] = {{inter->data.object_add, vobject_add, object_free_},
                       {inter->data.object_sub, vobject_sub, object_free_},
@@ -194,7 +194,7 @@ void registeredVObject(REGISTERED_FUNCTIONSIG){
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
     addBaseClassVar(L"vobject", object, belong, inter);
-    iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    iterBaseClassFunc(tmp, object, CFUNC_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }
 

+ 19 - 19
VirtulMathCore/parser/__grammar.c

@@ -13,7 +13,7 @@
  * @param is_right 表达式是否从右运算到左
  */
 
-inline void twoOperation(PASERSSIGNATURE, PasersFunction callBack, GetSymbolFunction getSymbol, ChecktLeftToken checkleft,
+inline void twoOperation(P_FUNC, PasersFunction callBack, GetSymbolFunction getSymbol, ChecktLeftToken checkleft,
                          int call_type, int self_type, char *call_name, char *self_name, bool is_right) {
     bool is_right_ = false;
     while(true){
@@ -23,7 +23,7 @@ inline void twoOperation(PASERSSIGNATURE, PasersFunction callBack, GetSymbolFunc
         long int line;
 
         if (readBackToken(pm) != self_type) {
-            if (!callChildStatement(CALLPASERSSIGNATURE, callBack, call_type, &st, NULL))
+            if (!callChildStatement(CP_FUNC, callBack, call_type, &st, NULL))
                 goto return_;
             addStatementToken(self_type, st, pm);
             continue;
@@ -31,19 +31,19 @@ inline void twoOperation(PASERSSIGNATURE, PasersFunction callBack, GetSymbolFunc
         left_token = popNewToken(pm->tm);
         line = left_token->line;
 
-        if (getSymbol(CALLPASERSSIGNATURE, readBackToken(pm), &st))
+        if (getSymbol(CP_FUNC, readBackToken(pm), &st))
             delToken(pm);
         else{
             backToken_(pm, left_token);
             goto return_;
         }
 
-        if (checkleft != NULL && !checkleft(CALLPASERSSIGNATURE, left_token->data.st)) {
+        if (checkleft != NULL && !checkleft(CP_FUNC, left_token->data.st)) {
             freeToken(left_token, true);
             goto return_;
         }
 
-        callBack(CALLPASERSSIGNATURE);  // 获得右值
+        callBack(CP_FUNC);  // 获得右值
         if (!call_success(pm) || readBackToken(pm) != call_type){  // 若非正确数值
             syntaxError(pm, syntax_error, line, 5, "ERROR from ", self_name, "(get right ", call_name, ")");
             freeToken(left_token, true);
@@ -107,10 +107,10 @@ bool checkToken(ParserMessage *pm, int type){
     return true;
 }
 
-bool commandCallControl_(PASERSSIGNATURE, MakeControlFunction callBack, int type, Statement **st, bool must_operation, char *error_message) {
+bool commandCallControl_(P_FUNC, MakeControlFunction callBack, int type, Statement **st, bool must_operation, char *error_message) {
     Token *tmp_token = NULL;
     *st = NULL;
-    parserControl(CALLPASERSSIGNATURE, callBack, type, must_operation, error_message);
+    parserControl(CP_FUNC, callBack, type, must_operation, error_message);
     if (!call_success(pm) || readBackToken(pm) != type)
         return false;
     tmp_token = popNewToken(pm->tm);
@@ -118,10 +118,10 @@ bool commandCallControl_(PASERSSIGNATURE, MakeControlFunction callBack, int type
     freeToken(tmp_token, false);
     return true;
 }
-bool callParserCode(PASERSSIGNATURE, Statement **st, char *message, long int line) {
+bool callParserCode(P_FUNC, Statement **st, char *message, long int line) {
     Token *tmp;
     *st = NULL;
-    parserCode(CALLPASERSSIGNATURE);
+    parserCode(CP_FUNC);
     if (!call_success(pm) || readBackToken(pm) != CODE) {
         if (message != NULL)
             syntaxError(pm, syntax_error, line, 1, message);
@@ -133,19 +133,19 @@ bool callParserCode(PASERSSIGNATURE, Statement **st, char *message, long int lin
     return true;
 }
 
-bool callParserAs(PASERSSIGNATURE, Statement **st,char *message){
+bool callParserAs(P_FUNC, Statement **st, char *message){
     *st = NULL;
     if (readBackToken(pm) == MATHER_AS) {
         delToken(pm);
-        return callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, st, message);
+        return callChildStatement(CP_FUNC, parserOperation, OPERATION, st, message);
     }
     return true;
 }
 
-bool callChildToken(PASERSSIGNATURE, PasersFunction callBack, int type, Token **tmp, char *message,
+bool callChildToken(P_FUNC, PasersFunction callBack, int type, Token **tmp, char *message,
                     int error_type) {
     *tmp = NULL;
-    callBack(CALLPASERSSIGNATURE);
+    callBack(CP_FUNC);
     if (!call_success(pm) || readBackToken(pm) != type) {
         if (message != NULL) {
             *tmp = popNewToken(pm->tm);
@@ -158,10 +158,10 @@ bool callChildToken(PASERSSIGNATURE, PasersFunction callBack, int type, Token **
     return true;
 }
 
-bool callChildStatement(PASERSSIGNATURE, PasersFunction callBack, int type, Statement **st, char *message){
+bool callChildStatement(P_FUNC, PasersFunction callBack, int type, Statement **st, char *message){
     Token *tmp = NULL;
     *st = NULL;
-    bool status = callChildToken(CALLPASERSSIGNATURE, callBack, type, &tmp, message, syntax_error);
+    bool status = callChildToken(CP_FUNC, callBack, type, &tmp, message, syntax_error);
     if (!status)
         return false;
     *st = tmp->data.st;
@@ -197,8 +197,8 @@ bool callChildStatement(PASERSSIGNATURE, PasersFunction callBack, int type, Stat
  * @param ass 设定赋值符号
  * @return
  */
-bool parserParameter(PASERSSIGNATURE, Parameter **pt, bool enter, bool is_formal, bool is_list, bool is_dict,
-                int sep, int ass, int n_sep) {
+bool parserParameter(P_FUNC, Parameter **pt, bool enter, bool is_formal, bool is_list, bool is_dict,
+                     int sep, int ass, int n_sep) {
     Parameter *new_pt = NULL;
     Token *tmp;
     bool last_pt = false;
@@ -226,7 +226,7 @@ bool parserParameter(PASERSSIGNATURE, Parameter **pt, bool enter, bool is_formal
         else if (!is_list && checkToken(pm, MATHER_POW))  // is_formal关闭对*args的支持
             status = s_4;
 
-        parserPolynomial(CALLPASERSSIGNATURE);
+        parserPolynomial(CP_FUNC);
         if (!call_success(pm))
             goto error_;
         if (readBackToken(pm) != POLYNOMIAL) {
@@ -271,7 +271,7 @@ bool parserParameter(PASERSSIGNATURE, Parameter **pt, bool enter, bool is_formal
             new_pt = connectValueParameter(tmp->data.st, new_pt, is_sep == 1);
         else if (pt_type == name_par){
             Statement *tmp_value;
-            if (!callChildStatement(CALLPASERSSIGNATURE, parserPolynomial, POLYNOMIAL, &tmp_value, "Don't get a parameter value"))
+            if (!callChildStatement(CP_FUNC, parserPolynomial, POLYNOMIAL, &tmp_value, "Don't get a parameter value"))
                 goto error_;
             new_pt = connectNameParameter(tmp_value, tmp->data.st, new_pt);
             if (!checkToken(pm, sep))

+ 134 - 134
VirtulMathCore/parser/grammar.c

@@ -30,7 +30,7 @@ void freeParserMessage(ParserMessage *pm, bool self) {
  * | parserCommand MATHER_SEMICOLON
  * | parserCommand MATHER_EOF
  */
-void parserCommandList(PASERSSIGNATURE, bool global, bool is_one, Statement *st) {
+void parserCommandList(P_FUNC, bool global, bool is_one, Statement *st) {
     int token_type;
     int save_enter = pm->tm->file->filter_data.enter;
     char *command_message = global ? "ERROR from command list(get parserCommand)" : NULL;
@@ -60,7 +60,7 @@ void parserCommandList(PASERSSIGNATURE, bool global, bool is_one, Statement *st)
             Token *command_token = NULL;
             int stop;
             have_command = true;
-            if (!callChildToken(CALLPASERSSIGNATURE, parserCommand, COMMAND, &command_token, command_message, command_list_error))
+            if (!callChildToken(CP_FUNC, parserCommand, COMMAND, &command_token, command_message, command_list_error))
                 break;
             line = command_token->line;
             stop = readBackToken(pm);
@@ -113,83 +113,83 @@ void parserCommandList(PASERSSIGNATURE, bool global, bool is_one, Statement *st)
  * | MATHER_RAISE parserControl
  * | parserOperation
  */
-void parserCommand(PASERSSIGNATURE){
+void parserCommand(P_FUNC){
     int token_type, status;
     Statement *st = NULL;
     token_type = readBackToken(pm);
     switch (token_type) {
         case MATHER_AT :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserDecoration, DECORATION, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserDecoration, DECORATION, &st, NULL);
             break;
         case MATHER_NONLOCAL :
         case MATHER_GLOBAL :
         case MATHER_DEFAULT :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserVarControl, VARCONTROL, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserVarControl, VARCONTROL, &st, NULL);
             break;
         case MATHER_CLASS :
         case MATHER_DEF :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserDef, FUNCTION, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserDef, FUNCTION, &st, NULL);
             break;
         case MATHER_GOTO :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserGoto, GOTO, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserGoto, GOTO, &st, NULL);
             break;
         case MATHER_LABEL :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserLabel, LABEL, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserLabel, LABEL, &st, NULL);
             break;
         case MATHER_DO :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserDo, DO_BRANCH, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserDo, DO_BRANCH, &st, NULL);
             break;
         case MATHER_WITH :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserWith, WITH_BRANCH, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserWith, WITH_BRANCH, &st, NULL);
             break;
         case MATHER_IF :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserIf, IF_BRANCH, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserIf, IF_BRANCH, &st, NULL);
             break;
         case MATHER_FOR :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserFor, FOR_BRANCH, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserFor, FOR_BRANCH, &st, NULL);
             break;
         case MATHER_WHILE :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserWhile, WHILE_BRANCH, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserWhile, WHILE_BRANCH, &st, NULL);
             break;
         case MATHER_TRY :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserTry, TRY_BRANCH, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserTry, TRY_BRANCH, &st, NULL);
             break;
         case MATHER_BREAK :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeBreakStatement, BREAK, &st, false, NULL);
+            status = commandCallControl_(CP_FUNC, makeBreakStatement, BREAK, &st, false, NULL);
             break;
         case MATHER_CONTINUE :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeContinueStatement, CONTINUE, &st, false, NULL);
+            status = commandCallControl_(CP_FUNC, makeContinueStatement, CONTINUE, &st, false, NULL);
             break;
         case MATHER_RESTART :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeRestartStatement, RESTART, &st, false, NULL);
+            status = commandCallControl_(CP_FUNC, makeRestartStatement, RESTART, &st, false, NULL);
             break;
         case MATHER_REGO :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeRegoStatement, REGO, &st, false, NULL);
+            status = commandCallControl_(CP_FUNC, makeRegoStatement, REGO, &st, false, NULL);
             break;
         case MATHER_RETURN :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeReturnStatement, RETURN, &st, false, NULL);
+            status = commandCallControl_(CP_FUNC, makeReturnStatement, RETURN, &st, false, NULL);
             break;
         case MATHER_YIELD :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeYieldStatement, YIELD, &st, false, NULL);
+            status = commandCallControl_(CP_FUNC, makeYieldStatement, YIELD, &st, false, NULL);
             break;
         case MATHER_RAISE :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeRaiseStatement, RAISE, &st, false, NULL);
+            status = commandCallControl_(CP_FUNC, makeRaiseStatement, RAISE, &st, false, NULL);
             break;
         case MATHER_ASSERT :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeAssertStatement, ASSERT, &st, true,
+            status = commandCallControl_(CP_FUNC, makeAssertStatement, ASSERT, &st, true,
                                          "parserAssert: Don't get conditions after assert");
             break;
         case MATHER_INCLUDE :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeIncludeStatement, INCLUDE, &st, true,
+            status = commandCallControl_(CP_FUNC, makeIncludeStatement, INCLUDE, &st, true,
                                          "parserInclude: Don't get file after include");
             break;
         case MATHER_DEL :
-            status = commandCallControl_(CALLPASERSSIGNATURE, makeDelStatement, DEL, &st, true,
+            status = commandCallControl_(CP_FUNC, makeDelStatement, DEL, &st, true,
                                          "parserInclude: Don't get operation after del");
             break;
         case MATHER_FROM :
         case MATHER_IMPORT :
-            status = callChildStatement(CALLPASERSSIGNATURE, parserImport, IMPORT, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserImport, IMPORT, &st, NULL);
             break;
         case MATHER_STRING:
         case MATHER_NUMBER:
@@ -203,7 +203,7 @@ void parserCommand(PASERSSIGNATURE){
         case MATHER_PRIVATE:
         case MATHER_PUBLIC:
         case MATHER_PASSVALUE:
-            status = callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &st, NULL);
+            status = callChildStatement(CP_FUNC, parserOperation, OPERATION, &st, NULL);
             break;
         default:
             status = false;
@@ -215,7 +215,7 @@ void parserCommand(PASERSSIGNATURE){
     return_: return;
 }
 
-void parserDecoration(PASERSSIGNATURE){
+void parserDecoration(P_FUNC){
     Statement *st = NULL;
     DecorationStatement *ds = NULL;
     int tmp;
@@ -225,7 +225,7 @@ void parserDecoration(PASERSSIGNATURE){
         line = delToken(pm);
         if (tmp == MATHER_ENTER)
             continue;
-        if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &dst, "Don't get a decoration operation"))
+        if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &dst, "Don't get a decoration operation"))
             goto error_;
         ds = connectDecorationStatement(dst, ds);
     }
@@ -233,7 +233,7 @@ void parserDecoration(PASERSSIGNATURE){
         syntaxError(pm, syntax_error, line, 1, "Don't get a decoration object");
         goto error_;
     }
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserDef, FUNCTION, &st, "Don't get a decoration object"))
+    if (!callChildStatement(CP_FUNC, parserDef, FUNCTION, &st, "Don't get a decoration object"))
         goto error_;
     if (tmp == MATHER_CLASS)
         st->u.set_class.decoration = ds;
@@ -256,7 +256,7 @@ void parserDecoration(PASERSSIGNATURE){
  * @param pm
  * @param inter
  */
-void parserLabel(PASERSSIGNATURE){
+void parserLabel(P_FUNC){
     Statement *st = NULL;
     Statement *var = NULL;
     Statement *command = NULL;
@@ -273,10 +273,10 @@ void parserLabel(PASERSSIGNATURE){
         goto error_;
     }
 
-    if (checkToken(pm, MATHER_AS) && !callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &var, "Don't get a label var"))
+    if (checkToken(pm, MATHER_AS) && !callChildStatement(CP_FUNC, parserOperation, OPERATION, &var, "Don't get a label var"))
         goto error_;
 
-    if (checkToken(pm, MATHER_COLON) && !callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &command, "Don't get a label command"))
+    if (checkToken(pm, MATHER_COLON) && !callChildStatement(CP_FUNC, parserOperation, OPERATION, &command, "Don't get a label command"))
         goto error_;
 
 
@@ -299,20 +299,20 @@ void parserLabel(PASERSSIGNATURE){
  * | MATHER_GOTO parserOperation MATHER_AT parserOperation [缺省return_参数]
  * | MATHER_GOTO parserOperation MATHER_AT parserOperation MATHER_COLON parserOperation
  */
-void parserGoto(PASERSSIGNATURE){
+void parserGoto(P_FUNC){
     Statement *st = NULL;
     Statement *label = NULL;
     Statement *times = NULL;
     Statement *return_ = NULL;
     long int line = delToken(pm);
 
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &label, "Don't get a goto label"))
+    if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &label, "Don't get a goto label"))
         goto error_;
 
-    if (checkToken(pm, MATHER_AT) && !callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &times, "Don't get a goto times"))
+    if (checkToken(pm, MATHER_AT) && !callChildStatement(CP_FUNC, parserOperation, OPERATION, &times, "Don't get a goto times"))
         goto error_;
 
-    if (checkToken(pm, MATHER_COLON) && !callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &return_, "Don't get a goto return"))
+    if (checkToken(pm, MATHER_COLON) && !callChildStatement(CP_FUNC, parserOperation, OPERATION, &return_, "Don't get a goto return"))
         goto error_;
 
     st = makeGotoStatement(return_, times, label, line, pm->file);
@@ -333,7 +333,7 @@ void parserGoto(PASERSSIGNATURE){
  * @param type 输出token的类型
  * @param must_operation 必须匹配 operation
  */
-void parserImport(PASERSSIGNATURE) {
+void parserImport(P_FUNC) {
     Statement *opt = NULL;
     Statement *st = NULL;
     bool is_lock = false;
@@ -355,11 +355,11 @@ void parserImport(PASERSSIGNATURE) {
         delToken(pm);
     }
 
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &opt, "Don't get a import file"))
+    if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &opt, "Don't get a import file"))
         goto return_;
     if (token_type == MATHER_IMPORT) {
         Statement *as = NULL;
-        if (checkToken(pm, MATHER_AS) && !callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &as, "Don't get a as after import")) {
+        if (checkToken(pm, MATHER_AS) && !callChildStatement(CP_FUNC, parserOperation, OPERATION, &as, "Don't get a as after import")) {
             freeStatement(opt);
             goto return_;
         }
@@ -375,13 +375,13 @@ void parserImport(PASERSSIGNATURE) {
         }
         if (checkToken(pm, MATHER_MUL))  // 导入所有
             goto mul_;
-        if (!parserParameter(CALLPASERSSIGNATURE, &pt, false, false, false, false, MATHER_COMMA, MATHER_ASSIGNMENT,
+        if (!parserParameter(CP_FUNC, &pt, false, false, false, false, MATHER_COMMA, MATHER_ASSIGNMENT,
                              -1) || pt == NULL) {
             syntaxError(pm, syntax_error, line, 1, "Don't get any value to import");
             freeStatement(opt);
             goto return_;
         }
-        if (checkToken(pm, MATHER_AS) && (!parserParameter(CALLPASERSSIGNATURE, &as, false, true, false, false,
+        if (checkToken(pm, MATHER_AS) && (!parserParameter(CP_FUNC, &as, false, true, false, false,
                                                            MATHER_COMMA, MATHER_ASSIGNMENT, -1) || as == NULL)) {
             freeParameter(pt, true);
             syntaxError(pm, syntax_error, opt->line, 1, "Don't get any value after import");
@@ -414,13 +414,13 @@ void parserImport(PASERSSIGNATURE) {
  * @param type 输出token的类型
  * @param must_operation 必须匹配 operation
  */
-void parserVarControl(PASERSSIGNATURE) {
+void parserVarControl(P_FUNC) {
     Parameter *var = NULL;
     Statement *st = NULL;
     Token *tmp = NULL;
     int token_type = readBackToken(pm);
     long int line = delToken(pm);
-    if (!parserParameter(CALLPASERSSIGNATURE, &var, false, true, true, true, MATHER_COMMA, MATHER_ASSIGNMENT, -1) || var == NULL) {
+    if (!parserParameter(CP_FUNC, &var, false, true, true, true, MATHER_COMMA, MATHER_ASSIGNMENT, -1) || var == NULL) {
         syntaxError(pm, syntax_error, line, 1, "Don't get any var");
         goto return_;
     }
@@ -439,12 +439,12 @@ void parserVarControl(PASERSSIGNATURE) {
  * @param type 输出token的类型
  * @param must_operation 必须匹配 operation
  */
-void parserControl(PASERSSIGNATURE, MakeControlFunction callBack, int type, bool must_operation, char *message) {
+void parserControl(P_FUNC, MakeControlFunction callBack, int type, bool must_operation, char *message) {
     Statement *opt = NULL;
     Statement *st = NULL;
     Token *tmp = NULL;
     long int line = delToken(pm);
-    parserOperation(CALLPASERSSIGNATURE);
+    parserOperation(CP_FUNC);
     if (call_success(pm) && readBackToken(pm) == OPERATION){
         tmp = popNewToken(pm->tm);
         opt = tmp->data.st;
@@ -461,24 +461,24 @@ void parserControl(PASERSSIGNATURE, MakeControlFunction callBack, int type, bool
     syntaxError(pm, syntax_error, line, 1, message);
 }
 
-void parserDo(PASERSSIGNATURE){
+void parserDo(P_FUNC){
     Statement *st = NULL;
     Statement *do_code = NULL;
     long int line = delToken(pm);
     if (readBackToken(pm) == MATHER_WHILE){  // do...while语句
-        if (!callChildStatement(CALLPASERSSIGNATURE, parserWhile, WHILE_BRANCH, &st, "Don't get a while code"))
+        if (!callChildStatement(CP_FUNC, parserWhile, WHILE_BRANCH, &st, "Don't get a while code"))
             goto error_;
         st->u.while_branch.type = do_while_;
     }
     else {
-        if (!callParserCode(CALLPASERSSIGNATURE, &do_code, "Don't get a if...else code", line))
+        if (!callParserCode(CP_FUNC, &do_code, "Don't get a if...else code", line))
             goto error_;
 
         again:
         switch (readBackToken(pm)){
             case MATHER_IF: {
                 StatementList *do_sl = NULL;
-                if (!callChildStatement(CALLPASERSSIGNATURE, parserIf, IF_BRANCH, &st, "Don't get a if code after do"))
+                if (!callChildStatement(CP_FUNC, parserIf, IF_BRANCH, &st, "Don't get a if code after do"))
                     goto error_;
                 do_sl = makeStatementList(NULL, NULL, do_code, do_b);
                 do_sl->next = st->u.if_branch.if_list;
@@ -486,17 +486,17 @@ void parserDo(PASERSSIGNATURE){
                 break;
             }
             case MATHER_WHILE:
-                if (!callChildStatement(CALLPASERSSIGNATURE, parserWhile, WHILE_BRANCH, &st, "Don't get a while code after do"))
+                if (!callChildStatement(CP_FUNC, parserWhile, WHILE_BRANCH, &st, "Don't get a while code after do"))
                     goto error_;
                 st->u.while_branch.first = do_code;
                 break;
             case MATHER_FOR:
-                if (!callChildStatement(CALLPASERSSIGNATURE, parserFor, FOR_BRANCH, &st, "Don't get a for code after do"))
+                if (!callChildStatement(CP_FUNC, parserFor, FOR_BRANCH, &st, "Don't get a for code after do"))
                     goto error_;
                 st->u.for_branch.first_do = do_code;
                 break;
             case MATHER_DEF:
-                if (!callChildStatement(CALLPASERSSIGNATURE, parserDef, FUNCTION, &st, "Don't get a func def after do"))
+                if (!callChildStatement(CP_FUNC, parserDef, FUNCTION, &st, "Don't get a func def after do"))
                     goto error_;
                 st->u.set_function.first_do = do_code;
                 break;
@@ -506,7 +506,7 @@ void parserDo(PASERSSIGNATURE){
                     syntaxError(pm, syntax_error, tmp_line, 1, "Don't get while after do");
                     goto error_;
                 }
-                if (!callChildStatement(CALLPASERSSIGNATURE, parserWhile, WHILE_BRANCH, &st, "Don't get a while code"))
+                if (!callChildStatement(CP_FUNC, parserWhile, WHILE_BRANCH, &st, "Don't get a while code"))
                     goto error_;
                 st->u.while_branch.type = do_while_;
                 st->u.while_branch.first = do_code;
@@ -532,7 +532,7 @@ void parserDo(PASERSSIGNATURE){
     freeStatement(st);
 }
 
-void parserFor(PASERSSIGNATURE){
+void parserFor(P_FUNC){
     Statement *st = NULL;
     Statement *else_st = NULL;
     Statement *finally_st = NULL;
@@ -541,18 +541,18 @@ void parserFor(PASERSSIGNATURE){
     long int line = delToken(pm);
     {
         Statement *code_tmp = NULL, *var_tmp = NULL, *iter_tmp = NULL;
-        if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &var_tmp, "Don't get a for var"))
+        if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &var_tmp, "Don't get a for var"))
             goto error_;
         if (!checkToken(pm, MATHER_IN)){
             freeStatement(var_tmp);
             syntaxError(pm, syntax_error, line, 1, "Don't get in after for");
             goto error_;
         }
-        if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &iter_tmp, "Don't get a for condition")) {
+        if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &iter_tmp, "Don't get a for condition")) {
             freeStatement(var_tmp);
             goto error_;
         }
-        if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a for code", line)) {
+        if (!callParserCode(CP_FUNC, &code_tmp, "Don't get a for code", line)) {
             freeStatement(iter_tmp);
             freeStatement(var_tmp);
             goto error_;
@@ -566,7 +566,7 @@ void parserFor(PASERSSIGNATURE){
             if (do_st != NULL || else_st != NULL)
                 goto default_;
             long int tmp_line = delToken(pm);
-            if (!callParserCode(CALLPASERSSIGNATURE, &do_st, "Don't get a for...do code", tmp_line))
+            if (!callParserCode(CP_FUNC, &do_st, "Don't get a for...do code", tmp_line))
                 goto error_;
             goto again;
         }
@@ -576,13 +576,13 @@ void parserFor(PASERSSIGNATURE){
                 syntaxError(pm, syntax_error, tmp_line, 1, "get else after else\n");
                 goto error_;
             }
-            if (!callParserCode(CALLPASERSSIGNATURE, &else_st, "Don't get a for...else code", tmp_line))
+            if (!callParserCode(CP_FUNC, &else_st, "Don't get a for...else code", tmp_line))
                 goto error_;
             goto again;
         }
         case MATHER_FINALLY: {
             long int tmp_line = delToken(pm);
-            if (!callParserCode(CALLPASERSSIGNATURE, &finally_st, "Don't get a for...finally code", tmp_line))
+            if (!callParserCode(CP_FUNC, &finally_st, "Don't get a for...finally code", tmp_line))
                 goto error_;
             break;
         }
@@ -613,7 +613,7 @@ void parserFor(PASERSSIGNATURE){
     freeStatementList(sl);
 }
 
-void parserWith(PASERSSIGNATURE){
+void parserWith(P_FUNC){
     Statement *st = NULL;
     Statement *code_tmp = NULL;
     Statement *var_tmp = NULL;
@@ -625,11 +625,11 @@ void parserWith(PASERSSIGNATURE){
     long int tmp_line;
 
     line = delToken(pm);
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &condition_tmp, "Don't get a with operation"))
+    if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &condition_tmp, "Don't get a with operation"))
         goto error_;
-    if (!callParserAs(CALLPASERSSIGNATURE, &var_tmp, "Don't get a with var"))
+    if (!callParserAs(CP_FUNC, &var_tmp, "Don't get a with var"))
         goto error_;
-    if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a with code", line))
+    if (!callParserCode(CP_FUNC, &code_tmp, "Don't get a with code", line))
         goto error_;
     sl = connectStatementList(sl, makeStatementList(condition_tmp, var_tmp, code_tmp, with_b));
     condition_tmp = NULL;
@@ -641,7 +641,7 @@ void parserWith(PASERSSIGNATURE){
 
     if (readBackToken(pm) == MATHER_ELSE) {
         tmp_line = delToken(pm);
-        if (!callParserCode(CALLPASERSSIGNATURE, &else_st, "Don't get a with...else code", tmp_line))
+        if (!callParserCode(CP_FUNC, &else_st, "Don't get a with...else code", tmp_line))
             goto error_;
     }
 
@@ -650,7 +650,7 @@ void parserWith(PASERSSIGNATURE){
 
     if (readBackToken(pm) == MATHER_FINALLY) {
         tmp_line = delToken(pm);
-        if (!callParserCode(CALLPASERSSIGNATURE, &finally_st, "Don't get a wilt...finally code", tmp_line))
+        if (!callParserCode(CP_FUNC, &finally_st, "Don't get a wilt...finally code", tmp_line))
             goto error_;
     }
 
@@ -685,7 +685,7 @@ void parserWith(PASERSSIGNATURE){
  * @param pm
  * @param inter
  */
-void parserIf(PASERSSIGNATURE){
+void parserIf(P_FUNC){
     Statement *st = NULL;
     Statement *else_st = NULL;
     Statement *finally_st = NULL;
@@ -710,15 +710,15 @@ void parserIf(PASERSSIGNATURE){
             }
 
             not_del:
-            if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &condition_tmp, "Don't get a if condition"))
+            if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &condition_tmp, "Don't get a if condition"))
                 goto error_;
 
-            if (!callParserAs(CALLPASERSSIGNATURE, &var_tmp, "Don't get a while var")) {
+            if (!callParserAs(CP_FUNC, &var_tmp, "Don't get a while var")) {
                 freeStatement(condition_tmp);
                 goto error_;
             }
 
-            if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a if code", tmp_line)) {
+            if (!callParserCode(CP_FUNC, &code_tmp, "Don't get a if code", tmp_line)) {
                 freeStatement(condition_tmp);
                 freeStatement(var_tmp);
                 goto error_;
@@ -731,7 +731,7 @@ void parserIf(PASERSSIGNATURE){
                 goto default_;
             Statement *code_tmp = NULL;
             long int tmp_line = delToken(pm);
-            if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a if...do code", tmp_line))
+            if (!callParserCode(CP_FUNC, &code_tmp, "Don't get a if...do code", tmp_line))
                 goto error_;
             sl = connectStatementList(sl, makeStatementList(NULL, NULL, code_tmp, do_b));
             goto again;
@@ -742,13 +742,13 @@ void parserIf(PASERSSIGNATURE){
                 syntaxError(pm, syntax_error, tmp_line, 1, "get else after else");
                 goto error_;
             }
-            if (!callParserCode(CALLPASERSSIGNATURE, &else_st, "Don't get a if...else code", tmp_line))
+            if (!callParserCode(CP_FUNC, &else_st, "Don't get a if...else code", tmp_line))
                 goto error_;
             goto again;
         }
         case MATHER_FINALLY: {
             long int tmp_line = delToken(pm);
-            if (!callParserCode(CALLPASERSSIGNATURE, &finally_st, "Don't get a if...finally code", tmp_line))
+            if (!callParserCode(CP_FUNC, &finally_st, "Don't get a if...finally code", tmp_line))
                 goto error_;
             break;
         }
@@ -789,7 +789,7 @@ void parserIf(PASERSSIGNATURE){
  * @param pm
  * @param inter
  */
-void parserWhile(PASERSSIGNATURE){
+void parserWhile(P_FUNC){
     Statement *st = NULL;
     Statement *else_st = NULL;
     Statement *finally_st = NULL;
@@ -807,14 +807,14 @@ void parserWhile(PASERSSIGNATURE){
 
             Statement *code_tmp = NULL, *var_tmp = NULL, *condition_tmp = NULL;
             line = delToken(pm);
-            if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &condition_tmp, "Don't get a while condition"))
+            if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &condition_tmp, "Don't get a while condition"))
                 goto error_;
 
-            if (!callParserAs(CALLPASERSSIGNATURE, &var_tmp, "Don't get a while var")){
+            if (!callParserAs(CP_FUNC, &var_tmp, "Don't get a while var")){
                 freeStatement(condition_tmp);
                 goto error_;
             }
-            if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a while code", line)) {
+            if (!callParserCode(CP_FUNC, &code_tmp, "Don't get a while code", line)) {
                 freeStatement(condition_tmp);
                 freeStatement(var_tmp);
                 goto error_;
@@ -828,7 +828,7 @@ void parserWhile(PASERSSIGNATURE){
             if (do_st != NULL || else_st != NULL)
                 goto default_;
             long int tmp_line = delToken(pm);
-            if (!callParserCode(CALLPASERSSIGNATURE, &do_st, "Don't get a while...do code", tmp_line))
+            if (!callParserCode(CP_FUNC, &do_st, "Don't get a while...do code", tmp_line))
                 goto error_;
             goto again;
         }
@@ -838,13 +838,13 @@ void parserWhile(PASERSSIGNATURE){
                 syntaxError(pm, syntax_error, tmp_line, 1, "get else after else\n");
                 goto error_;
             }
-            if (!callParserCode(CALLPASERSSIGNATURE, &else_st, "Don't get a while...else code", tmp_line))
+            if (!callParserCode(CP_FUNC, &else_st, "Don't get a while...else code", tmp_line))
                 goto error_;
             goto again;
         }
         case MATHER_FINALLY: {
             long int tmp_line = delToken(pm);
-            if (!callParserCode(CALLPASERSSIGNATURE, &finally_st, "Don't get a while...finally code", tmp_line))
+            if (!callParserCode(CP_FUNC, &finally_st, "Don't get a while...finally code", tmp_line))
                 goto error_;
             break;
         }
@@ -887,7 +887,7 @@ void parserWhile(PASERSSIGNATURE){
  * @param pm
  * @param inter
  */
-void parserTry(PASERSSIGNATURE){
+void parserTry(P_FUNC){
     Statement *st = NULL;
     Statement *try_st = NULL;
     Statement *else_st = NULL;
@@ -900,7 +900,7 @@ void parserTry(PASERSSIGNATURE){
             if (try_st != NULL)
                 goto default_;
             line = delToken(pm);
-            if (!callParserCode(CALLPASERSSIGNATURE, &try_st, "Don't get a try code", line))
+            if (!callParserCode(CP_FUNC, &try_st, "Don't get a try code", line))
                 goto error_;
             goto again;
         }
@@ -912,13 +912,13 @@ void parserTry(PASERSSIGNATURE){
                 goto error_;
             }
             if (readBackToken(pm) != MATHER_LC)
-                callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &condition_tmp, NULL);
+                callChildStatement(CP_FUNC, parserOperation, OPERATION, &condition_tmp, NULL);
 
-            if (!callParserAs(CALLPASERSSIGNATURE, &var_tmp, "Don't get a except var")){
+            if (!callParserAs(CP_FUNC, &var_tmp, "Don't get a except var")){
                 freeStatement(condition_tmp);
                 goto error_;
             }
-            if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a except code", tmp_line)) {
+            if (!callParserCode(CP_FUNC, &code_tmp, "Don't get a except code", tmp_line)) {
                 freeStatement(condition_tmp);
                 freeStatement(var_tmp);
                 goto error_;
@@ -932,13 +932,13 @@ void parserTry(PASERSSIGNATURE){
                 syntaxError(pm, syntax_error, tmp_line, 1, "get else after else");
                 goto error_;
             }
-            if (!callParserCode(CALLPASERSSIGNATURE, &else_st, "Don't get a try...else code", tmp_line))
+            if (!callParserCode(CP_FUNC, &else_st, "Don't get a try...else code", tmp_line))
                 goto error_;
             goto again;
         }
         case MATHER_FINALLY: {
             long int tmp_line = delToken(pm);
-            if (!callParserCode(CALLPASERSSIGNATURE, &finally_st, "Don't get a try...finally code", tmp_line))
+            if (!callParserCode(CP_FUNC, &finally_st, "Don't get a try...finally code", tmp_line))
                 goto error_;
             break;
         }
@@ -977,7 +977,7 @@ void parserTry(PASERSSIGNATURE){
  * @param pm
  * @param inter
  */
-void parserDef(PASERSSIGNATURE){
+void parserDef(P_FUNC){
     Statement *st = NULL;
     Statement *name_tmp = NULL;
     Statement *code_tmp = NULL;
@@ -985,13 +985,13 @@ void parserDef(PASERSSIGNATURE){
     int type = readBackToken(pm);
     long int line = delToken(pm);
 
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserBaseValue, BASEVALUE, &name_tmp,
+    if (!callChildStatement(CP_FUNC, parserBaseValue, BASEVALUE, &name_tmp,
                             "Don't get a func/V_class name"))
         goto error_;
 
     if (!checkToken(pm, MATHER_LP))
         goto get_code;
-    if (!parserParameter(CALLPASERSSIGNATURE, &pt, true, true, false, false, MATHER_COMMA, MATHER_ASSIGNMENT, type==MATHER_DEF ? MATHER_SEMICOLON : -1)) {
+    if (!parserParameter(CP_FUNC, &pt, true, true, false, false, MATHER_COMMA, MATHER_ASSIGNMENT, type == MATHER_DEF ? MATHER_SEMICOLON : -1)) {
         lexEnter(pm, false);
         syntaxError(pm, syntax_error, line, 1, "Don't get a func/V_class parameter");
         goto error_;
@@ -1001,7 +1001,7 @@ void parserDef(PASERSSIGNATURE){
         goto error_;
     }
     get_code:
-    if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a func code", line)) {
+    if (!callParserCode(CP_FUNC, &code_tmp, "Don't get a func code", line)) {
         syntaxError(pm, syntax_error, line, 1, "Don't get a func code");
         goto error_;
     }
@@ -1028,7 +1028,7 @@ void parserDef(PASERSSIGNATURE){
  * @param pm
  * @param inter
  */
-void parserCode(PASERSSIGNATURE) {
+void parserCode(P_FUNC) {
     long int line = 0;
     Statement *st = makeStatement(line, pm->file);
     while (true){
@@ -1040,7 +1040,7 @@ void parserCode(PASERSSIGNATURE) {
         if (!checkToken(pm, MATHER_ENTER))
             goto return_;
     }
-    parserCommandList(CALLPASERSSIGNATURE, false, false, st);
+    parserCommandList(CP_FUNC, false, false, st);
     if (!call_success(pm))
         goto error_;
 
@@ -1062,9 +1062,9 @@ void parserCode(PASERSSIGNATURE) {
  * parserOperation:
  * | parserAssignment
  */
-void parserOperation(PASERSSIGNATURE){
+void parserOperation(P_FUNC){
     Statement *operation_st = NULL;
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserAssignment, ASSIGNMENT, &operation_st, NULL))
+    if (!callChildStatement(CP_FUNC, parserAssignment, ASSIGNMENT, &operation_st, NULL))
         goto return_;
     addStatementToken(OPERATION, operation_st, pm);
     return_:
@@ -1078,7 +1078,7 @@ void parserOperation(PASERSSIGNATURE){
  * | parserAssignment ASSIGNMENT parserTuple [2]
  * 注意:在链接statement的时候, 模式[2]相当于 parserTuple ASSIGNMENT parserAssignment
  */
-bool checkAssignmentLeft(PASERSSIGNATURE, Statement *left){
+bool checkAssignmentLeft(P_FUNC, Statement *left){
     if (left->type == call_function && !checkFormal(left->u.call_function.parameter)){
         syntaxError(pm, syntax_error, left->line, 1, "Don't get success func definition from Assignment22");
         return false;
@@ -1086,7 +1086,7 @@ bool checkAssignmentLeft(PASERSSIGNATURE, Statement *left){
     return true;
 }
 
-bool switchAssignment(PASERSSIGNATURE, int symbol, Statement **st){
+bool switchAssignment(P_FUNC, int symbol, Statement **st){
     switch (symbol) {  // 此处保持使用switch分支
         case MATHER_ASSIGNMENT:
             *st = makeOperationBaseStatement(OPT_ASS, 0, pm->file);
@@ -1097,8 +1097,8 @@ bool switchAssignment(PASERSSIGNATURE, int symbol, Statement **st){
     return true;
 }
 
-void parserAssignment(PASERSSIGNATURE){
-    return twoOperation(CALLPASERSSIGNATURE, parserTuple, switchAssignment, checkAssignmentLeft, TUPLE, ASSIGNMENT,
+void parserAssignment(P_FUNC){
+    return twoOperation(CP_FUNC, parserTuple, switchAssignment, checkAssignmentLeft, TUPLE, ASSIGNMENT,
                         "polynomial", "assignment", true);
 }
 
@@ -1110,7 +1110,7 @@ void parserAssignment(PASERSSIGNATURE){
  * @param pm
  * @param inter
  */
-void parserTuple(PASERSSIGNATURE){
+void parserTuple(P_FUNC){
     Parameter *pt = NULL;
     Statement *st = NULL;
     Token *tmp = NULL;
@@ -1120,7 +1120,7 @@ void parserTuple(PASERSSIGNATURE){
         goto parserPt;
     }
 
-    if (!callChildToken(CALLPASERSSIGNATURE, parserPolynomial, POLYNOMIAL, &tmp, NULL, syntax_error))
+    if (!callChildToken(CP_FUNC, parserPolynomial, POLYNOMIAL, &tmp, NULL, syntax_error))
         goto return_;
     if (readBackToken(pm) != MATHER_COMMA){
         tmp->token_type = TUPLE;
@@ -1131,7 +1131,7 @@ void parserTuple(PASERSSIGNATURE){
     addToken_(pm ,tmp);
 
     parserPt:
-    if (!parserParameter(CALLPASERSSIGNATURE, &pt, false, false, true, false, MATHER_COMMA, MATHER_ASSIGNMENT, -1)) {
+    if (!parserParameter(CP_FUNC, &pt, false, false, true, false, MATHER_COMMA, MATHER_ASSIGNMENT, -1)) {
         syntaxError(pm, syntax_error, line, 1, "Don't get tuple element");
         goto return_;
     }
@@ -1149,7 +1149,7 @@ void parserTuple(PASERSSIGNATURE){
  * | parserPolynomial OPT_ADD parserFactor
  * | parserPolynomial OPT_SUB parserFactor
  */
-bool switchPolynomial(PASERSSIGNATURE, int symbol, Statement **st){
+bool switchPolynomial(P_FUNC, int symbol, Statement **st){
     switch (symbol) {
         case MATHER_ADD:
             *st = makeOperationBaseStatement(OPT_ADD, 0, pm->file);
@@ -1162,8 +1162,8 @@ bool switchPolynomial(PASERSSIGNATURE, int symbol, Statement **st){
     }
     return true;
 }
-void parserPolynomial(PASERSSIGNATURE){
-    return twoOperation(CALLPASERSSIGNATURE, parserFactor, switchPolynomial, NULL, FACTOR, POLYNOMIAL,
+void parserPolynomial(P_FUNC){
+    return twoOperation(CP_FUNC, parserFactor, switchPolynomial, NULL, FACTOR, POLYNOMIAL,
                         "factor", "polynomial", false);
 }
 
@@ -1174,7 +1174,7 @@ void parserPolynomial(PASERSSIGNATURE){
  * | switchFactor OPT_ADD parserCallBack
  * | switchFactor OPT_SUB parserCallBack
  */
-bool switchFactor(PASERSSIGNATURE, int symbol, Statement **st){
+bool switchFactor(P_FUNC, int symbol, Statement **st){
     switch (symbol) {
         case MATHER_MUL:
             *st = makeOperationBaseStatement(OPT_MUL, 0, pm->file);
@@ -1187,8 +1187,8 @@ bool switchFactor(PASERSSIGNATURE, int symbol, Statement **st){
     }
     return true;
 }
-void parserFactor(PASERSSIGNATURE){
-    return twoOperation(CALLPASERSSIGNATURE, parserCallBack, switchFactor, NULL, CALLBACK, FACTOR,
+void parserFactor(P_FUNC){
+    return twoOperation(CP_FUNC, parserCallBack, switchFactor, NULL, CALLBACK, FACTOR,
                         "call back", "factor", false);
 }
 
@@ -1198,13 +1198,13 @@ void parserFactor(PASERSSIGNATURE){
  * | parserBaseValue
  * | parserCallBack MATHER_LP parserParameter MATHER_RP
  */
-bool tailCall(PASERSSIGNATURE, Token *left_token, Statement **st){
+bool tailCall(P_FUNC, Token *left_token, Statement **st){
     Parameter *pt = NULL;
     long int line = delToken(pm);
 
     if (checkToken(pm, MATHER_RP))
         goto not_pt;
-    if (!parserParameter(CALLPASERSSIGNATURE, &pt, true, false, false, false, MATHER_COMMA, MATHER_ASSIGNMENT, MATHER_SEMICOLON)) {
+    if (!parserParameter(CP_FUNC, &pt, true, false, false, false, MATHER_COMMA, MATHER_ASSIGNMENT, MATHER_SEMICOLON)) {
         syntaxError(pm, syntax_error, line, 1, "Don't get call parameter");
         return false;
     }
@@ -1219,13 +1219,13 @@ bool tailCall(PASERSSIGNATURE, Token *left_token, Statement **st){
     return true;
 }
 
-bool tailSlice(PASERSSIGNATURE, Token *left_token, Statement **st){
+bool tailSlice(P_FUNC, Token *left_token, Statement **st){
     Parameter *pt = NULL;
     Token *tmp = NULL;
     enum SliceType type;  // 0-slice  1-down
     long int line = delToken(pm);
 
-    if (!callChildToken(CALLPASERSSIGNATURE, parserPolynomial, POLYNOMIAL, &tmp, "Don't get slice/down element", syntax_error))
+    if (!callChildToken(CP_FUNC, parserPolynomial, POLYNOMIAL, &tmp, "Don't get slice/down element", syntax_error))
         return false;
     else if (readBackToken(pm) == MATHER_COLON)
         type = SliceType_slice_;
@@ -1234,7 +1234,7 @@ bool tailSlice(PASERSSIGNATURE, Token *left_token, Statement **st){
     line = tmp->line;
     addToken_(pm ,tmp);
 
-    if (!parserParameter(CALLPASERSSIGNATURE, &pt, true, true, true, true,
+    if (!parserParameter(CP_FUNC, &pt, true, true, true, true,
                          (type == SliceType_down_ ? MATHER_COMMA : MATHER_COLON), MATHER_ASSIGNMENT, -1)) {
         syntaxError(pm, syntax_error, line, 1, "Don't get slice element");
         return false;
@@ -1248,25 +1248,25 @@ bool tailSlice(PASERSSIGNATURE, Token *left_token, Statement **st){
     return true;
 }
 
-bool taliPoint(PASERSSIGNATURE, Token *left_token, Statement **st){
+bool taliPoint(P_FUNC, Token *left_token, Statement **st){
     Statement *right_st = NULL;
     delToken(pm);
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserBaseValue, BASEVALUE, &right_st, "Don't get a BaseValue after point"))
+    if (!callChildStatement(CP_FUNC, parserBaseValue, BASEVALUE, &right_st, "Don't get a BaseValue after point"))
         return false;
     *st = makeOperationStatement(OPT_POINT, left_token->data.st, right_st);
     return true;
 }
 
-bool taliLink(PASERSSIGNATURE, Token *left_token, Statement **st){
+bool taliLink(P_FUNC, Token *left_token, Statement **st){
     Statement *right_st = NULL;
     delToken(pm);
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserBaseValue, BASEVALUE, &right_st, "Don't get a BaseValue after link"))
+    if (!callChildStatement(CP_FUNC, parserBaseValue, BASEVALUE, &right_st, "Don't get a BaseValue after link"))
         return false;
     *st = makeOperationStatement(OPT_LINK, left_token->data.st, right_st);
     return true;
 }
 
-void parserCallBack(PASERSSIGNATURE){
+void parserCallBack(P_FUNC){
     while(true){
         int tk;
         Token *left_token = NULL;
@@ -1274,7 +1274,7 @@ void parserCallBack(PASERSSIGNATURE){
 
         if (readBackToken(pm) != CALLBACK){
 
-            if (!callChildStatement(CALLPASERSSIGNATURE, parserBaseValue, BASEVALUE, &st, NULL))
+            if (!callChildStatement(CP_FUNC, parserBaseValue, BASEVALUE, &st, NULL))
                 goto return_;
             addStatementToken(CALLBACK, st, pm);
             continue;
@@ -1282,10 +1282,10 @@ void parserCallBack(PASERSSIGNATURE){
         left_token = popNewToken(pm->tm);
 
         tk = readBackToken(pm);
-        if (tk == MATHER_LB && !tailSlice(CALLPASERSSIGNATURE, left_token, &st) ||
-            tk == MATHER_LP && !tailCall(CALLPASERSSIGNATURE, left_token, &st) ||
-            tk == MATHER_POINT && !taliPoint(CALLPASERSSIGNATURE, left_token, &st) ||
-            tk == MATHER_LINK && !taliLink(CALLPASERSSIGNATURE, left_token, &st)) {
+        if (tk == MATHER_LB && !tailSlice(CP_FUNC, left_token, &st) ||
+            tk == MATHER_LP && !tailCall(CP_FUNC, left_token, &st) ||
+            tk == MATHER_POINT && !taliPoint(CP_FUNC, left_token, &st) ||
+            tk == MATHER_LINK && !taliLink(CP_FUNC, left_token, &st)) {
             freeToken(left_token, true);
             goto return_;
         } else if (tk != MATHER_LB && tk != MATHER_LP && tk != MATHER_POINT && tk != MATHER_LINK) {
@@ -1310,12 +1310,12 @@ void parserCallBack(PASERSSIGNATURE){
  * | MATHER_LP parserOperation MATHER_LP MATHER_VAR
  * | MATHER_LC parserParameter(dict) MATHER_LC
  */
-int getOperation(PASERSSIGNATURE, int right_type, Statement **st, char *name){
+int getOperation(P_FUNC, int right_type, Statement **st, char *name){
     *st = NULL;
     if (checkToken(pm, right_type))
         goto return_;
 
-    if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, st, NULL))
+    if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, st, NULL))
         return 0;
 
     if (!checkToken(pm, right_type)){
@@ -1327,7 +1327,7 @@ int getOperation(PASERSSIGNATURE, int right_type, Statement **st, char *name){
     return 1;
 }
 
-void parserBaseValue(PASERSSIGNATURE){
+void parserBaseValue(P_FUNC){
     Token *value_token = popNewToken(pm->tm);
     Statement *st = NULL;
     switch (value_token->token_type) {
@@ -1368,7 +1368,7 @@ void parserBaseValue(PASERSSIGNATURE){
         case MATHER_LAMBDA:  {
             Parameter *pt = NULL;
             Statement *lambda_st = NULL;
-            if (!parserParameter(CALLPASERSSIGNATURE, &pt, false, true, false, false, MATHER_COMMA,
+            if (!parserParameter(CP_FUNC, &pt, false, true, false, false, MATHER_COMMA,
                                  MATHER_ASSIGNMENT, -1)) {
                 freeToken(value_token, true);
                 syntaxError(pm, syntax_error, value_token->line, 1, "Don't get a lambda parameter");
@@ -1378,7 +1378,7 @@ void parserBaseValue(PASERSSIGNATURE){
                 lambda_st = makeStatement(value_token->line, pm->file);
                 goto not_lambda_st;
             }
-            if (!callChildStatement(CALLPASERSSIGNATURE, parserOperation, OPERATION, &lambda_st,
+            if (!callChildStatement(CP_FUNC, parserOperation, OPERATION, &lambda_st,
                                     "Don't get a lambda operation")) {
                 freeToken(value_token, true);
                 goto return_;
@@ -1392,7 +1392,7 @@ void parserBaseValue(PASERSSIGNATURE){
             break;
         case MATHER_SVAR: {
             Statement *svar_st = NULL;
-            if (!callChildStatement(CALLPASERSSIGNATURE, parserBaseValue, BASEVALUE, &svar_st, NULL)) {
+            if (!callChildStatement(CP_FUNC, parserBaseValue, BASEVALUE, &svar_st, NULL)) {
                 syntaxError(pm, syntax_error, value_token->line, 1, "Don't get super var after $");
                 freeToken(value_token, true);
                 goto return_;
@@ -1404,7 +1404,7 @@ void parserBaseValue(PASERSSIGNATURE){
             int tmp;
             Statement *tmp_st = NULL;
             lexEnter(pm, true);
-            tmp = getOperation(CALLPASERSSIGNATURE, MATHER_RB, &tmp_st, "base value");
+            tmp = getOperation(CP_FUNC, MATHER_RB, &tmp_st, "base value");
             lexEnter(pm, false);
             if (tmp == 0) {
                 freeToken(value_token, true);
@@ -1434,7 +1434,7 @@ void parserBaseValue(PASERSSIGNATURE){
         case MATHER_LP: {
             int tmp;
             lexEnter(pm, true);
-            tmp = getOperation(CALLPASERSSIGNATURE, MATHER_RP, &st, "base value");
+            tmp = getOperation(CP_FUNC, MATHER_RP, &st, "base value");
             lexEnter(pm, false);
             if (tmp == 0) {
                 freeToken(value_token, true);
@@ -1454,7 +1454,7 @@ void parserBaseValue(PASERSSIGNATURE){
         case MATHER_LC: {
             Parameter *pt = NULL;
             int parser_status;
-            parser_status = parserParameter(CALLPASERSSIGNATURE, &pt, true, false, false, true, MATHER_COMMA,
+            parser_status = parserParameter(CP_FUNC, &pt, true, false, false, true, MATHER_COMMA,
                                             MATHER_COLON, -1);
             if (!parser_status) {
                 freeToken(value_token, true);
@@ -1472,7 +1472,7 @@ void parserBaseValue(PASERSSIGNATURE){
         }
         case MATHER_BLOCK: {
             Statement *block = NULL;
-            if (!callParserCode(CALLPASERSSIGNATURE, &block, "Don't get a while code", value_token->line)) {
+            if (!callParserCode(CP_FUNC, &block, "Don't get a while code", value_token->line)) {
                 syntaxError(pm, syntax_error, value_token->line, 1, "Don't get block command");
                 freeToken(value_token, true);
                 goto return_;
@@ -1489,7 +1489,7 @@ void parserBaseValue(PASERSSIGNATURE){
                 goto return_;
             }
             delToken(pm);
-            if (!callChildStatement(CALLPASERSSIGNATURE, parserBaseValue, BASEVALUE, &st, "Don't get Base Value after aut token")) {
+            if (!callChildStatement(CP_FUNC, parserBaseValue, BASEVALUE, &st, "Don't get Base Value after aut token")) {
                 freeToken(value_token, true);
                 goto return_;
             }

+ 35 - 36
VirtulMathCore/parser/include/__grammar.h

@@ -2,8 +2,8 @@
 #define VIRTUALMATH___GRAMMAR_H
 #include "__virtualmath.h"
 
-#define PASERSSIGNATURE ParserMessage *pm, Inter *inter /*pasers函数的统一签名*/
-#define CALLPASERSSIGNATURE pm, inter /*pasers函数调用的统一实参*/
+#define P_FUNC ParserMessage *pm, Inter *inter /*pasers函数的统一签名*/
+#define CP_FUNC pm, inter /*pasers函数调用的统一实参*/
 
 #define addStatementToken(type, st, pm) addBackToken(pm->tm->ts, makeStatementToken(type, st))
 #define delToken(pm) (freeToken(popNewToken(pm->tm), false))
@@ -12,52 +12,51 @@
 #define addToken_ backToken_
 #define call_success(pm) (pm->status == success)
 
-typedef void (*PasersFunction)(PASERSSIGNATURE);
-typedef int (*GetSymbolFunction)(PASERSSIGNATURE, int, Statement **);
-typedef int (*ChecktLeftToken)(PASERSSIGNATURE, Statement *);
+typedef void (*PasersFunction)(P_FUNC);
+typedef int (*GetSymbolFunction)(P_FUNC, int, Statement **);
+typedef int (*ChecktLeftToken)(P_FUNC, Statement *);
 typedef Statement *(*MakeControlFunction)(Statement *, fline, char *);
-typedef int (*TailFunction)(PASERSSIGNATURE, Token *, Statement **);
 
-void parserCommand(PASERSSIGNATURE);
-void parserControl(PASERSSIGNATURE, MakeControlFunction callBack, int type, bool must_operation, char *message);
-void parserDef(PASERSSIGNATURE);
-void parserDo(PASERSSIGNATURE);
-void parserFor(PASERSSIGNATURE);
-void parserWith(PASERSSIGNATURE);
-void parserIf(PASERSSIGNATURE);
-void parserWhile(PASERSSIGNATURE);
-void parserTry(PASERSSIGNATURE);
-void parserCode(PASERSSIGNATURE);
-void parserOperation(PASERSSIGNATURE);
-void parserPolynomial(PASERSSIGNATURE);
-void parserBaseValue(PASERSSIGNATURE);
-void parserCallBack(PASERSSIGNATURE);
-void parserFactor(PASERSSIGNATURE);
-void parserAssignment(PASERSSIGNATURE);
-void parserTuple(PASERSSIGNATURE);
-void parserImport(PASERSSIGNATURE);
-void parserLabel(PASERSSIGNATURE);
-void parserGoto(PASERSSIGNATURE);
-void parserDecoration(PASERSSIGNATURE);
-void parserVarControl(PASERSSIGNATURE);
+void parserCommand(P_FUNC);
+void parserControl(P_FUNC, MakeControlFunction callBack, int type, bool must_operation, char *message);
+void parserDef(P_FUNC);
+void parserDo(P_FUNC);
+void parserFor(P_FUNC);
+void parserWith(P_FUNC);
+void parserIf(P_FUNC);
+void parserWhile(P_FUNC);
+void parserTry(P_FUNC);
+void parserCode(P_FUNC);
+void parserOperation(P_FUNC);
+void parserPolynomial(P_FUNC);
+void parserBaseValue(P_FUNC);
+void parserCallBack(P_FUNC);
+void parserFactor(P_FUNC);
+void parserAssignment(P_FUNC);
+void parserTuple(P_FUNC);
+void parserImport(P_FUNC);
+void parserLabel(P_FUNC);
+void parserGoto(P_FUNC);
+void parserDecoration(P_FUNC);
+void parserVarControl(P_FUNC);
 
 void syntaxError(ParserMessage *pm, int status,long int line , int num, ...);
 
 int readBackToken(ParserMessage *pm);
 bool checkToken(ParserMessage *pm, int type);
 
-bool commandCallControl_(PASERSSIGNATURE, MakeControlFunction callBack, int type, Statement **st, bool must_operation, char *error_message);
+bool commandCallControl_(P_FUNC, MakeControlFunction callBack, int type, Statement **st, bool must_operation, char *error_message);
 
-bool callParserCode(PASERSSIGNATURE, Statement **st, char *message, long int line);
-bool callParserAs(PASERSSIGNATURE, Statement **st,char *message);
-bool callChildStatement(PASERSSIGNATURE, PasersFunction callBack, int type, Statement **st, char *message);
-bool callChildToken(PASERSSIGNATURE, PasersFunction callBack, int type, Token **tmp, char *message,
+bool callParserCode(P_FUNC, Statement **st, char *message, long int line);
+bool callParserAs(P_FUNC, Statement **st, char *message);
+bool callChildStatement(P_FUNC, PasersFunction callBack, int type, Statement **st, char *message);
+bool callChildToken(P_FUNC, PasersFunction callBack, int type, Token **tmp, char *message,
                     int error_type);
 
-bool parserParameter(PASERSSIGNATURE, Parameter **pt, bool enter, bool is_formal, bool is_list, bool is_dict,
-                int sep, int ass, int n_sep);
+bool parserParameter(P_FUNC, Parameter **pt, bool enter, bool is_formal, bool is_list, bool is_dict,
+                     int sep, int ass, int n_sep);
 
-void twoOperation(PASERSSIGNATURE, PasersFunction callBack, GetSymbolFunction getSymbol, ChecktLeftToken checkleft,
+void twoOperation(P_FUNC, PasersFunction callBack, GetSymbolFunction getSymbol, ChecktLeftToken checkleft,
                   int call_type, int self_type, char *call_name, char *self_name, bool is_right);
 
 void lexEnter(ParserMessage *pm, bool lock);

+ 78 - 78
VirtulMathCore/src/__run.c

@@ -1,44 +1,44 @@
 #include "__run.h"
 
-ResultType getBaseVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
+ResultType getBaseVarInfo(wchar_t **name, int *times, FUNC){
     *name = setStrVarName(st->u.base_var.name, false, inter);
     *times = 0;
     if (st->u.base_var.times == NULL){
         *times = 0;
         goto not_times;
     }
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.base_var.times, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.base_var.times, var_list, result, belong)))
         return result->type;
     if (!isType(result->value->value, V_num)){
-        setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CFUNC_NT(var_list, result, belong));
         return result->type;
     }
     *times = (int)result->value->value->data.num.num;
     freeResult(result);
 
     not_times:
-    makeStringValue(st->u.base_var.name, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(st->u.base_var.name, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType getBaseSVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
+ResultType getBaseSVarInfo(wchar_t **name, int *times, FUNC){
     freeResult(result);
 
     if (st->u.base_svar.times == NULL){
         *times = 0;
         goto not_times;
     }
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.base_svar.times, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.base_svar.times, var_list, result, belong)))
         return result->type;
     if (!isType(result->value->value, V_num)){
-        setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CFUNC_NT(var_list, result, belong));
         return result->type;
     }
     *times = (int)result->value->value->data.num.num;
 
     freeResult(result);
     not_times:
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.base_svar.name, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.base_svar.name, var_list, result, belong)))
         return result->type;
 
     *name = getNameFromValue(result->value->value, inter);
@@ -47,13 +47,13 @@ ResultType getBaseSVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType getVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
+ResultType getVarInfo(wchar_t **name, int *times, FUNC){
     if (st->type == base_var)
-        getBaseVarInfo(name, times, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+        getBaseVarInfo(name, times, CFUNC(st, var_list, result, belong));
     else if (st->type == base_svar)
-        getBaseSVarInfo(name, times, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+        getBaseSVarInfo(name, times, CFUNC(st, var_list, result, belong));
     else{
-        if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))
+        if (operationSafeInterStatement(CFUNC(st, var_list, result, belong)))
             return result->type;
         *name = getNameFromValue(result->value->value, inter);
         *times = 0;
@@ -123,7 +123,7 @@ bool popYieldVarList(Statement *st, VarList **return_, VarList *out_var, Inter *
     return yield_run;
 }
 
-ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func, fline line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST){
+ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func, fline line, char *file, int pt_sep, FUNC_NT){
     Argument *tmp = NULL;
     LinkValue *self;
     LinkValue *func;
@@ -150,7 +150,7 @@ ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func
                 *base = *arg;
             } else {
                 error_:
-                setResultError(E_ArgumentException, FEW_ARG, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                setResultError(E_ArgumentException, FEW_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
                 return R_error;
             }
             break;
@@ -167,12 +167,12 @@ ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func
             break;
         }
         default:
-            setResultError(E_ArgumentException, MANY_ARG, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
             return R_error;
     }
 
     if (pt_type != free_ && self == NULL) {
-        setResultError(E_ArgumentException, L"Function does not belong to anything(not self)", line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, L"Function does not belong to anything(not self)", line, file, true, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
@@ -265,33 +265,33 @@ void freeFunctionArgument(Argument *arg, Argument *base) {
     }
 }
 
-LinkValue *findStrVar(wchar_t *name, bool free_old, fline line, char *file, bool nowrun, INTER_FUNCTIONSIG_NOT_ST){
+LinkValue *findStrVar(wchar_t *name, bool free_old, fline line, char *file, bool nowrun, FUNC_NT){
     LinkValue *tmp = NULL;
     wchar_t *name_ = setStrVarName(name, free_old, inter);
-    tmp = findFromVarList(name_, 0, get_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    tmp = findFromVarList(name_, 0, get_var, CFUNC_CORE(var_list));
     memFree(name_);
     if (tmp != NULL && nowrun) {
         setResultCore(result);
-        if (!runVarFunc(tmp, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+        if (!runVarFunc(tmp, line, file, CFUNC_NT(var_list, result, belong)))
             setResultOperationBase(result, tmp);
     }
     return tmp;
 }
 
-LinkValue *findStrVarOnly(wchar_t *name, bool free_old, INTER_FUNCTIONSIG_CORE) {
-    return findStrVar(name, free_old, 0, "sys", false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, NULL, NULL));
+LinkValue *findStrVarOnly(wchar_t *name, bool free_old, FUNC_CORE) {
+    return findStrVar(name, free_old, 0, "sys", false, CFUNC_NT(var_list, NULL, NULL));
 }
 
-LinkValue *checkStrVar(wchar_t *name, bool free_old, INTER_FUNCTIONSIG_CORE){
+LinkValue *checkStrVar(wchar_t *name, bool free_old, FUNC_CORE){
     LinkValue *tmp = NULL;
     wchar_t *name_ = setStrVarName(name, free_old, inter);
-    tmp = findFromVarList(name_, 0, read_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    tmp = findFromVarList(name_, 0, read_var, CFUNC_CORE(var_list));
     memFree(name_);
     return tmp;
 }
 
-static void addStrVarCore(int setting, wchar_t *var_name, LinkValue *name_, LinkValue *value, fline line, char *file, VarList *out_var, INTER_FUNCTIONSIG_NOT_ST) {
-    addFromVarList(var_name, name_, 0, value, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+static void addStrVarCore(int setting, wchar_t *var_name, LinkValue *name_, LinkValue *value, fline line, char *file, VarList *out_var, FUNC_NT) {
+    addFromVarList(var_name, name_, 0, value, CFUNC_CORE(var_list));
     out_var = out_var == NULL ? var_list : out_var;
     if (setting)
         newObjectSetting(name_, line, file, value, result, inter, out_var);
@@ -299,53 +299,53 @@ static void addStrVarCore(int setting, wchar_t *var_name, LinkValue *name_, Link
         setResult(result, inter);
 }
 
-void addStrVar(wchar_t *name, bool free_old, bool setting, LinkValue *value, fline line, char *file, bool run, INTER_FUNCTIONSIG_NOT_ST) {
+void addStrVar(wchar_t *name, bool free_old, bool setting, LinkValue *value, fline line, char *file, bool run, FUNC_NT) {
     LinkValue *name_;
     wchar_t *var_name = setStrVarName(name, free_old, inter);
     setResultCore(result);
 
     if (run) {
-        LinkValue *tmp = findFromVarList(name, 0, read_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
-        if (tmp != NULL && !setVarFunc(tmp, value, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+        LinkValue *tmp = findFromVarList(name, 0, read_var, CFUNC_CORE(var_list));
+        if (tmp != NULL && !setVarFunc(tmp, value, line, file, CFUNC_NT(var_list, result, belong)))
             goto return_;
     }
 
-    makeStringValue(name, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(name, line, file, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto return_;
 
     name_ = result->value;
     result->value = NULL;
     freeResult(result);
-    addStrVarCore(setting, var_name, name_, value, line, file, NULL, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    addStrVarCore(setting, var_name, name_, value, line, file, NULL, CFUNC_NT(var_list, result, belong));
     gc_freeTmpLink(&name_->gc_status);
 
     return_:
     memFree(var_name);
 }
 
-LinkValue *findAttributes(wchar_t *name, bool free_old, fline line, char *file, bool nowrun, INTER_FUNCTIONSIG_NOT_ST) {  // TODO-szh 处理调用该函数的地方释放result
+LinkValue *findAttributes(wchar_t *name, bool free_old, fline line, char *file, bool nowrun, FUNC_NT) {  // TODO-szh 处理调用该函数的地方释放result
     LinkValue *attr;
     gc_freeze(inter, var_list, belong->value->object.var, true);
-    attr = findStrVar(name, free_old, line, file, false, CALL_INTER_FUNCTIONSIG_NOT_ST(belong->value->object.var, result, belong));  // TODO-szh 重新启动
+    attr = findStrVar(name, free_old, line, file, false, CFUNC_NT(belong->value->object.var, result, belong));  // TODO-szh 重新启动
     if (attr != NULL && (attr->belong == NULL || attr->belong->value != belong->value && checkAttribution(belong->value, attr->belong->value)))
         attr->belong = belong;
     gc_freeze(inter, var_list, belong->value->object.var, false);
     return attr;
 }
 
-bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, char *file, bool run, INTER_FUNCTIONSIG_NOT_ST) {
+bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, char *file, bool run, FUNC_NT) {
     wchar_t *var_name = setStrVarName(name, free_old, inter);
     LinkValue *name_;
     setResultCore(result);
 
     if (run) {
-        LinkValue *tmp = findFromVarList(name, 0, read_var, CALL_INTER_FUNCTIONSIG_CORE(belong->value->object.var));
-        if (tmp != NULL && !setVarFunc(tmp, value, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(belong->value->object.var, result, belong)))
+        LinkValue *tmp = findFromVarList(name, 0, read_var, CFUNC_CORE(belong->value->object.var));
+        if (tmp != NULL && !setVarFunc(tmp, value, line, file, CFUNC_NT(belong->value->object.var, result, belong)))
             goto return_;
     }
 
-    makeStringValue(name, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(name, line, file, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto return_;
 
@@ -354,7 +354,7 @@ bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, c
     freeResult(result);
 
     gc_freeze(inter, var_list, belong->value->object.var, true);
-    addStrVarCore(false, var_name, name_, value, line, file, var_list, CALL_INTER_FUNCTIONSIG_NOT_ST(belong->value->object.var, result, belong));
+    addStrVarCore(false, var_name, name_, value, line, file, var_list, CFUNC_NT(belong->value->object.var, result, belong));
     gc_freeze(inter, var_list, belong->value->object.var, false);
 
     gc_freeTmpLink(&name_->gc_status);
@@ -364,29 +364,29 @@ bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, c
     return CHECK_RESULT(result);
 }
 
-void newObjectSetting(LinkValue *name, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+void newObjectSetting(LinkValue *name, fline line, char *file, FUNC_NT) {
     setResultCore(result);
-    addAttributes(inter->data.object_name, false, name, line, file, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    addAttributes(inter->data.object_name, false, name, line, file, false, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return;
     freeResult(result);
 
-    addAttributes(inter->data.object_self, false, belong, line, file, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    addAttributes(inter->data.object_self, false, belong, line, file, false, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result) && belong->value->object.inherit != NULL) {
         freeResult(result);
         addAttributes(inter->data.object_father, false, belong->value->object.inherit->value, line, file, false,
-                      CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                      CFUNC_NT(var_list, result, belong));
     }
 }
 
 
-ResultType getElement(LinkValue *from, LinkValue *index, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType getElement(LinkValue *from, LinkValue *index, fline line, char *file, FUNC_NT) {
     LinkValue *_func_ = NULL;
     setResultCore(result);
     gc_addTmpLink(&from->gc_status);
     gc_addTmpLink(&index->gc_status);
 
-    _func_ = findAttributes(inter->data.object_down, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, from));
+    _func_ = findAttributes(inter->data.object_down, false, 0, "sys", true, CFUNC_NT(var_list, result, from));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -394,12 +394,12 @@ ResultType getElement(LinkValue *from, LinkValue *index, fline line, char *file,
         Argument *arg = NULL;
         gc_addTmpLink(&_func_->gc_status);
         arg = makeValueArgument(index);
-        callBackCore(_func_, arg, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_func_, arg, line, file, 0, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&_func_->gc_status);
         freeArgument(arg, true);
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(subscript(__down__)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(subscript(__down__)), line, file, true, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&from->gc_status);
@@ -407,76 +407,76 @@ ResultType getElement(LinkValue *from, LinkValue *index, fline line, char *file,
     return result->type;
 }
 
-ResultType getIter(LinkValue *value, int status, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType getIter(LinkValue *value, int status, fline line, char *file, FUNC_NT) {
     LinkValue *_func_ = NULL;
     setResultCore(result);
     gc_addTmpLink(&value->gc_status);
 
     if (status == 1)
-        _func_ = findAttributes(inter->data.object_iter, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, value));
+        _func_ = findAttributes(inter->data.object_iter, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
     else
-        _func_ = findAttributes(inter->data.object_next, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, value));
+        _func_ = findAttributes(inter->data.object_next, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
 
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
     if (_func_ != NULL){
         gc_addTmpLink(&_func_->gc_status);
-        callBackCore(_func_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_func_, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&_func_->gc_status);
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(iter), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(iter), line, file, true, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&value->gc_status);
     return result->type;
 }
 
-bool checkBool(LinkValue *value, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST){
-    LinkValue *_bool_ = findAttributes(inter->data.object_bool, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, value));
+bool checkBool(LinkValue *value, fline line, char *file, FUNC_NT){
+    LinkValue *_bool_ = findAttributes(inter->data.object_bool, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
     if (!CHECK_RESULT(result))
         return false;
     if (_bool_ != NULL){
         gc_addTmpLink(&_bool_->gc_status);
-        callBackCore(_bool_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_bool_, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&_bool_->gc_status);
         if (result->value->value->type != V_bool)
-            setResultError(E_TypeException, RETURN_ERROR(__bool__, bool), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, RETURN_ERROR(__bool__, bool), line, file, true, CFUNC_NT(var_list, result, belong));
         else
             return result->value->value->data.bool_.bool_;
     } else {
-        makeBoolValue(true, 0, "sys.bool", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeBoolValue(true, 0, "sys.bool", CFUNC_NT(var_list, result, belong));
         return true;
     }
     return false;
 }
 
-wchar_t *getRepoStr(LinkValue *value, bool is_repo, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST){
+wchar_t *getRepoStr(LinkValue *value, bool is_repo, fline line, char *file, FUNC_NT){
     LinkValue *_repo_;
     wchar_t *re = NULL;
     setResultCore(result);
     gc_addTmpLink(&value->gc_status);
 
-    _repo_ = findAttributes(is_repo ? inter->data.object_repo : inter->data.object_str, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, value));
+    _repo_ = findAttributes(is_repo ? inter->data.object_repo : inter->data.object_str, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
 
     if (_repo_ != NULL){
         gc_addTmpLink(&_repo_->gc_status);
-        callBackCore(_repo_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_repo_, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&_repo_->gc_status);
         if (!CHECK_RESULT(result))
             goto return_;
         else if (result->value->value->type != V_str){
-            setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CFUNC_NT(var_list, result, belong));
             goto return_;
         }
         re = result->value->value->data.str.str;
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&value->gc_status);
@@ -491,23 +491,23 @@ bool is_indexException(LinkValue *value, Inter *inter) {
     return value->value == inter->data.index_exc->value || checkAttribution(value->value, inter->data.index_exc->value);
 }
 
-bool checkAut(enum ValueAuthority value, enum ValueAuthority base, fline line, char *file, char *name, bool pri_auto, INTER_FUNCTIONSIG_NOT_ST) {
+bool checkAut(enum ValueAuthority value, enum ValueAuthority base, fline line, char *file, char *name, bool pri_auto, FUNC_NT) {
     if ((value == public_aut || (!pri_auto && value == auto_aut)) && (base != public_aut && base != auto_aut)) {
         if (name == NULL)
-            setResultError(E_PermissionsException, L"Wrong Permissions: access variables as public", line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_PermissionsException, L"Wrong Permissions: access variables as public", line, file, true, CFUNC_NT(var_list, result, belong));
         else {
             wchar_t *message = memWidecat(L"Wrong Permissions: access variables as public: ", memStrToWcs(name, false), false, true);
-            setResultError(E_PermissionsException, message, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_PermissionsException, message, line, file, true, CFUNC_NT(var_list, result, belong));
             memFree(message);
         }
         return false;
     }
     else if ((value == protect_aut) && (base == private_aut)) {
         if (name == NULL)
-            setResultError(E_PermissionsException, L"Wrong Permissions: access variables as protect", line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_PermissionsException, L"Wrong Permissions: access variables as protect", line, file, true, CFUNC_NT(var_list, result, belong));
         else {
             wchar_t *message = memWidecat(L"Wrong Permissions: access variables as protect: ", memStrToWcs(name, false), false, true);
-            setResultError(E_PermissionsException, message, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_PermissionsException, message, line, file, true, CFUNC_NT(var_list, result, belong));
             memFree(message);
         }
         return false;
@@ -522,11 +522,11 @@ LinkValue *make_new(Inter *inter, LinkValue *belong, LinkValue *class){
     return makeLinkValue(new_object, belong, inter);
 }
 
-static int init_new(LinkValue *obj, Argument *arg, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+static int init_new(LinkValue *obj, Argument *arg, fline line, char *file, FUNC_NT) {
     LinkValue *_init_ = NULL;
     setResultCore(result);
 
-    _init_ = findAttributes(inter->data.object_init, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, obj));
+    _init_ = findAttributes(inter->data.object_init, false, 0, "sys", true, CFUNC_NT(var_list, result, obj));
     if (!CHECK_RESULT(result))
         return -1;
     freeResult(result);
@@ -534,7 +534,7 @@ static int init_new(LinkValue *obj, Argument *arg, fline line, char *file, INTER
 
     if (_init_ == NULL) {
         if (arg != NULL) {
-            setResultError(E_ArgumentException, MANY_ARG, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
             return 0;
         } else
             return 1;
@@ -542,17 +542,17 @@ static int init_new(LinkValue *obj, Argument *arg, fline line, char *file, INTER
 
     gc_addTmpLink(&_init_->gc_status);
     _init_->belong = obj;
-    callBackCore(_init_, arg, 0, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, obj));
+    callBackCore(_init_, arg, 0, file, 0, CFUNC_NT(var_list, result, obj));
     gc_freeTmpLink(&_init_->gc_status);
 
     return CHECK_RESULT(result) ? 1 : -1;
 }
 
-int run_init(LinkValue *obj, Argument *arg, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+int run_init(LinkValue *obj, Argument *arg, fline line, char *file, FUNC_NT) {
     int return_;
     setResultCore(result);
 
-    return_ = init_new(obj, arg, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    return_ = init_new(obj, arg, line, file, CFUNC_NT(var_list, result, belong));
     if (return_ == 1) {
         freeResult(result);
         setResultOperation(result, obj);
@@ -560,31 +560,31 @@ int run_init(LinkValue *obj, Argument *arg, fline line, char *file, INTER_FUNCTI
     return return_;
 }
 
-bool setBoolAttrible(bool value, wchar_t *var, fline line, char *file, LinkValue *obj, INTER_FUNCTIONSIG_NOT_ST) {
+bool setBoolAttrible(bool value, wchar_t *var, fline line, char *file, LinkValue *obj, FUNC_NT) {
     LinkValue *bool_value = NULL;
     setResultCore(result);
-    makeBoolValue(value, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeBoolValue(value, line, file, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return false;
     bool_value = result->value;
     freeResult(result);
-    if (!addAttributes(var, false, bool_value, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, obj)))
+    if (!addAttributes(var, false, bool_value, line, file, true, CFUNC_NT(var_list, result, obj)))
         return false;
     freeResult(result);
     return true;
 }
 
-bool runVarFunc(LinkValue *var, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+bool runVarFunc(LinkValue *var, fline line, char *file, FUNC_NT) {
     setResultCore(result);
     if (var->value->type != V_func || !var->value->data.function.function_data.run)
         return false;
     gc_addTmpLink(&var->gc_status);
-    callBackCore(var, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(var, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
     gc_freeTmpLink(&var->gc_status);
     return true;
 }
 
-bool setVarFunc(LinkValue *var, LinkValue *new, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+bool setVarFunc(LinkValue *var, LinkValue *new, fline line, char *file, FUNC_NT) {
     Argument *arg;
     setResultCore(result);
     if (var->value->type != V_func || !var->value->data.function.function_data.run)
@@ -593,7 +593,7 @@ bool setVarFunc(LinkValue *var, LinkValue *new, fline line, char *file, INTER_FU
     gc_addTmpLink(&new->gc_status);
 
     arg = makeValueArgument(new);
-    callBackCore(var, arg, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(var, arg, line, file, 0, CFUNC_NT(var_list, result, belong));
     freeArgument(arg, true);
 
     gc_freeTmpLink(&var->gc_status);

+ 20 - 20
VirtulMathCore/src/include/__run.h

@@ -5,32 +5,32 @@
 wchar_t *setStrVarName(wchar_t *old, bool free_old, struct Inter *inter);
 wchar_t *setNumVarName(vnum num, struct Inter *inter);
 wchar_t *getNameFromValue(Value *value, struct Inter *inter);
-ResultType getBaseVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG);
-ResultType getBaseSVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG);
-ResultType getVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG);
+ResultType getBaseVarInfo(wchar_t **name, int *times, FUNC);
+ResultType getBaseSVarInfo(wchar_t **name, int *times, FUNC);
+ResultType getVarInfo(wchar_t **name, int *times, FUNC);
 
 bool popYieldVarList(Statement *st, VarList **return_, VarList *out_var, Inter *inter);
 
-ResultType setFunctionArgument(struct Argument **arg, struct Argument **base, LinkValue *_func, fline line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST);
+ResultType setFunctionArgument(struct Argument **arg, struct Argument **base, LinkValue *_func, fline line, char *file, int pt_sep, FUNC_NT);
 void freeFunctionArgument(Argument *arg, Argument *base);
-LinkValue *findStrVar(wchar_t *name, bool free_old, fline line, char *file, bool nowrun, INTER_FUNCTIONSIG_NOT_ST);
-LinkValue *findStrVarOnly(wchar_t *name, bool free_old, INTER_FUNCTIONSIG_CORE);
-LinkValue *checkStrVar(wchar_t *name, bool free_old, INTER_FUNCTIONSIG_CORE);
-void addStrVar(wchar_t *name, bool free_old, bool setting, LinkValue *value, fline line, char *file, bool run, INTER_FUNCTIONSIG_NOT_ST);
-LinkValue *findAttributes(wchar_t *name, bool free_old, fline line, char *file, bool nowrun, INTER_FUNCTIONSIG_NOT_ST);
+LinkValue *findStrVar(wchar_t *name, bool free_old, fline line, char *file, bool nowrun, FUNC_NT);
+LinkValue *findStrVarOnly(wchar_t *name, bool free_old, FUNC_CORE);
+LinkValue *checkStrVar(wchar_t *name, bool free_old, FUNC_CORE);
+void addStrVar(wchar_t *name, bool free_old, bool setting, LinkValue *value, fline line, char *file, bool run, FUNC_NT);
+LinkValue *findAttributes(wchar_t *name, bool free_old, fline line, char *file, bool nowrun, FUNC_NT);
 
-bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, char *file, bool run, INTER_FUNCTIONSIG_NOT_ST);
-void newObjectSetting(LinkValue *name, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-ResultType getElement(LinkValue *from, LinkValue *index, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-ResultType getIter(LinkValue *value, int status, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-bool checkBool(LinkValue *value, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-wchar_t *getRepoStr(LinkValue *value, bool is_repo, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
+bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, char *file, bool run, FUNC_NT);
+void newObjectSetting(LinkValue *name, fline line, char *file, FUNC_NT);
+ResultType getElement(LinkValue *from, LinkValue *index, fline line, char *file, FUNC_NT);
+ResultType getIter(LinkValue *value, int status, fline line, char *file, FUNC_NT);
+bool checkBool(LinkValue *value, fline line, char *file, FUNC_NT);
+wchar_t *getRepoStr(LinkValue *value, bool is_repo, fline line, char *file, FUNC_NT);
 bool is_iterStop(LinkValue *value, Inter *inter);
 bool is_indexException(LinkValue *value, Inter *inter);
-bool checkAut(enum ValueAuthority value, enum ValueAuthority base, fline line, char *file, char *name, bool pri_auto, INTER_FUNCTIONSIG_NOT_ST);
+bool checkAut(enum ValueAuthority value, enum ValueAuthority base, fline line, char *file, char *name, bool pri_auto, FUNC_NT);
 LinkValue *make_new(Inter *inter, LinkValue *belong, LinkValue *class);
-int run_init(LinkValue *obj, Argument *arg, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-bool setBoolAttrible(bool value, wchar_t *var, fline line, char *file, LinkValue *obj, INTER_FUNCTIONSIG_NOT_ST);
-bool runVarFunc(LinkValue *var, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
-bool setVarFunc(LinkValue *var, LinkValue *new, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST);
+int run_init(LinkValue *obj, Argument *arg, fline line, char *file, FUNC_NT);
+bool setBoolAttrible(bool value, wchar_t *var, fline line, char *file, LinkValue *obj, FUNC_NT);
+bool runVarFunc(LinkValue *var, fline line, char *file, FUNC_NT);
+bool setVarFunc(LinkValue *var, LinkValue *new, fline line, char *file, FUNC_NT);
 #endif //VIRTUALMATH___RUN_H

+ 2 - 2
VirtulMathCore/src/ofunc.c

@@ -18,7 +18,7 @@ static Registered base_func_list[] = {registeredVObject,
 
 void registeredBaseFunction(struct LinkValue *father, Inter *inter){
     for (Registered *list = base_func_list; *list != NULL; list++)
-        (*list)(CALL_REGISTERED_FUNCTION(father, inter->var_list));
+        (*list)(CR_FUNC(father, inter->var_list));
 }
 
 void presetting(Inter *inter) {
@@ -50,6 +50,6 @@ void registeredFunctionName(Inter *inter, LinkValue *belong){
     makeBaseStr(inter);
     presetting(inter);
 
-    registeredObject(inter->base_belong, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+    registeredObject(inter->base_belong, CFUNC_CORE(inter->var_list));
     registeredBaseFunction(inter->base_belong, inter);
 }

+ 55 - 55
VirtulMathCore/src/parameter.c

@@ -185,18 +185,18 @@ void freeParameter(Parameter *pt, bool free_st) {
     }
 }
 
-Argument *listToArgument(LinkValue *list_value, long line, char *file, INTER_FUNCTIONSIG_NOT_ST){
+Argument *listToArgument(LinkValue *list_value, long line, char *file, FUNC_NT){
     Argument *at = NULL;
     LinkValue *iter = NULL;
     setResultCore(result);
-    getIter(list_value, 1, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    getIter(list_value, 1, line, file, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     iter = result->value;
     result->value = NULL;
     while (true) {
         freeResult(result);
-        getIter(iter, 0, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        getIter(iter, 0, line, file, CFUNC_NT(var_list, result, belong));
         if (is_iterStop(result->value, inter)){
             freeResult(result);
             break;
@@ -214,11 +214,11 @@ Argument *listToArgument(LinkValue *list_value, long line, char *file, INTER_FUN
     return at;
 }
 
-Argument *dictToArgument(LinkValue *dict_value, long line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+Argument *dictToArgument(LinkValue *dict_value, long line, char *file, FUNC_NT) {
     Argument *at = NULL;
     LinkValue *iter = NULL;
     setResultCore(result);
-    getIter(dict_value, 1, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    getIter(dict_value, 1, line, file, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     iter = result->value;
@@ -228,7 +228,7 @@ Argument *dictToArgument(LinkValue *dict_value, long line, char *file, INTER_FUN
         wchar_t *name = NULL;
 
         freeResult(result);
-        getIter(iter, 0, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        getIter(iter, 0, line, file, CFUNC_NT(var_list, result, belong));
         if (is_iterStop(result->value, inter)){
             freeResult(result);
             break;
@@ -242,7 +242,7 @@ Argument *dictToArgument(LinkValue *dict_value, long line, char *file, INTER_FUN
         result->value = NULL;
         freeResult(result);
 
-        getElement(iter, name_, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        getElement(iter, name_, line, file, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result)) {
             gc_freeTmpLink(&name_->gc_status);
             freeArgument(at, true);
@@ -269,19 +269,19 @@ Argument *dictToArgument(LinkValue *dict_value, long line, char *file, INTER_FUN
  * @param num
  * @return
  */
-ResultType defaultParameter(Parameter **function_ad, vnum *num, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType defaultParameter(Parameter **function_ad, vnum *num, FUNC_NT) {
     Parameter *function = *function_ad;
     setResultCore(result);
 
     for (*num = 0; function != NULL && function->type == name_par; (*num)++, function = function->next){
         LinkValue *value = NULL;
-        if(operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(function->data.value, var_list, result, belong)))
+        if(operationSafeInterStatement(CFUNC(function->data.value, var_list, result, belong)))
             goto return_;
 
         value = result->value;
         result->value = NULL;
         freeResult(result);
-        assCore(function->data.name, value, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        assCore(function->data.name, value, false, false, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&value->gc_status);
         if (!CHECK_RESULT(result))
             goto return_;
@@ -302,17 +302,17 @@ ResultType defaultParameter(Parameter **function_ad, vnum *num, INTER_FUNCTIONSI
  * @param num
  * @return
  */
-ResultType argumentToVar(Argument **call_ad, vnum *num, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType argumentToVar(Argument **call_ad, vnum *num, FUNC_NT) {
     Argument *call = *call_ad;
     setResultCore(result);
 
     for (*num = 0; call != NULL && call->type == name_arg; (*num)++, call = call->next){
         if (call->name_type == name_char){
-            addFromVarList(call->data.name_, call->data.name_value, 0, call->data.value, CALL_INTER_FUNCTIONSIG_CORE(var_list));  // 参数赋值不需要处理变量式参数
+            addFromVarList(call->data.name_, call->data.name_value, 0, call->data.value, CFUNC_CORE(var_list));  // 参数赋值不需要处理变量式参数
             continue;
         }
         freeResult(result);
-        assCore(call->data.name, call->data.value, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        assCore(call->data.name, call->data.value, false, false, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto return_;
     }
@@ -333,7 +333,7 @@ ResultType argumentToVar(Argument **call_ad, vnum *num, INTER_FUNCTIONSIG_NOT_ST
  * @return
  */
 ResultType parameterFromVar(Parameter **function_ad, VarList *function_var, vnum *num, vnum max, bool *status,
-                            INTER_FUNCTIONSIG_NOT_ST) {
+                            FUNC_NT) {
     Parameter *function = *function_ad;
     bool get = true;
     setResultCore(result);
@@ -346,7 +346,7 @@ ResultType parameterFromVar(Parameter **function_ad, VarList *function_var, vnum
         get = true;
 
         if (function->type == kwargs_par){
-            makeDictValue(NULL, false, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            makeDictValue(NULL, false, 0, "sys", CFUNC_NT(var_list, result, belong));
             if (!CHECK_RESULT(result))
                 return result->type;
 
@@ -361,7 +361,7 @@ ResultType parameterFromVar(Parameter **function_ad, VarList *function_var, vnum
             goto not_return;
         }
 
-        getVarInfo(&str_name, &int_times, CALL_INTER_FUNCTIONSIG(name, var_list, result, belong));
+        getVarInfo(&str_name, &int_times, CFUNC(name, var_list, result, belong));
         if (!CHECK_RESULT(result)) {
             memFree(str_name);
             *function_ad = function;
@@ -369,24 +369,24 @@ ResultType parameterFromVar(Parameter **function_ad, VarList *function_var, vnum
         }
 
         freeResult(result);
-        value = findFromVarList(str_name, int_times, del_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));  // 形式参数取值不需要执行变量式函数
+        value = findFromVarList(str_name, int_times, del_var, CFUNC_CORE(var_list));  // 形式参数取值不需要执行变量式函数
         memFree(str_name);
 
         if(value == NULL) {
             get = false;
-            if (function->type == name_par && !operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(function->data.value, var_list, result, belong))) {
+            if (function->type == name_par && !operationSafeInterStatement(CFUNC(function->data.value, var_list, result, belong))) {
                 value = result->value;
                 goto not_return;
             }
-            setResultErrorSt(E_ArgumentException, FEW_ARG, true, name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultErrorSt(E_ArgumentException, FEW_ARG, true, name, CFUNC_NT(var_list, result, belong));
             goto return_;
         }
-        else if (!checkAut(name->aut, value->aut, name->line, name->code_file, NULL, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+        else if (!checkAut(name->aut, value->aut, name->line, name->code_file, NULL, false, CFUNC_NT(var_list, result, belong)))
             goto return_;
 
         not_return:
         freeResult(result);
-        assCore(name, value, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(function_var, result, belong));
+        assCore(name, value, false, false, CFUNC_NT(function_var, result, belong));
 
         if (!CHECK_RESULT(result)) {
             *function_ad = function;
@@ -413,14 +413,14 @@ ResultType parameterFromVar(Parameter **function_ad, VarList *function_var, vnum
  * @param var_list
  * @return
  */
-ResultType argumentToParameter(Argument **call_ad, Parameter **function_ad, VarList *function_var, INTER_FUNCTIONSIG_NOT_ST){
+ResultType argumentToParameter(Argument **call_ad, Parameter **function_ad, VarList *function_var, FUNC_NT){
     Argument *call = *call_ad;
     Parameter *function = *function_ad;
     setResultCore(result);
 
     for (PASS; call != NULL && function != NULL && (call->type == value_arg) && function->type != args_par; call = call->next, function = function->next){
         Statement *name = function->type == value_par ? function->data.value : function->data.name;
-        assCore(name, call->data.value, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(function_var, result, belong));
+        assCore(name, call->data.value, false, false, CFUNC_NT(function_var, result, belong));
         if (!CHECK_RESULT(result))
             goto return_;
         freeResult(result);
@@ -440,12 +440,12 @@ ResultType argumentToParameter(Argument **call_ad, Parameter **function_ad, VarL
  * @param var_list
  * @return
  */
-ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, INTER_FUNCTIONSIG_NOT_ST){
+ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, FUNC_NT){
     Argument *base = *base_ad;
     setResultCore(result);
 
     for (PASS; call != NULL; call = call->next){
-        if(operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(call->data.value, var_list, result, belong)))
+        if(operationSafeInterStatement(CFUNC(call->data.value, var_list, result, belong)))
             goto return_;
 
         if (call->type == value_par)
@@ -454,7 +454,7 @@ ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, INTE
             if (is_dict){
                 LinkValue *value = result->value;
                 setResultCore(result);
-                if(operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(call->data.name, var_list, result, belong))) {
+                if(operationSafeInterStatement(CFUNC(call->data.name, var_list, result, belong))) {
                     gc_freeTmpLink(&value->gc_status);
                     goto return_;
                 }
@@ -472,7 +472,7 @@ ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, INTE
             start = result->value;
             result->value = NULL;
             freeResult(result);
-            tmp_at = listToArgument(start, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            tmp_at = listToArgument(start, 0, "sys", CFUNC_NT(var_list, result, belong));
             gc_freeTmpLink(&start->gc_status);
             if (!CHECK_RESULT(result))
                 goto return_;
@@ -484,7 +484,7 @@ ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, INTE
             start = result->value;
             result->value = NULL;
             freeResult(result);
-            tmp_at = dictToArgument(start, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            tmp_at = dictToArgument(start, 0, "sys", CFUNC_NT(var_list, result, belong));
             gc_freeTmpLink(&start->gc_status);
             if (!CHECK_RESULT(result))
                 goto return_;
@@ -499,10 +499,10 @@ ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, INTE
     return result->type;
 }
 
-Argument * getArgument(Parameter *call, bool is_dict, INTER_FUNCTIONSIG_NOT_ST) {
+Argument * getArgument(Parameter *call, bool is_dict, FUNC_NT) {
     Argument *new_arg = NULL;
     setResultCore(result);
-    iterParameter(call, &new_arg, is_dict, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    iterParameter(call, &new_arg, is_dict, CFUNC_NT(var_list, result, belong));
     return new_arg;
 }
 
@@ -531,7 +531,7 @@ bool checkIsSep(Parameter *pt) {
  * @return
  */
 ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *function_base, VarList *function_var,
-                        INTER_FUNCTIONSIG_NOT_ST) {
+                            FUNC_NT) {
     Parameter *function = NULL;
     Parameter *tmp_function = NULL;  // 释放使用
     enum {
@@ -580,13 +580,13 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
         freeResult(result);
         switch (status) {
             case match_status: {
-                argumentToParameter(&call, &function, function_var, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                argumentToParameter(&call, &function, function_var, CFUNC_NT(var_list, result, belong));
                 returnResult(result);
                 break;
             }
             case default_status: {
                 vnum num = 0;
-                defaultParameter(&function, &num, CALL_INTER_FUNCTIONSIG_NOT_ST(function_var, result, belong));
+                defaultParameter(&function, &num, CFUNC_NT(function_var, result, belong));
                 returnResult(result);
                 break;
             }
@@ -596,14 +596,14 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
                 bool dict_status = false;
                 VarList *tmp = makeVarList(inter, true);
 
-                argumentToVar(&call, &set_num, CALL_INTER_FUNCTIONSIG_NOT_ST(tmp, result, belong));
+                argumentToVar(&call, &set_num, CFUNC_NT(tmp, result, belong));
                 if (!CHECK_RESULT(result)) {
                     freeVarList(tmp);
                     goto return_;
                 }
 
                 freeResult(result);
-                parameterFromVar(&function, function_var, &get_num, set_num, &dict_status, CALL_INTER_FUNCTIONSIG_NOT_ST(tmp, result, belong));
+                parameterFromVar(&function, function_var, &get_num, set_num, &dict_status, CFUNC_NT(tmp, result, belong));
                 freeVarList(tmp);
                 if (!CHECK_RESULT(result))
                     goto return_;
@@ -622,18 +622,18 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
                             PASS;
                     backup = call->next;
                     call->next = NULL;
-                    makeListValue(base, 0, "sys", L_tuple, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                    makeListValue(base, 0, "sys", L_tuple, CFUNC_NT(var_list, result, belong));
                     call->next = backup;
                     call = backup;
                 } else
-                    makeListValue(NULL, 0, "sys", L_tuple, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                    makeListValue(NULL, 0, "sys", L_tuple, CFUNC_NT(var_list, result, belong));
 
                 returnResult(result);
                 tmp = result->value;
                 result->value = NULL;
                 freeResult(result);
 
-                assCore(function->data.value, tmp, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(function_var, result, belong));
+                assCore(function->data.value, tmp, false, false, CFUNC_NT(function_var, result, belong));
                 gc_freeTmpLink(&tmp->gc_status);
                 returnResult(result);
                 function = function->next;
@@ -641,30 +641,30 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
             }
             case space_kwargs:{
                 LinkValue *tmp;
-                makeDictValue(NULL, true, 0, "sys", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                makeDictValue(NULL, true, 0, "sys", CFUNC_NT(var_list, result, belong));
                 returnResult(result);
                 tmp = result->value;
                 result->value = NULL;
                 freeResult(result);
 
-                assCore(function->data.value, tmp, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(function_var, result, belong));
+                assCore(function->data.value, tmp, false, false, CFUNC_NT(function_var, result, belong));
                 gc_freeTmpLink(&tmp->gc_status);
                 returnResult(result);
                 function = function->next;
                 break;
             }
             case error_to_less:
-                setResultError(E_ArgumentException, FEW_ARG, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                setResultError(E_ArgumentException, FEW_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
                 goto return_;
             case error_to_more:
             to_more:
-                setResultError(E_ArgumentException, MANY_ARG, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                setResultError(E_ArgumentException, MANY_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
                 goto return_;
             case error_kw:
-                setResultError(E_ArgumentException, OBJ_NOTSUPPORT(**), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                setResultError(E_ArgumentException, OBJ_NOTSUPPORT(**), line, file, true, CFUNC_NT(var_list, result, belong));
                 goto return_;
             case error_unknown:
-                setResultError(E_ArgumentException, L"Argument Unknown Exception", line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                setResultError(E_ArgumentException, L"Argument Unknown Exception", line, file, true, CFUNC_NT(var_list, result, belong));
                 goto return_;
             default:
                 goto break_;
@@ -715,14 +715,14 @@ bool checkFormal(Parameter *pt) {
     return true;
 }
 
-int parserArgumentUnion(ArgumentParser ap[], Argument *arg, INTER_FUNCTIONSIG_NOT_ST){
+int parserArgumentUnion(ArgumentParser ap[], Argument *arg, FUNC_NT){
     setResultCore(result);
     if (ap->type != only_name){
         ArgumentParser *bak = NULL;
         int status = 1;
         arg = parserValueArgument(ap, arg, &status, &bak);
         if (status != 1){
-            setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
             return 0;
         }
         ap = bak;
@@ -732,29 +732,29 @@ int parserArgumentUnion(ArgumentParser ap[], Argument *arg, INTER_FUNCTIONSIG_NO
         int status;
 
         if (arg != NULL && arg->type != name_arg) {
-            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
             return -6;
         }
 
-        status = parserNameArgument(ap, arg, &bak, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        status = parserNameArgument(ap, arg, &bak, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             return -1;
         if (status == -3){
             if (parserArgumentNameDefault(ap)->must != -1){
-                setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
                 return -7;
             }
         }
         else if (status == 0){
-            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
             return -2;
         } else if (status == -4){
-            setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
             return -3;
         }
     } else{
         if (arg != NULL) {
-            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
             return -4;
         }
     }
@@ -776,7 +776,7 @@ Argument *parserValueArgument(ArgumentParser *ap, Argument *arg, int *status, Ar
     return arg;
 }
 
-int parserNameArgument(ArgumentParser ap[], Argument *arg, ArgumentParser **bak, INTER_FUNCTIONSIG_NOT_ST){
+int parserNameArgument(ArgumentParser ap[], Argument *arg, ArgumentParser **bak, FUNC_NT){
     VarList *tmp = NULL;
     vnum set_num = 0;
     vnum get_num = 0;
@@ -792,7 +792,7 @@ int parserNameArgument(ArgumentParser ap[], Argument *arg, ArgumentParser **bak,
     }
 
     tmp = makeVarList(inter, true);
-    argumentToVar(&arg, &set_num, CALL_INTER_FUNCTIONSIG_NOT_ST(tmp, result, belong));
+    argumentToVar(&arg, &set_num, CFUNC_NT(tmp, result, belong));
     if (!CHECK_RESULT(result)) {
         return_ = -1;
         goto return_;
@@ -832,7 +832,7 @@ Argument *parserArgumentValueCore(Argument *arg, ArgumentParser *ap){
 
 int parserArgumentVar(ArgumentParser *ap, Inter *inter, VarList *var_list){
     LinkValue *value = NULL;
-    findStrVarOnly(ap->name, false, CALL_INTER_FUNCTIONSIG_CORE(var_list));  // 参数取值不执行变量式函数
+    findStrVarOnly(ap->name, false, CFUNC_CORE(var_list));  // 参数取值不执行变量式函数
     ap->value = value;
     if (value != NULL)
         return 1;

+ 60 - 60
VirtulMathCore/src/run.c

@@ -7,99 +7,99 @@
  * @param var_list
  * @return
  */
-ResultType runStatement(INTER_FUNCTIONSIG) {
+ResultType runStatement(FUNC) {
     setResultCore(result);
     ResultType type = R_not;
     switch (st->type) {
         case base_value:
-            type = getBaseValue(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = getBaseValue(CFUNC(st, var_list, result, belong));
             break;
         case base_var:
-            type = getVar(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong), getBaseVarInfo);
+            type = getVar(CFUNC(st, var_list, result, belong), getBaseVarInfo);
             break;
         case base_svar:
-            type = getVar(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong), getBaseSVarInfo);
+            type = getVar(CFUNC(st, var_list, result, belong), getBaseSVarInfo);
             break;
         case base_list:
-            type = getList(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = getList(CFUNC(st, var_list, result, belong));
             break;
         case base_dict:
-            type = getDict(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = getDict(CFUNC(st, var_list, result, belong));
             break;
         case base_lambda:
-            type = setLambda(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = setLambda(CFUNC(st, var_list, result, belong));
             break;
         case operation:
-            type = operationStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = operationStatement(CFUNC(st, var_list, result, belong));
             break;
         case set_class:
-            type = setClass(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = setClass(CFUNC(st, var_list, result, belong));
             break;
         case set_function:
-            type = setFunction(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = setFunction(CFUNC(st, var_list, result, belong));
             break;
         case slice_:
-            type = elementSlice(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = elementSlice(CFUNC(st, var_list, result, belong));
             break;
         case call_function:
-            type = callBack(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = callBack(CFUNC(st, var_list, result, belong));
             break;
         case if_branch:
-            type = ifBranch(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = ifBranch(CFUNC(st, var_list, result, belong));
             break;
         case while_branch:
-            type = whileBranch(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = whileBranch(CFUNC(st, var_list, result, belong));
             break;
         case for_branch:
-            type = forBranch(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = forBranch(CFUNC(st, var_list, result, belong));
             break;
         case with_branch:
-            type = withBranch(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = withBranch(CFUNC(st, var_list, result, belong));
             break;
         case try_branch:
-            type = tryBranch(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = tryBranch(CFUNC(st, var_list, result, belong));
             break;
         case break_cycle:
-            type = breakCycle(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = breakCycle(CFUNC(st, var_list, result, belong));
             break;
         case continue_cycle:
-            type = continueCycle(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = continueCycle(CFUNC(st, var_list, result, belong));
             break;
         case rego_if:
-            type = regoIf(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = regoIf(CFUNC(st, var_list, result, belong));
             break;
         case restart:
-            type = restartCode(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = restartCode(CFUNC(st, var_list, result, belong));
             break;
         case return_code:
-            type = returnCode(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = returnCode(CFUNC(st, var_list, result, belong));
             break;
         case yield_code:
-            type = yieldCode(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = yieldCode(CFUNC(st, var_list, result, belong));
             break;
         case raise_code:
-            type = raiseCode(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = raiseCode(CFUNC(st, var_list, result, belong));
             break;
         case include_file:
-            type = includeFile(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = includeFile(CFUNC(st, var_list, result, belong));
             break;
         case import_file:
-            type = importFile(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = importFile(CFUNC(st, var_list, result, belong));
             break;
         case from_import_file:
-            type = fromImportFile(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = fromImportFile(CFUNC(st, var_list, result, belong));
             break;
         case default_var:
-            type = setDefault(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = setDefault(CFUNC(st, var_list, result, belong));
             break;
         case assert:
-            type = assertCode(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = assertCode(CFUNC(st, var_list, result, belong));
             break;
         case goto_:
-            type = gotoLabel(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = gotoLabel(CFUNC(st, var_list, result, belong));
             break;
         case del_:
-            type = delOperation(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            type = delOperation(CFUNC(st, var_list, result, belong));
             break;
         default:
             setResult(result, inter);
@@ -115,24 +115,24 @@ ResultType runStatement(INTER_FUNCTIONSIG) {
     return type;
 }
 
-static bool checkSignal(fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+static bool checkSignal(fline line, char *file, FUNC_NT) {
     if (is_KeyInterrupt == signal_appear){
         is_KeyInterrupt = signal_reset;
-        setResultError(E_KeyInterrupt, KEY_INTERRUPT, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_KeyInterrupt, KEY_INTERRUPT, line, file, true, CFUNC_NT(var_list, result, belong));
         return true;
     }
     return false;
 }
 
-static bool gotoStatement(Statement **next, INTER_FUNCTIONSIG) {
+static bool gotoStatement(Statement **next, FUNC) {
     Statement *label_st = checkLabel(st, result->label);
 
     if (label_st == NULL){
-        setResultErrorSt(E_GotoException, L"Don't find label", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_GotoException, L"Don't find label", true, st, CFUNC_NT(var_list, result, belong));
         return false;
     }
 
-    runLabel(CALL_INTER_FUNCTIONSIG(label_st, var_list, result, belong));
+    runLabel(CFUNC(label_st, var_list, result, belong));
     if (!CHECK_RESULT(result))
         return false;
     *next = label_st->next;
@@ -146,7 +146,7 @@ static bool gotoStatement(Statement **next, INTER_FUNCTIONSIG) {
  * @param var_list
  * @return
  */
-ResultType iterStatement(INTER_FUNCTIONSIG) {
+ResultType iterStatement(FUNC) {
     Statement *base;
     ResultType type;
     void *bak = NULL;
@@ -161,19 +161,19 @@ ResultType iterStatement(INTER_FUNCTIONSIG) {
     bak = signal(SIGINT, signalStopInter);
     do {
         base = st;
-        if (checkSignal(base->line, base->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+        if (checkSignal(base->line, base->code_file, CFUNC_NT(var_list, result, belong))) {
             type = result->type;
             break;
         }
         while (base != NULL) {
             freeResult(result);
-            type = runStatement(CALL_INTER_FUNCTIONSIG(base, var_list, result, belong));
-            if (checkSignal(base->line, base->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+            type = runStatement(CFUNC(base, var_list, result, belong));
+            if (checkSignal(base->line, base->code_file, CFUNC_NT(var_list, result, belong))) {
                 type = result->type;
                 break;
             }
             if (type == R_goto && result->times == 0){
-                if (!gotoStatement(&base, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong))) {
+                if (!gotoStatement(&base, CFUNC(st, var_list, result, belong))) {
                     type = result->type;
                     break;
                 }
@@ -219,19 +219,19 @@ ResultType globalIterStatement(Result *result, Inter *inter, Statement *st) {
     do {
         base = st;
         var_list = inter->var_list;
-        if (checkSignal(base->line, base->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+        if (checkSignal(base->line, base->code_file, CFUNC_NT(var_list, result, belong))) {
             type = result->type;
             break;
         }
         while (base != NULL) {
             freeResult(result);
-            type = runStatement(CALL_INTER_FUNCTIONSIG(base, var_list, result, belong));
-            if (checkSignal(base->line, base->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+            type = runStatement(CFUNC(base, var_list, result, belong));
+            if (checkSignal(base->line, base->code_file, CFUNC_NT(var_list, result, belong))) {
                 type = result->type;
                 break;
             }
             if (type == R_goto){
-                if (!gotoStatement(&base, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong))) {
+                if (!gotoStatement(&base, CFUNC(st, var_list, result, belong))) {
                     type = result->type;
                     break;
                 }
@@ -257,19 +257,19 @@ ResultType globalIterStatement(Result *result, Inter *inter, Statement *st) {
 }
 
 // 若需要中断执行, 则返回true
-bool operationSafeInterStatement(INTER_FUNCTIONSIG){
+bool operationSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+    type = iterStatement(CFUNC(st, var_list, result, belong));
     if (RUN_TYPE(type))
         return false;
     else if (type != return_code && type != R_error)
-        setResultErrorSt(E_ResultException, L"Operation get not support result type", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_ResultException, L"Operation get not support result type", true, st, CFUNC_NT(var_list, result, belong));
     return true;
 }
 
-bool ifBranchSafeInterStatement(INTER_FUNCTIONSIG){
+bool ifBranchSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+    type = iterStatement(CFUNC(st, var_list, result, belong));
     if (RUN_TYPE(type))
         return false;
     if (type == R_rego){
@@ -282,9 +282,9 @@ bool ifBranchSafeInterStatement(INTER_FUNCTIONSIG){
     return true;
 }
 
-bool cycleBranchSafeInterStatement(INTER_FUNCTIONSIG){
+bool cycleBranchSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+    type = iterStatement(CFUNC(st, var_list, result, belong));
     if (RUN_TYPE(type))
         return false;
     if (type == R_break || type == R_continue){
@@ -297,9 +297,9 @@ bool cycleBranchSafeInterStatement(INTER_FUNCTIONSIG){
     return true;
 }
 
-bool withBranchSafeInterStatement(INTER_FUNCTIONSIG){
+bool withBranchSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+    type = iterStatement(CFUNC(st, var_list, result, belong));
     if (RUN_TYPE(type))
         return false;
     if (type == R_restart || type == R_goto)
@@ -307,9 +307,9 @@ bool withBranchSafeInterStatement(INTER_FUNCTIONSIG){
     return true;
 }
 
-bool tryBranchSafeInterStatement(INTER_FUNCTIONSIG){
+bool tryBranchSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+    type = iterStatement(CFUNC(st, var_list, result, belong));
     if (RUN_TYPE(type))
         return false;
     if (type == R_restart || type == R_goto)
@@ -317,9 +317,9 @@ bool tryBranchSafeInterStatement(INTER_FUNCTIONSIG){
     return true;
 }
 
-bool functionSafeInterStatement(INTER_FUNCTIONSIG){
+bool functionSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+    type = iterStatement(CFUNC(st, var_list, result, belong));
     if (type == R_error || result->type == R_yield)
         return true;
     else if (type == R_func)
@@ -329,9 +329,9 @@ bool functionSafeInterStatement(INTER_FUNCTIONSIG){
     return false;
 }
 
-bool blockSafeInterStatement(INTER_FUNCTIONSIG){
+bool blockSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+    type = iterStatement(CFUNC(st, var_list, result, belong));
     if (type == R_error || type == R_yield)
         return true;
     result->type = R_opt;

+ 114 - 114
VirtulMathCore/src/runbranch.c

@@ -1,8 +1,8 @@
 #include "__run.h"
 
-static bool checkNumber(INTER_FUNCTIONSIG){
+static bool checkNumber(FUNC){
     if (!isType(result->value->value, V_num)) {
-        setResultErrorSt(E_TypeException, L"Don't get a V_num of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, L"Don't get a V_num of layers", true, st, CFUNC_NT(var_list, result, belong));
         return false;
     }
     return true;
@@ -42,7 +42,7 @@ static void updateBranchYield(Statement *branch_st, Statement *node, StatementLi
     branch_st->info.have_info = true;
 }
 
-static void setBranchResult(bool yield_run, StatementList *sl, Statement *st, Result *result, enum StatementInfoStatus status, INTER_FUNCTIONSIG_CORE) {
+static void setBranchResult(bool yield_run, StatementList *sl, Statement *st, Result *result, enum StatementInfoStatus status, FUNC_CORE) {
     if (yield_run) {
         if (result->type == R_yield)
             updateBranchYield(st, result->node, sl, status);
@@ -56,16 +56,16 @@ static void setBranchResult(bool yield_run, StatementList *sl, Statement *st, Re
     }
 }
 
-static bool runBranchHeard(Statement *condition, Statement *var, LinkValue **condition_value, INTER_FUNCTIONSIG_NOT_ST) {
+static bool runBranchHeard(Statement *condition, Statement *var, LinkValue **condition_value, FUNC_NT) {
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(condition, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(condition, var_list, result, belong)))
         return false;
 
     *condition_value = result->value;
     if (var != NULL) {
         result->value = NULL;
         freeResult(result);
-        assCore(var, *condition_value, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        assCore(var, *condition_value, false, false, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&(*condition_value)->gc_status);
 
         if (!CHECK_RESULT(result))
@@ -74,21 +74,21 @@ static bool runBranchHeard(Statement *condition, Statement *var, LinkValue **con
     return true;
 }
 
-static int checkCondition(bool is_rego, LinkValue *condition_value, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+static int checkCondition(bool is_rego, LinkValue *condition_value, fline line, char *file, FUNC_NT) {
     bool return_;
     if (is_rego)
         return 1;
 
-    return_ = checkBool(condition_value, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    return_ = checkBool(condition_value, line, file, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return -1;
     return return_;
 }
 
-static bool runFinally(bool set_result, bool (*run)(INTER_FUNCTIONSIG), INTER_FUNCTIONSIG) {
+static bool runFinally(bool set_result, bool (*run)(FUNC), FUNC) {
     Result finally_tmp;
     setResultCore(&finally_tmp);
-    if (run(CALL_INTER_FUNCTIONSIG(st, var_list, &finally_tmp, belong))) {
+    if (run(CFUNC(st, var_list, &finally_tmp, belong))) {
         if (!set_result)
             freeResult(result);
         *result = finally_tmp;
@@ -98,32 +98,32 @@ static bool runFinally(bool set_result, bool (*run)(INTER_FUNCTIONSIG), INTER_FU
     return true;
 }
 
-static int runIfList(StatementList *if_list, Statement *info_vl, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+static int runIfList(StatementList *if_list, Statement *info_vl, fline line, char *file, FUNC_NT) {
     bool is_rego = false;
     setResultCore(result);
 
     for (PASS; if_list != NULL; if_list = if_list->next){
         bool condition;
         if (info_vl != NULL){
-            if (ifBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(info_vl, var_list, result, belong)))
+            if (ifBranchSafeInterStatement(CFUNC(info_vl, var_list, result, belong)))
                 return -1;
             if (result->type == R_rego)
                 is_rego = true;
             info_vl = NULL;
         } else if (if_list->type == if_b){
             LinkValue *condition_value = NULL;
-            if (!runBranchHeard(if_list->condition, if_list->var, &condition_value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+            if (!runBranchHeard(if_list->condition, if_list->var, &condition_value, CFUNC_NT(var_list, result, belong)))
                 return -1;
 
             freeResult(result);
-            condition = checkCondition(is_rego, condition_value, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            condition = checkCondition(is_rego, condition_value, line, file, CFUNC_NT(var_list, result, belong));
 
             if (condition == -1)
                 return -1;
             else if (condition == 1){
                 is_rego = false;
                 freeResult(result);
-                if (ifBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(if_list->code, var_list, result, belong)))
+                if (ifBranchSafeInterStatement(CFUNC(if_list->code, var_list, result, belong)))
                     return -1;
                 if (result->type == R_rego)
                     is_rego = true;
@@ -133,7 +133,7 @@ static int runIfList(StatementList *if_list, Statement *info_vl, fline line, cha
                 }
             }
         } else{
-            if (ifBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(if_list->code, var_list, result, belong)))
+            if (ifBranchSafeInterStatement(CFUNC(if_list->code, var_list, result, belong)))
                return -1;
             if (result->type == R_rego)
                 is_rego = true;
@@ -143,7 +143,7 @@ static int runIfList(StatementList *if_list, Statement *info_vl, fline line, cha
     return 1;
 }
 
-ResultType ifBranch(INTER_FUNCTIONSIG) {
+ResultType ifBranch(FUNC) {
     StatementList *if_list = NULL;
     Statement *else_st = NULL;
     Statement *finally = NULL;
@@ -170,7 +170,7 @@ ResultType ifBranch(INTER_FUNCTIONSIG) {
             finally = st->info.node;
         else {
             var_list = popVarList(var_list);
-            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CFUNC_NT(var_list, result, belong));
             return R_error;
         }
     } else {
@@ -180,7 +180,7 @@ ResultType ifBranch(INTER_FUNCTIONSIG) {
     }
 
     if (if_list != NULL) {
-        int status = runIfList(if_list, info_vl, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        int status = runIfList(if_list, info_vl, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
         if (status == -1 || status == 0)
             else_st = NULL;
 
@@ -189,25 +189,25 @@ ResultType ifBranch(INTER_FUNCTIONSIG) {
     }
 
     if (else_st != NULL) {
-        if (ifBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(else_st, var_list, result, belong))) {
+        if (ifBranchSafeInterStatement(CFUNC(else_st, var_list, result, belong))) {
             set_result = false;
             result_from = info_else_branch;
         }
         freeResult(result);
     }
 
-    if (finally != NULL && !runFinally(set_result, ifBranchSafeInterStatement, finally, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, ifBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
         set_result = false;
         result_from = info_finally_branch;
     }
 
-    setBranchResult(yield_run, if_list, st, result, result_from, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    setBranchResult(yield_run, if_list, st, result, result_from, CFUNC_CORE(var_list));
     if (set_result)
         setResult(result, inter);
     return result->type;
 }
 
-static int runWhileList(StatementList *while_list, Statement *after, Statement *info_vl, Statement *after_vl, bool do_while, fline line, char *file, enum StatementInfoStatus *from, INTER_FUNCTIONSIG_NOT_ST) {
+static int runWhileList(StatementList *while_list, Statement *after, Statement *info_vl, Statement *after_vl, bool do_while, fline line, char *file, enum StatementInfoStatus *from, FUNC_NT) {
     bool is_break = false;
     setResultCore(result);
 
@@ -227,11 +227,11 @@ static int runWhileList(StatementList *while_list, Statement *after, Statement *
             after_st = after_vl;
             after_vl = NULL;
         } else{
-            if (!runBranchHeard(while_list->condition, while_list->var, &condition_value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+            if (!runBranchHeard(while_list->condition, while_list->var, &condition_value, CFUNC_NT(var_list, result, belong)))
                 return -1;
 
             freeResult(result);
-            condition = checkCondition(do_while, condition_value, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            condition = checkCondition(do_while, condition_value, line, file, CFUNC_NT(var_list, result, belong));
         }
 
         do_while = false;
@@ -239,7 +239,7 @@ static int runWhileList(StatementList *while_list, Statement *after, Statement *
             return -1;
         else if (condition == 1){
             freeResult(result);
-            if (cycleBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(while_st, var_list, result, belong)))
+            if (cycleBranchSafeInterStatement(CFUNC(while_st, var_list, result, belong)))
                 return -1;
             else if (result->type == R_break)
                 is_break = true;
@@ -251,7 +251,7 @@ static int runWhileList(StatementList *while_list, Statement *after, Statement *
         if (after_st != NULL) {
             *from = info_after_do;
             freeResult(result);
-            if (cycleBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(after_st, var_list, result, belong)))
+            if (cycleBranchSafeInterStatement(CFUNC(after_st, var_list, result, belong)))
                 return -1;
             else if (result->type == R_break) {
                 freeResult(result);
@@ -263,7 +263,7 @@ static int runWhileList(StatementList *while_list, Statement *after, Statement *
     return is_break ? 0 : 1;
 }
 
-ResultType whileBranch(INTER_FUNCTIONSIG) {
+ResultType whileBranch(FUNC) {
     StatementList *while_list = st->u.while_branch.while_list;
     Statement *first = st->u.while_branch.first;
     Statement *after = st->u.while_branch.after;
@@ -303,13 +303,13 @@ ResultType whileBranch(INTER_FUNCTIONSIG) {
             finally = st->info.node;
         } else {
             var_list = popVarList(var_list);
-            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CFUNC_NT(var_list, result, belong));
             return R_error;
         }
     }
 
     if (first != NULL) {
-        if (cycleBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(first, var_list, result, belong))) {
+        if (cycleBranchSafeInterStatement(CFUNC(first, var_list, result, belong))) {
             set_result = false;
             while_list = NULL;
             else_st = NULL;
@@ -318,7 +318,7 @@ ResultType whileBranch(INTER_FUNCTIONSIG) {
     }
 
     if (while_list != NULL){
-        int status = runWhileList(while_list, after, info_vl, after_vl, do_while, st->line, st->code_file, &result_from, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        int status = runWhileList(while_list, after, info_vl, after_vl, do_while, st->line, st->code_file, &result_from, CFUNC_NT(var_list, result, belong));
         if (status == -1 || status == 0)
             else_st = NULL;
 
@@ -327,29 +327,29 @@ ResultType whileBranch(INTER_FUNCTIONSIG) {
     }
 
     if (else_st != NULL) {
-        if (cycleBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(else_st, var_list, result, belong))) {
+        if (cycleBranchSafeInterStatement(CFUNC(else_st, var_list, result, belong))) {
             result_from = info_else_branch;
             set_result = false;
         } else
             freeResult(result);
     }
 
-    if (finally != NULL && !runFinally(set_result, cycleBranchSafeInterStatement, finally, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, cycleBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
         set_result = false;
         result_from = info_finally_branch;
     }
 
-    setBranchResult(yield_run, while_list, st, result, result_from, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    setBranchResult(yield_run, while_list, st, result, result_from, CFUNC_CORE(var_list));
     if (set_result)
         setResult(result, inter);
     return result->type;
 }
 
-static int getForHeard(LinkValue **iter, LinkValue **first_yield, StatementList *for_list, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+static int getForHeard(LinkValue **iter, LinkValue **first_yield, StatementList *for_list, fline line, char *file, FUNC_NT) {
     LinkValue *tmp = NULL;
     setResultCore(result);
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(for_list->condition, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(for_list->condition, var_list, result, belong)))
         return -1;
     if (result->is_yield){
         iter = NULL;
@@ -362,7 +362,7 @@ static int getForHeard(LinkValue **iter, LinkValue **first_yield, StatementList
     result->value = NULL;
     freeResult(result);
 
-    getIter(tmp, 1, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    getIter(tmp, 1, line, file, CFUNC_NT(var_list, result, belong));
     gc_freeTmpLink(&tmp->gc_status);
     if (!CHECK_RESULT(result))
         return -1;
@@ -371,10 +371,10 @@ static int getForHeard(LinkValue **iter, LinkValue **first_yield, StatementList
     return 0;
 }
 
-static int runForHeard(LinkValue *iter, LinkValue *first_yield, StatementList *for_list, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+static int runForHeard(LinkValue *iter, LinkValue *first_yield, StatementList *for_list, fline line, char *file, FUNC_NT) {
     LinkValue *element = NULL;
     if (iter != NULL) {
-        getIter(iter, 0, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        getIter(iter, 0, line, file, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result)) {
             if (is_iterStop(result->value, inter)) {
                 freeResult(result);
@@ -388,7 +388,7 @@ static int runForHeard(LinkValue *iter, LinkValue *first_yield, StatementList *f
     } else if (first_yield != NULL)
         element = first_yield;
     else {
-        if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(for_list->condition, var_list, result, belong)))
+        if (operationSafeInterStatement(CFUNC(for_list->condition, var_list, result, belong)))
             return -1;
         element = result->value;
         result->value = NULL;
@@ -397,7 +397,7 @@ static int runForHeard(LinkValue *iter, LinkValue *first_yield, StatementList *f
             return 1;
     }
 
-    assCore(for_list->var, element, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    assCore(for_list->var, element, false, false, CFUNC_NT(var_list, result, belong));
     gc_freeTmpLink(&element->gc_status);
     if (!CHECK_RESULT(result))
         return -1;
@@ -405,7 +405,7 @@ static int runForHeard(LinkValue *iter, LinkValue *first_yield, StatementList *f
     return 0;
 }
 
-static int runForList(StatementList *for_list, Statement *after, Statement *info_vl, Statement *after_vl, LinkValue *iter, LinkValue *first_yield, fline line, char *file, enum StatementInfoStatus *from, INTER_FUNCTIONSIG_NOT_ST) {
+static int runForList(StatementList *for_list, Statement *after, Statement *info_vl, Statement *after_vl, LinkValue *iter, LinkValue *first_yield, fline line, char *file, enum StatementInfoStatus *from, FUNC_NT) {
     bool is_break = false;
     while (!is_break){  // 循环执行的本体
         Statement *for_st = for_list->code;
@@ -421,7 +421,7 @@ static int runForList(StatementList *for_list, Statement *after, Statement *info
             after_vl = NULL;
             for_st = NULL;
         } else {
-            int status = runForHeard(iter, first_yield, for_list, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            int status = runForHeard(iter, first_yield, for_list, line, file, CFUNC_NT(var_list, result, belong));
             first_yield = NULL;
             if (status == -1)
                 return -1;
@@ -430,7 +430,7 @@ static int runForList(StatementList *for_list, Statement *after, Statement *info
         }
 
         if (for_st != NULL) {
-            if (cycleBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(for_st, var_list, result, belong)))
+            if (cycleBranchSafeInterStatement(CFUNC(for_st, var_list, result, belong)))
                 return -1;
             else if (result->type == R_break)
                 is_break = true;
@@ -439,7 +439,7 @@ static int runForList(StatementList *for_list, Statement *after, Statement *info
         *from = info_after_do;
         if (after_st != NULL) {
             freeResult(result);
-            if (cycleBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(after_st, var_list, result, belong)))
+            if (cycleBranchSafeInterStatement(CFUNC(after_st, var_list, result, belong)))
                 return -1;
             else if (result->type == R_break)
                 is_break = true;
@@ -449,7 +449,7 @@ static int runForList(StatementList *for_list, Statement *after, Statement *info
     return is_break ? 0 : 1;
 }
 
-static void setForResult(bool yield_run, StatementList *sl, Statement *st, Result *result, LinkValue *iter, enum StatementInfoStatus status, INTER_FUNCTIONSIG_CORE) {
+static void setForResult(bool yield_run, StatementList *sl, Statement *st, Result *result, LinkValue *iter, enum StatementInfoStatus status, FUNC_CORE) {
     if (yield_run) {
         if (result->type == R_yield)
             updateBranchYield(st, result->node, sl, status);
@@ -463,7 +463,7 @@ static void setForResult(bool yield_run, StatementList *sl, Statement *st, Resul
     }
 }
 
-ResultType forBranch(INTER_FUNCTIONSIG) {
+ResultType forBranch(FUNC) {
     StatementList *for_list = st->u.for_branch.for_list;
     Statement *first = st->u.for_branch.first_do;
     Statement *after = st->u.for_branch.after_do;
@@ -507,13 +507,13 @@ ResultType forBranch(INTER_FUNCTIONSIG) {
             finally = st->info.node;
         } else {
             var_list = popVarList(var_list);
-            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CFUNC_NT(var_list, result, belong));
             return R_error;
         }
     }
 
     if (first != NULL) {
-        if (cycleBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(first, var_list, result, belong))) {
+        if (cycleBranchSafeInterStatement(CFUNC(first, var_list, result, belong))) {
             set_result = false;
             heard = false;
             for_list = NULL;
@@ -523,7 +523,7 @@ ResultType forBranch(INTER_FUNCTIONSIG) {
     }
 
     if (heard){
-        int status = getForHeard(&iter, &first_yield, for_list, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        int status = getForHeard(&iter, &first_yield, for_list, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
         if (status == -1) {
             set_result = false;
             for_list = NULL;
@@ -533,7 +533,7 @@ ResultType forBranch(INTER_FUNCTIONSIG) {
     }
 
     if (for_list != NULL){
-        int status = runForList(for_list, after, info_vl, after_vl, iter, first_yield, st->line, st->code_file, &result_from, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        int status = runForList(for_list, after, info_vl, after_vl, iter, first_yield, st->line, st->code_file, &result_from, CFUNC_NT(var_list, result, belong));
         if (status == -1 || status == 0)
             else_st = NULL;
 
@@ -542,7 +542,7 @@ ResultType forBranch(INTER_FUNCTIONSIG) {
     }
 
     if (else_st != NULL) {
-        if (cycleBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(else_st, var_list, result, belong))) {
+        if (cycleBranchSafeInterStatement(CFUNC(else_st, var_list, result, belong))) {
             result_from = info_else_branch;
             set_result = false;
         }
@@ -550,12 +550,12 @@ ResultType forBranch(INTER_FUNCTIONSIG) {
             freeResult(result);
     }
 
-    if (finally != NULL && !runFinally(set_result, cycleBranchSafeInterStatement, finally, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, cycleBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
         set_result = false;
         result_from = info_finally_branch;
     }
 
-    setForResult(yield_run, for_list, st, result, iter, result_from, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    setForResult(yield_run, for_list, st, result, iter, result_from, CFUNC_CORE(var_list));
     if (!yield_run && iter != NULL)
         gc_freeTmpLink(&iter->gc_status);
 
@@ -564,15 +564,15 @@ ResultType forBranch(INTER_FUNCTIONSIG) {
     return result->type;
 }
 
-static bool getEnterExit(LinkValue *value, LinkValue **_enter_, LinkValue **_exit_, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+static bool getEnterExit(LinkValue *value, LinkValue **_enter_, LinkValue **_exit_, fline line, char *file, FUNC_NT) {
     setResultCore(result);
 
-    *_enter_ = findAttributes(inter->data.object_enter, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, value));
+    *_enter_ = findAttributes(inter->data.object_enter, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
     if (!CHECK_RESULT(result))
         return false;
     freeResult(result);
 
-    *_exit_ = findAttributes(inter->data.object_exit, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, value));
+    *_exit_ = findAttributes(inter->data.object_exit, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
     if (!CHECK_RESULT(result))
         return false;
     freeResult(result);
@@ -580,7 +580,7 @@ static bool getEnterExit(LinkValue *value, LinkValue **_enter_, LinkValue **_exi
     if (*_enter_ == NULL || *_exit_ == NULL) {
         *_enter_ = NULL;
         *_exit_ = NULL;
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(__enter__/__exit__), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(__enter__/__exit__), line, file, true, CFUNC_NT(var_list, result, belong));
         return false;
     }
     gc_addTmpLink(&(*_enter_)->gc_status);
@@ -588,8 +588,8 @@ static bool getEnterExit(LinkValue *value, LinkValue **_enter_, LinkValue **_exi
     return true;
 }
 
-static int runWithList(StatementList *with_list, LinkValue **with_belong, LinkValue **value, VarList **new, LinkValue **_enter_, LinkValue **_exit_, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(with_list->condition, var_list, result, belong)))
+static int runWithList(StatementList *with_list, LinkValue **with_belong, LinkValue **value, VarList **new, LinkValue **_enter_, LinkValue **_exit_, fline line, char *file, FUNC_NT) {
+    if (operationSafeInterStatement(CFUNC(with_list->condition, var_list, result, belong)))
         return -1;
 
     *value = result->value;
@@ -609,17 +609,17 @@ static int runWithList(StatementList *with_list, LinkValue **with_belong, LinkVa
         *with_belong = belong;
         gc_addTmpLink(&(*with_belong)->gc_status);
 
-        *_enter_ = findAttributes(inter->data.object_enter, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, *value));
+        *_enter_ = findAttributes(inter->data.object_enter, false, 0, "sys", true, CFUNC_NT(var_list, result, *value));
         if (!CHECK_RESULT(result))
             goto error_;
         freeResult(result);
 
-        *_exit_ = findAttributes(inter->data.object_exit, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, *value));
+        *_exit_ = findAttributes(inter->data.object_exit, false, 0, "sys", true, CFUNC_NT(var_list, result, *value));
         if (!CHECK_RESULT(result))
             goto error_;
         freeResult(result);
 
-        if (!getEnterExit(*value, _enter_, _exit_, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+        if (!getEnterExit(*value, _enter_, _exit_, line, file, CFUNC_NT(var_list, result, belong))) {
             error_:
             gc_freeTmpLink(&(*value)->gc_status);
             gc_freeTmpLink(&(*with_belong)->gc_status);
@@ -627,14 +627,14 @@ static int runWithList(StatementList *with_list, LinkValue **with_belong, LinkVa
             return -1;
         }
 
-        callBackCore(*_enter_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, *value));
+        callBackCore(*_enter_, NULL, line, file, 0, CFUNC_NT(var_list, result, *value));
         if (!CHECK_RESULT(result))
             return 0;
 
         *new = pushVarList(var_list, inter);
         enter_value = result->value;
         freeResult(result);
-        assCore(with_list->var, enter_value, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(*new, result, belong));
+        assCore(with_list->var, enter_value, false, false, CFUNC_NT(*new, result, belong));
         if (!CHECK_RESULT(result)) {
             *new = popVarList(*new);
             return 0;
@@ -644,7 +644,7 @@ static int runWithList(StatementList *with_list, LinkValue **with_belong, LinkVa
     return 1;
 }
 
-static void setWithResult(bool yield_run, StatementList *sl, Statement *st, Result *result, LinkValue *value, LinkValue *_enter_, LinkValue *_exit_, LinkValue *with, enum StatementInfoStatus status, INTER_FUNCTIONSIG_CORE) {
+static void setWithResult(bool yield_run, StatementList *sl, Statement *st, Result *result, LinkValue *value, LinkValue *_enter_, LinkValue *_exit_, LinkValue *with, enum StatementInfoStatus status, FUNC_CORE) {
     if (yield_run) {
         if (result->type == R_yield)
             if (status == info_finally_branch) {
@@ -669,7 +669,7 @@ static void setWithResult(bool yield_run, StatementList *sl, Statement *st, Resu
     }
 }
 
-ResultType withBranch(INTER_FUNCTIONSIG) {
+ResultType withBranch(FUNC) {
     StatementList *with_list = st->u.with_branch.with_list;
     Statement *else_st = st->u.with_branch.else_list;
     Statement *finally = st->u.with_branch.finally;
@@ -711,7 +711,7 @@ ResultType withBranch(INTER_FUNCTIONSIG) {
             finally = st->info.node;
         }
     } else {
-        int status = runWithList(with_list, &with_belong, &value, &new, &_enter_, &_exit_, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        int status = runWithList(with_list, &with_belong, &value, &new, &_enter_, &_exit_, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
         if (status == -1) {
             set_result = false;
             run_block = false;
@@ -731,7 +731,7 @@ ResultType withBranch(INTER_FUNCTIONSIG) {
     if (run_block) {
         if (vl_info == NULL)
             vl_info = with_list->code;
-        if (withBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(vl_info, new, result, with_belong))) {
+        if (withBranchSafeInterStatement(CFUNC(vl_info, new, result, with_belong))) {
             set_result = false;
             if (result->type == R_yield) {
                 run_exit = false;
@@ -744,7 +744,7 @@ ResultType withBranch(INTER_FUNCTIONSIG) {
     if (else_st != NULL){
         Result else_tmp;
         setResultCore(&else_tmp);
-        if (withBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(else_st, new, &else_tmp, with_belong))) {
+        if (withBranchSafeInterStatement(CFUNC(else_st, new, &else_tmp, with_belong))) {
             if (!set_result)
                 freeResult(result);
             set_result = false;
@@ -761,7 +761,7 @@ ResultType withBranch(INTER_FUNCTIONSIG) {
             Result exit_tmp;
             setResultCore(&exit_tmp);
 
-            callBackCore(_exit_, NULL, st->line, st->code_file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &exit_tmp, value));
+            callBackCore(_exit_, NULL, st->line, st->code_file, 0, CFUNC_NT(var_list, &exit_tmp, value));
             if (!RUN_TYPE(exit_tmp.type)) {
                 if (!set_result)
                     freeResult(result);
@@ -786,19 +786,19 @@ ResultType withBranch(INTER_FUNCTIONSIG) {
         }
     }
 
-    if (finally != NULL && !runFinally(set_result, withBranchSafeInterStatement, finally, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, withBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
         set_result = false;
         result_from = info_finally_branch;
     }
 
     gc_freeze(inter, new, var_list, false);
-    setWithResult(yield_run, with_list, st, result, value, _enter_, _exit_, with_belong, result_from, CALL_INTER_FUNCTIONSIG_CORE(new));
+    setWithResult(yield_run, with_list, st, result, value, _enter_, _exit_, with_belong, result_from, CFUNC_CORE(new));
     if (set_result)
         setResult(result, inter);
     return result->type;
 }
 
-static int checkError(StatementList **except_list, LinkValue *error_value, INTER_FUNCTIONSIG_NOT_ST) {
+static int checkError(StatementList **except_list, LinkValue *error_value, FUNC_NT) {
     setResultCore(result);
     if (*except_list == NULL)
         return -1;
@@ -806,7 +806,7 @@ static int checkError(StatementList **except_list, LinkValue *error_value, INTER
         freeResult(result);
         if ((*except_list)->condition == NULL)
             break;
-        if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG((*except_list)->condition, var_list, result, belong)))
+        if (operationSafeInterStatement(CFUNC((*except_list)->condition, var_list, result, belong)))
             return 0;
         if (result->value->value == error_value->value || checkAttribution(error_value->value, result->value->value))
             break;
@@ -814,7 +814,7 @@ static int checkError(StatementList **except_list, LinkValue *error_value, INTER
     return *except_list == NULL ? -1 : 1;
 }
 
-ResultType tryBranch(INTER_FUNCTIONSIG) {
+ResultType tryBranch(FUNC) {
     StatementList *except_list = NULL;
     Statement *try = st->u.try_branch.try;
     Statement *else_st = st->u.try_branch.else_list;
@@ -844,7 +844,7 @@ ResultType tryBranch(INTER_FUNCTIONSIG) {
     }
 
     if (try != NULL){
-        if (tryBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(try, var_list, result, belong))) {
+        if (tryBranchSafeInterStatement(CFUNC(try, var_list, result, belong))) {
             if (result->type == R_yield) {
                 result_from = info_first_do;
                 set_result = false;
@@ -856,7 +856,7 @@ ResultType tryBranch(INTER_FUNCTIONSIG) {
                 freeResult(result);
 
                 except_list = st->u.try_branch.except_list;
-                status = checkError(&except_list, error_value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                status = checkError(&except_list, error_value, CFUNC_NT(var_list, result, belong));
                 if (status == -1 || status == 0) {
                     set_result = false;
                     result_from = info_vl_branch;
@@ -873,7 +873,7 @@ ResultType tryBranch(INTER_FUNCTIONSIG) {
     if (except_list != NULL) {
         if (except_list->var != NULL) {
             gc_addTmpLink(&error_value->gc_status);
-            assCore(except_list->var, error_value, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            assCore(except_list->var, error_value, false, false, CFUNC_NT(var_list, result, belong));
             gc_freeTmpLink(&error_value->gc_status);
 
             if (!CHECK_RESULT(result)) {
@@ -887,7 +887,7 @@ ResultType tryBranch(INTER_FUNCTIONSIG) {
 
     if (info_vl != NULL) {
         freeResult(result);
-        if (tryBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(info_vl, var_list, result, belong))) {
+        if (tryBranchSafeInterStatement(CFUNC(info_vl, var_list, result, belong))) {
             result_from = info_vl_branch;
             set_result = false;
         } else
@@ -895,7 +895,7 @@ ResultType tryBranch(INTER_FUNCTIONSIG) {
     }
 
     if (else_st != NULL) {
-        if (tryBranchSafeInterStatement(CALL_INTER_FUNCTIONSIG(else_st, var_list, result, belong))) {
+        if (tryBranchSafeInterStatement(CFUNC(else_st, var_list, result, belong))) {
             set_result = false;
             result_from = info_else_branch;
         }
@@ -903,28 +903,28 @@ ResultType tryBranch(INTER_FUNCTIONSIG) {
             freeResult(result);
     }
 
-    if (finally != NULL && !runFinally(set_result, ifBranchSafeInterStatement, finally, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, ifBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
         set_result = false;
         result_from = info_finally_branch;
     }
 
-    setBranchResult(yield_run, except_list, st, result, result_from, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    setBranchResult(yield_run, except_list, st, result, result_from, CFUNC_CORE(var_list));
 
     if (set_result)
         setResult(result, inter);
     return result->type;
 }
 
-ResultType breakCycle(INTER_FUNCTIONSIG){
+ResultType breakCycle(FUNC){
     int times_int = 0;
     setResultCore(result);
     if (st->u.break_cycle.times == NULL)
         goto not_times;
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.break_cycle.times, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.break_cycle.times, var_list, result, belong)))
         return result->type;
 
-    if (!checkNumber(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))
+    if (!checkNumber(CFUNC(st, var_list, result, belong)))
         return result->type;
     times_int = (int)result->value->value->data.num.num;
     freeResult(result);
@@ -938,15 +938,15 @@ ResultType breakCycle(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType continueCycle(INTER_FUNCTIONSIG){
+ResultType continueCycle(FUNC){
     int times_int = 0;
     setResultCore(result);
     if (st->u.continue_cycle.times == NULL)
         goto not_times;
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.continue_cycle.times, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.continue_cycle.times, var_list, result, belong)))
         return result->type;
 
-    if (!checkNumber(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))
+    if (!checkNumber(CFUNC(st, var_list, result, belong)))
         return result->type;
     times_int = (int)result->value->value->data.num.num;
     freeResult(result);
@@ -960,15 +960,15 @@ ResultType continueCycle(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType regoIf(INTER_FUNCTIONSIG){
+ResultType regoIf(FUNC){
     int times_int = 0;
     setResultCore(result);
     if (st->u.rego_if.times == NULL)
         goto not_times;
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.rego_if.times, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.rego_if.times, var_list, result, belong)))
         return result->type;
 
-    if (!checkNumber(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))
+    if (!checkNumber(CFUNC(st, var_list, result, belong)))
         return result->type;
     times_int = (int)result->value->value->data.num.num;
     freeResult(result);
@@ -982,15 +982,15 @@ ResultType regoIf(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType restartCode(INTER_FUNCTIONSIG){
+ResultType restartCode(FUNC){
     int times_int = 0;
     setResultCore(result);
     if (st->u.restart.times == NULL)
         goto not_times;
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.restart.times, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.restart.times, var_list, result, belong)))
         return result->type;
 
-    if (!checkNumber(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))
+    if (!checkNumber(CFUNC(st, var_list, result, belong)))
         return result->type;
     times_int = (int)result->value->value->data.num.num;
     freeResult(result);
@@ -1004,14 +1004,14 @@ ResultType restartCode(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType returnCode(INTER_FUNCTIONSIG){
+ResultType returnCode(FUNC){
     setResultCore(result);
     if (st->u.return_code.value == NULL) {
         setResult(result, inter);
         goto set_result;
     }
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.return_code.value, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.return_code.value, var_list, result, belong)))
         return result->type;
 
     set_result:
@@ -1019,14 +1019,14 @@ ResultType returnCode(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType yieldCode(INTER_FUNCTIONSIG){
+ResultType yieldCode(FUNC){
     setResultCore(result);
     if (st->u.yield_code.value == NULL) {
         setResult(result, inter);
         goto set_result;
     }
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.yield_code.value, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.yield_code.value, var_list, result, belong)))
         return result->type;
 
     set_result:
@@ -1034,14 +1034,14 @@ ResultType yieldCode(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType raiseCode(INTER_FUNCTIONSIG){
+ResultType raiseCode(FUNC){
     setResultCore(result);
     if (st->u.raise_code.value == NULL) {
         setResult(result, inter);
         goto set_result;
     }
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.raise_code.value, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.raise_code.value, var_list, result, belong)))
         return result->type;
 
     set_result:
@@ -1050,31 +1050,31 @@ ResultType raiseCode(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType assertCode(INTER_FUNCTIONSIG){
+ResultType assertCode(FUNC){
     bool result_;
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.raise_code.value, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.raise_code.value, var_list, result, belong)))
         return result->type;
 
-    result_ = checkBool(result->value, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    result_ = checkBool(result->value, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     else if (result_)
         setResult(result, inter);
     else
-        setResultErrorSt(E_AssertException, L"Assertion check error", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_AssertException, L"Assertion check error", true, st, CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType gotoLabel(INTER_FUNCTIONSIG){
+ResultType gotoLabel(FUNC){
     int times_int = 0;
     wchar_t *label = NULL;
     setResultCore(result);
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.goto_.label, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.goto_.label, var_list, result, belong)))
         return result->type;
     if (!isType(result->value->value, V_str)) {
-        setResultErrorSt(E_TypeException, ONLY_ACC(label name, V_str), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, ONLY_ACC(label name, V_str), true, st, CFUNC_NT(var_list, result, belong));
         return result->type;
     }
     label = memWidecpy(result->value->value->data.str.str);
@@ -1082,11 +1082,11 @@ ResultType gotoLabel(INTER_FUNCTIONSIG){
     freeResult(result);
     if (st->u.goto_.times == NULL)
         goto not_times;
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.goto_.times, var_list, result, belong))) {
+    if (operationSafeInterStatement(CFUNC(st->u.goto_.times, var_list, result, belong))) {
         memFree(label);
         return result->type;
     }
-    if (!checkNumber(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong))) {
+    if (!checkNumber(CFUNC(st, var_list, result, belong))) {
         memFree(label);
         return result->type;
     }
@@ -1095,7 +1095,7 @@ ResultType gotoLabel(INTER_FUNCTIONSIG){
     not_times:
     if (st->u.goto_.return_ == NULL)
         setResult(result, inter);
-    else if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.goto_.return_, var_list, result, belong))) {
+    else if (operationSafeInterStatement(CFUNC(st->u.goto_.return_, var_list, result, belong))) {
         memFree(label);
         return result->type;
     }
@@ -1106,13 +1106,13 @@ ResultType gotoLabel(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-ResultType runLabel(INTER_FUNCTIONSIG) {
+ResultType runLabel(FUNC) {
     LinkValue *goto_value = result->value;  // goto的值通过result传入, 因此不能进行setResultCore
     result->value = NULL;
     freeResult(result);
 
     if (st->u.label_.as != NULL)
-        assCore(st->u.label_.as, goto_value, false, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        assCore(st->u.label_.as, goto_value, false, false, CFUNC_NT(var_list, result, belong));
 
     gc_freeTmpLink(&goto_value->gc_status);
     if (st->u.label_.as != NULL && !CHECK_RESULT(result))
@@ -1120,7 +1120,7 @@ ResultType runLabel(INTER_FUNCTIONSIG) {
 
     freeResult(result);
     if (st->u.label_.command != NULL)
-        operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.label_.command, var_list, result, belong));
+        operationSafeInterStatement(CFUNC(st->u.label_.command, var_list, result, belong));
     else
         setResult(result, inter);
 

+ 50 - 50
VirtulMathCore/src/runcall.c

@@ -1,12 +1,12 @@
 #include "__run.h"
 
-ResultType setClass(INTER_FUNCTIONSIG) {
+ResultType setClass(FUNC) {
     Argument *call = NULL;
     LinkValue *tmp = NULL;
     Inherit *class_inherit = NULL;
     setResultCore(result);
 
-    call = getArgument(st->u.set_class.father, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    call = getArgument(st->u.set_class.father, false, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto error_;
 
@@ -24,7 +24,7 @@ ResultType setClass(INTER_FUNCTIONSIG) {
         tmp->value->object.var->next = var_list;
 
         gc_freeze(inter, var_backup, NULL, true);
-        functionSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.set_class.st, tmp->value->object.var, result, tmp));
+        functionSafeInterStatement(CFUNC(st->u.set_class.st, tmp->value->object.var, result, tmp));
         gc_freeze(inter, var_backup, NULL, false);
 
         tmp->value->object.var->next = var_backup;
@@ -35,7 +35,7 @@ ResultType setClass(INTER_FUNCTIONSIG) {
         freeResult(result);
     }
     if (st->u.set_class.decoration != NULL){
-        setDecoration(st->u.set_class.decoration, tmp, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setDecoration(st->u.set_class.decoration, tmp, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto error_;
         gc_freeTmpLink(&tmp->gc_status);
@@ -44,7 +44,7 @@ ResultType setClass(INTER_FUNCTIONSIG) {
         freeResult(result);
     }
 
-    assCore(st->u.set_class.name, tmp, false, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    assCore(st->u.set_class.name, tmp, false, true, CFUNC_NT(var_list, result, belong));
     if (CHECK_RESULT(result))
         setResult(result, inter);
 
@@ -53,15 +53,15 @@ ResultType setClass(INTER_FUNCTIONSIG) {
 
     error_:
     gc_freeTmpLink(&tmp->gc_status);
-    setResultErrorSt(E_BaseException, NULL, false, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    setResultErrorSt(E_BaseException, NULL, false, st, CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType setFunction(INTER_FUNCTIONSIG) {
+ResultType setFunction(FUNC) {
     LinkValue *func = NULL;
     setResultCore(result);
 
-    makeVMFunctionValue(st->u.set_function.function, st->u.set_function.parameter, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeVMFunctionValue(st->u.set_function.function, st->u.set_function.parameter, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     func = result->value;
@@ -73,7 +73,7 @@ ResultType setFunction(INTER_FUNCTIONSIG) {
         VarList *var_backup = func->value->object.var->next;
         inter->data.default_pt_type = object_free_;
         func->value->object.var->next = var_list;
-        functionSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.set_function.first_do, func->value->object.var, result, func));
+        functionSafeInterStatement(CFUNC(st->u.set_function.first_do, func->value->object.var, result, func));
         func->value->object.var->next = var_backup;
         inter->data.default_pt_type = pt_type_bak;
         if (result->type != R_yield && !CHECK_RESULT(result))
@@ -82,7 +82,7 @@ ResultType setFunction(INTER_FUNCTIONSIG) {
     }
 
     if (st->u.set_function.decoration != NULL){
-        setDecoration(st->u.set_function.decoration, func, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setDecoration(st->u.set_function.decoration, func, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto error_;
         gc_freeTmpLink(&func->gc_status);
@@ -90,7 +90,7 @@ ResultType setFunction(INTER_FUNCTIONSIG) {
         result->value = NULL;
         freeResult(result);
     }
-    assCore(st->u.set_function.name, func, false, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    assCore(st->u.set_function.name, func, false, true, CFUNC_NT(var_list, result, belong));
     if (CHECK_RESULT(result))
         setResult(result, inter);
 
@@ -99,68 +99,68 @@ ResultType setFunction(INTER_FUNCTIONSIG) {
     return result->type;
 }
 
-ResultType setLambda(INTER_FUNCTIONSIG) {
+ResultType setLambda(FUNC) {
     Statement *resunt_st = NULL;
     setResultCore(result);
 
     resunt_st = makeReturnStatement(st->u.base_lambda.function, st->line, st->code_file);
-    makeVMFunctionValue(resunt_st, st->u.base_lambda.parameter, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeVMFunctionValue(resunt_st, st->u.base_lambda.parameter, CFUNC_NT(var_list, result, belong));
     resunt_st->u.return_code.value = NULL;
     freeStatement(resunt_st);
     return result->type;
 }
 
-ResultType elementSlice(INTER_FUNCTIONSIG) {
+ResultType elementSlice(FUNC) {
     LinkValue *element = NULL;
     LinkValue *_func_ = NULL;
     wchar_t *func_name = NULL;
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.slice_.element, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.slice_.element, var_list, result, belong)))
         return result->type;
     element = result->value;
     result->value = NULL;
     freeResult(result);
 
     func_name = st->u.slice_.type == SliceType_down_ ? inter->data.object_down : inter->data.object_slice;
-    _func_ = findAttributes(func_name, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, element));
+    _func_ = findAttributes(func_name, false, 0, "sys", true, CFUNC_NT(var_list, result, element));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
 
     if (_func_ != NULL){
         gc_addTmpLink(&_func_->gc_status);
-        callBackCorePt(_func_, st->u.slice_.index, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCorePt(_func_, st->u.slice_.index, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&_func_->gc_status);
     }
     else
-        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(__down__/__slice__), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(__down__/__slice__), true, st, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&element->gc_status);
     return result->type;
 }
 
-ResultType callBack(INTER_FUNCTIONSIG) {
+ResultType callBack(FUNC) {
     LinkValue *function_value = NULL;
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.call_function.function, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.call_function.function, var_list, result, belong)))
         return result->type;
     function_value = result->value;
     result->value = NULL;
     freeResult(result);
-    callBackCorePt(function_value, st->u.call_function.parameter, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCorePt(function_value, st->u.call_function.parameter, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
     gc_freeTmpLink(&function_value->gc_status);
     return result->type;
 }
 
-ResultType callBackCorePt(LinkValue *function_value, Parameter *pt, long line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType callBackCorePt(LinkValue *function_value, Parameter *pt, long line, char *file, FUNC_NT) {
     Argument *arg = NULL;
     int pt_sep =1;
     bool sep = false;
     setResultCore(result);
     gc_addTmpLink(&function_value->gc_status);
 
-    arg = getArgument(pt, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    arg = getArgument(pt, false, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto return_;
     for (Parameter *tmp = pt; tmp != NULL; tmp = tmp->next, pt_sep++) {
@@ -171,7 +171,7 @@ ResultType callBackCorePt(LinkValue *function_value, Parameter *pt, long line, c
     }
 
     freeResult(result);
-    callBackCore(function_value, arg, line, file, sep ? pt_sep : 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(function_value, arg, line, file, sep ? pt_sep : 0, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&function_value->gc_status);
@@ -179,60 +179,60 @@ ResultType callBackCorePt(LinkValue *function_value, Parameter *pt, long line, c
     return result->type;
 }
 
-static ResultType callClass(LinkValue *class_value, Argument *arg, fline line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST) {
+static ResultType callClass(LinkValue *class_value, Argument *arg, fline line, char *file, int pt_sep, FUNC_NT) {
     LinkValue *_new_;
     setResultCore(result);
     gc_addTmpLink(&class_value->gc_status);
 
-    _new_ = findAttributes(inter->data.object_new, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, class_value));
+    _new_ = findAttributes(inter->data.object_new, false, 0, "sys", true, CFUNC_NT(var_list, result, class_value));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
 
     if (_new_ != NULL){
         gc_addTmpLink(&_new_->gc_status);
-        callBackCore(_new_, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_new_, arg, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&_new_->gc_status);
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(new(__new__)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(new(__new__)), line, file, true, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&class_value->gc_status);
     return result->type;
 }
 
-static ResultType callObject(LinkValue *object_value, Argument *arg, fline line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST) {
+static ResultType callObject(LinkValue *object_value, Argument *arg, fline line, char *file, int pt_sep, FUNC_NT) {
     LinkValue *_call_;
     setResultCore(result);
     gc_addTmpLink(&object_value->gc_status);
 
-    _call_ = findAttributes(inter->data.object_call, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, object_value));
+    _call_ = findAttributes(inter->data.object_call, false, 0, "sys", true, CFUNC_NT(var_list, result, object_value));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
 
     if (_call_ != NULL){
         gc_addTmpLink(&_call_->gc_status);
-        callBackCore(_call_, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_call_, arg, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&_call_->gc_status);
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(call(__call__)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(call(__call__)), line, file, true, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&object_value->gc_status);
     return result->type;
 }
 
-static ResultType callCFunction(LinkValue *function_value, Argument *arg, long int line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST){
+static ResultType callCFunction(LinkValue *function_value, Argument *arg, long int line, char *file, int pt_sep, FUNC_NT){
     VarList *function_var = NULL;
     OfficialFunction of = NULL;
     Argument *bak;
     setResultCore(result);
     gc_addTmpLink(&function_value->gc_status);
 
-    setFunctionArgument(&arg, &bak, function_value, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    setFunctionArgument(&arg, &bak, function_value, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto return_;
 
@@ -241,7 +241,7 @@ static ResultType callCFunction(LinkValue *function_value, Argument *arg, long i
     gc_freeze(inter, var_list, function_var, true);
 
     freeResult(result);
-    of(CALL_OFFICAL_FUNCTION(arg, function_var, result, function_value->belong));
+    of(CO_FUNC(arg, function_var, result, function_value->belong));
     if (result->type == R_func)
         result->type = R_opt;
     else if (result->type != R_opt && result->type != R_error)
@@ -268,7 +268,7 @@ static void newFunctionYield(Statement *func_st, Statement *node, VarList *new_v
     func_st->info.have_info = true;
 }
 
-static void setFunctionResult(LinkValue *func_value, bool yield_run, Result *result, INTER_FUNCTIONSIG_CORE) {
+static void setFunctionResult(LinkValue *func_value, bool yield_run, Result *result, FUNC_CORE) {
     Statement *st_func = func_value->value->data.function.function;
     if (yield_run) {
         if (result->type == R_yield) {
@@ -287,7 +287,7 @@ static void setFunctionResult(LinkValue *func_value, bool yield_run, Result *res
     }
 }
 
-static ResultType callVMFunction(LinkValue *func_value, Argument *arg, long int line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST) {
+static ResultType callVMFunction(LinkValue *func_value, Argument *arg, long int line, char *file, int pt_sep, FUNC_NT) {
     Argument *bak;
     VarList *var_func = NULL;
     Statement *st_func = NULL;
@@ -314,13 +314,13 @@ static ResultType callVMFunction(LinkValue *func_value, Argument *arg, long int
         st_func = st_func->info.node;
 
     gc_freeze(inter, var_list, var_func, true);
-    setFunctionArgument(&arg, &bak, func_value, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    setFunctionArgument(&arg, &bak, func_value, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
 
     gc_addTmpLink(&var_func->hashtable->gc_status);
-    setParameterCore(line, file, arg, pt_func, var_func, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, func_value->belong));
+    setParameterCore(line, file, arg, pt_func, var_func, CFUNC_NT(var_list, result, func_value->belong));
     freeFunctionArgument(arg, bak);
     gc_freeTmpLink(&var_func->hashtable->gc_status);
 
@@ -328,47 +328,47 @@ static ResultType callVMFunction(LinkValue *func_value, Argument *arg, long int
         goto return_;
 
     freeResult(result);
-    functionSafeInterStatement(CALL_INTER_FUNCTIONSIG(st_func, var_func, result, func_value->belong));
+    functionSafeInterStatement(CFUNC(st_func, var_func, result, func_value->belong));
 
     return_:
     gc_freeze(inter, var_list, var_func, false);
-    setFunctionResult(func_value, yield_run, result, CALL_INTER_FUNCTIONSIG_CORE(var_func));
+    setFunctionResult(func_value, yield_run, result, CFUNC_CORE(var_func));
     gc_freeTmpLink(&func_value->gc_status);
     return result->type;
 }
 
-ResultType callBackCore(LinkValue *function_value, Argument *arg, fline line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType callBackCore(LinkValue *function_value, Argument *arg, fline line, char *file, int pt_sep, FUNC_NT) {
     setResultCore(result);
     gc_addTmpLink(&function_value->gc_status);
     if (function_value->value->type == V_func && function_value->value->data.function.type == vm_func)
-        callVMFunction(function_value, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callVMFunction(function_value, arg, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
     else if (function_value->value->type == V_func && function_value->value->data.function.type == c_func)
-        callCFunction(function_value, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callCFunction(function_value, arg, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
     else if (function_value->value->type == V_class)
-        callClass(function_value, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callClass(function_value, arg, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
     else
-        callObject(function_value, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
-    setResultError(E_BaseException, NULL, line, file, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callObject(function_value, arg, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
+    setResultError(E_BaseException, NULL, line, file, false, CFUNC_NT(var_list, result, belong));
 
     gc_freeTmpLink(&function_value->gc_status);
     return result->type;
 }
 
-ResultType setDecoration(DecorationStatement *ds, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType setDecoration(DecorationStatement *ds, LinkValue *value, FUNC_NT) {
     LinkValue *decall = NULL;
     Parameter *pt = NULL;
     setResultCore(result);
     gc_addTmpLink(&value->gc_status);
     for (PASS; ds != NULL; ds = ds->next){
         freeResult(result);
-        if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(ds->decoration, var_list, result, belong)))
+        if (operationSafeInterStatement(CFUNC(ds->decoration, var_list, result, belong)))
             break;
         pt = makeValueParameter(makeBaseLinkValueStatement(value, ds->decoration->line, ds->decoration->code_file));
         decall = result->value;
         result->value = NULL;
 
         freeResult(result);
-        callBackCorePt(decall, pt, ds->decoration->line, ds->decoration->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCorePt(decall, pt, ds->decoration->line, ds->decoration->code_file, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&decall->gc_status);
         freeParameter(pt, true);
         if (!CHECK_RESULT(result))

+ 38 - 38
VirtulMathCore/src/runfile.c

@@ -1,13 +1,13 @@
 #include "__run.h"
 
-bool importRunParser(ParserMessage *pm, fline line, char *file, Statement *run_st, INTER_FUNCTIONSIG_NOT_ST) {
+bool importRunParser(ParserMessage *pm, fline line, char *file, Statement *run_st, FUNC_NT) {
     setResultCore(result);
     parserCommandList(pm, inter, true, false, run_st);
     if (pm->status == int_error)
-        setResultError(E_KeyInterrupt, KEY_INTERRUPT, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_KeyInterrupt, KEY_INTERRUPT, line, file, true, CFUNC_NT(var_list, result, belong));
     else if (pm->status != success) {
         wchar_t *wcs_message = memStrToWcs(pm->status_message, false);
-        setResultError(E_TypeException, wcs_message, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, wcs_message, line, file, true, CFUNC_NT(var_list, result, belong));
         memFree(wcs_message);
     }
     return CHECK_RESULT(result);
@@ -52,7 +52,7 @@ static bool isExist(char **path, bool is_ab, char *file) {
     return false;
 }
 
-int checkFileDir(char **file_dir, INTER_FUNCTIONSIG) {
+int checkFileDir(char **file_dir, FUNC) {
     switch (isAbsolutePath(*file_dir)) {
         case 1:
             if (isExist(file_dir, true, "__init__.vm"))
@@ -115,40 +115,40 @@ int checkFileDir(char **file_dir, INTER_FUNCTIONSIG) {
         return 2;
 
     error_:
-    setResultErrorSt(E_ImportException, L"import/include file is not readable", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    setResultErrorSt(E_ImportException, L"import/include file is not readable", true, st, CFUNC_NT(var_list, result, belong));
     return 0;
 }
 
-ResultType includeFile(INTER_FUNCTIONSIG) {
+ResultType includeFile(FUNC) {
     Statement *new_st = NULL;
     ParserMessage *pm = NULL;
     char *file_dir = NULL;
     setResultCore(result);
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.include_file.file, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st->u.include_file.file, var_list, result, belong)))
         return result->type;
 
     if (!isType(result->value->value, V_str)){
-        setResultErrorSt(E_TypeException, ONLY_ACC(include file dir, V_str), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, ONLY_ACC(include file dir, V_str), true, st, CFUNC_NT(var_list, result, belong));
         goto return_;
     }
 
     file_dir = memWcsToStr(result->value->value->data.str.str, false);
     freeResult(result);
-    if (checkFileDir(&file_dir, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)) != 1)
+    if (checkFileDir(&file_dir, CFUNC(st, var_list, result, belong)) != 1)
         goto return_;
 
     new_st = makeStatement(0, file_dir);
     pm = makeParserMessage(file_dir);
 
-    if (!importRunParser(pm, st->line, st->code_file, new_st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!importRunParser(pm, st->line, st->code_file, new_st, CFUNC_NT(var_list, result, belong)))
         goto return_;
 
-    functionSafeInterStatement(CALL_INTER_FUNCTIONSIG(new_st, var_list, result, belong));
+    functionSafeInterStatement(CFUNC(new_st, var_list, result, belong));
     if (result->type == R_yield)
         setResult(result, inter);
     else if (!CHECK_RESULT(result))
-        setResultErrorSt(E_BaseException, NULL, false, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_BaseException, NULL, false, st, CFUNC_NT(var_list, result, belong));
 
     return_:
     memFree(file_dir);
@@ -157,7 +157,7 @@ ResultType includeFile(INTER_FUNCTIONSIG) {
     return result->type;
 }
 
-ResultType importVMFileCore(Inter *import_inter, char *path, fline line, char *code_file, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType importVMFileCore(Inter *import_inter, char *path, fline line, char *code_file, FUNC_NT) {
     ParserMessage *pm = NULL;
     Statement *run_st = NULL;
     setResultCore(result);
@@ -165,12 +165,12 @@ ResultType importVMFileCore(Inter *import_inter, char *path, fline line, char *c
     pm = makeParserMessage(path);
     run_st = makeStatement(0, path);
 
-    if (!importRunParser(pm, line, code_file, run_st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    if (!importRunParser(pm, line, code_file, run_st, CFUNC_NT(var_list, result, belong)))
         goto return_;
 
     globalIterStatement(result, import_inter, run_st);
     if (!CHECK_RESULT(result))
-        setResultError(E_BaseException, NULL, line, code_file, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_BaseException, NULL, line, code_file, false, CFUNC_NT(var_list, result, belong));
     else
         setResult(result, inter);
 
@@ -181,38 +181,38 @@ ResultType importVMFileCore(Inter *import_inter, char *path, fline line, char *c
 }
 
 
-ResultType importFileCore(char **path, char **split, int *status, INTER_FUNCTIONSIG) {
+ResultType importFileCore(char **path, char **split, int *status, FUNC) {
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(st, var_list, result, belong)))
         return result->type;
 
     if (!isType(result->value->value, V_str)) {
-        setResultErrorSt(E_ImportException, ONLY_ACC(include file dir, V_str), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_ImportException, ONLY_ACC(include file dir, V_str), true, st, CFUNC_NT(var_list, result, belong));
         return R_error;
     }
 
     *path = memWcsToStr(result->value->value->data.str.str, false);
     *split = splitDir(*path);  // 自动去除末尾路径分隔符
     freeResult(result);
-    if ((*status = checkFileDir(path, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong))) == 0)
+    if ((*status = checkFileDir(path, CFUNC(st, var_list, result, belong))) == 0)
         return result->type;
 
     return result->type;
 }
 
-ResultType runImportFile(Inter *import_inter, char **path, int status, INTER_FUNCTIONSIG) {
+ResultType runImportFile(Inter *import_inter, char **path, int status, FUNC) {
     setResultCore(result);
     if (status == 2)
-        importClibCore(*path, belong, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
+        importClibCore(*path, belong, CFUNC_CORE(inter->var_list));
     else
-        importVMFileCore(import_inter, *path, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        importVMFileCore(import_inter, *path, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
 
     import_inter->var_list = NULL;
     mergeInter(import_inter, inter);
     return result->type;
 }
 
-static bool getPackage(LinkValue **imp_value, char *md5_str, char *split, int status, char **path, int *is_new, bool is_lock, INTER_FUNCTIONSIG) {
+static bool getPackage(LinkValue **imp_value, char *md5_str, char *split, int status, char **path, int *is_new, bool is_lock, FUNC) {
     Value *pg;
     Inter *imp_inter;
     if (is_lock || (pg = checkPackage(inter->package, md5_str, split)) == NULL) {
@@ -225,7 +225,7 @@ static bool getPackage(LinkValue **imp_value, char *md5_str, char *split, int st
         imp_inter->package = inter->package;
 
         freeResult(result);
-        runImportFile(imp_inter, path, status, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+        runImportFile(imp_inter, path, status, CFUNC(st, var_list, result, belong));
         if (!CHECK_RESULT(result))
             return false;
     } else
@@ -235,7 +235,7 @@ static bool getPackage(LinkValue **imp_value, char *md5_str, char *split, int st
     return true;
 }
 
-ResultType importFile(INTER_FUNCTIONSIG) {
+ResultType importFile(FUNC) {
     bool is_new = false;
     bool is_lock = st->u.import_file.is_lock;
     Statement *file = st->u.import_file.file;
@@ -248,21 +248,21 @@ ResultType importFile(INTER_FUNCTIONSIG) {
     setResultCore(result);
     gc_freeze(inter, var_list, NULL, true);
 
-    importFileCore(&path, &split_path, &status, CALL_INTER_FUNCTIONSIG(file, var_list, result, belong));
+    importFileCore(&path, &split_path, &status, CFUNC(file, var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto return_;
 
     getFileMd5(path, md5_str);
-    if (!getPackage(&imp_value, md5_str, split_path, status, &path, &is_new, is_lock, CALL_INTER_FUNCTIONSIG(file, var_list, result, belong)))
+    if (!getPackage(&imp_value, md5_str, split_path, status, &path, &is_new, is_lock, CFUNC(file, var_list, result, belong)))
         goto return_;
     freeResult(result);
     if (st->u.import_file.as == NULL) {
         wchar_t *name_ = memStrToWcs(split_path, false);
-        addStrVar(name_, false, is_new, imp_value, 0, "sys", false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        addStrVar(name_, false, is_new, imp_value, 0, "sys", false, CFUNC_NT(var_list, result, belong));
         memFree(name_);
     }
     else
-        assCore(st->u.import_file.as, imp_value, false, is_new, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        assCore(st->u.import_file.as, imp_value, false, is_new, CFUNC_NT(var_list, result, belong));
 
     if (CHECK_RESULT(result))
         setResult(result, inter);
@@ -275,22 +275,22 @@ ResultType importFile(INTER_FUNCTIONSIG) {
     return result->type;
 }
 
-static ResultType importParameter(fline line, char *file, Parameter *call_pt, Parameter *func_pt, VarList *func_var, LinkValue *func_belong, INTER_FUNCTIONSIG_NOT_ST) {
+static ResultType importParameter(fline line, char *file, Parameter *call_pt, Parameter *func_pt, VarList *func_var, LinkValue *func_belong, FUNC_NT) {
     Argument *call = NULL;
     setResultCore(result);
-    call = getArgument(call_pt, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    call = getArgument(call_pt, false, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result)) {
         freeArgument(call, false);
         return result->type;
     }
 
     freeResult(result);
-    setParameterCore(line, file, call, func_pt, func_var, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, func_belong));
+    setParameterCore(line, file, call, func_pt, func_var, CFUNC_NT(var_list, result, func_belong));
     freeArgument(call, false);
     return result->type;
 }
 
-ResultType fromImportFile(INTER_FUNCTIONSIG) {
+ResultType fromImportFile(FUNC) {
     int status;
     bool is_new;
     bool is_lock = st->u.from_import_file.is_lock;
@@ -305,12 +305,12 @@ ResultType fromImportFile(INTER_FUNCTIONSIG) {
 
     setResultCore(result);
     gc_freeze(inter, var_list, NULL, true);
-    importFileCore(&path, &split_path, &status, CALL_INTER_FUNCTIONSIG(file, var_list, result, belong));
+    importFileCore(&path, &split_path, &status, CFUNC(file, var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto return_;
 
     getFileMd5(path, md5_str);
-    if (!getPackage(&imp_value, md5_str, split_path, status, &path, &is_new, is_lock, CALL_INTER_FUNCTIONSIG(file, var_list, result, belong)))
+    if (!getPackage(&imp_value, md5_str, split_path, status, &path, &is_new, is_lock, CFUNC(file, var_list, result, belong)))
         goto return_;
     imp_var = imp_value->value->object.var;
     if (is_new) {
@@ -319,20 +319,20 @@ ResultType fromImportFile(INTER_FUNCTIONSIG) {
         freeResult(result);
 
         wcs = memStrToWcs(split_path, false);
-        makeStringValue(wcs, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, imp_value));
+        makeStringValue(wcs, st->line, st->code_file, CFUNC_NT(var_list, result, imp_value));
         memFree(wcs);
 
         string = result->value;
         result->value = NULL;
         freeResult(result);
 
-        newObjectSetting(string, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, imp_value));
+        newObjectSetting(string, st->line, st->code_file, CFUNC_NT(var_list, result, imp_value));
         gc_freeTmpLink(&string->gc_status);
     }
 
     freeResult(result);
     if (pt != NULL) {
-        importParameter(st->line, st->code_file, pt, as, var_list, belong, CALL_INTER_FUNCTIONSIG_NOT_ST(imp_var, result, imp_value));
+        importParameter(st->line, st->code_file, pt, as, var_list, belong, CFUNC_NT(imp_var, result, imp_value));
         if (!CHECK_RESULT(result)) {
             gc_freeTmpLink(&imp_value->gc_status);
             goto return_;

+ 108 - 108
VirtulMathCore/src/runoperation.c

@@ -1,10 +1,10 @@
 #include "__run.h"
 
-static bool getLeftRightValue(Result *left, Result *right, INTER_FUNCTIONSIG);
-static ResultType operationCore(INTER_FUNCTIONSIG, wchar_t *name);
-ResultType assOperation(INTER_FUNCTIONSIG);
-ResultType pointOperation(INTER_FUNCTIONSIG);
-ResultType blockOperation(INTER_FUNCTIONSIG);
+static bool getLeftRightValue(Result *left, Result *right, FUNC);
+static ResultType operationCore(FUNC, wchar_t *name);
+ResultType assOperation(FUNC);
+ResultType pointOperation(FUNC);
+ResultType blockOperation(FUNC);
 
 /**
  * operation的整体操作
@@ -13,30 +13,30 @@ ResultType blockOperation(INTER_FUNCTIONSIG);
  * @param var_list
  * @return
  */
-ResultType operationStatement(INTER_FUNCTIONSIG) {
+ResultType operationStatement(FUNC) {
     setResultCore(result);
     switch (st->u.operation.OperationType) {
         case OPT_ADD:
-            operationCore(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong), inter->data.object_add);
+            operationCore(CFUNC(st, var_list, result, belong), inter->data.object_add);
             break;
         case OPT_SUB:
-            operationCore(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong), inter->data.object_sub);
+            operationCore(CFUNC(st, var_list, result, belong), inter->data.object_sub);
             break;
         case OPT_MUL:
-            operationCore(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong), inter->data.object_mul);
+            operationCore(CFUNC(st, var_list, result, belong), inter->data.object_mul);
             break;
         case OPT_DIV:
-            operationCore(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong), inter->data.object_div);
+            operationCore(CFUNC(st, var_list, result, belong), inter->data.object_div);
             break;
         case OPT_ASS:
-            assOperation(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            assOperation(CFUNC(st, var_list, result, belong));
             break;
         case OPT_LINK:
         case OPT_POINT:
-            pointOperation(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            pointOperation(CFUNC(st, var_list, result, belong));
             break;
         case OPT_BLOCK:
-            blockOperation(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+            blockOperation(CFUNC(st, var_list, result, belong));
             break;
         default:
             setResult(result, inter);
@@ -58,7 +58,7 @@ static void newBlockYield(Statement *block_st, Statement *node, VarList *new_var
     block_st->info.have_info = true;
 }
 
-static void setBlockResult(Statement *st, bool yield_run, Result *result, INTER_FUNCTIONSIG_CORE) {
+static void setBlockResult(Statement *st, bool yield_run, Result *result, FUNC_CORE) {
     if (yield_run) {
         if (result->type == R_yield){
             updateBlockYield(st, result->node);
@@ -79,26 +79,26 @@ static void setBlockResult(Statement *st, bool yield_run, Result *result, INTER_
     }
 }
 
-ResultType blockOperation(INTER_FUNCTIONSIG) {
+ResultType blockOperation(FUNC) {
     Statement *info_st = st->u.operation.left;
     bool yield_run;
     if ((yield_run = popYieldVarList(st, &var_list, var_list, inter)))
         info_st = st->info.node;
-    blockSafeInterStatement(CALL_INTER_FUNCTIONSIG(info_st, var_list, result, belong));
+    blockSafeInterStatement(CFUNC(info_st, var_list, result, belong));
     if (result->type == R_error)
         return result->type;
     else
-        setBlockResult(st, yield_run, result, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+        setBlockResult(st, yield_run, result, CFUNC_CORE(var_list));
     if (CHECK_RESULT(result) && st->aut != auto_aut)
         result->value->aut = st->aut;
     return result->type;
 }
 
-ResultType pointOperation(INTER_FUNCTIONSIG) {
+ResultType pointOperation(FUNC) {
     LinkValue *left;
     VarList *object = NULL;
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.left, var_list, result, belong)) || result->value->value->type == V_none)
+    if (operationSafeInterStatement(CFUNC(st->u.operation.left, var_list, result, belong)) || result->value->value->type == V_none)
         return result->type;
     left = result->value;
     result->value = NULL;
@@ -111,12 +111,12 @@ ResultType pointOperation(INTER_FUNCTIONSIG) {
 
     if (object == NULL) {
         setResultError(E_TypeException, OBJ_NOTSUPPORT(->/.), st->line, st->code_file, true,
-                       CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                       CFUNC_NT(var_list, result, belong));
         goto return_;
     }
     gc_freeze(inter, var_list, object, true);
-    operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.right, object, result, left));
-    if (!CHECK_RESULT(result) || !checkAut(left->aut, result->value->aut, st->line, st->code_file, NULL, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+    operationSafeInterStatement(CFUNC(st->u.operation.right, object, result, left));
+    if (!CHECK_RESULT(result) || !checkAut(left->aut, result->value->aut, st->line, st->code_file, NULL, false, CFUNC_NT(var_list, result, belong)))
         PASS;
     else if (result->value->belong == NULL || result->value->belong->value != left->value && checkAttribution(left->value, result->value->belong->value))
         result->value->belong = left;
@@ -127,67 +127,67 @@ ResultType pointOperation(INTER_FUNCTIONSIG) {
     return result->type;
 }
 
-ResultType delOperation(INTER_FUNCTIONSIG) {
+ResultType delOperation(FUNC) {
     Statement *var;
     setResultCore(result);
     var = st->u.del_.var;
-    delCore(var, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    delCore(var, false, CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType delCore(Statement *name, bool check_aut, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType delCore(Statement *name, bool check_aut, FUNC_NT) {
     setResultCore(result);
     if (name->type == base_list && name->u.base_list.type == L_tuple)
-        listDel(name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        listDel(name, CFUNC_NT(var_list, result, belong));
     else if (name->type == slice_)
-        downDel(name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        downDel(name, CFUNC_NT(var_list, result, belong));
     else if (name->type == operation && (name->u.operation.OperationType == OPT_POINT || name->u.operation.OperationType == OPT_LINK))
-        pointDel(name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        pointDel(name, CFUNC_NT(var_list, result, belong));
     else
-        varDel(name, check_aut, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        varDel(name, check_aut, CFUNC_NT(var_list, result, belong));
     return result->type;
 }
 
-ResultType listDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType listDel(Statement *name, FUNC_NT) {
     setResultCore(result);
     for (Parameter *pt = name->u.base_list.list; pt != NULL; pt = pt->next){
-        delCore(pt->data.value, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        delCore(pt->data.value, false, CFUNC_NT(var_list, result, belong));
         freeResult(result);
     }
     setResultBase(result, inter);
     return result->type;
 }
 
-ResultType varDel(Statement *name, bool check_aut, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType varDel(Statement *name, bool check_aut, FUNC_NT) {
     wchar_t *str_name = NULL;
     int int_times = 0;
     setResultCore(result);
-    getVarInfo(&str_name, &int_times, CALL_INTER_FUNCTIONSIG(name, var_list, result, belong));
+    getVarInfo(&str_name, &int_times, CFUNC(name, var_list, result, belong));
     if (!CHECK_RESULT(result)) {
         memFree(str_name);
         return result->type;
     }
     if (check_aut) {
-        LinkValue *tmp = findFromVarList(str_name, int_times, read_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+        LinkValue *tmp = findFromVarList(str_name, int_times, read_var, CFUNC_CORE(var_list));
         freeResult(result);
-        if (tmp != NULL && !checkAut(name->aut, tmp->aut, name->line, name->code_file, NULL, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+        if (tmp != NULL && !checkAut(name->aut, tmp->aut, name->line, name->code_file, NULL, false, CFUNC_NT(var_list, result, belong))) {
             goto return_;
         }
     }
-    findFromVarList(str_name, int_times, del_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    findFromVarList(str_name, int_times, del_var, CFUNC_CORE(var_list));
     setResult(result, inter);
     return_:
     memFree(str_name);
     return result->type;
 }
 
-ResultType pointDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType pointDel(Statement *name, FUNC_NT) {
     Result left;
     VarList *object = NULL;
     Statement *right = name->u.operation.right;
 
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(name->u.operation.left, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(name->u.operation.left, var_list, result, belong)))
         return result->type;
     left = *result;
     setResultCore(result);
@@ -196,15 +196,15 @@ ResultType pointDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST) {
 
     if (object == NULL) {
         setResultError(E_TypeException, OBJ_NOTSUPPORT(->/.), name->line, name->code_file, true,
-                       CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                       CFUNC_NT(var_list, result, belong));
         goto return_;
     }
 
     gc_freeze(inter, var_list, object, true);
     if (right->type == OPERATION && (right->u.operation.OperationType == OPT_POINT || right->u.operation.OperationType == OPT_LINK))
-        pointDel(name->u.operation.right, CALL_INTER_FUNCTIONSIG_NOT_ST(object, result, belong));
+        pointDel(name->u.operation.right, CFUNC_NT(object, result, belong));
     else
-        delCore(name->u.operation.right, true, CALL_INTER_FUNCTIONSIG_NOT_ST(object, result, belong));
+        delCore(name->u.operation.right, true, CFUNC_NT(object, result, belong));
     gc_freeze(inter, var_list, object, false);
 
     return_:
@@ -212,22 +212,22 @@ ResultType pointDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST) {
     return result->type;
 }
 
-ResultType downDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType downDel(Statement *name, FUNC_NT) {
     LinkValue *iter = NULL;
     LinkValue *_func_ = NULL;
     Parameter *pt = name->u.slice_.index;
 
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(name->u.slice_.element, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(name->u.slice_.element, var_list, result, belong)))
         return result->type;
     iter = result->value;
     result->value = NULL;
     freeResult(result);
 
     if (name->u.slice_.type == SliceType_down_)
-        _func_ = findAttributes(inter->data.object_down_del, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, iter));
+        _func_ = findAttributes(inter->data.object_down_del, false, 0, "sys", true, CFUNC_NT(var_list, result, iter));
     else
-        _func_ = findAttributes(inter->data.object_slice_del, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, iter));
+        _func_ = findAttributes(inter->data.object_slice_del, false, 0, "sys", true, CFUNC_NT(var_list, result, iter));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -235,72 +235,72 @@ ResultType downDel(Statement *name, INTER_FUNCTIONSIG_NOT_ST) {
     if (_func_ != NULL){
         Argument *arg = NULL;
         gc_addTmpLink(&_func_->gc_status);
-        arg = getArgument(pt, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        arg = getArgument(pt, false, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto dderror_;
         freeResult(result);
         callBackCore(_func_, arg, name->line, name->code_file, 0,
-                     CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                     CFUNC_NT(var_list, result, belong));
 
         dderror_:
         gc_freeTmpLink(&_func_->gc_status);
         freeArgument(arg, true);
     }
     else
-        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(del(__down_del__/__slice_del__)), true, name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(del(__down_del__/__slice_del__)), true, name, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&iter->gc_status);
     return result->type;
 }
 
-ResultType assOperation(INTER_FUNCTIONSIG) {
+ResultType assOperation(FUNC) {
     LinkValue *value = NULL;
     setResultCore(result);
     if (st->u.operation.left->type == call_function){
         Statement *return_st = makeReturnStatement(st->u.operation.right, st->line, st->code_file);
         LinkValue *func = NULL;
-        makeVMFunctionValue(return_st, st->u.operation.left->u.call_function.parameter, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeVMFunctionValue(return_st, st->u.operation.left->u.call_function.parameter, CFUNC_NT(var_list, result, belong));
         return_st->u.return_code.value = NULL;
         freeStatement(return_st);
 
         func = result->value;
         result->value = NULL;
         freeResult(result);
-        assCore(st->u.operation.left->u.call_function.function, func, false, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        assCore(st->u.operation.left->u.call_function.function, func, false, true, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&func->gc_status);
     }
     else{
-        if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.right, var_list, result, belong)))
+        if (operationSafeInterStatement(CFUNC(st->u.operation.right, var_list, result, belong)))
             return result->type;
         value = result->value;
 
         freeResult(result);
         assCore(st->u.operation.left, value, false, false,
-                CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                CFUNC_NT(var_list, result, belong));
     }
     return result->type;
 }
 
-ResultType assCore(Statement *name, LinkValue *value, bool check_aut, bool setting, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType assCore(Statement *name, LinkValue *value, bool check_aut, bool setting, FUNC_NT) {
     setResultCore(result);
     gc_addTmpLink(&value->gc_status);
 
     if (name->type == base_list && name->u.base_list.type == L_tuple)
-        listAss(name, value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        listAss(name, value, CFUNC_NT(var_list, result, belong));
     else if (name->type == slice_)
-        downAss(name, value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        downAss(name, value, CFUNC_NT(var_list, result, belong));
     else if (name->type == operation && (name->u.operation.OperationType == OPT_POINT || name->u.operation.OperationType == OPT_LINK))
-        pointAss(name, value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        pointAss(name, value, CFUNC_NT(var_list, result, belong));
     else
-        varAss(name, value, check_aut, setting, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        varAss(name, value, check_aut, setting, CFUNC_NT(var_list, result, belong));
 
     gc_freeTmpLink(&value->gc_status);
     return result->type;
 }
 
 
-ResultType varAss(Statement *name, LinkValue *value, bool check_aut, bool setting, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType varAss(Statement *name, LinkValue *value, bool check_aut, bool setting, FUNC_NT) {
     wchar_t *str_name = NULL;
     int int_times = 0;
     LinkValue *name_ = NULL;
@@ -308,7 +308,7 @@ ResultType varAss(Statement *name, LinkValue *value, bool check_aut, bool settin
     bool run = name->type == base_var ? name->u.base_var.run : name->type == base_svar ? name->u.base_svar.run : false;
 
     setResultCore(result);
-    getVarInfo(&str_name, &int_times, CALL_INTER_FUNCTIONSIG(name, var_list, result, belong));
+    getVarInfo(&str_name, &int_times, CFUNC(name, var_list, result, belong));
     if (!CHECK_RESULT(result)) {
         memFree(str_name);
         return result->type;
@@ -320,15 +320,15 @@ ResultType varAss(Statement *name, LinkValue *value, bool check_aut, bool settin
     if (name->aut != auto_aut)
         value->aut = name->aut;
 
-    tmp = findFromVarList(str_name, int_times, read_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    tmp = findFromVarList(str_name, int_times, read_var, CFUNC_CORE(var_list));
     if (check_aut) {
-        if (tmp != NULL && !checkAut(value->aut, tmp->aut, name->line, name->code_file, NULL, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+        if (tmp != NULL && !checkAut(value->aut, tmp->aut, name->line, name->code_file, NULL, false, CFUNC_NT(var_list, result, belong)))
             goto error_;
     } else if (name->aut != auto_aut && tmp != NULL)
         tmp->aut = value->aut;
 
-    if (tmp == NULL || !run || !setVarFunc(tmp, value, name->line, name->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
-        addFromVarList(str_name, name_, int_times, value, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    if (tmp == NULL || !run || !setVarFunc(tmp, value, name->line, name->code_file, CFUNC_NT(var_list, result, belong)))
+        addFromVarList(str_name, name_, int_times, value, CFUNC_CORE(var_list));
     if (CHECK_RESULT(result))
         goto error_;
     if (setting) {
@@ -349,22 +349,22 @@ ResultType varAss(Statement *name, LinkValue *value, bool check_aut, bool settin
     return result->type;
 }
 
-ResultType listAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType listAss(Statement *name, LinkValue *value, FUNC_NT) {
     Parameter *pt = NULL;
     Argument *call = NULL;
     Statement *tmp_st = makeBaseLinkValueStatement(value, name->line, name->code_file);
 
     setResultCore(result);
     pt = makeArgsParameter(tmp_st);
-    call = getArgument(pt, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    call = getArgument(pt, false, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         goto return_;
 
     freeResult(result);
-    setParameterCore(name->line, name->code_file, call, name->u.base_list.list, var_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    setParameterCore(name->line, name->code_file, call, name->u.base_list.list, var_list, CFUNC_NT(var_list, result, belong));
     if (CHECK_RESULT(result)){
         freeResult(result);
-        makeListValue(call, name->line, name->code_file, L_tuple, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeListValue(call, name->line, name->code_file, L_tuple, CFUNC_NT(var_list, result, belong));
     }
     return_:
     freeArgument(call, false);
@@ -372,22 +372,22 @@ ResultType listAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST)
     return result->type;
 }
 
-ResultType downAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType downAss(Statement *name, LinkValue *value, FUNC_NT) {
     LinkValue *iter = NULL;
     LinkValue *_func_ = NULL;
     Parameter *pt = name->u.slice_.index;
 
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(name->u.slice_.element, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(name->u.slice_.element, var_list, result, belong)))
         return result->type;
     iter = result->value;
     result->value = NULL;
     freeResult(result);
 
     if (name->u.slice_.type == SliceType_down_)
-        _func_ = findAttributes(inter->data.object_down_assignment, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, iter));
+        _func_ = findAttributes(inter->data.object_down_assignment, false, 0, "sys", true, CFUNC_NT(var_list, result, iter));
     else
-        _func_ = findAttributes(inter->data.object_slice_assignment, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, iter));
+        _func_ = findAttributes(inter->data.object_slice_assignment, false, 0, "sys", true, CFUNC_NT(var_list, result, iter));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -395,32 +395,32 @@ ResultType downAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST)
     if (_func_ != NULL){
         Argument *arg = makeValueArgument(value);
         gc_addTmpLink(&_func_->gc_status);
-        arg->next = getArgument(pt, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        arg->next = getArgument(pt, false, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto daerror_;
 
         freeResult(result);
-        callBackCore(_func_, arg, name->line, name->code_file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_func_, arg, name->line, name->code_file, 0, CFUNC_NT(var_list, result, belong));
 
         daerror_:
         freeArgument(arg, true);
         gc_freeTmpLink(&_func_->gc_status);
     }
     else
-        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(assignment(__down_assignment__/__slice_assignment__)), true, name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(assignment(__down_assignment__/__slice_assignment__)), true, name, CFUNC_NT(var_list, result, belong));
 
     return_:
     gc_freeTmpLink(&iter->gc_status);
     return result->type;
 }
 
-ResultType pointAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST) {
+ResultType pointAss(Statement *name, LinkValue *value, FUNC_NT) {
     Result left;
     Statement *right = name->u.operation.right;
     VarList *object = NULL;
 
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(name->u.operation.left, var_list, result, belong)))
+    if (operationSafeInterStatement(CFUNC(name->u.operation.left, var_list, result, belong)))
         return result->type;
     left = *result;
     setResultCore(result);
@@ -429,15 +429,15 @@ ResultType pointAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST)
 
     if (object == NULL) {
         setResultError(E_TypeException, OBJ_NOTSUPPORT(->/.), name->line, name->code_file, true,
-                       CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                       CFUNC_NT(var_list, result, belong));
         goto return_;
     }
 
     gc_freeze(inter, var_list, object, true);
     if (right->type == OPERATION && (right->u.operation.OperationType == OPT_POINT || right->u.operation.OperationType == OPT_LINK))
-        pointAss(name->u.operation.right, value, CALL_INTER_FUNCTIONSIG_NOT_ST(object, result, belong));
+        pointAss(name->u.operation.right, value, CFUNC_NT(object, result, belong));
     else
-        assCore(name->u.operation.right, value, true, false, CALL_INTER_FUNCTIONSIG_NOT_ST(object, result, belong));
+        assCore(name->u.operation.right, value, true, false, CFUNC_NT(object, result, belong));
     gc_freeze(inter, var_list, object, false);
 
     return_:
@@ -445,28 +445,28 @@ ResultType pointAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST)
     return result->type;
 }
 
-ResultType getVar(INTER_FUNCTIONSIG, VarInfo var_info) {
+ResultType getVar(FUNC, VarInfo var_info) {
     int int_times = 0;
     wchar_t *name = NULL;
     LinkValue *var;
 
     setResultCore(result);
-    var_info(&name, &int_times, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
+    var_info(&name, &int_times, CFUNC(st, var_list, result, belong));
     if (!CHECK_RESULT(result)) {
         memFree(name);
         return result->type;
     }
 
     freeResult(result);
-    var = findFromVarList(name, int_times, get_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
+    var = findFromVarList(name, int_times, get_var, CFUNC_CORE(var_list));
     if (var == NULL) {
         wchar_t *message = memWidecat(L"Variable not found: ", name, false, false);
-        setResultErrorSt(E_NameExceptiom, message, true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_NameExceptiom, message, true, st, CFUNC_NT(var_list, result, belong));
         memFree(message);
     }
-    else if (checkAut(st->aut, var->aut, st->line, st->code_file, NULL, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    else if (checkAut(st->aut, var->aut, st->line, st->code_file, NULL, true, CFUNC_NT(var_list, result, belong))) {
         bool run = st->type == base_var ? st->u.base_var.run : st->type == base_svar ? st->u.base_svar.run : false;
-        if (!run || !runVarFunc(var, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong)))
+        if (!run || !runVarFunc(var, st->line, st->code_file, CFUNC_NT(var_list, result, belong)))
             setResultOperationBase(result, var);
     }
     memFree(name);
@@ -474,7 +474,7 @@ ResultType getVar(INTER_FUNCTIONSIG, VarInfo var_info) {
     return result->type;
 }
 
-ResultType getBaseValue(INTER_FUNCTIONSIG) {
+ResultType getBaseValue(FUNC) {
     setResultCore(result);
     if (st->u.base_value.type == link_value) {
         result->value = st->u.base_value.value;
@@ -484,57 +484,57 @@ ResultType getBaseValue(INTER_FUNCTIONSIG) {
     else
         switch (st->u.base_value.type) {
             case number_str:
-                makeNumberValue(wcstoll(st->u.base_value.str, NULL, 10), st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                makeNumberValue(wcstoll(st->u.base_value.str, NULL, 10), st->line, st->code_file, CFUNC_NT(var_list, result, belong));
                 break;
             case bool_true:
-                makeBoolValue(true, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                makeBoolValue(true, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
                 break;
             case bool_false:
-                makeBoolValue(false, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                makeBoolValue(false, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
                 break;
             case pass_value:
-                makePassValue(st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                makePassValue(st->line, st->code_file, CFUNC_NT(var_list, result, belong));
                 break;
             case null_value:
                 useNoneValue(inter, result);
                 break;
             default:
-                makeStringValue(st->u.base_value.str, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                makeStringValue(st->u.base_value.str, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
                 break;
         }
     return result->type;
 }
 
-ResultType getList(INTER_FUNCTIONSIG) {
+ResultType getList(FUNC) {
     Argument *at = NULL;
     Argument *at_tmp = NULL;
 
     setResultCore(result);
-    at = getArgument(st->u.base_list.list, false, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    at = getArgument(st->u.base_list.list, false, CFUNC_NT(var_list, result, belong));
     at_tmp = at;
     if (!CHECK_RESULT(result)){
         freeArgument(at_tmp, false);
         return result->type;
     }
     freeResult(result);
-    makeListValue(at, st->line, st->code_file, st->u.base_list.type, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeListValue(at, st->line, st->code_file, st->u.base_list.type, CFUNC_NT(var_list, result, belong));
     freeArgument(at_tmp, false);
 
     return result->type;
 }
 
-ResultType getDict(INTER_FUNCTIONSIG) {
+ResultType getDict(FUNC) {
     Argument *at = NULL;
 
     setResultCore(result);
-    at = getArgument(st->u.base_dict.dict, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    at = getArgument(st->u.base_dict.dict, true, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result)) {
         freeArgument(at, false);
         return result->type;
     }
 
     freeResult(result);
-    Value *tmp_value = makeDictValue(at, true, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    Value *tmp_value = makeDictValue(at, true, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result)) {
         freeArgument(at, false);
         return result->type;
@@ -548,7 +548,7 @@ ResultType getDict(INTER_FUNCTIONSIG) {
     return result->type;
 }
 
-ResultType setDefault(INTER_FUNCTIONSIG){
+ResultType setDefault(FUNC){
     enum DefaultType type = st->u.default_var.default_type;
     int base = 0;  // 用于nonlocal和global
     setResultCore(result);
@@ -561,7 +561,7 @@ ResultType setDefault(INTER_FUNCTIONSIG){
         wchar_t *name = NULL;
         int times = 0;
         freeResult(result);
-        getVarInfo(&name, &times, CALL_INTER_FUNCTIONSIG(pt->data.value, var_list, result, belong));
+        getVarInfo(&name, &times, CFUNC(pt->data.value, var_list, result, belong));
         if (!CHECK_RESULT(result))
             break;
         if (type != default_)
@@ -572,30 +572,30 @@ ResultType setDefault(INTER_FUNCTIONSIG){
     return result->type;
 }
 
-bool getLeftRightValue(Result *left, Result *right, INTER_FUNCTIONSIG){
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.left, var_list, result, belong)) || result->value->value->type == V_none)
+bool getLeftRightValue(Result *left, Result *right, FUNC){
+    if (operationSafeInterStatement(CFUNC(st->u.operation.left, var_list, result, belong)) || result->value->value->type == V_none)
         return true;
     *left = *result;
     setResultCore(result);
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.right, var_list, result, belong)) || result->value->value->type == V_none)
+    if (operationSafeInterStatement(CFUNC(st->u.operation.right, var_list, result, belong)) || result->value->value->type == V_none)
         return true;
     *right = *result;
     setResultCore(result);
     return false;
 }
 
-ResultType operationCore(INTER_FUNCTIONSIG, wchar_t *name) {
+ResultType operationCore(FUNC, wchar_t *name) {
     Result left;
     Result right;
     LinkValue *_func_ = NULL;
     setResultCore(&left);
     setResultCore(&right);
 
-    if (getLeftRightValue(&left, &right, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))  // 不需要释放result
+    if (getLeftRightValue(&left, &right, CFUNC(st, var_list, result, belong)))  // 不需要释放result
         return result->type;
 
-    _func_ = findAttributes(name, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, left.value));
+    _func_ = findAttributes(name, false, 0, "sys", true, CFUNC_NT(var_list, result, left.value));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -603,13 +603,13 @@ ResultType operationCore(INTER_FUNCTIONSIG, wchar_t *name) {
     if (_func_ != NULL){
         Argument *arg = makeValueArgument(right.value);
         gc_addTmpLink(&_func_->gc_status);
-        callBackCore(_func_, arg, st->line, st->code_file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_func_, arg, st->line, st->code_file, 0, CFUNC_NT(var_list, result, belong));
         gc_freeTmpLink(&_func_->gc_status);
         freeArgument(arg, true);
     }
     else {
         wchar_t *message = memWidecat(L"Object not support ", name, false, false);
-        setResultErrorSt(E_TypeException, message, true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultErrorSt(E_TypeException, message, true, st, CFUNC_NT(var_list, result, belong));
         memFree(message);
     }
 

+ 39 - 40
VirtulMathCore/src/value.c

@@ -40,10 +40,10 @@ Value *useNoneValue(Inter *inter, Result *result) {
     return tmp->value;
 }
 
-Value *makeBoolValue(bool bool_num, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+Value *makeBoolValue(bool bool_num, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.bool_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(inter->data.bool_, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -51,20 +51,20 @@ Value *makeBoolValue(bool bool_num, fline line, char *file, INTER_FUNCTIONSIG_NO
     return tmp;
 }
 
-Value *makePassValue(fline line, char *file, INTER_FUNCTIONSIG_NOT_ST){  // TODO-szh 让切片支持该语法 检查语法解析器支持 a[::]的语法
+Value *makePassValue(fline line, char *file, FUNC_NT){  // TODO-szh 让切片支持该语法 检查语法解析器支持 a[::]的语法
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.pass_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(inter->data.pass_, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
     return tmp;
 }
 
-Value *makeNumberValue(vnum num, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+Value *makeNumberValue(vnum num, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.num, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(inter->data.num, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -72,10 +72,10 @@ Value *makeNumberValue(vnum num, fline line, char *file, INTER_FUNCTIONSIG_NOT_S
     return tmp;
 }
 
-Value *makeStringValue(wchar_t *str, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+Value *makeStringValue(wchar_t *str, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.str, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(inter->data.str, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
 
@@ -85,10 +85,10 @@ Value *makeStringValue(wchar_t *str, fline line, char *file, INTER_FUNCTIONSIG_N
     return tmp;
 }
 
-Value *makeVMFunctionValue(Statement *st, Parameter *pt, INTER_FUNCTIONSIG_NOT_ST) {
+Value *makeVMFunctionValue(Statement *st, Parameter *pt, FUNC_NT) {
     Value *tmp = NULL;
     callBackCore(inter->data.function, NULL, st->line, st->code_file, 0,
-                 CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                 CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -104,10 +104,10 @@ Value *makeVMFunctionValue(Statement *st, Parameter *pt, INTER_FUNCTIONSIG_NOT_S
     return tmp;
 }
 
-Value *makeCFunctionValue(OfficialFunction of, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+Value *makeCFunctionValue(OfficialFunction of, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     callBackCore(inter->data.function, NULL, line, file, 0,
-                 CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                 CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -131,13 +131,13 @@ LinkValue *makeCFunctionFromOf(OfficialFunction of, LinkValue *func, OfficialFun
     Result result;
 
     setResultCore(&result);
-    function_new(CALL_OFFICAL_FUNCTION(arg, func->value->object.var, &result, func));
+    function_new(CO_FUNC(arg, func->value->object.var, &result, func));
     return_ = result.value;
     result.value = NULL;
     freeResult(&result);
 
     init_arg = makeValueArgument(return_);
-    function_init(CALL_OFFICAL_FUNCTION(init_arg, func->value->object.var, &result, func));
+    function_init(CO_FUNC(init_arg, func->value->object.var, &result, func));
     freeResult(&result);
     freeArgument(init_arg, true);
     freeArgument(arg, true);
@@ -162,25 +162,25 @@ Value *makeClassValue(VarList *var_list, Inter *inter, Inherit *father) {
     return tmp;
 }
 
-Value *makeListValue(Argument *arg, fline line, char *file, enum ListType type, INTER_FUNCTIONSIG_NOT_ST) {
+Value *makeListValue(Argument *arg, fline line, char *file, enum ListType type, FUNC_NT) {
     Value *tmp = NULL;
     setResultCore(result);
     if (type == L_list)
         callBackCore(inter->data.list, arg, line, file, 0,
-                     CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                     CFUNC_NT(var_list, result, belong));
     else
         callBackCore(inter->data.tuple, arg, line, file, 0,
-                     CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                     CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
     return tmp;
 }
 
-Value *makeDictValue(Argument *arg, bool new_hash, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+Value *makeDictValue(Argument *arg, bool new_hash, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.dict, arg, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    callBackCore(inter->data.dict, arg, line, file, 0, CFUNC_NT(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -289,8 +289,8 @@ void setResultBase(Result *ru, Inter *inter) {
     useNoneValue(inter, ru);
 }
 
-void setResultErrorSt(BaseErrorType type, wchar_t *error_message, bool new, Statement *st, INTER_FUNCTIONSIG_NOT_ST) {
-    setResultError(type, error_message, st->line, st->code_file, new, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+void setResultErrorSt(BaseErrorType type, wchar_t *error_message, bool new, Statement *st, FUNC_NT) {
+    setResultError(type, error_message, st->line, st->code_file, new, CFUNC_NT(var_list, result, belong));
 }
 
 LinkValue *findBaseError(BaseErrorType type, Inter *inter){
@@ -338,13 +338,13 @@ LinkValue *findBaseError(BaseErrorType type, Inter *inter){
     }
 }
 
-static wchar_t *getErrorInfo(LinkValue *exc, int type, INTER_FUNCTIONSIG_NOT_ST){
+static wchar_t *getErrorInfo(LinkValue *exc, int type, FUNC_NT){
     wchar_t *str_name = type == 1 ? inter->data.object_name : inter->data.object_message;
     LinkValue *_info_;
     setResultCore(result);
     gc_addTmpLink(&exc->gc_status);
 
-    _info_ = findAttributes(str_name, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, exc));
+    _info_ = findAttributes(str_name, false, 0, "sys", true, CFUNC_NT(var_list, result, exc));
     gc_freeTmpLink(&exc->gc_status);
     if (!CHECK_RESULT(result))
         return NULL;
@@ -355,14 +355,14 @@ static wchar_t *getErrorInfo(LinkValue *exc, int type, INTER_FUNCTIONSIG_NOT_ST)
         return type == 1 ? memWidecpy(L"Error Type: Unknown") : memWidecpy(L"Error Message: Unknown");
 }
 
-void callException(LinkValue *exc, wchar_t *message, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
+void callException(LinkValue *exc, wchar_t *message, fline line, char *file, FUNC_NT) {
     LinkValue *_new_;
     wchar_t *type = NULL;
     wchar_t *error_message = NULL;
     setResultCore(result);
     gc_addTmpLink(&exc->gc_status);
 
-    _new_ = findAttributes(inter->data.object_new, false, 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, exc));
+    _new_ = findAttributes(inter->data.object_new, false, 0, "sys", true, CFUNC_NT(var_list, result, exc));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -370,25 +370,25 @@ void callException(LinkValue *exc, wchar_t *message, fline line, char *file, INT
     if (_new_ != NULL){
         Argument *arg = NULL;
         LinkValue *error;
-        makeStringValue(message, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeStringValue(message, line, file, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto return_;
         arg =  makeValueArgument(result->value);
         freeResult(result);
 
         gc_addTmpLink(&_new_->gc_status);
-        callBackCore(_new_, arg, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callBackCore(_new_, arg, line, file, 0, CFUNC_NT(var_list, result, belong));
         error = result->value;
         result->value = NULL;
         freeResult(result);
         gc_freeTmpLink(&_new_->gc_status);
         freeArgument(arg, true);
 
-        type = getErrorInfo(error, 1, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        type = getErrorInfo(error, 1, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto return_;
         freeResult(result);
-        error_message = getErrorInfo(error, 2, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        error_message = getErrorInfo(error, 2, CFUNC_NT(var_list, result, belong));
         if (!CHECK_RESULT(result))
             goto return_;
         freeResult(result);
@@ -405,7 +405,7 @@ void callException(LinkValue *exc, wchar_t *message, fline line, char *file, INT
     return_: gc_freeTmpLink(&exc->gc_status);
 }
 
-void setResultError(BaseErrorType type, wchar_t *error_message, fline line, char *file, bool new, INTER_FUNCTIONSIG_NOT_ST) {
+void setResultError(BaseErrorType type, wchar_t *error_message, fline line, char *file, bool new, FUNC_NT) {
     if (!new && result->type != R_error)
         return;
     if (new) {
@@ -413,7 +413,7 @@ void setResultError(BaseErrorType type, wchar_t *error_message, fline line, char
         if (exc == NULL)
             exc = inter->data.base_exc;
         freeResult(result);
-        callException(exc, error_message, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        callException(exc, error_message, line, file, CFUNC_NT(var_list, result, belong));
     }
     else
         result->error = connectError(makeError(NULL, NULL, line, file), result->error);
@@ -440,17 +440,16 @@ void setResultOperationBase(Result *ru, LinkValue *value) {
 void freeResult(Result *ru){
     memFree(ru->label);
     ru->label = NULL;
-    freeResultSafe(ru);
+    if (ru->error != NULL)
+        freeError(ru);
+    ru->error = NULL;
+
     if (ru->value != NULL) {
         gc_freeTmpLink(&ru->value->gc_status);
         ru->value = NULL;
     }
-}
 
-void freeResultSafe(Result *ru){
-    if (ru->error != NULL)
-        freeError(ru);
-    ru->error = NULL;
+    setResultCore(ru);
 }
 
 Error *makeError(wchar_t *type, wchar_t *message, fline line, char *file) {
@@ -595,7 +594,7 @@ Value *checkPackage(Package *base, char *md5, char *name) {
 }
 
 bool needDel(Value *object_value, Inter *inter) {
-    LinkValue *_del_ = checkStrVar(inter->data.object_del, false, CALL_INTER_FUNCTIONSIG_CORE(object_value->object.var));
+    LinkValue *_del_ = checkStrVar(inter->data.object_del, false, CFUNC_CORE(object_value->object.var));
     enum FunctionPtType type;
     if (_del_ == NULL)
         return false;
@@ -608,7 +607,7 @@ bool needDel(Value *object_value, Inter *inter) {
 }
 
 bool callDel(Value *object_value, Result *result, Inter *inter, VarList *var_list) {
-    LinkValue *_del_ = findStrVarOnly(inter->data.object_del, false, CALL_INTER_FUNCTIONSIG_CORE(object_value->object.var));
+    LinkValue *_del_ = findStrVarOnly(inter->data.object_del, false, CFUNC_CORE(object_value->object.var));
     setResultCore(result);
 
     if (_del_ != NULL){
@@ -616,7 +615,7 @@ bool callDel(Value *object_value, Result *result, Inter *inter, VarList *var_lis
         if (_del_->belong == NULL || _del_->belong->value != object_value && checkAttribution(object_value, _del_->belong->value))
             _del_->belong = makeLinkValue(object_value, inter->base_belong, inter);
         callBackCore(_del_, NULL, 0, "sys", 0,
-                     CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, inter->base_belong));
+                     CFUNC_NT(var_list, result, inter->base_belong));
         gc_freeTmpLink(&_del_->gc_status);
         return true;
     } else

+ 2 - 2
VirtulMathCore/src/var.c

@@ -199,7 +199,7 @@ LinkValue *findVar(wchar_t *name, VarOperation operating, Inter *inter, HashTabl
  * @param var_list
  * @return
  */
-LinkValue *findFromVarList(wchar_t *name, vnum times, VarOperation operating, INTER_FUNCTIONSIG_CORE) {
+LinkValue *findFromVarList(wchar_t *name, vnum times, VarOperation operating, FUNC_CORE) {
     LinkValue *tmp = NULL;
     vnum base = findDefault(var_list->default_var, name) + times;
     for (vnum i = 0; i < base && var_list->next != NULL; i++)
@@ -213,7 +213,7 @@ LinkValue *findFromVarList(wchar_t *name, vnum times, VarOperation operating, IN
     return tmp;
 }
 
-void addFromVarList(wchar_t *name, LinkValue *name_, vnum times, LinkValue *value, INTER_FUNCTIONSIG_CORE) {
+void addFromVarList(wchar_t *name, LinkValue *name_, vnum times, LinkValue *value, FUNC_CORE) {
     vnum base = findDefault(var_list->default_var, name) + times;
     for (vnum i = 0; i < base && var_list->next != NULL; i++)
         var_list = var_list->next;