From 97a5be46879ab2b24bb9b485966be031865e1191 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Mon, 9 Sep 2024 19:46:17 +0200 Subject: [PATCH 01/15] patch 9.1.0723: if_python: dynamic linking fails with python3 >= 3.13 Problem: if_python: dynamic linking fails with python3 >= 3.13 when using non-stable ABI (zdohnal) Solution: do not try to import the privat python symbol _PyObject_NextNotImplemented (Yee Cheng Chin) Vim is importing a private Python symbol `_PyObject_NextNotImplemented` because it used to be required as part of the `PyIter_Check()` macro in an abstraction breaking way. Python eventually fixed the issue and in 3.13 it removed the private symbol export, which broke Vim. Simply remove importing this private symbol in newer Python versions as it's no longer needed for PyIter_Check to work. fixes: #15457 closes: #15649 Signed-off-by: Yee Cheng Chin Signed-off-by: Christian Brabandt --- src/if_python3.c | 7 ++++--- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/if_python3.c b/src/if_python3.c index ac817bdce4..fd117f0a71 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -267,7 +267,8 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll # define _Py_NoneStruct (*py3__Py_NoneStruct) # define _Py_FalseStruct (*py3__Py_FalseStruct) # define _Py_TrueStruct (*py3__Py_TrueStruct) -# ifndef USE_LIMITED_API +# if !defined(USE_LIMITED_API) && PY_VERSION_HEX < 0x030D0000 +// Private symbol that used to be required as part of PyIter_Check. # define _PyObject_NextNotImplemented (*py3__PyObject_NextNotImplemented) # endif # define PyModule_AddObject py3_PyModule_AddObject @@ -482,7 +483,7 @@ static void (*py3_PyErr_Clear)(void); static PyObject* (*py3_PyErr_Format)(PyObject *, const char *, ...); static void (*py3_PyErr_PrintEx)(int); static PyObject*(*py3__PyObject_Init)(PyObject *, PyTypeObject *); -# ifndef USE_LIMITED_API +# if !defined(USE_LIMITED_API) && PY_VERSION_HEX < 0x030D0000 static iternextfunc py3__PyObject_NextNotImplemented; # endif static PyObject* py3__Py_NoneStruct; @@ -679,7 +680,7 @@ static struct {"PyEval_SaveThread", (PYTHON_PROC*)&py3_PyEval_SaveThread}, {"_PyArg_Parse_SizeT", (PYTHON_PROC*)&py3_PyArg_Parse}, {"Py_IsInitialized", (PYTHON_PROC*)&py3_Py_IsInitialized}, -# ifndef USE_LIMITED_API +# if !defined(USE_LIMITED_API) && PY_VERSION_HEX < 0x030D0000 {"_PyObject_NextNotImplemented", (PYTHON_PROC*)&py3__PyObject_NextNotImplemented}, # endif {"_Py_NoneStruct", (PYTHON_PROC*)&py3__Py_NoneStruct}, diff --git a/src/version.c b/src/version.c index 4460bb16ec..db611c9695 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 723, /**/ 722, /**/ From c2285a8cf397d1d694a350415fb37f7d51202ec4 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Mon, 9 Sep 2024 19:55:24 +0200 Subject: [PATCH 02/15] patch 9.1.0724: if_python: link error with python 3.13 and stable ABI Problem: if_python: link error with python 3.13 and stable ABI (zdohnal) Solution: Use the correct stable APIs Py_IncRef and Py_DecRef instead (Yee Cheng Chin) This fixes #15460 properly. There was an attempt to fix it in v9.1.0668, but it did it by manually copy and pasting definitions from Python 3.13 headers, which is problematic as it makes Vim dependent on low-level implementation details which are subject to change. That change also pulls in dependencies to private APIs (`_Py_IncRef`) which is a very bad idea as the next version of Python could very well remove that. The core issue was simply that `Py_INCREF` and similar functions are not part of the stable API. We are supposed to be using `Py_IncRef` instead which performs null-check (similar to `Py_XINCREF`) and is available as a linkable function. We simply need to call it instead of the macro. We simply remap `Py_INCREF` (and friends) to the function version in stable API similar to how we mapped other functions. related #15460 closes: #15648 Signed-off-by: Yee Cheng Chin Signed-off-by: Christian Brabandt --- src/if_python3.c | 52 +++++++++++++++++------------------------------- src/version.c | 2 ++ 2 files changed, 20 insertions(+), 34 deletions(-) diff --git a/src/if_python3.c b/src/if_python3.c index fd117f0a71..1045b84850 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -219,16 +219,9 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll # define PyObject_GetItem py3_PyObject_GetItem # define PyObject_IsTrue py3_PyObject_IsTrue # define PyModule_GetDict py3_PyModule_GetDict -# if defined(USE_LIMITED_API) \ - && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG)) -# undef Py_INCREF -# if Py_LIMITED_API+0 >= 0x030a00A7 -# define _Py_IncRef py3__Py_IncRef -# define Py_INCREF _Py_IncRef -# else -# define Py_IncRef py3_Py_IncRef -# define Py_INCREF Py_IncRef -# endif +# ifdef USE_LIMITED_API +# define Py_IncRef py3_Py_IncRef +# define Py_DecRef py3_Py_DecRef # endif # ifdef USE_LIMITED_API # define Py_CompileString py3_Py_CompileString @@ -403,14 +396,9 @@ static void (*py3_Py_Finalize)(void); static void (*py3_PyErr_SetString)(PyObject *, const char *); static void (*py3_PyErr_SetObject)(PyObject *, PyObject *); static int (*py3_PyErr_ExceptionMatches)(PyObject *); -# if defined(USE_LIMITED_API) \ - && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG)) -# if Py_LIMITED_API+0 >= 0x030a00A7 -# define _Py_IncRef py3__Py_IncRef -static void (*py3__Py_IncRef)(PyObject *); -# else +# ifdef USE_LIMITED_API static void (*py3_Py_IncRef)(PyObject *); -# endif +static void (*py3_Py_DecRef)(PyObject *); # endif # ifdef USE_LIMITED_API static PyObject* (*py3_Py_CompileString)(const char *, const char *, int); @@ -619,13 +607,9 @@ static struct {"PyErr_SetString", (PYTHON_PROC*)&py3_PyErr_SetString}, {"PyErr_SetObject", (PYTHON_PROC*)&py3_PyErr_SetObject}, {"PyErr_ExceptionMatches", (PYTHON_PROC*)&py3_PyErr_ExceptionMatches}, -# if defined(USE_LIMITED_API) \ - && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG)) -# if Py_LIMITED_API+0 >= 0x030a00A7 - {"_Py_IncRef", (PYTHON_PROC*)&py3__Py_IncRef}, -# else +# ifdef USE_LIMITED_API {"Py_IncRef", (PYTHON_PROC*)&py3_Py_IncRef}, -# endif + {"Py_DecRef", (PYTHON_PROC*)&py3_Py_DecRef}, # endif # ifdef USE_LIMITED_API {"Py_CompileString", (PYTHON_PROC*)&py3_Py_CompileString}, @@ -803,18 +787,18 @@ py3__Py_XDECREF(PyObject *op) # define Py_XDECREF(op) py3__Py_XDECREF(_PyObject_CAST(op)) # endif -# if defined(USE_LIMITED_API) \ - && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG)) - static inline void -py3__Py_XINCREF(PyObject *op) -{ - if (op != NULL) - { - Py_INCREF(op); - } -} +# ifdef USE_LIMITED_API +// Use stable versions of inc/dec ref. Note that these always null-check and +// therefore there's no difference between XINCREF and INCREF. +# undef Py_INCREF +# define Py_INCREF(obj) Py_IncRef((PyObject *)obj) # undef Py_XINCREF -# define Py_XINCREF(op) py3__Py_XINCREF(_PyObject_CAST(op)) +# define Py_XINCREF(obj) Py_IncRef((PyObject *)obj) + +# undef Py_DECREF +# define Py_DECREF(obj) Py_DecRef((PyObject *)obj) +# undef Py_XDECREF +# define Py_XDECREF(obj) Py_DecRef((PyObject *)obj) # endif # if PY_VERSION_HEX >= 0x030900b0 diff --git a/src/version.c b/src/version.c index db611c9695..c8c0caf59b 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 724, /**/ 723, /**/ From 7cc0e9145dbd6b25de849b3c218e51fb689e6dfc Mon Sep 17 00:00:00 2001 From: Konfekt Date: Mon, 9 Sep 2024 20:03:03 +0200 Subject: [PATCH 03/15] runtime(groff): Add compiler plugin for groff Groff MOM (Macros for Manuscripts) is a macro package for the GNU troff (groff) typesetting system, a light-weight alternative to LaTeX for professional-quality documents. closes: #15646 Signed-off-by: Konfekt Signed-off-by: Christian Brabandt --- .github/MAINTAINERS | 1 + runtime/compiler/groff.vim | 45 ++++++++++++++++++++++++++++++++++++++ runtime/doc/quickfix.txt | 14 +++++++++++- runtime/doc/tags | 2 ++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 runtime/compiler/groff.vim diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index ccfd2deaed..ed3143bb3d 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -65,6 +65,7 @@ runtime/compiler/gawk.vim @dkearns runtime/compiler/gjs.vim @dkearns runtime/compiler/gm2.vim @dkearns runtime/compiler/go.vim @dbarnett +runtime/compiler/groff.vim @Konfekt runtime/compiler/haml.vim @tpope runtime/compiler/hare.vim @selenebun runtime/compiler/icon.vim @dkearns diff --git a/runtime/compiler/groff.vim b/runtime/compiler/groff.vim new file mode 100644 index 0000000000..640146d6a1 --- /dev/null +++ b/runtime/compiler/groff.vim @@ -0,0 +1,45 @@ +" Vim compiler file +" Compiler: Groff +" Maintainer: Konfekt +" Last Change: 2024 Sep 8 +" +" Expects output file extension, say `:make html` or `:make pdf`. +" Supported devices as of Sept 2024 are: (x)html, pdf, ps, dvi, lj4, lbp ... +" Adjust command-line flags, language, encoding by buffer-local/global variables +" groff_compiler_args, groff_compiler_lang, and groff_compiler_encoding, +" which default to '', &spelllang and 'utf8'. + +if exists("current_compiler") + finish +endif + +let s:keepcpo = &cpo +set cpo&vim + +let current_compiler = 'groff' + +silent! function s:groff_compiler_lang() + let lang = get(b:, 'groff_compiler_lang', + \ &spell ? matchstr(&spelllang, '^\a\a') : '') + if lang ==# 'en' | let lang = '' | endif + return empty(lang) ? '' : '-m'..lang +endfunction + +" Requires output format (= device) to be set by user after :make. +execute 'CompilerSet makeprg=groff'..escape( + \ ' '..s:groff_compiler_lang().. + \ ' -K'..get(b:, 'groff_compiler_encoding', get(g:, 'groff_compiler_encoding', 'utf8')).. + \ ' '..get(b:, 'groff_compiler_args', get(g:, 'groff_compiler_args', '')).. + \ ' -mom -T$* -- %:S > %:r:S.$*', ' ') +" From Gavin Freeborn's https://github.com/Gavinok/vim-troff under Vim License +" https://github.com/Gavinok/vim-troff/blob/91017b1423caa80aba541c997909a4f810edd275/compiler/troff.vim#L39 +CompilerSet errorformat=%o:\ (%f):%l:%m, + \%o:\ \ (%f):%l:%m, + \%o:%f:%l:%m, + \%o:\ %f:%l:%m, + \%f:%l:\ macro\ %trror:%m, + \%f:%l:%m, + \%W%tarning:\ file\ '%f'\\,\ around\ line\ %l:,%Z%m + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index e44c5d5ee8..e7045c5353 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2024 Aug 20 +*quickfix.txt* For Vim version 9.1. Last change: 2024 Sep 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1335,6 +1335,18 @@ If Vim was started from the compiler, the :sh and some :! commands will not work, because Vim is then running in the same process as the compiler and stdin (standard input) will not be interactive. +GROFF *quickfix-groff* *compiler-groff* + +The GROFF compiler plugin uses the mom macro set (documented in the groff_mom +manpage) as input and expects that the output file type extension is passed to +make, say :make html or :make pdf. + +Additional arguments can be passed to groff by setting them in +`b:groff_compiler_args` or `g:groff_compiler_args`. The `language` argument +passed to groff is set using 'spelllang'; it can be overridden by setting +`b:groff_compiler_lang`. The default enconding is `UTF-8` and can be changed +by setting `b:groff_compiler_encoding` or `g:groff_compiler_encoding`. + PANDOC *quickfix-pandoc* *compiler-pandoc* The Pandoc compiler plugin expects that an output file type extension is diff --git a/runtime/doc/tags b/runtime/doc/tags index bd47526613..77c02a8649 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6545,6 +6545,7 @@ compiler-decada ft_ada.txt /*compiler-decada* compiler-dotnet quickfix.txt /*compiler-dotnet* compiler-gcc quickfix.txt /*compiler-gcc* compiler-gnat ft_ada.txt /*compiler-gnat* +compiler-groff quickfix.txt /*compiler-groff* compiler-hpada ft_ada.txt /*compiler-hpada* compiler-javac quickfix.txt /*compiler-javac* compiler-manx quickfix.txt /*compiler-manx* @@ -9640,6 +9641,7 @@ quickfix-directory-stack quickfix.txt /*quickfix-directory-stack* quickfix-error-lists quickfix.txt /*quickfix-error-lists* quickfix-functions usr_41.txt /*quickfix-functions* quickfix-gcc quickfix.txt /*quickfix-gcc* +quickfix-groff quickfix.txt /*quickfix-groff* quickfix-index quickfix.txt /*quickfix-index* quickfix-manx quickfix.txt /*quickfix-manx* quickfix-pandoc quickfix.txt /*quickfix-pandoc* From d30ffdca495d116da359aaea806ad0da7b4b6c75 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Mon, 9 Sep 2024 20:26:28 +0200 Subject: [PATCH 04/15] runtime(pandoc): Update compiler plugin to use actual 'spelllang' Previously these would be cached in buffer-local variables and would not change on :compiler pandoc closes: #15642 Signed-off-by: Konfekt Signed-off-by: Christian Brabandt --- .github/MAINTAINERS | 1 + runtime/compiler/pandoc.vim | 27 ++++++++++++++++----------- runtime/doc/quickfix.txt | 3 +-- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index ed3143bb3d..02efe9301b 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -76,6 +76,7 @@ runtime/compiler/jshint.vim @dkearns runtime/compiler/jsonlint.vim @dkearns runtime/compiler/jq.vim @vito-c runtime/compiler/lazbuild.vim @dkearns +runtime/compiler/pandoc.vim @Konfekt runtime/compiler/perl.vim @petdance @heptite runtime/compiler/perlcritic.vim @petdance @dkearns runtime/compiler/php.vim @dkearns diff --git a/runtime/compiler/pandoc.vim b/runtime/compiler/pandoc.vim index ecc935a836..6c15e104c3 100644 --- a/runtime/compiler/pandoc.vim +++ b/runtime/compiler/pandoc.vim @@ -1,10 +1,12 @@ " Vim compiler file " Compiler: Pandoc " Maintainer: Konfekt -" Last Change: 2024 Aug 20 +" Last Change: 2024 Sep 8 " " Expects output file extension, say `:make html` or `:make pdf`. " Passes additional arguments to pandoc, say `:make html --self-contained`. +" Adjust command-line flags by buffer-local/global variable +" b/g:pandoc_compiler_args which defaults to empty. if exists("current_compiler") finish @@ -40,18 +42,21 @@ silent! function s:PandocFiletype(filetype) abort endif endfunction -let b:pandoc_compiler_from = get(b:, 'pandoc_compiler_from', s:PandocFiletype(&filetype)) -let b:pandoc_compiler_lang = get(b:, 'pandoc_compiler_lang', &spell ? matchstr(&spelllang, '^\a\a') : '') +silent! function s:PandocLang() + let lang = get(b:, 'pandoc_compiler_lang', + \ &spell ? matchstr(&spelllang, '^\a\a') : '') + if lang ==# 'en' | let lang = '' | endif + return empty(lang) ? '' : '--metadata lang='..lang +endfunction execute 'CompilerSet makeprg=pandoc'..escape( - \ ' --standalone' . - \ (b:pandoc_compiler_from ==# 'markdown' && (getline(1) =~# '^%\s\+\S\+' || (search('^title:\s+\S+', 'cnw') > 0)) ? - \ '' : ' --metadata title=%:t:r:S') . - \ (empty(b:pandoc_compiler_lang) ? - \ '' : ' --metadata lang='..b:pandoc_compiler_lang) . - \ ' --from='..b:pandoc_compiler_from . - \ ' '..get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', '')) . - \ ' --output %:r:S.$* -- %:S', ' ') + \ ' --standalone'.. + \ (s:PandocFiletype(&filetype) ==# 'markdown' && (getline(1) =~# '^%\s\+\S\+' || (search('^title:\s+\S+', 'cnw') > 0)) ? + \ '' : ' --metadata title=%:t:r:S').. + \ ' '..s:PandocLang().. + \ ' --from='..s:PandocFiletype(&filetype).. + \ ' '..get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', '')).. + \ ' --output %:r:S.$* -- %:S', ' ') CompilerSet errorformat=\"%f\",\ line\ %l:\ %m let &cpo = s:keepcpo diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index e7045c5353..6942a584b5 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1359,8 +1359,7 @@ Additional arguments can be passed to pandoc: The `--from` argument is an educated guess using the buffer file type; it can be overridden by setting `b:pandoc_compiler_from`. -Likewise the `--metadata lang` argument is set using `&spelllang`; -it can be overridden by setting `b:pandoc_compiler_lang`. +The `--metadata lang` argument is set using 'spelllang'; If `--from=markdown` is assumed and no title set in a title header or YAML block, then the filename (without extension) is used as the title. From 03cac4b70d819148f4b4404701b8f331a3af0fb6 Mon Sep 17 00:00:00 2001 From: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:44:59 +0200 Subject: [PATCH 05/15] patch 9.1.0725: filetype: swiftinterface files are not recognized Problem: filetype: swiftinterface files are not recognized Solution: Detect '*.swiftinterface' files as swift filetype (LosFarmosCTL) closes: #15658 Signed-off-by: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/filetype.vim | 2 +- src/testdir/test_filetype.vim | 2 +- src/version.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 220b37173e..3af6d03eac 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2371,7 +2371,7 @@ au BufNewFile,BufRead *.sml setf sml au BufNewFile,BufRead *.cm setf voscm " Swift -au BufNewFile,BufRead *.swift setf swift +au BufNewFile,BufRead *.swift,*.swiftinterface setf swift au BufNewFile,BufRead *.swift.gyb setf swiftgyb " Swift Intermediate Language or SILE diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 1e6c39ed99..c10023d94c 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -712,7 +712,7 @@ def s:GetFilenameChecks(): dict> svg: ['file.svg'], svn: ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'], swayconfig: ['/home/user/.sway/config', '/home/user/.config/sway/config', '/etc/sway/config', '/etc/xdg/sway/config'], - swift: ['file.swift'], + swift: ['file.swift', 'file.swiftinterface'], swiftgyb: ['file.swift.gyb'], swig: ['file.swg', 'file.swig'], sysctl: ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf', 'any/etc/sysctl.conf', 'any/etc/sysctl.d/file.conf'], diff --git a/src/version.c b/src/version.c index c8c0caf59b..62b2ab55c4 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 725, /**/ 724, /**/ From 26e4b000025ea0e25ea7877314d9095737431bae Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Tue, 10 Sep 2024 20:50:08 +0200 Subject: [PATCH 06/15] runtime(doc): Revert outdated comment in completeopt's fuzzy documentation Originally, `:set completeopt+=fuzzy` did not affect how the candidate list is collected in default keyword completion. A comment was added to documentation as part of #14912 to clarify it. #15193 later changed the fuzzy behavior to now change the candidate collection behavior as well so the clarification in docs is now wrong. Remove them here. closes: #15656 Signed-off-by: Yee Cheng Chin Signed-off-by: Christian Brabandt --- runtime/doc/options.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 50c25f7b25..26779ad8e4 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2024 Sep 07 +*options.txt* For Vim version 9.1. Last change: 2024 Sep 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2148,10 +2148,7 @@ A jump table for the options with a short description can be found at |Q_op|. fuzzy Enable |fuzzy-matching| for completion candidates. This allows for more flexible and intuitive matching, where characters can be skipped and matches can be found even - if the exact sequence is not typed. Only makes a - difference how completion candidates are reduced from the - list of alternatives, but not how the candidates are - collected (using different completion types). + if the exact sequence is not typed. *'completepopup'* *'cpp'* 'completepopup' 'cpp' string (default empty) From c0982f9f794a4c5737d3d7a3129b3121ab20e458 Mon Sep 17 00:00:00 2001 From: John Tobin Date: Tue, 10 Sep 2024 20:52:15 +0200 Subject: [PATCH 07/15] runtime(dosini): Update syntax script, spellcheck comments only By default spell checking is enabled for all text, but adding `contains=@Spell` to syntax rules restricts spell checking to those syntax rules. See `:help spell-syntax` for full details. Variable names and headers are far more likely than comments to contain spelling errors, so only enable spell checking in comments. Introduced in https://github.com/xuhdev/syntax-dosini.vim/pull/8 cc @tobinjt closes: #15655 Signed-off-by: John Tobin Signed-off-by: Hong Xu Signed-off-by: Christian Brabandt --- runtime/syntax/dosini.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/syntax/dosini.vim b/runtime/syntax/dosini.vim index 66e17ec9af..e8212b6d2e 100644 --- a/runtime/syntax/dosini.vim +++ b/runtime/syntax/dosini.vim @@ -1,12 +1,12 @@ " Vim syntax file " Language: Configuration File (ini file) for MSDOS/MS Windows -" Version: 2.3 +" Version: 2.4 " Original Author: Sean M. McKee " Previous Maintainer: Nima Talebi " Current Maintainer: Hong Xu " Homepage: http://www.vim.org/scripts/script.php?script_id=3747 " Repository: https://github.com/xuhdev/syntax-dosini.vim -" Last Change: 2023 Aug 20 +" Last Change: 2024 Sept 08 " quit when a syntax file was already loaded @@ -27,7 +27,7 @@ syn match dosiniNumber "=\zs\s*\d\+\s*$" syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$" syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$" syn region dosiniHeader start="^\s*\[" end="\]" -syn match dosiniComment "^[#;].*$" +syn match dosiniComment "^[#;].*$" contains=@Spell syn region dosiniSection start="\s*\[.*\]" end="\ze\s*\[.*\]" fold \ contains=dosiniLabel,dosiniValue,dosiniNumber,dosiniHeader,dosiniComment From 508403687d3538a99fc900ff9e9951ec788ac421 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Tue, 10 Sep 2024 20:56:13 +0200 Subject: [PATCH 08/15] patch 9.1.0726: not using correct python3 API with dynamic linking Problem: not using correct python3 API with dynamic linking Solution: Use stable IncRef / DecRef in Python 3 dynamic bindings (Yee Cheng Chin) Previously, we were using the Py_DECREF macros even when using dynamic linking of Python 3. This caused issues because Python's headers contain references to internal APIs like `_Py_Dealloc` and in v8.1.2201 and v8.2.1225 we simply hacked around the issue by manually copying the Python header implementation to Vim and linking in the private APIs. This is fragile and prone to break. In fact, the Py_DECREF implementation is different in newer versions of Python meaning that this could potentially cause memory issues. Instead, simply use the API versions (`Py_DECREF` and `Py_INCREF`) which are functions exposed by the Python library. They could be slightly slower since they require a function call instead of a macro, but are much more reliable and we should only be calling these when the Python Vim plugins are crossing the language boundary anyway which are always going to be slow. Note that this only affects dynamically linked Python builds that are not using stable ABI. Also see #15648 closes: #15653 Signed-off-by: Yee Cheng Chin Signed-off-by: Christian Brabandt --- src/if_python3.c | 58 +++++++++--------------------------------------- src/version.c | 2 ++ 2 files changed, 12 insertions(+), 48 deletions(-) diff --git a/src/if_python3.c b/src/if_python3.c index 1045b84850..139ec54df6 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -219,7 +219,7 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll # define PyObject_GetItem py3_PyObject_GetItem # define PyObject_IsTrue py3_PyObject_IsTrue # define PyModule_GetDict py3_PyModule_GetDict -# ifdef USE_LIMITED_API +# if defined(USE_LIMITED_API) || PY_VERSION_HEX >= 0x03080000 # define Py_IncRef py3_Py_IncRef # define Py_DecRef py3_Py_DecRef # endif @@ -293,9 +293,6 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll # define PyBytes_FromString py3_PyBytes_FromString # undef PyBytes_FromStringAndSize # define PyBytes_FromStringAndSize py3_PyBytes_FromStringAndSize -# if defined(Py_DEBUG) || PY_VERSION_HEX >= 0x030900b0 || defined(USE_LIMITED_API) -# define _Py_Dealloc py3__Py_Dealloc -# endif # define PyFloat_FromDouble py3_PyFloat_FromDouble # define PyFloat_AsDouble py3_PyFloat_AsDouble # define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr @@ -396,7 +393,7 @@ static void (*py3_Py_Finalize)(void); static void (*py3_PyErr_SetString)(PyObject *, const char *); static void (*py3_PyErr_SetObject)(PyObject *, PyObject *); static int (*py3_PyErr_ExceptionMatches)(PyObject *); -# ifdef USE_LIMITED_API +# if defined(USE_LIMITED_API) || PY_VERSION_HEX >= 0x03080000 static void (*py3_Py_IncRef)(PyObject *); static void (*py3_Py_DecRef)(PyObject *); # endif @@ -497,9 +494,6 @@ static char* (*py3_PyBytes_AsString)(PyObject *bytes); static int (*py3_PyBytes_AsStringAndSize)(PyObject *bytes, char **buffer, Py_ssize_t *length); static PyObject* (*py3_PyBytes_FromString)(char *str); static PyObject* (*py3_PyBytes_FromStringAndSize)(char *str, Py_ssize_t length); -# if defined(Py_DEBUG) || PY_VERSION_HEX >= 0x030900b0 || defined(USE_LIMITED_API) -static void (*py3__Py_Dealloc)(PyObject *obj); -# endif # if PY_VERSION_HEX >= 0x030900b0 static PyObject* (*py3__PyObject_New)(PyTypeObject *); # endif @@ -607,7 +601,7 @@ static struct {"PyErr_SetString", (PYTHON_PROC*)&py3_PyErr_SetString}, {"PyErr_SetObject", (PYTHON_PROC*)&py3_PyErr_SetObject}, {"PyErr_ExceptionMatches", (PYTHON_PROC*)&py3_PyErr_ExceptionMatches}, -# ifdef USE_LIMITED_API +# if defined(USE_LIMITED_API) || PY_VERSION_HEX >= 0x03080000 {"Py_IncRef", (PYTHON_PROC*)&py3_Py_IncRef}, {"Py_DecRef", (PYTHON_PROC*)&py3_Py_DecRef}, # endif @@ -702,9 +696,6 @@ static struct {"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize}, {"PyBytes_FromString", (PYTHON_PROC*)&py3_PyBytes_FromString}, {"PyBytes_FromStringAndSize", (PYTHON_PROC*)&py3_PyBytes_FromStringAndSize}, -# if defined(Py_DEBUG) || PY_VERSION_HEX >= 0x030900b0 || defined(USE_LIMITED_API) - {"_Py_Dealloc", (PYTHON_PROC*)&py3__Py_Dealloc}, -# endif # if PY_VERSION_HEX >= 0x030900b0 {"_PyObject_New", (PYTHON_PROC*)&py3__PyObject_New}, # endif @@ -752,44 +743,15 @@ static struct {"", NULL}, }; -# if PY_VERSION_HEX >= 0x030800f0 - static inline void -py3__Py_DECREF(const char *filename UNUSED, int lineno UNUSED, PyObject *op) -{ - if (--op->ob_refcnt != 0) - { -# ifdef Py_REF_DEBUG - if (op->ob_refcnt < 0) - { - _Py_NegativeRefcount(filename, lineno, op); - } -# endif - } - else - { - _Py_Dealloc(op); - } -} - -# undef Py_DECREF -# define Py_DECREF(op) py3__Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op)) - - static inline void -py3__Py_XDECREF(PyObject *op) -{ - if (op != NULL) - { - Py_DECREF(op); - } -} - -# undef Py_XDECREF -# define Py_XDECREF(op) py3__Py_XDECREF(_PyObject_CAST(op)) -# endif - -# ifdef USE_LIMITED_API +# if defined(USE_LIMITED_API) || PY_VERSION_HEX >= 0x03080000 // Use stable versions of inc/dec ref. Note that these always null-check and // therefore there's no difference between XINCREF and INCREF. +// +// For 3.8 or above, we also use this version even if not using limited API. +// The Py_DECREF macros in 3.8+ include references to internal functions which +// cause link errors when building Vim. The stable versions are exposed as API +// functions and don't have these problems (albeit slightly slower as they +// require function calls rather than an inlined macro). # undef Py_INCREF # define Py_INCREF(obj) Py_IncRef((PyObject *)obj) # undef Py_XINCREF diff --git a/src/version.c b/src/version.c index 62b2ab55c4..62f8bcb30b 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 726, /**/ 725, /**/ From a9ae38dc3f42f0dd39dae1311de6e1c289697df4 Mon Sep 17 00:00:00 2001 From: Aliaksei Budavei <0x000c70@gmail.com> Date: Tue, 10 Sep 2024 21:00:33 +0200 Subject: [PATCH 09/15] runtime(java): Recognise all available standard doclet tags * Complement the tag set with @spec, {@systemProperty}, {@summary}, @provides, @uses, @hidden, and {@index}. * Do not hoard all tags under a single highlighting group. * Skip over nested balanced braces in inline tags. * Observe that tag names are case sensitive: both {@docRoot} and {@inheritDoc} are valid, whereas {@inheritdoc} and {@docroot} are not. * In the @see tag arguments, allow for: - module name prefixes (e.g. java.base/java.lang.String); - references to arbitrary URI fragments (e.g. ##foo); - matching any tag variation arguments on the next line. * Test directives and tags for Java module declarations. * Enforce the word end for "module-info" candidates. References: https://bugs.openjdk.org/browse/JDK-8226279 (@spec) https://bugs.openjdk.org/browse/JDK-8214559 ({@systemProperty}) https://bugs.openjdk.org/browse/JDK-8173425 ({@summary}) https://bugs.openjdk.org/browse/JDK-8160196 (@provides & @uses) https://bugs.openjdk.org/browse/JDK-8073100 (@hidden) https://bugs.openjdk.org/browse/JDK-8044243 ({@index}) https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html https://github.com/openjdk/jdk/blob/jdk-21-ga/src/jdk.compiler/share/classes/com/sun/source/doctree/DocTree.java closes: #15652 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt --- runtime/syntax/java.vim | 105 +++++++++++++++--- .../testdir/dumps/java_comments_00.dump | 38 +++---- .../testdir/dumps/java_comments_01.dump | 40 +++---- .../testdir/dumps/java_comments_02.dump | 40 +++---- .../testdir/dumps/java_comments_03.dump | 40 +++---- .../testdir/dumps/java_comments_04.dump | 40 +++---- .../testdir/dumps/java_comments_05.dump | 40 +++---- .../testdir/dumps/java_comments_06.dump | 20 ++++ .../testdir/dumps/java_comments_07.dump | 20 ++++ .../testdir/dumps/java_module_info_00.dump | 20 ++++ .../testdir/dumps/java_module_info_01.dump | 20 ++++ .../testdir/dumps/java_module_info_02.dump | 20 ++++ .../syntax/testdir/input/java_comments.java | 50 +++++++-- .../testdir/input/java_module_info.java | 35 ++++++ .../testdir/input/setup/java_module_info.vim | 30 +++++ 15 files changed, 416 insertions(+), 142 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/java_comments_06.dump create mode 100644 runtime/syntax/testdir/dumps/java_comments_07.dump create mode 100644 runtime/syntax/testdir/dumps/java_module_info_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_module_info_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_module_info_02.dump create mode 100644 runtime/syntax/testdir/input/java_module_info.java create mode 100644 runtime/syntax/testdir/input/setup/java_module_info.vim diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index 8aa053d522..293d63c0a2 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Claudio Fleiner " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2024 Aug 26 +" Last Change: 2024 Sep 10 " Please check :help java.vim for comments on some of the options available. @@ -157,13 +157,20 @@ endif " testing in a project without attendant confusion for IDEs, with the " ".java\=" extension used for a production version and an arbitrary " extension used for a testing version. -if fnamemodify(bufname("%"), ":t") =~ '^module-info\%(\.class\>\)\@!' +if fnamemodify(bufname("%"), ":t") =~ '^module-info\>\%(\.class\>\)\@!' syn keyword javaModuleStorageClass module transitive syn keyword javaModuleStmt open requires exports opens uses provides syn keyword javaModuleExternal to with hi def link javaModuleStorageClass StorageClass hi def link javaModuleStmt Statement hi def link javaModuleExternal Include + + if !exists("g:java_ignore_javadoc") && g:main_syntax != 'jsp' + syn match javaDocProvidesTag contained "@provides\_s\+\S\+" contains=javaDocParam + syn match javaDocUsesTag contained "@uses\_s\+\S\+" contains=javaDocParam + hi def link javaDocProvidesTag Special + hi def link javaDocUsesTag Special + endif endif " Fancy parameterised types (JLS-17, ยง4.5). @@ -335,29 +342,99 @@ if !exists("g:java_ignore_javadoc") && g:main_syntax != 'jsp' call s:ReportOnce(v:exception) endtry - syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag,javaTodo,javaCommentError,javaSpaceError,@Spell fold - exec 'syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle end="\.$" end="\.[ \t\r]\@=" end="\%(^\s*\**\s*\)\@' . s:ff.Peek('80', '') . '<=@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,javaSpaceError,@Spell,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag' - syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*\s*\r\=\n\=\s*\**\s*\%({@return\>\)\@=" matchgroup=javaCommentTitle end="}\%(\s*\.*\)*" contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,javaSpaceError,@Spell,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag - syn region javaDocTags contained start="{@\%(li\%(teral\|nk\%(plain\)\=\)\|inherit[Dd]oc\|doc[rR]oot\|value\)\>" end="}" - syn match javaDocTags contained "@\%(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam - syn match javaDocParam contained "\s\S\+" - syn match javaDocTags contained "@\%(version\|author\|return\|deprecated\|serial\%(Field\|Data\)\=\)\>" - syn region javaDocSeeTag contained matchgroup=javaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=javaDocSeeTagParam - syn match javaDocSeeTagParam contained @"\_[^"]\+"\|\|\%(\k\|\.\)*\%(#\k\+\%((\_[^)]*)\)\=\)\=@ contains=@javaHtml extend + syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,@javaDocTags,javaTodo,javaCommentError,javaSpaceError,@Spell fold + exec 'syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle end="\.$" end="\.[ \t\r]\@=" end="\%(^\s*\**\s*\)\@' . s:ff.Peek('80', '') . '<=@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,javaSpaceError,@Spell,@javaDocTags' + syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*\s*\r\=\n\=\s*\**\s*\%({@return\>\)\@=" matchgroup=javaCommentTitle end="}\%(\s*\.*\)*" contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,javaSpaceError,@Spell,@javaDocTags,javaTitleSkipBlock + syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*\s*\r\=\n\=\s*\**\s*\%({@summary\>\)\@=" matchgroup=javaCommentTitle end="}" contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,javaSpaceError,@Spell,@javaDocTags,javaTitleSkipBlock + " The members of javaDocTags are sub-grouped according to the Java + " version of their introduction, and sub-group members in turn are + " arranged in alphabetical order, so that future newer members can + " be pre-sorted and appended without disturbing the current member + " placement. + " Since they only have significance in javaCommentTitle, neither + " javaDocSummaryTag nor javaDocReturnTitleTag are defined. + syn cluster javaDocTags contains=javaDocAuthorTag,javaDocDeprecatedTag,javaDocExceptionTag,javaDocParamTag,javaDocReturnTag,javaDocSeeTag,javaDocVersionTag,javaDocSinceTag,javaDocLinkTag,javaDocSerialTag,javaDocSerialDataTag,javaDocSerialFieldTag,javaDocThrowsTag,javaDocDocRootTag,javaDocInheritDocTag,javaDocLinkplainTag,javaDocValueTag,javaDocCodeTag,javaDocLiteralTag,javaDocHiddenTag,javaDocIndexTag,javaDocProvidesTag,javaDocUsesTag,javaDocSystemPropertyTag,javaDocSnippetTag,javaDocSpecTag + + " Anticipate non-standard inline tags in {@return} and {@summary}. + syn region javaTitleSkipBlock contained transparent start="{\%(@\%(return\|summary\)\>\)\@!" end="}" + syn match javaDocDocRootTag contained "{@docRoot}" + syn match javaDocInheritDocTag contained "{@inheritDoc}" + syn region javaIndexSkipBlock contained transparent start="{\%(@index\>\)\@!" end="}" contains=javaIndexSkipBlock,javaDocIndexTag + syn region javaDocIndexTag contained start="{@index\>" end="}" contains=javaDocIndexTag,javaIndexSkipBlock + syn region javaLinkSkipBlock contained transparent start="{\%(@link\>\)\@!" end="}" contains=javaLinkSkipBlock,javaDocLinkTag + syn region javaDocLinkTag contained start="{@link\>" end="}" contains=javaDocLinkTag,javaLinkSkipBlock + syn region javaLinkplainSkipBlock contained transparent start="{\%(@linkplain\>\)\@!" end="}" contains=javaLinkplainSkipBlock,javaDocLinkplainTag + syn region javaDocLinkplainTag contained start="{@linkplain\>" end="}" contains=javaDocLinkplainTag,javaLinkplainSkipBlock + syn region javaLiteralSkipBlock contained transparent start="{\%(@literal\>\)\@!" end="}" contains=javaLiteralSkipBlock,javaDocLiteralTag + syn region javaDocLiteralTag contained start="{@literal\>" end="}" contains=javaDocLiteralTag,javaLiteralSkipBlock + syn region javaSystemPropertySkipBlock contained transparent start="{\%(@systemProperty\>\)\@!" end="}" contains=javaSystemPropertySkipBlock,javaDocSystemPropertyTag + syn region javaDocSystemPropertyTag contained start="{@systemProperty\>" end="}" contains=javaDocSystemPropertyTag,javaSystemPropertySkipBlock + syn region javaValueSkipBlock contained transparent start="{\%(@value\>\)\@!" end="}" contains=javaValueSkipBlock,javaDocValueTag + syn region javaDocValueTag contained start="{@value\>" end="}" contains=javaDocValueTag,javaValueSkipBlock + + syn match javaDocParam contained "\s\zs\S\+" + syn match javaDocExceptionTag contained "@exception\s\+\S\+" contains=javaDocParam + syn match javaDocParamTag contained "@param\s\+\S\+" contains=javaDocParam + syn match javaDocSinceTag contained "@since\s\+\S\+" contains=javaDocParam + syn match javaDocThrowsTag contained "@throws\s\+\S\+" contains=javaDocParam + syn match javaDocSpecTag contained "@spec\_s\+\S\+\ze\_s\+\S\+" contains=javaDocParam + + syn match javaDocAuthorTag contained "@author\>" + syn match javaDocDeprecatedTag contained "@deprecated\>" + syn match javaDocHiddenTag contained "@hidden\>" + syn match javaDocReturnTag contained "@return\>" + syn match javaDocSerialTag contained "@serial\>" + syn match javaDocSerialDataTag contained "@serialData\>" + syn match javaDocSerialFieldTag contained "@serialField\>" + syn match javaDocVersionTag contained "@version\>" + + syn match javaDocSeeTag contained "@see\>" nextgroup=javaDocSeeTag1,javaDocSeeTag2,javaDocSeeTag3,javaDocSeeTagStar skipwhite skipempty + syn match javaDocSeeTagStar contained "^\s*\*\+\%(\s*{\=@\|/\|$\)\@!" nextgroup=javaDocSeeTag1,javaDocSeeTag2,javaDocSeeTag3 skipwhite skipempty + syn match javaDocSeeTag1 contained @"\_[^"]\+"@ + syn match javaDocSeeTag2 contained @@ contains=@javaHtml extend + syn match javaDocSeeTag3 contained @["< \t]\@!\%(\k\|[/.]\)*\%(##\=\k\+\%((\_[^)]*)\)\=\)\=@ nextgroup=javaDocSeeTag3Label skipwhite skipempty + syn match javaDocSeeTag3Label contained @\k\%(\k\+\s*\)*$@ + syn region javaCodeSkipBlock contained transparent start="{\%(@code\>\)\@!" end="}" contains=javaCodeSkipBlock,javaDocCodeTag syn region javaDocCodeTag contained start="{@code\>" end="}" contains=javaDocCodeTag,javaCodeSkipBlock + exec 'syn region javaDocSnippetTagAttr contained transparent matchgroup=javaHtmlArg start=/\<\%(class\|file\|id\|lang\|region\)\%(\s*=\)\@=/ matchgroup=javaHtmlString end=/:$/ end=/\%(=\s*\)\@' . s:ff.Peek('80', '') . '<=\%("[^"]\+"\|' . "\x27[^\x27]\\+\x27" . '\|\%([.\\/-]\|\k\)\+\)/ nextgroup=javaDocSnippetTagAttr skipwhite skipnl' syn region javaSnippetSkipBlock contained transparent start="{\%(@snippet\>\)\@!" end="}" contains=javaSnippetSkipBlock,javaDocSnippetTag,javaCommentMarkupTag syn region javaDocSnippetTag contained start="{@snippet\>" end="}" contains=javaDocSnippetTag,javaSnippetSkipBlock,javaDocSnippetTagAttr,javaCommentMarkupTag syntax case match hi def link javaDocComment Comment + hi def link javaDocSeeTagStar javaDocComment hi def link javaCommentTitle SpecialComment - hi def link javaDocTags Special + hi def link javaDocParam Function + + hi def link javaDocAuthorTag Special hi def link javaDocCodeTag Special + hi def link javaDocDeprecatedTag Special + hi def link javaDocDocRootTag Special + hi def link javaDocExceptionTag Special + hi def link javaDocHiddenTag Special + hi def link javaDocIndexTag Special + hi def link javaDocInheritDocTag Special + hi def link javaDocLinkTag Special + hi def link javaDocLinkplainTag Special + hi def link javaDocLiteralTag Special + hi def link javaDocParamTag Special + hi def link javaDocReturnTag Special + hi def link javaDocSeeTag Special + hi def link javaDocSeeTag1 String + hi def link javaDocSeeTag2 Special + hi def link javaDocSeeTag3 Function + hi def link javaDocSerialTag Special + hi def link javaDocSerialDataTag Special + hi def link javaDocSerialFieldTag Special + hi def link javaDocSinceTag Special hi def link javaDocSnippetTag Special - hi def link javaDocSeeTagParam Function - hi def link javaDocParam Function + hi def link javaDocSpecTag Special + hi def link javaDocSystemPropertyTag Special + hi def link javaDocThrowsTag Special + hi def link javaDocValueTag Special + hi def link javaDocVersionTag Special endif " match the special comment /**/ diff --git a/runtime/syntax/testdir/dumps/java_comments_00.dump b/runtime/syntax/testdir/dumps/java_comments_00.dump index a629664e84..f0ecd9d5a4 100644 --- a/runtime/syntax/testdir/dumps/java_comments_00.dump +++ b/runtime/syntax/testdir/dumps/java_comments_00.dump @@ -1,20 +1,20 @@ ->/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0fd7ff255|:+0&#ffffff0|j|a|v|a|_|i|g|n|o|r|e|_|j+0&#ffd7d7255|a|v|a|d|o|c| +0&#ffffff0|g|:|j|a|v|a|_|n|o|_|t|r|a|i|l|_|s|p|a|c|e|_|e|r@1|o|r| +0#0000000& -|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0fd7ff255|:+0&#ffffff0|j|a|v|a|_|n|o|_|t|a|b|_|s|p|a|c|e|_|e|r@1|o|r| +0#0000000&@24 -|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |[|g|:|j|a|v|a|_|s|p|a|c|e|_|e|r@1|o|r|s|,|g|:|j|a|v|a|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s|]| |=| |[|1+0#e000002&|,+0#0000e05&|1+0#e000002&|]+0#0000e05&| +0#0000000& -|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s+0&#ffd7d7255|e|t|l|o|c|a|l| +0&#ffffff0|s|p|e|l@1| ||| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |j+0&#ffd7d7255|a|v|a|C|o|m@1|e|n|t|S|t|a|r|t| +0&#ffffff0|T+0&#ffd7d7255|o|d|o| +0#0000000#ffffff0@3 -@75 -@75 -@75 -@75 -|/+0#0000e05&|*@1|/| +0#0000000&|/+0#0000001#ffff4012|*|/+0#0000e05#ffffff0| |*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*| +0#0000e05#ffffff0|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*|/+0#0000e05#ffffff0|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000e05&|*@1| +0#e000e06&|C|o|m@1|e|n|t| |t|e|s|t|s|.| +0#0000000&@24 -| +0#0000e05&|*| |<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000e05&|h|e|r|e| |i|s| |n|o| |e|n|t|r|y| |p|o|i|n|t| |m|e|t|h|o|d| |{+0#e000e06&|@|c|o|d|e| |m|a|i|n|}|:+0#0000e05&| +0#0000000&@24 -| +0#0000e05&|*| |{+0#e000e06&|@|s|n|i|p@1|e|t| |f+0#00e0003&|i|l|e| +0#e000e06&|=| |S+0#e000002&|n|i|p@1|e|t|s|.|j|a|v|a| +0#e000e06&|r+0#00e0003&|e|g|i|o|n| +0#e000e06&|=| |m+0#e000002&|a|i|n| +0#e000e06&|i+0#00e0003&|d| +0#e000e06&|=| |_+0#e000002&|0|1|}+0#e000e06&| +0#0000000&@17 -| +0#0000e05&|*| |<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000e05&|h|e|r|e| |i|s| |n|o| |t|e|x|t|u|a|l| |r|e|p|r|e|s|e|n|t|a|t|i|o|n|:| +0#0000000&@33 -| +0#0000e05&|*| |{+0#e000e06&|@|s|n|i|p@1|e|t| |c+0#00e0003&|l|a|s@1| +0#e000e06&|=| |S+0#e000002&|n|i|p@1|e|t|s| +0#e000e06&|r+0#00e0003&|e|g|i|o|n| +0#e000e06&|=| |t+0#e000002&|o|S|t|r|i|n|g| +0#e000e06&|i+0#00e0003&|d| +0#e000e06&|=| |_+0#e000002&|0|2|}+0#e000e06&| +0#0000e05&|*|/| +0#0000000&@14 -|c+0#00e0003&|l|a|s@1| +0#0000000&|C|o|m@1|e|n|t|s|T|e|s|t|s| @55 -|{| @73 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.| +0#0000e05&|e+0fd7ff255|.+0&#ffffff0| |n+0fd7ff255|o| +0&#ffffff0|o|p|e|r|a|t|i|o|n|.| +0#0000000&@40 -| +0#0000e05&@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|@|l|i|t|e|r|a|l|}| +0#0000e05&|m|a|y| |b|e| |u|s|e|d| |w|i|t|h| |{+0#e000e06&|@|c|o|d|e| |.|}| +0#0000e05&|f|o|r| |c|o|n|t|r|a|c|t|i|o|n|.|)| +0#0000000&@4 -| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45 -@4|V|o|i|d| |n|o|O|p|1|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 +| +0#0000e05#a8a8a8255@1>/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0fd7ff255|:+0&#ffffff0|j|a|v|a|_|n|o|_|t|a|b|_|s|p|a|c|e|_|e|r@1|o|r| |g|:|j|a|v|a|_|i|g|n|o|r|e|_|j+0&#ffd7d7255|a|v|a|d|o|c| +0#0000000#ffffff0 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0fd7ff255|:+0&#ffffff0|j|a|v|a|_|n|o|_|t|r|a|i|l|_|s|p|a|c|e|_|e|r@1|o|r| +0#0000000&@20 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |[|g|:|j|a|v|a|_|s|p|a|c|e|_|e|r@1|o|r|s|,|g|:|j|a|v|a|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s|]|=|[|1+0#e000002&|,+0#0000e05&|1+0#e000002&|]+0#0000e05&| +0#0000000& +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s+0&#ffd7d7255|e|t|l|o|c|a|l| +0&#ffffff0|s|p|e|l@1| |f+0&#ffd7d7255|d|c|=+0&#ffffff0|2+0#e000002&| +0#0000e05&|f+0&#ffd7d7255|d|l|=+0&#ffffff0|6+0#e000002&|4| +0#0000e05&|f+0&#ffd7d7255|d|m|=+0&#ffffff0|s|y|n|t|a|x| |f|e|n| +0#0000000&@12 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |j+0&#ffd7d7255|a|v|a|C|o|m@1|e|n|t|S|t|a|r|t| +0&#ffffff0|T+0&#ffd7d7255|o|d|o| +0#0000000#ffffff0@18 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |j+0&#ffd7d7255|a|v|a|C|o|m@1|e|n|t|T|i|t|l|e| +0&#ffffff0|U|n|d|e|r|l|i|n|e|d| +0#0000000&@12 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 @57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/java_comments_01.dump b/runtime/syntax/testdir/dumps/java_comments_01.dump index 77d7c4acf5..ab6007b2e2 100644 --- a/runtime/syntax/testdir/dumps/java_comments_01.dump +++ b/runtime/syntax/testdir/dumps/java_comments_01.dump @@ -1,20 +1,20 @@ -|c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|C|o|m@1|e|n|t|s|T|e|s|t|s| @55 -|{| @73 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.| +0#0000e05&|e+0fd7ff255|.+0&#ffffff0| |n+0fd7ff255|o| +0&#ffffff0|o|p|e|r|a|t|i|o|n|.| +0#0000000&@40 -| +0#0000e05&@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|@|l|i|t|e|r|a|l|}| +0#0000e05&|m|a|y| |b|e| |u|s|e|d| |w|i|t|h| |{+0#e000e06&|@|c|o|d|e| |.|}| +0#0000e05&|f|o|r| |c|o|n|t|r|a|c|t|i|o|n|.|)| +0#0000000&@4 -| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45 -@4>V|o|i|d| |n|o|O|p|1|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|.| +0#0000e05&|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@41 -| +0#0000e05&@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|<|!|-@1| |-@1|>|}| +0#0000e05&|m|a|y| |b|e| |u|s|e|d| |a|f|t|e|r| |{+0#e000e06&|@|c|o|d|e| |.|}| +0#0000e05&|f|o|r| |c|o|n|t|r|a|c|t|i|o|n|.|)| +0#0000000&@3 -| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45 -@4|V|o|i|d| |n|o|O|p|2|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|\|u+0&#ffd7d7255|0@1|2|e| +0&#ffffff0|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@36 -| +0#0000e05&@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|\|u|0@1|5|c|u|0@1|2|e|}| +0#0000e05&|i|s| |p|r|o|c|e|s@1|e|d| |e|a|r|l|y|,| |u|s|e| |a|l|t|e|r|n|a|t|i|v|e|s|.|)| +0#0000000&@7 -| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45 -@4|V|o|i|d| |n|o|O|p|3|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|{|@|l|i|t|e|r|a|l| |.|}| |n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@30 -| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45 -@57|1|9|,|2|-|5| @7|1|8|%| +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| |/+0&#ffffff0|*@1|/| +0#0000000&|/+0#0000001#ffff4012|*|/+0#0000e05#ffffff0| |*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*| +0#0000e05#ffffff0|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*|/+0#0000e05#ffffff0|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000e05&|*@1| +8#e000e06&|C|o|m@1|e|n|t| |t|e|s|t|s|.| +0#0000000&@22 +||+0#0000e05#a8a8a8255| | +0&#ffffff0|*| |<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000e05&|h|e|r|e| |i|s| |n|o| |e|n|t|r|y| |p|o|i|n|t| |m|e|t|h|o|d| |{+0#e000e06&|@|c|o|d|e| |m|a|i|n|}|:+0#0000e05&| +0#0000000&@22 +||+0#0000e05#a8a8a8255| | +0&#ffffff0|*| |{+0#e000e06&|@|s|n|i|p@1|e|t| |f+0#00e0003&|i|l|e| +0#e000e06&|=| |S+0#e000002&|n|i|p@1|e|t|s|.|j|a|v|a| +0#e000e06&|r+0#00e0003&|e|g|i|o|n| +0#e000e06&|=| |m+0#e000002&|a|i|n| +0#e000e06&|i+0#00e0003&|d| +0#e000e06&|=| |_+0#e000002&|0|1|}+0#e000e06&| +0#0000000&@15 +||+0#0000e05#a8a8a8255| | +0&#ffffff0|*| |<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000e05&|h|e|r|e| |i|s| |n|o| |t|e|x|t|u|a|l| |r|e|p|r|e|s|e|n|t|a|t|i|o|n|:| +0#0000000&@31 +||+0#0000e05#a8a8a8255| | +0&#ffffff0|*| |{+0#e000e06&|@|s|n|i|p@1|e|t| |c+0#00e0003&|l|a|s@1| +0#e000e06&|=| |S+0#e000002&|n|i|p@1|e|t|s| +0#e000e06&|r+0#00e0003&|e|g|i|o|n| +0#e000e06&|=| |t+0#e000002&|o|S|t|r|i|n|g| +0#e000e06&|i+0#00e0003&|d| +0#e000e06&|=| |_+0#e000002&|0|2|}+0#e000e06&| +0#0000e05&|*|/| +0#0000000&@12 +| +0#0000e05#a8a8a8255@1|c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|C|o|m@1|e|n|t|s|T|e|s|t|s| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|C|o|m|p|a|r|a|b|l|e|<|C|o|m@1|e|n|t|s|T|e|s|t|s|>| @16 +| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @71 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|C|o|m@1|e|n|t|s|T|e|s|t|s|(|)| |{| |}| @41 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|N|o|-|o|p|,| |i|.| +0#0000e05&|e+0fd7ff255|.+0&#ffffff0| |n+0fd7ff255|o| +0&#ffffff0|o|p|e|r|a|t|i|o|n|.| +0#0000000&@38 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|@|l|i|t|e|r|a|l|}| +0#0000e05&|m|a|y| |b|e| |u|s|e|d| |w|i|t|h| |{+0#e000e06&|@|c|o|d|e| |.|}| +0#0000e05&|f|o|r| |c|o|n|t|r|a|c|t|i|o|n|.|)| +0#0000000&@2 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@43 +@57|1|9|,|0|-|1| @7|1|2|%| diff --git a/runtime/syntax/testdir/dumps/java_comments_02.dump b/runtime/syntax/testdir/dumps/java_comments_02.dump index 25babc7665..03c4bcfc14 100644 --- a/runtime/syntax/testdir/dumps/java_comments_02.dump +++ b/runtime/syntax/testdir/dumps/java_comments_02.dump @@ -1,20 +1,20 @@ -| +0#0000e05#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45 -@4|V|o|i|d| |n|o|O|p|4|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|.|<|!|-@1| |-@1|>| |n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@33 -| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45 -@4>V|o|i|d| |n|o|O|p|5|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|.|&|n|b|s|p|;|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@36 -| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45 -@4|V|o|i|d| |n|o|O|p|6|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |{|@|c|o|d|e| |n|u|l@1|}|,| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}| |*+0#0000e05&|/| +0#0000000&@10 -@4|V|o|i|d| |n|o|O|p|7|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |{|@|c|o|d|e| |n|u|l@1|}|,| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}|.@1| |*+0#0000e05&|/| +0#0000000&@8 -@4|V|o|i|d| |n|o|O|p|8|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |{|@|c|o|d|e| |n|u|l@1|}|,| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}| |.| |.| |*+0#0000e05&|/| +0#0000000&@6 -@4|V|o|i|d| |n|o|O|p|9|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@57|3|7|,|2|-|5| @7|4|3|%| +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@43 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|V|o|i|d| |n|o|O|p|1|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|N|o|-|o|p|,| |i|.|e|.| +0#0000e05&|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@39 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|<|!|-@1| |-@1|>|}| +0#0000e05&|m|a|y| |b|e| |u|s|e|d| |a|f|t|e|r| |{+0#e000e06&|@|c|o|d|e| |.|}| +0#0000e05&|f|o|r| |c|o|n|t|r|a|c|t|i|o|n|.|)| +0#0000000&@1 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3>*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@43 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|V|o|i|d| |n|o|O|p|2|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|N|o|-|o|p|,| |i|.|e|\|u+8&#ffd7d7255|0@1|2|e| +8&#ffffff0|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@34 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|\|u|0@1|5|c|u|0@1|2|e|}| +0#0000e05&|i|s| |p|r|o|c|e|s@1|e|d| |e|a|r|l|y|,| |u|s|e| |a|l|t|e|r|n|a|t|i|v|e|s|.|)| +0#0000000&@5 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@43 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|V|o|i|d| |n|o|O|p|3|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|N|o|-|o|p|,| |i|.|e|{+0&&|@|l|i|t|e|r|a|l| |.|}| +8&&|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@28 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@43 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|V|o|i|d| |n|o|O|p|4|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|N|o|-|o|p|,| |i|.|e|.|<+0&&|!|-@1| |-@1|>| +8&&|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@31 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@43 +@57|3|7|,|2|-|5| @7|3|0|%| diff --git a/runtime/syntax/testdir/dumps/java_comments_03.dump b/runtime/syntax/testdir/dumps/java_comments_03.dump index f3f8d56f3b..a407805eed 100644 --- a/runtime/syntax/testdir/dumps/java_comments_03.dump +++ b/runtime/syntax/testdir/dumps/java_comments_03.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@3|V|o|i|d| |n|o|O|p|9|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41 -@75 -@4|/+0#0000e05&|*@1| +0#e000e06&|R|e|t|u|r|n|s| |a|n| |e|m|p|t|y| |s|t|r|i|n|g| |f|o|r| |a|n| |@|O|v|e|r@1|i|d|e| |a|n@1|o|t|a|t|e|d| |m|e|t|h|o|d| +0#0000000&@9 -| +0#0000e05&@3|*| +0#e000e06&|(|s|e@1| |C|h|a|p|t|e|r| |9|.|6|.|4|.|4| |{|@|l|i|t|e|r|a|l| |@|O|v|e|r@1|i|d|e|}| |i|n| |a| |J|a|v|a| |L|a|n|g|u|a|g|e| +0#0000000&@8 -| +0#0000e05&@3|*| +0#e000e06&|S|p|e|c|i|f|i|c|a|t|i|o|n|)| |o|v|e|r@1|i|d@1|e|n| |f|r|o|m| |<+0#00e0e07&|c+0#af5f00255&|o|d|e|>+0#00e0e07&|j+0#e000e06&|a|v|a|.|l+0&#ffd7d7255|a|n|g|.+0&#ffffff0|O|b|j|e|c|t|<+0#00e0e07&|/|c+0#af5f00255&|o|d|e|>+0#00e0e07&| +0#0000000&@8 -| +0#0000e05&@3>*| +0#0000000&@69 -| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|a|n| |e|m|p|t|y| |s|t|r|i|n|g| |*|/@2| |N|o| |p|e|r|i|o|d| |f|o|r| |t|h|e| |a|b|o|v|e| |s|u|m@1|a|r|y|!| +0#0000000&@7 -@4|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&@1|;+0#0000000&| |}| @21 -|}| @73 -@75 -|/+0#0000e05&@1| |j+0&#ffd7d7255|a|v|a|d|o|c| +0&#ffffff0|-@1|s|n|i|p@1|e|t|-|p|a|t|h| |.| |-@1|s|o|u|r|c|e|-|p|a|t|h| |.| |-|d| |/|t+0&#ffd7d7255|m|p|/+0&#ffffff0|d|o|c|/| |-|p|a|c|k|a|g|e| |\| +0#0000000&@7 -|/+0#0000e05&@1| +0#ffffff16#ff404010| +0#0000e05#ffffff0|-|t|a|g| |'|j+0&#ffd7d7255|l|s|:+0&#ffffff0|a|:|S|e@1| |J|a|v|a| |L|a|n|g|u|a|g|e| |S|p|e|c|i|f|i|c|a|t|i|o|n|:|'| |S|n|i|p@1|e|t|s|.|j|a|v|a| +0#0000000&@11 -|/+0#0000e05&|*@1| +0#e000e06&|S|n|i|p@1|e|t|s| |f|o|r| |c|o|m@1|e|n|t| |t|e|s|t|s|.| +0#0000e05&|*|/| +0#0000000&@40 -|c+0#00e0003&|l|a|s@1| +0#0000000&|S|n|i|p@1|e|t|s| @60 -|{| @2|/+0#0000001#ffff4012|*| +0#ffffff16#ff404010| +0#0000e05#ffffff0|T|R|A|I|L|I|N|G| |B|L|A|N|K|S| |A|N|D| |M+0&#ffd7d7255|E|S@1|P|I|L@1|I|N|G|S| +0&#ffffff0|A|R|E| |S|I|G|N|I|F|I|C|A|N|T|!| |*+0#0000001#ffff4012|/| +0#0000000#ffffff0@14 -@4|/+0#0000e05&|*@1| +0#e000e06&|T|h|e| |m|e|t|h|o|d| |{|@|c|o|d|e| |m|a|i|n|}| |m|u|s|t| |b|e| |d|e|c|l|a|r|e|d| |{|@|c|o|d|e| |p|u|b|l|i|c|}|,| |{|@|c|o|d|e| +0#0000000&@3 -| +0#e000e06&@4|*| |s|t|a|t|i|c|}|,| |a|n|d| |{|@|c|o|d|e| |v|o|i|d|}|.| +0#0000e05&@1|I|t| |m|u|s|t| |s|p|e|c|i|f|y| |a| |f|o|r|m|a|l| |p|a|r|a|m|e|t|e|r| +0#0000000&@5 -| +0#0000e05&@4|*| |w|h|o|s|e| |d|e|c|l|a|r|e|d| |t|y|p|e| |i|s| |a|r@1|a|y| |o|f| |{+0#e000e06&|@|l|i|n|k| |S|t|r|i|n|g|}|.+0#0000e05&| @1|T|h|e|r|e|f|o|r|e|,| +0#0000000&@8 -| +0#0000e05&@4|*| |e|i|t|h|e|r| |o|f| |t|h|e| |f|o|l@1|o|w|i|n|g| |d|e|c|l|a|r|a|t|i|o|n|s| |i|s| |a|c@1|e|p|t|a|b|l|e|:| +0#0000000&@16 -@57|5@1|,|2|-|5| @7|6|9|%| +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@43 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|V|o|i|d| |n|o|O|p|5|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|N|o|-|o|p|,| |i|.|e|.|&+0&&|n|b|s|p|;|n+8&&|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@34 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@43 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3>V|o|i|d| |n|o|O|p|6|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| |{+8#e000e06&|@+0&&|r|e|t|u|r|n| +8&&|{+0&&|@|c|o|d|e| |n|u|l@1|}|,+8&&| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}| |*+0#0000e05&|/| +0#0000000&@8 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|V|o|i|d| |n|o|O|p|7|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| |{+8#e000e06&|@+0&&|r|e|t|u|r|n| +8&&|{+0&&|@|c|o|d|e| |n|u|l@1|}|,+8&&| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}|.@1| |*+0#0000e05&|/| +0#0000000&@6 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|V|o|i|d| |n|o|O|p|8|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| |{+8#e000e06&|@+0&&|r|e|t|u|r|n| +8&&|{+0&&|@|c|o|d|e| |n|u|l@1|}|,+8&&| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}| |.| |.| |*+0#0000e05&|/| +0#0000000&@4 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|V|o|i|d| |n|o|O|p|9|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @39 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| |{+8#e000e06&|@+0&&|r|e|t|u|r|n| +8&&|t|h|e| |m|a|j|o|r| |J|a|v|a| |v|e|r|s|i|o|n|}| |@+0&&|h|i|d@1|e|n| +0#0000e05&|*|/| +0#0000000&@21 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#0000000&|i+0#00e0003&|n|t| +0#0000000&|m|a|j|o|r|V|e|r|s|i|o|n|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|2+0#e000002&|1|;+0#0000000&| |}| @25 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +@57|5@1|,|2|-|5| @7|4|7|%| diff --git a/runtime/syntax/testdir/dumps/java_comments_04.dump b/runtime/syntax/testdir/dumps/java_comments_04.dump index 01703a809e..d415c024cc 100644 --- a/runtime/syntax/testdir/dumps/java_comments_04.dump +++ b/runtime/syntax/testdir/dumps/java_comments_04.dump @@ -1,20 +1,20 @@ -| +0#0000e05#ffffff0@4|*| |e|i|t|h|e|r| |o|f| |t|h|e| |f|o|l@1|o|w|i|n|g| |d|e|c|l|a|r|a|t|i|o|n|s| |i|s| |a|c@1|e|p|t|a|b|l|e|:| +0#0000000&@16 -| +0#0000e05&@4|*| +0#ffffff16#ff404010| +0#0000e05#ffffff0|{+0#e000e06&|@|s|n|i|p@1|e|t| |l+0#00e0003&|a|n|g|=+0#e000e06&|"+0#e000002&|j|a|v|a|"|:+0#e000e06&| +0#0000000&@44 -| +0#e000e06&@4|*| |/@1| |@+0#0000000&|h|i|g|h|l|i|g|h|t| +0#e000e06&|s+0#00e0003&|u|b|s|t|r|i|n|g|=+0#e000e06&|"+0#e000002&|m|a|i|n|"| +0#e000e06&|t+0#00e0003&|y|p|e|=+0#e000e06&|"+0#e000002&|i|t|a|l|i|c|"|:+0#e000e06&| +0#0000000&@22 -| +0#e000e06&@4|*| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| +0#0000000&@25 -| +0#e000e06&@4|*| |}|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>|<|p+0#af5f00255&|r|e| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|s|n|i|p@1|e|t|"|>+0#00e0e07&| +0#0000000&@39 -| +0#0000e05&@4>*|{+0#e000e06&|@|c|o|d|e| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|.@2| |a|r|g|s|)| |{| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|r|e|>+0#00e0e07&| +0#0000000&@11 -| +0#0000e05&@4|*| +0#0000000&@68 -| +0#0000e05&@4|*| |@+0#e000e06&|p|a|r|a|m| +0#00e0e07&|a|r|g|s| +0#0000e05&|o|p|t|i|o|n|a|l| |c+0&#ffd7d7255|o|m@1|a|n|d|e|-+0&#ffffff0|l|i|n|e| |a|r|g|u|m|e|n|t|s| +0#ffffff16#ff404010| +0#0000000#ffffff0@22 -| +0#0000e05&@4|*| |@|j+0&#ffd7d7255|l|s| +0&#ffffff0|1|2|.|1|.|4| |I|n|v|o|k|e| |{+0#e000e06&|@|c|o|d|e| |T|e|s|t|.|m|a|i|n|}| +0#0000e05&|*|/| +0#0000000&@28 -@4|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |m+0#e000002&|a|i|n| +0#ffffff16#ff404010@4| +0#0000000#ffffff0@42 -@4|/+0#0000e05&@1| |@+0#0000000&|l|i|n|k| +0#0000e05&|s+0#00e0003&|u|b|s|t|r|i|n|g| +0#0000e05&|=| |'+0#e000002&|S|t|r|i|n|g|'| +0#0000e05&|t+0#00e0003&|a|r|g|e|t| +0#0000e05&|=| |'+0#e000002&|j|a|v|a|.|l|a|n|g|.|S|t|r|i|n|g|'| +0#0000e05&|:| +0#0000000&@11 -@4|p+0#00e0003&|u|b|l|i|c| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| @28 -@4|/+0#0000e05&@1| |@+0#0000000&|e|n|d| +0#ffffff16#ff404010| +0#0000000#ffffff0@62 -@75 -@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |a|n| |e|m|p|t|y| |s|t|r|i|n|g|}| +0#ffffff16#ff404010@2| +0#0000000#ffffff0@38 -| +0#0000e05&@4|*| +0#e000e06&|@|s|e@1| |<+0#00e0e07&|a+0#af5f00255&| +0#00e0e07&|h+0#00e0003&|r|e|f|=+0#00e0e07&|"+0#e000002&|h|t@1|p|s|:|/@1|d|o|c|s|.|o|r|a|c|l|e|.|c|o|m|/|j|a|v|a|s|e|/|s|p|e|c|s|/|j|l|s|/|s|e|2|1|/|h|t|m|l|/|j|l|s -|-|3|.|h|t|m|l|#|j|l|s|-|3|.|1|0|.|5|"|>+0#00e0e07&|3+8#e000e06&|.|1|0|.|5| |S|t|r|i|n|g| |L|i|t|e|r|a|l|s|<+0#00e0e07&|/|a+0#af5f00255&|>+0#00e0e07&| +0#0000000&@28 -| +0#0000e05&@4|*| +0#e000e06&|@|s|e@1| |O+0#00e0e07&|b|j|e|c|t|#|t|o|S|t|r|i|n|g|(|)| +0#0000000&|*+0#e000e06&|/| +0#0000000&@42 -@4|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |t+0#e000002&|o|S|t|r|i|n|g| +0#ffffff16#ff404010| +0#0000000#ffffff0@42 -@57|7|3|,|3|-|6| @7|9|3|%| +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| |{+8#e000e06&|@|s|u|m@1|a|r|y| |C|o|m|p|a|r|e|s| |t|h|i|s| |i|n|s|t|a|n|c|e| |w|i|t|h| |t|h|e| |p|a|s@1|e|d| |{+0&&|@|c|o|d|e| |t|h|a|t|}| +0#0000000&@3 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| +8#e000e06&|i|n|s|t|a|n|c|e| |f|o|r| |o|r|d|e|r| |b|y| |i|n|v|o|k|i|n|g| |{+0&&|@|l|i|n|k| |I|n|t|e|g|e|r|#|c|o|m|p|a|r|e|(|i|n|t|,| |i|n|t|)| +0#0000000&@2 +||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |c|o|m|p|a|r|e|}| +8&&|a|n|d| |p|a|s@1|i|n|g| |i|t| |{+0&&|@|c|o|d|e| |t|h|i|s|.|m|a|j|o|r|V|e|r|s|i|o|n|(|)|}| +8&&|a|n|d| +0#0000000&@10 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| +8#e000e06&|{+0&&|@|c|o|d|e| |t|h|a|t|.|m|a|j|o|r|V|e|r|s|i|o|n|(|)|}| +8&&|a|s| |r|e|s|p|e|c|t|i|v|e| |@|a|r|g|u|m|e|n|t|s|.|}| +0#0000000&@11 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4>*| +0#0000000&@66 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |{+0#e000e06&|@|i|n|h|e|r|i|t|D|o|c|}| +0#0000e05&|*|/| +0#0000000&@49 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|p+0#00e0003&|u|b|l|i|c| +0#0000000&|i+0#00e0003&|n|t| +0#0000000&|c|o|m|p|a|r|e|T|o|(|C|o|m@1|e|n|t|s|T|e|s|t|s| |t|h|a|t|)| @18 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|{| @67 +||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@7|j|a|v|a|.|u|t|i|l|.|O|b|j|e|c|t|s|.|r|e|q|u|i|r|e|N|o|n|N|u|l@1|(|t|h|a|t|,| |"+0#e000002&|t|h|a|t|"|)+0#0000000&|;| @17 +||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@7|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|I|n|t|e|g|e|r|.|c|o|m|p|a|r|e|(|t+0#00e0003&|h|i|s|.+0#0000000&|m|a|j|o|r|V|e|r|s|i|o|n|(|)|,| @21 +||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@23|t|h|a|t|.|m|a|j|o|r|V|e|r|s|i|o|n|(|)@1|;| @27 +||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|}| @67 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|R|e|t|u|r|n|s| |a|n| |e|m|p|t|y| |s|t|r|i|n|g| |f|o|r| |a|n| |@|O|v|e|r@1|i|d|e| |a|n@1|o|t|a|t|e|d| |m|e|t|h|o|d| +0#0000000&@7 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| +8#e000e06&|(|s|e@1| |C|h|a|p|t|e|r| |9|.|6|.|4|.|4| |{+0&&|@|l|i|t|e|r|a|l| |@|O|v|e|r@1|i|d|e|}| +8&&|i|n| |a| |J|a|v|a| |L|a|n|g|u|a|g|e| +0#0000000&@6 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| +8#e000e06&|S|p|e|c|i|f|i|c|a|t|i|o|n|)| |o|v|e|r@1|i|d@1|e|n| |f|r|o|m| |<+0#00e0e07&|c+0#af5f00255&|o|d|e|>+0#00e0e07&|j+8#e000e06&|a|v|a|.|l+8&#ffd7d7255|a|n|g|.+8&#ffffff0|O|b|j|e|c|t|<+0#00e0e07&|/|c+0#af5f00255&|o|d|e|>+0#00e0e07&| +0#0000000&@6 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| +0#0000000&@67 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|a|n| |e|m|p|t|y| |s|t|r|i|n|g| |*|/@2| |N|o| |p|e|r|i|o|d| |f|o|r| |t|h|e| |a|b|o|v|e| |s|u|m@1|a|r|y|!| +0#0000000&@5 +@57|7|3|,|3|-|6| @7|6|5|%| diff --git a/runtime/syntax/testdir/dumps/java_comments_05.dump b/runtime/syntax/testdir/dumps/java_comments_05.dump index 53c7850806..85492d8a57 100644 --- a/runtime/syntax/testdir/dumps/java_comments_05.dump +++ b/runtime/syntax/testdir/dumps/java_comments_05.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |t+0#e000002&|o|S|t|r|i|n|g| +0#ffffff16#ff404010| +0#0000000#ffffff0@42 -@4|/+0#0000e05&@1| |@+0#0000000&|r|e|p|l|a|c|e| +0#0000e05&|s+0#00e0003&|u|b|s|t|r|i|n|g| +0#0000e05&|=| |'+0#e000002&|"@1|'| +0#0000e05&|r+0#00e0003&|e|p|l|a|c|e|m|e|n|t| +0#0000e05&|=| |"+0#e000002&|\|u|0@1|2@1|\|u|0@1|2@1|"| +0#0000000&@13 -@4|/+0#0000e05&@1| |@+0#0000000&|l|i|n|k| +0#0000e05&|r+0#00e0003&|e|g|e|x| +0#0000e05&|=| |'+0#e000002&|\|b|S|t|r|i|n|g|'| +0#0000e05&|t+0#00e0003&|a|r|g|e|t| +0#0000e05&|=| |j+0#e000002&|a|v|a|.|l|a|n|g|.|S|t|r|i|n|g| +0#0000e05&|t+0#00e0003&|y|p|e| +0#0000e05&|=| |l+0#e000002&|i|n|k|p|l|a|i|n| +0#0000e05& -|:| +0#0000000&@73 -@4|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&@1|;+0#0000000&| |}| @21 -@4>/+0#0000e05&@1| |@+0#0000000&|e|n|d| +0#ffffff16#ff404010| +0#0000000#ffffff0@62 -|}| @73 -|~+0#4040ff13&| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -| +0#0000000&@56|8|9|,|2|-|5| @7|B|o|t| +||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|a|n| |e|m|p|t|y| |s|t|r|i|n|g| |*|/@2| |N|o| |p|e|r|i|o|d| |f|o|r| |t|h|e| |a|b|o|v|e| |s|u|m@1|a|r|y|!| +0#0000000&@5 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&@1|;+0#0000000&| |}| @19 +| +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @71 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |j+0&#ffd7d7255|a|v|a|d|o|c| +0&#ffffff0|-@1|s|n|i|p@1|e|t|-|p|a|t|h| |.| |-@1|s|o|u|r|c|e|-|p|a|t|h| |.| |-|d| |/|t+0&#ffd7d7255|m|p|/+0&#ffffff0|d|o|c|s|/| |-|p|a|c|k|a|g|e| |\| +0#0000000&@4 +| +0#0000e05#a8a8a8255@1>/+0&#ffffff0@1| +0#ffffff16#ff404010| +0#0000e05#ffffff0|-|t|a|g| |'|j+0&#ffd7d7255|l|s|:+0&#ffffff0|a|:|S|e@1| |J|a|v|a| |L|a|n|g|u|a|g|e| |S|p|e|c|i|f|i|c|a|t|i|o|n|:|'| |S|n|i|p@1|e|t|s|.|j|a|v|a| +0#0000000&@9 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0|*@1| +8#e000e06&|S|n|i|p@1|e|t|s| |f|o|r| |c|o|m@1|e|n|t| |t|e|s|t|s|.| +0#0000e05&|*|/| +0#0000000&@38 +| +0#0000e05#a8a8a8255@1|c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|S|n|i|p@1|e|t|s| @58 +| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @2|/+0#0000001#ffff4012|*| +0#ffffff16#ff404010| +0#0000e05#ffffff0|T|R|A|I|L|I|N|G| |B|L|A|N|K|S| |A|N|D| |M+0&#ffd7d7255|E|S@1|P|I|L@1|I|N|G|S| +0&#ffffff0|A|R|E| |S|I|G|N|I|F|I|C|A|N|T|!| |*+0#0000001#ffff4012|/| +0#0000000#ffffff0@12 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|S|n|i|p@1|e|t|s|(|)| |{| |}| @46 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|T|h|e| |m|e|t|h|o|d| |{+0&&|@|c|o|d|e| |m|a|i|n|}| +8&&|m|u|s|t| |b|e| |d|e|c|l|a|r|e|d| |{+0&&|@|c|o|d|e| |p|u|b|l|i|c|}|,+8&&| |{+0&&|@|c|o|d|e| +0#0000000&@1 +||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |s|t|a|t|i|c|}|,+8&&| |a|n|d| |{+0&&|@|c|o|d|e| |v|o|i|d|}|.+8&&| +0#0000e05&@1|I|t| |m|u|s|t| |s|p|e|c|i|f|y| |a| |f|o|r|m|a|l| |p|a|r|a|m|e|t|e|r| +0#0000000&@3 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |w|h|o|s|e| |d|e|c|l|a|r|e|d| |t|y|p|e| |i|s| |a|r@1|a|y| |o|f| |{+0#e000e06&|@|l|i|n|k| |S|t|r|i|n|g|}|.+0#0000e05&| @1|T|h|e|r|e|f|o|r|e|,| +0#0000000&@6 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |<+0#00e0e07&|e+0#af5f00255&|m|>+0#00e0e07&|e+0#0000000&|i|t|h|e|r|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&| +0#0000e05&|o|f| |t|h|e| |f|o|l@1|o|w|i|n|g| |d|e|c|l|a|r|a|t|i|o|n|s| |i|s| |a|c@1|e|p|t|a|b|l|e|:| +0#0000000&@5 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| +0#ffffff16#ff404010| +0#0000e05#ffffff0|{+0#e000e06&|@|s|n|i|p@1|e|t| |l+0#00e0003&|a|n|g|=+0#e000e06&|"+0#e000002&|j|a|v|a|"|:+0#e000e06&| +0#0000000&@42 +||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |/@1| |@+0#0000000&|h|i|g|h|l|i|g|h|t| +0#e000e06&|s+0#00e0003&|u|b|s|t|r|i|n|g|=+0#e000e06&|"+0#e000002&|m|a|i|n|"| +0#e000e06&|t+0#00e0003&|y|p|e|=+0#e000e06&|"+0#e000002&|i|t|a|l|i|c|"|:+0#e000e06&| +0#0000000&@20 +||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| +0#0000000&@23 +||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |}|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>|<|p+0#af5f00255&|r|e| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|s|n|i|p@1|e|t|"|>+0#00e0e07&| +0#0000000&@37 +@57|9|1|,|1| @9|8|2|%| diff --git a/runtime/syntax/testdir/dumps/java_comments_06.dump b/runtime/syntax/testdir/dumps/java_comments_06.dump new file mode 100644 index 0000000000..84336a33b4 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_comments_06.dump @@ -0,0 +1,20 @@ +||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |}|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>|<|p+0#af5f00255&|r|e| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|s|n|i|p@1|e|t|"|>+0#00e0e07&| +0#0000000&@37 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*|{+0#e000e06&|@|c|o|d|e| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|.@2| |a|r|g|s|)| |{| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|r|e|>+0#00e0e07&| +0#0000000&@9 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| +0#0000000&@66 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |@+0#e000e06&|p|a|r|a|m| |a+0#00e0e07&|r|g|s| +0#0000e05&|o|p|t|i|o|n|a|l| |c+0&#ffd7d7255|o|m@1|a|n|d|e|-+0&#ffffff0|l|i|n|e| |a|r|g|u|m|e|n|t|s| +0#ffffff16#ff404010| +0#0000000#ffffff0@20 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |@|j+0&#ffd7d7255|l|s| +0&#ffffff0|1|2|.|1|.|4| |I|n|v|o|k|e| |{+0#e000e06&|@|c|o|d|e| |T|e|s|t|.|m|a|i|n|}| +0#0000e05&|*|/| +0#0000000&@26 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3>/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |m+0#e000002&|a|i|n| +0#ffffff16#ff404010@4| +0#0000000#ffffff0@40 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|l|i|n|k| +0#0000e05&|s+0#00e0003&|u|b|s|t|r|i|n|g| +0#0000e05&|=| |'+0#e000002&|S|t|r|i|n|g|'| +0#0000e05&|t+0#00e0003&|a|r|g|e|t| +0#0000e05&|=| |'+0#e000002&|j|a|v|a|.|l|a|n|g|.|S|t|r|i|n|g|'| +0#0000e05&|:| +0#0000000&@9 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|p+0#00e0003&|u|b|l|i|c| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| @26 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|e|n|d| +0#ffffff16#ff404010| +0#0000000#ffffff0@60 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| |{+8#e000e06&|@+0&&|r|e|t|u|r|n| +8&&|a|n| |e|m|p|t|y| |s|t|r|i|n|g|}| +0#0000000&@39 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |@+0#e000e06&|s|e@1| +0#0000e05&|<+0#00e0e07&|a+0#af5f00255&| +0#00e0e07&|h+0#00e0003&|r|e|f|=+0#00e0e07&|"+0#e000002&|h|t@1|p|s|:|/@1|d|o|c|s|.|o|r|a|c|l|e|.|c|o|m|/|j|a|v|a|s|e|/|s|p|e|c|s|/|j|l|s|/|s|e|2|1|/|h|t|m|l|/|j +||+0#0000e05#a8a8a8255| |l+0#e000002#ffffff0|s|-|3|.|h|t|m|l|#|j|l|s|-|3|.|1|0|.|5|"|>+0#00e0e07&|3+8#e000e06&|.|1|0|.|5| |S|t|r|i|n|g| |L|i|t|e|r|a|l|s|<+0#00e0e07&|/|a+0#af5f00255&|>+0#00e0e07&| +0#0000000&@24 +||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |@+0#e000e06&|s|e@1| +0#0000e05&|j+0#00e0e07&|a|v|a|.|b|a|s|e|/|j|a|v|a|.|l|a|n|g|.|O|b|j|e|c|t|#|t|o|S|t|r|i|n|g|(|)| +0#0000e05&|*|/| +0#0000000&@20 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |t+0#e000002&|o|S|t|r|i|n|g| +0#ffffff16#ff404010| +0#0000000#ffffff0@40 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|r|e|p|l|a|c|e| +0#0000e05&|s+0#00e0003&|u|b|s|t|r|i|n|g| +0#0000e05&|=| |'+0#e000002&|"@1|'| +0#0000e05&|r+0#00e0003&|e|p|l|a|c|e|m|e|n|t| +0#0000e05&|=| |"+0#e000002&|\|u|0@1|2@1|\|u|0@1|2@1|"| +0#0000000&@11 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|l|i|n|k| +0#0000e05&|r+0#00e0003&|e|g|e|x| +0#0000e05&|=| |'+0#e000002&|\|b|S|t|r|i|n|g|'| +0#0000e05&|t+0#00e0003&|a|r|g|e|t| +0#0000e05&|=| |j+0#e000002&|a|v|a|.|l|a|n|g|.|S|t|r|i|n|g| +0#0000e05&|t+0#00e0003&|y|p|e| +0#0000e05&|=| |l+0#e000002&|i|n|k|p|l|a|i +| +0#0000e05#a8a8a8255@1|n+0#e000002#ffffff0| +0#0000e05&|:| +0#0000000&@69 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&@1|;+0#0000000&| |}| @19 +@57|1|0|9|,|2|-|5| @6|9|8|%| diff --git a/runtime/syntax/testdir/dumps/java_comments_07.dump b/runtime/syntax/testdir/dumps/java_comments_07.dump new file mode 100644 index 0000000000..f83433e750 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_comments_07.dump @@ -0,0 +1,20 @@ +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&@1|;+0#0000000&| |}| @19 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|e|n|d| +0#ffffff16#ff404010| +0#0000000#ffffff0@60 +| +0#0000e05#a8a8a8255@1>}+0#0000000#ffffff0| @71 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|2@1|,|1| @8|B|o|t| diff --git a/runtime/syntax/testdir/dumps/java_module_info_00.dump b/runtime/syntax/testdir/dumps/java_module_info_00.dump new file mode 100644 index 0000000000..a80da8932f --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_module_info_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |T|h|i|s| |m|o|d|u|l|e| |d|e|c|l|a|r|a|t|i|o|n| |b|e|l|o|n|g|s| |t|o| |t|h|e| |s|a|m|p|l|e| |p|r|o|j|e|c|t| |p|u|b|l|i|s|h|e|d| |a|t| +0#0000000&@5 +|/+0#0000e05&@1| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|z@2|y|x|w|v|u|t|/|m|o|d|u|l|e|-|i|n|f|o|.|g|i|t| |.| +0#0000000&@25 +@75 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|S|e|r|v|i|c|e|L|o|a|d|e|r|;| @43 +@75 +|/+0#0000e05&|*@1| +0#0000000&@71 +| +0#0000e05&|*| +0#e000e06&|D|e|f|i|n|e|s| |d|e|m|o| |r|e|l|a|t|e|d| |s|u|p@1|o|r|t|.| +0#0000000&@42 +| +0#0000e05&|*| +0#0000000&@72 +| +0#0000e05&|*| |N|o|t|e| |t|h|a|t| |t|h|e| |{+0#e000e06&|@|c|o|d|e| |T|e|s|t|a|b|l|e|}| +0#0000e05&|s|e|r|v|i|c|e| |i|s| |n|o|t| |e|x|p|o|r|t|e|d|.| +0#0000000&@16 +| +0#0000e05&|*| +0#0000000&@72 +| +0#0000e05&|*| |@+0#e000e06&|u|s|e|s| |o+0#00e0e07&|r|g|.|d|e|m|o|.|i|n|t|e|r|n|a|l|.|T|e|s|t|a|b|l|e| +0#0000000&@39 +| +0#0000e05&|*| |@+0#e000e06&|p|r|o|v|i|d|e|s| |o+0#00e0e07&|r|g|.|d|e|m|o|.|i|n|t|e|r|n|a|l|.|T|e|s|t|a|b|l|e| +0#0000000&@35 +| +0#0000e05&|*| |@+0#e000e06&|s|e@1| +0#0000e05&|S+0#00e0e07&|e|r|v|i|c|e|L|o|a|d|e|r| +0#0000000&@53 +| +0#0000e05&|*|/| +0#0000000&@71 +|m+0#00e0003&|o|d|u|l|e| +0#0000000&|o|r|g|.|m+0#00e0003&|o|d|u|l|e|.+0#0000000&|i|n|f|o|.|d|e|m|o| @47 +|{| @73 +@4|r+0#af5f00255&|e|q|u|i|r|e|s| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|j|d|k|.|j|f|r|;| @46 +@4|r+0#af5f00255&|e|q|u|i|r|e|s| +0#0000000&|j|a|v|a|.|b|a|s|e|;| @51 +@4|r+0#af5f00255&|e|q|u|i|r|e|s| +0#0000000&|t+0#00e0003&|r|a|n|s|i|t|i|v|e| +0#0000000&|j|a|v|a|.|l|o|g@1|i|n|g|;| @37 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/java_module_info_01.dump b/runtime/syntax/testdir/dumps/java_module_info_01.dump new file mode 100644 index 0000000000..793cb89336 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_module_info_01.dump @@ -0,0 +1,20 @@ +| +0#0000e05#ffffff0|*|/| +0#0000000&@71 +|m+0#00e0003&|o|d|u|l|e| +0#0000000&|o|r|g|.|m+0#00e0003&|o|d|u|l|e|.+0#0000000&|i|n|f|o|.|d|e|m|o| @47 +|{| @73 +@4|r+0#af5f00255&|e|q|u|i|r|e|s| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|j|d|k|.|j|f|r|;| @46 +@4|r+0#af5f00255&|e|q|u|i|r|e|s| +0#0000000&|j|a|v|a|.|b|a|s|e|;| @51 +@4>r+0#af5f00255&|e|q|u|i|r|e|s| +0#0000000&|t+0#00e0003&|r|a|n|s|i|t|i|v|e| +0#0000000&|j|a|v|a|.|l|o|g@1|i|n|g|;| @37 +@4|r+0#af5f00255&|e|q|u|i|r|e|s| +0#0000000&|t+0#00e0003&|r|a|n|s|i|t|i|v|e| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|o|r|g|.|m+0#00e0003&|o|d|u|l|e|.+0#0000000&|i|n|f|o|.|t|e|s|t|e|r|;| @20 +@75 +@4|e+0#af5f00255&|x|p|o|r|t|s| +0#0000000&|o|r|g|.|d|e|m|o|;| @53 +@4|e+0#af5f00255&|x|p|o|r|t|s| +0#0000000&|o|r|g|.|d|e|m|o|.|i|n|t|e|r|n|a|l| |t+0#e000e06&|o| +0#0000000&@42 +@8|o|r|g|.|m+0#00e0003&|o|d|u|l|e|.+0#0000000&|i|n|f|o|.|d|e|m|o|;| @45 +@75 +@4|o+0#af5f00255&|p|e|n|s| +0#0000000&|o|r|g|.|d|e|m|o|.|i|n|t|e|r|n|a|l| |t+0#e000e06&|o| +0#0000000&@44 +@8|o|r|g|.|m+0#00e0003&|o|d|u|l|e|.+0#0000000&|i|n|f|o|.|d|e|m|o|;| @45 +@4|o+0#af5f00255&|p|e|n|s| +0#0000000&|o|r|g|.|d|e|m|o|.|t|e|s|t|s| |t+0#e000e06&|o| +0#0000000&@47 +@8|o|r|g|.|m+0#00e0003&|o|d|u|l|e|.+0#0000000&|i|n|f|o|.|d|e|m|o|,| |o|r|g|.|m+0#00e0003&|o|d|u|l|e|.+0#0000000&|i|n|f|o|.|t|e|s|t|e|r|;| @21 +@75 +@4|u+0#af5f00255&|s|e|s| +0#0000000&|o|r|g|.|d|e|m|o|.|i|n|t|e|r|n|a|l|.|T|e|s|t|a|b|l|e|;| @38 +@75 +@57|1|9|,|2|-|5| @7|8|1|%| diff --git a/runtime/syntax/testdir/dumps/java_module_info_02.dump b/runtime/syntax/testdir/dumps/java_module_info_02.dump new file mode 100644 index 0000000000..cc258a9224 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_module_info_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +@4|p+0#af5f00255&|r|o|v|i|d|e|s| +0#0000000&|o|r|g|.|d|e|m|o|.|i|n|t|e|r|n|a|l|.|T|e|s|t|a|b|l|e| |w+0#e000e06&|i|t|h| +0#0000000&@30 +@8|o|r|g|.|d|e|m|o|.|t|e|s|t|s|.|A|r|i|t|h|m|e|t|i|c|O|p|e|r|a|t|i|o|n|T|e|s|t|s|;| @26 +>}| @73 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|3|5|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/input/java_comments.java b/runtime/syntax/testdir/input/java_comments.java index 3c1a8a2e32..35f6f7d50d 100644 --- a/runtime/syntax/testdir/input/java_comments.java +++ b/runtime/syntax/testdir/input/java_comments.java @@ -1,7 +1,19 @@ -// VIM_TEST_SETUP unlet! g:java_ignore_javadoc g:java_no_trail_space_error -// VIM_TEST_SETUP unlet! g:java_no_tab_space_error -// VIM_TEST_SETUP let [g:java_space_errors,g:java_comment_strings] = [1,1] -// VIM_TEST_SETUP setlocal spell | highlight link javaCommentStart Todo +// VIM_TEST_SETUP unlet! g:java_no_tab_space_error g:java_ignore_javadoc +// VIM_TEST_SETUP unlet! g:java_no_trail_space_error +// VIM_TEST_SETUP let [g:java_space_errors,g:java_comment_strings]=[1,1] + + + + + + + +// VIM_TEST_SETUP setlocal spell fdc=2 fdl=64 fdm=syntax fen +// VIM_TEST_SETUP highlight link javaCommentStart Todo +// VIM_TEST_SETUP highlight link javaCommentTitle Underlined + + + @@ -11,8 +23,10 @@ * {@snippet file = Snippets.java region = main id = _01} *

There is no textual representation: * {@snippet class = Snippets region = toString id = _02} */ -class CommentsTests +class CommentsTests implements Comparable { + private CommentsTests() { } + /** No-op, i. e. no operation. * ({@literal@literal} may be used with {@code .} for contraction.) * @return {@code null} */ @@ -49,6 +63,22 @@ class CommentsTests /** {@return {@code null}, with no-op, i.e. no operation} . . */ Void noOp9() { return null; } + /** {@return the major Java version} @hidden */ + protected int majorVersion() { return 21; } + + /** {@summary Compares this instance with the passed {@code that} + * instance for order by invoking {@link Integer#compare(int, int) + * compare} and passing it {@code this.majorVersion()} and + * {@code that.majorVersion()} as respective @arguments.} + * + * {@inheritDoc} */ + @Override public int compareTo(CommentsTests that) + { + java.util.Objects.requireNonNull(that, "that"); + return Integer.compare(this.majorVersion(), + that.majorVersion()); + } + /** Returns an empty string for an @Override annotated method * (see Chapter 9.6.4.4 {@literal @Override} in a Java Language * Specification) overridden from java.lang.Object @@ -57,15 +87,17 @@ class CommentsTests @Override public String toString() { return ""; } } -// javadoc --snippet-path . --source-path . -d /tmp/doc/ -package \ +// javadoc --snippet-path . --source-path . -d /tmp/docs/ -package \ // -tag 'jls:a:See Java Language Specification:' Snippets.java /** Snippets for comment tests. */ class Snippets { /* TRAILING BLANKS AND MESSPILLINGS ARE SIGNIFICANT! */ + private Snippets() { } + /** The method {@code main} must be declared {@code public}, {@code * static}, and {@code void}. It must specify a formal parameter * whose declared type is array of {@link String}. Therefore, - * either of the following declarations is acceptable: + * either of the following declarations is acceptable: * {@snippet lang="java": * // @highlight substring="main" type="italic": * public static void main(String[] args) { } @@ -79,9 +111,9 @@ class Snippets public static void main(String[] args) { } // @end - /** {@return an empty string} + /** {@return an empty string} * @see 3.10.5 String Literals - * @see Object#toString() */ + * @see java.base/java.lang.Object#toString() */ // @start region = toString // @replace substring = '""' replacement = "\u0022\u0022" // @link regex = '\bString' target = java.lang.String type = linkplain : diff --git a/runtime/syntax/testdir/input/java_module_info.java b/runtime/syntax/testdir/input/java_module_info.java new file mode 100644 index 0000000000..bfbea93a2e --- /dev/null +++ b/runtime/syntax/testdir/input/java_module_info.java @@ -0,0 +1,35 @@ +// This module declaration belongs to the sample project published at +// https://github.com/zzzyxwvut/module-info.git . + +import java.util.ServiceLoader; + +/** + * Defines demo related support. + * + * Note that the {@code Testable} service is not exported. + * + * @uses org.demo.internal.Testable + * @provides org.demo.internal.Testable + * @see ServiceLoader + */ +module org.module.info.demo +{ + requires static jdk.jfr; + requires java.base; + requires transitive java.logging; + requires transitive static org.module.info.tester; + + exports org.demo; + exports org.demo.internal to + org.module.info.demo; + + opens org.demo.internal to + org.module.info.demo; + opens org.demo.tests to + org.module.info.demo, org.module.info.tester; + + uses org.demo.internal.Testable; + + provides org.demo.internal.Testable with + org.demo.tests.ArithmeticOperationTests; +} diff --git a/runtime/syntax/testdir/input/setup/java_module_info.vim b/runtime/syntax/testdir/input/setup/java_module_info.vim new file mode 100644 index 0000000000..2711c1a9a0 --- /dev/null +++ b/runtime/syntax/testdir/input/setup/java_module_info.vim @@ -0,0 +1,30 @@ +vim9script + +# Test filenames are required to begin with the filetype name prefix, +# whereas the name of a Java module declaration must be "module-info". +const name_a: string = 'input/java_module_info.java' +const name_b: string = 'input/module-info.java' + +def ChangeFilename() + exec 'saveas! ' .. name_b +enddef + +def RestoreFilename() + exec 'saveas! ' .. name_a + delete(name_b) +enddef + +autocmd_add([{ + replace: true, + group: 'java_syntax_tests', + event: 'BufEnter', + pattern: name_a, + cmd: 'ChangeFilename()', + once: true, +}, { + group: 'java_syntax_tests', + event: ['BufLeave', 'ExitPre'], + pattern: name_b, + cmd: 'RestoreFilename()', + once: true, +}]) From 077d1d2cff20daec6f1efd504ef27fc09b927799 Mon Sep 17 00:00:00 2001 From: Konfekt Date: Tue, 10 Sep 2024 21:06:22 +0200 Subject: [PATCH 10/15] runtime(make): add compiler/make.vim to reset compiler plugin settings closes: #15645 Co-authored-by: K.Takata Signed-off-by: Konfekt Signed-off-by: Christian Brabandt --- runtime/compiler/README.txt | 2 ++ runtime/compiler/make.vim | 13 +++++++++++++ runtime/doc/quickfix.txt | 11 ++++++++--- runtime/doc/tags | 1 + 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 runtime/compiler/make.vim diff --git a/runtime/compiler/README.txt b/runtime/compiler/README.txt index dccf4a9762..327d0a7fde 100644 --- a/runtime/compiler/README.txt +++ b/runtime/compiler/README.txt @@ -4,6 +4,8 @@ They are used with the ":compiler" command. These scripts usually set options, for example 'errorformat'. See ":help write-compiler-plugin". +To undo the effect of a compiler plugin, use the make compiler plugin. + If you want to write your own compiler plugin, have a look at the other files for how to do it, the format is simple. diff --git a/runtime/compiler/make.vim b/runtime/compiler/make.vim new file mode 100644 index 0000000000..748251bf8e --- /dev/null +++ b/runtime/compiler/make.vim @@ -0,0 +1,13 @@ +" Vim compiler plugin +" +" Maintainer: The Vim Project +" Last Change: 2024 Sep 10 +" Original Author: Konfekt +" +" This compiler plugin is used to reset previously set compiler options. + +if exists("g:current_compiler") | unlet g:current_compiler | endif +if exists("b:current_compiler") | unlet b:current_compiler | endif + +CompilerSet makeprg& +CompilerSet errorformat& diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 6942a584b5..ea5f01d25e 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2024 Sep 09 +*quickfix.txt* For Vim version 9.1. Last change: 2024 Sep 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1276,6 +1276,7 @@ not "b:current_compiler". What the command actually does is the following: For writing a compiler plugin, see |write-compiler-plugin|. +Use the |compiler-make| plugin to undo the effect of a compiler plugin. DOTNET *compiler-dotnet* @@ -1291,7 +1292,6 @@ Example: limit output to only display errors, and suppress the project name: > let dotnet_show_project_file = v:false compiler dotnet < - GCC *quickfix-gcc* *compiler-gcc* There's one variable you can set for the GCC compiler: @@ -1302,7 +1302,6 @@ g:compiler_gcc_ignore_unmatched_lines commands run from make are generating false positives. - JAVAC *compiler-javac* Commonly used compiler options can be added to 'makeprg' by setting the @@ -1310,6 +1309,12 @@ g:javac_makeprg_params variable. For example: > let g:javac_makeprg_params = "-Xlint:all -encoding utf-8" < +GNU MAKE *compiler-make* + +Since the default make program is "make", the compiler plugin for make, +:compiler make, will reset the 'makeprg' and 'errorformat' option to +the default values and unlet any variables that may have been set by a +previous compiler plugin. MANX AZTEC C *quickfix-manx* *compiler-manx* diff --git a/runtime/doc/tags b/runtime/doc/tags index 77c02a8649..dd5a0a6894 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6548,6 +6548,7 @@ compiler-gnat ft_ada.txt /*compiler-gnat* compiler-groff quickfix.txt /*compiler-groff* compiler-hpada ft_ada.txt /*compiler-hpada* compiler-javac quickfix.txt /*compiler-javac* +compiler-make quickfix.txt /*compiler-make* compiler-manx quickfix.txt /*compiler-manx* compiler-pandoc quickfix.txt /*compiler-pandoc* compiler-perl quickfix.txt /*compiler-perl* From 95dacbb5fd53f76a7e369c554aaa02e86b81eca8 Mon Sep 17 00:00:00 2001 From: John Marriott Date: Tue, 10 Sep 2024 21:25:14 +0200 Subject: [PATCH 11/15] patch 9.1.0727: too many strlen() calls in option.c Problem: too many strlen() calls in option.c Solution: refactor the code to reduce the number of strlen() calls (John Marriott) closes: #15604 Signed-off-by: John Marriott Signed-off-by: Christian Brabandt --- src/option.c | 152 ++++++++++++++++++++++++++++++++------------------ src/version.c | 2 + 2 files changed, 100 insertions(+), 54 deletions(-) diff --git a/src/option.c b/src/option.c index 185a92869b..4ee8d251db 100644 --- a/src/option.c +++ b/src/option.c @@ -41,7 +41,7 @@ static void set_options_default(int opt_flags); static void set_string_default_esc(char *name, char_u *val, int escape); -static char_u *find_dup_item(char_u *origval, char_u *newval, long_u flags); +static char_u *find_dup_item(char_u *origval, char_u *newval, size_t newvallen, long_u flags); static char_u *option_expand(int opt_idx, char_u *val); static void didset_options(void); static void didset_options2(void); @@ -132,51 +132,72 @@ set_init_default_shell(void) set_init_default_backupskip(void) { int opt_idx; - long_u n; + int i; char_u *p; + int plen; #ifdef UNIX static char *(names[4]) = {"", "TMPDIR", "TEMP", "TMP"}; #else static char *(names[3]) = {"TMPDIR", "TEMP", "TMP"}; #endif - int len; garray_T ga; - char_u *item; opt_idx = findoption((char_u *)"backupskip"); ga_init2(&ga, 1, 100); - for (n = 0; n < (long)ARRAY_LENGTH(names); ++n) + for (i = 0; i < (int)ARRAY_LENGTH(names); ++i) { int mustfree = FALSE; #ifdef UNIX - if (*names[n] == NUL) + if (*names[i] == NUL) + { # ifdef MACOS_X p = (char_u *)"/private/tmp"; + plen = (int)STRLEN_LITERAL("/private/tmp"); # else - p = (char_u *)"/tmp"; + p = (char_u *)"/tmp"; + plen = (int)STRLEN_LITERAL("/tmp"); # endif + } else #endif - p = vim_getenv((char_u *)names[n], &mustfree); + { + p = vim_getenv((char_u *)names[i], &mustfree); + plen = 0; // will be calculated below + } if (p != NULL && *p != NUL) { - // First time count the NUL, otherwise count the ','. - len = (int)STRLEN(p) + 3; - item = alloc(len); + char_u *item; + size_t itemsize; + int has_trailing_path_sep = FALSE; + + if (plen == 0) + { + // the value was retrieved from the environment + plen = (int)STRLEN(p); + // does the value include a trailing path separator? + if (after_pathsep(p, p + plen)) + has_trailing_path_sep = TRUE; + } + + // item size needs to be large enough to include "/*" and a trailing NUL + // note: the value (and therefore plen) may already include a path separator + itemsize = plen + (has_trailing_path_sep ? 0 : 1) + 2; + item = alloc(itemsize); if (item != NULL) { - STRCPY(item, p); - add_pathsep(item); - STRCAT(item, "*"); - if (find_dup_item(ga.ga_data, item, options[opt_idx].flags) - == NULL - && ga_grow(&ga, len) == OK) + // add a preceeding comma as a separator after the first item + size_t itemseplen = (ga.ga_len == 0) ? 0 : 1; + size_t itemlen; + + itemlen = vim_snprintf((char *)item, itemsize, "%s%s*", p, (has_trailing_path_sep) ? "" : PATHSEPSTR); + + if (find_dup_item(ga.ga_data, item, itemlen, options[opt_idx].flags) == NULL + && ga_grow(&ga, itemseplen + itemlen + 1) == OK) { - if (ga.ga_len > 0) - STRCAT(ga.ga_data, ","); - STRCAT(ga.ga_data, item); - ga.ga_len += len; + ga.ga_len += vim_snprintf((char *)ga.ga_data + ga.ga_len, + itemseplen + itemlen + 1, + "%s%s", (itemseplen > 0) ? "," : "", item); } vim_free(item); } @@ -524,7 +545,7 @@ set_init_default_encoding(void) // MS-Windows has builtin support for conversion to and from Unicode, using // "utf-8" for 'encoding' should work best for most users. // z/OS built should default to UTF-8 mode as setlocale does not respect utf-8 environment variable locales - p = vim_strsave((char_u *)ENC_DFLT); + p = vim_strnsave((char_u *)ENC_DFLT, STRLEN_LITERAL(ENC_DFLT)); # else // enc_locale() will try to find the encoding of the current locale. // This works best for properly configured systems, old and new. @@ -542,7 +563,7 @@ set_init_default_encoding(void) // We don't support "gb18030", but "cp936" is a good substitute // for practical purposes, thus use that. It's not an alias to // still support conversion between gb18030 and utf-8. - p_enc = vim_strsave((char_u *)"cp936"); + p_enc = vim_strnsave((char_u *)"cp936", STRLEN_LITERAL("cp936")); vim_free(p); } if (mb_init() == NULL) @@ -584,14 +605,15 @@ set_init_default_encoding(void) GetACP() != GetConsoleCP()) { char buf[50]; + size_t buflen; // Win32 console: In ConPTY, GetConsoleCP() returns zero. // Use an alternative value. if (GetConsoleCP() == 0) - sprintf(buf, "cp%ld", (long)GetACP()); + buflen = vim_snprintf(buf, sizeof(buf), "cp%ld", (long)GetACP()); else - sprintf(buf, "cp%ld", (long)GetConsoleCP()); - p_tenc = vim_strsave((char_u *)buf); + buflen = vim_snprintf(buf, sizeof(buf), "cp%ld", (long)GetConsoleCP()); + p_tenc = vim_strnsave((char_u *)buf, buflen); if (p_tenc != NULL) { opt_idx = findoption((char_u *)"termencoding"); @@ -885,25 +907,23 @@ set_string_default(char *name, char_u *val) * "origval". Return NULL if not found. */ static char_u * -find_dup_item(char_u *origval, char_u *newval, long_u flags) +find_dup_item(char_u *origval, char_u *newval, size_t newvallen, long_u flags) { int bs = 0; - size_t newlen; char_u *s; if (origval == NULL) return NULL; - newlen = STRLEN(newval); for (s = origval; *s != NUL; ++s) { if ((!(flags & P_COMMA) || s == origval || (s[-1] == ',' && !(bs & 1))) - && STRNCMP(s, newval, newlen) == 0 + && STRNCMP(s, newval, newvallen) == 0 && (!(flags & P_COMMA) - || s[newlen] == ',' - || s[newlen] == NUL)) + || s[newvallen] == ',' + || s[newvallen] == NUL)) return s; // Count backslashes. Only a comma with an even number of backslashes // or a single backslash preceded by a comma before it is recognized as @@ -1289,28 +1309,34 @@ set_init_3(void) set_helplang_default(char_u *lang) { int idx; + size_t langlen; - if (lang == NULL || STRLEN(lang) < 2) // safety check + if (lang == NULL) // safety check return; + + langlen = STRLEN(lang); + if (langlen < 2) // safety check + return; + idx = findoption((char_u *)"hlg"); if (idx < 0 || (options[idx].flags & P_WAS_SET)) return; if (options[idx].flags & P_ALLOCED) free_string_option(p_hlg); - p_hlg = vim_strsave(lang); + p_hlg = vim_strnsave(lang, langlen); if (p_hlg == NULL) p_hlg = empty_option; else { // zh_CN becomes "cn", zh_TW becomes "tw" - if (STRNICMP(p_hlg, "zh_", 3) == 0 && STRLEN(p_hlg) >= 5) + if (STRNICMP(p_hlg, "zh_", 3) == 0 && langlen >= 5) { p_hlg[0] = TOLOWER_ASC(p_hlg[3]); p_hlg[1] = TOLOWER_ASC(p_hlg[4]); } // any C like setting, such as C.UTF-8, becomes "en" - else if (STRLEN(p_hlg) >= 1 && *p_hlg == 'C') + else if (langlen >= 1 && *p_hlg == 'C') { p_hlg[0] = 'e'; p_hlg[1] = 'n'; @@ -1625,13 +1651,13 @@ opt_backspace_nr2str( *(char_u **)varp = empty_option; break; case 1: - *(char_u **)varp = vim_strsave((char_u *)"indent,eol"); + *(char_u **)varp = vim_strnsave((char_u *)"indent,eol", STRLEN_LITERAL("indent,eol")); break; case 2: - *(char_u **)varp = vim_strsave((char_u *)"indent,eol,start"); + *(char_u **)varp = vim_strnsave((char_u *)"indent,eol,start", STRLEN_LITERAL("indent,eol,start")); break; case 3: - *(char_u **)varp = vim_strsave((char_u *)"indent,eol,nostop"); + *(char_u **)varp = vim_strnsave((char_u *)"indent,eol,nostop", STRLEN_LITERAL("indent,eol,nostop")); break; } vim_free(*oldval_p); @@ -1652,20 +1678,37 @@ opt_backspace_nr2str( static char_u * opt_whichwrap_nr2str(char_u **argp, char_u *whichwrap) { + size_t len = 0; + *whichwrap = NUL; int i = getdigits(argp); if (i & 1) - STRCAT(whichwrap, "b,"); + { + STRCPY(whichwrap, "b,"); + len += 2; + } if (i & 2) - STRCAT(whichwrap, "s,"); + { + STRCPY(whichwrap + len, "s,"); + len += 2; + } if (i & 4) - STRCAT(whichwrap, "h,l,"); + { + STRCPY(whichwrap + len, "h,l,"); + len += 4; + } if (i & 8) - STRCAT(whichwrap, "<,>,"); + { + STRCPY(whichwrap + len, "<,>,"); + len += 4; + } if (i & 16) - STRCAT(whichwrap, "[,],"); + { + STRCPY(whichwrap + len, "[,],"); + len += 4; + } if (*whichwrap != NUL) // remove trailing , - whichwrap[STRLEN(whichwrap) - 1] = NUL; + whichwrap[len - 1] = NUL; return whichwrap; } @@ -1952,7 +1995,7 @@ stropt_get_newval( if (op == OP_REMOVING || (flags & P_NODUP)) { len = (int)STRLEN(newval); - s = find_dup_item(origval, newval, flags); + s = find_dup_item(origval, newval, len, flags); // do not add if already there if ((op == OP_ADDING || op == OP_PREPENDING) && s != NULL) @@ -2680,12 +2723,11 @@ do_set( if (errmsg != NULL) { - vim_strncpy(IObuff, (char_u *)_(errmsg), IOSIZE - 1); - i = (int)STRLEN(IObuff) + 2; + i = vim_snprintf((char *)IObuff, IOSIZE, "%s", (char_u *)_(errmsg)) + 2; if (i + (arg - startarg) < IOSIZE) { // append the argument with the error - STRCAT(IObuff, ": "); + STRCPY(IObuff + i - 2, ": "); mch_memmove(IObuff + i, startarg, (arg - startarg)); IObuff[i + (arg - startarg)] = NUL; } @@ -5100,7 +5142,7 @@ get_option_value( // never return the value of the crypt key else if ((char_u **)varp == &curbuf->b_p_key && **(char_u **)(varp) != NUL) - *stringval = vim_strsave((char_u *)"*****"); + *stringval = vim_strnsave((char_u *)"*****", STRLEN_LITERAL("*****")); #endif else *stringval = vim_strsave(*(char_u **)(varp)); @@ -7334,6 +7376,7 @@ set_context_in_set_cmd( char_u *s; int is_term_option = FALSE; int key; + char_u *argend; expand_option_flags = opt_flags; @@ -7343,7 +7386,8 @@ set_context_in_set_cmd( xp->xp_pattern = arg; return; } - p = arg + STRLEN(arg) - 1; + argend = arg + STRLEN(arg); + p = argend - 1; if (*p == ' ' && *(p - 1) != '\\') { xp->xp_pattern = p + 1; @@ -7560,7 +7604,7 @@ set_context_in_set_cmd( // delimited by space. if ((flags & P_EXPAND) || (flags & P_COMMA) || (flags & P_COLON)) { - for (p = arg + STRLEN(arg) - 1; p >= xp->xp_pattern; --p) + for (p = argend - 1; p >= xp->xp_pattern; --p) { // count number of backslashes before ' ' or ',' or ':' if (*p == ' ' || *p == ',' || @@ -7587,7 +7631,7 @@ set_context_in_set_cmd( // An option that is a list of single-character flags should always start // at the end as we don't complete words. if (flags & P_FLAGLIST) - xp->xp_pattern = arg + STRLEN(arg); + xp->xp_pattern = argend; // Some options can either be using file/dir expansions, or custom value // expansion depending on what the user typed. Unfortunately we have to @@ -8106,7 +8150,7 @@ ExpandSettingSubtract( int count = 0; char_u *p; - p = vim_strsave(option_val); + p = vim_strnsave(option_val, num_flags); if (p == NULL) { VIM_CLEAR(*matches); diff --git a/src/version.c b/src/version.c index 62f8bcb30b..782f4318f0 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 727, /**/ 726, /**/ From 2241f0845fcb2ff362f34abd756cedf239e50b55 Mon Sep 17 00:00:00 2001 From: fundawang Date: Tue, 10 Sep 2024 21:31:49 +0200 Subject: [PATCH 12/15] runtime(spec): add file triggers to syntax script closes: #15569 Signed-off-by: Christian Brabandt --- runtime/syntax/spec.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim index 4cb3a343eb..730a0b8cc5 100644 --- a/runtime/syntax/spec.vim +++ b/runtime/syntax/spec.vim @@ -4,6 +4,7 @@ " Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com " Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014) " Last Change: 2020 May 25 +" 2024 Sep 10 by Vim Project: add file triggers support, #15569 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -111,7 +112,7 @@ syn region specDescriptionArea matchgroup=specSection start='^%description' end= syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment "%% Scripts Section %% -syn region specScriptArea matchgroup=specSection start='^%\(prep\|generate_buildrequires\|conf\|build\|install\|clean\|check\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 +syn region specScriptArea matchgroup=specSection start='^%\(prep\|generate_buildrequires\|conf\|build\|install\|clean\|check\|pre\|postun\|preun\|post\|posttrans\|filetriggerin\|filetriggerun\|filetriggerpostun\|transfiletriggerin\|transfiletriggerun\|transfiletriggerpostun\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 "%% Changelog Section %% syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense From e40157641c1ddb9cc805c04ca23fb80a6382a349 Mon Sep 17 00:00:00 2001 From: fundawang Date: Tue, 10 Sep 2024 21:43:05 +0200 Subject: [PATCH 13/15] runtime(spec): Recognize epoch when making spec changelog in ftplugin closes: #15537 Signed-off-by: fundawang Signed-off-by: Christian Brabandt --- runtime/ftplugin/spec.vim | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim index 9040e19ce1..fa125be52c 100644 --- a/runtime/ftplugin/spec.vim +++ b/runtime/ftplugin/spec.vim @@ -2,8 +2,9 @@ " Filename: spec.vim " Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com " Former Maintainer: Gustavo Niemeyer (until March 2014) -" Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko -" Update by Zdenek Dohnal, 2022 May 17 +" Last Change: 2015 Jun 01 +" Update by Zdenek Dohnal, 2022 May 17 +" 2024 Sep 10 by Vim Project: add epoch support for spec changelog, #15537 if exists("b:did_ftplugin") finish @@ -66,9 +67,11 @@ if !exists("*s:SpecChangelog") endif let line = 0 let name = "" + let epoch = "" let ver = "" let rel = "" let nameline = -1 + let epochline = -1 let verline = -1 let relline = -1 let chgline = -1 @@ -77,6 +80,9 @@ if !exists("*s:SpecChangelog") if name == "" && linestr =~? '^Name:' let nameline = line let name = substitute(strpart(linestr,5), '^[ ]*\([^ ]\+\)[ ]*$','\1','') + elseif epoch == "" && linestr =~? '^Epoch:' + let epochline = line + let epoch = substitute(strpart(linestr,6), '^[ ]*\([^ ]\+\)[ ]*$','\1','') elseif ver == "" && linestr =~? '^Version:' let verline = line let ver = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') @@ -93,6 +99,7 @@ if !exists("*s:SpecChangelog") if nameline != -1 && verline != -1 && relline != -1 let include_release_info = exists("g:spec_chglog_release_info") let name = s:ParseRpmVars(name, nameline) + let epoch = s:ParseRpmVars(epoch, epochline) let ver = s:ParseRpmVars(ver, verline) let rel = s:ParseRpmVars(rel, relline) else @@ -117,6 +124,9 @@ if !exists("*s:SpecChangelog") if chgline != -1 let tmptime = v:lc_time language time C + if strlen(epoch) + let ver = epoch.":".ver + endif let parsed_format = "* ".strftime(format)." - ".ver."-".rel execute "language time" tmptime let release_info = "+ ".name."-".ver."-".rel From fc72a2fa4898d6d2f60695339d597672a4c0b7c5 Mon Sep 17 00:00:00 2001 From: Joe Sapp <992873+sappjw@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:46:54 +0200 Subject: [PATCH 14/15] runtime(idlang): update syntax script closes: #15419 Signed-off-by: Joe Sapp <992873+sappjw@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/syntax/idlang.vim | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/runtime/syntax/idlang.vim b/runtime/syntax/idlang.vim index 14e976ce05..f7bfcb203a 100644 --- a/runtime/syntax/idlang.vim +++ b/runtime/syntax/idlang.vim @@ -1,7 +1,8 @@ " Interactive Data Language syntax file (IDL, too [:-)] " Maintainer: Aleksandar Jelenak -" Last change: 2011 Apr 11 -" Created by: Hermann Rochholz +" Created By: Hermann Rochholz +" Last Change: 2011 Apr 11 +" 2024 Sep 10 by Vim Project: update syntax script, #15419 " Remove any old syntax stuff hanging around " quit when a syntax file was already loaded @@ -16,7 +17,7 @@ syn match idlangStatement "^\s*function\s" syn keyword idlangStatement return continue mod do break syn keyword idlangStatement compile_opt forward_function goto syn keyword idlangStatement begin common end of -syn keyword idlangStatement inherits on_ioerror begin +syn keyword idlangStatement inherits on_error on_ioerror begin syn keyword idlangConditional if else then for while case switch syn keyword idlangConditional endcase endelse endfor endswitch @@ -82,7 +83,7 @@ syn keyword idlangRoutine CALL_EXTERNAL CALL_FUNCTION CALL_METHOD syn keyword idlangRoutine CALL_PROCEDURE CATCH CD CEIL CHEBYSHEV CHECK_MATH syn keyword idlangRoutine CHISQR_CVF CHISQR_PDF CHOLDC CHOLSOL CINDGEN syn keyword idlangRoutine CIR_3PNT CLOSE CLUST_WTS CLUSTER COLOR_CONVERT -syn keyword idlangRoutine COLOR_QUAN COLORMAP_APPLICABLE COMFIT COMMON +syn keyword idlangRoutine COLOR_QUAN COLORMAP_APPLICABLE COMFIT syn keyword idlangRoutine COMPLEX COMPLEXARR COMPLEXROUND syn keyword idlangRoutine COMPUTE_MESH_NORMALS COND CONGRID CONJ syn keyword idlangRoutine CONSTRAINED_MIN CONTOUR CONVERT_COORD CONVOL @@ -98,7 +99,7 @@ syn keyword idlangRoutine CW_PALETTE_EDITOR_GET CW_PALETTE_EDITOR_SET syn keyword idlangRoutine CW_PDMENU CW_RGBSLIDER CW_TMPL CW_ZOOM DBLARR syn keyword idlangRoutine DCINDGEN DCOMPLEX DCOMPLEXARR DEFINE_KEY DEFROI syn keyword idlangRoutine DEFSYSV DELETE_SYMBOL DELLOG DELVAR DERIV DERIVSIG -syn keyword idlangRoutine DETERM DEVICE DFPMIN DIALOG_MESSAGE +syn keyword idlangRoutine DETERM DEVICE DFPMIN DIAG_MATRIX DIALOG_MESSAGE syn keyword idlangRoutine DIALOG_PICKFILE DIALOG_PRINTERSETUP syn keyword idlangRoutine DIALOG_PRINTJOB DIALOG_READ_IMAGE syn keyword idlangRoutine DIALOG_WRITE_IMAGE DIGITAL_FILTER DILATE DINDGEN @@ -155,7 +156,7 @@ syn keyword idlangRoutine MPEG_PUT MPEG_SAVE MSG_CAT_CLOSE MSG_CAT_COMPILE syn keyword idlangRoutine MSG_CAT_OPEN MULTI N_ELEMENTS N_PARAMS N_TAGS syn keyword idlangRoutine NEWTON NORM OBJ_CLASS OBJ_DESTROY OBJ_ISA OBJ_NEW syn keyword idlangRoutine OBJ_VALID OBJARR ON_ERROR ON_IOERROR ONLINE_HELP -syn keyword idlangRoutine OPEN OPENR OPENW OPLOT OPLOTERR P_CORRELATE +syn keyword idlangRoutine OPEN OPENR OPENW OPENU OPLOT OPLOTERR P_CORRELATE syn keyword idlangRoutine PARTICLE_TRACE PCOMP PLOT PLOT_3DBOX PLOT_FIELD syn keyword idlangRoutine PLOTERR PLOTS PNT_LINE POINT_LUN POLAR_CONTOUR syn keyword idlangRoutine POLAR_SURFACE POLY POLY_2D POLY_AREA POLY_FIT From d657d3d8fd635dbd78402358788dc58a96d04117 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 10 Sep 2024 21:55:49 +0200 Subject: [PATCH 15/15] runtime(doc): clarify the effect of the timeout for search()-functions related: #15657 related: #15404 Signed-off-by: Christian Brabandt --- runtime/doc/builtin.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 4192b81cae..af918d1a95 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Aug 08 +*builtin.txt* For Vim version 9.1. Last change: 2024 Sep 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8963,6 +8963,9 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) {timeout} is 500 the search stops after half a second. The value must not be negative. A zero value is like not giving the argument. + + Note: the timeout is only considered when searching, not + while evaluating the {skip} expression. {only available when compiled with the |+reltime| feature} If the {skip} expression is given it is evaluated with the