0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.2400: Vim9: compiled functions are not profiled

Problem:    Vim9: compiled functions are not profiled.
Solution:   Add initial changes to profile compiled functions.  Fix that a
            script-local function was hard to debug.
This commit is contained in:
Bram Moolenaar
2021-01-24 12:53:53 +01:00
parent 7cf0c114d6
commit b204990346
16 changed files with 311 additions and 109 deletions

View File

@@ -152,6 +152,9 @@ typedef enum {
ISN_CMDMOD, // set cmdmod
ISN_CMDMOD_REV, // undo ISN_CMDMOD
ISN_PROF_START, // start a line for profiling
ISN_PROF_END, // end a line for profiling
ISN_UNPACK, // unpack list into items, uses isn_arg.unpack
ISN_SHUFFLE, // move item on stack up or down
ISN_DROP // pop stack and discard value
@@ -366,8 +369,12 @@ struct dfunc_S {
// was compiled.
garray_T df_def_args_isn; // default argument instructions
// After compiling "df_instr" and/or "df_instr_prof" is not NULL.
isn_T *df_instr; // function body to be executed
int df_instr_count;
int df_instr_count; // size of "df_instr"
isn_T *df_instr_prof; // like "df_instr" with profiling
int df_instr_prof_count; // size of "df_instr_prof"
int df_varcount; // number of local variables
int df_has_closure; // one if a closure was created