You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework how 'twin' Refs are represented in GlobalNamespace
A 'twin' ref is created when a name reference in the AST is both a 'get' and 'set', like 'a.b' in the following expression:
`c = a.b = 0;`.
Currently GlobalNamespace creates two unique Ref objects in this case, one "get" and one "set". This CL adds a new "get and set" ref type and creates one such Ref, not two.
Why?
* overall decrease in code size
* I think this model is overall easier to understand
* helps runtime perf & memory usage by consolidating two fields tracking Refs in GlobalNamespace.Name into one
before: refs were tracked both in a `Set<Ref>` and `Map<Node, ImmutableList<Ref>>`
after: refs are only tracked in a single `Map<Node, Ref>`
PiperOrigin-RevId: 499523572
0 commit comments