Patch 8.2.1008
Problem: Vim9: no test for disassambling newly added instructions.
Solution: Add a function and check disassembly.
Files: src/testdir/test_vim9_disassemble.vim
*** ../vim-8.2.1007/src/testdir/test_vim9_disassemble.vim 2020-06-18
20:50:06.349864243 +0200
--- src/testdir/test_vim9_disassemble.vim 2020-06-18 22:11:22.693173803
+0200
***************
*** 185,190 ****
--- 185,226 ----
res)
enddef
+ def s:ListAssign()
+ let x: string
+ let y: string
+ let l: list<any>
+ [x, y; l] = g:stringlist
+ enddef
+
+ def Test_disassemble_list_assign()
+ let res = execute('disass s:ListAssign')
+ assert_match('<SNR>\d*_ListAssign\_s*' ..
+ 'let x: string\_s*' ..
+ '\d PUSHS "\[NULL\]"\_s*' ..
+ '\d STORE $0\_s*' ..
+ 'let y: string\_s*' ..
+ '\d PUSHS "\[NULL\]"\_s*' ..
+ '\d STORE $1\_s*' ..
+ 'let l: list<any>\_s*' ..
+ '\d NEWLIST size 0\_s*' ..
+ '\d STORE $2\_s*' ..
+ '\[x, y; l\] = g:stringlist\_s*' ..
+ '\d LOADG g:stringlist\_s*' ..
+ '\d CHECKTYPE list stack\[-1\]\_s*' ..
+ '\d CHECKLEN >= 2\_s*' ..
+ '\d\+ ITEM 0\_s*' ..
+ '\d\+ CHECKTYPE string stack\[-1\]\_s*' ..
+ '\d\+ STORE $0\_s*' ..
+ '\d\+ ITEM 1\_s*' ..
+ '\d\+ CHECKTYPE string stack\[-1\]\_s*' ..
+ '\d\+ STORE $1\_s*' ..
+ '\d\+ SLICE 2\_s*' ..
+ '\d\+ STORE $2\_s*' ..
+ '\d\+ PUSHNR 0\_s*' ..
+ '\d\+ RETURN',
+ res)
+ enddef
+
def s:ScriptFuncUnlet()
g:somevar = "value"
unlet g:somevar
*** ../vim-8.2.1007/src/version.c 2020-06-18 21:14:25.649217425 +0200
--- src/version.c 2020-06-18 22:17:49.868246509 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1008,
/**/
--
Did you ever stop to think... and forget to start again?
-- Steven Wright
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202006182019.05IKJGLx447106%40masaka.moolenaar.net.