neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit ffdee3a2e1bdbd4ad5c11591010625f259865165
parent d65f5a06fe2bd199edb06f902d4060b47743221e
Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
Date:   Wed, 10 Dec 2025 13:05:38 -0500

vim-patch:8.2.2409: Vim9: profiling only works for one function

Problem:    Vim9: profiling only works for one function.
Solution:   Select the right instructions when calling and returning.
            (closes vim/vim#7743)

https://github.com/vim/vim/commit/e5ea346a07a7750c02a89996b67716b43c767d06

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Mtest/old/testdir/test_profile.vim | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/test/old/testdir/test_profile.vim b/test/old/testdir/test_profile.vim @@ -5,6 +5,7 @@ CheckFeature profile source shared.vim source screendump.vim +source vim9.vim func Test_profile_func() let lines =<< trim [CODE] @@ -595,3 +596,22 @@ func Test_profile_typed_func() call delete('XprofileTypedFunc') call delete('XtestProfile') endfunc + +func Test_vim9_profiling() + " only tests that compiling and calling functions doesn't crash + let lines =<< trim END + vim9script + def Func() + Crash() + enddef + def Crash() + enddef + prof start /tmp/profile.log + prof func Func + Func() + END + call CheckScriptSuccess(lines) +endfunc + + +" vim: shiftwidth=2 sts=2 expandtab