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 -5
View File
@@ -38,10 +38,9 @@ static auto GetOperatorOpFunction(Context& context, Parse::AnyExprId node_id,
return SemIR::InstId::Invalid;
}
// TODO: For a parameterized interface, find the corresponding generic
// instance.
// TODO: For a parameterized interface, find the corresponding specific.
LookupScope scope = {.name_scope_id = interface_scope_id,
.instance_id = SemIR::GenericInstanceId::Invalid};
.specific_id = SemIR::SpecificId::Invalid};
// Lookup `Interface.Op`.
auto op_ident_id = context.identifiers().Add(op.op_name);
@@ -53,8 +52,8 @@ static auto GetOperatorOpFunction(Context& context, Parse::AnyExprId node_id,
}
// Look through import_refs and aliases.
auto op_const_id = GetConstantValueInInstance(
context.sem_ir(), op_result.instance_id, op_result.inst_id);
auto op_const_id = GetConstantValueInSpecific(
context.sem_ir(), op_result.specific_id, op_result.inst_id);
auto op_id = context.constant_values().GetInstId(op_const_id);
// We expect it to be an associated function.