Browse Source

style: 优化宏名, 简短代码

SongZihuan 4 năm trước cách đây
mục cha
commit
ce76a4f37a

+ 4 - 0
VirtulMathCore/include/__macro.h

@@ -17,12 +17,16 @@
 #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 CNEXT CFUNC(st, var_list, result, belong)
+#define CNEXT_NT 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 LINEFILE __LINE__, __FILE__
+
 #define MD5_SIZE (16)
 #define MD5_STR_LEN (MD5_SIZE * 2)
 #define MD5_STRING (MD5_STR_LEN + 1)

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

@@ -2,11 +2,11 @@
 
 LinkValue *registeredFunctionCore(OfficialFunction of, wchar_t *name, FUNC_NT) {
     LinkValue *value = NULL;
-    makeCFunctionValue(of, 0, "sys", CFUNC_NT(var_list, result, belong));
+    makeCFunctionValue(of, LINEFILE, CNEXT_NT);
     value = result->value;
     result->value = NULL;
     freeResult(result);
-    addStrVar(name, false, true, value, 0, "sys", false, CFUNC_NT(var_list, result, belong));
+    addStrVar(name, false, true, value, LINEFILE, false, CNEXT_NT);
     gc_freeTmpLink(&value->gc_status);
     return value;
 }
@@ -14,7 +14,7 @@ LinkValue *registeredFunctionCore(OfficialFunction of, wchar_t *name, FUNC_NT) {
 bool iterNameFunc(NameFunc *list, FUNC_NT){
     setResultCore(result);
     for (PASS; list->of != NULL; list++) {
-        LinkValue *value = registeredFunctionCore(list->of, list->name, CFUNC_NT(var_list, result, belong));
+        LinkValue *value = registeredFunctionCore(list->of, list->name, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return false;
         value->value->data.function.function_data.pt_type = list->type;
@@ -86,10 +86,10 @@ bool checkIndex(vnum *index, const vnum *size, FUNC_NT){
     if (*index < 0)
         *index = *size + *index;
     if (*index >= *size){
-        setResultError(E_IndexException, L"Index too max", 0, "sys", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_IndexException, L"Index too max", LINEFILE, true, CNEXT_NT);
         return false;
     } else if (*index < 0){
-        setResultError(E_IndexException, L"Index is less than 0", 0, "sys", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_IndexException, L"Index is less than 0", LINEFILE, true, CNEXT_NT);
         return false;
     }
     return true;  // true - 保持result为setResultCore的结果
@@ -100,15 +100,15 @@ bool checkSlice(vnum *first, vnum *second, const vnum *stride, vnum size, FUNC_N
     *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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_IndexException, L"Index too max", LINEFILE, true, CNEXT_NT);
         return false;
     } else if (*first < 0 || *second <= 0){
-        setResultError(E_IndexException, L"Index is less than 0", 0, "sys", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_IndexException, L"Index is less than 0", LINEFILE, true, CNEXT_NT);
         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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_StrideException, L"Stride is 0 or Unfinished iteration", LINEFILE, true, CNEXT_NT);
         return false;
     }
     return true;
@@ -117,7 +117,7 @@ bool checkSlice(vnum *first, vnum *second, const vnum *stride, vnum size, FUNC_N
 void addBaseClassVar(wchar_t *name, LinkValue *obj, LinkValue *belong, Inter *inter) {
     Result result;
     setResultCore(&result);
-    addStrVar(name, false, true, obj, 0, "sys", false, CFUNC_NT(inter->var_list, &result, belong));
+    addStrVar(name, false, true, obj, LINEFILE, false, CFUNC_NT(inter->var_list, &result, belong));
     if (!RUN_TYPE(result.type))
         printError(&result, inter, true);
     freeResult(&result);
@@ -126,7 +126,7 @@ void addBaseClassVar(wchar_t *name, LinkValue *obj, LinkValue *belong, Inter *in
 void newObjectSettingPresetting(LinkValue *func, LinkValue *name, Inter *inter) {
     Result result;
     setResultCore(&result);
-    newObjectSetting(name, 0, "sys", func, &result, inter, NULL);
+    newObjectSetting(name, LINEFILE, func, &result, inter, NULL);
     if (RUN_TYPE(result.type))
         printError(&result, inter, true);
     freeResult(&result);

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

@@ -7,7 +7,7 @@ ResultType bool_new(O_FUNC){
     int status = 1;
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "bool.new", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
@@ -15,7 +15,7 @@ ResultType bool_new(O_FUNC){
     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", CFUNC_NT(var_list, result, belong));
+    run_init(value, arg, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -26,14 +26,14 @@ ResultType bool_init(O_FUNC){
     LinkValue *base;
     bool new = false;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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", CFUNC_NT(var_list, result, belong));
+        new = checkBool(ap[1].value, LINEFILE, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);

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

@@ -8,12 +8,12 @@ ResultType dict_new(O_FUNC){
     int status = 1;
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "bool.new", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     if (arg != NULL && arg->type == value_arg) {
-        setResultError(E_ArgumentException, L"Too many argument", 0, "dict.new", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, L"Too many argument", LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
@@ -29,7 +29,7 @@ ResultType dict_new(O_FUNC){
     popVarList(hash);
 
     freeResult(result);
-    run_init(value, arg, 0, "dict.new", CFUNC_NT(var_list, result, belong));
+    run_init(value, arg, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -38,13 +38,13 @@ ResultType dict_down(O_FUNC){
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     {
@@ -55,7 +55,7 @@ ResultType dict_down(O_FUNC){
             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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_KeyException, message, LINEFILE, true, CNEXT_NT);
             memFree(message);
         }
         memFree(name);
@@ -68,13 +68,13 @@ ResultType dict_down_del(O_FUNC){
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     {
@@ -85,7 +85,7 @@ ResultType dict_down_del(O_FUNC){
             setResult(result, inter);
         else{
             wchar_t *message = memWidecat(L"Cannot delete non-existent keys: ", name, false, false);
-            setResultError(E_KeyException, message, 0, "dict", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_KeyException, message, LINEFILE, true, CNEXT_NT);
             memFree(message);
         }
         memFree(name);
@@ -100,13 +100,13 @@ ResultType dict_down_assignment(O_FUNC){
                            {.must=-1}};
     wchar_t *name = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
@@ -121,12 +121,12 @@ ResultType dict_keys(O_FUNC){
                            {.must=-1}};
     Argument *list = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     for (int index=0; index < MAX_SIZE; index++){
@@ -134,7 +134,7 @@ ResultType dict_keys(O_FUNC){
         for (PASS; tmp != NULL; tmp = tmp->next)
             list = connectValueArgument(copyLinkValue(tmp->name_, inter), list);
     }
-    makeListValue(list, 0, "dict", L_list, CFUNC_NT(var_list, result, belong));
+    makeListValue(list, LINEFILE, L_list, CNEXT_NT);
     freeArgument(list, true);
     return result->type;
 }
@@ -143,19 +143,19 @@ ResultType dict_iter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     {
         Argument *dict_iter_arg = makeValueArgument(ap[0].value);
-        callBackCore(inter->data.dict_iter, dict_iter_arg, 0, "dict", 0,
-                     CFUNC_NT(var_list, result, belong));
+        callBackCore(inter->data.dict_iter, dict_iter_arg, LINEFILE, 0,
+                     CNEXT_NT);
         freeArgument(dict_iter_arg, true);
     }
     return result->type;
@@ -168,32 +168,32 @@ ResultType dictRepoStrCore(O_FUNC, bool is_repo){
     Value *value = NULL;
     LinkValue *again = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(dict), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
-    again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, 0, "dict", true, CFUNC_NT(var_list, result, ap[0].value));
+    again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, LINEFILE, 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", CFUNC_NT(var_list, result, belong));
+        bool again_ = checkBool(again, LINEFILE, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         if (again_) {
-            makeStringValue(L"{...}", 0, "dict.repo", CFUNC_NT(var_list, result, belong));
+            makeStringValue(L"{...}", LINEFILE, CNEXT_NT);
             return result->type;
         }
     }
 
-    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "dict.repo", ap[0].value, CFUNC_NT(var_list, result, belong));
+    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", LINEFILE, ap[0].value, CNEXT_NT);
     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(O_FUNC, bool is_repo){
                 repo = memWidecat(repo, L", ", true, false);
 
             freeResult(result);
-            name_tmp = getRepoStr(var->name_, is_repo, 0, "dict", CFUNC_NT(var_list, result, belong));
+            name_tmp = getRepoStr(var->name_, is_repo, LINEFILE, CNEXT_NT);
             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", CFUNC_NT(var_list, result, belong));
+            value_tmp = getRepoStr(var->value, is_repo, LINEFILE, CNEXT_NT);
             if (!CHECK_RESULT(result))
                 goto return_;
             repo = memWidecat(repo, value_tmp, true, false);
@@ -219,13 +219,13 @@ ResultType dictRepoStrCore(O_FUNC, bool is_repo){
 
     freeResult(result);
     repo = memWidecat(repo, L"}", true, false);
-    makeStringValue(repo, 0, "dict.repo", CFUNC_NT(var_list, result, belong));
+    makeStringValue(repo, LINEFILE, CNEXT_NT);
 
     return_:
     {
         Result tmp;
         setResultCore(&tmp);
-        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "dict.repo", ap[0].value, CFUNC_NT(var_list, &tmp, belong));
+        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", LINEFILE, ap[0].value, CFUNC_NT(var_list, &tmp, belong));
         if (!RUN_TYPE(tmp.type)) {
             freeResult(result);
             *result = tmp;

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

@@ -7,12 +7,12 @@ ResultType dictiter_init(O_FUNC){
     LinkValue *list = NULL;
     LinkValue *list_iter = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(dictiter, dict), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     {
@@ -21,17 +21,17 @@ ResultType dictiter_init(O_FUNC){
         LinkValue *listiter_class = NULL;
 
         freeResult(result);
-        keys = findAttributes(L"keys", false, 0, "dictiter", true, CFUNC_NT(var_list, result, ap[1].value));
+        keys = findAttributes(L"keys", false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, L"Object non-key-value pairs (there is no keys method)", LINEFILE, true, CNEXT_NT);
             return R_error;
         }
 
         gc_addTmpLink(&keys->gc_status);
         freeResult(result);
-        callBackCore(keys, NULL, 0, "dictiter", 0, CFUNC_NT(var_list, result, belong));
+        callBackCore(keys, NULL, LINEFILE, 0, CNEXT_NT);
         gc_freeTmpLink(&keys->gc_status);
         if (!CHECK_RESULT(result)) {
             return R_error;
@@ -44,8 +44,8 @@ ResultType dictiter_init(O_FUNC){
 
         list_arg = makeValueArgument(list);
         freeResult(result);
-        callBackCore(listiter_class, list_arg, 0, "dictiter", 0,
-                     CFUNC_NT(var_list, result, belong));
+        callBackCore(listiter_class, list_arg, LINEFILE, 0,
+                     CNEXT_NT);
         freeArgument(list_arg, true);
 
         if (!CHECK_RESULT(result)) {
@@ -61,9 +61,9 @@ ResultType dictiter_init(O_FUNC){
         gc_freeTmpLink(&listiter_class->gc_status);
     }
     freeResult(result);
-    if (addAttributes(L"__list", false, list_iter, 0, "dictiter.init", true, CFUNC_NT(var_list, result, ap[0].value))) {
+    if (addAttributes(L"__list", false, list_iter, LINEFILE, true, CFUNC_NT(var_list, result, ap[0].value))) {
         freeResult(result);
-        addAttributes(L"__dict", false, ap[1].value, 0, "dictiter.init", true, CFUNC_NT(var_list, result, ap[0].value));
+        addAttributes(L"__dict", false, ap[1].value, LINEFILE, true, CFUNC_NT(var_list, result, ap[0].value));
     }
     gc_freeTmpLink(&list_iter->gc_status);
     setResult(result, inter);
@@ -76,30 +76,30 @@ ResultType dictiter_next(O_FUNC){
     LinkValue *list_ = NULL;
     LinkValue *list_next = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    list_ = findAttributes(L"__list", false, 0, "dictiter", true, CFUNC_NT(var_list, result, ap[0].value));
+    list_ = findAttributes(L"__list", false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(__list, listiter), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     freeResult(result);
-    list_next = findAttributes(inter->data.object_next, false, 0, "dictiter", true, CFUNC_NT(var_list, result, list_));
+    list_next = findAttributes(inter->data.object_next, false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, L"Object is not iterable", LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     freeResult(result);
-    callBackCore(list_next, NULL, 0, "sys", 0, CFUNC_NT(var_list, result, belong));
+    callBackCore(list_next, NULL, LINEFILE, 0, CNEXT_NT);
     return result->type;
 }
 
@@ -109,21 +109,21 @@ ResultType dictiter_down(O_FUNC){
                            {.must=-1}};
     LinkValue *dict_ = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    dict_ = findAttributes(L"__dict", false, 0, "dictiter", true, CFUNC_NT(var_list, result, ap[0].value));
+    dict_ = findAttributes(L"__dict", false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(__dict, dict), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     freeResult(result);
-    getElement(dict_, ap[1].value, 0, "sys", CFUNC_NT(var_list, result, belong));
+    getElement(dict_, ap[1].value, LINEFILE, CNEXT_NT);
     return result->type;
 }
 

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

@@ -12,11 +12,11 @@ ResultType base_exception_init(O_FUNC){
                            {.type=name_value, .name=L"message", .must=0, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
-    if (addAttributes(inter->data.object_message, false, ap[1].value, 0, "BaseException.init", true,
+    if (addAttributes(inter->data.object_message, false, ap[1].value, LINEFILE, true,
                       CFUNC_NT(var_list, result, ap[0].value)))
         setResult(result, inter);
     return result->type;

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

@@ -14,7 +14,7 @@ ResultType function_new(O_FUNC){
     setResultCore(result);
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "func.new", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
@@ -32,7 +32,7 @@ ResultType function_new(O_FUNC){
     value->value->data.function.of = NULL;
     setFunctionData(value->value, ap->value, inter);
 
-    run_init(value, arg, 0, "func.new", CFUNC_NT(var_list, result, belong));
+    run_init(value, arg, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -42,19 +42,19 @@ ResultType function_init(O_FUNC){
                            {.must=-1}};
     LinkValue *func;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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,
-                       CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(func), LINEFILE, true,
+                       CNEXT_NT);
         return R_error;
     }
 
     if (ap[1].value != NULL) {
-        Statement *return_ = makeBaseLinkValueStatement(ap[1].value, 0, "sys");
-        func->value->data.function.function = makeReturnStatement(return_, 0, "sys");
+        Statement *return_ = makeBaseLinkValueStatement(ap[1].value, LINEFILE);
+        func->value->data.function.function = makeReturnStatement(return_, LINEFILE);
         func->value->data.function.function_data.pt_type = free_;
         func->value->data.function.type = vm_func;
     }
@@ -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, CFUNC_NT(object_var, &result, func));
+    addStrVar(inter->data.object_new, false, true, func_new, LINEFILE, false, CFUNC_NT(object_var, &result, func));
     freeResult(&result);
-    addStrVar(inter->data.object_init, false, true, func_init, 0, "sys", false, CFUNC_NT(object_var, &result, func));
+    addStrVar(inter->data.object_init, false, true, func_init, LINEFILE, false, CFUNC_NT(object_var, &result, func));
     freeResult(&result);
 }

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

@@ -5,7 +5,7 @@ ResultType vm_print(O_FUNC){
                            {.type=name_value, .name=L"end", .must=0, .value=NULL},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -13,7 +13,7 @@ ResultType vm_print(O_FUNC){
     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", CFUNC_NT(var_list, result, belong));
+        wchar_t *tmp = getRepoStr(arg->data.value, true, LINEFILE, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         if (i != 0)
@@ -36,7 +36,7 @@ ResultType vm_input(O_FUNC){
                            {.must=-1}};
     wchar_t *str = memWidecpy(L"\0");
     wint_t ch;
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -47,7 +47,7 @@ ResultType vm_input(O_FUNC){
     while ((ch = fgetwc(inter->data.inter_stdin)) != '\n' && ch != WEOF)
         str = memWideCharcpy(str, 1, true, true, ch);
 
-    makeStringValue(str, 0, "sys", CFUNC_NT(var_list, result, belong));
+    makeStringValue(str, LINEFILE, CNEXT_NT);
     memFree(str);
     return result->type;
 }

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

@@ -6,7 +6,7 @@ ResultType tuple_list_newCore(O_FUNC, enum ListType type){
                            {.type=only_value, .must=0, .long_arg=true},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -23,7 +23,7 @@ ResultType tuple_list_newCore(O_FUNC, 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", CFUNC_NT(var_list, result, belong));
+    run_init(value, NULL, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -46,13 +46,13 @@ ResultType list_slice(O_FUNC){
     vnum second;
     vnum stride;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
@@ -64,12 +64,12 @@ ResultType list_slice(O_FUNC){
         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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, V_num or V_none), LINEFILE, true, CNEXT_NT);
             return R_error;
         }
     }
 
-    if (!checkSlice(&first, &second, &stride, size, CFUNC_NT(var_list, result, belong)))
+    if (!checkSlice(&first, &second, &stride, size, CNEXT_NT))
         return result->type;
 
     {
@@ -78,7 +78,7 @@ ResultType list_slice(O_FUNC){
             LinkValue *element = ap[0].value->value->data.list.list[i];
             new_list = connectValueArgument(element, new_list);
         }
-        makeListValue(new_list, 0, "list.slice", L_list, CFUNC_NT(var_list, result, belong));
+        makeListValue(new_list, LINEFILE, L_list, CNEXT_NT);
         freeArgument(new_list, true);
     }
     return result->type;
@@ -97,17 +97,17 @@ ResultType list_slice_assignment(O_FUNC){
     vnum stride;
     LinkValue *iter_obj = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
-    getIter(ap[1].value, 1, 0, "list", CFUNC_NT(var_list, result, belong));
+    getIter(ap[1].value, 1, LINEFILE, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     iter_obj = result->value;
@@ -121,20 +121,20 @@ ResultType list_slice_assignment(O_FUNC){
         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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), LINEFILE, true, CNEXT_NT);
             goto return_;
         }
     }
 
-    if (!checkSlice(&first, &second, &stride, size, CFUNC_NT(var_list, result, belong)))
+    if (!checkSlice(&first, &second, &stride, size, CNEXT_NT))
         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", CFUNC_NT(var_list, result, belong));
+            getIter(iter_obj, 0, LINEFILE, CNEXT_NT);
             if (is_iterStop(result->value, inter)){
-                setResultError(E_TypeException, L"Iter Object Too Short", 0, "list", true, CFUNC_NT(var_list, result, belong));
+                setResultError(E_TypeException, L"Iter Object Too Short", LINEFILE, true, CNEXT_NT);
                 goto return_;
             }
             else if (!CHECK_RESULT(result))
@@ -142,9 +142,9 @@ ResultType list_slice_assignment(O_FUNC){
             ap[0].value->value->data.list.list[i] = result->value;
         }
         freeResult(result);
-        getIter(iter_obj, 0, 0, "list", CFUNC_NT(var_list, result, belong));
+        getIter(iter_obj, 0, LINEFILE, CNEXT_NT);
         if (CHECK_RESULT(result)) {
-            setResultError(E_TypeException, L"Iter Object Too Long", 0, "list", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, L"Iter Object Too Long", LINEFILE, true, CNEXT_NT);
             goto return_;
         } else if (!is_iterStop(result->value, inter))
             goto return_;
@@ -166,13 +166,13 @@ ResultType list_slice_del(O_FUNC){
     vnum second;
     vnum stride;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
@@ -184,12 +184,12 @@ ResultType list_slice_del(O_FUNC){
         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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), LINEFILE, true, CNEXT_NT);
             return R_error;
         }
     }
 
-    if (!checkSlice(&first, &second, &stride, size, CFUNC_NT(var_list, result, belong)))
+    if (!checkSlice(&first, &second, &stride, size, CNEXT_NT))
         return result->type;
 
     {
@@ -221,17 +221,17 @@ ResultType list_down_assignment(O_FUNC){
     vnum size;
     vnum index;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     if (ap[2].value->value->type != V_num){
-        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(list index, V_num), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
@@ -240,10 +240,10 @@ ResultType list_down_assignment(O_FUNC){
     if (index < 0)
         index = size + index;
     if (index >= size){
-        setResultError(E_IndexException, L"Index too max", 0, "list", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_IndexException, L"Index too max", LINEFILE, true, CNEXT_NT);
         return R_error;
     } else if (index < 0){
-        setResultError(E_IndexException, L"Index less than 0", 0, "list", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_IndexException, L"Index less than 0", LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     ap[0].value->value->data.list.list[index] = ap[1].value;
@@ -258,23 +258,23 @@ ResultType list_down_del(O_FUNC){
     vnum size;
     vnum index;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     if (ap[1].value->value->type != V_num){
-        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(list index, V_num), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     size = ap[0].value->value->data.list.size;
     index = ap[1].value->value->data.num.num;
-    if (!checkIndex(&index, &size, CFUNC_NT(var_list, result, belong)))
+    if (!checkIndex(&index, &size, CNEXT_NT))
         return result->type;
     {
         LinkValue **new = NULL;
@@ -297,23 +297,23 @@ ResultType list_down(O_FUNC){
     vnum index;
     LinkValue *element = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     if (ap[1].value->value->type != V_num){
-        setResultError(E_TypeException, ONLY_ACC(list index, V_num), 0, "list", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(list index, V_num), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     size = ap[0].value->value->data.list.size;
     index = ap[1].value->value->data.num.num;
-    if (!checkIndex(&index, &size, CFUNC_NT(var_list, result, belong)))
+    if (!checkIndex(&index, &size, CNEXT_NT))
         return result->type;
     element = ap[0].value->value->data.list.list[index];
     setResultOperationBase(result, copyLinkValue(element, inter));
@@ -324,19 +324,19 @@ ResultType list_iter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     {
         Argument *list_iter_arg = makeValueArgument(ap[0].value);
-        callBackCore(inter->data.list_iter, list_iter_arg, 0, "list", 0,
-                     CFUNC_NT(var_list, result, belong));
+        callBackCore(inter->data.list_iter, list_iter_arg, LINEFILE, 0,
+                     CNEXT_NT);
         freeArgument(list_iter_arg, true);
     }
     return result->type;
@@ -350,31 +350,31 @@ ResultType listRepoStrCore(O_FUNC, bool is_repo){
     LinkValue *again = NULL;
     enum ListType lt;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     lt = value->data.list.type;
-    again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, 0, "list.repo", true, CFUNC_NT(var_list, result, ap[0].value));
+    again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, LINEFILE, 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", CFUNC_NT(var_list, result, belong));
+        bool again_ = checkBool(again, LINEFILE, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         if (again_) {
-            makeStringValue((lt == L_list ? L"[...]" : L"(...)"), 0, "list.repo", CFUNC_NT(var_list, result, belong));
+            makeStringValue((lt == L_list ? L"[...]" : L"(...)"), LINEFILE, CNEXT_NT);
             return result->type;
         }
     }
 
-    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "list.repo", ap[0].value, CFUNC_NT(var_list, result, belong));
+    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", LINEFILE, ap[0].value, CNEXT_NT);
     if (lt == L_list)
         repo = memWidecpy(L"[");
     else
@@ -384,7 +384,7 @@ ResultType listRepoStrCore(O_FUNC, 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", CFUNC_NT(var_list, result, belong));
+        tmp = getRepoStr(value->data.list.list[i], is_repo, LINEFILE, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto return_;
         repo = memWidecat(repo, tmp, true, false);
@@ -395,12 +395,12 @@ ResultType listRepoStrCore(O_FUNC, bool is_repo){
         repo = memWidecat(repo, L")", true, false);
 
     freeResult(result);
-    makeStringValue(repo, 0, "list.repo", CFUNC_NT(var_list, result, belong));
+    makeStringValue(repo, LINEFILE, CNEXT_NT);
     return_:
     {
         Result tmp;
         setResultCore(&tmp);
-        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "list.repo", ap[0].value, CFUNC_NT(var_list, &tmp, belong));
+        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", LINEFILE, ap[0].value, CFUNC_NT(var_list, &tmp, belong));
         if (!RUN_TYPE(tmp.type)) {
             freeResult(result);
             *result = tmp;

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

@@ -6,23 +6,23 @@ ResultType listiter_init(O_FUNC){
                            {.must=-1}};
     LinkValue *index = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(listiter, list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
-    index = makeLinkValue(makeNumberValue(0, 0, "sys", CFUNC_NT(var_list, result, belong)), ap[0].value, inter);
+    index = makeLinkValue(makeNumberValue(0, LINEFILE, CNEXT_NT), 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, CFUNC_NT(var_list, result, ap[0].value))) {
+    if (addAttributes(L"__list", false, ap[1].value, LINEFILE, true, CFUNC_NT(var_list, result, ap[0].value))) {
         freeResult(result);
-        addAttributes(L"__index", false, index, 0, "listiter.init", true, CFUNC_NT(var_list, result, ap[0].value));
+        addAttributes(L"__index", false, index, LINEFILE, true, CFUNC_NT(var_list, result, ap[0].value));
     }
 
     setResult(result, inter);
@@ -35,50 +35,50 @@ ResultType listiter_next(O_FUNC){
     LinkValue *list_ = NULL;
     LinkValue *index = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    list_ = findAttributes(L"__list", false, 0, "listiter", true, CFUNC_NT(var_list, result, ap[0].value));
+    list_ = findAttributes(L"__list", false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(__list, listiter), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     freeResult(result);
-    index = findAttributes(L"__index", false, 0, "listiter", true, CFUNC_NT(var_list, result, ap[0].value));
+    index = findAttributes(L"__index", false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(__index, listiter), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     if (list_->value->type != V_list){
-        setResultError(E_TypeException, VALUE_ERROR(listiter.__list, list), 0, "listiter", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(listiter.__list, list), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     if (index->value->type != V_num){
-        setResultError(E_TypeException, VALUE_ERROR(listiter.__index, V_num), 0, "listiter", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, VALUE_ERROR(listiter.__index, V_num), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
 
     freeResult(result);
-    getElement(list_, index, 0, "listiter", CFUNC_NT(var_list, result, belong));
+    getElement(list_, index, LINEFILE, CNEXT_NT);
     if (!CHECK_RESULT(result))
         if (is_indexException(result->value, inter))
-            setResultError(E_StopIterException, L"Stop Iter", 0, "listiter", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_StopIterException, L"Stop Iter", LINEFILE, true, CNEXT_NT);
         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, CFUNC_NT(var_list, &tmp_result, ap[0].value)))
+        if (addAttributes(L"__index", false, index, LINEFILE, true, CFUNC_NT(var_list, &tmp_result, ap[0].value)))
             freeResult(&tmp_result);
         else {
             freeResult(result);

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

@@ -7,7 +7,7 @@ ResultType num_new(O_FUNC){
     int status = 1;
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "num", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
@@ -15,7 +15,7 @@ ResultType num_new(O_FUNC){
     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", CFUNC_NT(var_list, result, belong));
+    run_init(value, arg, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -25,7 +25,7 @@ ResultType num_init(O_FUNC){
                            {.must=-1}};
     LinkValue *base = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -48,7 +48,7 @@ ResultType num_init(O_FUNC){
             base->value->data.num.num = 0;
             break;
         default:
-            setResultError(E_TypeException, ERROR_INIT(num), 0, "num", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, ERROR_INIT(num), LINEFILE, true, CNEXT_NT);
             return result->type;
     }
 

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

@@ -8,12 +8,12 @@ ResultType object_new(O_FUNC){
     int status = 1;
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "object.new", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     value = make_new(inter, belong, ap[0].value);
-    run_init(value, arg, 0, "obj.new", CFUNC_NT(var_list, result, belong));
+    run_init(value, arg, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -25,19 +25,19 @@ ResultType objectRepoStrCore(O_FUNC, bool is_repo){
     wchar_t *type;
     LinkValue *name_value;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    name_value = findAttributes(inter->data.object_name, false, 0, "sys", true, CFUNC_NT(var_list, result, ap[0].value));
+    name_value = findAttributes(inter->data.object_name, false, LINEFILE, 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", CFUNC_NT(var_list, result, belong));
+        name = getRepoStr(name_value, is_repo, LINEFILE, CNEXT_NT);
         gc_freeTmpLink(&name_value->gc_status);
         if (!CHECK_RESULT(result))
             return result->type;
@@ -58,7 +58,7 @@ ResultType objectRepoStrCore(O_FUNC, bool is_repo){
         swprintf(repo, len, L"(%ls: %ls on %p)", type, name, ap[0].value->value);
     }
 
-    makeStringValue(repo, 0, "object.repo", CFUNC_NT(var_list, result, belong));
+    makeStringValue(repo, LINEFILE, CNEXT_NT);
     memFree(repo);
     return result->type;
 }

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

@@ -8,12 +8,12 @@ ResultType pass_new(O_FUNC){
     setResultCore(result);
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "pass.new", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     value = make_new(inter, belong, ap[0].value);
     value->value->type = V_ell;
-    run_init(value, arg, 0, "pass.new", CFUNC_NT(var_list, result, belong));
+    run_init(value, arg, LINEFILE, CNEXT_NT);
     return result->type;
 }
 

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

@@ -8,7 +8,7 @@ ResultType str_new(O_FUNC){
     setResultCore(result);
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "str.new", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     freeResult(result);
@@ -16,7 +16,7 @@ ResultType str_new(O_FUNC){
     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", CFUNC_NT(var_list, result, belong));
+    run_init(value, arg, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -27,14 +27,14 @@ ResultType str_init(O_FUNC){
     LinkValue *base;
     wchar_t *str = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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", CFUNC_NT(var_list, result, belong));
+        str = getRepoStr(ap[1].value, false, LINEFILE, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         memFree(base->value->data.str.str);
@@ -55,13 +55,13 @@ ResultType str_slice(O_FUNC){
     vnum second;
     vnum stride;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(str), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     size = memWidelen(ap[0].value->value->data.str.str);
@@ -73,19 +73,19 @@ ResultType str_slice(O_FUNC){
         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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, VALUE_ERROR(first/second/stride, num or null), LINEFILE, true, CNEXT_NT);
             return R_error;
         }
     }
 
-    if (!checkSlice(&first, &second, &stride, size, CFUNC_NT(var_list, result, belong)))
+    if (!checkSlice(&first, &second, &stride, size, CNEXT_NT))
         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", CFUNC_NT(var_list, result, belong));
+        makeStringValue(str, LINEFILE, CNEXT_NT);
         memFree(str);
     }
     return result->type;
@@ -99,26 +99,26 @@ ResultType str_down(O_FUNC){
     vnum index;
     wchar_t element[2] = {};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(str), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     if (ap[1].value->value->type != V_num){
-        setResultError(E_TypeException, ONLY_ACC(str index, V_num), 0, "str", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, ONLY_ACC(str index, V_num), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
 
     size = memWidelen(ap[0].value->value->data.str.str);
     index = ap[1].value->value->data.num.num;
-    if (!checkIndex(&index, &size, CFUNC_NT(var_list, result, belong)))
+    if (!checkIndex(&index, &size, CNEXT_NT))
         return result->type;
     *element = ap[0].value->value->data.str.str[index];
-    makeStringValue(element, 0, "str.down", CFUNC_NT(var_list, result, belong));
+    makeStringValue(element, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -127,13 +127,13 @@ ResultType str_to_list(O_FUNC){
                            {.must=-1}};
     vnum size;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, INSTANCE_ERROR(str), LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     size = memWidelen(ap[0].value->value->data.str.str);
@@ -143,11 +143,11 @@ ResultType str_to_list(O_FUNC){
         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", CFUNC_NT(var_list, result, belong));
+            makeStringValue(str, LINEFILE, CNEXT_NT);
             new_list = connectValueArgument(result->value, new_list);
             freeResult(result);
         }
-        makeListValue(new_list, 0, "str", L_list, CFUNC_NT(var_list, result, belong));
+        makeListValue(new_list, LINEFILE, L_list, CNEXT_NT);
         freeArgument(new_list, true);
     }
     return result->type;
@@ -158,27 +158,27 @@ ResultType str_iter(O_FUNC){
                            {.must=-1}};
     LinkValue *to_list = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
 
-    to_list = findAttributes(L"to_list", false, 0, "str", true, CFUNC_NT(var_list, result, ap[0].value));
+    to_list = findAttributes(L"to_list", false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, L"String cannot be converted to list", LINEFILE, true, CNEXT_NT);
         return R_error;
     }
     gc_addTmpLink(&to_list->gc_status);
-    callBackCore(to_list, NULL, 0, "str", 0, CFUNC_NT(var_list, result, belong));
+    callBackCore(to_list, NULL, LINEFILE, 0, CNEXT_NT);
     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", CFUNC_NT(var_list, result, belong));
+        getIter(str_list, 1, LINEFILE, CNEXT_NT);
         gc_freeTmpLink(&str_list->gc_status);
     }
     return result->type;

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

@@ -8,7 +8,7 @@ ResultType vm_super(O_FUNC){
                            {.type=name_value, .name=L"obj_", .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -21,7 +21,7 @@ ResultType vm_super(O_FUNC){
             result->type = R_opt;
             gc_addTmpLink(&result->value->gc_status);
         } else
-            setResultError(E_SuperException, L"Object has no next father", 0, "super", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_SuperException, L"Object has no next father", LINEFILE, true, CNEXT_NT);
         return result->type;
     }
 
@@ -39,7 +39,7 @@ ResultType vm_super(O_FUNC){
         gc_addTmpLink(&result->value->gc_status);
     }
     else
-        setResultError(E_SuperException, L"Object has no next father", 0, "super", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_SuperException, L"Object has no next father", LINEFILE, true, CNEXT_NT);
 
     return result->type;
 }
@@ -49,7 +49,7 @@ ResultType vm_setNowRunCore(O_FUNC, bool type){
     ArgumentParser ap[] = {{.type=name_value, .name=L"func", .must=1, .long_arg=false}, {.must=-1}};
     setResultCore(result);
     {
-        parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+        parserArgumentUnion(ap, arg, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -67,7 +67,7 @@ ResultType vm_setMethodCore(O_FUNC, enum FunctionPtType type){
     ArgumentParser ap[] = {{.type=name_value, .name=L"func", .must=1, .long_arg=false}, {.must=-1}};
     setResultCore(result);
     {
-        parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+        parserArgumentUnion(ap, arg, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -130,9 +130,9 @@ ResultType vm_disnowrun(O_FUNC){
 
 ResultType vm_quit(O_FUNC){
     if (arg != NULL)
-        setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, MANY_ARG, LINEFILE, true, CNEXT_NT);
     else
-        setResultError(E_QuitException, L"VirtualMath Quit", 0, "sys", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_QuitException, L"VirtualMath Quit", LINEFILE, true, CNEXT_NT);
     return R_error;
 }
 

+ 18 - 18
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", CFUNC_NT(var_list, result, belong));
+        makeNumberValue(left->data.num.num + right->data.num.num, LINEFILE, CNEXT_NT);
     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", CFUNC_NT(var_list, result, belong));
+        makeStringValue(new_string, LINEFILE, CNEXT_NT);
         memFree(new_string);
     }
     else
-        setResultError(E_TypeException, CUL_ERROR(Add), 0, "vobject.add", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, CUL_ERROR(Add), LINEFILE, true, CNEXT_NT);
 }
 
 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", CFUNC_NT(var_list, result, belong));
+        makeNumberValue(left->data.num.num - right->data.num.num, LINEFILE, CNEXT_NT);
     else
-        setResultError(E_TypeException, CUL_ERROR(Sub), 0, "vobject.sub", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, CUL_ERROR(Sub), LINEFILE, true, CNEXT_NT);
 }
 
 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", CFUNC_NT(var_list, result, belong));
+        makeNumberValue(left->data.num.num * right->data.num.num, LINEFILE, CNEXT_NT);
     else if(left->type == V_num && right->type == V_str) {
         Value *tmp = left;
         left = right;
@@ -35,21 +35,21 @@ 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", CFUNC_NT(var_list, result, belong));
+        makeStringValue(new_string, LINEFILE, CNEXT_NT);
         memFree(new_string);
     }
     else
-        setResultError(E_TypeException, CUL_ERROR(Mul), 0, "vobject.mul", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, CUL_ERROR(Mul), LINEFILE, true, CNEXT_NT);
 }
 
 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", CFUNC_NT(var_list, result, belong));
+        makeNumberValue(div_result.quot, LINEFILE, CNEXT_NT);
     }
     else
-        setResultError(E_TypeException, CUL_ERROR(Div), 0, "vobject.div", true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, CUL_ERROR(Div), LINEFILE, true, CNEXT_NT);
 }
 
 ResultType vobject_opt_core(O_FUNC, base_opt func){
@@ -60,7 +60,7 @@ ResultType vobject_opt_core(O_FUNC, base_opt func){
                            {.must=-1}};
     setResultCore(result);
     {
-        parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+        parserArgumentUnion(ap, arg, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -96,7 +96,7 @@ ResultType vobject_bool(O_FUNC){
     Value *value = NULL;
     setResultCore(result);
     {
-        parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+        parserArgumentUnion(ap, arg, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return result->type;
         freeResult(result);
@@ -123,10 +123,10 @@ ResultType vobject_bool(O_FUNC){
             result_ = value->data.dict.size > 0;
             break;
         default:
-            setResultError(E_TypeException, CUL_ERROR(bool), 0, "vobject", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, CUL_ERROR(bool), LINEFILE, true, CNEXT_NT);
             return R_error;
     }
-    makeBoolValue(result_, 0, "vobject.bool", CFUNC_NT(var_list, result, belong));
+    makeBoolValue(result_, LINEFILE, CNEXT_NT);
     return result->type;
 }
 
@@ -136,7 +136,7 @@ ResultType vobject_repo(O_FUNC){
     wchar_t *repo = NULL;
     Value *value = NULL;
     setResultCore(result);
-    parserArgumentUnion(ap, arg, CFUNC_NT(var_list, result, belong));
+    parserArgumentUnion(ap, arg, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
@@ -160,7 +160,7 @@ ResultType vobject_repo(O_FUNC){
         }
         case V_class: {
             char str[30] = {};
-            snprintf(str, 30, "(V_class on %p)", value);
+            snprintf(str, 30, "(class on %p)", value);
             repo = memStrToWcs(str, false);
             break;
         }
@@ -174,10 +174,10 @@ ResultType vobject_repo(O_FUNC){
             repo = memStrToWcs("...", false);
             break;
         default:
-            setResultError(E_TypeException, CUL_ERROR(repo/str), 0, "vobject", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, CUL_ERROR(repo/str), LINEFILE, true, CNEXT_NT);
             return R_error;
     }
-    makeStringValue(repo, 0, "vobject.repo", CFUNC_NT(var_list, result, belong));
+    makeStringValue(repo, LINEFILE, CNEXT_NT);
     memFree(repo);
     return result->type;
 }

+ 4 - 4
VirtulMathCore/parser/__grammar.c

@@ -45,7 +45,7 @@ inline void twoOperation(P_FUNC, PasersFunction callBack, GetSymbolFunction getS
 
         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, ")");
+            syntaxError(pm, syntax_error, line, LINEFILE);
             freeToken(left_token, true);
             freeStatement(st);
             goto return_;
@@ -93,9 +93,9 @@ int readBackToken(ParserMessage *pm){
     Token *tmp = popNewToken(pm->tm);
     int type = tmp->token_type;
     if (type == -2)
-        syntaxError(pm, lexical_error, tmp->line, 1, "lexical make some error");
+        syntaxError(pm, lexical_error, tmp->line, LINEFILE);
     else if (type == -3)
-        syntaxError(pm, int_error, tmp->line, 1, "KeyInterrupt");
+        syntaxError(pm, int_error, tmp->line, LINEFILE);
     addBackToken(pm->tm->ts, tmp);
     return type;
 }
@@ -232,7 +232,7 @@ bool parserParameter(P_FUNC, Parameter **pt, bool enter, bool is_formal, bool is
         if (readBackToken(pm) != POLYNOMIAL) {
             if (status == s_3) {
                 long int line = pm->tm->ts->token_list->line;
-                syntaxError(pm, syntax_error, line, 1, "Don't get a parameter after *");
+                syntaxError(pm, syntax_error, line, LINEFILE);
                 goto error_;
             }
             break;

+ 42 - 42
VirtulMathCore/src/__run.c

@@ -10,14 +10,14 @@ ResultType getBaseVarInfo(wchar_t **name, int *times, FUNC){
     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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CNEXT_NT);
         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, CFUNC_NT(var_list, result, belong));
+    makeStringValue(st->u.base_var.name, st->line, st->code_file, CNEXT_NT);
     return result->type;
 }
 
@@ -31,7 +31,7 @@ ResultType getBaseSVarInfo(wchar_t **name, int *times, FUNC){
     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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CNEXT_NT);
         return result->type;
     }
     *times = (int)result->value->value->data.num.num;
@@ -49,11 +49,11 @@ ResultType getBaseSVarInfo(wchar_t **name, int *times, FUNC){
 
 ResultType getVarInfo(wchar_t **name, int *times, FUNC){
     if (st->type == base_var)
-        getBaseVarInfo(name, times, CFUNC(st, var_list, result, belong));
+        getBaseVarInfo(name, times, CNEXT);
     else if (st->type == base_svar)
-        getBaseSVarInfo(name, times, CFUNC(st, var_list, result, belong));
+        getBaseSVarInfo(name, times, CNEXT);
     else{
-        if (operationSafeInterStatement(CFUNC(st, var_list, result, belong)))
+        if (operationSafeInterStatement(CNEXT))
             return result->type;
         *name = getNameFromValue(result->value->value, inter);
         *times = 0;
@@ -150,7 +150,7 @@ ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func
                 *base = *arg;
             } else {
                 error_:
-                setResultError(E_ArgumentException, FEW_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
+                setResultError(E_ArgumentException, FEW_ARG, line, file, true, CNEXT_NT);
                 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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, line, file, true, CNEXT_NT);
             return R_error;
     }
 
     if (pt_type != free_ && self == NULL) {
-        setResultError(E_ArgumentException, L"Function does not belong to anything(not self)", line, file, true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_ArgumentException, L"Function does not belong to anything(not self)", line, file, true, CNEXT_NT);
         return R_error;
     }
 
@@ -271,14 +271,14 @@ LinkValue *findStrVar(wchar_t *name, bool free_old, fline line, char *file, bool
     memFree(name_);
     if (tmp != NULL && nowrun) {
         setResultCore(result);
-        if (!runVarFunc(tmp, line, file, CFUNC_NT(var_list, result, belong)))
+        if (!runVarFunc(tmp, line, file, CNEXT_NT))
             setResultOperationBase(result, tmp);
     }
     return tmp;
 }
 
 LinkValue *findStrVarOnly(wchar_t *name, bool free_old, FUNC_CORE) {
-    return findStrVar(name, free_old, 0, "sys", false, CFUNC_NT(var_list, NULL, NULL));
+    return findStrVar(name, free_old, LINEFILE, false, CFUNC_NT(var_list, NULL, NULL));
 }
 
 LinkValue *checkStrVar(wchar_t *name, bool free_old, FUNC_CORE){
@@ -306,11 +306,11 @@ void addStrVar(wchar_t *name, bool free_old, bool setting, LinkValue *value, fli
 
     if (run) {
         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)))
+        if (tmp != NULL && !setVarFunc(tmp, value, line, file, CNEXT_NT))
             goto return_;
     }
 
-    makeStringValue(name, line, file, CFUNC_NT(var_list, result, belong));
+    makeStringValue(name, line, file, CNEXT_NT);
     if (!CHECK_RESULT(result))
         goto return_;
 
@@ -346,7 +346,7 @@ bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, c
             goto return_;
     }
 
-    makeStringValue(name, line, file, CFUNC_NT(var_list, result, belong));
+    makeStringValue(name, line, file, CNEXT_NT);
     if (!CHECK_RESULT(result))
         goto return_;
 
@@ -367,16 +367,16 @@ bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, c
 
 void newObjectSetting(LinkValue *name, fline line, char *file, FUNC_NT) {
     setResultCore(result);
-    addAttributes(inter->data.object_name, false, name, line, file, false, CFUNC_NT(var_list, result, belong));
+    addAttributes(inter->data.object_name, false, name, line, file, false, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return;
     freeResult(result);
 
-    addAttributes(inter->data.object_self, false, belong, line, file, false, CFUNC_NT(var_list, result, belong));
+    addAttributes(inter->data.object_self, false, belong, line, file, false, CNEXT_NT);
     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,
-                      CFUNC_NT(var_list, result, belong));
+                      CNEXT_NT);
     }
 }
 
@@ -387,7 +387,7 @@ ResultType getElement(LinkValue *from, LinkValue *index, fline line, char *file,
     gc_addTmpLink(&from->gc_status);
     gc_addTmpLink(&index->gc_status);
 
-    _func_ = findAttributes(inter->data.object_down, false, 0, "sys", true, CFUNC_NT(var_list, result, from));
+    _func_ = findAttributes(inter->data.object_down, false, LINEFILE, true, CFUNC_NT(var_list, result, from));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -395,12 +395,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, CFUNC_NT(var_list, result, belong));
+        callBackCore(_func_, arg, line, file, 0, CNEXT_NT);
         gc_freeTmpLink(&_func_->gc_status);
         freeArgument(arg, true);
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(subscript(__down__)), line, file, true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(subscript(__down__)), line, file, true, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&from->gc_status);
@@ -414,20 +414,20 @@ ResultType getIter(LinkValue *value, int status, fline line, char *file, FUNC_NT
     gc_addTmpLink(&value->gc_status);
 
     if (status == 1)
-        _func_ = findAttributes(inter->data.object_iter, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
+        _func_ = findAttributes(inter->data.object_iter, false, LINEFILE, true, CFUNC_NT(var_list, result, value));
     else
-        _func_ = findAttributes(inter->data.object_next, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
+        _func_ = findAttributes(inter->data.object_next, false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        callBackCore(_func_, NULL, line, file, 0, CNEXT_NT);
         gc_freeTmpLink(&_func_->gc_status);
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(iter), line, file, true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(iter), line, file, true, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&value->gc_status);
@@ -435,19 +435,19 @@ ResultType getIter(LinkValue *value, int status, fline line, char *file, FUNC_NT
 }
 
 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));
+    LinkValue *_bool_ = findAttributes(inter->data.object_bool, false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        callBackCore(_bool_, NULL, line, file, 0, CNEXT_NT);
         gc_freeTmpLink(&_bool_->gc_status);
         if (result->value->value->type != V_bool)
-            setResultError(E_TypeException, RETURN_ERROR(__bool__, bool), line, file, true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, RETURN_ERROR(__bool__, bool), line, file, true, CNEXT_NT);
         else
             return result->value->value->data.bool_.bool_;
     } else {
-        makeBoolValue(true, 0, "sys.bool", CFUNC_NT(var_list, result, belong));
+        makeBoolValue(true, LINEFILE, CNEXT_NT);
         return true;
     }
     return false;
@@ -459,25 +459,25 @@ wchar_t *getRepoStr(LinkValue *value, bool is_repo, fline line, char *file, FUNC
     setResultCore(result);
     gc_addTmpLink(&value->gc_status);
 
-    _repo_ = findAttributes(is_repo ? inter->data.object_repo : inter->data.object_str, false, 0, "sys", true, CFUNC_NT(var_list, result, value));
+    _repo_ = findAttributes(is_repo ? inter->data.object_repo : inter->data.object_str, false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        callBackCore(_repo_, NULL, line, file, 0, CNEXT_NT);
         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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CNEXT_NT);
             goto return_;
         }
         re = result->value->value->data.str.str;
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&value->gc_status);
@@ -495,20 +495,20 @@ bool is_indexException(LinkValue *value, Inter *inter) {
 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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_PermissionsException, L"Wrong Permissions: access variables as public", line, file, true, CNEXT_NT);
         else {
             wchar_t *message = memWidecat(L"Wrong Permissions: access variables as public: ", memStrToWcs(name, false), false, true);
-            setResultError(E_PermissionsException, message, line, file, true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_PermissionsException, message, line, file, true, CNEXT_NT);
             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, CFUNC_NT(var_list, result, belong));
+            setResultError(E_PermissionsException, L"Wrong Permissions: access variables as protect", line, file, true, CNEXT_NT);
         else {
             wchar_t *message = memWidecat(L"Wrong Permissions: access variables as protect: ", memStrToWcs(name, false), false, true);
-            setResultError(E_PermissionsException, message, line, file, true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_PermissionsException, message, line, file, true, CNEXT_NT);
             memFree(message);
         }
         return false;
@@ -527,7 +527,7 @@ static int init_new(LinkValue *obj, Argument *arg, fline line, char *file, FUNC_
     LinkValue *_init_ = NULL;
     setResultCore(result);
 
-    _init_ = findAttributes(inter->data.object_init, false, 0, "sys", true, CFUNC_NT(var_list, result, obj));
+    _init_ = findAttributes(inter->data.object_init, false, LINEFILE, true, CFUNC_NT(var_list, result, obj));
     if (!CHECK_RESULT(result))
         return -1;
     freeResult(result);
@@ -535,7 +535,7 @@ static int init_new(LinkValue *obj, Argument *arg, fline line, char *file, FUNC_
 
     if (_init_ == NULL) {
         if (arg != NULL) {
-            setResultError(E_ArgumentException, MANY_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, line, file, true, CNEXT_NT);
             return 0;
         } else
             return 1;
@@ -553,7 +553,7 @@ int run_init(LinkValue *obj, Argument *arg, fline line, char *file, FUNC_NT) {
     int return_;
     setResultCore(result);
 
-    return_ = init_new(obj, arg, line, file, CFUNC_NT(var_list, result, belong));
+    return_ = init_new(obj, arg, line, file, CNEXT_NT);
     if (return_ == 1) {
         freeResult(result);
         setResultOperation(result, obj);
@@ -564,7 +564,7 @@ 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) {
     LinkValue *bool_value = NULL;
     setResultCore(result);
-    makeBoolValue(value, line, file, CFUNC_NT(var_list, result, belong));
+    makeBoolValue(value, line, file, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return false;
     bool_value = result->value;
@@ -580,7 +580,7 @@ bool runVarFunc(LinkValue *var, fline line, char *file, FUNC_NT) {
     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, CFUNC_NT(var_list, result, belong));
+    callBackCore(var, NULL, line, file, 0, CNEXT_NT);
     gc_freeTmpLink(&var->gc_status);
     return true;
 }
@@ -594,7 +594,7 @@ bool setVarFunc(LinkValue *var, LinkValue *new, fline line, char *file, FUNC_NT)
     gc_addTmpLink(&new->gc_status);
 
     arg = makeValueArgument(new);
-    callBackCore(var, arg, line, file, 0, CFUNC_NT(var_list, result, belong));
+    callBackCore(var, arg, line, file, 0, CNEXT_NT);
     freeArgument(arg, true);
 
     gc_freeTmpLink(&var->gc_status);

+ 28 - 28
VirtulMathCore/src/parameter.c

@@ -189,14 +189,14 @@ 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, CFUNC_NT(var_list, result, belong));
+    getIter(list_value, 1, line, file, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     iter = result->value;
     result->value = NULL;
     while (true) {
         freeResult(result);
-        getIter(iter, 0, line, file, CFUNC_NT(var_list, result, belong));
+        getIter(iter, 0, line, file, CNEXT_NT);
         if (is_iterStop(result->value, inter)){
             freeResult(result);
             break;
@@ -218,7 +218,7 @@ 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, CFUNC_NT(var_list, result, belong));
+    getIter(dict_value, 1, line, file, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     iter = result->value;
@@ -228,7 +228,7 @@ Argument *dictToArgument(LinkValue *dict_value, long line, char *file, FUNC_NT)
         wchar_t *name = NULL;
 
         freeResult(result);
-        getIter(iter, 0, line, file, CFUNC_NT(var_list, result, belong));
+        getIter(iter, 0, line, file, CNEXT_NT);
         if (is_iterStop(result->value, inter)){
             freeResult(result);
             break;
@@ -242,7 +242,7 @@ Argument *dictToArgument(LinkValue *dict_value, long line, char *file, FUNC_NT)
         result->value = NULL;
         freeResult(result);
 
-        getElement(iter, name_, line, file, CFUNC_NT(var_list, result, belong));
+        getElement(iter, name_, line, file, CNEXT_NT);
         if (!CHECK_RESULT(result)) {
             gc_freeTmpLink(&name_->gc_status);
             freeArgument(at, true);
@@ -281,7 +281,7 @@ ResultType defaultParameter(Parameter **function_ad, vnum *num, FUNC_NT) {
         value = result->value;
         result->value = NULL;
         freeResult(result);
-        assCore(function->data.name, value, false, false, CFUNC_NT(var_list, result, belong));
+        assCore(function->data.name, value, false, false, CNEXT_NT);
         gc_freeTmpLink(&value->gc_status);
         if (!CHECK_RESULT(result))
             goto return_;
@@ -312,7 +312,7 @@ ResultType argumentToVar(Argument **call_ad, vnum *num, FUNC_NT) {
             continue;
         }
         freeResult(result);
-        assCore(call->data.name, call->data.value, false, false, CFUNC_NT(var_list, result, belong));
+        assCore(call->data.name, call->data.value, false, false, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto return_;
     }
@@ -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", CFUNC_NT(var_list, result, belong));
+            makeDictValue(NULL, false, LINEFILE, CNEXT_NT);
             if (!CHECK_RESULT(result))
                 return result->type;
 
@@ -378,10 +378,10 @@ ResultType parameterFromVar(Parameter **function_ad, VarList *function_var, vnum
                 value = result->value;
                 goto not_return;
             }
-            setResultErrorSt(E_ArgumentException, FEW_ARG, true, name, CFUNC_NT(var_list, result, belong));
+            setResultErrorSt(E_ArgumentException, FEW_ARG, true, name, CNEXT_NT);
             goto return_;
         }
-        else if (!checkAut(name->aut, value->aut, name->line, name->code_file, NULL, false, CFUNC_NT(var_list, result, belong)))
+        else if (!checkAut(name->aut, value->aut, name->line, name->code_file, NULL, false, CNEXT_NT))
             goto return_;
 
         not_return:
@@ -472,7 +472,7 @@ ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, FUNC
             start = result->value;
             result->value = NULL;
             freeResult(result);
-            tmp_at = listToArgument(start, 0, "sys", CFUNC_NT(var_list, result, belong));
+            tmp_at = listToArgument(start, LINEFILE, CNEXT_NT);
             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, FUNC
             start = result->value;
             result->value = NULL;
             freeResult(result);
-            tmp_at = dictToArgument(start, 0, "sys", CFUNC_NT(var_list, result, belong));
+            tmp_at = dictToArgument(start, LINEFILE, CNEXT_NT);
             gc_freeTmpLink(&start->gc_status);
             if (!CHECK_RESULT(result))
                 goto return_;
@@ -502,7 +502,7 @@ ResultType iterParameter(Parameter *call, Argument **base_ad, bool is_dict, FUNC
 Argument * getArgument(Parameter *call, bool is_dict, FUNC_NT) {
     Argument *new_arg = NULL;
     setResultCore(result);
-    iterParameter(call, &new_arg, is_dict, CFUNC_NT(var_list, result, belong));
+    iterParameter(call, &new_arg, is_dict, CNEXT_NT);
     return new_arg;
 }
 
@@ -580,7 +580,7 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
         freeResult(result);
         switch (status) {
             case match_status: {
-                argumentToParameter(&call, &function, function_var, CFUNC_NT(var_list, result, belong));
+                argumentToParameter(&call, &function, function_var, CNEXT_NT);
                 returnResult(result);
                 break;
             }
@@ -622,11 +622,11 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
                             PASS;
                     backup = call->next;
                     call->next = NULL;
-                    makeListValue(base, 0, "sys", L_tuple, CFUNC_NT(var_list, result, belong));
+                    makeListValue(base, LINEFILE, L_tuple, CNEXT_NT);
                     call->next = backup;
                     call = backup;
                 } else
-                    makeListValue(NULL, 0, "sys", L_tuple, CFUNC_NT(var_list, result, belong));
+                    makeListValue(NULL, LINEFILE, L_tuple, CNEXT_NT);
 
                 returnResult(result);
                 tmp = result->value;
@@ -641,7 +641,7 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
             }
             case space_kwargs:{
                 LinkValue *tmp;
-                makeDictValue(NULL, true, 0, "sys", CFUNC_NT(var_list, result, belong));
+                makeDictValue(NULL, true, LINEFILE, CNEXT_NT);
                 returnResult(result);
                 tmp = result->value;
                 result->value = NULL;
@@ -654,17 +654,17 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
                 break;
             }
             case error_to_less:
-                setResultError(E_ArgumentException, FEW_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
+                setResultError(E_ArgumentException, FEW_ARG, line, file, true, CNEXT_NT);
                 goto return_;
             case error_to_more:
             to_more:
-                setResultError(E_ArgumentException, MANY_ARG, line, file, true, CFUNC_NT(var_list, result, belong));
+                setResultError(E_ArgumentException, MANY_ARG, line, file, true, CNEXT_NT);
                 goto return_;
             case error_kw:
-                setResultError(E_ArgumentException, OBJ_NOTSUPPORT(**), line, file, true, CFUNC_NT(var_list, result, belong));
+                setResultError(E_ArgumentException, OBJ_NOTSUPPORT(**), line, file, true, CNEXT_NT);
                 goto return_;
             case error_unknown:
-                setResultError(E_ArgumentException, L"Argument Unknown Exception", line, file, true, CFUNC_NT(var_list, result, belong));
+                setResultError(E_ArgumentException, L"Argument Unknown Exception", line, file, true, CNEXT_NT);
                 goto return_;
             default:
                 goto break_;
@@ -722,7 +722,7 @@ int parserArgumentUnion(ArgumentParser ap[], Argument *arg, FUNC_NT){
         int status = 1;
         arg = parserValueArgument(ap, arg, &status, &bak);
         if (status != 1){
-            setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
             return 0;
         }
         ap = bak;
@@ -732,29 +732,29 @@ int parserArgumentUnion(ArgumentParser ap[], Argument *arg, FUNC_NT){
         int status;
 
         if (arg != NULL && arg->type != name_arg) {
-            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, LINEFILE, true, CNEXT_NT);
             return -6;
         }
 
-        status = parserNameArgument(ap, arg, &bak, CFUNC_NT(var_list, result, belong));
+        status = parserNameArgument(ap, arg, &bak, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return -1;
         if (status == -3){
             if (parserArgumentNameDefault(ap)->must != -1){
-                setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
+                setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
                 return -7;
             }
         }
         else if (status == 0){
-            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, LINEFILE, true, CNEXT_NT);
             return -2;
         } else if (status == -4){
-            setResultError(E_ArgumentException, FEW_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_ArgumentException, FEW_ARG, LINEFILE, true, CNEXT_NT);
             return -3;
         }
     } else{
         if (arg != NULL) {
-            setResultError(E_ArgumentException, MANY_ARG, 0, "sys", true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_ArgumentException, MANY_ARG, LINEFILE, true, CNEXT_NT);
             return -4;
         }
     }

+ 46 - 46
VirtulMathCore/src/run.c

@@ -14,94 +14,94 @@ ResultType runStatement(FUNC) {
 
     switch (st->type) {
         case base_value:
-            type = getBaseValue(CFUNC(st, var_list, result, belong));
+            type = getBaseValue(CNEXT);
             break;
         case base_var:
-            type = getVar(CFUNC(st, var_list, result, belong), getBaseVarInfo);
+            type = getVar(CNEXT, getBaseVarInfo);
             break;
         case base_svar:
-            type = getVar(CFUNC(st, var_list, result, belong), getBaseSVarInfo);
+            type = getVar(CNEXT, getBaseSVarInfo);
             break;
         case base_list:
-            type = getList(CFUNC(st, var_list, result, belong));
+            type = getList(CNEXT);
             break;
         case base_dict:
-            type = getDict(CFUNC(st, var_list, result, belong));
+            type = getDict(CNEXT);
             break;
         case base_lambda:
-            type = setLambda(CFUNC(st, var_list, result, belong));
+            type = setLambda(CNEXT);
             break;
         case operation:
-            type = operationStatement(CFUNC(st, var_list, result, belong));
+            type = operationStatement(CNEXT);
             break;
         case set_class:
-            type = setClass(CFUNC(st, var_list, result, belong));
+            type = setClass(CNEXT);
             break;
         case set_function:
-            type = setFunction(CFUNC(st, var_list, result, belong));
+            type = setFunction(CNEXT);
             break;
         case slice_:
-            type = elementSlice(CFUNC(st, var_list, result, belong));
+            type = elementSlice(CNEXT);
             break;
         case call_function:
-            type = callBack(CFUNC(st, var_list, result, belong));
+            type = callBack(CNEXT);
             break;
         case if_branch:
-            type = ifBranch(CFUNC(st, var_list, result, belong));
+            type = ifBranch(CNEXT);
             break;
         case while_branch:
-            type = whileBranch(CFUNC(st, var_list, result, belong));
+            type = whileBranch(CNEXT);
             break;
         case for_branch:
-            type = forBranch(CFUNC(st, var_list, result, belong));
+            type = forBranch(CNEXT);
             break;
         case with_branch:
-            type = withBranch(CFUNC(st, var_list, result, belong));
+            type = withBranch(CNEXT);
             break;
         case try_branch:
-            type = tryBranch(CFUNC(st, var_list, result, belong));
+            type = tryBranch(CNEXT);
             break;
         case break_cycle:
-            type = breakCycle(CFUNC(st, var_list, result, belong));
+            type = breakCycle(CNEXT);
             break;
         case continue_cycle:
-            type = continueCycle(CFUNC(st, var_list, result, belong));
+            type = continueCycle(CNEXT);
             break;
         case rego_if:
-            type = regoIf(CFUNC(st, var_list, result, belong));
+            type = regoIf(CNEXT);
             break;
         case restart:
-            type = restartCode(CFUNC(st, var_list, result, belong));
+            type = restartCode(CNEXT);
             break;
         case return_code:
-            type = returnCode(CFUNC(st, var_list, result, belong));
+            type = returnCode(CNEXT);
             break;
         case yield_code:
-            type = yieldCode(CFUNC(st, var_list, result, belong));
+            type = yieldCode(CNEXT);
             break;
         case raise_code:
-            type = raiseCode(CFUNC(st, var_list, result, belong));
+            type = raiseCode(CNEXT);
             break;
         case include_file:
-            type = includeFile(CFUNC(st, var_list, result, belong));
+            type = includeFile(CNEXT);
             break;
         case import_file:
-            type = importFile(CFUNC(st, var_list, result, belong));
+            type = importFile(CNEXT);
             break;
         case from_import_file:
-            type = fromImportFile(CFUNC(st, var_list, result, belong));
+            type = fromImportFile(CNEXT);
             break;
         case default_var:
-            type = setDefault(CFUNC(st, var_list, result, belong));
+            type = setDefault(CNEXT);
             break;
         case assert:
-            type = assertCode(CFUNC(st, var_list, result, belong));
+            type = assertCode(CNEXT);
             break;
         case goto_:
-            type = gotoLabel(CFUNC(st, var_list, result, belong));
+            type = gotoLabel(CNEXT);
             break;
         case del_:
-            type = delOperation(CFUNC(st, var_list, result, belong));
+            type = delOperation(CNEXT);
             break;
         default:
             setResult(result, inter);
@@ -121,7 +121,7 @@ ResultType runStatement(FUNC) {
 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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_KeyInterrupt, KEY_INTERRUPT, line, file, true, CNEXT_NT);
         return true;
     }
     return false;
@@ -131,7 +131,7 @@ 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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_GotoException, L"Don't find label", true, st, CNEXT_NT);
         return false;
     }
 
@@ -165,19 +165,19 @@ ResultType iterStatement(FUNC) {
     gc_addTmpLink(&belong->gc_status);
     do {
         base = st;
-        if (checkSignal(base->line, base->code_file, CFUNC_NT(var_list, result, belong))) {
+        if (checkSignal(base->line, base->code_file, CNEXT_NT)) {
             type = result->type;
             break;
         }
         while (base != NULL) {
             freeResult(result);
             type = runStatement(CFUNC(base, var_list, result, belong));
-            if (checkSignal(base->line, base->code_file, CFUNC_NT(var_list, result, belong))) {
+            if (checkSignal(base->line, base->code_file, CNEXT_NT)) {
                 type = result->type;
                 break;
             }
             if (type == R_goto && result->times == 0){
-                if (!gotoStatement(&base, CFUNC(st, var_list, result, belong))) {
+                if (!gotoStatement(&base, CNEXT)) {
                     type = result->type;
                     break;
                 }
@@ -224,19 +224,19 @@ ResultType globalIterStatement(Result *result, Inter *inter, Statement *st) {
     do {
         base = st;
         var_list = inter->var_list;
-        if (checkSignal(base->line, base->code_file, CFUNC_NT(var_list, result, belong))) {
+        if (checkSignal(base->line, base->code_file, CNEXT_NT)) {
             type = result->type;
             break;
         }
         while (base != NULL) {
             freeResult(result);
             type = runStatement(CFUNC(base, var_list, result, belong));
-            if (checkSignal(base->line, base->code_file, CFUNC_NT(var_list, result, belong))) {
+            if (checkSignal(base->line, base->code_file, CNEXT_NT)) {
                 type = result->type;
                 break;
             }
             if (type == R_goto){
-                if (!gotoStatement(&base, CFUNC(st, var_list, result, belong))) {
+                if (!gotoStatement(&base, CNEXT)) {
                     type = result->type;
                     break;
                 }
@@ -263,17 +263,17 @@ ResultType globalIterStatement(Result *result, Inter *inter, Statement *st) {
 // 若需要中断执行, 则返回true
 bool operationSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CFUNC(st, var_list, result, belong));
+    type = iterStatement(CNEXT);
     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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_ResultException, L"Operation get not support result type", true, st, CNEXT_NT);
     return true;
 }
 
 bool ifBranchSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CFUNC(st, var_list, result, belong));
+    type = iterStatement(CNEXT);
     if (RUN_TYPE(type))
         return false;
     if (type == R_rego){
@@ -288,7 +288,7 @@ bool ifBranchSafeInterStatement(FUNC){
 
 bool cycleBranchSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CFUNC(st, var_list, result, belong));
+    type = iterStatement(CNEXT);
     if (RUN_TYPE(type))
         return false;
     if (type == R_break || type == R_continue){
@@ -303,7 +303,7 @@ bool cycleBranchSafeInterStatement(FUNC){
 
 bool withBranchSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CFUNC(st, var_list, result, belong));
+    type = iterStatement(CNEXT);
     if (RUN_TYPE(type))
         return false;
     if (type == R_restart || type == R_goto)
@@ -313,7 +313,7 @@ bool withBranchSafeInterStatement(FUNC){
 
 bool tryBranchSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CFUNC(st, var_list, result, belong));
+    type = iterStatement(CNEXT);
     if (RUN_TYPE(type))
         return false;
     if (type == R_restart || type == R_goto)
@@ -323,7 +323,7 @@ bool tryBranchSafeInterStatement(FUNC){
 
 bool functionSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CFUNC(st, var_list, result, belong));
+    type = iterStatement(CNEXT);
     if (type == R_error || result->type == R_yield)
         return true;
     else if (type == R_func)
@@ -335,7 +335,7 @@ bool functionSafeInterStatement(FUNC){
 
 bool blockSafeInterStatement(FUNC){
     ResultType type;
-    type = iterStatement(CFUNC(st, var_list, result, belong));
+    type = iterStatement(CNEXT);
     if (type == R_error || type == R_yield)
         return true;
     result->type = R_opt;

+ 42 - 42
VirtulMathCore/src/runbranch.c

@@ -2,7 +2,7 @@
 
 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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, L"Don't get a V_num of layers", true, st, CNEXT_NT);
         return false;
     }
     return true;
@@ -65,7 +65,7 @@ static bool runBranchHeard(Statement *condition, Statement *var, LinkValue **con
     if (var != NULL) {
         result->value = NULL;
         freeResult(result);
-        assCore(var, *condition_value, false, false, CFUNC_NT(var_list, result, belong));
+        assCore(var, *condition_value, false, false, CNEXT_NT);
         gc_freeTmpLink(&(*condition_value)->gc_status);
 
         if (!CHECK_RESULT(result))
@@ -79,7 +79,7 @@ static int checkCondition(bool is_rego, LinkValue *condition_value, fline line,
     if (is_rego)
         return 1;
 
-    return_ = checkBool(condition_value, line, file, CFUNC_NT(var_list, result, belong));
+    return_ = checkBool(condition_value, line, file, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return -1;
     return return_;
@@ -112,11 +112,11 @@ static int runIfList(StatementList *if_list, Statement *info_vl, fline line, cha
             info_vl = NULL;
         } else if (if_list->type == if_b){
             LinkValue *condition_value = NULL;
-            if (!runBranchHeard(if_list->condition, if_list->var, &condition_value, CFUNC_NT(var_list, result, belong)))
+            if (!runBranchHeard(if_list->condition, if_list->var, &condition_value, CNEXT_NT))
                 return -1;
 
             freeResult(result);
-            condition = checkCondition(is_rego, condition_value, line, file, CFUNC_NT(var_list, result, belong));
+            condition = checkCondition(is_rego, condition_value, line, file, CNEXT_NT);
 
             if (condition == -1)
                 return -1;
@@ -170,7 +170,7 @@ ResultType ifBranch(FUNC) {
             finally = st->info.node;
         else {
             var_list = popVarList(var_list);
-            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CNEXT_NT);
             return R_error;
         }
     } else {
@@ -180,7 +180,7 @@ ResultType ifBranch(FUNC) {
     }
 
     if (if_list != NULL) {
-        int status = runIfList(if_list, info_vl, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+        int status = runIfList(if_list, info_vl, st->line, st->code_file, CNEXT_NT);
         if (status == -1 || status == 0)
             else_st = NULL;
 
@@ -196,7 +196,7 @@ ResultType ifBranch(FUNC) {
         freeResult(result);
     }
 
-    if (finally != NULL && !runFinally(set_result, ifBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, ifBranchSafeInterStatement, finally, CNEXT_NT)) {
         set_result = false;
         result_from = info_finally_branch;
     }
@@ -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, CFUNC_NT(var_list, result, belong)))
+            if (!runBranchHeard(while_list->condition, while_list->var, &condition_value, CNEXT_NT))
                 return -1;
 
             freeResult(result);
-            condition = checkCondition(do_while, condition_value, line, file, CFUNC_NT(var_list, result, belong));
+            condition = checkCondition(do_while, condition_value, line, file, CNEXT_NT);
         }
 
         do_while = false;
@@ -303,7 +303,7 @@ ResultType whileBranch(FUNC) {
             finally = st->info.node;
         } else {
             var_list = popVarList(var_list);
-            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CNEXT_NT);
             return R_error;
         }
     }
@@ -318,7 +318,7 @@ ResultType whileBranch(FUNC) {
     }
 
     if (while_list != NULL){
-        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));
+        int status = runWhileList(while_list, after, info_vl, after_vl, do_while, st->line, st->code_file, &result_from, CNEXT_NT);
         if (status == -1 || status == 0)
             else_st = NULL;
 
@@ -334,7 +334,7 @@ ResultType whileBranch(FUNC) {
             freeResult(result);
     }
 
-    if (finally != NULL && !runFinally(set_result, cycleBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, cycleBranchSafeInterStatement, finally, CNEXT_NT)) {
         set_result = false;
         result_from = info_finally_branch;
     }
@@ -362,7 +362,7 @@ static int getForHeard(LinkValue **iter, LinkValue **first_yield, StatementList
     result->value = NULL;
     freeResult(result);
 
-    getIter(tmp, 1, line, file, CFUNC_NT(var_list, result, belong));
+    getIter(tmp, 1, line, file, CNEXT_NT);
     gc_freeTmpLink(&tmp->gc_status);
     if (!CHECK_RESULT(result))
         return -1;
@@ -374,7 +374,7 @@ static int getForHeard(LinkValue **iter, LinkValue **first_yield, StatementList
 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, CFUNC_NT(var_list, result, belong));
+        getIter(iter, 0, line, file, CNEXT_NT);
         if (!CHECK_RESULT(result)) {
             if (is_iterStop(result->value, inter)) {
                 freeResult(result);
@@ -397,7 +397,7 @@ static int runForHeard(LinkValue *iter, LinkValue *first_yield, StatementList *f
             return 1;
     }
 
-    assCore(for_list->var, element, false, false, CFUNC_NT(var_list, result, belong));
+    assCore(for_list->var, element, false, false, CNEXT_NT);
     gc_freeTmpLink(&element->gc_status);
     if (!CHECK_RESULT(result))
         return -1;
@@ -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, CFUNC_NT(var_list, result, belong));
+            int status = runForHeard(iter, first_yield, for_list, line, file, CNEXT_NT);
             first_yield = NULL;
             if (status == -1)
                 return -1;
@@ -507,7 +507,7 @@ ResultType forBranch(FUNC) {
             finally = st->info.node;
         } else {
             var_list = popVarList(var_list);
-            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CFUNC_NT(var_list, result, belong));
+            setResultError(E_SystemException, L"Yield Info Error", st->line, st->code_file, true, CNEXT_NT);
             return R_error;
         }
     }
@@ -523,7 +523,7 @@ ResultType forBranch(FUNC) {
     }
 
     if (heard){
-        int status = getForHeard(&iter, &first_yield, for_list, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+        int status = getForHeard(&iter, &first_yield, for_list, st->line, st->code_file, CNEXT_NT);
         if (status == -1) {
             set_result = false;
             for_list = NULL;
@@ -533,7 +533,7 @@ ResultType forBranch(FUNC) {
     }
 
     if (for_list != NULL){
-        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));
+        int status = runForList(for_list, after, info_vl, after_vl, iter, first_yield, st->line, st->code_file, &result_from, CNEXT_NT);
         if (status == -1 || status == 0)
             else_st = NULL;
 
@@ -550,7 +550,7 @@ ResultType forBranch(FUNC) {
             freeResult(result);
     }
 
-    if (finally != NULL && !runFinally(set_result, cycleBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, cycleBranchSafeInterStatement, finally, CNEXT_NT)) {
         set_result = false;
         result_from = info_finally_branch;
     }
@@ -567,12 +567,12 @@ ResultType forBranch(FUNC) {
 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, CFUNC_NT(var_list, result, value));
+    *_enter_ = findAttributes(inter->data.object_enter, false, LINEFILE, 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, CFUNC_NT(var_list, result, value));
+    *_exit_ = findAttributes(inter->data.object_exit, false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(__enter__/__exit__), line, file, true, CNEXT_NT);
         return false;
     }
     gc_addTmpLink(&(*_enter_)->gc_status);
@@ -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, CFUNC_NT(var_list, result, *value));
+        *_enter_ = findAttributes(inter->data.object_enter, false, LINEFILE, 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, CFUNC_NT(var_list, result, *value));
+        *_exit_ = findAttributes(inter->data.object_exit, false, LINEFILE, true, CFUNC_NT(var_list, result, *value));
         if (!CHECK_RESULT(result))
             goto error_;
         freeResult(result);
 
-        if (!getEnterExit(*value, _enter_, _exit_, line, file, CFUNC_NT(var_list, result, belong))) {
+        if (!getEnterExit(*value, _enter_, _exit_, line, file, CNEXT_NT)) {
             error_:
             gc_freeTmpLink(&(*value)->gc_status);
             gc_freeTmpLink(&(*with_belong)->gc_status);
@@ -627,7 +627,7 @@ static int runWithList(StatementList *with_list, LinkValue **with_belong, LinkVa
             return -1;
         }
 
-        callBackCore(*_enter_, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
+        callBackCore(*_enter_, NULL, line, file, 0, CNEXT_NT);
         if (!CHECK_RESULT(result))
             return 0;
 
@@ -711,7 +711,7 @@ ResultType withBranch(FUNC) {
             finally = st->info.node;
         }
     } else {
-        int status = runWithList(with_list, &with_belong, &value, &new, &_enter_, &_exit_, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+        int status = runWithList(with_list, &with_belong, &value, &new, &_enter_, &_exit_, st->line, st->code_file, CNEXT_NT);
         if (status == -1) {
             set_result = false;
             run_block = false;
@@ -786,7 +786,7 @@ ResultType withBranch(FUNC) {
         }
     }
 
-    if (finally != NULL && !runFinally(set_result, withBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, withBranchSafeInterStatement, finally, CNEXT_NT)) {
         set_result = false;
         result_from = info_finally_branch;
     }
@@ -856,7 +856,7 @@ ResultType tryBranch(FUNC) {
                 freeResult(result);
 
                 except_list = st->u.try_branch.except_list;
-                status = checkError(&except_list, error_value, CFUNC_NT(var_list, result, belong));
+                status = checkError(&except_list, error_value, CNEXT_NT);
                 if (status == -1 || status == 0) {
                     set_result = false;
                     result_from = info_vl_branch;
@@ -873,7 +873,7 @@ ResultType tryBranch(FUNC) {
     if (except_list != NULL) {
         if (except_list->var != NULL) {
             gc_addTmpLink(&error_value->gc_status);
-            assCore(except_list->var, error_value, false, false, CFUNC_NT(var_list, result, belong));
+            assCore(except_list->var, error_value, false, false, CNEXT_NT);
             gc_freeTmpLink(&error_value->gc_status);
 
             if (!CHECK_RESULT(result)) {
@@ -903,7 +903,7 @@ ResultType tryBranch(FUNC) {
             freeResult(result);
     }
 
-    if (finally != NULL && !runFinally(set_result, ifBranchSafeInterStatement, finally, CFUNC_NT(var_list, result, belong))) {
+    if (finally != NULL && !runFinally(set_result, ifBranchSafeInterStatement, finally, CNEXT_NT)) {
         set_result = false;
         result_from = info_finally_branch;
     }
@@ -924,7 +924,7 @@ ResultType breakCycle(FUNC){
     if (operationSafeInterStatement(CFUNC(st->u.break_cycle.times, var_list, result, belong)))
         return result->type;
 
-    if (!checkNumber(CFUNC(st, var_list, result, belong)))
+    if (!checkNumber(CNEXT))
         return result->type;
     times_int = (int)result->value->value->data.num.num;
     freeResult(result);
@@ -946,7 +946,7 @@ ResultType continueCycle(FUNC){
     if (operationSafeInterStatement(CFUNC(st->u.continue_cycle.times, var_list, result, belong)))
         return result->type;
 
-    if (!checkNumber(CFUNC(st, var_list, result, belong)))
+    if (!checkNumber(CNEXT))
         return result->type;
     times_int = (int)result->value->value->data.num.num;
     freeResult(result);
@@ -968,7 +968,7 @@ ResultType regoIf(FUNC){
     if (operationSafeInterStatement(CFUNC(st->u.rego_if.times, var_list, result, belong)))
         return result->type;
 
-    if (!checkNumber(CFUNC(st, var_list, result, belong)))
+    if (!checkNumber(CNEXT))
         return result->type;
     times_int = (int)result->value->value->data.num.num;
     freeResult(result);
@@ -990,7 +990,7 @@ ResultType restartCode(FUNC){
     if (operationSafeInterStatement(CFUNC(st->u.restart.times, var_list, result, belong)))
         return result->type;
 
-    if (!checkNumber(CFUNC(st, var_list, result, belong)))
+    if (!checkNumber(CNEXT))
         return result->type;
     times_int = (int)result->value->value->data.num.num;
     freeResult(result);
@@ -1056,13 +1056,13 @@ ResultType assertCode(FUNC){
     if (operationSafeInterStatement(CFUNC(st->u.raise_code.value, var_list, result, belong)))
         return result->type;
 
-    result_ = checkBool(result->value, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+    result_ = checkBool(result->value, st->line, st->code_file, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     else if (result_)
         setResult(result, inter);
     else
-        setResultErrorSt(E_AssertException, L"Assertion check error", true, st, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_AssertException, L"Assertion check error", true, st, CNEXT_NT);
     return result->type;
 }
 
@@ -1074,7 +1074,7 @@ ResultType gotoLabel(FUNC){
     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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, ONLY_ACC(label name, V_str), true, st, CNEXT_NT);
         return result->type;
     }
     label = memWidecpy(result->value->value->data.str.str);
@@ -1086,7 +1086,7 @@ ResultType gotoLabel(FUNC){
         memFree(label);
         return result->type;
     }
-    if (!checkNumber(CFUNC(st, var_list, result, belong))) {
+    if (!checkNumber(CNEXT)) {
         memFree(label);
         return result->type;
     }
@@ -1112,7 +1112,7 @@ ResultType runLabel(FUNC) {
     freeResult(result);
 
     if (st->u.label_.as != NULL)
-        assCore(st->u.label_.as, goto_value, false, false, CFUNC_NT(var_list, result, belong));
+        assCore(st->u.label_.as, goto_value, false, false, CNEXT_NT);
 
     gc_freeTmpLink(&goto_value->gc_status);
     if (st->u.label_.as != NULL && !CHECK_RESULT(result))

+ 28 - 28
VirtulMathCore/src/runcall.c

@@ -6,7 +6,7 @@ ResultType setClass(FUNC) {
     Inherit *class_inherit = NULL;
     setResultCore(result);
 
-    call = getArgument(st->u.set_class.father, false, CFUNC_NT(var_list, result, belong));
+    call = getArgument(st->u.set_class.father, false, CNEXT_NT);
     if (!CHECK_RESULT(result))
         goto error_;
 
@@ -36,7 +36,7 @@ ResultType setClass(FUNC) {
         freeResult(result);
     }
     if (st->u.set_class.decoration != NULL){
-        setDecoration(st->u.set_class.decoration, tmp, CFUNC_NT(var_list, result, belong));
+        setDecoration(st->u.set_class.decoration, tmp, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto error_;
         gc_freeTmpLink(&tmp->gc_status);
@@ -45,7 +45,7 @@ ResultType setClass(FUNC) {
         freeResult(result);
     }
 
-    assCore(st->u.set_class.name, tmp, false, true, CFUNC_NT(var_list, result, belong));
+    assCore(st->u.set_class.name, tmp, false, true, CNEXT_NT);
     if (CHECK_RESULT(result))
         setResult(result, inter);
 
@@ -54,7 +54,7 @@ ResultType setClass(FUNC) {
 
     error_:
     gc_freeTmpLink(&tmp->gc_status);
-    setResultErrorSt(E_BaseException, NULL, false, st, CFUNC_NT(var_list, result, belong));
+    setResultErrorSt(E_BaseException, NULL, false, st, CNEXT_NT);
     return result->type;
 }
 
@@ -62,7 +62,7 @@ ResultType setFunction(FUNC) {
     LinkValue *func = NULL;
     setResultCore(result);
 
-    makeVMFunctionValue(st->u.set_function.function, st->u.set_function.parameter, CFUNC_NT(var_list, result, belong));
+    makeVMFunctionValue(st->u.set_function.function, st->u.set_function.parameter, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return result->type;
     func = result->value;
@@ -84,7 +84,7 @@ ResultType setFunction(FUNC) {
     }
 
     if (st->u.set_function.decoration != NULL){
-        setDecoration(st->u.set_function.decoration, func, CFUNC_NT(var_list, result, belong));
+        setDecoration(st->u.set_function.decoration, func, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto error_;
         gc_freeTmpLink(&func->gc_status);
@@ -92,7 +92,7 @@ ResultType setFunction(FUNC) {
         result->value = NULL;
         freeResult(result);
     }
-    assCore(st->u.set_function.name, func, false, true, CFUNC_NT(var_list, result, belong));
+    assCore(st->u.set_function.name, func, false, true, CNEXT_NT);
     if (CHECK_RESULT(result))
         setResult(result, inter);
 
@@ -106,7 +106,7 @@ ResultType setLambda(FUNC) {
     setResultCore(result);
 
     resunt_st = makeReturnStatement(st->u.base_lambda.function, st->line, st->code_file);
-    makeVMFunctionValue(resunt_st, st->u.base_lambda.parameter, CFUNC_NT(var_list, result, belong));
+    makeVMFunctionValue(resunt_st, st->u.base_lambda.parameter, CNEXT_NT);
     resunt_st->u.return_code.value = NULL;
     freeStatement(resunt_st);
     return result->type;
@@ -124,18 +124,18 @@ ResultType elementSlice(FUNC) {
     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, CFUNC_NT(var_list, result, element));
+    _func_ = findAttributes(func_name, false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        callBackCorePt(_func_, st->u.slice_.index, st->line, st->code_file, CNEXT_NT);
         gc_freeTmpLink(&_func_->gc_status);
     }
     else
-        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(__down__/__slice__), true, st, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(__down__/__slice__), true, st, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&element->gc_status);
@@ -150,7 +150,7 @@ ResultType callBack(FUNC) {
     function_value = result->value;
     result->value = NULL;
     freeResult(result);
-    callBackCorePt(function_value, st->u.call_function.parameter, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+    callBackCorePt(function_value, st->u.call_function.parameter, st->line, st->code_file, CNEXT_NT);
     gc_freeTmpLink(&function_value->gc_status);
     return result->type;
 }
@@ -162,7 +162,7 @@ ResultType callBackCorePt(LinkValue *function_value, Parameter *pt, long line, c
     setResultCore(result);
     gc_addTmpLink(&function_value->gc_status);
 
-    arg = getArgument(pt, false, CFUNC_NT(var_list, result, belong));
+    arg = getArgument(pt, false, CNEXT_NT);
     if (!CHECK_RESULT(result))
         goto return_;
     for (Parameter *tmp = pt; tmp != NULL; tmp = tmp->next, pt_sep++) {
@@ -173,7 +173,7 @@ ResultType callBackCorePt(LinkValue *function_value, Parameter *pt, long line, c
     }
 
     freeResult(result);
-    callBackCore(function_value, arg, line, file, sep ? pt_sep : 0, CFUNC_NT(var_list, result, belong));
+    callBackCore(function_value, arg, line, file, sep ? pt_sep : 0, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&function_value->gc_status);
@@ -186,18 +186,18 @@ static ResultType callClass(LinkValue *class_value, Argument *arg, fline line, c
     setResultCore(result);
     gc_addTmpLink(&class_value->gc_status);
 
-    _new_ = findAttributes(inter->data.object_new, false, 0, "sys", true, CFUNC_NT(var_list, result, class_value));
+    _new_ = findAttributes(inter->data.object_new, false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        callBackCore(_new_, arg, line, file, pt_sep, CNEXT_NT);
         gc_freeTmpLink(&_new_->gc_status);
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(new(__new__)), line, file, true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(new(__new__)), line, file, true, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&class_value->gc_status);
@@ -209,18 +209,18 @@ static ResultType callObject(LinkValue *object_value, Argument *arg, fline line,
     setResultCore(result);
     gc_addTmpLink(&object_value->gc_status);
 
-    _call_ = findAttributes(inter->data.object_call, false, 0, "sys", true, CFUNC_NT(var_list, result, object_value));
+    _call_ = findAttributes(inter->data.object_call, false, LINEFILE, 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, CFUNC_NT(var_list, result, belong));
+        callBackCore(_call_, arg, line, file, pt_sep, CNEXT_NT);
         gc_freeTmpLink(&_call_->gc_status);
     }
     else
-        setResultError(E_TypeException, OBJ_NOTSUPPORT(call(__call__)), line, file, true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, OBJ_NOTSUPPORT(call(__call__)), line, file, true, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&object_value->gc_status);
@@ -234,7 +234,7 @@ static ResultType callCFunction(LinkValue *function_value, Argument *arg, long i
     setResultCore(result);
     gc_addTmpLink(&function_value->gc_status);
 
-    setFunctionArgument(&arg, &bak, function_value, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
+    setFunctionArgument(&arg, &bak, function_value, line, file, pt_sep, CNEXT_NT);
     if (!CHECK_RESULT(result))
         goto return_;
 
@@ -316,7 +316,7 @@ 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, CFUNC_NT(var_list, result, belong));
+    setFunctionArgument(&arg, &bak, func_value, line, file, pt_sep, CNEXT_NT);
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -343,14 +343,14 @@ ResultType callBackCore(LinkValue *function_value, Argument *arg, fline line, ch
     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, CFUNC_NT(var_list, result, belong));
+        callVMFunction(function_value, arg, line, file, pt_sep, CNEXT_NT);
     else if (function_value->value->type == V_func && function_value->value->data.function.type == c_func)
-        callCFunction(function_value, arg, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
+        callCFunction(function_value, arg, line, file, pt_sep, CNEXT_NT);
     else if (function_value->value->type == V_class)
-        callClass(function_value, arg, line, file, pt_sep, CFUNC_NT(var_list, result, belong));
+        callClass(function_value, arg, line, file, pt_sep, CNEXT_NT);
     else
-        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));
+        callObject(function_value, arg, line, file, pt_sep, CNEXT_NT);
+    setResultError(E_BaseException, NULL, line, file, false, CNEXT_NT);
 
     gc_freeTmpLink(&function_value->gc_status);
     return result->type;
@@ -370,7 +370,7 @@ ResultType setDecoration(DecorationStatement *ds, LinkValue *value, FUNC_NT) {
         result->value = NULL;
 
         freeResult(result);
-        callBackCorePt(decall, pt, ds->decoration->line, ds->decoration->code_file, CFUNC_NT(var_list, result, belong));
+        callBackCorePt(decall, pt, ds->decoration->line, ds->decoration->code_file, CNEXT_NT);
         gc_freeTmpLink(&decall->gc_status);
         freeParameter(pt, true);
         if (!CHECK_RESULT(result))

+ 17 - 17
VirtulMathCore/src/runfile.c

@@ -4,10 +4,10 @@ bool importRunParser(ParserMessage *pm, fline line, char *file, Statement *run_s
     setResultCore(result);
     parserCommandList(pm, inter, true, false, run_st);
     if (pm->status == int_error)
-        setResultError(E_KeyInterrupt, KEY_INTERRUPT, line, file, true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_KeyInterrupt, KEY_INTERRUPT, line, file, true, CNEXT_NT);
     else if (pm->status != success) {
         wchar_t *wcs_message = memStrToWcs(pm->status_message, false);
-        setResultError(E_TypeException, wcs_message, line, file, true, CFUNC_NT(var_list, result, belong));
+        setResultError(E_TypeException, wcs_message, line, file, true, CNEXT_NT);
         memFree(wcs_message);
     }
     return CHECK_RESULT(result);
@@ -115,7 +115,7 @@ int checkFileDir(char **file_dir, FUNC) {
         return 2;
 
     error_:
-    setResultErrorSt(E_ImportException, L"import/include file is not readable", true, st, CFUNC_NT(var_list, result, belong));
+    setResultErrorSt(E_ImportException, L"import/include file is not readable", true, st, CNEXT_NT);
     return 0;
 }
 
@@ -129,26 +129,26 @@ ResultType includeFile(FUNC) {
         return result->type;
 
     if (!isType(result->value->value, V_str)){
-        setResultErrorSt(E_TypeException, ONLY_ACC(include file dir, V_str), true, st, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, ONLY_ACC(include file dir, V_str), true, st, CNEXT_NT);
         goto return_;
     }
 
     file_dir = memWcsToStr(result->value->value->data.str.str, false);
     freeResult(result);
-    if (checkFileDir(&file_dir, CFUNC(st, var_list, result, belong)) != 1)
+    if (checkFileDir(&file_dir, CNEXT) != 1)
         goto return_;
 
     new_st = makeStatement(0, file_dir);
     pm = makeParserMessage(file_dir);
 
-    if (!importRunParser(pm, st->line, st->code_file, new_st, CFUNC_NT(var_list, result, belong)))
+    if (!importRunParser(pm, st->line, st->code_file, new_st, CNEXT_NT))
         goto return_;
 
     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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_BaseException, NULL, false, st, CNEXT_NT);
 
     return_:
     memFree(file_dir);
@@ -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, CFUNC_NT(var_list, result, belong)))
+    if (!importRunParser(pm, line, code_file, run_st, CNEXT_NT))
         goto return_;
 
     globalIterStatement(result, import_inter, run_st);
     if (!CHECK_RESULT(result))
-        setResultError(E_BaseException, NULL, line, code_file, false, CFUNC_NT(var_list, result, belong));
+        setResultError(E_BaseException, NULL, line, code_file, false, CNEXT_NT);
     else
         setResult(result, inter);
 
@@ -183,18 +183,18 @@ ResultType importVMFileCore(Inter *import_inter, char *path, fline line, char *c
 
 ResultType importFileCore(char **path, char **split, int *status, FUNC) {
     setResultCore(result);
-    if (operationSafeInterStatement(CFUNC(st, var_list, result, belong)))
+    if (operationSafeInterStatement(CNEXT))
         return result->type;
 
     if (!isType(result->value->value, V_str)) {
-        setResultErrorSt(E_ImportException, ONLY_ACC(include file dir, V_str), true, st, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_ImportException, ONLY_ACC(include file dir, V_str), true, st, CNEXT_NT);
         return R_error;
     }
 
     *path = memWcsToStr(result->value->value->data.str.str, false);
     *split = splitDir(*path);  // 自动去除末尾路径分隔符
     freeResult(result);
-    if ((*status = checkFileDir(path, CFUNC(st, var_list, result, belong))) == 0)
+    if ((*status = checkFileDir(path, CNEXT)) == 0)
         return result->type;
 
     return result->type;
@@ -205,7 +205,7 @@ ResultType runImportFile(Inter *import_inter, char **path, int status, FUNC) {
     if (status == 2)
         importClibCore(*path, belong, CFUNC_CORE(inter->var_list));
     else
-        importVMFileCore(import_inter, *path, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+        importVMFileCore(import_inter, *path, st->line, st->code_file, CNEXT_NT);
 
     import_inter->var_list = NULL;
     mergeInter(import_inter, inter);
@@ -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, CFUNC(st, var_list, result, belong));
+        runImportFile(imp_inter, path, status, CNEXT);
         if (!CHECK_RESULT(result))
             return false;
     } else
@@ -258,11 +258,11 @@ ResultType importFile(FUNC) {
     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, CFUNC_NT(var_list, result, belong));
+        addStrVar(name_, false, is_new, imp_value, LINEFILE, false, CNEXT_NT);
         memFree(name_);
     }
     else
-        assCore(st->u.import_file.as, imp_value, false, is_new, CFUNC_NT(var_list, result, belong));
+        assCore(st->u.import_file.as, imp_value, false, is_new, CNEXT_NT);
 
     if (CHECK_RESULT(result))
         setResult(result, inter);
@@ -285,7 +285,7 @@ static ResultType importParameter(fline line, char *file, Parameter *call_pt, Pa
     }
 
     freeResult(result);
-    setParameterCore(line, file, call, func_pt, func_var, CFUNC_NT(var_list, result, belong));
+    setParameterCore(line, file, call, func_pt, func_var, CNEXT_NT);
     freeArgument(call, false);
     return result->type;
 }

+ 57 - 57
VirtulMathCore/src/runoperation.c

@@ -17,26 +17,26 @@ ResultType operationStatement(FUNC) {
     setResultCore(result);
     switch (st->u.operation.OperationType) {
         case OPT_ADD:
-            operationCore(CFUNC(st, var_list, result, belong), inter->data.object_add);
+            operationCore(CNEXT, inter->data.object_add);
             break;
         case OPT_SUB:
-            operationCore(CFUNC(st, var_list, result, belong), inter->data.object_sub);
+            operationCore(CNEXT, inter->data.object_sub);
             break;
         case OPT_MUL:
-            operationCore(CFUNC(st, var_list, result, belong), inter->data.object_mul);
+            operationCore(CNEXT, inter->data.object_mul);
             break;
         case OPT_DIV:
-            operationCore(CFUNC(st, var_list, result, belong), inter->data.object_div);
+            operationCore(CNEXT, inter->data.object_div);
             break;
         case OPT_ASS:
-            assOperation(CFUNC(st, var_list, result, belong));
+            assOperation(CNEXT);
             break;
         case OPT_LINK:
         case OPT_POINT:
-            pointOperation(CFUNC(st, var_list, result, belong));
+            pointOperation(CNEXT);
             break;
         case OPT_BLOCK:
-            blockOperation(CFUNC(st, var_list, result, belong));
+            blockOperation(CNEXT);
             break;
         default:
             setResult(result, inter);
@@ -111,12 +111,12 @@ ResultType pointOperation(FUNC) {
 
     if (object == NULL) {
         setResultError(E_TypeException, OBJ_NOTSUPPORT(->/.), st->line, st->code_file, true,
-                       CFUNC_NT(var_list, result, belong));
+                       CNEXT_NT);
         goto return_;
     }
     gc_freeze(inter, var_list, object, true);
     operationSafeInterStatement(CFUNC(st->u.operation.right, object, result, left));  // 点运算运算时需要调整belong为点的左值
-    if (!CHECK_RESULT(result) || !checkAut(left->aut, result->value->aut, st->line, st->code_file, NULL, false, CFUNC_NT(var_list, result, belong)))
+    if (!CHECK_RESULT(result) || !checkAut(left->aut, result->value->aut, st->line, st->code_file, NULL, false, CNEXT_NT))
         PASS;
     else if (result->value->belong == NULL || result->value->belong->value != left->value && checkAttribution(left->value, result->value->belong->value))
         result->value->belong = left;
@@ -131,27 +131,27 @@ ResultType delOperation(FUNC) {
     Statement *var;
     setResultCore(result);
     var = st->u.del_.var;
-    delCore(var, false, CFUNC_NT(var_list, result, belong));
+    delCore(var, false, CNEXT_NT);
     return result->type;
 }
 
 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, CFUNC_NT(var_list, result, belong));
+        listDel(name, CNEXT_NT);
     else if (name->type == slice_)
-        downDel(name, CFUNC_NT(var_list, result, belong));
+        downDel(name, CNEXT_NT);
     else if (name->type == operation && (name->u.operation.OperationType == OPT_POINT || name->u.operation.OperationType == OPT_LINK))
-        pointDel(name, CFUNC_NT(var_list, result, belong));
+        pointDel(name, CNEXT_NT);
     else
-        varDel(name, check_aut, CFUNC_NT(var_list, result, belong));
+        varDel(name, check_aut, CNEXT_NT);
     return result->type;
 }
 
 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, CFUNC_NT(var_list, result, belong));
+        delCore(pt->data.value, false, CNEXT_NT);
         freeResult(result);
     }
     setResultBase(result, inter);
@@ -170,7 +170,7 @@ ResultType varDel(Statement *name, bool check_aut, FUNC_NT) {
     if (check_aut) {
         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, CFUNC_NT(var_list, result, belong))) {
+        if (tmp != NULL && !checkAut(name->aut, tmp->aut, name->line, name->code_file, NULL, false, CNEXT_NT)) {
             goto return_;
         }
     }
@@ -196,7 +196,7 @@ ResultType pointDel(Statement *name, FUNC_NT) {
 
     if (object == NULL) {
         setResultError(E_TypeException, OBJ_NOTSUPPORT(->/.), name->line, name->code_file, true,
-                       CFUNC_NT(var_list, result, belong));
+                       CNEXT_NT);
         goto return_;
     }
 
@@ -225,9 +225,9 @@ ResultType downDel(Statement *name, FUNC_NT) {
     freeResult(result);
 
     if (name->u.slice_.type == SliceType_down_)
-        _func_ = findAttributes(inter->data.object_down_del, false, 0, "sys", true, CFUNC_NT(var_list, result, iter));
+        _func_ = findAttributes(inter->data.object_down_del, false, LINEFILE, true, CFUNC_NT(var_list, result, iter));
     else
-        _func_ = findAttributes(inter->data.object_slice_del, false, 0, "sys", true, CFUNC_NT(var_list, result, iter));
+        _func_ = findAttributes(inter->data.object_slice_del, false, LINEFILE, true, CFUNC_NT(var_list, result, iter));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -235,19 +235,19 @@ ResultType downDel(Statement *name, FUNC_NT) {
     if (_func_ != NULL){
         Argument *arg = NULL;
         gc_addTmpLink(&_func_->gc_status);
-        arg = getArgument(pt, false, CFUNC_NT(var_list, result, belong));
+        arg = getArgument(pt, false, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto dderror_;
         freeResult(result);
         callBackCore(_func_, arg, name->line, name->code_file, 0,
-                     CFUNC_NT(var_list, result, belong));
+                     CNEXT_NT);
 
         dderror_:
         gc_freeTmpLink(&_func_->gc_status);
         freeArgument(arg, true);
     }
     else
-        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(del(__down_del__/__slice_del__)), true, name, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(del(__down_del__/__slice_del__)), true, name, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&iter->gc_status);
@@ -260,14 +260,14 @@ ResultType assOperation(FUNC) {
     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, CFUNC_NT(var_list, result, belong));
+        makeVMFunctionValue(return_st, st->u.operation.left->u.call_function.parameter, CNEXT_NT);
         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, CFUNC_NT(var_list, result, belong));
+        assCore(st->u.operation.left->u.call_function.function, func, false, true, CNEXT_NT);
         gc_freeTmpLink(&func->gc_status);
     }
     else{
@@ -277,7 +277,7 @@ ResultType assOperation(FUNC) {
 
         freeResult(result);
         assCore(st->u.operation.left, value, false, false,
-                CFUNC_NT(var_list, result, belong));
+                CNEXT_NT);
     }
     return result->type;
 }
@@ -287,13 +287,13 @@ ResultType assCore(Statement *name, LinkValue *value, bool check_aut, bool setti
     gc_addTmpLink(&value->gc_status);
 
     if (name->type == base_list && name->u.base_list.type == L_tuple)
-        listAss(name, value, CFUNC_NT(var_list, result, belong));
+        listAss(name, value, CNEXT_NT);
     else if (name->type == slice_)
-        downAss(name, value, CFUNC_NT(var_list, result, belong));
+        downAss(name, value, CNEXT_NT);
     else if (name->type == operation && (name->u.operation.OperationType == OPT_POINT || name->u.operation.OperationType == OPT_LINK))
-        pointAss(name, value, CFUNC_NT(var_list, result, belong));
+        pointAss(name, value, CNEXT_NT);
     else
-        varAss(name, value, check_aut, setting, CFUNC_NT(var_list, result, belong));
+        varAss(name, value, check_aut, setting, CNEXT_NT);
 
     gc_freeTmpLink(&value->gc_status);
     return result->type;
@@ -322,12 +322,12 @@ ResultType varAss(Statement *name, LinkValue *value, bool check_aut, bool settin
 
     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, CFUNC_NT(var_list, result, belong)))
+        if (tmp != NULL && !checkAut(value->aut, tmp->aut, name->line, name->code_file, NULL, false, CNEXT_NT))
             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, CFUNC_NT(var_list, result, belong)))
+    if (tmp == NULL || !run || !setVarFunc(tmp, value, name->line, name->code_file, CNEXT_NT))
         addFromVarList(str_name, name_, int_times, value, CFUNC_CORE(var_list));
     if (CHECK_RESULT(result))
         goto error_;
@@ -356,15 +356,15 @@ ResultType listAss(Statement *name, LinkValue *value, FUNC_NT) {
 
     setResultCore(result);
     pt = makeArgsParameter(tmp_st);
-    call = getArgument(pt, false, CFUNC_NT(var_list, result, belong));
+    call = getArgument(pt, false, CNEXT_NT);
     if (!CHECK_RESULT(result))
         goto return_;
 
     freeResult(result);
-    setParameterCore(name->line, name->code_file, call, name->u.base_list.list, var_list, CFUNC_NT(var_list, result, belong));
+    setParameterCore(name->line, name->code_file, call, name->u.base_list.list, var_list, CNEXT_NT);
     if (CHECK_RESULT(result)){
         freeResult(result);
-        makeListValue(call, name->line, name->code_file, L_tuple, CFUNC_NT(var_list, result, belong));
+        makeListValue(call, name->line, name->code_file, L_tuple, CNEXT_NT);
     }
     return_:
     freeArgument(call, false);
@@ -385,9 +385,9 @@ ResultType downAss(Statement *name, LinkValue *value, FUNC_NT) {
     freeResult(result);
 
     if (name->u.slice_.type == SliceType_down_)
-        _func_ = findAttributes(inter->data.object_down_assignment, false, 0, "sys", true, CFUNC_NT(var_list, result, iter));
+        _func_ = findAttributes(inter->data.object_down_assignment, false, LINEFILE, true, CFUNC_NT(var_list, result, iter));
     else
-        _func_ = findAttributes(inter->data.object_slice_assignment, false, 0, "sys", true, CFUNC_NT(var_list, result, iter));
+        _func_ = findAttributes(inter->data.object_slice_assignment, false, LINEFILE, true, CFUNC_NT(var_list, result, iter));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -395,19 +395,19 @@ ResultType downAss(Statement *name, LinkValue *value, FUNC_NT) {
     if (_func_ != NULL){
         Argument *arg = makeValueArgument(value);
         gc_addTmpLink(&_func_->gc_status);
-        arg->next = getArgument(pt, false, CFUNC_NT(var_list, result, belong));
+        arg->next = getArgument(pt, false, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto daerror_;
 
         freeResult(result);
-        callBackCore(_func_, arg, name->line, name->code_file, 0, CFUNC_NT(var_list, result, belong));
+        callBackCore(_func_, arg, name->line, name->code_file, 0, CNEXT_NT);
 
         daerror_:
         freeArgument(arg, true);
         gc_freeTmpLink(&_func_->gc_status);
     }
     else
-        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(assignment(__down_assignment__/__slice_assignment__)), true, name, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, OBJ_NOTSUPPORT(assignment(__down_assignment__/__slice_assignment__)), true, name, CNEXT_NT);
 
     return_:
     gc_freeTmpLink(&iter->gc_status);
@@ -429,7 +429,7 @@ ResultType pointAss(Statement *name, LinkValue *value, FUNC_NT) {
 
     if (object == NULL) {
         setResultError(E_TypeException, OBJ_NOTSUPPORT(->/.), name->line, name->code_file, true,
-                       CFUNC_NT(var_list, result, belong));
+                       CNEXT_NT);
         goto return_;
     }
 
@@ -451,7 +451,7 @@ ResultType getVar(FUNC, VarInfo var_info) {
     LinkValue *var;
 
     setResultCore(result);
-    var_info(&name, &int_times, CFUNC(st, var_list, result, belong));
+    var_info(&name, &int_times, CNEXT);
     if (!CHECK_RESULT(result)) {
         memFree(name);
         return result->type;
@@ -461,12 +461,12 @@ ResultType getVar(FUNC, VarInfo var_info) {
     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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_NameExceptiom, message, true, st, CNEXT_NT);
         memFree(message);
     }
-    else if (checkAut(st->aut, var->aut, st->line, st->code_file, NULL, true, CFUNC_NT(var_list, result, belong))) {
+    else if (checkAut(st->aut, var->aut, st->line, st->code_file, NULL, true, CNEXT_NT)) {
         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, CFUNC_NT(var_list, result, belong)))
+        if (!run || !runVarFunc(var, st->line, st->code_file, CNEXT_NT))
             setResultOperationBase(result, var);
     }
     memFree(name);
@@ -484,22 +484,22 @@ ResultType getBaseValue(FUNC) {
     else
         switch (st->u.base_value.type) {
             case number_str:
-                makeNumberValue(wcstoll(st->u.base_value.str, NULL, 10), st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+                makeNumberValue(wcstoll(st->u.base_value.str, NULL, 10), st->line, st->code_file, CNEXT_NT);
                 break;
             case bool_true:
-                makeBoolValue(true, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+                makeBoolValue(true, st->line, st->code_file, CNEXT_NT);
                 break;
             case bool_false:
-                makeBoolValue(false, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+                makeBoolValue(false, st->line, st->code_file, CNEXT_NT);
                 break;
             case pass_value:
-                makePassValue(st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+                makePassValue(st->line, st->code_file, CNEXT_NT);
                 break;
             case null_value:
                 useNoneValue(inter, result);
                 break;
             default:
-                makeStringValue(st->u.base_value.str, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+                makeStringValue(st->u.base_value.str, st->line, st->code_file, CNEXT_NT);
                 break;
         }
     return result->type;
@@ -510,14 +510,14 @@ ResultType getList(FUNC) {
     Argument *at_tmp = NULL;
 
     setResultCore(result);
-    at = getArgument(st->u.base_list.list, false, CFUNC_NT(var_list, result, belong));
+    at = getArgument(st->u.base_list.list, false, CNEXT_NT);
     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, CFUNC_NT(var_list, result, belong));
+    makeListValue(at, st->line, st->code_file, st->u.base_list.type, CNEXT_NT);
     freeArgument(at_tmp, false);
 
     return result->type;
@@ -527,14 +527,14 @@ ResultType getDict(FUNC) {
     Argument *at = NULL;
 
     setResultCore(result);
-    at = getArgument(st->u.base_dict.dict, true, CFUNC_NT(var_list, result, belong));
+    at = getArgument(st->u.base_dict.dict, true, CNEXT_NT);
     if (!CHECK_RESULT(result)) {
         freeArgument(at, false);
         return result->type;
     }
 
     freeResult(result);
-    Value *tmp_value = makeDictValue(at, true, st->line, st->code_file, CFUNC_NT(var_list, result, belong));
+    Value *tmp_value = makeDictValue(at, true, st->line, st->code_file, CNEXT_NT);
     if (!CHECK_RESULT(result)) {
         freeArgument(at, false);
         return result->type;
@@ -592,10 +592,10 @@ ResultType operationCore(FUNC, wchar_t *name) {
     setResultCore(&left);
     setResultCore(&right);
 
-    if (getLeftRightValue(&left, &right, CFUNC(st, var_list, result, belong)))  // 不需要释放result
+    if (getLeftRightValue(&left, &right, CNEXT))  // 不需要释放result
         return result->type;
 
-    _func_ = findAttributes(name, false, 0, "sys", true, CFUNC_NT(var_list, result, left.value));
+    _func_ = findAttributes(name, false, LINEFILE, true, CFUNC_NT(var_list, result, left.value));
     if (!CHECK_RESULT(result))
         goto return_;
     freeResult(result);
@@ -603,13 +603,13 @@ ResultType operationCore(FUNC, 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, CFUNC_NT(var_list, result, belong));
+        callBackCore(_func_, arg, st->line, st->code_file, 0, CNEXT_NT);
         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, CFUNC_NT(var_list, result, belong));
+        setResultErrorSt(E_TypeException, message, true, st, CNEXT_NT);
         memFree(message);
     }
 

+ 18 - 18
VirtulMathCore/src/value.c

@@ -43,7 +43,7 @@ Value *useNoneValue(Inter *inter, Result *result) {
 Value *makeBoolValue(bool bool_num, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.bool_, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
+    callBackCore(inter->data.bool_, NULL, line, file, 0, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -54,7 +54,7 @@ Value *makeBoolValue(bool bool_num, fline line, char *file, FUNC_NT) {
 Value *makePassValue(fline line, char *file, FUNC_NT){  // TODO-szh 让切片支持该语法 检查语法解析器支持 a[::]的语法
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.pass_, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
+    callBackCore(inter->data.pass_, NULL, line, file, 0, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -64,7 +64,7 @@ Value *makePassValue(fline line, char *file, FUNC_NT){  // TODO-szh 让切片支
 Value *makeNumberValue(vnum num, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.num, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
+    callBackCore(inter->data.num, NULL, line, file, 0, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -75,7 +75,7 @@ Value *makeNumberValue(vnum num, fline line, char *file, FUNC_NT) {
 Value *makeStringValue(wchar_t *str, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     setResultCore(result);
-    callBackCore(inter->data.str, NULL, line, file, 0, CFUNC_NT(var_list, result, belong));
+    callBackCore(inter->data.str, NULL, line, file, 0, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
 
@@ -88,7 +88,7 @@ Value *makeStringValue(wchar_t *str, fline line, char *file, FUNC_NT) {
 Value *makeVMFunctionValue(Statement *st, Parameter *pt, FUNC_NT) {
     Value *tmp = NULL;
     callBackCore(inter->data.function, NULL, st->line, st->code_file, 0,
-                 CFUNC_NT(var_list, result, belong));
+                 CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -107,7 +107,7 @@ Value *makeVMFunctionValue(Statement *st, Parameter *pt, FUNC_NT) {
 Value *makeCFunctionValue(OfficialFunction of, fline line, char *file, FUNC_NT) {
     Value *tmp = NULL;
     callBackCore(inter->data.function, NULL, line, file, 0,
-                 CFUNC_NT(var_list, result, belong));
+                 CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -167,10 +167,10 @@ Value *makeListValue(Argument *arg, fline line, char *file, enum ListType type,
     setResultCore(result);
     if (type == L_list)
         callBackCore(inter->data.list, arg, line, file, 0,
-                     CFUNC_NT(var_list, result, belong));
+                     CNEXT_NT);
     else
         callBackCore(inter->data.tuple, arg, line, file, 0,
-                     CFUNC_NT(var_list, result, belong));
+                     CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -180,7 +180,7 @@ Value *makeListValue(Argument *arg, fline line, char *file, enum ListType type,
 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, CFUNC_NT(var_list, result, belong));
+    callBackCore(inter->data.dict, arg, line, file, 0, CNEXT_NT);
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
@@ -290,7 +290,7 @@ void setResultBase(Result *ru, Inter *inter) {
 }
 
 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));
+    setResultError(type, error_message, st->line, st->code_file, new, CNEXT_NT);
 }
 
 LinkValue *findBaseError(BaseErrorType type, Inter *inter){
@@ -344,7 +344,7 @@ static wchar_t *getErrorInfo(LinkValue *exc, int type, FUNC_NT){
     setResultCore(result);
     gc_addTmpLink(&exc->gc_status);
 
-    _info_ = findAttributes(str_name, false, 0, "sys", true, CFUNC_NT(var_list, result, exc));
+    _info_ = findAttributes(str_name, false, LINEFILE, true, CFUNC_NT(var_list, result, exc));
     gc_freeTmpLink(&exc->gc_status);
     if (!CHECK_RESULT(result))
         return NULL;
@@ -362,7 +362,7 @@ void callException(LinkValue *exc, wchar_t *message, fline line, char *file, FUN
     setResultCore(result);
     gc_addTmpLink(&exc->gc_status);
 
-    _new_ = findAttributes(inter->data.object_new, false, 0, "sys", true, CFUNC_NT(var_list, result, exc));
+    _new_ = findAttributes(inter->data.object_new, false, LINEFILE, 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, FUN
     if (_new_ != NULL){
         Argument *arg = NULL;
         LinkValue *error;
-        makeStringValue(message, line, file, CFUNC_NT(var_list, result, belong));
+        makeStringValue(message, line, file, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto return_;
         arg =  makeValueArgument(result->value);
         freeResult(result);
 
         gc_addTmpLink(&_new_->gc_status);
-        callBackCore(_new_, arg, line, file, 0, CFUNC_NT(var_list, result, belong));
+        callBackCore(_new_, arg, line, file, 0, CNEXT_NT);
         error = result->value;
         result->value = NULL;
         freeResult(result);
         gc_freeTmpLink(&_new_->gc_status);
         freeArgument(arg, true);
 
-        type = getErrorInfo(error, 1, CFUNC_NT(var_list, result, belong));
+        type = getErrorInfo(error, 1, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto return_;
         freeResult(result);
-        error_message = getErrorInfo(error, 2, CFUNC_NT(var_list, result, belong));
+        error_message = getErrorInfo(error, 2, CNEXT_NT);
         if (!CHECK_RESULT(result))
             goto return_;
         freeResult(result);
@@ -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, CFUNC_NT(var_list, result, belong));
+        callException(exc, error_message, line, file, CNEXT_NT);
     }
     else
         result->error = connectError(makeError(NULL, NULL, line, file), result->error);
@@ -614,7 +614,7 @@ bool callDel(Value *object_value, Result *result, Inter *inter, VarList *var_lis
         gc_addTmpLink(&_del_->gc_status);
         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, CFUNC_NT(var_list, result, inter->base_belong));
+        callBackCore(_del_, NULL, LINEFILE, 0, CFUNC_NT(var_list, result, inter->base_belong));
         gc_freeTmpLink(&_del_->gc_status);
         return true;
     } else