0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0679: Vim9: incomplete support for closures

Problem:    Vim9: incomplete support for closures.
Solution:   At the end of a function copy arguments and local variables if
            they are still used by a referenced closure.
This commit is contained in:
Bram Moolenaar
2020-05-02 17:52:42 +02:00
parent d58a662f44
commit bf67ea1af0
6 changed files with 261 additions and 66 deletions

View File

@@ -1563,8 +1563,6 @@ typedef struct
int uf_refcount; // reference count, see func_name_refcount()
funccall_T *uf_scoped; // l: local variables for closure
garray_T *uf_ectx_stack; // where compiled closure finds local vars
int uf_ectx_frame; // index of function frame in uf_ectx_stack
char_u *uf_name_exp; // if "uf_name[]" starts with SNR the name with
// "<SNR>" as a string, otherwise NULL
@@ -1591,7 +1589,7 @@ typedef struct
#define FIXVAR_CNT 12 // number of fixed variables
/*
* structure to hold info for a function that is currently being executed.
* Structure to hold info for a function that is currently being executed.
*/
struct funccall_S
{