mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 03:56:40 +00:00
StringifyTypeExpr has gotten a little long. I know there's some preference for the effects of explicitly handling cases, but maybe it's okay to adopt an overload pattern similar to what we do elsewhere? Note I'm trying to force types to provide overloads, as a case which are clearly intended to be handled. Also, perhaps subtly, the list of "singleton" instructions previously included Vtable, which is not a singleton. With this change, which instead directly handles singleton instructions by `requires(IsSingletonInstKind(InstT::Kind))`, Vtable will switch default handling. But it's not directly printed for types, so there is no net impact on IR. At present I have this split from `StepStack` because with these changes it'd no longer be a simple stack. It felt like maybe the type separation would help readers.