comparison src/vim9execute.c @ 26980:8796f1384750 v8.2.4019

patch 8.2.4019: Vim9: import mechanism is too complicated Commit: https://github.com/vim/vim/commit/d5f400c607182db6d4fbe2964471d796277f67e8 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 6 21:10:28 2022 +0000 patch 8.2.4019: Vim9: import mechanism is too complicated Problem: Vim9: import mechanism is too complicated. Solution: Do not use the Javascript mechanism but a much simpler one.
author Bram Moolenaar <Bram@vim.org>
date Thu, 06 Jan 2022 22:15:04 +0100
parents 902b8bee5254
children 32120100fde8
comparison
equal deleted inserted replaced
26979:2fb4968983af 26980:8796f1384750
1158 int flags = ASSIGN_DECL; 1158 int flags = ASSIGN_DECL;
1159 1159
1160 if (tv->v_lock) 1160 if (tv->v_lock)
1161 flags |= ASSIGN_CONST; 1161 flags |= ASSIGN_CONST;
1162 save_funccal(&entry); 1162 save_funccal(&entry);
1163 set_var_const(name, NULL, tv, FALSE, flags, 0); 1163 set_var_const(name, 0, NULL, tv, FALSE, flags, 0);
1164 restore_funccal(); 1164 restore_funccal();
1165 } 1165 }
1166 1166
1167 /* 1167 /*
1168 * Convert "tv" to a string. 1168 * Convert "tv" to a string.
2250 char_u *name = iptr->isn_arg.string; 2250 char_u *name = iptr->isn_arg.string;
2251 2251
2252 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) 2252 if (GA_GROW_FAILS(&ectx->ec_stack, 1))
2253 goto theend; 2253 goto theend;
2254 SOURCING_LNUM = iptr->isn_lnum; 2254 SOURCING_LNUM = iptr->isn_lnum;
2255 if (eval_variable(name, (int)STRLEN(name), 2255 if (eval_variable(name, (int)STRLEN(name), 0,
2256 STACK_TV_BOT(0), NULL, EVAL_VAR_VERBOSE) == FAIL) 2256 STACK_TV_BOT(0), NULL, EVAL_VAR_VERBOSE) == FAIL)
2257 goto on_error; 2257 goto on_error;
2258 ++ectx->ec_stack.ga_len; 2258 ++ectx->ec_stack.ga_len;
2259 } 2259 }
2260 break; 2260 break;