Allocate CallParamIndexes eagerly (#6540)

This approach is more robust because there's no intermediate state where
the `ParamPattern` insts have been created, but don't yet have their
final values.
This commit is contained in:
Geoff Romer
2026-01-05 19:38:52 +00:00
committed by GitHub
parent 08051393dc
commit b72bfb918b
10 changed files with 41 additions and 38 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ auto HandleParseNode(Context& context, Parse::ReturnTypeId node_id) -> bool {
context, node_id,
{.type_id = pattern_type_id,
.subpattern_id = return_slot_pattern_id,
.index = SemIR::CallParamIndex::None});
.index = context.full_pattern_stack().NextCallParamIndex()});
context.node_stack().Push(node_id, param_pattern_id);
return true;
}