mirror of
https://github.com/neovim/neovim.git
synced 2026-07-30 04:18:02 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
#include "nvim/eval/typval.h"
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
|
||||
// From user function to hashitem and back.
|
||||
#define UF2HIKEY(fp) ((fp)->uf_name)
|
||||
#define HIKEY2UF(p) ((ufunc_T *)(p - offsetof(ufunc_T, uf_name)))
|
||||
#define HI2UF(hi) HIKEY2UF((hi)->hi_key)
|
||||
|
||||
///< Structure used by trans_function_name()
|
||||
typedef struct {
|
||||
dict_T *fd_dict; ///< Dictionary used.
|
||||
|
||||
Reference in New Issue
Block a user