patch 8.2.4019: Vim9: import mechanism is too complicated
Problem: Vim9: import mechanism is too complicated.
Solution: Do not use the Javascript mechanism but a much simpler one.
diff --git a/src/structs.h b/src/structs.h
index 1a764e1..197df72 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1822,19 +1822,10 @@
typedef struct {
char_u *imp_name; // name imported as (allocated)
- int imp_sid; // script ID of "from"
-
+ scid_T imp_sid; // script ID of "from"
int imp_flags; // IMP_FLAGS_ values
-
- // for a variable
- type_T *imp_type;
- int imp_var_vals_idx; // index in sn_var_vals of "from"
-
- // for a function
- char_u *imp_funcname; // user func name (NOT allocated)
} imported_T;
-#define IMP_FLAGS_STAR 1 // using "import * as Name"
#define IMP_FLAGS_RELOAD 2 // script reloaded, OK to redefine
/*
@@ -4264,6 +4255,10 @@
char_u *ll_name_end; // end of variable name (can be NULL)
type_T *ll_type; // type of variable (can be NULL)
char_u *ll_exp_name; // NULL or expanded name in allocated memory.
+
+ scid_T ll_sid; // for an imported item: the script ID it was
+ // imported from; zero otherwise
+
typval_T *ll_tv; // Typeval of item being used. If "newkey"
// isn't NULL it's the Dict to which to add
// the item.