forked from aniani/vim
patch 8.2.4823: concat more than 2 strings in :def function is inefficient
Problem: Concatenating more than 2 strings in a :def function is inefficient. Solution: Add a count to the CONCAT instruction. (closes #10276)
This commit is contained in:
@@ -2513,7 +2513,8 @@ compile_expr5(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
|
||||
if (may_generate_2STRING(-2, FALSE, cctx) == FAIL
|
||||
|| may_generate_2STRING(-1, FALSE, cctx) == FAIL)
|
||||
return FAIL;
|
||||
generate_instr_drop(cctx, ISN_CONCAT, 1);
|
||||
if (generate_CONCAT(cctx, 2) == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
else
|
||||
generate_two_op(cctx, op);
|
||||
|
Reference in New Issue
Block a user