mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-23 19:22:43 +00:00
Non-type values were being represented as "Concrete" in the type structure's shape, which was incorrect when the value was symbolic. Now they are represented as "Concrete" or "Symbolic" as appropriate. When concrete, a matching concrete ConstantId is stored in the type structure's concrete values, so that they will be used for equality comparison. And then impl matching comparison is taught to look in the concrete values for mismatches when it finds a "Concrete" or "ConcreteOpenParen" shape on both sides of the comparison, and return false if they are not equal. This reduces the number of candidate impls selected in impl lookup, which avoids doing type deduction against impls that won't match anyway due to the concrete values in the query not matching concrete values in the impl. As a result we see fewer specifics being generated in the semir.