comparison src/vim9compile.c @ 24637:4a4f64cdc798 v8.2.2857

patch 8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level Commit: https://github.com/vim/vim/commit/ff65288aa89dcd50760ad942d58baff70c6e93e6 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 16 15:24:49 2021 +0200 patch 8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level Problem: Vim9: exception in ISN_INSTR caught at wrong level. Solution: Set the starting trylevel in exec_instructions(). (closes https://github.com/vim/vim/issues/8214)
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 May 2021 15:30:03 +0200
parents 07b3d21a8b4b
children 668df21d8bc6
comparison
equal deleted inserted replaced
24636:840665e74421 24637:4a4f64cdc798
3129 cctx->ctx_instr.ga_data = NULL; 3129 cctx->ctx_instr.ga_data = NULL;
3130 expr_res = compile_expr0(&s, cctx); 3130 expr_res = compile_expr0(&s, cctx);
3131 s = skipwhite(s); 3131 s = skipwhite(s);
3132 trailing_error = *s != NUL; 3132 trailing_error = *s != NUL;
3133 3133
3134 if (expr_res == FAIL || trailing_error) 3134 if (expr_res == FAIL || trailing_error
3135 || ga_grow(&cctx->ctx_instr, 1) == FAIL)
3135 { 3136 {
3136 if (trailing_error) 3137 if (trailing_error)
3137 semsg(_(e_trailing_arg), s); 3138 semsg(_(e_trailing_arg), s);
3138 clear_instr_ga(&cctx->ctx_instr); 3139 clear_instr_ga(&cctx->ctx_instr);
3139 cctx->ctx_instr = save_ga; 3140 cctx->ctx_instr = save_ga;
3183 instr_count = cctx->ctx_instr.ga_len; 3184 instr_count = cctx->ctx_instr.ga_len;
3184 if (compile_expr0(&p, cctx) == FAIL) 3185 if (compile_expr0(&p, cctx) == FAIL)
3185 return FAIL; 3186 return FAIL;
3186 ++*argcount; 3187 ++*argcount;
3187 3188
3188 if (is_searchpair && *argcount == 5 3189 if (is_searchpair && *argcount >= 5
3189 && cctx->ctx_instr.ga_len == instr_count + 1) 3190 && cctx->ctx_instr.ga_len == instr_count + 1)
3190 { 3191 {
3191 isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count; 3192 isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count;
3192 3193
3193 // {skip} argument of searchpair() can be compiled if not empty 3194 // {skip} argument of searchpair() can be compiled if not empty