comparison src/testdir/test_vim9_disassemble.vim @ 22371:15003353a464 v8.2.1734

patch 8.2.1734: Vim9: cannot use a funcref for a closure twice Commit: https://github.com/vim/vim/commit/148ce7ae62e92ecf6487a4ba5902ddb7e699074b Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 23 21:57:23 2020 +0200 patch 8.2.1734: Vim9: cannot use a funcref for a closure twice Problem: Vim9: cannot use a funcref for a closure twice. Solution: Instead of putting the funcref on the stack use a growarray on the execution context.
author Bram Moolenaar <Bram@vim.org>
date Wed, 23 Sep 2020 22:00:06 +0200
parents 6b385c2b9ff5
children eabc059a6ac4
comparison
equal deleted inserted replaced
22370:9a06648f05d3 22371:15003353a464
706 def Test_disassemble_lambda() 706 def Test_disassemble_lambda()
707 assert_equal("XxX", WithLambda()) 707 assert_equal("XxX", WithLambda())
708 let instr = execute('disassemble WithLambda') 708 let instr = execute('disassemble WithLambda')
709 assert_match('WithLambda\_s*' .. 709 assert_match('WithLambda\_s*' ..
710 'let F = {a -> "X" .. a .. "X"}\_s*' .. 710 'let F = {a -> "X" .. a .. "X"}\_s*' ..
711 '\d FUNCREF <lambda>\d\+ $1\_s*' .. 711 '\d FUNCREF <lambda>\d\+\_s*' ..
712 '\d STORE $0\_s*' .. 712 '\d STORE $0\_s*' ..
713 'return F("x")\_s*' .. 713 'return F("x")\_s*' ..
714 '\d PUSHS "x"\_s*' .. 714 '\d PUSHS "x"\_s*' ..
715 '\d LOAD $0\_s*' .. 715 '\d LOAD $0\_s*' ..
716 '\d PCALL (argc 1)\_s*' .. 716 '\d PCALL (argc 1)\_s*' ..