mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:41:27 +01:00
Remove most of the metaprogramming in node.h in favor of listing all the members in the typed node structs. (#3310)
Split `node.h` into separate files for ID types (`id.h`) and for typed nodes (`typed_nodes.h`). The per-node-kind data is now specified as part of declaring the typed nodes, and is removed from the node kinds x-macros, which now simply enumerate the node kinds.
This commit is contained in:
@@ -43,7 +43,7 @@ auto HandleCallExpression(Context& context, Parse::Node parse_node) -> bool {
|
||||
// Tentatively put storage for a temporary in the function's return slot.
|
||||
// This will be replaced if necessary when we perform initialization.
|
||||
auto temp_id = context.AddNode(
|
||||
SemIR::TemporaryStorage(call_expr_parse_node, callable.return_type_id));
|
||||
SemIR::TemporaryStorage{call_expr_parse_node, callable.return_type_id});
|
||||
context.ParamOrArgSave(temp_id);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ auto HandleCallExpression(Context& context, Parse::Node parse_node) -> bool {
|
||||
}
|
||||
|
||||
auto call_node_id = context.AddNode(
|
||||
SemIR::Call(call_expr_parse_node, type_id, callee_id, refs_id));
|
||||
SemIR::Call{call_expr_parse_node, type_id, callee_id, refs_id});
|
||||
|
||||
context.node_stack().Push(parse_node, call_node_id);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user