Mercurial > vim
comparison src/proto/typval.pro @ 26644:2fc1e528e0e1 v8.2.3851
patch 8.2.3851: Vim9: overhead when comparing string, dict or function
Commit: https://github.com/vim/vim/commit/265f811f5a2dac81d9698f5202a661a04ed095f1
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 19 12:33:05 2021 +0000
patch 8.2.3851: Vim9: overhead when comparing string, dict or function
Problem: Vim9: overhead when comparing string, dict or function.
Solution: Call the intented compare function directly. Refactor to avoid
duplicated code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Dec 2021 13:45:03 +0100 |
parents | 6fd15d82e898 |
children | 7f4cc4e58f75 |
comparison
equal
deleted
inserted
replaced
26643:c1613719988c | 26644:2fc1e528e0e1 |
---|---|
25 int check_for_chan_or_job_arg(typval_T *args, int idx); | 25 int check_for_chan_or_job_arg(typval_T *args, int idx); |
26 int check_for_opt_chan_or_job_arg(typval_T *args, int idx); | 26 int check_for_opt_chan_or_job_arg(typval_T *args, int idx); |
27 int check_for_job_arg(typval_T *args, int idx); | 27 int check_for_job_arg(typval_T *args, int idx); |
28 int check_for_opt_job_arg(typval_T *args, int idx); | 28 int check_for_opt_job_arg(typval_T *args, int idx); |
29 int check_for_string_or_number_arg(typval_T *args, int idx); | 29 int check_for_string_or_number_arg(typval_T *args, int idx); |
30 int check_for_opt_string_or_number_arg(typval_T *args, int idx); | |
30 int check_for_buffer_arg(typval_T *args, int idx); | 31 int check_for_buffer_arg(typval_T *args, int idx); |
31 int check_for_opt_buffer_arg(typval_T *args, int idx); | 32 int check_for_opt_buffer_arg(typval_T *args, int idx); |
32 int check_for_lnum_arg(typval_T *args, int idx); | 33 int check_for_lnum_arg(typval_T *args, int idx); |
33 int check_for_opt_lnum_arg(typval_T *args, int idx); | 34 int check_for_opt_lnum_arg(typval_T *args, int idx); |
34 int check_for_opt_string_or_number_arg(typval_T *args, int idx); | |
35 int check_for_string_or_blob_arg(typval_T *args, int idx); | 35 int check_for_string_or_blob_arg(typval_T *args, int idx); |
36 int check_for_string_or_list_arg(typval_T *args, int idx); | 36 int check_for_string_or_list_arg(typval_T *args, int idx); |
37 int check_for_string_or_list_or_blob_arg(typval_T *args, int idx); | 37 int check_for_string_or_list_or_blob_arg(typval_T *args, int idx); |
38 int check_for_opt_string_or_list_arg(typval_T *args, int idx); | 38 int check_for_opt_string_or_list_arg(typval_T *args, int idx); |
39 int check_for_string_or_dict_arg(typval_T *args, int idx); | 39 int check_for_string_or_dict_arg(typval_T *args, int idx); |
52 char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf); | 52 char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf); |
53 char_u *tv_get_string_buf_chk_strict(typval_T *varp, char_u *buf, int strict); | 53 char_u *tv_get_string_buf_chk_strict(typval_T *varp, char_u *buf, int strict); |
54 char_u *tv_stringify(typval_T *varp, char_u *buf); | 54 char_u *tv_stringify(typval_T *varp, char_u *buf); |
55 int tv_check_lock(typval_T *tv, char_u *name, int use_gettext); | 55 int tv_check_lock(typval_T *tv, char_u *name, int use_gettext); |
56 void copy_tv(typval_T *from, typval_T *to); | 56 void copy_tv(typval_T *from, typval_T *to); |
57 int typval_compare(typval_T *typ1, typval_T *typ2, exprtype_T type, int ic); | 57 int typval_compare(typval_T *tv1, typval_T *tv2, exprtype_T type, int ic); |
58 int typval_compare_list(typval_T *tv1, typval_T *tv2, exprtype_T type, int ic, int *res); | |
59 int typval_compare_blob(typval_T *tv1, typval_T *tv2, exprtype_T type, int *res); | |
60 int typval_compare_dict(typval_T *tv1, typval_T *tv2, exprtype_T type, int ic, int *res); | |
61 int typval_compare_func(typval_T *tv1, typval_T *tv2, exprtype_T type, int ic, int *res); | |
62 int typval_compare_string(typval_T *tv1, typval_T *tv2, exprtype_T type, int ic, int *res); | |
58 char_u *typval_tostring(typval_T *arg, int quotes); | 63 char_u *typval_tostring(typval_T *arg, int quotes); |
59 int tv_islocked(typval_T *tv); | 64 int tv_islocked(typval_T *tv); |
60 int tv_equal(typval_T *tv1, typval_T *tv2, int ic, int recursive); | 65 int tv_equal(typval_T *tv1, typval_T *tv2, int ic, int recursive); |
61 int eval_option(char_u **arg, typval_T *rettv, int evaluate); | 66 int eval_option(char_u **arg, typval_T *rettv, int evaluate); |
62 int eval_number(char_u **arg, typval_T *rettv, int evaluate, int want_string); | 67 int eval_number(char_u **arg, typval_T *rettv, int evaluate, int want_string); |