mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 03:16:40 +00:00
Make Subst perform "recursion" on the RHS instructions as they are replaced, effectively doing a depth-first traversal through the rewrite constraints doing replacements. This allows us to fully compute individual associated constants in the minimal amount of work, and cache the results so they can be reused cheaply in cases where the rewrite constraints generate an exponential number of references to associated constants. Fixes https://github.com/carbon-language/carbon-lang/issues/5672