Mercurial > vim
diff src/vim9compile.c @ 23543:f90e429453fd v8.2.2314
patch 8.2.2314: Vim9: returning zero takes two instructions
Commit: https://github.com/vim/vim/commit/299f3036ec21cc9735846b2e0dfdfc5a78b26c1c
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 8 20:53:09 2021 +0100
patch 8.2.2314: Vim9: returning zero takes two instructions
Problem: Vim9: returning zero takes two instructions.
Solution: Add ISN_RETURN_ZERO.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 08 Jan 2021 21:00:04 +0100 |
parents | 7f0fc2ab90e3 |
children | 5c094273c015 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -8190,8 +8190,7 @@ nextline: } // Return zero if there is no return at the end. - generate_PUSHNR(&cctx, 0); - generate_instr(&cctx, ISN_RETURN); + generate_instr(&cctx, ISN_RETURN_ZERO); } { @@ -8483,6 +8482,7 @@ delete_instr(isn_T *isn) case ISN_PUSHSPEC: case ISN_PUT: case ISN_RETURN: + case ISN_RETURN_ZERO: case ISN_SHUFFLE: case ISN_SLICE: case ISN_STORE: