comparison src/vim9compile.c @ 23114:462774c327df v8.2.2103

patch 8.2.2103: Vim9: unreachable code Commit: https://github.com/vim/vim/commit/41d6196e302af5f1a99aeeac587b5c662c410166 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 6 20:12:43 2020 +0100 patch 8.2.2103: Vim9: unreachable code Problem: Vim9: unreachable code. Solution: Remove the code to prepend s: to the variable name
author Bram Moolenaar <Bram@vim.org>
date Sun, 06 Dec 2020 20:15:04 +0100
parents 545ff3b4543c
children 60a0221beab0
comparison
equal deleted inserted replaced
23113:5ecace52c756 23114:462774c327df
5177 return generate_STORE(cctx, ISN_STOREV, vimvaridx, NULL); 5177 return generate_STORE(cctx, ISN_STOREV, vimvaridx, NULL);
5178 case dest_script: 5178 case dest_script:
5179 if (scriptvar_idx < 0) 5179 if (scriptvar_idx < 0)
5180 { 5180 {
5181 char_u *name_s = name; 5181 char_u *name_s = name;
5182 int r; 5182 int r;
5183 5183
5184 // Include s: in the name for store_var() 5184 // "s:" is included in the name.
5185 if (name[1] != ':')
5186 {
5187 int len = (int)STRLEN(name) + 3;
5188
5189 name_s = alloc(len);
5190 if (name_s == NULL)
5191 name_s = name;
5192 else
5193 vim_snprintf((char *)name_s, len, "s:%s", name);
5194 }
5195 r = generate_OLDSCRIPT(cctx, ISN_STORES, name_s, 5185 r = generate_OLDSCRIPT(cctx, ISN_STORES, name_s,
5196 scriptvar_sid, type); 5186 scriptvar_sid, type);
5197 if (name_s != name) 5187 if (name_s != name)
5198 vim_free(name_s); 5188 vim_free(name_s);
5199 return r; 5189 return r;