comparison src/vim9compile.c @ 30335:bff0506a0911 v9.0.0503

patch 9.0.0503: build failure Commit: https://github.com/vim/vim/commit/65449bd1ee5cebde288a8f0150fe7d54c6c6ef31 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 19 16:02:43 2022 +0100 patch 9.0.0503: build failure Problem: Build failure. Solution: Add missing changes.
author Bram Moolenaar <Bram@vim.org>
date Mon, 19 Sep 2022 17:15:03 +0200
parents 029c59bf78f1
children 72e6073a2822
comparison
equal deleted inserted replaced
30334:945eb46e0773 30335:bff0506a0911
52 { 52 {
53 if (lvar != NULL) 53 if (lvar != NULL)
54 { 54 {
55 *lvar = *lvp; 55 *lvar = *lvp;
56 lvar->lv_from_outer = 0; 56 lvar->lv_from_outer = 0;
57 lvar->lv_loop_idx = get_loop_var_idx(cctx); 57 // If the variable was declared inside a loop set
58 // lvar->lv_loop_idx and lvar->lv_loop_depth.
59 get_loop_var_idx(cctx, idx, lvar);
58 } 60 }
59 return OK; 61 return OK;
60 } 62 }
61 } 63 }
62 64
953 955
954 // Define the funcref before compiling, so that it is found by any 956 // Define the funcref before compiling, so that it is found by any
955 // recursive call. 957 // recursive call.
956 if (is_global) 958 if (is_global)
957 { 959 {
958 // TODO: loop variable index and count 960 r = generate_NEWFUNC(cctx, lambda_name, func_name);
959 r = generate_NEWFUNC(cctx, lambda_name, func_name, 0, 0);
960 func_name = NULL; 961 func_name = NULL;
961 lambda_name = NULL; 962 lambda_name = NULL;
962 } 963 }
963 else 964 else
964 { 965 {
1193 case dest_local: 1194 case dest_local:
1194 if (cctx->ctx_skip != SKIP_YES) 1195 if (cctx->ctx_skip != SKIP_YES)
1195 { 1196 {
1196 if (lvar->lv_from_outer > 0) 1197 if (lvar->lv_from_outer > 0)
1197 generate_LOADOUTER(cctx, lvar->lv_idx, lvar->lv_from_outer, 1198 generate_LOADOUTER(cctx, lvar->lv_idx, lvar->lv_from_outer,
1198 lvar->lv_loop_idx, type); 1199 lvar->lv_loop_depth, lvar->lv_loop_idx, type);
1199 else 1200 else
1200 generate_LOAD(cctx, ISN_LOAD, lvar->lv_idx, NULL, type); 1201 generate_LOAD(cctx, ISN_LOAD, lvar->lv_idx, NULL, type);
1201 } 1202 }
1202 break; 1203 break;
1203 case dest_expr: 1204 case dest_expr: