mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 09:41:08 +01:00
Rename semantics to semantics_ir (#2858)
This is a rename of a commonly used accessor. I tend to prefer shorter names, but it's semantics_ir in LoweringContext, and it feels odder to shorten to semantics there than to lengthen to semantics_ir here. I already have builtins_ir around here, too. I think it's helpful to use consistent names for semantics_ir since they're dealing with essentially the same thing.
This commit is contained in:
@@ -51,9 +51,9 @@ auto SemanticsHandleFunctionDefinitionStart(SemanticsContext& context,
|
||||
ParseNodeKind::FunctionIntroducer);
|
||||
|
||||
auto name_str = context.parse_tree().GetNodeText(name_node);
|
||||
auto name_id = context.semantics().AddString(name_str);
|
||||
auto name_id = context.semantics_ir().AddString(name_str);
|
||||
|
||||
auto callable_id = context.semantics().AddCallable(
|
||||
auto callable_id = context.semantics_ir().AddCallable(
|
||||
{.param_refs_id = param_refs_id, .return_type_id = return_type_id});
|
||||
auto decl_id = context.AddNode(
|
||||
SemanticsNode::FunctionDeclaration::Make(fn_node, name_id, callable_id));
|
||||
@@ -61,8 +61,8 @@ auto SemanticsHandleFunctionDefinitionStart(SemanticsContext& context,
|
||||
|
||||
context.node_block_stack().Push();
|
||||
context.PushScope();
|
||||
for (auto ref_id : context.semantics().GetNodeBlock(param_refs_id)) {
|
||||
auto ref = context.semantics().GetNode(ref_id);
|
||||
for (auto ref_id : context.semantics_ir().GetNodeBlock(param_refs_id)) {
|
||||
auto ref = context.semantics_ir().GetNode(ref_id);
|
||||
auto [name_id, target_id] = ref.GetAsBindName();
|
||||
context.AddNameToLookupIgnoreConflicts(name_id, target_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user