patch 8.2.2314: Vim9: returning zero takes two instructions
Problem: Vim9: returning zero takes two instructions.
Solution: Add ISN_RETURN_ZERO.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 7497e9c..376f306 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -8190,8 +8190,7 @@
}
// 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 @@
case ISN_PUSHSPEC:
case ISN_PUT:
case ISN_RETURN:
+ case ISN_RETURN_ZERO:
case ISN_SHUFFLE:
case ISN_SLICE:
case ISN_STORE: