vim-patch:8.1.1689: profiling code is spread out

Problem:    Profiling code is spread out.
Solution:   Move more profiling code to profiler.c. (Yegappan Lakshmanan,
            closes vim/vim#4668)
660a10ad41
This commit is contained in:
zeertzjq
2022-08-12 13:45:33 +08:00
parent c7ca94ba7f
commit a93d29589a
9 changed files with 336 additions and 328 deletions

View File

@@ -45,7 +45,7 @@
# include "eval/userfunc.c.generated.h"
#endif
hashtab_T func_hashtab;
static hashtab_T func_hashtab;
// Used by get_func_tv()
static garray_T funcargs = GA_EMPTY_INIT_VALUE;
@@ -67,6 +67,12 @@ void func_init(void)
hash_init(&func_hashtab);
}
/// Return the function hash table
hashtab_T *func_tbl_get(void)
{
return &func_hashtab;
}
/// Get function arguments.
static int get_function_args(char_u **argp, char_u endchar, garray_T *newargs, int *varargs,
garray_T *default_args, bool skip)