Lines Matching refs:ectx

105 #define STACK_TV_BOT(idx) (((typval_T *)ectx->ec_stack.ga_data) + ectx->ec_stack.ga_len + (idx))
127 exe_newlist(int count, ectx_T *ectx) in exe_newlist() argument
139 ectx->ec_stack.ga_len -= count - 1; in exe_newlist()
140 else if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exe_newlist()
143 ++ectx->ec_stack.ga_len; in exe_newlist()
257 ectx_T *ectx) in call_dfunc() argument
290 + ectx->ec_dfunc_idx)->df_ufunc); in call_dfunc()
338 if (exe_newlist(vararg_count, ectx) == FAIL) in call_dfunc()
361 if (GA_GROW_FAILS(&ectx->ec_stack, arg_to_add + STACK_FRAME_SIZE + varcount)) in call_dfunc()
370 if (ectx->ec_funclocal.floc_restore_cmdmod) in call_dfunc()
375 *floc = ectx->ec_funclocal; in call_dfunc()
376 ectx->ec_funclocal.floc_restore_cmdmod = FALSE; in call_dfunc()
386 ectx->ec_stack.ga_len += arg_to_add; in call_dfunc()
389 STACK_TV_BOT(STACK_FRAME_FUNC_OFF)->vval.v_number = ectx->ec_dfunc_idx; in call_dfunc()
390 STACK_TV_BOT(STACK_FRAME_IIDX_OFF)->vval.v_number = ectx->ec_iidx; in call_dfunc()
391 STACK_TV_BOT(STACK_FRAME_INSTR_OFF)->vval.v_string = (void *)ectx->ec_instr; in call_dfunc()
393 (void *)ectx->ec_outer_ref; in call_dfunc()
395 STACK_TV_BOT(STACK_FRAME_IDX_OFF)->vval.v_number = ectx->ec_frame_idx; in call_dfunc()
396 ectx->ec_frame_idx = ectx->ec_stack.ga_len; in call_dfunc()
408 ectx->ec_stack.ga_len += STACK_FRAME_SIZE + varcount; in call_dfunc()
438 ref->or_outer->out_stack = &ectx->ec_stack; in call_dfunc()
439 ref->or_outer->out_frame_idx = ectx->ec_frame_idx; in call_dfunc()
440 if (ectx->ec_outer_ref != NULL) in call_dfunc()
441 ref->or_outer->out_up = ectx->ec_outer_ref->or_outer; in call_dfunc()
443 ectx->ec_outer_ref = ref; in call_dfunc()
446 ectx->ec_outer_ref = NULL; in call_dfunc()
451 ectx->ec_dfunc_idx = cdf_idx; in call_dfunc()
452 ectx->ec_instr = INSTRUCTIONS(dfunc); in call_dfunc()
463 ectx->ec_iidx = 0; in call_dfunc()
469 #define STACK_TV(idx) (((typval_T *)ectx->ec_stack.ga_data) + idx)
479 handle_closure_in_use(ectx_T *ectx, int free_arguments) in handle_closure_in_use() argument
482 + ectx->ec_dfunc_idx; in handle_closure_in_use()
488 garray_T *gap = &ectx->ec_funcrefs; in handle_closure_in_use()
495 tv = STACK_TV(ectx->ec_frame_idx + STACK_FRAME_SIZE + dfunc->df_varcount); in handle_closure_in_use()
501 top = ectx->ec_frame_idx - argcount; in handle_closure_in_use()
521 typval_T *stv = STACK_TV(ectx->ec_frame_idx in handle_closure_in_use()
568 tv = STACK_TV(ectx->ec_frame_idx + STACK_FRAME_SIZE + idx); in handle_closure_in_use()
598 pt->pt_outer.out_frame_idx = ectx->ec_frame_idx - top; in handle_closure_in_use()
654 func_return(ectx_T *ectx) in func_return() argument
659 + ectx->ec_dfunc_idx; in func_return()
661 int top = ectx->ec_frame_idx - argcount; in func_return()
663 int prev_dfunc_idx = STACK_TV(ectx->ec_frame_idx in func_return()
691 if (handle_closure_in_use(ectx, TRUE) == FAIL) in func_return()
695 for (idx = top; idx < ectx->ec_frame_idx; ++idx) in func_return()
699 for (idx = ectx->ec_frame_idx + STACK_FRAME_SIZE; in func_return()
700 idx < ectx->ec_stack.ga_len - 1; ++idx) in func_return()
705 ret_idx = ectx->ec_stack.ga_len - 1; in func_return()
706 if (ret_idx == ectx->ec_frame_idx + STACK_FRAME_IDX_OFF) in func_return()
709 if (ectx->ec_outer_ref != NULL) in func_return()
711 if (ectx->ec_outer_ref->or_outer_allocated) in func_return()
712 vim_free(ectx->ec_outer_ref->or_outer); in func_return()
713 partial_unref(ectx->ec_outer_ref->or_partial); in func_return()
714 vim_free(ectx->ec_outer_ref); in func_return()
718 ectx->ec_dfunc_idx = prev_dfunc_idx; in func_return()
719 ectx->ec_iidx = STACK_TV(ectx->ec_frame_idx in func_return()
721 ectx->ec_instr = (void *)STACK_TV(ectx->ec_frame_idx in func_return()
723 ectx->ec_outer_ref = (void *)STACK_TV(ectx->ec_frame_idx in func_return()
725 floc = (void *)STACK_TV(ectx->ec_frame_idx in func_return()
728 ectx->ec_frame_idx = STACK_TV(ectx->ec_frame_idx in func_return()
732 ectx->ec_funclocal.floc_restore_cmdmod = FALSE; in func_return()
735 ectx->ec_funclocal = *floc; in func_return()
743 ectx->ec_stack.ga_len = top + 1; in func_return()
748 ectx->ec_stack.ga_len = top; in func_return()
761 call_prepare(int argcount, typval_T *argvars, ectx_T *ectx) in call_prepare() argument
773 ectx->ec_stack.ga_len -= argcount - 1; in call_prepare()
774 else if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in call_prepare()
777 ++ectx->ec_stack.ga_len; in call_prepare()
795 call_bfunc(int func_idx, int argcount, ectx_T *ectx) in call_bfunc() argument
801 char *save_func_name = ectx->ec_where.wt_func_name; in call_bfunc()
803 if (call_prepare(argcount, argvars, ectx) == FAIL) in call_bfunc()
805 ectx->ec_where.wt_func_name = internal_func_name(func_idx); in call_bfunc()
809 current_ectx = ectx; in call_bfunc()
812 ectx->ec_where.wt_func_name = save_func_name; in call_bfunc()
836 ectx_T *ectx, in call_ufunc() argument
873 return call_dfunc(ufunc->uf_dfunc_idx, pt, argcount, ectx); in call_ufunc()
876 if (call_prepare(argcount, argvars, ectx) == FAIL) in call_ufunc()
937 ectx_T *ectx, in call_by_name() argument
951 return call_bfunc(func_idx, argcount, ectx); in call_by_name()
991 return call_ufunc(ufunc, NULL, argcount, ectx, iptr, selfdict); in call_by_name()
1001 ectx_T *ectx) in call_partial() argument
1018 if (GA_GROW_FAILS(&ectx->ec_stack, pt->pt_argc)) in call_partial()
1022 ectx->ec_stack.ga_len += pt->pt_argc; in call_partial()
1032 return call_ufunc(pt->pt_func, pt, argcount, ectx, NULL, selfdict); in call_partial()
1050 res = call_by_name(fname, argcount, ectx, NULL, selfdict); in call_partial()
1397 ectx_T *ectx, in call_eval_func() argument
1403 res = call_by_name(name, argcount, ectx, iptr, NULL); in call_eval_func()
1419 return call_partial(&v->di_tv, argcount, ectx); in call_eval_func()
1429 fill_partial_and_closure(partial_T *pt, ufunc_T *ufunc, ectx_T *ectx) in fill_partial_and_closure() argument
1437 + ectx->ec_dfunc_idx; in fill_partial_and_closure()
1441 pt->pt_outer.out_stack = &ectx->ec_stack; in fill_partial_and_closure()
1442 pt->pt_outer.out_frame_idx = ectx->ec_frame_idx; in fill_partial_and_closure()
1443 if (ectx->ec_outer_ref != NULL) in fill_partial_and_closure()
1446 pt->pt_outer.out_up = ectx->ec_outer_ref->or_outer; in fill_partial_and_closure()
1447 if (ectx->ec_outer_ref->or_partial != NULL) in fill_partial_and_closure()
1449 pt->pt_outer.out_up_partial = ectx->ec_outer_ref->or_partial; in fill_partial_and_closure()
1457 if (GA_GROW_FAILS(&ectx->ec_funcrefs, 1)) in fill_partial_and_closure()
1464 ++(((typval_T *)ectx->ec_stack.ga_data) + ectx->ec_frame_idx in fill_partial_and_closure()
1467 ((partial_T **)ectx->ec_funcrefs.ga_data) in fill_partial_and_closure()
1468 [ectx->ec_funcrefs.ga_len] = pt; in fill_partial_and_closure()
1470 ++ectx->ec_funcrefs.ga_len; in fill_partial_and_closure()
1511 #define STACK_TV(idx) (((typval_T *)ectx->ec_stack.ga_data) + idx)
1515 #define STACK_TV_BOT(idx) (((typval_T *)ectx->ec_stack.ga_data) + ectx->ec_stack.ga_len + idx)
1518 #define STACK_TV_VAR(idx) (((typval_T *)ectx->ec_stack.ga_data) + ectx->ec_frame_idx + STACK_FRAME_…
1534 ectx_T *ectx = debug_context; in lookup_debug_var() local
1537 if (ectx == NULL) in lookup_debug_var()
1539 dfunc = ((dfunc_T *)def_functions.ga_data) + ectx->ec_dfunc_idx; in lookup_debug_var()
1553 return STACK_TV(ectx->ec_frame_idx - ufunc->uf_args.ga_len in lookup_debug_var()
1556 return STACK_TV(ectx->ec_frame_idx - 1); in lookup_debug_var()
1572 handle_debug(isn_T *iptr, ectx_T *ectx) in handle_debug() argument
1576 + ectx->ec_dfunc_idx)->df_ufunc; in handle_debug()
1597 debug_context = ectx; in handle_debug()
1644 exec_instructions(ectx_T *ectx) in exec_instructions() argument
1647 int save_trylevel_at_start = ectx->ec_trylevel_at_start; in exec_instructions()
1651 ectx->ec_iidx = 0; in exec_instructions()
1654 ectx->ec_trylevel_at_start = trylevel; in exec_instructions()
1688 garray_T *trystack = &ectx->ec_trystack; in exec_instructions()
1704 if (trycmd != NULL && trycmd->tcd_frame_idx == ectx->ec_frame_idx) in exec_instructions()
1709 ectx->ec_iidx = trycmd->tcd_finally_idx; in exec_instructions()
1714 ectx->ec_iidx = trycmd->tcd_catch_idx; in exec_instructions()
1723 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
1728 ++ectx->ec_stack.ga_len; in exec_instructions()
1729 if (ectx->ec_frame_idx == ectx->ec_initial_frame_idx) in exec_instructions()
1733 if (handle_closure_in_use(ectx, FALSE) == FAIL) in exec_instructions()
1738 if (func_return(ectx) == FAIL) in exec_instructions()
1744 iptr = &ectx->ec_instr[ectx->ec_iidx++]; in exec_instructions()
1785 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
1794 ++ectx->ec_stack.ga_len; in exec_instructions()
1801 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
1807 ++ectx->ec_stack.ga_len; in exec_instructions()
1810 tv->vval.v_instr->instr_ectx = ectx; in exec_instructions()
1824 subs_instr.subs_ectx = ectx; in exec_instructions()
1866 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
1874 ++ectx->ec_stack.ga_len; in exec_instructions()
1895 --ectx->ec_stack.ga_len; in exec_instructions()
1962 ectx->ec_stack.ga_len -= count; in exec_instructions()
2015 ectx->ec_stack.ga_len -= count; in exec_instructions()
2061 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2064 ++ectx->ec_stack.ga_len; in exec_instructions()
2069 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2072 ++ectx->ec_stack.ga_len; in exec_instructions()
2081 sv = get_script_svar(sref, ectx->ec_dfunc_idx); in exec_instructions()
2085 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2088 ++ectx->ec_stack.ga_len; in exec_instructions()
2108 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2111 ++ectx->ec_stack.ga_len; in exec_instructions()
2158 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2161 ++ectx->ec_stack.ga_len; in exec_instructions()
2171 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2177 ++ectx->ec_stack.ga_len; in exec_instructions()
2198 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2205 ++ectx->ec_stack.ga_len; in exec_instructions()
2217 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2222 ++ectx->ec_stack.ga_len; in exec_instructions()
2232 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2237 ++ectx->ec_stack.ga_len; in exec_instructions()
2243 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2252 ++ectx->ec_stack.ga_len; in exec_instructions()
2257 --ectx->ec_stack.ga_len; in exec_instructions()
2271 --ectx->ec_stack.ga_len; in exec_instructions()
2294 sv = get_script_svar(sref, ectx->ec_dfunc_idx); in exec_instructions()
2297 --ectx->ec_stack.ga_len; in exec_instructions()
2320 --ectx->ec_stack.ga_len; in exec_instructions()
2345 --ectx->ec_stack.ga_len; in exec_instructions()
2356 --ectx->ec_stack.ga_len; in exec_instructions()
2365 --ectx->ec_stack.ga_len; in exec_instructions()
2400 --ectx->ec_stack.ga_len; in exec_instructions()
2420 --ectx->ec_stack.ga_len; in exec_instructions()
2581 ectx->ec_stack.ga_len -= 3; in exec_instructions()
2690 ectx->ec_stack.ga_len -= 4; in exec_instructions()
2703 outer_T *outer = ectx->ec_outer_ref == NULL ? NULL in exec_instructions()
2704 : ectx->ec_outer_ref->or_outer; in exec_instructions()
2722 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2725 ++ectx->ec_stack.ga_len; in exec_instructions()
2729 --ectx->ec_stack.ga_len; in exec_instructions()
2816 ectx->ec_stack.ga_len -= 2; in exec_instructions()
2894 ectx->ec_stack.ga_len -= 3; in exec_instructions()
2910 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
2914 ++ectx->ec_stack.ga_len; in exec_instructions()
2986 --ectx->ec_stack.ga_len; in exec_instructions()
3003 if (exe_newlist(iptr->isn_arg.number, ectx) == FAIL) in exec_instructions()
3051 ectx->ec_stack.ga_len -= 2 * count - 1; in exec_instructions()
3052 else if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
3055 ++ectx->ec_stack.ga_len; in exec_instructions()
3070 ectx) == FAIL) in exec_instructions()
3079 ectx) == FAIL) in exec_instructions()
3099 --ectx->ec_stack.ga_len; in exec_instructions()
3103 r = call_partial(tv, pfunc->cpf_argcount, ectx); in exec_instructions()
3115 --ectx->ec_stack.ga_len; in exec_instructions()
3127 ectx, iptr) == FAIL) in exec_instructions()
3134 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
3137 ++ectx->ec_stack.ga_len; in exec_instructions()
3146 garray_T *trystack = &ectx->ec_trystack; in exec_instructions()
3153 && trycmd->tcd_frame_idx == ectx->ec_frame_idx) in exec_instructions()
3157 ectx->ec_iidx = trycmd->tcd_finally_idx; in exec_instructions()
3159 ectx->ec_iidx = trycmd->tcd_endtry_idx; in exec_instructions()
3176 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
3182 ectx) == FAIL) in exec_instructions()
3185 ++ectx->ec_stack.ga_len; in exec_instructions()
3198 ectx) == FAIL) in exec_instructions()
3246 --ectx->ec_stack.ga_len; in exec_instructions()
3250 ectx->ec_iidx = iptr->isn_arg.jump.jump_where; in exec_instructions()
3261 ectx->ec_iidx = iptr->isn_arg.jumparg.jump_where; in exec_instructions()
3271 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
3283 ectx->ec_iidx = iptr->isn_arg.forloop.for_end; in exec_instructions()
3284 may_restore_cmdmod(&ectx->ec_funclocal); in exec_instructions()
3294 ++ectx->ec_stack.ga_len; in exec_instructions()
3302 ++ectx->ec_stack.ga_len; in exec_instructions()
3315 ectx->ec_iidx = iptr->isn_arg.forloop.for_end; in exec_instructions()
3316 may_restore_cmdmod(&ectx->ec_funclocal); in exec_instructions()
3327 ++ectx->ec_stack.ga_len; in exec_instructions()
3351 ectx->ec_iidx = iptr->isn_arg.forloop.for_end; in exec_instructions()
3352 may_restore_cmdmod(&ectx->ec_funclocal); in exec_instructions()
3361 ++ectx->ec_stack.ga_len; in exec_instructions()
3378 if (GA_GROW_FAILS(&ectx->ec_trystack, 1)) in exec_instructions()
3380 trycmd = ((trycmd_T *)ectx->ec_trystack.ga_data) in exec_instructions()
3381 + ectx->ec_trystack.ga_len; in exec_instructions()
3382 ++ectx->ec_trystack.ga_len; in exec_instructions()
3385 trycmd->tcd_frame_idx = ectx->ec_frame_idx; in exec_instructions()
3386 trycmd->tcd_stack_len = ectx->ec_stack.ga_len; in exec_instructions()
3403 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
3406 ++ectx->ec_stack.ga_len; in exec_instructions()
3415 garray_T *trystack = &ectx->ec_trystack; in exec_instructions()
3417 may_restore_cmdmod(&ectx->ec_funclocal); in exec_instructions()
3433 garray_T *trystack = &ectx->ec_trystack; in exec_instructions()
3458 ectx->ec_iidx = iidx; in exec_instructions()
3464 garray_T *trystack = &ectx->ec_trystack; in exec_instructions()
3477 garray_T *trystack = &ectx->ec_trystack; in exec_instructions()
3500 while (ectx->ec_stack.ga_len > trycmd->tcd_stack_len) in exec_instructions()
3502 --ectx->ec_stack.ga_len; in exec_instructions()
3508 ectx->ec_iidx = trycmd->tcd_cont - 1; in exec_instructions()
3515 garray_T *trystack = &ectx->ec_trystack; in exec_instructions()
3527 --ectx->ec_stack.ga_len; in exec_instructions()
3581 --ectx->ec_stack.ga_len; in exec_instructions()
3623 --ectx->ec_stack.ga_len; in exec_instructions()
3667 --ectx->ec_stack.ga_len; in exec_instructions()
3698 --ectx->ec_stack.ga_len; in exec_instructions()
3722 --ectx->ec_stack.ga_len; in exec_instructions()
3744 --ectx->ec_stack.ga_len; in exec_instructions()
3767 --ectx->ec_stack.ga_len; in exec_instructions()
3787 --ectx->ec_stack.ga_len; in exec_instructions()
3810 --ectx->ec_stack.ga_len; in exec_instructions()
3831 --ectx->ec_stack.ga_len; in exec_instructions()
3839 --ectx->ec_stack.ga_len; in exec_instructions()
3896 --ectx->ec_stack.ga_len; in exec_instructions()
3921 --ectx->ec_stack.ga_len; in exec_instructions()
3935 --ectx->ec_stack.ga_len; in exec_instructions()
3959 ectx->ec_stack.ga_len -= is_slice ? 2 : 1; in exec_instructions()
4004 ectx->ec_stack.ga_len -= is_slice ? 2 : 1; in exec_instructions()
4043 ectx->ec_stack.ga_len -= is_slice ? 2 : 1; in exec_instructions()
4084 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
4086 ++ectx->ec_stack.ga_len; in exec_instructions()
4091 ectx->ec_where.wt_index = gi->gi_index + 1; in exec_instructions()
4092 ectx->ec_where.wt_variable = TRUE; in exec_instructions()
4122 --ectx->ec_stack.ga_len; in exec_instructions()
4130 --ectx->ec_stack.ga_len; in exec_instructions()
4236 if (!ectx->ec_where.wt_variable) in exec_instructions()
4237 ectx->ec_where.wt_index = ct->ct_arg_idx; in exec_instructions()
4238 if (check_typval_type(ct->ct_type, tv, ectx->ec_where) in exec_instructions()
4241 if (!ectx->ec_where.wt_variable) in exec_instructions()
4242 ectx->ec_where.wt_index = 0; in exec_instructions()
4344 if (GA_GROW_FAILS(&ectx->ec_stack, 1)) in exec_instructions()
4346 ++ectx->ec_stack.ga_len; in exec_instructions()
4371 --ectx->ec_stack.ga_len; in exec_instructions()
4389 --ectx->ec_stack.ga_len; in exec_instructions()
4398 ectx->ec_funclocal.floc_save_cmdmod = cmdmod; in exec_instructions()
4399 ectx->ec_funclocal.floc_restore_cmdmod = TRUE; in exec_instructions()
4400 ectx->ec_funclocal.floc_restore_cmdmod_stacklen = in exec_instructions()
4401 ectx->ec_stack.ga_len; in exec_instructions()
4410 cmdmod = ectx->ec_funclocal.floc_save_cmdmod; in exec_instructions()
4411 ectx->ec_funclocal.floc_restore_cmdmod = FALSE; in exec_instructions()
4446 if (GA_GROW_FAILS(&ectx->ec_stack, count - 1)) in exec_instructions()
4448 ectx->ec_stack.ga_len += count - 1; in exec_instructions()
4494 + ectx->ec_dfunc_idx)->df_ufunc; in exec_instructions()
4510 handle_debug(iptr, ectx); in exec_instructions()
4530 --ectx->ec_stack.ga_len; in exec_instructions()
4532 ectx->ec_where.wt_index = 0; in exec_instructions()
4533 ectx->ec_where.wt_variable = FALSE; in exec_instructions()
4541 if (ectx->ec_frame_idx == ectx->ec_initial_frame_idx) in exec_instructions()
4544 if (func_return(ectx) == FAIL) in exec_instructions()
4553 if (did_emsg_cumul + did_emsg == ectx->ec_did_emsg_before in exec_instructions()
4559 if (ectx->ec_funclocal.floc_restore_cmdmod) in exec_instructions()
4561 while (ectx->ec_stack.ga_len in exec_instructions()
4562 > ectx->ec_funclocal.floc_restore_cmdmod_stacklen) in exec_instructions()
4564 --ectx->ec_stack.ga_len; in exec_instructions()
4567 while (ectx->ec_instr[ectx->ec_iidx].isn_type != ISN_CMDMOD_REV) in exec_instructions()
4568 ++ectx->ec_iidx; in exec_instructions()
4575 if (trylevel <= ectx->ec_trylevel_at_start) in exec_instructions()
4583 ectx->ec_trylevel_at_start = save_trylevel_at_start; in exec_instructions()
4595 ectx_T *ectx = tv->vval.v_instr->instr_ectx; in exe_typval_instr() local
4596 isn_T *save_instr = ectx->ec_instr; in exe_typval_instr()
4597 int save_iidx = ectx->ec_iidx; in exe_typval_instr()
4600 ectx->ec_instr = tv->vval.v_instr->instr_instr; in exe_typval_instr()
4601 res = exec_instructions(ectx); in exe_typval_instr()
4605 --ectx->ec_stack.ga_len; in exe_typval_instr()
4608 ectx->ec_instr = save_instr; in exe_typval_instr()
4609 ectx->ec_iidx = save_iidx; in exe_typval_instr()
4621 ectx_T *ectx = substitute_instr->subs_ectx; in exe_substitute_instr() local
4622 isn_T *save_instr = ectx->ec_instr; in exe_substitute_instr()
4623 int save_iidx = ectx->ec_iidx; in exe_substitute_instr()
4626 ectx->ec_instr = substitute_instr->subs_instr; in exe_substitute_instr()
4627 if (exec_instructions(ectx) == OK) in exe_substitute_instr()
4632 --ectx->ec_stack.ga_len; in exe_substitute_instr()
4641 ectx->ec_instr = save_instr; in exe_substitute_instr()
4642 ectx->ec_iidx = save_iidx; in exe_substitute_instr()
4659 ectx_T ectx; // execution context in call_def_function() local
4677 #define STACK_TV(idx) (((typval_T *)ectx.ec_stack.ga_data) + idx) in call_def_function()
4681 #define STACK_TV_BOT(idx) (((typval_T *)ectx.ec_stack.ga_data) + ectx.ec_stack.ga_len + idx) in call_def_function()
4685 #define STACK_TV_VAR(idx) (((typval_T *)ectx.ec_stack.ga_data) + ectx.ec_frame_idx + STACK_FRAME_SI… in call_def_function()
4718 CLEAR_FIELD(ectx); in call_def_function()
4719 ectx.ec_dfunc_idx = ufunc->uf_dfunc_idx; in call_def_function()
4720 ga_init2(&ectx.ec_stack, sizeof(typval_T), 500); in call_def_function()
4721 if (GA_GROW_FAILS(&ectx.ec_stack, 20)) in call_def_function()
4726 ga_init2(&ectx.ec_trystack, sizeof(trycmd_T), 10); in call_def_function()
4727 ga_init2(&ectx.ec_funcrefs, sizeof(partial_T *), 10); in call_def_function()
4728 ectx.ec_did_emsg_before = did_emsg_before; in call_def_function()
4772 ++ectx.ec_stack.ga_len; in call_def_function()
4784 if (exe_newlist(vararg_count, &ectx) == FAIL) in call_def_function()
4809 --ectx.ec_stack.ga_len; in call_def_function()
4818 ++ectx.ec_stack.ga_len; in call_def_function()
4821 ++ectx.ec_stack.ga_len; in call_def_function()
4824 ectx.ec_frame_idx = ectx.ec_stack.ga_len; in call_def_function()
4825 ectx.ec_initial_frame_idx = ectx.ec_frame_idx; in call_def_function()
4836 ectx.ec_outer_ref = ALLOC_CLEAR_ONE(outer_ref_T); in call_def_function()
4837 if (ectx.ec_outer_ref == NULL) in call_def_function()
4845 ectx.ec_outer_ref->or_outer = in call_def_function()
4850 ectx.ec_outer_ref->or_outer = &partial->pt_outer; in call_def_function()
4852 ectx.ec_outer_ref->or_partial = partial; in call_def_function()
4857 ectx.ec_outer_ref->or_outer = &base_ufunc->uf_partial->pt_outer; in call_def_function()
4859 ectx.ec_outer_ref->or_partial = base_ufunc->uf_partial; in call_def_function()
4867 STACK_TV(ectx.ec_stack.ga_len)->v_type = VAR_UNKNOWN; in call_def_function()
4868 ++ectx.ec_stack.ga_len; in call_def_function()
4878 ectx.ec_stack.ga_len += dfunc->df_varcount; in call_def_function()
4883 ++ectx.ec_stack.ga_len; in call_def_function()
4886 ectx.ec_instr = INSTRUCTIONS(dfunc); in call_def_function()
4911 ectx.ec_where.wt_index = 0; in call_def_function()
4912 ectx.ec_where.wt_variable = FALSE; in call_def_function()
4915 ret = exec_instructions(&ectx); in call_def_function()
4932 while (ectx.ec_frame_idx != ectx.ec_initial_frame_idx) in call_def_function()
4933 func_return(&ectx); in call_def_function()
4936 if (ectx.ec_funcrefs.ga_len > 0) in call_def_function()
4938 handle_closure_in_use(&ectx, FALSE); in call_def_function()
4939 ga_clear(&ectx.ec_funcrefs); // TODO: should not be needed? in call_def_function()
4961 if (ectx.ec_funclocal.floc_restore_cmdmod) in call_def_function()
4965 cmdmod = ectx.ec_funclocal.floc_save_cmdmod; in call_def_function()
4972 for (idx = 0; idx < ectx.ec_stack.ga_len; ++idx) in call_def_function()
4976 vim_free(ectx.ec_stack.ga_data); in call_def_function()
4977 vim_free(ectx.ec_trystack.ga_data); in call_def_function()
4978 if (ectx.ec_outer_ref != NULL) in call_def_function()
4980 if (ectx.ec_outer_ref->or_outer_allocated) in call_def_function()
4981 vim_free(ectx.ec_outer_ref->or_outer); in call_def_function()
4982 partial_unref(ectx.ec_outer_ref->or_partial); in call_def_function()
4983 vim_free(ectx.ec_outer_ref); in call_def_function()