Patch 8.2.0227
Problem: Compiling a few instructions not tested.
Solution: Add more test cases.
Files: src/testdir/test_vim9_disassemble.vim
*** ../vim-8.2.0226/src/testdir/test_vim9_disassemble.vim 2020-02-06
22:06:49.220799097 +0100
--- src/testdir/test_vim9_disassemble.vim 2020-02-06 22:40:05.456349761
+0100
***************
*** 106,112 ****
catch /fail/
echo 'no'
finally
! echo 'end'
endtry
enddef
--- 106,112 ----
catch /fail/
echo 'no'
finally
! throw 'end'
endtry
enddef
***************
*** 124,129 ****
--- 124,130 ----
\ .. ' CATCH.*'
\ .. 'finally.*'
\ .. ' PUSHS "end".*'
+ \ .. ' THROW.*'
\ .. 'endtry.*'
\ .. ' ENDTRY.*'
\, res)
***************
*** 357,361 ****
--- 358,438 ----
\, instr)
enddef
+ let g:number = 42
+
+ def Computing()
+ let nr = 3
+ let nrres = nr + 7
+ nrres = nr - 7
+ nrres = nr * 7
+ nrres = nr / 7
+ nrres = nr % 7
+
+ let anyres = g:number + 7
+ anyres = g:number - 7
+ anyres = g:number * 7
+ anyres = g:number / 7
+ anyres = g:number % 7
+
+ if has('float')
+ let fl = 3.0
+ let flres = fl + 7.0
+ flres = fl - 7.0
+ flres = fl * 7.0
+ flres = fl / 7.0
+ endif
+ enddef
+
+ def Test_computing()
+ let instr = execute('disassemble Computing')
+ assert_match('Computing.*'
+ \ .. 'let nr = 3.*'
+ \ .. '\d STORE 3 in $0.*'
+ \ .. 'let nrres = nr + 7.*'
+ \ .. '\d LOAD $0.*'
+ \ .. '\d PUSHNR 7.*'
+ \ .. '\d OPNR +.*'
+ \ .. '\d STORE $1.*'
+ \ .. 'nrres = nr - 7.*'
+ \ .. '\d OPNR -.*'
+ \ .. 'nrres = nr \* 7.*'
+ \ .. '\d OPNR \*.*'
+ \ .. 'nrres = nr / 7.*'
+ \ .. '\d OPNR /.*'
+ \ .. 'nrres = nr % 7.*'
+ \ .. '\d OPNR %.*'
+ \ .. 'let anyres = g:number + 7.*'
+ \ .. '\d LOADG g:number.*'
+ \ .. '\d PUSHNR 7.*'
+ \ .. '\d OPANY +.*'
+ \ .. '\d STORE $2.*'
+ \ .. 'anyres = g:number - 7.*'
+ \ .. '\d OPANY -.*'
+ \ .. 'anyres = g:number \* 7.*'
+ \ .. '\d OPANY \*.*'
+ \ .. 'anyres = g:number / 7.*'
+ \ .. '\d OPANY /.*'
+ \ .. 'anyres = g:number % 7.*'
+ \ .. '\d OPANY %.*'
+ \, instr)
+ if has('float')
+ assert_match('Computing.*'
+ \ .. 'let fl = 3.0.*'
+ \ .. '\d PUSHF 3.0.*'
+ \ .. '\d STORE $3.*'
+ \ .. 'let flres = fl + 7.0.*'
+ \ .. '\d LOAD $3.*'
+ \ .. '\d PUSHF 7.0.*'
+ \ .. '\d OPFLOAT +.*'
+ \ .. '\d STORE $4.*'
+ \ .. 'flres = fl - 7.0.*'
+ \ .. '\d OPFLOAT -.*'
+ \ .. 'flres = fl \* 7.0.*'
+ \ .. '\d OPFLOAT \*.*'
+ \ .. 'flres = fl / 7.0.*'
+ \ .. '\d OPFLOAT /.*'
+ \, instr)
+ endif
+ enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
*** ../vim-8.2.0226/src/version.c 2020-02-06 22:06:49.224799080 +0100
--- src/version.c 2020-02-06 22:18:42.945886513 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 227,
/**/
--
The users that I support would double-click on a landmine to find out
what happens. -- A system administrator
/// 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/202002062141.016LfiZq028526%40masaka.moolenaar.net.