78a3f382
by Francis De Brabandere at 2026-06-19T19:01:09+02:00
vbscript: Store global variables and functions in a single tagged tree.
ScriptDisp kept separate var_tree and func_tree even though a global name
resolves to a single member. Replace them with one tree of scriptdisp_entry_t
nodes that tag their payload (a variable or a function), so the global
identifier path does one lookup instead of two and a name maps to exactly one
member. The tagged payload leaves room for further kinds without adding more
trees.
This makes re-declaration match native: a Sub or Function re-declares a prior
Dim, Sub or Function of the same name, while a Dim keeps an existing variable
or function (a shadowed const is still replaced by a fresh variable).