if (count > 0)
ectx->ec_stack.ga_len -= count - 1;
- else if (ga_grow(&ectx->ec_stack, 1) == FAIL)
+ else if (GA_GROW(&ectx->ec_stack, 1) == FAIL)
return FAIL;
else
++ectx->ec_stack.ga_len;
// Result replaces the arguments on the stack.
if (argcount > 0)
ectx->ec_stack.ga_len -= argcount - 1;
- else if (ga_grow(&ectx->ec_stack, 1) == FAIL)
+ else if (GA_GROW(&ectx->ec_stack, 1) == FAIL)
return FAIL;
else
++ectx->ec_stack.ga_len;
int ret = FAIL;
int defcount = ufunc->uf_args.ga_len - argc;
int save_sc_version = current_sctx.sc_version;
+ int breakcheck_count = 0;
// Get pointer to item in the stack.
#define STACK_TV(idx) (((typval_T *)ectx.ec_stack.ga_data) + idx)
{
isn_T *iptr;
- veryfast_breakcheck();
+ if (++breakcheck_count >= 100)
+ {
+ line_breakcheck();
+ breakcheck_count = 0;
+ }
if (got_int)
{
// Turn CTRL-C into an exception.
if (ectx.ec_frame_idx == initial_frame_idx)
{
// At the toplevel we are done. Push a dummy return value.
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
tv = STACK_TV_BOT(0);
tv->v_type = VAR_NUMBER;
// load local variable or argument
case ISN_LOAD:
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
copy_tv(STACK_TV_VAR(iptr->isn_arg.number), STACK_TV_BOT(0));
++ectx.ec_stack.ga_len;
// load variable or argument from outer scope
case ISN_LOADOUTER:
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
copy_tv(STACK_OUT_TV_VAR(iptr->isn_arg.number),
STACK_TV_BOT(0));
// load v: variable
case ISN_LOADV:
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
copy_tv(get_vim_var_tv(iptr->isn_arg.number), STACK_TV_BOT(0));
++ectx.ec_stack.ga_len;
sv = ((svar_T *)si->sn_var_vals.ga_data)
+ iptr->isn_arg.script.script_idx;
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
copy_tv(sv->sv_tv, STACK_TV_BOT(0));
++ectx.ec_stack.ga_len;
}
else
{
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
copy_tv(&di->di_tv, STACK_TV_BOT(0));
++ectx.ec_stack.ga_len;
}
else
{
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
copy_tv(&di->di_tv, STACK_TV_BOT(0));
++ectx.ec_stack.ga_len;
// This is not expected to fail, name is checked during
// compilation: don't set SOURCING_LNUM.
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
if (get_option_tv(&name, &optval, TRUE) == FAIL)
goto failed;
typval_T optval;
char_u *name = iptr->isn_arg.string;
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
// name is always valid, checked when compiling
(void)get_env_tv(&name, &optval, TRUE);
// load @register
case ISN_LOADREG:
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
tv = STACK_TV_BOT(0);
tv->v_type = VAR_STRING;
case ISN_PUSHFUNC:
case ISN_PUSHCHANNEL:
case ISN_PUSHJOB:
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
tv = STACK_TV_BOT(0);
++ectx.ec_stack.ga_len;
if (count > 0)
ectx.ec_stack.ga_len -= 2 * count - 1;
- else if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ else if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
else
++ectx.ec_stack.ga_len;
pt = ALLOC_CLEAR_ONE(partial_T);
if (pt == NULL)
goto failed;
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
{
vim_free(pt);
goto failed;
STACK_TV_VAR(iptr->isn_arg.forloop.for_idx);
// push the next item from the list
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
if (++idxtv->vval.v_number >= list->lv_len)
// past the end of the list, jump to "endfor"
{
trycmd_T *trycmd = NULL;
- if (ga_grow(&ectx.ec_trystack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_trystack, 1) == FAIL)
goto failed;
trycmd = ((trycmd_T *)ectx.ec_trystack.ga_data)
+ ectx.ec_trystack.ga_len;
iemsg("Evaluating catch while current_exception is NULL");
goto failed;
}
- if (ga_grow(&ectx.ec_stack, 1) == FAIL)
+ if (GA_GROW(&ectx.ec_stack, 1) == FAIL)
goto failed;
tv = STACK_TV_BOT(0);
++ectx.ec_stack.ga_len;