vim-patch:8.2.0114: info about sourced scripts is scattered

Problem:    Info about sourced scripts is scattered.
Solution:   Use scriptitem_T for info about a script, including s: variables.
            Drop ga_scripts.

7ebcba61b2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-02-16 10:32:28 +08:00
parent 5dc4eaf386
commit e619fb1660
3 changed files with 46 additions and 52 deletions

View File

@@ -55,7 +55,16 @@ typedef enum {
ESTACK_SCRIPT,
} estack_arg_T;
typedef struct scriptitem_S {
/// Holds the hashtab with variables local to each sourced script.
/// Each item holds a variable (nameless) that points to the dict_T.
typedef struct {
ScopeDictDictItem sv_var;
dict_T sv_dict;
} scriptvar_T;
typedef struct {
scriptvar_T *sn_vars; ///< stores s: variables for this script
char *sn_name;
bool sn_prof_on; ///< true when script is/was profiled
bool sn_pr_force; ///< forceit: profile functions in this script