Rename "generic instance" to "specific" throughout the toolchain. (#4165)

As discussed in toolchain meeting, we want to avoid overloading the
meaning of "instance", and "specific" was the best name we found. It's a
little unorthodox and inventive, but hopefully over time will become as
unsurprising as the term "generic" is.
This commit is contained in:
Richard Smith
2024-07-25 16:42:01 +00:00
committed by GitHub
parent 70c20be91b
commit 3cb769a053
41 changed files with 370 additions and 396 deletions
+4 -4
View File
@@ -144,7 +144,7 @@ auto HandleParseNode(Context& context,
// Enter the interface scope.
context.scope_stack().Push(
interface_decl_id, interface_info.scope_id,
context.generics().GetSelfInstance(interface_info.generic_id));
context.generics().GetSelfSpecific(interface_info.generic_id));
StartGenericDefinition(context);
context.inst_block_stack().Push();
@@ -157,13 +157,13 @@ auto HandleParseNode(Context& context,
if (!interface_info.is_defined()) {
SemIR::TypeId self_type_id = SemIR::TypeId::Invalid;
if (interface_info.is_generic()) {
auto instance_id =
context.generics().GetSelfInstance(interface_info.generic_id);
auto specific_id =
context.generics().GetSelfSpecific(interface_info.generic_id);
self_type_id = context.GetTypeIdForTypeConstant(
TryEvalInst(context, SemIR::InstId::Invalid,
SemIR::InterfaceType{.type_id = SemIR::TypeId::TypeType,
.interface_id = interface_id,
.instance_id = instance_id}));
.specific_id = specific_id}));
} else {
self_type_id = context.GetTypeIdForTypeInst(interface_decl_id);
}