mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:40:12 +01:00
Replace `refine_type_action` with `refine_inst_action`, and generate a `specific_inst` instead of an `as_compatible` to represent the specific version of an instruction that's used as an input to a template action. This gives us a place to handle other properties of the instruction that might vary from generic to specific beyond its type, such as its constant value and its expression category. For now, we provide a non-template-dependent constant value to the `specific_inst` in addition to the non-template-dependent type we have traditionally provided. This doesn't seem to matter for any current actions, but sets us up to better handle future actions. The `specific_inst` representation also allows downstream consumers of the instruction to track which specific they should be requesting information from. Providing a correct expression category for `specific_inst` will be handled in a future PR.