diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-11 22:31:27 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-11 22:31:27 +0200 |
commit | fe270817247b73a9315bb10f0a51b6eca406d300 (patch) | |
tree | d49462f84e5af19fd16ac37d77b61a0a28b89d87 /src/vim9compile.c | |
parent | d19a8f97ad58055a5e99cca8498d01e450ae37b2 (diff) |
patch 8.2.0546: Vim9: varargs implementation is inefficientv8.2.0546
Problem: Vim9: varargs implementation is inefficient.
Solution: Create list without moving the arguments.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c index 69543b52eb..0d245d2ea3 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -5584,15 +5584,6 @@ compile_def_function(ufunc_T *ufunc, int set_return_type) ufunc->uf_def_arg_idx[count] = instr->ga_len; } - // If varargs is use, push a list. Empty if no more arguments. - if (ufunc->uf_va_name != NULL) - { - if (generate_NEWLIST(&cctx, 0) == FAIL - || generate_STORE(&cctx, ISN_STORE, - -STACK_FRAME_SIZE - 1, NULL) == FAIL) - goto erret; - } - /* * Loop over all the lines of the function and generate instructions. */ |