cb45fee9
by Francis De Brabandere at 2026-06-22T20:50:41+02:00
vbscript: Cache host DISPIDs as entries in the unified global tree.
Identifier lookups that resolve into a named item's host dispatch called
GetIDsOfNames on the host for every access, while native vbscript resolves
a name once and reuses the DISPID afterwards.
Building on the unified member tree, collapse the lookup_global_vars and
lookup_global_funcs pair into a single member lookup that also understands
host properties, and record a resolved host DISPID as a SCRIPTDISP_HOSTPROP
entry in the named item's script dispatch. A subsequent lookup finds the
entry directly and never queries the host dispatch again. The entry lives
and dies with the named item's dispatch, and is kept out of the script
dispatch's own member enumeration. A later Dim or declaration of the same
name shadows the cached host property, matching native precedence.
This replaces the separate per-named-item DISPID cache with a single
representation in the global tree.