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:
Jon Ross-Perkins
2023-10-20 15:00:53 +00:00
committed by GitHub
co-authored by Richard Smith
parent 629c63c7d1
commit d13f76e001
26 changed files with 389 additions and 227 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ auto HandleStructFieldUnknown(Context& context, Parse::Node parse_node)
auto HandleStructFieldValue(Context& context, Parse::Node parse_node) -> bool {
auto [value_parse_node, value_node_id] =
context.node_stack().PopExpressionWithParseNode();
SemIR::StringId name_id = context.node_stack().Pop<Parse::NodeKind::Name>();
StringId name_id = context.node_stack().Pop<Parse::NodeKind::Name>();
// Store the name for the type.
context.args_type_info_stack().AddNode(SemIR::StructTypeField(