comparison src/evalfunc.c @ 28287:dc68c111cf7a v8.2.4669

patch 8.2.4669: in compiled code len('string') is not inlined Commit: https://github.com/vim/vim/commit/58f331a05f5b7bdddf04e68b6e51a827fd0c43f0 Author: LemonBoy <thatlemon@gmail.com> Date: Sat Apr 2 21:59:06 2022 +0100 patch 8.2.4669: in compiled code len('string') is not inlined Problem: In compiled code len('string') is not inlined. Solution: Compute the length at compile time if possible. (closes https://github.com/vim/vim/issues/10065)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Apr 2022 23:00:05 +0200
parents 2fd2ce8a556c
children 9849df834f1d
comparison
equal deleted inserted replaced
28286:68700da20991 28287:dc68c111cf7a
88 static void f_inputsecret(typval_T *argvars, typval_T *rettv); 88 static void f_inputsecret(typval_T *argvars, typval_T *rettv);
89 static void f_interrupt(typval_T *argvars, typval_T *rettv); 89 static void f_interrupt(typval_T *argvars, typval_T *rettv);
90 static void f_invert(typval_T *argvars, typval_T *rettv); 90 static void f_invert(typval_T *argvars, typval_T *rettv);
91 static void f_islocked(typval_T *argvars, typval_T *rettv); 91 static void f_islocked(typval_T *argvars, typval_T *rettv);
92 static void f_last_buffer_nr(typval_T *argvars, typval_T *rettv); 92 static void f_last_buffer_nr(typval_T *argvars, typval_T *rettv);
93 static void f_len(typval_T *argvars, typval_T *rettv);
94 static void f_libcall(typval_T *argvars, typval_T *rettv); 93 static void f_libcall(typval_T *argvars, typval_T *rettv);
95 static void f_libcallnr(typval_T *argvars, typval_T *rettv); 94 static void f_libcallnr(typval_T *argvars, typval_T *rettv);
96 static void f_line(typval_T *argvars, typval_T *rettv); 95 static void f_line(typval_T *argvars, typval_T *rettv);
97 static void f_line2byte(typval_T *argvars, typval_T *rettv); 96 static void f_line2byte(typval_T *argvars, typval_T *rettv);
98 #ifdef FEAT_LUA 97 #ifdef FEAT_LUA
7017 } 7016 }
7018 7017
7019 /* 7018 /*
7020 * "len()" function 7019 * "len()" function
7021 */ 7020 */
7022 static void 7021 void
7023 f_len(typval_T *argvars, typval_T *rettv) 7022 f_len(typval_T *argvars, typval_T *rettv)
7024 { 7023 {
7025 switch (argvars[0].v_type) 7024 switch (argvars[0].v_type)
7026 { 7025 {
7027 case VAR_STRING: 7026 case VAR_STRING: