mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:10:12 +01:00
The CompleteFacetType value store is now a RelationalValueStore. This type of store uses some _other_ id as the key for insertion. It allows checking if values of the _other_ id are present in the store, since those ids are handed out by another store and will (necessarily) exist before there is a matching value in the RelationalValueStore. The lookup for precense of the _other_ id returns the id of a value in the RelationalValueStore. That id can be used to get the value out of the store. For our use case, the RelationalValueStore maps from FacetTypeId to CompleteFacetTypeId. So you add a CompleteFacetType to the store with a FacetTypeId. Then you can query with a FacetTypeId to see if there exists a CompleteFacetTypeId. And if there is, you can use that CompleteFacetTypeId thereafter to get the CompleteFacetType value from the store. This removes the need for ValueStore::GetMutable() and removes the method. FacetTypeInfo no longer has a field that needs to be carefully excluded from hash and comparison.