__run.c 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. #include "__run.h"
  2. ResultType getBaseVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
  3. *name = setStrVarName(st->u.base_var.name, false, inter);
  4. *times = 0;
  5. if (st->u.base_var.times == NULL){
  6. *times = 0;
  7. goto not_times;
  8. }
  9. if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.base_var.times, var_list, result, belong)))
  10. return result->type;
  11. if (!isType(result->value->value, V_num)){
  12. setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  13. return result->type;
  14. }
  15. *times = (int)result->value->value->data.num.num;
  16. freeResult(result);
  17. not_times:
  18. makeStringValue(st->u.base_var.name, st->line, st->code_file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  19. return result->type;
  20. }
  21. ResultType getBaseSVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
  22. freeResult(result);
  23. if (st->u.base_svar.times == NULL){
  24. *times = 0;
  25. goto not_times;
  26. }
  27. if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.base_svar.times, var_list, result, belong)))
  28. return result->type;
  29. if (!isType(result->value->value, V_num)){
  30. setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  31. return result->type;
  32. }
  33. *times = (int)result->value->value->data.num.num;
  34. freeResult(result);
  35. not_times:
  36. if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.base_svar.name, var_list, result, belong)))
  37. return result->type;
  38. *name = getNameFromValue(result->value->value, inter);
  39. result->type = R_opt; // 执行 operationSafeInterStatement 的时候已经初始化 result
  40. return result->type;
  41. }
  42. ResultType getVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
  43. if (st->type == base_var)
  44. getBaseVarInfo(name, times, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
  45. else if (st->type == base_svar)
  46. getBaseSVarInfo(name, times, CALL_INTER_FUNCTIONSIG(st, var_list, result, belong));
  47. else{
  48. if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))
  49. return result->type;
  50. *name = getNameFromValue(result->value->value, inter);
  51. *times = 0;
  52. }
  53. return result->type;
  54. }
  55. wchar_t *setStrVarName(wchar_t *old, bool free_old, Inter *inter) {
  56. return memWidecat(inter->data.var_str_prefix, old, false, free_old);
  57. }
  58. wchar_t *setNumVarName(vnum num, struct Inter *inter) {
  59. wchar_t name[50];
  60. swprintf(name, 50, L"%lld", num);
  61. return memWidecat(inter->data.var_num_prefix, name, false, false);
  62. }
  63. wchar_t *getNameFromValue(Value *value, struct Inter *inter) {
  64. switch (value->type){
  65. case V_str:
  66. return setStrVarName(value->data.str.str, true, inter);
  67. case V_num:
  68. return setNumVarName(value->data.num.num, inter);
  69. case V_bool:
  70. if (value->data.bool_.bool_)
  71. return memWidecat(inter->data.var_bool_prefix, L"true", false, false);
  72. else
  73. return memWidecat(inter->data.var_bool_prefix, L"false", false, false);
  74. case V_none:
  75. return memWidecpy(inter->data.var_none);
  76. case V_ell:
  77. return memWidecpy(inter->data.var_pass);
  78. case V_class:{
  79. size_t len = memWidelen(inter->data.var_class_prefix) + 20; // 预留20个字节给指针
  80. wchar_t *name = memWide(len);
  81. wchar_t *return_ = NULL;
  82. swprintf(name, len, L"%ls%p", inter->data.var_class_prefix, value);
  83. return_ = memWidecpy(name); // 再次复制去除多余的空字节
  84. memFree(name);
  85. return return_;
  86. }
  87. default:{
  88. size_t len = memWidelen(inter->data.var_object_prefix) + 20;
  89. wchar_t *name = memWide(len);
  90. wchar_t *return_ = NULL;
  91. swprintf(name, len, L"%ls%p", inter->data.var_object_prefix, value);
  92. return_ = memWidecpy(name); // 再次复制去除多余的空字节
  93. memFree(name);
  94. return return_;
  95. }
  96. }
  97. }
  98. bool popStatementVarList(Statement *funtion_st, VarList **function_var, VarList *out_var, Inter *inter){
  99. bool yield_run;
  100. if ((yield_run = funtion_st->info.have_info)) {
  101. *function_var = funtion_st->info.var_list;
  102. (*function_var)->next = out_var;
  103. }
  104. else
  105. *function_var = pushVarList(out_var, inter);
  106. return yield_run;
  107. }
  108. void newFunctionYield(Statement *funtion_st, Statement *node, VarList *new_var, Inter *inter){
  109. new_var->next = NULL;
  110. gc_freeze(inter, new_var, NULL, true);
  111. funtion_st->info.var_list = new_var;
  112. funtion_st->info.node = node->type == yield_code ? node->next : node;
  113. funtion_st->info.have_info = true;
  114. }
  115. void updateFunctionYield(Statement *function_st, Statement *node){
  116. function_st->info.node = node->type == yield_code ? node->next : node;
  117. function_st->info.have_info = true;
  118. }
  119. ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func, fline line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST){
  120. Argument *tmp = NULL;
  121. LinkValue *self;
  122. LinkValue *func;
  123. enum FunctionPtType pt_type = _func->value->data.function.function_data.pt_type;
  124. setResultCore(result);
  125. switch (pt_sep) {
  126. case 0:
  127. func = _func;
  128. self = pt_type == cls_free_ || pt_type == cls_static_ ? _func->value->data.function.function_data.cls : _func->belong;
  129. *base = *arg;
  130. break;
  131. case 1: {
  132. if (*arg != NULL) {
  133. if (pt_type == static_) {
  134. func = (*arg)->data.value;
  135. self = NULL; // static_模式不需要self
  136. }
  137. else {
  138. func = _func;
  139. self = (*arg)->data.value;
  140. }
  141. *arg = (*arg)->next; // 忽略第一个arg, 但是不释放(在该函数外部统一释放)
  142. *base = *arg;
  143. } else {
  144. error_:
  145. setResultError(E_ArgumentException, FEW_ARG, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  146. return R_error;
  147. }
  148. break;
  149. }
  150. case 2: {
  151. if (*arg != NULL && (*arg)->next != NULL) {
  152. func = (*arg)->data.value;
  153. self = (*arg)->next->data.value; // 第一个参数是func, 第二个是self; 这样做保证了和形参调用的一致
  154. *arg = (*arg)->next->next;
  155. *base = *arg;
  156. } else
  157. goto error_;
  158. break;
  159. }
  160. default:
  161. setResultError(E_ArgumentException, MANY_ARG, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  162. return R_error;
  163. }
  164. if (pt_type != free_ && self == NULL) {
  165. setResultError(E_ArgumentException, L"Function does not belong to anything(not self)", line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  166. return R_error;
  167. }
  168. switch (pt_type) {
  169. case static_:
  170. tmp = makeValueArgument(func);
  171. tmp->next = *arg;
  172. *arg = tmp;
  173. break;
  174. case class_static_:
  175. tmp = makeValueArgument(func);
  176. if (self->value->type != V_class) {
  177. Inherit *ih = self->value->object.inherit;
  178. self = NULL;
  179. for (PASS; ih != NULL; ih = ih->next) // 使用循环的方式检查
  180. if (ih->value->value->type == V_class) {
  181. self = ih->value;
  182. break;
  183. }
  184. }
  185. if (self != NULL) {
  186. tmp->next = makeValueArgument(self);
  187. tmp->next->next = *arg;
  188. } else // 若未检查到class, 则放弃该形参(由原arg补上)
  189. tmp->next = *arg;
  190. *arg = tmp;
  191. break;
  192. case cls_static_:
  193. case all_static_:
  194. tmp = makeValueArgument(func);
  195. tmp->next = makeValueArgument(self);
  196. tmp->next->next = *arg;
  197. *arg = tmp;
  198. break;
  199. case object_static_:
  200. tmp = makeValueArgument(func);
  201. if (self->value->type != V_class){
  202. tmp->next = makeValueArgument(self);
  203. tmp->next->next = *arg;
  204. }
  205. else
  206. tmp->next = *arg;
  207. *arg = tmp;
  208. break;
  209. case class_free_:
  210. if (self->value->type != V_class){
  211. Inherit *ih = self->value->object.inherit;
  212. self = NULL;
  213. for (PASS; ih != NULL; ih = ih->next) // 循环检查
  214. if (ih->value->value->type == V_class) {
  215. self = ih->value;
  216. break;
  217. }
  218. }
  219. if (self != NULL) { // 若检查到class
  220. tmp = makeValueArgument(self);
  221. tmp->next = *arg;
  222. *arg = tmp;
  223. } // 若无class则不对arg做任何调整
  224. break;
  225. case object_free_:
  226. if (self->value->type != V_class) {
  227. tmp = makeValueArgument(self);
  228. tmp->next = *arg;
  229. *arg = tmp;
  230. }
  231. break;
  232. case cls_free_:
  233. case all_free_:
  234. tmp = makeValueArgument(self);
  235. tmp->next = *arg;
  236. *arg = tmp;
  237. break;
  238. default:
  239. break;
  240. }
  241. setResultBase(result, inter);
  242. return result->type;
  243. }
  244. void freeFunctionArgument(Argument *arg, Argument *base) {
  245. for (Argument *tmp = arg; tmp != NULL; tmp = tmp->next) {
  246. if (tmp->next == base) {
  247. tmp->next = NULL;
  248. freeArgument(arg, true);
  249. break;
  250. }
  251. }
  252. }
  253. LinkValue *findStrVar(wchar_t *name, bool free_old, INTER_FUNCTIONSIG_CORE){
  254. LinkValue *tmp = NULL;
  255. wchar_t *name_ = setStrVarName(name, free_old, inter);
  256. tmp = findFromVarList(name_, 0, get_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
  257. memFree(name_);
  258. return tmp;
  259. }
  260. LinkValue *checkStrVar(wchar_t *name, bool free_old, INTER_FUNCTIONSIG_CORE){
  261. LinkValue *tmp = NULL;
  262. wchar_t *name_ = setStrVarName(name, free_old, inter);
  263. tmp = findFromVarList(name_, 0, read_var, CALL_INTER_FUNCTIONSIG_CORE(var_list));
  264. memFree(name_);
  265. return tmp;
  266. }
  267. void addStrVarCore(int setting, wchar_t *var_name, LinkValue *name_, LinkValue *value, fline line, char *file, VarList *out_var, INTER_FUNCTIONSIG_NOT_ST) {
  268. addFromVarList(var_name, name_, 0, value, CALL_INTER_FUNCTIONSIG_CORE(var_list));
  269. out_var = out_var == NULL ? var_list : out_var;
  270. if (setting)
  271. newObjectSetting(name_, line, file, value, result, inter, out_var);
  272. else
  273. setResult(result, inter);
  274. }
  275. void addStrVar(wchar_t *name, bool free_old, bool setting, LinkValue *value, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
  276. LinkValue *name_;
  277. wchar_t *var_name = setStrVarName(name, free_old, inter);
  278. setResultCore(result);
  279. makeStringValue(var_name, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  280. if (!CHECK_RESULT(result))
  281. goto return_;
  282. name_ = result->value;
  283. result->value = NULL;
  284. freeResult(result);
  285. addStrVarCore(setting, var_name, name_, value, line, file, NULL, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  286. gc_freeTmpLink(&name_->gc_status);
  287. return_:
  288. memFree(var_name);
  289. }
  290. LinkValue *findAttributes(wchar_t *name, bool free_old, LinkValue *value, Inter *inter) {
  291. LinkValue *attr = findStrVar(name, free_old, CALL_INTER_FUNCTIONSIG_CORE(value->value->object.var));
  292. if (attr != NULL && (attr->belong == NULL || attr->belong->value != value->value && checkAttribution(value->value, attr->belong->value)))
  293. attr->belong = value;
  294. return attr;
  295. }
  296. bool addAttributes(wchar_t *name, bool free_old, LinkValue *value, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
  297. wchar_t *var_name = setStrVarName(name, free_old, inter);
  298. LinkValue *name_;
  299. setResultCore(result);
  300. makeStringValue(var_name, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  301. if (!CHECK_RESULT(result))
  302. goto return_;
  303. name_ = result->value;
  304. result->value = NULL;
  305. freeResult(result);
  306. gc_freeze(inter, var_list, belong->value->object.var, true);
  307. addStrVarCore(false, var_name, name_, value, line, file, var_list, CALL_INTER_FUNCTIONSIG_NOT_ST(belong->value->object.var, result, belong));
  308. gc_freeze(inter, var_list, belong->value->object.var, false);
  309. gc_freeTmpLink(&name_->gc_status);
  310. return_:
  311. memFree(var_name);
  312. return CHECK_RESULT(result);
  313. }
  314. void newObjectSetting(LinkValue *name, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
  315. setResultCore(result);
  316. addAttributes(inter->data.object_name, false, name, line, file, belong, result, inter, var_list);
  317. if (CHECK_RESULT(result))
  318. return;
  319. freeResult(result);
  320. addAttributes(inter->data.object_self, false, belong, line, file, belong, result, inter, var_list);
  321. if (CHECK_RESULT(result) && belong->value->object.inherit != NULL) {
  322. freeResult(result);
  323. addAttributes(inter->data.object_father, false, belong->value->object.inherit->value, line, file, belong,
  324. result, inter, var_list);
  325. }
  326. }
  327. ResultType getElement(LinkValue *from, LinkValue *index, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
  328. LinkValue *_func_ = NULL;
  329. setResultCore(result);
  330. gc_addTmpLink(&from->gc_status);
  331. gc_addTmpLink(&index->gc_status);
  332. _func_ = findAttributes(inter->data.object_down, false, from, inter);
  333. if (_func_ != NULL){
  334. Argument *arg = NULL;
  335. gc_addTmpLink(&_func_->gc_status);
  336. arg = makeValueArgument(index);
  337. callBackCore(_func_, arg, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  338. gc_freeTmpLink(&_func_->gc_status);
  339. freeArgument(arg, true);
  340. }
  341. else
  342. setResultError(E_TypeException, OBJ_NOTSUPPORT(subscript(__down__)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  343. gc_freeTmpLink(&from->gc_status);
  344. gc_freeTmpLink(&index->gc_status);
  345. return result->type;
  346. }
  347. ResultType getIter(LinkValue *value, int status, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
  348. LinkValue *_func_ = NULL;
  349. setResultCore(result);
  350. if (status == 1)
  351. _func_ = findAttributes(inter->data.object_iter, false, value, inter);
  352. else
  353. _func_ = findAttributes(inter->data.object_next, false, value, inter);
  354. if (_func_ != NULL){
  355. gc_addTmpLink(&_func_->gc_status);
  356. callBackCore(_func_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  357. gc_freeTmpLink(&_func_->gc_status);
  358. }
  359. else
  360. setResultError(E_TypeException, OBJ_NOTSUPPORT(iter), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  361. return result->type;
  362. }
  363. bool checkBool(LinkValue *value, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST){
  364. LinkValue *_bool_ = findAttributes(inter->data.object_bool, false, value, inter);
  365. if (_bool_ != NULL){
  366. gc_addTmpLink(&_bool_->gc_status);
  367. callBackCore(_bool_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  368. gc_freeTmpLink(&_bool_->gc_status);
  369. if (result->value->value->type != V_bool)
  370. setResultError(E_TypeException, RETURN_ERROR(__bool__, bool), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  371. else
  372. return result->value->value->data.bool_.bool_;
  373. } else {
  374. makeBoolValue(true, 0, "sys.bool", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  375. return true;
  376. }
  377. return false;
  378. }
  379. wchar_t *getRepoStr(LinkValue *value, bool is_repo, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST){
  380. LinkValue *_repo_ = findAttributes(is_repo ? inter->data.object_repo : inter->data.object_str, false, value, inter);
  381. setResultCore(result);
  382. if (_repo_ != NULL){
  383. gc_addTmpLink(&value->gc_status);
  384. gc_addTmpLink(&_repo_->gc_status);
  385. callBackCore(_repo_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  386. gc_freeTmpLink(&_repo_->gc_status);
  387. gc_freeTmpLink(&value->gc_status);
  388. if (!CHECK_RESULT(result))
  389. return NULL;
  390. else if (result->value->value->type != V_str){
  391. setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  392. return NULL;
  393. }
  394. return result->value->value->data.str.str;
  395. }
  396. else
  397. setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  398. return NULL;
  399. }
  400. bool is_iterStop(LinkValue *value, Inter *inter) {
  401. return value->value == inter->data.iterstop_exc->value || checkAttribution(value->value, inter->data.iterstop_exc->value);
  402. }
  403. bool is_indexException(LinkValue *value, Inter *inter) {
  404. return value->value == inter->data.index_exc->value || checkAttribution(value->value, inter->data.index_exc->value);
  405. }
  406. bool checkAut(enum ValueAuthority value, enum ValueAuthority base, fline line, char *file, char *name, bool pri_auto, INTER_FUNCTIONSIG_NOT_ST) {
  407. if ((value == public_aut || (!pri_auto && value == auto_aut)) && (base != public_aut && base != auto_aut)) {
  408. if (name == NULL)
  409. setResultError(E_PermissionsException, L"Wrong Permissions: access variables as public", line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  410. else {
  411. wchar_t *message = memWidecat(L"Wrong Permissions: access variables as public: ", memStrToWcs(name, false), false, true);
  412. setResultError(E_PermissionsException, message, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  413. memFree(message);
  414. }
  415. return false;
  416. }
  417. else if ((value == protect_aut) && (base == private_aut)) {
  418. if (name == NULL)
  419. setResultError(E_PermissionsException, L"Wrong Permissions: access variables as protect", line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  420. else {
  421. wchar_t *message = memWidecat(L"Wrong Permissions: access variables as protect: ", memStrToWcs(name, false), false, true);
  422. setResultError(E_PermissionsException, message, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  423. memFree(message);
  424. }
  425. return false;
  426. }
  427. return true;
  428. }
  429. LinkValue *make_new(Inter *inter, LinkValue *belong, LinkValue *class){
  430. Inherit *object_father = getInheritFromValueCore(class);
  431. VarList *new_var = copyVarList(class->value->object.out_var, false, inter);
  432. Value *new_object = makeObject(inter, NULL, new_var, object_father);
  433. return makeLinkValue(new_object, belong, inter);
  434. }
  435. static int init_new(LinkValue *obj, Argument *arg, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
  436. LinkValue *_init_ = NULL;
  437. _init_ = findAttributes(inter->data.object_init, false, obj, inter);
  438. if (_init_ == NULL) {
  439. if (arg != NULL) {
  440. setResultError(E_ArgumentException, MANY_ARG, line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  441. return 0;
  442. } else
  443. return 1;
  444. }
  445. _init_->belong = obj;
  446. gc_addTmpLink(&_init_->gc_status);
  447. callBackCore(_init_, arg, 0, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, obj));
  448. gc_freeTmpLink(&_init_->gc_status);
  449. return CHECK_RESULT(result) ? 1 : -1;
  450. }
  451. int run_init(LinkValue *obj, Argument *arg, fline line, char *file, INTER_FUNCTIONSIG_NOT_ST) {
  452. int return_;
  453. setResultCore(result);
  454. return_ = init_new(obj, arg, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  455. if (return_ == 1) {
  456. freeResult(result);
  457. setResultOperation(result, obj);
  458. }
  459. return return_;
  460. }
  461. bool setBoolAttrible(bool value, wchar_t *var, fline line, char *file, LinkValue *obj, INTER_FUNCTIONSIG_NOT_ST) {
  462. LinkValue *bool_value = NULL;
  463. setResultCore(result);
  464. makeBoolValue(value, line, file, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
  465. if (!CHECK_RESULT(result))
  466. return false;
  467. bool_value = result->value;
  468. freeResult(result);
  469. if (!addAttributes(var, false, bool_value, line, file, obj, result, inter, var_list))
  470. return false;
  471. freeResult(result);
  472. return true;
  473. }