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 #10065)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 60ca50a..768b27f 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -90,7 +90,6 @@
static void f_invert(typval_T *argvars, typval_T *rettv);
static void f_islocked(typval_T *argvars, typval_T *rettv);
static void f_last_buffer_nr(typval_T *argvars, typval_T *rettv);
-static void f_len(typval_T *argvars, typval_T *rettv);
static void f_libcall(typval_T *argvars, typval_T *rettv);
static void f_libcallnr(typval_T *argvars, typval_T *rettv);
static void f_line(typval_T *argvars, typval_T *rettv);
@@ -7019,7 +7018,7 @@
/*
* "len()" function
*/
- static void
+ void
f_len(typval_T *argvars, typval_T *rettv)
{
switch (argvars[0].v_type)