Mercurial > vim
comparison src/proto/vim9instr.pro @ 30291:61a688be1899 v9.0.0481
patch 9.0.0481: in :def function all closures in loop get the same variables
Commit: https://github.com/vim/vim/commit/8fa745e7be3a791ac25f93ef0227bbc48ade8a37
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 16 19:04:24 2022 +0100
patch 9.0.0481: in :def function all closures in loop get the same variables
Problem: In a :def function all closures in a loop get the same variables.
Solution: Use a separate list of variables for LOADOUTER and STOREOUTER.
Not copied at end of loop yet.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 16 Sep 2022 20:15:03 +0200 |
parents | 42a6345b91fd |
children | fc0830246f49 |
comparison
equal
deleted
inserted
replaced
30290:e5d24015e8c5 | 30291:61a688be1899 |
---|---|
29 int generate_SLICE(cctx_T *cctx, int count); | 29 int generate_SLICE(cctx_T *cctx, int count); |
30 int generate_CHECKLEN(cctx_T *cctx, int min_len, int more_OK); | 30 int generate_CHECKLEN(cctx_T *cctx, int min_len, int more_OK); |
31 int generate_STORE(cctx_T *cctx, isntype_T isn_type, int idx, char_u *name); | 31 int generate_STORE(cctx_T *cctx, isntype_T isn_type, int idx, char_u *name); |
32 int generate_STORENR(cctx_T *cctx, int idx, varnumber_T value); | 32 int generate_STORENR(cctx_T *cctx, int idx, varnumber_T value); |
33 int generate_LOAD(cctx_T *cctx, isntype_T isn_type, int idx, char_u *name, type_T *type); | 33 int generate_LOAD(cctx_T *cctx, isntype_T isn_type, int idx, char_u *name, type_T *type); |
34 int generate_LOADOUTER(cctx_T *cctx, int idx, int nesting, type_T *type); | 34 int generate_LOADOUTER(cctx_T *cctx, int idx, int nesting, int loop_idx, type_T *type); |
35 int generate_LOADV(cctx_T *cctx, char_u *name); | 35 int generate_LOADV(cctx_T *cctx, char_u *name); |
36 int generate_UNLET(cctx_T *cctx, isntype_T isn_type, char_u *name, int forceit); | 36 int generate_UNLET(cctx_T *cctx, isntype_T isn_type, char_u *name, int forceit); |
37 int generate_LOCKCONST(cctx_T *cctx); | 37 int generate_LOCKCONST(cctx_T *cctx); |
38 int generate_OLDSCRIPT(cctx_T *cctx, isntype_T isn_type, char_u *name, int sid, type_T *type); | 38 int generate_OLDSCRIPT(cctx_T *cctx, isntype_T isn_type, char_u *name, int sid, type_T *type); |
39 int generate_VIM9SCRIPT(cctx_T *cctx, isntype_T isn_type, int sid, int idx, type_T *type); | 39 int generate_VIM9SCRIPT(cctx_T *cctx, isntype_T isn_type, int sid, int idx, type_T *type); |
40 int generate_NEWLIST(cctx_T *cctx, int count, int use_null); | 40 int generate_NEWLIST(cctx_T *cctx, int count, int use_null); |
41 int generate_NEWDICT(cctx_T *cctx, int count, int use_null); | 41 int generate_NEWDICT(cctx_T *cctx, int count, int use_null); |
42 int generate_FUNCREF(cctx_T *cctx, ufunc_T *ufunc, isn_T **isnp); | 42 int generate_FUNCREF(cctx_T *cctx, ufunc_T *ufunc, isn_T **isnp); |
43 int generate_NEWFUNC(cctx_T *cctx, char_u *lambda_name, char_u *func_name); | 43 int generate_NEWFUNC(cctx_T *cctx, char_u *lambda_name, char_u *func_name, short loop_var_idx, short loop_var_count); |
44 int generate_DEF(cctx_T *cctx, char_u *name, size_t len); | 44 int generate_DEF(cctx_T *cctx, char_u *name, size_t len); |
45 int generate_JUMP(cctx_T *cctx, jumpwhen_T when, int where); | 45 int generate_JUMP(cctx_T *cctx, jumpwhen_T when, int where); |
46 int generate_WHILE(cctx_T *cctx, int funcref_idx); | 46 int generate_WHILE(cctx_T *cctx, int funcref_idx); |
47 int generate_JUMP_IF_ARG_SET(cctx_T *cctx, int arg_off); | 47 int generate_JUMP_IF_ARG_SET(cctx_T *cctx, int arg_off); |
48 int generate_FOR(cctx_T *cctx, int loop_idx); | 48 int generate_FOR(cctx_T *cctx, int loop_idx); |