Make SemIR::File access more terse. (#3331)

1. In general, `semantics_ir` -> `sem_ir`, to match the directory name.
2. For the list of `ValueStore`-related accessors on `SemIR::File`, add
them to `check`'s `Context` object, shortening access.
This commit is contained in:
Jon Ross-Perkins
2023-10-24 21:05:46 +00:00
committed by GitHub
parent b2cfd5a8a8
commit e6634d240f
34 changed files with 433 additions and 509 deletions
+2 -3
View File
@@ -34,10 +34,9 @@ auto HandleArrayExpression(Context& context, Parse::Node parse_node) -> bool {
context.node_stack()
.PopAndDiscardSoloParseNode<Parse::NodeKind::ArrayExpressionSemi>();
auto element_type_node_id = context.node_stack().PopExpression();
auto bound_node = context.semantics_ir().nodes().Get(bound_node_id);
auto bound_node = context.nodes().Get(bound_node_id);
if (auto literal = bound_node.TryAs<SemIR::IntegerLiteral>()) {
const auto& bound_value =
context.semantics_ir().integers().Get(literal->integer_id);
const auto& bound_value = context.integers().Get(literal->integer_id);
// TODO: Produce an error if the array type is too large.
if (bound_value.getActiveBits() <= 64) {
context.AddNodeAndPush(