mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Move common entity fields to a 'base' struct. (#4161)
I'd considered moving DeclParams uses over, but when handling qualified names, there's a parse node instead of an instruction. I did try to unify a couple other uses though, including adding MergeDefinition. I expect `interface` will use a little more once it's more completely implemented, but maybe I'm wrong about that.
This commit is contained in:
@@ -32,8 +32,7 @@ static auto PerformCallToGenericClass(Context& context, Parse::NodeId node_id,
|
||||
// Convert the arguments to match the parameters.
|
||||
auto converted_args_id = ConvertCallArgs(
|
||||
context, node_id, /*self_id=*/SemIR::InstId::Invalid, arg_ids,
|
||||
/*return_storage_id=*/SemIR::InstId::Invalid, class_info.decl_id,
|
||||
specific_id, class_info.implicit_param_refs_id, class_info.param_refs_id);
|
||||
/*return_storage_id=*/SemIR::InstId::Invalid, class_info, specific_id);
|
||||
return context.AddInst<SemIR::Call>(node_id,
|
||||
{.type_id = SemIR::TypeId::TypeType,
|
||||
.callee_id = callee_id,
|
||||
@@ -59,9 +58,8 @@ static auto PerformCallToGenericInterface(Context& context,
|
||||
// Convert the arguments to match the parameters.
|
||||
auto converted_args_id = ConvertCallArgs(
|
||||
context, node_id, /*self_id=*/SemIR::InstId::Invalid, arg_ids,
|
||||
/*return_storage_id=*/SemIR::InstId::Invalid, interface_info.decl_id,
|
||||
specific_id, interface_info.implicit_param_refs_id,
|
||||
interface_info.param_refs_id);
|
||||
/*return_storage_id=*/SemIR::InstId::Invalid, interface_info,
|
||||
specific_id);
|
||||
return context.AddInst<SemIR::Call>(node_id,
|
||||
{.type_id = SemIR::TypeId::TypeType,
|
||||
.callee_id = callee_id,
|
||||
@@ -156,8 +154,7 @@ auto PerformCall(Context& context, Parse::NodeId node_id,
|
||||
// Convert the arguments to match the parameters.
|
||||
auto converted_args_id =
|
||||
ConvertCallArgs(context, node_id, callee_function.self_id, arg_ids,
|
||||
return_storage_id, callable.decl_id, specific_id,
|
||||
callable.implicit_param_refs_id, callable.param_refs_id);
|
||||
return_storage_id, callable, specific_id);
|
||||
auto call_inst_id =
|
||||
context.AddInst<SemIR::Call>(node_id, {.type_id = type_id,
|
||||
.callee_id = callee_id,
|
||||
|
||||
Reference in New Issue
Block a user