diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-24 12:53:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-24 12:53:53 +0100 |
commit | b204990346ca857802b174afe8a7fbb05e4f318e (patch) | |
tree | 6660d87cac14e978841c1eaf55994bf8a85f84a9 /src/vim9.h | |
parent | 7cf0c114d690c91ac88c92a1a6f1b1935cb6410f (diff) | |
download | vim-git-b204990346ca857802b174afe8a7fbb05e4f318e.tar.gz |
patch 8.2.2400: Vim9: compiled functions are not profiledv8.2.2400
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.
Diffstat (limited to 'src/vim9.h')
-rw-r--r-- | src/vim9.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vim9.h b/src/vim9.h index 8d4faa3d1..9446c15bf 100644 --- a/src/vim9.h +++ b/src/vim9.h @@ -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 |