comparison src/vim9execute.c @ 28692:bfd8e25fa207 v8.2.4870

patch 8.2.4870: Vim9: expression in :substitute is not compiled Commit: https://github.com/vim/vim/commit/f3b4895f2727e3849ca10030b251cccd9d1383f3 Author: LemonBoy <thatlemon@gmail.com> Date: Thu May 5 13:53:03 2022 +0100 patch 8.2.4870: Vim9: expression in :substitute is not compiled Problem: Vim9: expression in :substitute is not compiled. Solution: Use an INSTR instruction if possible. (closes https://github.com/vim/vim/issues/10334)
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 May 2022 15:00:04 +0200
parents 56860e29ce5d
children d0241e74bfdb
comparison
equal deleted inserted replaced
28691:ca54846af861 28692:bfd8e25fa207
5008 ectx_T *ectx = tv->vval.v_instr->instr_ectx; 5008 ectx_T *ectx = tv->vval.v_instr->instr_ectx;
5009 isn_T *save_instr = ectx->ec_instr; 5009 isn_T *save_instr = ectx->ec_instr;
5010 int save_iidx = ectx->ec_iidx; 5010 int save_iidx = ectx->ec_iidx;
5011 int res; 5011 int res;
5012 5012
5013 // Initialize rettv so that it is safe for caller to invoke clear_tv(rettv)
5014 // even when the compilation fails.
5015 rettv->v_type = VAR_UNKNOWN;
5016
5013 ectx->ec_instr = tv->vval.v_instr->instr_instr; 5017 ectx->ec_instr = tv->vval.v_instr->instr_instr;
5014 res = exec_instructions(ectx); 5018 res = exec_instructions(ectx);
5015 if (res == OK) 5019 if (res == OK)
5016 { 5020 {
5017 *rettv = *STACK_TV_BOT(-1); 5021 *rettv = *STACK_TV_BOT(-1);