1
0
forked from aniani/vim

patch 8.2.1734: Vim9: cannot use a funcref for a closure twice

Problem:    Vim9: cannot use a funcref for a closure twice.
Solution:   Instead of putting the funcref on the stack use a growarray on the
            execution context.
This commit is contained in:
Bram Moolenaar
2020-09-23 21:57:23 +02:00
parent 4ee711f213
commit 148ce7ae62
6 changed files with 93 additions and 64 deletions

View File

@@ -244,7 +244,6 @@ typedef struct {
// arguments to ISN_FUNCREF
typedef struct {
int fr_func; // function index
int fr_var_idx; // variable to store partial
} funcref_T;
// arguments to ISN_NEWFUNC
@@ -323,7 +322,7 @@ struct dfunc_S {
int df_instr_count;
int df_varcount; // number of local variables
int df_closure_count; // number of closures created
int df_has_closure; // one if a closure was created
};
// Number of entries used by stack frame for a function call.