summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-09 17:08:51 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-09 17:08:51 +0200
commit96f8f499ce51ea791d9b044c266f84380fa54848 (patch)
tree0276158f1228a2f0635fc4cc06ec50bb9bb18359
parent4507f6ada590fb6274b21c416190dfecb23dcf1b (diff)
downloadvim-git-96f8f499ce51ea791d9b044c266f84380fa54848.tar.gz
patch 8.2.1643: Vim9: :defcompile compiles dead functionsv8.2.1643
Problem: Vim9: :defcompile compiles dead functions. Solution: Skip over dead functions.
-rw-r--r--src/userfunc.c6
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index d91890373..d5bdadc18 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3583,7 +3583,8 @@ ex_function(exarg_T *eap)
}
/*
- * :defcompile - compile all :def functions in the current script.
+ * :defcompile - compile all :def functions in the current script that need to
+ * be compiled. Except dead functions.
*/
void
ex_defcompile(exarg_T *eap UNUSED)
@@ -3600,7 +3601,8 @@ ex_defcompile(exarg_T *eap UNUSED)
--todo;
ufunc = HI2UF(hi);
if (ufunc->uf_script_ctx.sc_sid == current_sctx.sc_sid
- && ufunc->uf_def_status == UF_TO_BE_COMPILED)
+ && ufunc->uf_def_status == UF_TO_BE_COMPILED
+ && (ufunc->uf_flags & FC_DEAD) == 0)
{
compile_def_function(ufunc, FALSE, NULL);
diff --git a/src/version.c b/src/version.c
index 54bb12884..18d2b3ed8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1643,
+/**/
1642,
/**/
1641,