comparison src/vim9compile.c @ 33540:86dbcbb94fdb v9.0.2019

patch 9.0.2019: Vim9: no support for funcrefs Commit: https://github.com/vim/vim/commit/29bb67f1beefc7fd393dbfd9ee77d92f1db3a3c0 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Oct 14 11:18:50 2023 +0200 patch 9.0.2019: Vim9: no support for funcrefs Problem: Vim9: no support for funcrefs Solution: Add support for object/class funcref members closes: #11981 #12417 #12960 #12324 #13333 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 14 Oct 2023 11:30:07 +0200
parents c8bd88bdb630
children fcc8296f36eb
comparison
equal deleted inserted replaced
33539:98e6eaaf8458 33540:86dbcbb94fdb
1146 // Define a local variable for the function reference. 1146 // Define a local variable for the function reference.
1147 lvar = reserve_local(cctx, func_name, name_end - name_start, 1147 lvar = reserve_local(cctx, func_name, name_end - name_start,
1148 ASSIGN_CONST, ufunc->uf_func_type); 1148 ASSIGN_CONST, ufunc->uf_func_type);
1149 if (lvar == NULL) 1149 if (lvar == NULL)
1150 goto theend; 1150 goto theend;
1151 if (generate_FUNCREF(cctx, ufunc, NULL, 0, &funcref_isn_idx) == FAIL) 1151 if (generate_FUNCREF(cctx, ufunc, NULL, FALSE, 0, &funcref_isn_idx) == FAIL)
1152 goto theend; 1152 goto theend;
1153 r = generate_STORE(cctx, ISN_STORE, lvar->lv_idx, NULL); 1153 r = generate_STORE(cctx, ISN_STORE, lvar->lv_idx, NULL);
1154 } 1154 }
1155 1155
1156 compile_type = get_compile_type(ufunc); 1156 compile_type = get_compile_type(ufunc);