Patch 8.2.0538

8 views
Skip to first unread message

Bram Moolenaar

unread,
Apr 9, 2020, 3:08:50 PM4/9/20
to vim...@googlegroups.com

Patch 8.2.0538
Problem: Vim9: VAR_PARTIAL is not used during compilation.
Solution: Remove VAR_PARTIAL.
Files: src/vim9.h, src/vim9compile.c, src/vim9execute.c


*** ../vim-8.2.0537/src/vim9.h 2020-04-05 17:07:59.414556253 +0200
--- src/vim9.h 2020-04-09 21:04:21.623412130 +0200
***************
*** 46,52 ****
ISN_PUSHS, // push string isn_arg.string
ISN_PUSHBLOB, // push blob isn_arg.blob
ISN_PUSHFUNC, // push func isn_arg.string
- ISN_PUSHPARTIAL, // push partial ?
ISN_PUSHCHANNEL, // push channel isn_arg.channel
ISN_PUSHJOB, // push channel isn_arg.job
ISN_NEWLIST, // push list from stack items, size is isn_arg.number
--- 46,51 ----
***************
*** 92,98 ****
ISN_COMPARELIST,
ISN_COMPAREDICT,
ISN_COMPAREFUNC,
- ISN_COMPAREPARTIAL,
ISN_COMPAREANY,

// expression operations
--- 91,96 ----
*** ../vim-8.2.0537/src/vim9compile.c 2020-04-09 19:34:40.051480485 +0200
--- src/vim9compile.c 2020-04-09 21:03:59.215502320 +0200
***************
*** 396,402 ****
if (tv->v_type == VAR_NUMBER)
return &t_number;
if (tv->v_type == VAR_BOOL)
! return &t_bool;
if (tv->v_type == VAR_STRING)
return &t_string;
if (tv->v_type == VAR_LIST) // e.g. for v:oldfiles
--- 396,402 ----
if (tv->v_type == VAR_NUMBER)
return &t_number;
if (tv->v_type == VAR_BOOL)
! return &t_bool; // not used
if (tv->v_type == VAR_STRING)
return &t_string;
if (tv->v_type == VAR_LIST) // e.g. for v:oldfiles
***************
*** 642,648 ****
case VAR_LIST: isntype = ISN_COMPARELIST; break;
case VAR_DICT: isntype = ISN_COMPAREDICT; break;
case VAR_FUNC: isntype = ISN_COMPAREFUNC; break;
- case VAR_PARTIAL: isntype = ISN_COMPAREPARTIAL; break;
default: isntype = ISN_COMPAREANY; break;
}
}
--- 642,647 ----
***************
*** 880,902 ****
}

/*
- * Generate an ISN_PUSHPARTIAL instruction with partial "part".
- * Consumes "part".
- */
- static int
- generate_PUSHPARTIAL(cctx_T *cctx, partial_T *part)
- {
- isn_T *isn;
-
- RETURN_OK_IF_SKIP(cctx);
- if ((isn = generate_instr_type(cctx, ISN_PUSHPARTIAL, &t_func_any)) == NULL)
- return FAIL;
- isn->isn_arg.partial = part;
-
- return OK;
- }
-
- /*
* Generate an ISN_STORE instruction.
*/
static int
--- 879,884 ----
***************
*** 4165,4173 ****
case VAR_FUNC:
generate_PUSHFUNC(cctx, NULL, &t_func_void);
break;
- case VAR_PARTIAL:
- generate_PUSHPARTIAL(cctx, NULL);
- break;
case VAR_LIST:
generate_NEWLIST(cctx, 0);
break;
--- 4147,4152 ----
***************
*** 4183,4188 ****
--- 4162,4168 ----
case VAR_NUMBER:
case VAR_UNKNOWN:
case VAR_ANY:
+ case VAR_PARTIAL:
case VAR_VOID:
case VAR_SPECIAL: // cannot happen
generate_PUSHNR(cctx, 0);
***************
*** 6018,6027 ****
blob_unref(isn->isn_arg.blob);
break;

- case ISN_PUSHPARTIAL:
- partial_unref(isn->isn_arg.partial);
- break;
-
case ISN_PUSHJOB:
#ifdef FEAT_JOB_CHANNEL
job_unref(isn->isn_arg.job);
--- 5998,6003 ----
***************
*** 6054,6060 ****
case ISN_COMPAREFUNC:
case ISN_COMPARELIST:
case ISN_COMPARENR:
- case ISN_COMPAREPARTIAL:
case ISN_COMPARESPECIAL:
case ISN_COMPARESTRING:
case ISN_CONCAT:
--- 6030,6035 ----
*** ../vim-8.2.0537/src/vim9execute.c 2020-04-05 21:38:11.637962358 +0200
--- src/vim9execute.c 2020-04-09 21:04:17.323429435 +0200
***************
*** 858,864 ****
case ISN_PUSHS:
case ISN_PUSHBLOB:
case ISN_PUSHFUNC:
- case ISN_PUSHPARTIAL:
case ISN_PUSHCHANNEL:
case ISN_PUSHJOB:
if (ga_grow(&ectx.ec_stack, 1) == FAIL)
--- 858,863 ----
***************
*** 896,907 ****
tv->vval.v_string =
vim_strsave(iptr->isn_arg.string);
break;
- case ISN_PUSHPARTIAL:
- tv->v_type = VAR_PARTIAL;
- tv->vval.v_partial = iptr->isn_arg.partial;
- if (tv->vval.v_partial != NULL)
- ++tv->vval.v_partial->pt_refcount;
- break;
case ISN_PUSHCHANNEL:
#ifdef FEAT_JOB_CHANNEL
tv->v_type = VAR_CHANNEL;
--- 895,900 ----
***************
*** 1412,1418 ****
case ISN_COMPARESTRING:
case ISN_COMPAREDICT:
case ISN_COMPAREFUNC:
- case ISN_COMPAREPARTIAL:
case ISN_COMPAREANY:
{
typval_T *tv1 = STACK_TV_BOT(-2);
--- 1405,1410 ----
***************
*** 1932,1945 ****
name == NULL ? "[none]" : name);
}
break;
- case ISN_PUSHPARTIAL:
- {
- partial_T *part = iptr->isn_arg.partial;
-
- smsg("%4d PUSHPARTIAL \"%s\"", current,
- part == NULL ? "[none]" : (char *)partial_name(part));
- }
- break;
case ISN_PUSHCHANNEL:
#ifdef FEAT_JOB_CHANNEL
{
--- 1924,1929 ----
***************
*** 2117,2123 ****
case ISN_COMPARELIST:
case ISN_COMPAREDICT:
case ISN_COMPAREFUNC:
- case ISN_COMPAREPARTIAL:
case ISN_COMPAREANY:
{
char *p;
--- 2101,2106 ----
***************
*** 2154,2161 ****
case ISN_COMPARELIST: type = "COMPARELIST"; break;
case ISN_COMPAREDICT: type = "COMPAREDICT"; break;
case ISN_COMPAREFUNC: type = "COMPAREFUNC"; break;
- case ISN_COMPAREPARTIAL:
- type = "COMPAREPARTIAL"; break;
case ISN_COMPAREANY: type = "COMPAREANY"; break;
default: type = "???"; break;
}
--- 2137,2142 ----
*** ../vim-8.2.0537/src/version.c 2020-04-09 20:10:50.389873647 +0200
--- src/version.c 2020-04-09 21:07:27.774661221 +0200
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 538,
/**/

--
Another bucket of what can only be described as human ordure hits ARTHUR.
ARTHUR: ... Right! (to the KNIGHTS) That settles it!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages