0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0818: Vim9: using a discovery phase doesn't work well

Problem:    Vim9: using a discovery phase doesn't work well.
Solution:   Remove the discovery phase, instead compile a function only when
            it is used.  Add :defcompile to compile def functions earlier.
This commit is contained in:
Bram Moolenaar
2020-05-24 23:00:18 +02:00
parent f7271e8316
commit 822ba24743
19 changed files with 165 additions and 272 deletions

View File

@@ -244,7 +244,8 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
if (partial == NULL)
return FAIL;
if (partial->pt_func != NULL && partial->pt_func->uf_dfunc_idx >= 0)
if (partial->pt_func != NULL
&& partial->pt_func->uf_dfunc_idx != UF_NOT_COMPILED)
{
if (call_def_function(partial->pt_func, argc, argv,
partial, rettv) == FAIL)