mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-26 21:21:19 +00:00
Remove InitForm::index (#6817)
This ensures that equal forms always have equal representations (because the index depends on how the form is used, not on the value of the form itself). As a byproduct, also remove `NextCallParamIndex`. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nicholas Bishop <nicholasbishop@google.com> Co-authored-by: Jon Ross-Perkins <jperkins@google.com> Co-authored-by: Dana Jansens <danakj@orodu.net> Co-authored-by: Boaz Brickner <brickner@google.com> Co-authored-by: Richard Smith <richard@metafoo.co.uk> Co-authored-by: Carbon Infra Bot <carbon-external-infra@google.com> Co-authored-by: MK4070 <60286678+MK4070@users.noreply.github.com> Co-authored-by: Christopher Di Bella <cjdb@google.com>
This commit is contained in:
211 files changed
+1729
-1703
No files matched your search
@@ -280,9 +280,6 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
|
||||
if (node_kind == Parse::NodeKind::LetBindingPattern ||
|
||||
node_kind == Parse::NodeKind::FormBindingPattern) {
|
||||
auto type_id = context.insts().GetAttachedType(result_inst_id);
|
||||
// Allocate a dummy index to preserve index of subsequent `InitForm`s.
|
||||
// TODO: Remove this once we remove `InitForm::index`.
|
||||
context.full_pattern_stack().NextCallParamIndex();
|
||||
if (is_ref) {
|
||||
result_inst_id = AddPatternInst<SemIR::RefParamPattern>(
|
||||
context, node_id,
|
||||
|
||||
Reference in new issue
Block a user