mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2409: Vim9: profiling only works for one function
Problem: Vim9: profiling only works for one function. Solution: Select the right instructions when calling and returning. (closes #7743)
This commit is contained in:
10
src/vim9.h
10
src/vim9.h
@@ -408,3 +408,13 @@ extern garray_T def_functions;
|
||||
|
||||
// Used for "lnum" when a range is to be taken from the stack and "!" is used.
|
||||
#define LNUM_VARIABLE_RANGE_ABOVE -888
|
||||
|
||||
#ifdef FEAT_PROFILE
|
||||
# define PROFILING(ufunc) (do_profiling == PROF_YES && (ufunc)->uf_profiling)
|
||||
# define INSTRUCTIONS(dfunc) \
|
||||
((do_profiling == PROF_YES && (dfunc->df_ufunc)->uf_profiling) \
|
||||
? (dfunc)->df_instr_prof : (dfunc)->df_instr)
|
||||
#else
|
||||
# define PROFILING FALSE
|
||||
# define INSTRUCTIONS(dfunc) ((dfunc)->df_instr)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user