mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 11:55:51 +01:00
Give the .Self instruction a location (#7147)
This lets us stop eliding it in textual semir tests with dump ranges. Previously it would always get elided, even though it was part of the range being dumped, and was referred to by other instructions in the dump range. Since each `.Self` is unique (can change its type if not its value) in a facet type, having each one distinct by location also aids understanding.
This commit is contained in:
@@ -411,13 +411,12 @@ auto HandleParseNode(Context& context, Parse::FormBindingPatternId node_id)
|
||||
}
|
||||
|
||||
auto HandleParseNode(Context& context,
|
||||
Parse::CompileTimeBindingPatternStartId /*node_id*/)
|
||||
-> bool {
|
||||
Parse::CompileTimeBindingPatternStartId node_id) -> bool {
|
||||
// Make a scope to contain the `.Self` facet value for use in the type of the
|
||||
// compile time binding. This is popped when handling the
|
||||
// CompileTimeBindingPatternId.
|
||||
context.scope_stack().PushForSameRegion();
|
||||
MakePeriodSelfFacetValue(context, GetEmptyFacetType(context));
|
||||
MakePeriodSelfFacetValue(context, node_id, GetEmptyFacetType(context));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user