Re: initializing a named register at startup
On Wed, Jan 20, 2021 at 4:20 PM Ernie Rael wrote: > > Hi all, > > jVi had a feature request, something about supporting > > let @a= "some string" > > which is supposed to initialized the named buffer at startup. Something > the user wanted to use with macros. I pointed out that jVi persists > named buffers between session and that satisfied his requirement. But, I > can see how a feature like this would be handy. > > I can't find a description of the "@a=" behavior in vimhelp. A pointer > is appreciated. > > -ernie Possibility 1: If the < or " item is not present in the 'viminfo' option then all registers are saved on shutdown and restored at startup. If it is present with value zero, then no registers are saved. If it is present with a value >0 then at most that number of lines is saved for each register. See :help 'vi' Possibility 2: Most registers can be treated as string variables named @a, @b etc. They can be read by including them in an expression. Most of them can also be set by means of a :let statement. To do it at startup, put it in your vimrc. See: :help :let-@ :help registers :help expr-register You can also put a register into your editfile, or delete or yank into a register. I use the following mappings but of course they can also be typed: :map :$put + :map :0put + The above puts the clipboard linewise, after the last line for F4 or before the first line for Shift-F4 See also: :help y :help d :help p :help P :help :yank :help :delete :help :put Best regards, Tony. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAJkCKXuU0P2nRhc-7P0psx-Z7qJ6gte55Bqm3mEAPP%2BfVTi35A%40mail.gmail.com.
Patch 8.2.2406
Patch 8.2.2406 Problem:Vim9: profiled :def function leaks memory. Solution: Delete the profiled instructions. Files: src/vim9compile.c *** ../vim-8.2.2405/src/vim9compile.c 2021-01-24 20:51:56.784245253 +0100 --- src/vim9compile.c 2021-01-24 21:29:34.407122643 +0100 *** *** 8837,8842 --- 8837,8851 VIM_CLEAR(dfunc->df_instr); dfunc->df_instr = NULL; } + #ifdef FEAT_PROFILE + if (dfunc->df_instr_prof != NULL) + { + for (idx = 0; idx < dfunc->df_instr_prof_count; ++idx) + delete_instr(dfunc->df_instr_prof + idx); + VIM_CLEAR(dfunc->df_instr_prof); + dfunc->df_instr_prof = NULL; + } + #endif if (mark_deleted) dfunc->df_deleted = TRUE; *** ../vim-8.2.2405/src/version.c 2021-01-24 21:14:17.312631037 +0100 --- src/version.c 2021-01-24 21:30:15.282937484 +0100 *** *** 752,753 --- 752,755 { /* Add new patch number below this line */ + /**/ + 2406, /**/ -- hundred-and-one symptoms of being an internet addict: 231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner in the front doorway permanently so it always looks like you are actually attempting to do something about that mess that has amassed since you discovered the Internet. /// Bram Moolenaar -- b...@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/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202101242031.10OKVEoA2914976%40masaka.moolenaar.net.
Patch 8.2.2405
Patch 8.2.2405 Problem:Vim9: no need to allow white space before "(" for :def. Solution: Give an error for stray white space. (issue #7734) Files: src/userfunc.c, src/testdir/test_vim9_func.vim *** ../vim-8.2.2404/src/userfunc.c 2021-01-24 12:53:30.780247041 +0100 --- src/userfunc.c 2021-01-24 21:12:33.076903484 +0100 *** *** 3199,3204 --- 3199,3210 p = vim_strchr(p, '('); } + if ((vim9script || eap->cmdidx == CMD_def) && VIM_ISWHITE(p[-1])) + { + semsg(_(e_no_white_space_allowed_before_str), "("); + goto ret_free; + } + // In Vim9 script only global functions can be redefined. if (vim9script && eap->forceit && !is_global) { *** ../vim-8.2.2404/src/testdir/test_vim9_func.vim 2021-01-21 20:21:24.244670457 +0100 --- src/testdir/test_vim9_func.vim 2021-01-24 21:11:57.220997330 +0100 *** *** 116,121 --- 116,153 CheckScriptFailure(lines, 'E126:', 2) enddef + def Test_white_space_before_paren() + var lines =<< trim END + vim9script + def Test () + echo 'test' + enddef + END + CheckScriptFailure(lines, 'E1068:', 2) + + lines =<< trim END + vim9script + func Test () + echo 'test' + endfunc + END + CheckScriptFailure(lines, 'E1068:', 2) + + lines =<< trim END + def Test () + echo 'test' + enddef + END + CheckScriptFailure(lines, 'E1068:', 1) + + lines =<< trim END + func Test () + echo 'test' + endfunc + END + CheckScriptSuccess(lines) + enddef + def Test_enddef_dict_key() var d = { enddef: 'x', *** ../vim-8.2.2404/src/version.c 2021-01-24 20:51:56.788245240 +0100 --- src/version.c 2021-01-24 21:10:39.933199895 +0100 *** *** 752,753 --- 752,755 { /* Add new patch number below this line */ + /**/ + 2405, /**/ -- Get a life? What is the URL where it can be downloaded? /// Bram Moolenaar -- b...@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/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202101242014.10OKErds2905470%40masaka.moolenaar.net.
Patch 8.2.2404
Patch 8.2.2404 Problem:Vim9: profiling try/catch not correct. Solution: Add profile instructions. Fix that "entry" did not rethrow an excpetion. Files: src/vim9compile.c, src/vim9execute.c, src/testdir/test_profile.vim *** ../vim-8.2.2403/src/vim9compile.c 2021-01-24 17:53:43.681840018 +0100 --- src/vim9compile.c 2021-01-24 20:10:03.758497746 +0100 *** *** 6566,6572 } static void ! compile_fill_jump_to_end(endlabel_T **el, cctx_T *cctx) { garray_T *instr = >ctx_instr; --- 6566,6572 } static void ! compile_fill_jump_to_end(endlabel_T **el, int jump_where, cctx_T *cctx) { garray_T *instr = >ctx_instr; *** *** 6576,6582 isn_T *isn; isn = ((isn_T *)instr->ga_data) + cur->el_end_label; ! isn->isn_arg.jump.jump_where = instr->ga_len; *el = cur->el_next; vim_free(cur); } --- 6576,6582 isn_T *isn; isn = ((isn_T *)instr->ga_data) + cur->el_end_label; ! isn->isn_arg.jump.jump_where = jump_where; *el = cur->el_next; vim_free(cur); } *** *** 6939,6945 isn->isn_arg.jump.jump_where = instr->ga_len; } // Fill in the "end" label in jumps at the end of the blocks. ! compile_fill_jump_to_end(>is_end_label, cctx); #ifdef FEAT_PROFILE // even when skipping we count the endif as executed, unless the block it's --- 6939,6945 isn->isn_arg.jump.jump_where = instr->ga_len; } // Fill in the "end" label in jumps at the end of the blocks. ! compile_fill_jump_to_end(>is_end_label, instr->ga_len, cctx); #ifdef FEAT_PROFILE // even when skipping we count the endif as executed, unless the block it's *** *** 7182,7188 isn->isn_arg.forloop.for_end = instr->ga_len; // Fill in the "end" label any BREAK statements ! compile_fill_jump_to_end(>fs_end_label, cctx); // Below the ":for" scope drop the "expr" list from the stack. if (generate_instr_drop(cctx, ISN_DROP, 1) == NULL) --- 7182,7188 isn->isn_arg.forloop.for_end = instr->ga_len; // Fill in the "end" label any BREAK statements ! compile_fill_jump_to_end(>fs_end_label, instr->ga_len, cctx); // Below the ":for" scope drop the "expr" list from the stack. if (generate_instr_drop(cctx, ISN_DROP, 1) == NULL) *** *** 7245,7250 --- 7245,7251 compile_endwhile(char_u *arg, cctx_T *cctx) { scope_T *scope = cctx->ctx_scope; + garray_T *instr = >ctx_instr; if (scope == NULL || scope->se_type != WHILE_SCOPE) { *** *** 7264,7270 // Fill in the "end" label in the WHILE statement so it can jump here. // And in any jumps for ":break" ! compile_fill_jump_to_end(>se_u.se_while.ws_end_label, cctx); vim_free(scope); --- 7265,7272 // Fill in the "end" label in the WHILE statement so it can jump here. // And in any jumps for ":break" ! compile_fill_jump_to_end(>se_u.se_while.ws_end_label, ! instr->ga_len, cctx); vim_free(scope); *** *** 7446,7451 --- 7448,7459 if (cctx->ctx_skip != SKIP_YES) { + #ifdef FEAT_PROFILE + // the profile-start should be after the jump + if (cctx->ctx_profiling && ((isn_T *)instr->ga_data)[instr->ga_len - 1] + .isn_type == ISN_PROF_START) + --instr->ga_len; + #endif // Jump from end of previous block to :finally or :endtry if (compile_jump_to_end(>se_u.se_try.ts_end_label, JUMP_ALWAYS, cctx) == FAIL) *** *** 7461,7466 --- 7469,7483 isn = ((isn_T *)instr->ga_data) + scope->se_u.se_try.ts_catch_label; isn->isn_arg.jump.jump_where = instr->ga_len; } + #ifdef FEAT_PROFILE + if (cctx->ctx_profiling) + { + // a "throw" that jumps here needs to be counted + generate_instr(cctx, ISN_PROF_END); + // the "catch" is also counted + generate_instr(cctx, ISN_PROF_START); + } + #endif } p = skipwhite(arg); *** *** 7521,7526 --- 7538,7544 scope_T *scope = cctx->ctx_scope; garray_T *instr = >ctx_instr; isn_T *isn; + int this_instr; // end block scope from :try or :catch if (scope != NULL && scope->se_type == BLOCK_SCOPE) *** *** 7542,7556 return NULL; } // Fill in the "end" label in jumps at the end of the blocks. ! compile_fill_jump_to_end(>se_u.se_try.ts_end_label, cctx); ! isn->isn_arg.try.try_finally = instr->ga_len; if (scope->se_u.se_try.ts_catch_label != 0) {
Re: JUMPLIST_ROTATE in mark.c is not defined/used
Yegappan wrote: > The setpcmark() function in mark.c has some code that > is included only when JUMPLIST_ROTATE is defined. > > https://github.com/vim/vim/blob/master/src/mark.c#L154 > > But I don't see JUMPLIST_ROTATE defined anywhere. > > It looks like this was introduced in vim-6.0m. > > https://github.com/vim/vim-history/commit/bb31027fc8c17132b9489eed6bfaba79bb505c97#diff-43b560878df1857aa8d1f6a00c2524e50be5d28ef5188d4655e6924d1d56c9c3L93 > > This looks like dead code and can be removed. Yeah, the code was kept around in case we would get requests for this behavior, but I think it's time to let it go. -- hundred-and-one symptoms of being an internet addict: 229. You spend so much time thinking what to add on this list. /// Bram Moolenaar -- b...@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/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202101241952.10OJqRov2899406%40masaka.moolenaar.net.
JUMPLIST_ROTATE in mark.c is not defined/used
Hi, The setpcmark() function in mark.c has some code that is included only when JUMPLIST_ROTATE is defined. https://github.com/vim/vim/blob/master/src/mark.c#L154 But I don't see JUMPLIST_ROTATE defined anywhere. It looks like this was introduced in vim-6.0m. https://github.com/vim/vim-history/commit/bb31027fc8c17132b9489eed6bfaba79bb505c97#diff-43b560878df1857aa8d1f6a00c2524e50be5d28ef5188d4655e6924d1d56c9c3L93 This looks like dead code and can be removed. - Yegappan -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7m_ovMk_OJO7vf_aLpnvomLype7bnPitKOtgMHr3Znbkg%40mail.gmail.com.
Patch 8.2.2403
Patch 8.2.2403 Problem:Vim9: profiling if/elseif/endif not correct. Solution: Add profile instructions. Fix that "elseif" was wrong. Files: src/vim9compile.c, src/testdir/test_profile.vim, src/testdir/test_vim9_script.vim, src/testdir/test_vim9_disassemble.vim *** ../vim-8.2.2402/src/vim9compile.c 2021-01-24 13:34:15.007739955 +0100 --- src/vim9compile.c 2021-01-24 17:37:40.652609577 +0100 *** *** 44,49 --- 44,50 */ typedef struct { int is_seen_else; + int is_seen_skip_not; // a block was unconditionally executed int is_had_return; // every block ends in :return int is_if_label;// instruction idx at IF or ELSEIF endlabel_T*is_end_label; // instructions to set end label *** *** 2098,2110 may_generate_prof_end(cctx_T *cctx, int prof_lnum) { if (cctx->ctx_profiling && prof_lnum >= 0) - { - int save_lnum = cctx->ctx_lnum; - - cctx->ctx_lnum = prof_lnum; generate_instr(cctx, ISN_PROF_END); - cctx->ctx_lnum = save_lnum; - } } #endif --- 2099,2105 *** *** 6735,6740 --- 6730,6747 else scope->se_u.se_if.is_if_label = -1; + #ifdef FEAT_PROFILE + if (cctx->ctx_profiling && cctx->ctx_skip == SKIP_YES + && skip_save != SKIP_YES) + { + // generated a profile start, need to generate a profile end, since it + // won't be done after returning + cctx->ctx_skip = SKIP_NOT; + generate_instr(cctx, ISN_PROF_END); + cctx->ctx_skip = SKIP_YES; + } + #endif + return p; } *** *** 6758,6763 --- 6765,6789 if (!cctx->ctx_had_return) scope->se_u.se_if.is_had_return = FALSE; + if (cctx->ctx_skip == SKIP_NOT) + { + // previous block was executed, this one and following will not + cctx->ctx_skip = SKIP_YES; + scope->se_u.se_if.is_seen_skip_not = TRUE; + } + if (scope->se_u.se_if.is_seen_skip_not) + { + // A previous block was executed, skip over expression and bail out. + // Do not count the "elseif" for profiling. + #ifdef FEAT_PROFILE + if (cctx->ctx_profiling && ((isn_T *)instr->ga_data)[instr->ga_len - 1] + .isn_type == ISN_PROF_START) + --instr->ga_len; + #endif + skip_expr_cctx(, cctx); + return p; + } + if (cctx->ctx_skip == SKIP_UNKNOWN) { if (compile_jump_to_end(>se_u.se_if.is_end_label, *** *** 6771,6777 --- 6797,6813 // compile "expr"; if we know it evaluates to FALSE skip the block CLEAR_FIELD(ppconst); if (cctx->ctx_skip == SKIP_YES) + { cctx->ctx_skip = SKIP_UNKNOWN; + #ifdef FEAT_PROFILE + if (cctx->ctx_profiling) + { + // the previous block was skipped, need to profile this line + generate_instr(cctx, ISN_PROF_START); + instr_count = instr->ga_len; + } + #endif + } if (compile_expr1(, cctx, ) == FAIL) { clear_ppconst(); *** *** 6829,6835 scope->se_u.se_if.is_had_return = FALSE; scope->se_u.se_if.is_seen_else = TRUE; ! if (scope->se_skip_save != SKIP_YES) { // jump from previous block to the end, unless the else block is empty if (cctx->ctx_skip == SKIP_UNKNOWN) --- 6865,6891 scope->se_u.se_if.is_had_return = FALSE; scope->se_u.se_if.is_seen_else = TRUE; ! #ifdef FEAT_PROFILE ! if (cctx->ctx_profiling) ! { ! if (cctx->ctx_skip == SKIP_NOT ! && ((isn_T *)instr->ga_data)[instr->ga_len - 1] ! .isn_type == ISN_PROF_START) ! // the previous block was executed, do not count "else" for profiling ! --instr->ga_len; ! if (cctx->ctx_skip == SKIP_YES && !scope->se_u.se_if.is_seen_skip_not) ! { ! // the previous block was not executed, this one will, do count the ! // "else" for profiling ! cctx->ctx_skip = SKIP_NOT; ! generate_instr(cctx, ISN_PROF_END); ! generate_instr(cctx, ISN_PROF_START); ! cctx->ctx_skip = SKIP_YES; ! } ! } ! #endif ! ! if (!scope->se_u.se_if.is_seen_skip_not && scope->se_skip_save != SKIP_YES) { // jump from previous block to the end, unless the else block is empty if (cctx->ctx_skip == SKIP_UNKNOWN) *** *** 6884,6889 --- 6940,6956 } // Fill in the "end" label in jumps at the end of the blocks. compile_fill_jump_to_end(>is_end_label, cctx); + + #ifdef FEAT_PROFILE + // even when skipping we count the endif as executed, unless the block it's + // in is skipped + if
Patch 8.2.2402
Patch 8.2.2402 Problem:Some filetypes not detected. Solution: Detect Ruby Signature and Puppet related files. (Doug Kearns) Files: runtime/filetype.vim, src/testdir/test_filetype.vim *** ../vim-8.2.2401/runtime/filetype.vim2021-01-22 20:54:30.934838333 +0100 --- runtime/filetype.vim2021-01-24 15:23:15.793757791 +0100 *** *** 1176,1184 " Password file au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd ! " Pascal (also *.p) au BufNewFile,BufRead *.pas setf pascal au BufNewFile,BufRead *.ppcall dist#ft#FTpp() " Delphi or Lazarus program file --- 1176,1185 " Password file au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd ! " Pascal (also *.p, *.pp, *.inc) au BufNewFile,BufRead *.pas setf pascal + " Pascal or Puppet manifest au BufNewFile,BufRead *.ppcall dist#ft#FTpp() " Delphi or Lazarus program file *** *** 1269,1275 " Povray configuration au BufNewFile,BufRead .povrayrc setf povini ! " Povray, PHP or assembly au BufNewFile,BufRead *.inc call dist#ft#FTinc() " Printcap and Termcap --- 1270,1276 " Povray configuration au BufNewFile,BufRead .povrayrc setf povini ! " Povray, Pascal, PHP or assembly au BufNewFile,BufRead *.inc call dist#ft#FTinc() " Printcap and Termcap *** *** 1278,1290 au BufNewFile,BufRead *termcap \ let b:ptcap_type = "term" | setf ptcap ! " PCCTS / ANTRL ! "au BufNewFile,BufRead *.gsetf antrl au BufNewFile,BufRead *.g setf pccts " PPWizard au BufNewFile,BufRead *.it,*.ih setf ppwiz " Obj 3D file format " TODO: is there a way to avoid MS-Windows Object files? au BufNewFile,BufRead *.obj setf obj --- 1279,1297 au BufNewFile,BufRead *termcap \ let b:ptcap_type = "term" | setf ptcap ! " PCCTS / ANTLR ! "au BufNewFile,BufRead *.gsetf antlr au BufNewFile,BufRead *.g setf pccts " PPWizard au BufNewFile,BufRead *.it,*.ih setf ppwiz + " Puppet + au BufNewFile,BufRead Puppetfile setf ruby + + " Embedded Puppet + au BufNewFile,BufRead *.epp setf epuppet + " Obj 3D file format " TODO: is there a way to avoid MS-Windows Object files? au BufNewFile,BufRead *.obj setf obj *** *** 1427,1434 " RubyGems au BufNewFile,BufRead *.gemspec setf ruby ! " Rust ! au BufNewFile,BufRead *.rssetf rust " Rackup au BufNewFile,BufRead *.rusetf ruby --- 1434,1441 " RubyGems au BufNewFile,BufRead *.gemspec setf ruby ! " RBS (Ruby Signature) ! au BufNewFile,BufRead *.rbs setf rbs " Rackup au BufNewFile,BufRead *.rusetf ruby *** *** 1442,1447 --- 1449,1457 " Rantfile and Rakefile is like Ruby au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby + " Rust + au BufNewFile,BufRead *.rssetf rust + " S-lang (or shader language, or SmallLisp) au BufNewFile,BufRead *.slsetf slang *** ../vim-8.2.2401/src/testdir/test_filetype.vim 2021-01-22 20:54:30.934838333 +0100 --- src/testdir/test_filetype.vim 2021-01-24 15:23:15.797757778 +0100 *** *** 162,167 --- 162,168 \ 'elinks': ['elinks.conf'], \ 'elm': ['file.elm'], \ 'elmfilt': ['filter-rules'], + \ 'epuppet': ['file.epp'], \ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'], \ 'eruby': ['file.erb', 'file.rhtml'], \ 'esmtprc': ['anyesmtprc', 'esmtprc', 'some-esmtprc'], *** *** 391,396 --- 392,398 \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg', 'baseq2/file.cfg', 'id1/file.cfg', 'quake1/file.cfg', 'some-baseq2/file.cfg', 'some-id1/file.cfg', 'some-quake1/file.cfg'], \ 'radiance': ['file.rad', 'file.mat'], \ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'], + \ 'rbs': ['file.rbs'], \ 'rc': ['file.rc', 'file.rch'], \ 'rcs': ['file,v'], \ 'readline': ['.inputrc', 'inputrc'], *** *** 407,413 \ 'rpl': ['file.rpl'], \ 'rst': ['file.rst'], \ 'rtf': ['file.rtf'], ! \ 'ruby': ['.irbrc', 'irbrc', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake',
Re: Test failure building 8.2.2395
Hi Dominique, * Dominique Pellé [2021-01-24 14:11 +0100]: > Elimar Riesebieter wrote: > > > Hi all, > > > > building 8.2.2395 I get: > > > > From test_fold.vim: > > Found errors in Test_fold_relative_move(): > > command line..script > > /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function > > RunTheTest[39]..Test_fold_relative_move line 25: Expected 3 but got 2 > > command line..script > > /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function > > RunTheTest[39]..Test_fold_relative_move line 30: Expected 2 but got 1 > > > > Building within tmux. Using clang-11 as compiler. Platform -> Linux amd64 > > > > Elimar > > Hi Elimar > > The failing test is fixed in vim-8.2.2399. 8.2.2401 is running fine now. Thanks for cooperation. Much appreciated ;-) Elimar -- You cannot propel yourself forward by patting yourself on the back. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20210124132752.cex7t5nuvhsez24j%40toy.home.lxtec.de.
Re: Test failure building 8.2.2395
Elimar Riesebieter wrote: > Hi all, > > building 8.2.2395 I get: > > From test_fold.vim: > Found errors in Test_fold_relative_move(): > command line..script > /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function > RunTheTest[39]..Test_fold_relative_move line 25: Expected 3 but got 2 > command line..script > /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function > RunTheTest[39]..Test_fold_relative_move line 30: Expected 2 but got 1 > > Building within tmux. Using clang-11 as compiler. Platform -> Linux amd64 > > Elimar Hi Elimar The failing test is fixed in vim-8.2.2399. Regards Dominique -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAON-T_j5B52emfXQNYTFTNW575vNnhUzdGuN_iCFFSjy_V6-nQ%40mail.gmail.com.
Patch 8.2.2401
Patch 8.2.2401 Problem:Build fails without +profiling feature. Solution: Add #ifdefs. Files: src/vim9compile.c, src/vim9execute.c, src/vim9.h, src/structs.h, src/testdir/test_vim9_disassemble.vim *** ../vim-8.2.2400/src/vim9compile.c 2021-01-24 12:53:30.780247041 +0100 --- src/vim9compile.c 2021-01-24 13:29:30.704432476 +0100 *** *** 1699,1720 * "profile" indicates profiling is to be done. */ int ! func_needs_compiling(ufunc_T *ufunc, int profile) { switch (ufunc->uf_def_status) { ! case UF_NOT_COMPILED: return FALSE; case UF_TO_BE_COMPILED: return TRUE; case UF_COMPILED: { dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data) + ufunc->uf_dfunc_idx; return profile ? dfunc->df_instr_prof == NULL : dfunc->df_instr == NULL; } ! case UF_COMPILING: return FALSE; } } /* --- 1699,1725 * "profile" indicates profiling is to be done. */ int ! func_needs_compiling(ufunc_T *ufunc, int profile UNUSED) { switch (ufunc->uf_def_status) { ! case UF_NOT_COMPILED: break; case UF_TO_BE_COMPILED: return TRUE; case UF_COMPILED: { + #ifdef FEAT_PROFILE dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data) + ufunc->uf_dfunc_idx; return profile ? dfunc->df_instr_prof == NULL : dfunc->df_instr == NULL; + #else + break; + #endif } ! case UF_COMPILING: break; } + return FALSE; } /* *** *** 2088,2093 --- 2093,2099 return OK; } + #ifdef FEAT_PROFILE static void may_generate_prof_end(cctx_T *cctx, int prof_lnum) { *** *** 2100,2105 --- 2106,2112 cctx->ctx_lnum = save_lnum; } } + #endif /* * Reserve space for a local variable. *** *** 7143,7151 --- 7150,7160 // "endwhile" jumps back here, one before when profiling scope->se_u.se_while.ws_top_label = instr->ga_len; + #ifdef FEAT_PROFILE if (cctx->ctx_profiling && ((isn_T *)instr->ga_data)[instr->ga_len - 1] .isn_type == ISN_PROF_START) --scope->se_u.se_while.ws_top_label; + #endif // compile "expr" if (compile_expr0(, cctx) == FAIL) *** *** 7178,7185 --- 7187,7196 cctx->ctx_scope = scope->se_outer; unwind_locals(cctx, scope->se_local_count); + #ifdef FEAT_PROFILE // count the endwhile before jumping may_generate_prof_end(cctx, cctx->ctx_lnum); + #endif // At end of ":for" scope jump back to the FOR instruction. generate_JUMP(cctx, JUMP_ALWAYS, scope->se_u.se_while.ws_top_label); *** *** 7851,7857 compile_def_function( ufunc_T *ufunc, int check_return_type, ! int profiling, cctx_T *outer_cctx) { char_u*line = NULL; --- 7862,7868 compile_def_function( ufunc_T *ufunc, int check_return_type, ! int profiling UNUSED, cctx_T *outer_cctx) { char_u*line = NULL; *** *** 7865,7871 --- 7876,7884 int save_estack_compiling = estack_compiling; int do_estack_push; int new_def_function = FALSE; + #ifdef FEAT_PROFILE int prof_lnum = -1; + #endif // When using a function that was compiled before: Free old instructions. // The index is reused. Otherwise add a new entry in "def_functions". *** *** 7886,7892 --- 7899,7907 CLEAR_FIELD(cctx); + #ifdef FEAT_PROFILE cctx.ctx_profiling = profiling; + #endif cctx.ctx_ufunc = ufunc; cctx.ctx_lnum = -1; cctx.ctx_outer = outer_cctx; *** *** 7989,7995 --- 8004,8012 if (cctx.ctx_lnum >= ufunc->uf_lines.ga_len) { // beyond the last line + #ifdef FEAT_PROFILE may_generate_prof_end(, prof_lnum); + #endif break; } } *** *** 8005,8010 --- 8022,8028 continue; } + #ifdef FEAT_PROFILE if (cctx.ctx_profiling && cctx.ctx_lnum != prof_lnum) { may_generate_prof_end(, prof_lnum); *** *** 8012,8017 --- 8030,8036 prof_lnum = cctx.ctx_lnum; generate_instr(, ISN_PROF_START); } + #endif // Some things can be recognized by the first character. switch (*ea.cmd) *** *** 8376,8387 --- 8395,8408 + ufunc->uf_dfunc_idx;
Patch 8.2.2400
Patch 8.2.2400 Problem:Vim9: compiled functions are not profiled. Solution: Add initial changes to profile compiled functions. Fix that a script-local function was hard to debug. Files: runtime/doc/repeat.txt, src/vim9.h, src/vim9compile.c, src/vim9execute.c, src/userfunc.c, src/proto/vim9compile.pro, src/structs.h, src/vim9type.c, src/debugger.c, src/ex_cmds.h, src/ex_docmd.c, src/profiler.c, src/proto/profiler.pro, src/testdir/test_vim9_disassemble.vim, src/testdir/test_profile.vim *** ../vim-8.2.2399/runtime/doc/repeat.txt 2020-06-17 21:47:19.912798036 +0200 --- runtime/doc/repeat.txt 2021-01-23 19:49:22.428623691 +0100 *** *** 346,351 --- 354,367 Vim version, or update Vim to a newer version. See |vimscript-version| for what changed between versions. + :vim9[script] [noclear] *:vim9* *:vim9script* + Marks a script file as containing |Vim9-script| + commands. Also see |vim9-namespace|. + Must be the first command in the file. + For [noclear] see |vim9-reload|. + Without the |+eval| feature this changes the syntax + for some commands. + *:scr* *:scriptnames* :scr[iptnames]List all sourced script names, in the order they were first sourced. The number is used for the script ID *** *** 883,890 matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory. The match for functions is done against the name as it's shown in the output ! of ":function". For local functions this means that something like "99_" ! is prepended. Note that functions are first loaded and later executed. When they are loaded the "file" breakpoints are checked, when they are executed the "func" --- 899,907 matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory. The match for functions is done against the name as it's shown in the output ! of ":function". However, for local functions the script-specific prefix such ! as "99_" is ignored to make it easier to match script-local functions ! without knowing the ID of the script. Note that functions are first loaded and later executed. When they are loaded the "file" breakpoints are checked, when they are executed the "func" *** *** 939,948 Profiling means that Vim measures the time that is spent on executing functions and/or scripts. The |+profile| feature is required for this. ! It is only included when Vim was compiled with "huge" features. You can also use the |reltime()| function to measure time. This only requires ! the |+reltime| feature, which is present more often. For profiling syntax highlighting see |:syntime|. --- 956,965 Profiling means that Vim measures the time that is spent on executing functions and/or scripts. The |+profile| feature is required for this. ! It is included when Vim was compiled with "huge" features. You can also use the |reltime()| function to measure time. This only requires ! the |+reltime| feature, which is present in more builds. For profiling syntax highlighting see |:syntime|. *** *** 989,995 You must always start with a ":profile start fname" command. The resulting ! file is written when Vim exits. Here is an example of the output, with line numbers prepended for the explanation: 1 FUNCTION Test2() ~ --- 1006,1017 You must always start with a ":profile start fname" command. The resulting ! file is written when Vim exits. For example, to profile one specific ! function: > ! profile start /tmp/vimprofile ! profile func MyFunc ! ! Here is an example of the output, with line numbers prepended for the explanation: 1 FUNCTION Test2() ~ *** ../vim-8.2.2399/src/vim9.h 2021-01-22 17:51:02.762771043 +0100 --- src/vim9.h 2021-01-23 17:52:56.108568978 +0100 *** *** 152,157 --- 152,160 ISN_CMDMOD, // set cmdmod ISN_CMDMOD_REV, // undo ISN_CMDMOD + ISN_PROF_START, // start a line for profiling + ISN_PROF_END, // end a line for profiling + ISN_UNPACK, // unpack list into items, uses isn_arg.unpack ISN_SHUFFLE,// move item on stack up or down ISN_DROP // pop stack and discard value *** *** 366,373 // was compiled. garray_T df_def_args_isn;// default argument instructions isn_T *df_instr; // function body to be executed ! int df_instr_count; int df_varcount;// number of
Patch 8.2.2399
Patch 8.2.2399 (after 8.2.2385) Problem:Fold test fails in wide terminal. Solution: Adjust the test. (Dominique Pelle, closes #7731, closes #7739) Files: src/testdir/test_fold.vim *** ../vim-8.2.2398/src/testdir/test_fold.vim 2021-01-21 17:03:04.475217089 +0100 --- src/testdir/test_fold.vim 2021-01-24 11:58:30.903742359 +0100 *** *** 864,870 set fdm=indent sw=2 wrap tw=80 let content = [ ' foo', ' bar', ' baz', ! \ repeat('x', 100), \ ' foo', ' bar', ' baz' \ ] call append(0, content) --- 864,870 set fdm=indent sw=2 wrap tw=80 let content = [ ' foo', ' bar', ' baz', ! \ repeat('x', + 1), \ ' foo', ' bar', ' baz' \ ] call append(0, content) *** ../vim-8.2.2398/src/version.c 2021-01-23 15:27:06.378245456 +0100 --- src/version.c 2021-01-23 17:33:49.119645710 +0100 *** *** 752,753 --- 752,755 { /* Add new patch number below this line */ + /**/ + 2399, /**/ -- hundred-and-one symptoms of being an internet addict: 220. Your wife asks for sex and you tell her where to find you on IRC. /// Bram Moolenaar -- b...@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/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202101241100.10OB0Yxu2750679%40masaka.moolenaar.net.