mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 17:51:05 +01:00
Add value store to be shared across compile stages. (#3311)
This updates lexing to use the data. I'll do checking separately, just to split changes. Note the ValueStore structure is also set up such that SemIR::File can use it for other fields. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
629c63c7d1
commit
d13f76e001
@@ -13,7 +13,7 @@ auto DeclarationNameStack::MakeEmptyNameContext() -> NameContext {
|
||||
}
|
||||
|
||||
auto DeclarationNameStack::MakeUnqualifiedName(Parse::Node parse_node,
|
||||
SemIR::StringId name_id)
|
||||
StringId name_id)
|
||||
-> NameContext {
|
||||
NameContext context = MakeEmptyNameContext();
|
||||
ApplyNameQualifierTo(context, parse_node, name_id);
|
||||
@@ -106,14 +106,13 @@ auto DeclarationNameStack::ApplyExpressionQualifier(Parse::Node parse_node,
|
||||
}
|
||||
|
||||
auto DeclarationNameStack::ApplyNameQualifier(Parse::Node parse_node,
|
||||
SemIR::StringId name_id) -> void {
|
||||
StringId name_id) -> void {
|
||||
ApplyNameQualifierTo(declaration_name_stack_.back(), parse_node, name_id);
|
||||
}
|
||||
|
||||
auto DeclarationNameStack::ApplyNameQualifierTo(NameContext& name_context,
|
||||
Parse::Node parse_node,
|
||||
SemIR::StringId name_id)
|
||||
-> void {
|
||||
StringId name_id) -> void {
|
||||
if (CanResolveQualifier(name_context, parse_node)) {
|
||||
// For identifier nodes, we need to perform a lookup on the identifier.
|
||||
// This means the input node_id is actually a string ID.
|
||||
|
||||
Reference in New Issue
Block a user