Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
eval.c File Reference
#include <assert.h>
#include <float.h>
#include <inttypes.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#include <limits.h>
#include <msgpack.h>
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/eval.h"
#include "nvim/buffer.h"
#include "nvim/change.h"
#include "nvim/channel.h"
#include "nvim/charset.h"
#include "nvim/context.h"
#include "nvim/cursor.h"
#include "nvim/diff.h"
#include "nvim/edit.h"
#include "nvim/ex_cmds.h"
#include "nvim/ex_cmds2.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_eval.h"
#include "nvim/ex_getln.h"
#include "nvim/fileio.h"
#include "nvim/os/fileio.h"
#include "nvim/func_attr.h"
#include "nvim/fold.h"
#include "nvim/getchar.h"
#include "nvim/hashtab.h"
#include "nvim/iconv.h"
#include "nvim/if_cscope.h"
#include "nvim/indent_c.h"
#include "nvim/indent.h"
#include "nvim/mark.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/menu.h"
#include "nvim/message.h"
#include "nvim/misc1.h"
#include "nvim/keymap.h"
#include "nvim/map.h"
#include "nvim/file_search.h"
#include "nvim/garray.h"
#include "nvim/move.h"
#include "nvim/normal.h"
#include "nvim/ops.h"
#include "nvim/option.h"
#include "nvim/os_unix.h"
#include "nvim/path.h"
#include "nvim/popupmnu.h"
#include "nvim/profile.h"
#include "nvim/quickfix.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/sha256.h"
#include "nvim/sign.h"
#include "nvim/spell.h"
#include "nvim/state.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/ui.h"
#include "nvim/main.h"
#include "nvim/mouse.h"
#include "nvim/terminal.h"
#include "nvim/undo.h"
#include "nvim/version.h"
#include "nvim/window.h"
#include "nvim/eval/encode.h"
#include "nvim/eval/decode.h"
#include "nvim/os/os.h"
#include "nvim/event/libuv_process.h"
#include "nvim/os/pty_process.h"
#include "nvim/event/rstream.h"
#include "nvim/event/wstream.h"
#include "nvim/event/time.h"
#include "nvim/os/time.h"
#include "nvim/msgpack_rpc/channel.h"
#include "nvim/msgpack_rpc/server.h"
#include "nvim/msgpack_rpc/helpers.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/vim.h"
#include "nvim/os/dl.h"
#include "nvim/os/input.h"
#include "nvim/event/loop.h"
#include "nvim/lib/kvec.h"
#include "nvim/lib/khash.h"
#include "nvim/lib/queue.h"
#include "nvim/lua/executor.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/executor.h"
#include "nvim/eval/gc.h"
#include "nvim/macros.h"

Data Structures

struct  lval_S
struct  scriptvar_T
struct  funccall_S
 Structure used by trans_function_name() More...
struct  funcdict_T
struct  forinfo_T
struct  vimvar
struct  timer_T
struct  fst
 Structure holding VimL function definition. More...
struct  GetListLineCookie
struct  sortinfo_T
 struct storing information about current sort More...


#define DICT_MAXNEST   100 /* maximum nesting of lists and dicts */
#define AUTOLOAD_CHAR   '#'
#define globvarht   globvardict.dv_hashtab
 g: value More...
#define SCRIPT_SV(id)   (((scriptvar_T **)ga_scripts.ga_data)[(id) - 1])
#define SCRIPT_VARS(id)   (SCRIPT_SV(id)->sv_dict.dv_hashtab)
#define FC_ABORT   0x01
#define FC_RANGE   0x02
#define FC_DICT   0x04
#define FC_CLOSURE   0x08
#define FC_DELETED   0x10
#define FC_REMOVED   0x20
#define FC_SANDBOX   0x40
#define FUNCARG(fp, j)   ((char_u **)(fp->uf_args.ga_data))[j]
#define FUNCLINE(fp, j)   ((char_u **)(fp->uf_lines.ga_data))[j]
#define VAR_SHORT_LEN   20
 Short variable name length. More...
#define FIXVAR_CNT   12
 Number of fixed variables used for arguments. More...
#define VV_COMPAT   1 /* compatible, also used without "v:" */
#define VV_RO   2 /* read-only */
#define VV_RO_SBX   4 /* read-only in the sandbox */
#define VV(idx, name, type, flags)
#define vv_type   vv_di.di_tv.v_type
#define vv_nr   vv_di.di_tv.vval.v_number
#define vv_special   vv_di.di_tv.vval.v_special
#define vv_float   vv_di.di_tv.vval.v_float
#define vv_str   vv_di.di_tv.vval.v_string
#define vv_list   vv_di.di_tv.vval.v_list
#define vv_dict   vv_di.di_tv.vval.v_dict
#define vv_partial   vv_di.di_tv.vval.v_partial
#define vv_tv   vv_di.di_tv
#define vimvarht   vimvardict.dv_hashtab
 v: hashtab More...
#define FNE_INCL_BR   1 /* find_name_end(): include [] in name */
#define ABORTING(func)   abort = abort || func
#define FLEN_FIXED   40
#define SP_NOMOVE   0x01
 don't move cursor More...
#define SP_REPEAT   0x02
 repeat to find outer pair More...
#define SP_RETCOUNT   0x04
 return matchcount More...
#define SP_SETPCMARK   0x08
 set previous context mark More...
#define SP_START   0x10
 accept match at start position More...
#define SP_SUBPAT   0x20
 return nr of matching sub-pattern More...
#define SP_END   0x40
 leave cursor at end of match More...
#define SP_COLUMN   0x80
 start at cursor column More...
#define ITEM_COMPARE_FAIL   999


typedef struct lval_S lval_T
typedef void(* FunPtr) (void)
typedef void(* VimLFunc) (typval_T *args, typval_T *rvar, FunPtr data)
 Prototype of C function that implements VimL function. More...
typedef struct fst VimLFuncDef
 Structure holding VimL function definition. More...


enum  SomeMatchType {
  kSomeMatch, kSomeMatchEnd, kSomeMatchList, kSomeMatchStr,
 Describe data to return from find_some_match() More...
enum  TransFunctionNameFlags {
 trans_function_name() flags More...
 get_lval() flags More...
enum  assert_type_T {
 Type of assert_* check being performed. More...
enum  DictListType { kDictListKeys, kDictListValues, kDictListItems }
 Type for dict_list function. More...
enum  exptype_T {
enum  FnameTransError {


varnumber_T num_divide (varnumber_T n1, varnumber_T n2) FUNC_ATTR_CONST FUNC_ATTR_WARN_UNUSED_RESULT
varnumber_T num_modulus (varnumber_T n1, varnumber_T n2) FUNC_ATTR_CONST FUNC_ATTR_WARN_UNUSED_RESULT
void eval_init (void)
char_ufunc_name (void *cookie)
linenr_Tfunc_breakpoint (void *cookie)
int * func_dbg_tick (void *cookie)
int func_level (void *cookie)
int current_func_returned (void)
void set_internal_string_var (char_u *name, char_u *value)
int var_redir_start (char_u *name, int append)
void var_redir_str (char_u *value, int value_len)
void var_redir_stop (void)
int eval_charconvert (const char *const enc_from, const char *const enc_to, const char *const fname_from, const char *const fname_to)
int eval_printexpr (const char *const fname, const char *const args)
void eval_diff (const char *const origfile, const char *const newfile, const char *const outfile)
void eval_patch (const char *const origfile, const char *const difffile, const char *const outfile)
int eval_to_bool (char_u *arg, bool *error, char_u **nextcmd, int skip)
 if (ret==FAIL)
static int if (expr->v_type==VAR_FUNC)
 if (s==NULL)
 if (eval1_emsg(&s, rettv, true)==FAIL)
 emsgf (_(e_invexpr2), s)
static bool if (eval_expr_typval(expr,&argv, 0,&rettv)==FAIL)
char * eval_to_string_skip (const char *arg, const char **nextcmd, const bool skip) FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT
int skip_expr (char_u **pp)
char_ueval_to_string (char_u *arg, char_u **nextcmd, int convert)
char_ueval_to_string_safe (char_u *arg, char_u **nextcmd, int use_sandbox)
varnumber_T eval_to_number (char_u *expr)
list_Teval_spell_expr (char_u *badword, char_u *expr)
int get_spellword (list_T *const list, const char **ret_word)
int call_vim_function (const char_u *func, int argc, typval_T *argv, typval_T *rettv) FUNC_ATTR_NONNULL_ALL
varnumber_T call_func_retnr (const char_u *func, int argc, typval_T *argv) FUNC_ATTR_NONNULL_ALL
char * call_func_retstr (const char *const func, int argc, typval_T *argv) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_MALLOC
void * call_func_retlist (const char_u *func, int argc, typval_T *argv) FUNC_ATTR_NONNULL_ALL
void * save_funccal (void)
void restore_funccal (void *vfc)
void prof_child_enter (proftime_T *tm)
void prof_child_exit (proftime_T *tm)
int eval_foldexpr (char_u *arg, int *cp)
void ex_const (exarg_T *eap)
void ex_let (exarg_T *eap)
 if (len==0)
 memset (lp, 0, sizeof(lval_T))
 if (skip)
 if (expr_start!=NULL)
 if ((*p!= '['&&*p!= '.')||lp->ll_name==NULL)
 if (v==NULL &&!quiet)
whilep (*p== '.'&&lp->ll_tv->v_type==VAR_DICT)
void * eval_for_line (const char_u *arg, bool *errp, char_u **nextcmdp, int skip)
bool next_for_item (void *fi_void, char_u *arg)
void free_for_info (void *fi_void)
void set_context_for_expression (expand_T *xp, char_u *arg, cmdidx_T cmdidx)
void ex_call (exarg_T *eap)
void ex_unlet (exarg_T *eap)
void ex_lockvar (exarg_T *eap)
int do_unlet (const char *const name, const size_t name_len, const int forceit) FUNC_ATTR_NONNULL_ALL
void del_menutrans_vars (void)
char_uget_user_var_name (expand_T *xp, int idx)
int eval0 (char_u *arg, typval_T *rettv, char_u **nextcmd, int evaluate)
char_upartial_name (partial_T *pt)
void partial_unref (partial_T *pt)
bool func_equal (typval_T *tv1, typval_T *tv2, bool ic)
int get_copyID (void)
bool garbage_collect (bool testing)
bool set_ref_in_ht (hashtab_T *ht, int copyID, list_stack_T **list_stack) FUNC_ATTR_WARN_UNUSED_RESULT
bool set_ref_in_list (list_T *l, int copyID, ht_stack_T **ht_stack) FUNC_ATTR_WARN_UNUSED_RESULT
bool set_ref_in_item (typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack) FUNC_ATTR_WARN_UNUSED_RESULT
bool set_ref_in_functions (int copyID)
 Set "copyID" in all functions available by name. More...
size_t string2float (const char *const text, float_T *const ret_value) FUNC_ATTR_NONNULL_ALL
char_uget_function_name (expand_T *xp, int idx)
char_uget_expr_name (expand_T *xp, int idx)
static char_u if (v!=NULL &&v->di_tv.v_type==VAR_FUNC)
 return (char_u *)
bool set_ref_in_func (char_u *name, ufunc_T *fp_in, int copyID)
int call_func (const char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, ArgvFunc argv_func, linenr_T firstline, linenr_T lastline, int *doesrange, bool evaluate, partial_T *partial, dict_T *selfdict_in) FUNC_ATTR_NONNULL_ARG(1
 if (partial!=NULL)
 if (error==ERROR_NONE &&evaluate)
 while (argv_clear > 0)
 xfree (tofree)
 xfree (name)
int func_call (char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv)
win_Tfind_win_by_nr_or_id (typval_T *vp)
 tv_copy (tv,&vimvars[VV_VAL].vv_tv)
 if (eval_expr_typval(expr, argv, 2,&rettv)==FAIL)
 if (map)
void get_user_input (const typval_T *const argvars, typval_T *const rettv, const bool inputdialog) FUNC_ATTR_NONNULL_ALL
void mapblock_fill_dict (dict_T *const dict, const mapblock_T *const mp, long buffer_value, bool compatible) FUNC_ATTR_NONNULL_ALL
long do_searchpair (char_u *spat, char_u *mpat, char_u *epat, int dir, const typval_T *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit)
 if (buf==NULL||(!is_curbuf &&buf->b_ml.ml_mfp==NULL)||lnum< 1)
 if (!is_curbuf)
 if (append)
 if (lines->v_type==VAR_LIST)
 for (;;)
 if (added > 0)
 if (list_arg->v_type!=VAR_LIST)
else if (recursive!=0)
 if (action_arg->v_type==VAR_UNKNOWN)
else if (action_arg->v_type!=VAR_STRING)
 if ((*act== 'a'||*act== 'r'||*act== ' '||*act== 'f')&&act[1]==NUL)
 if (title_arg->v_type==VAR_UNKNOWN)
 if (set_errorlist(wp, l, action,(char_u *) title, d)==OK)
bool callback_from_typval (Callback *const callback, typval_T *const arg) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
bool callback_call (Callback *const callback, const int argcount_in, typval_T *const argvars_in, typval_T *const rettv) FUNC_ATTR_NONNULL_ALL
void timer_teardown (void)
pos_Tvar2fpos (const typval_T *const tv, const int dollar_lnum, int *const ret_fnum) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
int list2fpos (typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp)
varnumber_T get_vim_var_nr (int idx) FUNC_ATTR_PURE
char_uget_vim_var_str (int idx) FUNC_ATTR_PURE FUNC_ATTR_NONNULL_RET
list_Tget_vim_var_list (int idx) FUNC_ATTR_PURE
dict_Tget_vim_var_dict (int idx) FUNC_ATTR_PURE
void set_vim_var_char (int c)
void set_vcount (long count, long count1, int set_prevcount)
void set_vim_var_nr (const VimVarIndex idx, const varnumber_T val)
void set_vim_var_special (const VimVarIndex idx, const SpecialVarValue val)
void set_vim_var_string (const VimVarIndex idx, const char *const val, const ptrdiff_t len)
void set_vim_var_list (const VimVarIndex idx, list_T *const val)
void set_vim_var_dict (const VimVarIndex idx, dict_T *const val)
void set_reg_var (int c)
char_uv_exception (char_u *oldval)
char_uv_throwpoint (char_u *oldval)
char_uset_cmdarg (exarg_T *eap, char_u *oldarg)
void set_selfdict (typval_T *rettv, dict_T *selfdict)
char_uget_var_value (const char *const name)
void new_script_vars (scid_T id)
void init_var_dict (dict_T *dict, ScopeDictDictItem *dict_var, int scope)
void unref_var_dict (dict_T *dict)
void vars_clear (hashtab_T *ht)
bool var_check_ro (const int flags, const char *name, size_t name_len) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
bool var_check_func_name (const char *const name, const bool new_var) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
bool valid_varname (const char *varname) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
int var_item_copy (const vimconv_T *const conv, typval_T *const from, typval_T *const to, const bool deep, const int copyID) FUNC_ATTR_NONNULL_ARG(2
 if (recurse >=DICT_MAXNEST)
 switch (from->v_type)
void ex_echo (exarg_T *eap)
void ex_echohl (exarg_T *eap)
void ex_execute (exarg_T *eap)
void ex_function (exarg_T *eap)
bool translated_function_exists (const char *name)
void func_dump_profile (FILE *fd)
char_uget_user_func_name (expand_T *xp, int idx)
void ex_delfunction (exarg_T *eap)
 ":delfunction {name}" More...
void func_unref (char_u *name)
void func_ptr_unref (ufunc_T *fp)
void func_ref (char_u *name)
 Count a reference to a Function. More...
void func_ptr_ref (ufunc_T *fp)
 Count a reference to a Function. More...
void call_user_func (ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, linenr_T firstline, linenr_T lastline, dict_T *selfdict) FUNC_ATTR_NONNULL_ARG(1
 if (depth >=p_mfd)
 save_search_patterns ()
 if (!ins_compl_active())
 line_breakcheck ()
ga_initfc (ufunc_T *), 1
 func_ptr_ref (fp)
 if (STRNCMP(fp->uf_name,"<lambda>", 8)==0)
 if (selfdict!=NULL)
 STRCPY (name,"000")
add_nr_var & fc (dictitem_T *)&fc->fixvar[fixvar_idx++],"firstline",(varnumber_T) firstline
 for (int i=0;i< argcount;i++)
 if (fp->uf_flags &FC_SANDBOX)
 if (p_verbose >=12)
 if (func_not_yet_profiling_but_should)
 if (func_or_func_caller_profiling)
 if (do_profiling_yes)
 do_cmdline (NULL, get_func_line,(void *) fc, DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT)
 if ((did_emsg &&(fp->uf_flags &FC_ABORT))||rettv->v_type==VAR_UNKNOWN)
 xfree (sourcing_name)
 if (using_sandbox)
 if (p_verbose >=12 &&sourcing_name!=NULL)
 cleanup_function_call (fc)
 if (--fp->uf_calls<=0 &&fp->uf_refcount<=0)
 if (did_save_redo)
 restore_search_patterns ()
void ex_return (exarg_T *eap)
int do_return (exarg_T *eap, int reanimate, int is_cmd, void *rettv)
char_uget_return_cmd (void *rettv)
char_uget_func_line (int c, void *cookie, int indent, bool do_concat)
void func_line_start (void *cookie)
void func_line_exec (void *cookie)
void func_line_end (void *cookie)
int func_has_ended (void *cookie)
int func_has_abort (void *cookie)
hashitem_Tfind_hi_in_scoped_ht (const char *name, hashtab_T **pht)
 Search hashitem in parent scope. More...
dictitem_Tfind_var_in_scoped_ht (const char *name, const size_t namelen, int no_autoload)
 Search variable in parent scope. More...
const void * var_shada_iter (const void *const iter, const char **const name, typval_T *rettv, var_flavour_T flavour) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ARG(2
 if (iter==NULL)
tv_copyTV_DICT_HI2DI (hi) ->di_tv, rettv
 while ((size_t)(++hi-hifirst)< hinum)
void var_set_global (const char *const name, typval_T vartv)
int store_session_globals (FILE *fd)
void last_set_msg (sctx_T script_ctx)
void option_last_set_msg (LastSet last_set)
void reset_v_option_vars (void)
int modify_fname (char_u *src, bool tilde_file, size_t *usedlen, char_u **fnamep, char_u **bufp, size_t *fnamelen)
char_udo_string_sub (char_u *str, char_u *pat, char_u *sub, typval_T *expr, char_u *flags)
typval_T eval_call_provider (char *provider, char *method, list_T *arguments)
bool eval_has_provider (const char *feat)
 Checks if provider for feature feat is enabled. More...
void eval_fmt_source_name_line (char *buf, size_t bufsize)
 Writes "<sourcing_name>:<sourcing_lnum>" to buf[bufsize]. More...
void ex_checkhealth (exarg_T *eap)
 ":checkhealth [plugins]" More...


hashtab_T func_hashtab
const list_Teval_msgpack_type_lists []
 Array mapping values from MessagePackType to corresponding list pointers. More...
funccall_Tcurrent_funccal = NULL
funccall_Tprevious_funccal = NULL
static int const int did_emsg_before = did_emsg
const int called_emsg_before = called_emsg
const int ret = eval1(arg, rettv, evaluate)
char_us = (char_u *)tv_get_string_buf_chk(expr, buf)
return FAIL
return OK
const bool res = (tv_get_number_chk(&rettv, error) != 0)
tv_clearrettv = rettv
int len = get_env_len((const char_u **)&arg)
int opt_flags
char_utofree = NULL
if arg
char * name = (char *)arg
return arg_end
static char_u typval_T var1
typval_T var2
int empty1 = FALSE
int quiet = flags & GLV_QUIET
lp ll_name_len = (size_t)((const char *)p - lp->ll_name)
lp ll_tv = &v->di_tv
var1 v_type = VAR_UNKNOWN
int int error = ERROR_NONE
char_u fname_buf [FLEN_FIXED+1]
char_ufname = fname_trans_sid(name, fname_buf, &tofree, &error)
int argcount = argcount_in
typval_Targvars = argvars_in
dict_Tselfdict = selfdict_in
typval_T argv [MAX_FUNC_ARGS+1]
int argv_clear = 0
doesrange = false
int retval = FAIL
remp = (tv_get_number_chk(&rettv, &error) == 0)
theend __pad0__
static void const char * line = NULL
list_Tl = NULL
listitem_Tli = NULL
long added = 0
linenr_T append_lnum
buf_Tcurbuf_save = NULL
win_Tcurwin_save = NULL
const bool is_curbuf = buf == curbuf
static void const char * title = NULL
int action = ' '
rettv vval v_number = -1
dict_Td = NULL
typval_Tlist_arg = &args[0]
typval_Taction_arg = &args[1]
const char *const act = tv_get_string_chk(action_arg)
typval_Ttitle_arg = &args[2]
skip_args __pad1__
void linenr_T save_sourcing_lnum
bool using_sandbox = false
funccall_Tfc = xmalloc(sizeof(funccall_T))
int save_did_emsg = did_emsg
int fixvar_idx = 0
int ai
bool islambda = false
char_u numbuf [NUMBUFLEN]
proftime_T wait_start
proftime_T call_start
int started_profiling = false
bool did_save_redo = false
save_redo_T save_redo
fp uf_calls
fc caller = current_funccal
fc func = fp
fc linenr = 0
fc returned = FALSE
fc level = ex_nesting_level
fc breakpoint = dbg_find_breakpoint(FALSE, fp->uf_name, (linenr_T)0)
fc dbg_tick = debug_tick
fc fc_refcount = 0
fc fc_copyID = 0
fc l_avars dv_lock = VAR_FIXED
v di_flags = DI_FLAGS_RO | DI_FLAGS_FIX
v di_tv v_lock = VAR_FIXED
v di_tv vval v_list = &fc->l_varlist
 save_sourcing_name = sourcing_name
 sourcing_lnum = 1
 sourcing_name = xmalloc(len)
const bool do_profiling_yes = do_profiling == PROF_YES
bool func_not_yet_profiling_but_should
bool func_or_func_caller_profiling
const sctx_T save_current_sctx = current_sctx
 current_sctx = fp->uf_script_ctx
 did_emsg = FALSE
const void const hashitem_Thifirst = globvarht.ht_array
const size_t hinum = (size_t) globvarht.ht_mask + 1
return NULL

Macro Definition Documentation

#define ABORTING (   func)    abort = abort || func
#define AUTOLOAD_CHAR   '#'
#define DICT_MAXNEST   100 /* maximum nesting of lists and dicts */
#define FC_ABORT   0x01
#define FC_CLOSURE   0x08
#define FC_DELETED   0x10
#define FC_DICT   0x04
#define FC_RANGE   0x02
#define FC_REMOVED   0x20
#define FC_SANDBOX   0x40
#define FIXVAR_CNT   12

Number of fixed variables used for arguments.

#define FLEN_FIXED   40
2 /* find_name_end(): check name starts with
valid character */
#define FNE_INCL_BR   1 /* find_name_end(): include [] in name */
#define FUNCARG (   fp,
)    ((char_u **)(fp->uf_args.ga_data))[j]
#define FUNCLINE (   fp,
)    ((char_u **)(fp->uf_lines.ga_data))[j]
#define globvarht   globvardict.dv_hashtab

g: value

#define ITEM_COMPARE_FAIL   999
#define SCRIPT_SV (   id)    (((scriptvar_T **)ga_scripts.ga_data)[(id) - 1])
#define SCRIPT_VARS (   id)    (SCRIPT_SV(id)->sv_dict.dv_hashtab)
#define SP_COLUMN   0x80

start at cursor column

#define SP_END   0x40

leave cursor at end of match

#define SP_NOMOVE   0x01

don't move cursor

#define SP_REPEAT   0x02

repeat to find outer pair

#define SP_RETCOUNT   0x04

return matchcount

#define SP_SETPCMARK   0x08

set previous context mark

#define SP_START   0x10

accept match at start position

#define SP_SUBPAT   0x20

return nr of matching sub-pattern

#define VAR_SHORT_LEN   20

Short variable name length.

#define vimvarht   vimvardict.dv_hashtab

v: hashtab

#define VV (   idx,
[idx] = { \
.vv_name = name, \
.vv_di = { \
.di_tv = { .v_type = type }, \
.di_flags = 0, \
.di_key = { 0 }, \
}, \
.vv_flags = flags, \
char * name
Definition: eval.c:2102
err type
Definition: helpers.c:1470
#define VV_COMPAT   1 /* compatible, also used without "v:" */
#define vv_dict   vv_di.di_tv.vval.v_dict
#define vv_float   vv_di.di_tv.vval.v_float
#define vv_list   vv_di.di_tv.vval.v_list
#define vv_nr   vv_di.di_tv.vval.v_number
#define vv_partial   vv_di.di_tv.vval.v_partial
#define VV_RO   2 /* read-only */
#define VV_RO_SBX   4 /* read-only in the sandbox */
#define vv_special   vv_di.di_tv.vval.v_special
#define vv_str   vv_di.di_tv.vval.v_string
#define vv_tv   vv_di.di_tv
#define vv_type   vv_di.di_tv.v_type

Typedef Documentation

typedef void(* FunPtr) (void)
typedef struct lval_S lval_T
typedef void(* VimLFunc) (typval_T *args, typval_T *rvar, FunPtr data)

Prototype of C function that implements VimL function.

typedef struct fst VimLFuncDef

Structure holding VimL function definition.

Enumeration Type Documentation

Type of assert_* check being performed.


Type for dict_list function.


List dictionary keys.


List dictionary values.


List dictionary contents: [keys, values].

enum exptype_T

get_lval() flags


Do not emit error messages.


Do not use script autoloading.


Indicates that caller will not change the value (prevents error message).

Describe data to return from find_some_match()


Data for match().


Data for matchend().


Data for matchlist().


Data for matchstr().


Data for matchstrpos().

trans_function_name() flags


May use internal function name.


Do not emit error messages.


Do not use script autoloading.


Do not dereference a Funcref.


Will not change the variable.

Function Documentation

int call_func ( const char_u funcname,
int  len,
typval_T rettv,
int  argcount_in,
typval_T argvars_in,
ArgvFunc  argv_func,
linenr_T  firstline,
linenr_T  lastline,
int *  doesrange,
bool  evaluate,
partial_T partial,
dict_T selfdict_in 

Call a function with its resolved parameters

"argv_func", when not NULL, can be used to fill in arguments only when the invoked function uses them. It is called like this: new_argcount = argv_func(current_argcount, argv, called_func_argcount)

FAIL if function cannot be called, else OK (even if an error occurred while executing the function! Set msg_list to capture the error, see do_cmdline()).
void* call_func_retlist ( const char_u func,
int  argc,
typval_T argv 

Call Vim script function and return the result as a List

[in]funcFunction name.
[in]argcNumber of arguments.
[in]argvArray with typval_T arguments.
[allocated] NULL when calling function fails or return tv is not a List, allocated List otherwise.
varnumber_T call_func_retnr ( const char_u func,
int  argc,
typval_T argv 

Call Vim script function and return the result as a number

[in]funcFunction name.
[in]argcNumber of arguments.
[in]argvArray with typval_T arguments.
-1 when calling function fails, result of function otherwise.
char* call_func_retstr ( const char *const  func,
int  argc,
typval_T argv 

Call Vim script function and return the result as a string

[in]funcFunction name.
[in]argcNumber of arguments.
[in]argvArray with typval_T arguments.
[allocated] NULL when calling function fails, allocated string otherwise.
void call_user_func ( ufunc_T fp,
int  argcount,
typval_T argvars,
typval_T rettv,
linenr_T  firstline,
linenr_T  lastline,
dict_T selfdict 

Call a user function

fpFunction to call.
[in]argcountNumber of arguments.
[out]rettvReturn value.
[in]firstlineFirst line of range.
[in]lastlineLast line of range.
selfdictDictionary for "self" for dictionary functions.
int call_vim_function ( const char_u func,
int  argc,
typval_T argv,
typval_T rettv 
bool callback_call ( Callback *const  callback,
const int  argcount_in,
typval_T *const  argvars_in,
typval_T *const  rettv 
bool callback_from_typval ( Callback *const  callback,
typval_T *const  arg 
cleanup_function_call ( fc  )
int current_func_returned ( void  )
void del_menutrans_vars ( void  )
do_cmdline ( NULL  ,
get_func_line  ,
(void *)  fc,
int do_return ( exarg_T eap,
int  reanimate,
int  is_cmd,
void *  rettv 
long do_searchpair ( char_u spat,
char_u mpat,
char_u epat,
int  dir,
const typval_T skip,
int  flags,
pos_T match_pos,
linenr_T  lnum_stop,
long  time_limit 
char_u* do_string_sub ( char_u str,
char_u pat,
char_u sub,
typval_T expr,
char_u flags 

Perform a substitution on "str" with pattern "pat" and substitute "sub". When "sub" is NULL "expr" is used, must be a VAR_FUNC or VAR_PARTIAL. "flags" can be "g" to do a global substitute. Returns an allocated string, NULL for error.

int do_unlet ( const char *const  name,
const size_t  name_len,
const int  forceit 

unlet a variable

[in]nameVariable name to unlet.
[in]name_lenVariable name length.
[in]fonceitIf true, do not complain if variable doesn’t exist.
OK if it existed, FAIL otherwise.
emsgf ( _(e_invexpr2)  ,
int eval0 ( char_u arg,
typval_T rettv,
char_u **  nextcmd,
int  evaluate 
typval_T eval_call_provider ( char *  provider,
char *  method,
list_T arguments 
int eval_charconvert ( const char *const  enc_from,
const char *const  enc_to,
const char *const  fname_from,
const char *const  fname_to 
void eval_diff ( const char *const  origfile,
const char *const  newfile,
const char *const  outfile 
void eval_fmt_source_name_line ( char *  buf,
size_t  bufsize 

Writes "<sourcing_name>:<sourcing_lnum>" to buf[bufsize].

int eval_foldexpr ( char_u arg,
int *  cp 
void* eval_for_line ( const char_u arg,
bool *  errp,
char_u **  nextcmdp,
int  skip 
bool eval_has_provider ( const char *  feat)

Checks if provider for feature feat is enabled.

void eval_init ( void  )
void eval_patch ( const char *const  origfile,
const char *const  difffile,
const char *const  outfile 
int eval_printexpr ( const char *const  fname,
const char *const  args 
list_T* eval_spell_expr ( char_u badword,
char_u expr 
int eval_to_bool ( char_u arg,
bool *  error,
char_u **  nextcmd,
int  skip 
varnumber_T eval_to_number ( char_u expr)
char_u* eval_to_string ( char_u arg,
char_u **  nextcmd,
int  convert 
char_u* eval_to_string_safe ( char_u arg,
char_u **  nextcmd,
int  use_sandbox 
char* eval_to_string_skip ( const char *  arg,
const char **  nextcmd,
const bool  skip 

Top level evaluation function, returning a string

[in]argString to evaluate.
nextcmdPointer to the start of the next Ex command.
[in]skipIf true, only do parsing to nextcmd without reporting errors or actually evaluating anything.
[allocated] string result of evaluation or NULL in case of error or when skipping.
void ex_call ( exarg_T eap)
void ex_checkhealth ( exarg_T eap)

":checkhealth [plugins]"

void ex_const ( exarg_T eap)
void ex_delfunction ( exarg_T eap)

":delfunction {name}"

void ex_echo ( exarg_T eap)
void ex_echohl ( exarg_T eap)
void ex_execute ( exarg_T eap)
void ex_function ( exarg_T eap)
void ex_let ( exarg_T eap)
void ex_lockvar ( exarg_T eap)
void ex_return ( exarg_T eap)
void ex_unlet ( exarg_T eap)
ga_init& fc ( ufunc_T )
add_nr_var& fc ( dictitem_T ) -> fixvar[fixvar_idx++],"firstline",(varnumber_T) firstline
hashitem_T* find_hi_in_scoped_ht ( const char *  name,
hashtab_T **  pht 

Search hashitem in parent scope.

dictitem_T* find_var_in_scoped_ht ( const char *  name,
const size_t  namelen,
int  no_autoload 

Search variable in parent scope.

win_T* find_win_by_nr_or_id ( typval_T vp)

Find a window: When using a Window ID in any tab page, when using a number in the current tab page.

for ( ;;  )
for ( )
void free_for_info ( void *  fi_void)
linenr_T* func_breakpoint ( void *  cookie)
int func_call ( char_u name,
typval_T args,
partial_T partial,
dict_T selfdict,
typval_T rettv 
int* func_dbg_tick ( void *  cookie)
void func_dump_profile ( FILE *  fd)
bool func_equal ( typval_T tv1,
typval_T tv2,
bool  ic 
int func_has_abort ( void *  cookie)
int func_has_ended ( void *  cookie)
int func_level ( void *  cookie)
void func_line_end ( void *  cookie)
void func_line_exec ( void *  cookie)
void func_line_start ( void *  cookie)
char_u* func_name ( void *  cookie)
void func_ptr_ref ( ufunc_T fp)

Count a reference to a Function.

func_ptr_ref ( fp  )
void func_ptr_unref ( ufunc_T fp)

Unreference a Function: decrement the reference count and free it when it becomes zero. Unreference user function, freeing it if needed

Decrements the reference count and frees when it becomes zero.

fpFunction to unreference.
void func_ref ( char_u name)

Count a reference to a Function.

void func_unref ( char_u name)
bool garbage_collect ( bool  testing)

Do garbage collection for lists and dicts.

testingtrue if called from test_garbagecollect_now().
true if some memory was freed.
int get_copyID ( void  )

Get next (unique) copy ID

Used for traversing nested structures e.g. when serializing them or garbage collecting.

char_u* get_expr_name ( expand_T xp,
int  idx 
char_u* get_func_line ( int  c,
void *  cookie,
int  indent,
bool  do_concat 
char_u* get_function_name ( expand_T xp,
int  idx 
char_u* get_return_cmd ( void *  rettv)
int get_spellword ( list_T *const  list,
const char **  ret_word 

Get spell word from an entry from spellsuggest=expr:

Entry in question is supposed to be a list (to be checked by the caller) with two items: a word and a score represented as an unsigned number (whether it actually is unsigned is not checked).

Used to get the good word and score from the eval_spell_expr() result.

[in]listList to get values from.
[out]ret_wordSuggested word. Not initialized if return value is -1.
-1 in case of error, score otherwise.
char_u* get_user_func_name ( expand_T xp,
int  idx 
void get_user_input ( const typval_T *const  argvars,
typval_T *const  rettv,
const bool  inputdialog 
char_u* get_user_var_name ( expand_T xp,
int  idx 
char_u* get_var_value ( const char *const  name)
dict_T* get_vim_var_dict ( int  idx)

Get Dictionary v: variable value. Caller must take care of reference count when needed.

list_T* get_vim_var_list ( int  idx)
varnumber_T get_vim_var_nr ( int  idx)
char_u* get_vim_var_str ( int  idx)
if ( ret  = FAIL)
else if ( expr->  v_type = VAR_FUNC)
if ( s  = NULL)
if ( eval1_emsg &,,  true = FAIL)
static bool if ( eval_expr_typval(expr,&argv, 0,&rettv = FAIL)
if ( len  = = 0)
if ( skip  )
if ( expr_start!  = NULL)
if ( *!= '['&&*!= '.'p||lp->  ll_name = NULL)
if ( v  = NULL && !quiet)
if ( v!  = NULL && v->di_tv.v_type == VAR_FUNC)
if ( partial!  = NULL)
if ( error  = ERROR_NONE && evaluate)
if ( eval_expr_typval(expr, argv, 2,&rettv = FAIL)
if ( map  )
if ( )
if ( is_curbuf)
if ( append  )
if ( lines->  v_type = VAR_LIST)
if ( added  ,
if ( list_arg->v_type!  = VAR_LIST)
else if ( recursive!  = 0)
if ( action_arg->  v_type = VAR_UNKNOWN)
else if ( action_arg->v_type!  = VAR_STRING)
if ( *== ''||*== ''||*== ' '||*== ''f &&  act[1] = NUL)
else if ( title_arg->  v_type = VAR_UNKNOWN)
if ( set_errorlist(wp, l, action,(char_u *) title, d = OK)
if ( recurse >=  DICT_MAXNEST)
if ( depth >=  p_mfd)
if ( ins_compl_active())
if ( STRNCMP(fp->uf_name,"<lambda>", 8)  = = 0)
if ( selfdict!  = NULL)
if ( fp->uf_flags &  FC_SANDBOX)
if ( p_verbose >=  12)
if ( do_profiling_yes  )
if ( (did_emsg &&(fp->uf_flags &FC_ABORT))||rettv->  v_type = VAR_UNKNOWN)
if ( using_sandbox  )
if ( p_verbose >=12 &&sourcing_name!  = NULL)
if ( --fp->uf_calls<=0 &&fp->uf_refcount<=  0)
if ( did_save_redo  )
if ( iter  = NULL)
void init_var_dict ( dict_T dict,
ScopeDictDictItem *  dict_var,
int  scope 
void last_set_msg ( sctx_T  script_ctx)
line_breakcheck ( )
int list2fpos ( typval_T arg,
pos_T posp,
int *  fnump,
colnr_T curswantp 
void mapblock_fill_dict ( dict_T *const  dict,
const mapblock_T *const  mp,
long  buffer_value,
bool  compatible 

Fill a dictionary with all applicable maparg() like dictionaries

dictThe dictionary to be filled
mpThe maphash that contains the mapping information
buffer_valueThe "buffer" value
compatibleTrue for compatible with old maparg() dict
memset ( lp  ,
int modify_fname ( char_u src,
bool  tilde_file,
size_t *  usedlen,
char_u **  fnamep,
char_u **  bufp,
size_t *  fnamelen 
void new_script_vars ( scid_T  id)
bool next_for_item ( void *  fi_void,
char_u arg 
varnumber_T num_divide ( varnumber_T  n1,
varnumber_T  n2 
varnumber_T num_modulus ( varnumber_T  n1,
varnumber_T  n2 
void option_last_set_msg ( LastSet  last_set)

Displays where an option was last set.

Should only be invoked when 'verbose' is non-zero.

while* p ( p = = '.' && lp->ll_tv->v_type == VAR_DICT)
char_u* partial_name ( partial_T pt)
the function name of the partial.
void partial_unref ( partial_T pt)

Unreference a closure: decrement the reference count and free it when it becomes zero.

void prof_child_enter ( proftime_T tm)
void prof_child_exit ( proftime_T tm)
void reset_v_option_vars ( void  )
void restore_funccal ( void *  vfc)
restore_search_patterns ( )
return ( char_u )
void* save_funccal ( void  )
save_search_patterns ( )
char_u* set_cmdarg ( exarg_T eap,
char_u oldarg 
void set_context_for_expression ( expand_T xp,
char_u arg,
cmdidx_T  cmdidx 
void set_internal_string_var ( char_u name,
char_u value 
bool set_ref_in_func ( char_u name,
ufunc_T fp_in,
int  copyID 

Mark all lists and dicts referenced through function "name" with "copyID". "list_stack" is used to add lists to be marked. Can be NULL. "ht_stack" is used to add hashtabs to be marked. Can be NULL.

true if setting references failed somehow.
bool set_ref_in_functions ( int  copyID)

Set "copyID" in all functions available by name.

bool set_ref_in_ht ( hashtab_T ht,
int  copyID,
list_stack_T **  list_stack 

Mark all lists and dicts referenced through hashtab "ht" with "copyID".

htHashtab content will be marked.
copyIDNew mark for lists and dicts.
list_stackUsed to add lists to be marked. Can be NULL.
true if setting references failed somehow.
bool set_ref_in_item ( typval_T tv,
int  copyID,
ht_stack_T **  ht_stack,
list_stack_T **  list_stack 

Mark all lists and dicts referenced through typval "tv" with "copyID".

tvTypval content will be marked.
copyIDNew mark for lists and dicts.
ht_stackUsed to add hashtabs to be marked. Can be NULL.
list_stackUsed to add lists to be marked. Can be NULL.
true if setting references failed somehow.
bool set_ref_in_list ( list_T l,
int  copyID,
ht_stack_T **  ht_stack 

Mark all lists and dicts referenced through list "l" with "copyID".

lList content will be marked.
copyIDNew mark for lists and dicts.
ht_stackUsed to add hashtabs to be marked. Can be NULL.
true if setting references failed somehow.
void set_reg_var ( int  c)
void set_selfdict ( typval_T rettv,
dict_T selfdict 
void set_vcount ( long  count,
long  count1,
int  set_prevcount 
void set_vim_var_char ( int  c)
void set_vim_var_dict ( const VimVarIndex  idx,
dict_T *const  val 

Set Dictionary v: variable to the given dictionary

[in]idxIndex of variable to set.
[in,out]valValue to set to. Reference count will be incremented. Also keys of the dictionary will be made read-only.
void set_vim_var_list ( const VimVarIndex  idx,
list_T *const  val 

Set list v: variable to the given list

[in]idxIndex of variable to set.
[in,out]valValue to set to. Reference count will be incremented.
void set_vim_var_nr ( const VimVarIndex  idx,
const varnumber_T  val 

Set number v: variable to the given value

[in]idxIndex of variable to set.
[in]valValue to set to.
void set_vim_var_special ( const VimVarIndex  idx,
const SpecialVarValue  val 

Set special v: variable to the given value

[in]idxIndex of variable to set.
[in]valValue to set to.
void set_vim_var_string ( const VimVarIndex  idx,
const char *const  val,
const ptrdiff_t  len 

Set string v: variable to the given string

[in]idxIndex of variable to set.
[in]valValue to set to. Will be copied.
[in]lenLegth of that value or -1 in which case strlen() will be used.
int skip_expr ( char_u **  pp)
int store_session_globals ( FILE *  fd)
STRCPY ( name  ,
size_t string2float ( const char *const  text,
float_T *const  ret_value 

Convert the string to a floating point number

This uses strtod(). setlocale(LC_NUMERIC, "C") has been used earlier to make sure this always uses a decimal point.

[in]textString to convert.
[out]ret_valueLocation where conversion result is saved.
Length of the text that was consumed.
switch ( from->  v_type)
void timer_teardown ( void  )
bool translated_function_exists ( const char *  name)
tv_copy ( tv  ,
&vimvars.  vv_tv[VV_VAL] 
tv_copy& TV_DICT_HI2DI ( hi  ) -> di_tv, rettv
void unref_var_dict ( dict_T dict)
char_u* v_exception ( char_u oldval)
char_u* v_throwpoint ( char_u oldval)
bool valid_varname ( const char *  varname)

Check if a variable name is valid

[in]varnameVariable name to check.
false when variable name is not valid, true when it is. Also gives an error message if appropriate.
pos_T* var2fpos ( const typval_T *const  tv,
const int  dollar_lnum,
int *const  ret_fnum 

Translate a VimL object into a position

Accepts VAR_LIST and VAR_STRING objects. Does not give an error for invalid type.

[in]tvObject to translate.
[in]dollar_lnumTrue when "$" is last line.
[out]ret_fnumSet to fnum for marks.
Pointer to position or NULL in case of error (e.g. invalid type).
bool var_check_func_name ( const char *const  name,
const bool  new_var 

Check if name is a valid name to assign funcref to

[in]namePossible function/funcref name.
[in]new_varTrue if it is a name for a variable.
false in case of error, true in case of success. Also gives an error message if appropriate.
bool var_check_ro ( const int  flags,
const char *  name,
size_t  name_len 

Check whether variable is read-only (DI_FLAGS_RO, DI_FLAGS_RO_SBX)

Also gives an error message.

[in]flagsdi_flags attribute value.
[in]nameVariable name, for use in error message.
[in]name_lenVariable name length. Use TV_TRANSLATE to translate variable name and compute the length. Use TV_CSTRING to compute the length with strlen() without translating.

Both #TV_… values are used for optimization purposes: variable name with its length is needed only in case of error, when no error occurs computing them is a waste of CPU resources. This especially applies to gettext.

True if variable is read-only: either always or in sandbox when sandbox is enabled, false otherwise.
int var_item_copy ( const vimconv_T *const  conv,
typval_T *const  from,
typval_T *const  to,
const bool  deep,
const int  copyID 

Make a copy of an item

Lists and Dictionaries are also copied.

[in]convIf not NULL, convert all copied strings.
[in]fromValue to copy.
[out]toLocation where to copy to.
[in]deepIf true, use copy the container and all of the contained containers (nested).
[in]copyIDIf non-zero then when container is referenced more then once then copy of it that was already done is used. E.g. when copying list list = [list2, list2] (list[0] is list[1]) var_item_copy with zero copyID will emit a copy with (copy[0] isnot copy[1]), with non-zero it will emit a copy with (copy[0] is copy[1]) like in the original list. Not used when deep is false.
int var_redir_start ( char_u name,
int  append 
void var_redir_stop ( void  )
void var_redir_str ( char_u value,
int  value_len 
void var_set_global ( const char *const  name,
typval_T  vartv 
const void* var_shada_iter ( const void *const  iter,
const char **const  name,
typval_T rettv,
var_flavour_T  flavour 

Iterate over global variables

No modifications to global variable dictionary must be performed while iteration is in progress.
[in]iterIterator. Pass NULL to start iteration.
[out]nameVariable name.
[out]rettvVariable value.
Pointer that needs to be passed to next var_shada_iter invocation or NULL to indicate that iteration is over.
void vars_clear ( hashtab_T ht)
while ( argv_clear  ,
while ( )
xfree ( tofree  )
xfree ( name  )
xfree ( sourcing_name  )

Variable Documentation

theend __pad0__
skip_args __pad1__
const char* const act = tv_get_string_chk(action_arg)
int action = ' '
typval_T* action_arg = &args[1]
long added = 0
int ai
linenr_T append_lnum
if arg
Initial value:
if (is_const) {
EMSG(_("E996: Cannot lock an environment variable"));
return NULL;
#define _(x)
Definition: gettext.h:20
return NULL
Definition: eval.c:23987
if arg
Definition: eval.c:2095
#define EMSG(s)
Definition: message.h:40
return arg_end
int argcount = argcount_in
static int typval_T argv
Initial value:
Structure that holds an internal variable value.
Definition: typval.h:123
tv_clear & rettv
Definition: eval.c:1076
int argv_clear = 0
typval_T* argvars = argvars_in
fc breakpoint = dbg_find_breakpoint(FALSE, fp->uf_name, (linenr_T)0)
proftime_T call_start
const int called_emsg_before = called_emsg
fc caller = current_funccal
buf_T* curbuf_save = NULL
current_funccal = NULL
current_sctx = fp->uf_script_ctx
win_T* curwin_save = NULL
dict_T* d = NULL
fc dbg_tick = debug_tick
v di_flags = DI_FLAGS_RO | DI_FLAGS_FIX
did_emsg = FALSE
int const int did_emsg_before = did_emsg
bool did_save_redo = false
const bool do_profiling_yes = do_profiling == PROF_YES
* doesrange = false
fc l_avars dv_lock = VAR_FIXED
Initial value:
char buf[NUMBUFLEN]
Definition: vim.h:27
char *const buf
Definition: encode.c:231
int empty1 = FALSE
int int error = ERROR_NONE
const list_T* eval_msgpack_type_lists[]
Initial value:
= {
[kMPNil] = NULL,
[kMPMap] = NULL,
[kMPExt] = NULL,
Definition: eval.h:128
Definition: eval.h:129
Definition: eval.h:133
return NULL
Definition: eval.c:23987
Definition: eval.h:127
Definition: eval.h:130
Definition: eval.h:126
Definition: eval.h:125
Definition: eval.h:132
Definition: eval.h:131

Array mapping values from MessagePackType to corresponding list pointers.

char_u* expr_end
char_u* expr_start
return FAIL
add_nr_var & fc = xmalloc(sizeof(funccall_T))
fc fc_copyID = 0
fc fc_refcount = 0
int fixvar_idx = 0
return fname = fname_trans_sid(name, fname_buf, &tofree, &error)
char_u fname_buf[FLEN_FIXED+1]
ufunc_T* fp
fc func = fp
Initial value:
return NULL
Definition: eval.c:23987
return arg_end
Definition: eval.c:2250
unsigned char char_u
Definition: types.h:11
hashtab_T func_hashtab
bool func_not_yet_profiling_but_should
Initial value:
return NULL
Definition: eval.c:23987
bool has_profiling(bool file, char_u *fname, bool *fp)
Definition: ex_cmds2.c:778
ufunc_T * fp
Definition: eval.c:6569
int uf_profiling
true when func is being profiled
Definition: typval.h:272
char_u uf_name[]
Definition: typval.h:292
const bool do_profiling_yes
Definition: eval.c:23329
bool func_or_func_caller_profiling
Initial value:
return NULL
Definition: eval.c:23987
ufunc_T * func
Function being called.
Definition: eval.c:270
ufunc_T * fp
Definition: eval.c:6569
int uf_profiling
true when func is being profiled
Definition: typval.h:272
funccall_T * caller
Calling function or NULL.
Definition: eval.c:286
const bool do_profiling_yes
Definition: eval.c:23329
funccall_T * fc
Definition: eval.c:23103
const void const hashitem_T* hifirst = globvarht.ht_array
const size_t hinum = (size_t) globvarht.ht_mask + 1
hashtab_T* ht
const bool is_curbuf = buf == curbuf
bool islambda = false
list_T *const l = NULL
size_t len = get_env_len((const char_u **)&arg)
fc level = ex_nesting_level
void const char* line = NULL
fc linenr = 0
typval_T* list_arg = &args[0]
lp ll_name_len = (size_t)((const char *)p - lp->ll_name)
lp ll_tv = &v->di_tv
* name = (char *)arg
return NULL
char_u numbuf[NUMBUFLEN]
return OK
int opt_flags
while p
Initial value:
= (char_u *)find_name_end(name,
(const char_u **)&expr_start,
(const char_u **)&expr_end,
char_u * expr_end
Definition: eval.c:2303
char * name
Definition: eval.c:2102
unsigned char char_u
Definition: types.h:11
char_u * expr_start
Definition: eval.c:2302
funccall_T* previous_funccal = NULL
int quiet = flags & GLV_QUIET
* remp = (tv_get_number_chk(&rettv, &error) == 0)
return ret = eval1(arg, rettv, evaluate)
fc rettv = rettv
fc returned = FALSE
return retval = FAIL
const sctx_T save_current_sctx = current_sctx
save_did_emsg = did_emsg
save_redo_T save_redo
Initial value:
unsigned char char_u
Definition: types.h:11
Definition: eval.c:23259
save_sourcing_name = sourcing_name
dict_T* selfdict = selfdict_in
sourcing_lnum = 1
sourcing_name = xmalloc(len)
int started_profiling = false
void const char* title = NULL
typval_T* title_arg = &args[2]
char_u * tofree = NULL
fp uf_calls
bool using_sandbox = false
Initial value:
= find_var(lp->ll_name, lp->ll_name_len,
(flags & GLV_READ_ONLY) ? NULL : &ht,
return NULL
Definition: eval.c:23987
Do not use script autoloading.
Definition: eval.c:244
hashtab_T * ht
Definition: eval.c:2288
Definition: eval.c:245
v di_tv vval v_list = &fc->l_varlist
v di_tv v_lock = VAR_FIXED
rettv vval v_number = -1
v di_tv v_type = VAR_UNKNOWN
tv_clear & var1
Initial value:
Definition: coverity-model.c:39
Definition: eval.c:2344
typval_T var2
proftime_T wait_start