mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 14:01:05 +01: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:
co-authored by
dependabot[bot]
Nicholas Bishop
Jon Ross-Perkins
Dana Jansens
Boaz Brickner
Richard Smith
Carbon Infra Bot
MK4070
Christopher Di Bella
parent
2327b62b5f
commit
21291b4cc3
@@ -2350,7 +2350,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %.dde: Core.Form = init_form %empty_struct_type, call_param0 [concrete]
|
||||
// CHECK:STDOUT: %.469: Core.Form = init_form %empty_struct_type [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
|
||||
// CHECK:STDOUT: %MakeEmpty.type: type = fn_type @MakeEmpty [concrete]
|
||||
// CHECK:STDOUT: %MakeEmpty: %MakeEmpty.type = struct_value () [concrete]
|
||||
@@ -2410,7 +2410,7 @@ fn F() {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc6_20.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_20.2: type = converted %.loc6_20.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %.loc6_20.3: Core.Form = init_form %.loc6_20.2, call_param0 [concrete = constants.%.dde]
|
||||
// CHECK:STDOUT: %.loc6_20.3: Core.Form = init_form %.loc6_20.2 [concrete = constants.%.469]
|
||||
// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -2525,7 +2525,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %struct_type.a.b.c.0b6: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete]
|
||||
// CHECK:STDOUT: %.386: Core.Form = init_form %struct_type.a.b.c.0b6, call_param0 [concrete]
|
||||
// CHECK:STDOUT: %.55b: Core.Form = init_form %struct_type.a.b.c.0b6 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.8ae: type = pattern_type %struct_type.a.b.c.0b6 [concrete]
|
||||
// CHECK:STDOUT: %MakeThreeFields.type: type = fn_type @MakeThreeFields [concrete]
|
||||
// CHECK:STDOUT: %MakeThreeFields: %MakeThreeFields.type = struct_value () [concrete]
|
||||
@@ -2594,7 +2594,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %i32.loc6_39: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc6_48: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete = constants.%struct_type.a.b.c.0b6]
|
||||
// CHECK:STDOUT: %.loc6: Core.Form = init_form %struct_type.a.b.c, call_param0 [concrete = constants.%.386]
|
||||
// CHECK:STDOUT: %.loc6: Core.Form = init_form %struct_type.a.b.c [concrete = constants.%.55b]
|
||||
// CHECK:STDOUT: %return.param: ref %struct_type.a.b.c.0b6 = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %struct_type.a.b.c.0b6 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -2804,7 +2804,7 @@ fn F() {
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
||||
// CHECK:STDOUT: %.842: Core.Form = init_form %empty_tuple.type, call_param0 [concrete]
|
||||
// CHECK:STDOUT: %.262: Core.Form = init_form %empty_tuple.type [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
||||
// CHECK:STDOUT: %MakeEmpty.type: type = fn_type @MakeEmpty [concrete]
|
||||
// CHECK:STDOUT: %MakeEmpty: %MakeEmpty.type = struct_value () [concrete]
|
||||
@@ -2828,7 +2828,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %tuple.type.ff9: type = tuple_type (type, type, type) [concrete]
|
||||
// CHECK:STDOUT: %tuple.e64: %tuple.type.ff9 = tuple_value (%i32, %i32, %i32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.189: type = tuple_type (%i32, %i32, %i32) [concrete]
|
||||
// CHECK:STDOUT: %.594: Core.Form = init_form %tuple.type.189, call_param0 [concrete]
|
||||
// CHECK:STDOUT: %.074: Core.Form = init_form %tuple.type.189 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.b5a: type = pattern_type %tuple.type.189 [concrete]
|
||||
// CHECK:STDOUT: %MakeThreeFields.type: type = fn_type @MakeThreeFields [concrete]
|
||||
// CHECK:STDOUT: %MakeThreeFields: %MakeThreeFields.type = struct_value () [concrete]
|
||||
@@ -2902,7 +2902,7 @@ fn F() {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc9_20.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_20.2: type = converted %.loc9_20.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc9_20.3: Core.Form = init_form %.loc9_20.2, call_param0 [concrete = constants.%.842]
|
||||
// CHECK:STDOUT: %.loc9_20.3: Core.Form = init_form %.loc9_20.2 [concrete = constants.%.262]
|
||||
// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -2934,7 +2934,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %i32.loc65_36: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc65_39.1: %tuple.type.ff9 = tuple_literal (%i32.loc65_26, %i32.loc65_31, %i32.loc65_36) [concrete = constants.%tuple.e64]
|
||||
// CHECK:STDOUT: %.loc65_39.2: type = converted %.loc65_39.1, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
|
||||
// CHECK:STDOUT: %.loc65_39.3: Core.Form = init_form %.loc65_39.2, call_param0 [concrete = constants.%.594]
|
||||
// CHECK:STDOUT: %.loc65_39.3: Core.Form = init_form %.loc65_39.2 [concrete = constants.%.074]
|
||||
// CHECK:STDOUT: %return.param: ref %tuple.type.189 = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %tuple.type.189 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -238,7 +238,7 @@ fn Var() {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %u8: type = class_type @UInt, @UInt(%int_8) [concrete]
|
||||
// CHECK:STDOUT: %.0c8: Core.Form = init_form %u8, call_param0 [concrete]
|
||||
// CHECK:STDOUT: %.471: Core.Form = init_form %u8 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.8f3: type = pattern_type %u8 [concrete]
|
||||
// CHECK:STDOUT: %GetU8.type: type = fn_type @GetU8 [concrete]
|
||||
// CHECK:STDOUT: %GetU8: %GetU8.type = struct_value () [concrete]
|
||||
@@ -291,7 +291,7 @@ fn Var() {
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.8f3 = out_param_pattern %return.patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %u8: type = type_literal constants.%u8 [concrete = constants.%u8]
|
||||
// CHECK:STDOUT: %.loc8_15: Core.Form = init_form %u8, call_param0 [concrete = constants.%.0c8]
|
||||
// CHECK:STDOUT: %.loc8_15: Core.Form = init_form %u8 [concrete = constants.%.471]
|
||||
// CHECK:STDOUT: %return.param: ref %u8 = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %u8 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user