comparison src/vim9instr.c @ 31441:e572ff386670 v9.0.1053

patch 9.0.1053: default constructor arguments are not optional Commit: https://github.com/vim/vim/commit/65b0d1676814ee08fb58ef8d64dd342d1d883192 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 13 18:43:22 2022 +0000 patch 9.0.1053: default constructor arguments are not optional Problem: Default constructor arguments are not optional. Solution: Use "= v:none" to make constructor arguments optional.
author Bram Moolenaar <Bram@vim.org>
date Tue, 13 Dec 2022 19:45:04 +0100
parents e31fc75f6aff
children 1bebc2093e6b
comparison
equal deleted inserted replaced
31440:5a24ca193fe9 31441:e572ff386670
1406 1406
1407 return OK; 1407 return OK;
1408 } 1408 }
1409 1409
1410 /* 1410 /*
1411 * Generate an ISN_JUMP_IF_ARG_SET instruction. 1411 * Generate an ISN_JUMP_IF_ARG_SET or ISN_JUMP_IF_ARG_NOT_SET instruction.
1412 */ 1412 */
1413 int 1413 int
1414 generate_JUMP_IF_ARG_SET(cctx_T *cctx, int arg_off) 1414 generate_JUMP_IF_ARG(cctx_T *cctx, isntype_T isn_type, int arg_off)
1415 { 1415 {
1416 isn_T *isn; 1416 isn_T *isn;
1417 1417
1418 RETURN_OK_IF_SKIP(cctx); 1418 RETURN_OK_IF_SKIP(cctx);
1419 if ((isn = generate_instr(cctx, ISN_JUMP_IF_ARG_SET)) == NULL) 1419 if ((isn = generate_instr(cctx, isn_type)) == NULL)
1420 return FAIL; 1420 return FAIL;
1421 isn->isn_arg.jumparg.jump_arg_off = arg_off; 1421 isn->isn_arg.jumparg.jump_arg_off = arg_off;
1422 // jump_where is set later 1422 // jump_where is set later
1423 return OK; 1423 return OK;
1424 } 1424 }
2477 case ISN_FINISH: 2477 case ISN_FINISH:
2478 case ISN_FOR: 2478 case ISN_FOR:
2479 case ISN_GETITEM: 2479 case ISN_GETITEM:
2480 case ISN_GET_OBJ_MEMBER: 2480 case ISN_GET_OBJ_MEMBER:
2481 case ISN_JUMP: 2481 case ISN_JUMP:
2482 case ISN_JUMP_IF_ARG_NOT_SET:
2482 case ISN_JUMP_IF_ARG_SET: 2483 case ISN_JUMP_IF_ARG_SET:
2483 case ISN_LISTAPPEND: 2484 case ISN_LISTAPPEND:
2484 case ISN_LISTINDEX: 2485 case ISN_LISTINDEX:
2485 case ISN_LISTSLICE: 2486 case ISN_LISTSLICE:
2486 case ISN_LOAD: 2487 case ISN_LOAD: