Generate parameter pattern-match IR from pattern IR (#4388)

Also propagate the pattern IR along with the pattern-match IR, and use
it where appropriate.

Strictly speaking, some parts of the pattern-match IR are allocated
eagerly, while traversing the pattern's parse tree, but they still
aren't actually emitted until we traverse the associated pattern insts.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
Geoff Romer
2024-10-16 19:15:29 +00:00
committed by GitHub
co-authored by Jon Ross-Perkins
parent 4a73b36688
commit 9d942f4633
347 changed files with 9148 additions and 5802 deletions
+3 -3
View File
@@ -377,9 +377,9 @@ auto DeclNameStack::ResolveAsScope(const NameContext& name_context,
return InvalidResult;
}
auto new_params = DeclParams(name.name_loc_id, name.first_param_node_id,
name.last_param_node_id, name.implicit_params_id,
name.params_id);
auto new_params = DeclParams(
name.name_loc_id, name.first_param_node_id, name.last_param_node_id,
name.implicit_param_patterns_id, name.param_patterns_id);
// Find the scope corresponding to the resolved instruction.
// TODO: When diagnosing qualifiers on names, print a diagnostic that talks