mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.1643: Vim9: :defcompile compiles dead functions
Problem: Vim9: :defcompile compiles dead functions. Solution: Skip over dead functions.
This commit is contained in:
@@ -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
|
void
|
||||||
ex_defcompile(exarg_T *eap UNUSED)
|
ex_defcompile(exarg_T *eap UNUSED)
|
||||||
@@ -3600,7 +3601,8 @@ ex_defcompile(exarg_T *eap UNUSED)
|
|||||||
--todo;
|
--todo;
|
||||||
ufunc = HI2UF(hi);
|
ufunc = HI2UF(hi);
|
||||||
if (ufunc->uf_script_ctx.sc_sid == current_sctx.sc_sid
|
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);
|
compile_def_function(ufunc, FALSE, NULL);
|
||||||
|
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1643,
|
||||||
/**/
|
/**/
|
||||||
1642,
|
1642,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user