To: vim_dev@googlegroups.com Subject: Patch 8.2.0355 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0355 Problem: Vim9: str_val is confusing, it's a number Solution: Rename to stnr_val. Files: src/vim9.h, src/vim9compile.c, src/vim9execute.c *** ../vim-8.2.0354/src/vim9.h 2020-03-01 15:36:39.173441814 +0100 --- src/vim9.h 2020-03-04 22:18:42.539256276 +0100 *************** *** 36,42 **** ISN_STOREREG, // pop into register isn_arg.number // ISN_STOREOTHER, // pop into other script variable isn_arg.other. ! ISN_STORENR, // store number into local variable isn_arg.storenr.str_idx // constants ISN_PUSHNR, // push number isn_arg.number --- 36,42 ---- ISN_STOREREG, // pop into register isn_arg.number // ISN_STOREOTHER, // pop into other script variable isn_arg.other. ! ISN_STORENR, // store number into local variable isn_arg.storenr.stnr_idx // constants ISN_PUSHNR, // push number isn_arg.number *************** *** 178,185 **** // arguments to ISN_STORENR typedef struct { ! int str_idx; ! varnumber_T str_val; } storenr_T; // arguments to ISN_STOREOPT --- 178,185 ---- // arguments to ISN_STORENR typedef struct { ! int stnr_idx; ! varnumber_T stnr_val; } storenr_T; // arguments to ISN_STOREOPT *** ../vim-8.2.0354/src/vim9compile.c 2020-03-03 21:53:19.221002673 +0100 --- src/vim9compile.c 2020-03-04 22:18:08.247376756 +0100 *************** *** 773,780 **** RETURN_OK_IF_SKIP(cctx); if ((isn = generate_instr(cctx, ISN_STORENR)) == NULL) return FAIL; ! isn->isn_arg.storenr.str_idx = idx; ! isn->isn_arg.storenr.str_val = value; return OK; } --- 773,780 ---- RETURN_OK_IF_SKIP(cctx); if ((isn = generate_instr(cctx, ISN_STORENR)) == NULL) return FAIL; ! isn->isn_arg.storenr.stnr_idx = idx; ! isn->isn_arg.storenr.stnr_val = value; return OK; } *************** *** 3789,3796 **** garray_T *stack = &cctx->ctx_type_stack; isn->isn_type = ISN_STORENR; ! isn->isn_arg.storenr.str_idx = idx; ! isn->isn_arg.storenr.str_val = val; if (stack->ga_len > 0) --stack->ga_len; } --- 3789,3796 ---- garray_T *stack = &cctx->ctx_type_stack; isn->isn_type = ISN_STORENR; ! isn->isn_arg.storenr.stnr_idx = idx; ! isn->isn_arg.storenr.stnr_val = val; if (stack->ga_len > 0) --stack->ga_len; } *** ../vim-8.2.0354/src/vim9execute.c 2020-03-01 17:55:09.005454943 +0100 --- src/vim9execute.c 2020-03-04 22:18:22.183327819 +0100 *************** *** 827,836 **** // store number in local variable case ISN_STORENR: ! tv = STACK_TV_VAR(iptr->isn_arg.storenr.str_idx); clear_tv(tv); tv->v_type = VAR_NUMBER; ! tv->vval.v_number = iptr->isn_arg.storenr.str_val; break; // push constant --- 827,836 ---- // store number in local variable case ISN_STORENR: ! tv = STACK_TV_VAR(iptr->isn_arg.storenr.stnr_idx); clear_tv(tv); tv->v_type = VAR_NUMBER; ! tv->vval.v_number = iptr->isn_arg.storenr.stnr_val; break; // push constant *************** *** 1848,1855 **** break; case ISN_STORENR: smsg("%4d STORE %lld in $%d", current, ! iptr->isn_arg.storenr.str_val, ! iptr->isn_arg.storenr.str_idx); break; // constants --- 1848,1855 ---- break; case ISN_STORENR: smsg("%4d STORE %lld in $%d", current, ! iptr->isn_arg.storenr.stnr_val, ! iptr->isn_arg.storenr.stnr_idx); break; // constants *** ../vim-8.2.0354/src/version.c 2020-03-04 22:06:03.645834481 +0100 --- src/version.c 2020-03-04 22:17:54.831423831 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 355, /**/ -- hundred-and-one symptoms of being an internet addict: 174. You know what a listserv is. /// Bram Moolenaar -- Bram@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 ///