I was thinking along the lines of the compiler allocating an "extern" slot for each referenced global identifier, including unknown ones and class names, similar to what we currently do for declared variables. The bitcode would then address these slots directly instead of string identifiers. Each slot would initially be empty, but since we can always retrieve its corresponding name from the compiler metadata, we could easily fall back to our current behavior when necessary. When linking the code, we could fill these slots with direct pointers to the actual variables for dims, etc. For other identifiers, we could resolve and populate the slots opportunistically whenever we run into them for the first time (unless no other limitations apply). I guess `scriptdisp_entry_t` pointers could be used for these slots, but I'm not sure, there might be a better representation. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11196#note_143645