Mercurial > vim
comparison src/vim9.h @ 24218:40e27d96e395 v8.2.2650
patch 8.2.2650: Vim9: command modifiers not handled in nested function
Commit: https://github.com/vim/vim/commit/2fecb53115e25de6203363be8018ee676ad1422b
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 24 22:00:56 2021 +0100
patch 8.2.2650: Vim9: command modifiers not handled in nested function
Problem: Vim9: command modifiers not handled in nested function.
Solution: Keep function-local info in a structure and save it on the stack.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 24 Mar 2021 22:15:03 +0100 |
parents | 3daeb2060f25 |
children | cabed216cc2f |
comparison
equal
deleted
inserted
replaced
24217:d78d5ce72580 | 24218:40e27d96e395 |
---|---|
400 | 400 |
401 // Number of entries used by stack frame for a function call. | 401 // Number of entries used by stack frame for a function call. |
402 // - ec_dfunc_idx: function index | 402 // - ec_dfunc_idx: function index |
403 // - ec_iidx: instruction index | 403 // - ec_iidx: instruction index |
404 // - ec_outer: stack used for closures | 404 // - ec_outer: stack used for closures |
405 // - funclocal: function-local data | |
405 // - ec_frame_idx: previous frame index | 406 // - ec_frame_idx: previous frame index |
406 #define STACK_FRAME_FUNC_OFF 0 | 407 #define STACK_FRAME_FUNC_OFF 0 |
407 #define STACK_FRAME_IIDX_OFF 1 | 408 #define STACK_FRAME_IIDX_OFF 1 |
408 #define STACK_FRAME_OUTER_OFF 2 | 409 #define STACK_FRAME_OUTER_OFF 2 |
409 #define STACK_FRAME_IDX_OFF 3 | 410 #define STACK_FRAME_FUNCLOCAL_OFF 3 |
410 #define STACK_FRAME_SIZE 4 | 411 #define STACK_FRAME_IDX_OFF 4 |
412 #define STACK_FRAME_SIZE 5 | |
411 | 413 |
412 | 414 |
413 #ifdef DEFINE_VIM9_GLOBALS | 415 #ifdef DEFINE_VIM9_GLOBALS |
414 // Functions defined with :def are stored in this growarray. | 416 // Functions defined with :def are stored in this growarray. |
415 // They are never removed, so that they can be found by index. | 417 // They are never removed, so that they can be found by index. |