Makes function symbol_cache_add() add symbols with the same name into the head of the entry list. This allows find_symbol() to pick the last defined symbol when there are multiple symbols with the same name, thus returning it the old behavior it had before the adoption of the hashtable-based symbol search algorithm, and fixing a problem with findglb() returning wrong symbols when being called from add_constant() (see #597).
Updated with a much more simple fix that doesn't introduce any extra parameters for function findglb() and just returns the old behavior for function find_symbol() (see the 1'st post for details).
What this PR does / why we need it:
Makes function
symbol_cache_add()
add symbols with the same name into the head of the entry list. This allowsfind_symbol()
to pick the last defined symbol when there are multiple symbols with the same name, thus returning it the old behavior it had before the adoption of the hashtable-based symbol search algorithm, and fixing a problem withfindglb()
returning wrong symbols when being called fromadd_constant()
(see #597).Which issue(s) this PR fixes:
Fixes #597
What kind of pull this is:
Additional Documentation: