forked from aniani/vim
patch 8.2.3199: Vim9: execution speed can be improved
Problem: Vim9: execution speed can be improved. Solution: Make the break counter static.
This commit is contained in:
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3199,
|
||||||
/**/
|
/**/
|
||||||
3198,
|
3198,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1526,8 +1526,6 @@ handle_debug(isn_T *iptr, ectx_T *ectx)
|
|||||||
static int
|
static int
|
||||||
exec_instructions(ectx_T *ectx)
|
exec_instructions(ectx_T *ectx)
|
||||||
{
|
{
|
||||||
int breakcheck_count = 0;
|
|
||||||
typval_T *tv;
|
|
||||||
int ret = FAIL;
|
int ret = FAIL;
|
||||||
int save_trylevel_at_start = ectx->ec_trylevel_at_start;
|
int save_trylevel_at_start = ectx->ec_trylevel_at_start;
|
||||||
|
|
||||||
@@ -1539,7 +1537,9 @@ exec_instructions(ectx_T *ectx)
|
|||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
static int breakcheck_count = 0; // using "static" makes it faster
|
||||||
isn_T *iptr;
|
isn_T *iptr;
|
||||||
|
typval_T *tv;
|
||||||
|
|
||||||
if (++breakcheck_count >= 100)
|
if (++breakcheck_count >= 100)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user