diff --git a/toolchain/check/testdata/class/base_field.carbon b/toolchain/check/testdata/class/base_field.carbon index 83b8039df481..234f72023900 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -58,7 +59,7 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -79,11 +80,11 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %ptr.loc27_30: type = ptr_type %i32 [concrete = constants.%ptr.235] +// CHECK:STDOUT: %ptr.loc28_30: type = ptr_type %i32 [concrete = constants.%ptr.235] // CHECK:STDOUT: %p.param: %ptr.404 = value_param call_param0 -// CHECK:STDOUT: %.loc27: type = splice_block %ptr.loc27_21 [concrete = constants.%ptr.404] { +// CHECK:STDOUT: %.loc28: type = splice_block %ptr.loc28_21 [concrete = constants.%ptr.404] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived] -// CHECK:STDOUT: %ptr.loc27_21: type = ptr_type %Derived.ref [concrete = constants.%ptr.404] +// CHECK:STDOUT: %ptr.loc28_21: type = ptr_type %Derived.ref [concrete = constants.%ptr.404] // CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.404 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.235 = out_param call_param1 @@ -92,35 +93,35 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc15: %Base.elem = field_decl a, element0 [concrete] // CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc16: %Base.elem = field_decl b, element1 [concrete] +// CHECK:STDOUT: %.loc16: %Base.elem = field_decl a, element0 [concrete] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc17: %Base.elem = field_decl c, element2 [concrete] +// CHECK:STDOUT: %.loc17: %Base.elem = field_decl b, element1 [concrete] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc18: %Base.elem = field_decl c, element2 [concrete] // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete = constants.%struct_type.a.b.c] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [concrete = constants.%complete_type.ebc] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: .a = %.loc15 -// CHECK:STDOUT: .b = %.loc16 -// CHECK:STDOUT: .c = %.loc17 +// CHECK:STDOUT: .a = %.loc16 +// CHECK:STDOUT: .b = %.loc17 +// CHECK:STDOUT: .c = %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [concrete = constants.%Base] -// CHECK:STDOUT: %.loc21: %Derived.elem.69e = base_decl %Base.ref, element0 [concrete] -// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc23: %Derived.elem.344 = field_decl d, element1 [concrete] +// CHECK:STDOUT: %.loc22: %Derived.elem.69e = base_decl %Base.ref, element0 [concrete] // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc24: %Derived.elem.344 = field_decl e, element2 [concrete] +// CHECK:STDOUT: %.loc24: %Derived.elem.344 = field_decl d, element1 [concrete] +// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc25: %Derived.elem.344 = field_decl e, element2 [concrete] // CHECK:STDOUT: %struct_type.base.d.e: type = struct_type {.base: %Base, .d: %i32, .e: %i32} [concrete = constants.%struct_type.base.d.e.6a7] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e [concrete = constants.%complete_type.401] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -128,9 +129,9 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .Base = -// CHECK:STDOUT: .base = %.loc21 -// CHECK:STDOUT: .d = %.loc23 -// CHECK:STDOUT: .e = %.loc24 +// CHECK:STDOUT: .base = %.loc22 +// CHECK:STDOUT: .d = %.loc24 +// CHECK:STDOUT: .e = %.loc25 // CHECK:STDOUT: .c = // CHECK:STDOUT: extend %Base.ref // CHECK:STDOUT: } @@ -138,12 +139,12 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: fn @Access(%p.param: %ptr.404) -> %ptr.235 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.404 = name_ref p, %p -// CHECK:STDOUT: %.loc28_12: ref %Derived = deref %p.ref -// CHECK:STDOUT: %c.ref: %Base.elem = name_ref c, @Base.%.loc17 [concrete = @Base.%.loc17] -// CHECK:STDOUT: %.loc28_15.1: ref %Base = class_element_access %.loc28_12, element0 -// CHECK:STDOUT: %.loc28_15.2: ref %Base = converted %.loc28_12, %.loc28_15.1 -// CHECK:STDOUT: %.loc28_15.3: ref %i32 = class_element_access %.loc28_15.2, element2 -// CHECK:STDOUT: %addr: %ptr.235 = addr_of %.loc28_15.3 +// CHECK:STDOUT: %.loc29_12: ref %Derived = deref %p.ref +// CHECK:STDOUT: %c.ref: %Base.elem = name_ref c, @Base.%.loc18 [concrete = @Base.%.loc18] +// CHECK:STDOUT: %.loc29_15.1: ref %Base = class_element_access %.loc29_12, element0 +// CHECK:STDOUT: %.loc29_15.2: ref %Base = converted %.loc29_12, %.loc29_15.1 +// CHECK:STDOUT: %.loc29_15.3: ref %i32 = class_element_access %.loc29_15.2, element2 +// CHECK:STDOUT: %addr: %ptr.235 = addr_of %.loc29_15.3 // CHECK:STDOUT: return %addr // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_function_unqualified.carbon b/toolchain/check/testdata/class/base_function_unqualified.carbon index 8b1018776a1a..6aba856c54f4 100644 --- a/toolchain/check/testdata/class/base_function_unqualified.carbon +++ b/toolchain/check/testdata/class/base_function_unqualified.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -77,7 +78,7 @@ fn Derived.H() { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [concrete = constants.%Base] -// CHECK:STDOUT: %.loc19: %Derived.elem = base_decl %Base.ref, element0 [concrete] +// CHECK:STDOUT: %.loc20: %Derived.elem = base_decl %Base.ref, element0 [concrete] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {} // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [concrete = constants.%struct_type.base] @@ -87,7 +88,7 @@ fn Derived.H() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .Base = -// CHECK:STDOUT: .base = %.loc19 +// CHECK:STDOUT: .base = %.loc20 // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: .F = diff --git a/toolchain/check/testdata/class/base_method_qualified.carbon b/toolchain/check/testdata/class/base_method_qualified.carbon index 8c440bb3ca69..a9ca9723a24d 100644 --- a/toolchain/check/testdata/class/base_method_qualified.carbon +++ b/toolchain/check/testdata/class/base_method_qualified.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -84,13 +85,13 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .Derived = %Derived.decl.loc14 +// CHECK:STDOUT: .Derived = %Derived.decl.loc15 // CHECK:STDOUT: .Base = %Base.decl // CHECK:STDOUT: .Call = %Call.decl // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl @@ -98,9 +99,9 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: .PassDerivedToBaseIndirect = %PassDerivedToBaseIndirect.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Derived.decl.loc14: type = class_decl @Derived [concrete = constants.%Derived] {} {} +// CHECK:STDOUT: %Derived.decl.loc15: type = class_decl @Derived [concrete = constants.%Derived] {} {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [concrete = constants.%Base] {} {} -// CHECK:STDOUT: %Derived.decl.loc21: type = class_decl @Derived [concrete = constants.%Derived] {} {} +// CHECK:STDOUT: %Derived.decl.loc22: type = class_decl @Derived [concrete = constants.%Derived] {} {} // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] { // CHECK:STDOUT: %a.patt: %pattern_type.fb9 = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.fb9 = value_param_pattern %a.patt, call_param0 [concrete] @@ -110,7 +111,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: %Derived = value_param call_param0 -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc14 [concrete = constants.%Derived] +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc15 [concrete = constants.%Derived] // CHECK:STDOUT: %a: %Derived = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -124,8 +125,8 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %p.param: %ptr.404 = value_param call_param0 -// CHECK:STDOUT: %.loc32: type = splice_block %ptr [concrete = constants.%ptr.404] { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc14 [concrete = constants.%Derived] +// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.404] { +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc15 [concrete = constants.%Derived] // CHECK:STDOUT: %ptr: type = ptr_type %Derived.ref [concrete = constants.%ptr.404] // CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.404 = bind_name p, %p.param @@ -141,7 +142,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: %Derived = value_param call_param0 -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc14 [concrete = constants.%Derived] +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc15 [concrete = constants.%Derived] // CHECK:STDOUT: %a: %Derived = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -155,8 +156,8 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %p.param: %ptr.404 = value_param call_param0 -// CHECK:STDOUT: %.loc40: type = splice_block %ptr [concrete = constants.%ptr.404] { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc14 [concrete = constants.%Derived] +// CHECK:STDOUT: %.loc41: type = splice_block %ptr [concrete = constants.%ptr.404] { +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc15 [concrete = constants.%Derived] // CHECK:STDOUT: %ptr: type = ptr_type %Derived.ref [concrete = constants.%ptr.404] // CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.404 = bind_name p, %p.param @@ -167,7 +168,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [concrete = constants.%Base] -// CHECK:STDOUT: %.loc22: %Derived.elem = base_decl %Base.ref, element0 [concrete] +// CHECK:STDOUT: %.loc23: %Derived.elem = base_decl %Base.ref, element0 [concrete] // CHECK:STDOUT: %F.decl: %F.type.5da = fn_decl @F.2 [concrete = constants.%F.fa3] { // CHECK:STDOUT: %self.patt: %pattern_type.fb9 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.fb9 = value_param_pattern %self.patt, call_param0 [concrete] @@ -191,7 +192,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .Base = -// CHECK:STDOUT: .base = %.loc22 +// CHECK:STDOUT: .base = %.loc23 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: extend %Base.ref @@ -221,7 +222,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %self.param: %Derived = value_param call_param0 -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc14 [concrete = constants.%Derived] +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc15 [concrete = constants.%Derived] // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -251,13 +252,13 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [concrete = constants.%Base] // CHECK:STDOUT: %F.ref: %F.type.7c6 = name_ref F, @Base.%F.decl [concrete = constants.%F.d17] // CHECK:STDOUT: %F.bound: = bound_method %a.ref, %F.ref -// CHECK:STDOUT: %.loc29_10.1: ref %Base = class_element_access %a.ref, element0 -// CHECK:STDOUT: %.loc29_10.2: ref %Base = converted %a.ref, %.loc29_10.1 -// CHECK:STDOUT: %.loc29_10.3: %Base = bind_value %.loc29_10.2 -// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc29_10.3) -// CHECK:STDOUT: %.loc29_22.1: %i32 = value_of_initializer %F.call -// CHECK:STDOUT: %.loc29_22.2: %i32 = converted %F.call, %.loc29_22.1 -// CHECK:STDOUT: return %.loc29_22.2 +// CHECK:STDOUT: %.loc30_10.1: ref %Base = class_element_access %a.ref, element0 +// CHECK:STDOUT: %.loc30_10.2: ref %Base = converted %a.ref, %.loc30_10.1 +// CHECK:STDOUT: %.loc30_10.3: %Base = bind_value %.loc30_10.2 +// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc30_10.3) +// CHECK:STDOUT: %.loc30_22.1: %i32 = value_of_initializer %F.call +// CHECK:STDOUT: %.loc30_22.2: %i32 = converted %F.call, %.loc30_22.1 +// CHECK:STDOUT: return %.loc30_22.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallIndirect(%p.param: %ptr.404) -> %i32 { @@ -265,15 +266,15 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %p.ref: %ptr.404 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [concrete = constants.%Base] // CHECK:STDOUT: %F.ref: %F.type.7c6 = name_ref F, @Base.%F.decl [concrete = constants.%F.d17] -// CHECK:STDOUT: %.loc33_11.1: ref %Derived = deref %p.ref -// CHECK:STDOUT: %F.bound: = bound_method %.loc33_11.1, %F.ref -// CHECK:STDOUT: %.loc33_11.2: ref %Base = class_element_access %.loc33_11.1, element0 -// CHECK:STDOUT: %.loc33_11.3: ref %Base = converted %.loc33_11.1, %.loc33_11.2 -// CHECK:STDOUT: %.loc33_11.4: %Base = bind_value %.loc33_11.3 -// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc33_11.4) -// CHECK:STDOUT: %.loc33_23.1: %i32 = value_of_initializer %F.call -// CHECK:STDOUT: %.loc33_23.2: %i32 = converted %F.call, %.loc33_23.1 -// CHECK:STDOUT: return %.loc33_23.2 +// CHECK:STDOUT: %.loc34_11.1: ref %Derived = deref %p.ref +// CHECK:STDOUT: %F.bound: = bound_method %.loc34_11.1, %F.ref +// CHECK:STDOUT: %.loc34_11.2: ref %Base = class_element_access %.loc34_11.1, element0 +// CHECK:STDOUT: %.loc34_11.3: ref %Base = converted %.loc34_11.1, %.loc34_11.2 +// CHECK:STDOUT: %.loc34_11.4: %Base = bind_value %.loc34_11.3 +// CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc34_11.4) +// CHECK:STDOUT: %.loc34_23.1: %i32 = value_of_initializer %F.call +// CHECK:STDOUT: %.loc34_23.2: %i32 = converted %F.call, %.loc34_23.1 +// CHECK:STDOUT: return %.loc34_23.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @PassDerivedToBase(%a.param: %Derived) -> %i32 { @@ -283,9 +284,9 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %G.ref: %G.type.6ee = name_ref G, @Base.%G.decl [concrete = constants.%G.663] // CHECK:STDOUT: %G.bound: = bound_method %a.ref, %G.ref // CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%a.ref) -// CHECK:STDOUT: %.loc37_22.1: %i32 = value_of_initializer %G.call -// CHECK:STDOUT: %.loc37_22.2: %i32 = converted %G.call, %.loc37_22.1 -// CHECK:STDOUT: return %.loc37_22.2 +// CHECK:STDOUT: %.loc38_22.1: %i32 = value_of_initializer %G.call +// CHECK:STDOUT: %.loc38_22.2: %i32 = converted %G.call, %.loc38_22.1 +// CHECK:STDOUT: return %.loc38_22.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @PassDerivedToBaseIndirect(%p.param: %ptr.404) -> %i32 { @@ -293,12 +294,12 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %p.ref: %ptr.404 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [concrete = constants.%Base] // CHECK:STDOUT: %G.ref: %G.type.6ee = name_ref G, @Base.%G.decl [concrete = constants.%G.663] -// CHECK:STDOUT: %.loc41_11.1: ref %Derived = deref %p.ref -// CHECK:STDOUT: %G.bound: = bound_method %.loc41_11.1, %G.ref -// CHECK:STDOUT: %.loc41_11.2: %Derived = bind_value %.loc41_11.1 -// CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%.loc41_11.2) -// CHECK:STDOUT: %.loc41_23.1: %i32 = value_of_initializer %G.call -// CHECK:STDOUT: %.loc41_23.2: %i32 = converted %G.call, %.loc41_23.1 -// CHECK:STDOUT: return %.loc41_23.2 +// CHECK:STDOUT: %.loc42_11.1: ref %Derived = deref %p.ref +// CHECK:STDOUT: %G.bound: = bound_method %.loc42_11.1, %G.ref +// CHECK:STDOUT: %.loc42_11.2: %Derived = bind_value %.loc42_11.1 +// CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%.loc42_11.2) +// CHECK:STDOUT: %.loc42_23.1: %i32 = value_of_initializer %G.call +// CHECK:STDOUT: %.loc42_23.2: %i32 = converted %G.call, %.loc42_23.1 +// CHECK:STDOUT: return %.loc42_23.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index 806820cb10f7..5b955dcef6c2 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index 756df04c43cd..9efad6825492 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon b/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon index f41463d03bcc..44f2501fc729 100644 --- a/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon +++ b/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index 5cce919576cd..bfbf1abbbb5d 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -128,7 +129,7 @@ fn H() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -297,7 +298,7 @@ fn H() { // CHECK:STDOUT: %Main.import_ref.f6c = import_ref Main//extend_generic_base, inst76 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.d24 = import_ref Main//extend_generic_base, loc13_27, unloaded // CHECK:STDOUT: %Main.import_ref.77a301.2: type = import_ref Main//extend_generic_base, loc13_26, loaded [concrete = constants.%Base.7a8] -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %.e66: @Base.%Base.elem (%Base.elem.9af) = field_decl x, element0 [concrete] // CHECK:STDOUT: %.be7: %Param.elem = field_decl y, element0 [concrete] // CHECK:STDOUT: } @@ -546,7 +547,7 @@ fn H() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -784,7 +785,7 @@ fn H() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//extend_generic_symbolic_base, loc4_14, loaded [symbolic = @X.%U (constants.%U)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//extend_generic_symbolic_base, loc6_1, loaded [concrete = constants.%complete_type.357] // CHECK:STDOUT: %Main.import_ref.e8e = import_ref Main//extend_generic_symbolic_base, inst26 [no loc], unloaded diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index 65335190cdac..d667609a5423 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -73,134 +74,134 @@ class Declaration(T:! type); // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc14_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc15_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Declaration.decl: %Declaration.type = class_decl @Declaration [concrete = constants.%Declaration.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc27_19.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc27_19.2 (constants.%T)] +// CHECK:STDOUT: %T.loc28_19.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_19.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Class(%T.loc14_13.1: type) { -// CHECK:STDOUT: %T.loc14_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_13.2 (constants.%T)] +// CHECK:STDOUT: generic class @Class(%T.loc15_13.1: type) { +// CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr, @Class(%T.loc14_13.2) [symbolic = %GetAddr.type (constants.%GetAddr.type)] +// CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr, @Class(%T.loc15_13.2) [symbolic = %GetAddr.type (constants.%GetAddr.type)] // CHECK:STDOUT: %GetAddr: @Class.%GetAddr.type (%GetAddr.type) = struct_value () [symbolic = %GetAddr (constants.%GetAddr)] -// CHECK:STDOUT: %GetValue.type: type = fn_type @GetValue, @Class(%T.loc14_13.2) [symbolic = %GetValue.type (constants.%GetValue.type)] +// CHECK:STDOUT: %GetValue.type: type = fn_type @GetValue, @Class(%T.loc15_13.2) [symbolic = %GetValue.type (constants.%GetValue.type)] // CHECK:STDOUT: %GetValue: @Class.%GetValue.type (%GetValue.type) = struct_value () [symbolic = %GetValue (constants.%GetValue)] -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc14_13.2 [symbolic = %require_complete (constants.%require_complete.4ae)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc14_13.2) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.loc14_13.2 [symbolic = %Class.elem (constants.%Class.elem)] -// CHECK:STDOUT: %struct_type.k.loc25_1.2: type = struct_type {.k: @Class.%T.loc14_13.2 (%T)} [symbolic = %struct_type.k.loc25_1.2 (constants.%struct_type.k)] -// CHECK:STDOUT: %complete_type.loc25_1.2: = complete_type_witness %struct_type.k.loc25_1.2 [symbolic = %complete_type.loc25_1.2 (constants.%complete_type)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc15_13.2 [symbolic = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc15_13.2) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.loc15_13.2 [symbolic = %Class.elem (constants.%Class.elem)] +// CHECK:STDOUT: %struct_type.k.loc26_1.2: type = struct_type {.k: @Class.%T.loc15_13.2 (%T)} [symbolic = %struct_type.k.loc26_1.2 (constants.%struct_type.k)] +// CHECK:STDOUT: %complete_type.loc26_1.2: = complete_type_witness %struct_type.k.loc26_1.2 [symbolic = %complete_type.loc26_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %GetAddr.decl: @Class.%GetAddr.type (%GetAddr.type) = fn_decl @GetAddr [symbolic = @Class.%GetAddr (constants.%GetAddr)] { -// CHECK:STDOUT: %self.patt: @GetAddr.%pattern_type.loc15_19 (%pattern_type.9e0) = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @GetAddr.%pattern_type.loc15_19 (%pattern_type.9e0) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc15_14: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %return.patt: @GetAddr.%pattern_type.loc15_34 (%pattern_type.afe) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @GetAddr.%pattern_type.loc15_34 (%pattern_type.afe) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %self.patt: @GetAddr.%pattern_type.loc16_19 (%pattern_type.9e0) = binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @GetAddr.%pattern_type.loc16_19 (%pattern_type.9e0) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %.loc16_14: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] +// CHECK:STDOUT: %return.patt: @GetAddr.%pattern_type.loc16_34 (%pattern_type.afe) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @GetAddr.%pattern_type.loc16_34 (%pattern_type.afe) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc14_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %ptr.loc15_38.2: type = ptr_type %T.ref [symbolic = %ptr.loc15_38.1 (constants.%ptr.79f)] -// CHECK:STDOUT: %self.param: @GetAddr.%ptr.loc15_29.1 (%ptr.955) = value_param call_param0 -// CHECK:STDOUT: %.loc15_29: type = splice_block %ptr.loc15_29.2 [symbolic = %ptr.loc15_29.1 (constants.%ptr.955)] { -// CHECK:STDOUT: %.loc15_25: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc15_25 [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %ptr.loc15_29.2: type = ptr_type %Self.ref [symbolic = %ptr.loc15_29.1 (constants.%ptr.955)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc15_13.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %ptr.loc16_38.2: type = ptr_type %T.ref [symbolic = %ptr.loc16_38.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %self.param: @GetAddr.%ptr.loc16_29.1 (%ptr.955) = value_param call_param0 +// CHECK:STDOUT: %.loc16_29: type = splice_block %ptr.loc16_29.2 [symbolic = %ptr.loc16_29.1 (constants.%ptr.955)] { +// CHECK:STDOUT: %.loc16_25: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc16_25 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %ptr.loc16_29.2: type = ptr_type %Self.ref [symbolic = %ptr.loc16_29.1 (constants.%ptr.955)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @GetAddr.%ptr.loc15_29.1 (%ptr.955) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @GetAddr.%ptr.loc15_38.1 (%ptr.79f) = out_param call_param1 -// CHECK:STDOUT: %return: ref @GetAddr.%ptr.loc15_38.1 (%ptr.79f) = return_slot %return.param +// CHECK:STDOUT: %self: @GetAddr.%ptr.loc16_29.1 (%ptr.955) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @GetAddr.%ptr.loc16_38.1 (%ptr.79f) = out_param call_param1 +// CHECK:STDOUT: %return: ref @GetAddr.%ptr.loc16_38.1 (%ptr.79f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %GetValue.decl: @Class.%GetValue.type (%GetValue.type) = fn_decl @GetValue [symbolic = @Class.%GetValue (constants.%GetValue)] { -// CHECK:STDOUT: %self.patt: @GetValue.%pattern_type.loc20_15 (%pattern_type.3c1) = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @GetValue.%pattern_type.loc20_15 (%pattern_type.3c1) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @GetValue.%pattern_type.loc20_29 (%pattern_type.7dc) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @GetValue.%pattern_type.loc20_29 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %self.patt: @GetValue.%pattern_type.loc21_15 (%pattern_type.3c1) = binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @GetValue.%pattern_type.loc21_15 (%pattern_type.3c1) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @GetValue.%pattern_type.loc21_29 (%pattern_type.7dc) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @GetValue.%pattern_type.loc21_29 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc14_13.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc15_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @GetValue.%Class (%Class) = value_param call_param0 -// CHECK:STDOUT: %.loc20_21.1: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] { -// CHECK:STDOUT: %.loc20_21.2: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc20_21.2 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %.loc21_21.1: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] { +// CHECK:STDOUT: %.loc21_21.2: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc21_21.2 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @GetValue.%Class (%Class) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @GetValue.%T (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @GetValue.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_13.1 [symbolic = %T.loc14_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc24: @Class.%Class.elem (%Class.elem) = field_decl k, element0 [concrete] -// CHECK:STDOUT: %struct_type.k.loc25_1.1: type = struct_type {.k: %T} [symbolic = %struct_type.k.loc25_1.2 (constants.%struct_type.k)] -// CHECK:STDOUT: %complete_type.loc25_1.1: = complete_type_witness %struct_type.k.loc25_1.1 [symbolic = %complete_type.loc25_1.2 (constants.%complete_type)] -// CHECK:STDOUT: complete_type_witness = %complete_type.loc25_1.1 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_13.1 [symbolic = %T.loc15_13.2 (constants.%T)] +// CHECK:STDOUT: %.loc25: @Class.%Class.elem (%Class.elem) = field_decl k, element0 [concrete] +// CHECK:STDOUT: %struct_type.k.loc26_1.1: type = struct_type {.k: %T} [symbolic = %struct_type.k.loc26_1.2 (constants.%struct_type.k)] +// CHECK:STDOUT: %complete_type.loc26_1.1: = complete_type_witness %struct_type.k.loc26_1.1 [symbolic = %complete_type.loc26_1.2 (constants.%complete_type)] +// CHECK:STDOUT: complete_type_witness = %complete_type.loc26_1.1 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .T = // CHECK:STDOUT: .GetAddr = %GetAddr.decl // CHECK:STDOUT: .GetValue = %GetValue.decl -// CHECK:STDOUT: .k = %.loc24 +// CHECK:STDOUT: .k = %.loc25 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Declaration(%T.loc27_19.1: type) { -// CHECK:STDOUT: %T.loc27_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc27_19.2 (constants.%T)] +// CHECK:STDOUT: generic class @Declaration(%T.loc28_19.1: type) { +// CHECK:STDOUT: %T.loc28_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_19.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: class; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GetAddr(@Class.%T.loc14_13.1: type) { +// CHECK:STDOUT: generic fn @GetAddr(@Class.%T.loc15_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %ptr.loc15_29.1: type = ptr_type %Class [symbolic = %ptr.loc15_29.1 (constants.%ptr.955)] -// CHECK:STDOUT: %pattern_type.loc15_19: type = pattern_type %ptr.loc15_29.1 [symbolic = %pattern_type.loc15_19 (constants.%pattern_type.9e0)] -// CHECK:STDOUT: %ptr.loc15_38.1: type = ptr_type %T [symbolic = %ptr.loc15_38.1 (constants.%ptr.79f)] -// CHECK:STDOUT: %pattern_type.loc15_34: type = pattern_type %ptr.loc15_38.1 [symbolic = %pattern_type.loc15_34 (constants.%pattern_type.afe)] +// CHECK:STDOUT: %ptr.loc16_29.1: type = ptr_type %Class [symbolic = %ptr.loc16_29.1 (constants.%ptr.955)] +// CHECK:STDOUT: %pattern_type.loc16_19: type = pattern_type %ptr.loc16_29.1 [symbolic = %pattern_type.loc16_19 (constants.%pattern_type.9e0)] +// CHECK:STDOUT: %ptr.loc16_38.1: type = ptr_type %T [symbolic = %ptr.loc16_38.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %pattern_type.loc16_34: type = pattern_type %ptr.loc16_38.1 [symbolic = %pattern_type.loc16_34 (constants.%pattern_type.afe)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc15_34: = require_complete_type %ptr.loc15_38.1 [symbolic = %require_complete.loc15_34 (constants.%require_complete.6e5)] -// CHECK:STDOUT: %require_complete.loc15_23: = require_complete_type %ptr.loc15_29.1 [symbolic = %require_complete.loc15_23 (constants.%require_complete.2ae)] -// CHECK:STDOUT: %require_complete.loc16: = require_complete_type %Class [symbolic = %require_complete.loc16 (constants.%require_complete.4f8)] +// CHECK:STDOUT: %require_complete.loc16_34: = require_complete_type %ptr.loc16_38.1 [symbolic = %require_complete.loc16_34 (constants.%require_complete.6e5)] +// CHECK:STDOUT: %require_complete.loc16_23: = require_complete_type %ptr.loc16_29.1 [symbolic = %require_complete.loc16_23 (constants.%require_complete.2ae)] +// CHECK:STDOUT: %require_complete.loc17: = require_complete_type %Class [symbolic = %require_complete.loc17 (constants.%require_complete.4f8)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @GetAddr.%ptr.loc15_29.1 (%ptr.955)) -> @GetAddr.%ptr.loc15_38.1 (%ptr.79f) { +// CHECK:STDOUT: fn(%self.param: @GetAddr.%ptr.loc16_29.1 (%ptr.955)) -> @GetAddr.%ptr.loc16_38.1 (%ptr.79f) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @GetAddr.%ptr.loc15_29.1 (%ptr.955) = name_ref self, %self -// CHECK:STDOUT: %.loc16_17.1: ref @GetAddr.%Class (%Class) = deref %self.ref -// CHECK:STDOUT: %k.ref: @GetAddr.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc24 [concrete = @Class.%.loc24] -// CHECK:STDOUT: %.loc16_17.2: ref @GetAddr.%T (%T) = class_element_access %.loc16_17.1, element0 -// CHECK:STDOUT: %addr: @GetAddr.%ptr.loc15_38.1 (%ptr.79f) = addr_of %.loc16_17.2 +// CHECK:STDOUT: %self.ref: @GetAddr.%ptr.loc16_29.1 (%ptr.955) = name_ref self, %self +// CHECK:STDOUT: %.loc17_17.1: ref @GetAddr.%Class (%Class) = deref %self.ref +// CHECK:STDOUT: %k.ref: @GetAddr.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc25 [concrete = @Class.%.loc25] +// CHECK:STDOUT: %.loc17_17.2: ref @GetAddr.%T (%T) = class_element_access %.loc17_17.1, element0 +// CHECK:STDOUT: %addr: @GetAddr.%ptr.loc16_38.1 (%ptr.79f) = addr_of %.loc17_17.2 // CHECK:STDOUT: return %addr // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GetValue(@Class.%T.loc14_13.1: type) { +// CHECK:STDOUT: generic fn @GetValue(@Class.%T.loc15_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %pattern_type.loc20_15: type = pattern_type %Class [symbolic = %pattern_type.loc20_15 (constants.%pattern_type.3c1)] -// CHECK:STDOUT: %pattern_type.loc20_29: type = pattern_type %T [symbolic = %pattern_type.loc20_29 (constants.%pattern_type.7dc)] +// CHECK:STDOUT: %pattern_type.loc21_15: type = pattern_type %Class [symbolic = %pattern_type.loc21_15 (constants.%pattern_type.3c1)] +// CHECK:STDOUT: %pattern_type.loc21_29: type = pattern_type %T [symbolic = %pattern_type.loc21_29 (constants.%pattern_type.7dc)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc20: = require_complete_type %Class [symbolic = %require_complete.loc20 (constants.%require_complete.4f8)] +// CHECK:STDOUT: %require_complete.loc21: = require_complete_type %Class [symbolic = %require_complete.loc21 (constants.%require_complete.4f8)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic = %Class.elem (constants.%Class.elem)] -// CHECK:STDOUT: %require_complete.loc21: = require_complete_type %T [symbolic = %require_complete.loc21 (constants.%require_complete.4ae)] +// CHECK:STDOUT: %require_complete.loc22: = require_complete_type %T [symbolic = %require_complete.loc22 (constants.%require_complete.4ae)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @GetValue.%Class (%Class)) -> @GetValue.%T (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @GetValue.%Class (%Class) = name_ref self, %self -// CHECK:STDOUT: %k.ref: @GetValue.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc24 [concrete = @Class.%.loc24] -// CHECK:STDOUT: %.loc21_16.1: ref @GetValue.%T (%T) = class_element_access %self.ref, element0 -// CHECK:STDOUT: %.loc21_16.2: @GetValue.%T (%T) = bind_value %.loc21_16.1 -// CHECK:STDOUT: return %.loc21_16.2 +// CHECK:STDOUT: %k.ref: @GetValue.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc25 [concrete = @Class.%.loc25] +// CHECK:STDOUT: %.loc22_16.1: ref @GetValue.%T (%T) = class_element_access %self.ref, element0 +// CHECK:STDOUT: %.loc22_16.2: @GetValue.%T (%T) = bind_value %.loc22_16.1 +// CHECK:STDOUT: return %.loc22_16.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%T) { -// CHECK:STDOUT: %T.loc14_13.2 => constants.%T +// CHECK:STDOUT: %T.loc15_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GetAddr.type => constants.%GetAddr.type @@ -210,27 +211,27 @@ class Declaration(T:! type); // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: %Class.elem => constants.%Class.elem -// CHECK:STDOUT: %struct_type.k.loc25_1.2 => constants.%struct_type.k -// CHECK:STDOUT: %complete_type.loc25_1.2 => constants.%complete_type +// CHECK:STDOUT: %struct_type.k.loc26_1.2 => constants.%struct_type.k +// CHECK:STDOUT: %complete_type.loc26_1.2 => constants.%complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetAddr(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Class => constants.%Class -// CHECK:STDOUT: %ptr.loc15_29.1 => constants.%ptr.955 -// CHECK:STDOUT: %pattern_type.loc15_19 => constants.%pattern_type.9e0 -// CHECK:STDOUT: %ptr.loc15_38.1 => constants.%ptr.79f -// CHECK:STDOUT: %pattern_type.loc15_34 => constants.%pattern_type.afe +// CHECK:STDOUT: %ptr.loc16_29.1 => constants.%ptr.955 +// CHECK:STDOUT: %pattern_type.loc16_19 => constants.%pattern_type.9e0 +// CHECK:STDOUT: %ptr.loc16_38.1 => constants.%ptr.79f +// CHECK:STDOUT: %pattern_type.loc16_34 => constants.%pattern_type.afe // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetValue(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Class => constants.%Class -// CHECK:STDOUT: %pattern_type.loc20_15 => constants.%pattern_type.3c1 -// CHECK:STDOUT: %pattern_type.loc20_29 => constants.%pattern_type.7dc +// CHECK:STDOUT: %pattern_type.loc21_15 => constants.%pattern_type.3c1 +// CHECK:STDOUT: %pattern_type.loc21_29 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Declaration(constants.%T) { -// CHECK:STDOUT: %T.loc27_19.2 => constants.%T +// CHECK:STDOUT: %T.loc28_19.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 3a2b6395d9cd..322d7d9877d8 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -92,7 +93,7 @@ class Outer(T:! type) { // CHECK:STDOUT: --- call.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -103,7 +104,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] -// CHECK:STDOUT: %Class.ab2: type = class_type @Class, @Class(%T.8b3, %N.356) [symbolic] +// CHECK:STDOUT: %Class.ab2: type = class_type @Class, @Class(%T, %N.356) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] @@ -112,16 +113,16 @@ class Outer(T:! type) { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.a25: = bound_method %int_5.64b, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] // CHECK:STDOUT: %Class.f29: type = class_type @Class, @Class(%ptr.235, %int_5.0f6) [concrete] @@ -141,9 +142,9 @@ class Outer(T:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -159,7 +160,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -179,7 +180,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_21.1: = bound_method %int_5, %impl.elem0.loc6 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_21.2: = bound_method %int_5, %specific_fn.loc6 [concrete = constants.%bound_method.a25] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %bound_method.loc6_21.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc6_21.2: %i32 = value_of_initializer %int.convert_checked.loc6 [concrete = constants.%int_5.0f6] @@ -199,7 +200,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_15, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %impl.elem0.loc9: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_19.1: = bound_method %int_0, %impl.elem0.loc9 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_19.2: = bound_method %int_0, %specific_fn.loc9 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %bound_method.loc9_19.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc9_19.3: %i32 = value_of_initializer %int.convert_checked.loc9 [concrete = constants.%int_0.6a9] @@ -210,7 +211,7 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) { -// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -225,8 +226,8 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T.8b3, constants.%N.356) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @Class(constants.%T, constants.%N.356) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%T // CHECK:STDOUT: %N.loc4_23.2 => constants.%N.356 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -269,7 +270,7 @@ class Outer(T:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -352,7 +353,7 @@ class Outer(T:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -439,8 +440,8 @@ class Outer(T:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index 2338650dd3ec..f25d1e9eb757 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -60,22 +61,22 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.588: = bound_method %N.51e, %Convert.960 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f9c: = bound_method %N.51e, %Convert.specific_fn.8a8 [symbolic] -// CHECK:STDOUT: %int.convert_checked.12c: init Core.IntLiteral = call %bound_method.f9c(%N.51e) [symbolic] -// CHECK:STDOUT: %iN.builtin.8fe: type = int_type signed, %int.convert_checked.12c [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.f9c(%N.51e) [symbolic] +// CHECK:STDOUT: %iN.builtin.8fe: type = int_type signed, %int.convert_checked [symbolic] // CHECK:STDOUT: %require_complete.e34: = require_complete_type %iN.builtin.8fe [symbolic] // CHECK:STDOUT: %A.elem.07f: type = unbound_element_type %A.dd3, %iN.builtin.8fe [symbolic] // CHECK:STDOUT: %struct_type.base.n: type = struct_type {.base: %B, .n: %iN.builtin.8fe} [symbolic] @@ -84,12 +85,12 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %A.6fc: type = class_type @A, @A(%int_0.6a9) [concrete] @@ -112,12 +113,12 @@ fn F(a: A(0)*) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] -// CHECK:STDOUT: %Core.Int: %Int.type.878 = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] +// CHECK:STDOUT: %Core.Int: %Int.type.878 = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/types/int, loc23_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] +// CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/parts/int, loc20_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -168,7 +169,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc15_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_12.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_12.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -199,7 +200,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %A.elem.loc7: type = unbound_element_type %A, constants.%B [symbolic = %A.elem.loc7 (constants.%A.elem.500)] // CHECK:STDOUT: %Convert.bound: = bound_method %N.loc6_9.2, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound.588)] // CHECK:STDOUT: %bound_method.loc12_14.3: = bound_method %N.loc6_9.2, constants.%Convert.specific_fn.8a8 [symbolic = %bound_method.loc12_14.3 (constants.%bound_method.f9c)] -// CHECK:STDOUT: %int.convert_checked.loc12_14.2: init Core.IntLiteral = call %bound_method.loc12_14.3(%N.loc6_9.2) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked.12c)] +// CHECK:STDOUT: %int.convert_checked.loc12_14.2: init Core.IntLiteral = call %bound_method.loc12_14.3(%N.loc6_9.2) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %iN.builtin: type = int_type signed, %int.convert_checked.loc12_14.2 [symbolic = %iN.builtin (constants.%iN.builtin.8fe)] // CHECK:STDOUT: %require_complete: = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.e34)] // CHECK:STDOUT: %A.elem.loc12: type = unbound_element_type %A, %iN.builtin [symbolic = %A.elem.loc12 (constants.%A.elem.07f)] @@ -213,11 +214,11 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc6_9.1 [symbolic = %N.loc6_9.2 (constants.%N.51e)] // CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc12_14.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound.588)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc12_14.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc12_14.3 (constants.%bound_method.f9c)] -// CHECK:STDOUT: %int.convert_checked.loc12_14.1: init Core.IntLiteral = call %bound_method.loc12_14.2(%N.ref) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked.12c)] -// CHECK:STDOUT: %.loc12_14.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked.12c)] -// CHECK:STDOUT: %.loc12_14.2: Core.IntLiteral = converted %N.ref, %.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked.12c)] +// CHECK:STDOUT: %int.convert_checked.loc12_14.1: init Core.IntLiteral = call %bound_method.loc12_14.2(%N.ref) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc12_14.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc12_14.2: Core.IntLiteral = converted %N.ref, %.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_14.2) [symbolic = %iN.builtin (constants.%iN.builtin.8fe)] // CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed [symbolic = %iN.builtin (constants.%iN.builtin.8fe)] // CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed, %.loc12_15.1 [symbolic = %iN.builtin (constants.%iN.builtin.8fe)] diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index 8349bb196d83..8bcafc5e9e69 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -77,7 +78,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -92,7 +93,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc14_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc15_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %c.patt: %pattern_type.0fa = binding_pattern c [concrete] @@ -100,13 +101,13 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc18_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %c.param: %Class.247 = value_param call_param0 -// CHECK:STDOUT: %.loc18: type = splice_block %Class [concrete = constants.%Class.247] { +// CHECK:STDOUT: %.loc19: type = splice_block %Class [concrete = constants.%Class.247] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %int_32.loc18_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [concrete = constants.%Class.247] // CHECK:STDOUT: } // CHECK:STDOUT: %c: %Class.247 = bind_name c, %c.param @@ -115,163 +116,163 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %c.patt: @G.%pattern_type.loc22_16 (%pattern_type.3c18fb.1) = binding_pattern c [concrete] -// CHECK:STDOUT: %c.param_patt: @G.%pattern_type.loc22_16 (%pattern_type.3c18fb.1) = value_param_pattern %c.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @G.%pattern_type.loc22_29 (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @G.%pattern_type.loc22_29 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %c.patt: @G.%pattern_type.loc23_16 (%pattern_type.3c18fb.1) = binding_pattern c [concrete] +// CHECK:STDOUT: %c.param_patt: @G.%pattern_type.loc23_16 (%pattern_type.3c18fb.1) = value_param_pattern %c.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @G.%pattern_type.loc23_29 (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @G.%pattern_type.loc23_29 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc22_32: type = name_ref T, %T.loc22_6.1 [symbolic = %T.loc22_6.2 (constants.%T)] -// CHECK:STDOUT: %T.loc22_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.2 (constants.%T)] -// CHECK:STDOUT: %c.param: @G.%Class.loc22_26.2 (%Class.fe1b2d.1) = value_param call_param0 -// CHECK:STDOUT: %.loc22: type = splice_block %Class.loc22_26.1 [symbolic = %Class.loc22_26.2 (constants.%Class.fe1b2d.1)] { +// CHECK:STDOUT: %T.ref.loc23_32: type = name_ref T, %T.loc23_6.1 [symbolic = %T.loc23_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc23_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_6.2 (constants.%T)] +// CHECK:STDOUT: %c.param: @G.%Class.loc23_26.2 (%Class.fe1b2d.1) = value_param call_param0 +// CHECK:STDOUT: %.loc23: type = splice_block %Class.loc23_26.1 [symbolic = %Class.loc23_26.2 (constants.%Class.fe1b2d.1)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %T.ref.loc22_25: type = name_ref T, %T.loc22_6.1 [symbolic = %T.loc22_6.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc22_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc22_26.2 (constants.%Class.fe1b2d.1)] +// CHECK:STDOUT: %T.ref.loc23_25: type = name_ref T, %T.loc23_6.1 [symbolic = %T.loc23_6.2 (constants.%T)] +// CHECK:STDOUT: %Class.loc23_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc23_26.2 (constants.%Class.fe1b2d.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: @G.%Class.loc22_26.2 (%Class.fe1b2d.1) = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref @G.%T.loc22_6.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @G.%T.loc22_6.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %c: @G.%Class.loc23_26.2 (%Class.fe1b2d.1) = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref @G.%T.loc23_6.2 (%T) = out_param call_param1 +// CHECK:STDOUT: %return: ref @G.%T.loc23_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] -// CHECK:STDOUT: %c.patt: @H.%pattern_type.loc26_16 (%pattern_type.3c18fb.2) = binding_pattern c [concrete] -// CHECK:STDOUT: %c.param_patt: @H.%pattern_type.loc26_16 (%pattern_type.3c18fb.2) = value_param_pattern %c.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @H.%pattern_type.loc26_29 (%pattern_type.7dcd0a.2) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @H.%pattern_type.loc26_29 (%pattern_type.7dcd0a.2) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %c.patt: @H.%pattern_type.loc27_16 (%pattern_type.3c18fb.2) = binding_pattern c [concrete] +// CHECK:STDOUT: %c.param_patt: @H.%pattern_type.loc27_16 (%pattern_type.3c18fb.2) = value_param_pattern %c.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @H.%pattern_type.loc27_29 (%pattern_type.7dcd0a.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @H.%pattern_type.loc27_29 (%pattern_type.7dcd0a.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc26_32: type = name_ref U, %U.loc26_6.1 [symbolic = %U.loc26_6.2 (constants.%U)] -// CHECK:STDOUT: %U.loc26_6.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc26_6.2 (constants.%U)] -// CHECK:STDOUT: %c.param: @H.%Class.loc26_26.2 (%Class.fe1b2d.2) = value_param call_param0 -// CHECK:STDOUT: %.loc26: type = splice_block %Class.loc26_26.1 [symbolic = %Class.loc26_26.2 (constants.%Class.fe1b2d.2)] { +// CHECK:STDOUT: %U.ref.loc27_32: type = name_ref U, %U.loc27_6.1 [symbolic = %U.loc27_6.2 (constants.%U)] +// CHECK:STDOUT: %U.loc27_6.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc27_6.2 (constants.%U)] +// CHECK:STDOUT: %c.param: @H.%Class.loc27_26.2 (%Class.fe1b2d.2) = value_param call_param0 +// CHECK:STDOUT: %.loc27: type = splice_block %Class.loc27_26.1 [symbolic = %Class.loc27_26.2 (constants.%Class.fe1b2d.2)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %U.ref.loc26_25: type = name_ref U, %U.loc26_6.1 [symbolic = %U.loc26_6.2 (constants.%U)] -// CHECK:STDOUT: %Class.loc26_26.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc26_26.2 (constants.%Class.fe1b2d.2)] +// CHECK:STDOUT: %U.ref.loc27_25: type = name_ref U, %U.loc27_6.1 [symbolic = %U.loc27_6.2 (constants.%U)] +// CHECK:STDOUT: %Class.loc27_26.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc27_26.2 (constants.%Class.fe1b2d.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: @H.%Class.loc26_26.2 (%Class.fe1b2d.2) = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref @H.%U.loc26_6.2 (%U) = out_param call_param1 -// CHECK:STDOUT: %return: ref @H.%U.loc26_6.2 (%U) = return_slot %return.param +// CHECK:STDOUT: %c: @H.%Class.loc27_26.2 (%Class.fe1b2d.2) = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref @H.%U.loc27_6.2 (%U) = out_param call_param1 +// CHECK:STDOUT: %return: ref @H.%U.loc27_6.2 (%U) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Class(%T.loc14_13.1: type) { -// CHECK:STDOUT: %T.loc14_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_13.2 (constants.%T)] +// CHECK:STDOUT: generic class @Class(%T.loc15_13.1: type) { +// CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc14_13.2 [symbolic = %require_complete (constants.%require_complete.4aeca8.1)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc14_13.2) [symbolic = %Class (constants.%Class.fe1b2d.1)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.loc14_13.2 [symbolic = %Class.elem (constants.%Class.elem.e262de.1)] -// CHECK:STDOUT: %struct_type.x.loc16_1.2: type = struct_type {.x: @Class.%T.loc14_13.2 (%T)} [symbolic = %struct_type.x.loc16_1.2 (constants.%struct_type.x.2ac3f0.1)] -// CHECK:STDOUT: %complete_type.loc16_1.2: = complete_type_witness %struct_type.x.loc16_1.2 [symbolic = %complete_type.loc16_1.2 (constants.%complete_type.4339b3.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc15_13.2 [symbolic = %require_complete (constants.%require_complete.4aeca8.1)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc15_13.2) [symbolic = %Class (constants.%Class.fe1b2d.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.loc15_13.2 [symbolic = %Class.elem (constants.%Class.elem.e262de.1)] +// CHECK:STDOUT: %struct_type.x.loc17_1.2: type = struct_type {.x: @Class.%T.loc15_13.2 (%T)} [symbolic = %struct_type.x.loc17_1.2 (constants.%struct_type.x.2ac3f0.1)] +// CHECK:STDOUT: %complete_type.loc17_1.2: = complete_type_witness %struct_type.x.loc17_1.2 [symbolic = %complete_type.loc17_1.2 (constants.%complete_type.4339b3.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_13.1 [symbolic = %T.loc14_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc15: @Class.%Class.elem (%Class.elem.e262de.1) = field_decl x, element0 [concrete] -// CHECK:STDOUT: %struct_type.x.loc16_1.1: type = struct_type {.x: %T} [symbolic = %struct_type.x.loc16_1.2 (constants.%struct_type.x.2ac3f0.1)] -// CHECK:STDOUT: %complete_type.loc16_1.1: = complete_type_witness %struct_type.x.loc16_1.1 [symbolic = %complete_type.loc16_1.2 (constants.%complete_type.4339b3.1)] -// CHECK:STDOUT: complete_type_witness = %complete_type.loc16_1.1 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_13.1 [symbolic = %T.loc15_13.2 (constants.%T)] +// CHECK:STDOUT: %.loc16: @Class.%Class.elem (%Class.elem.e262de.1) = field_decl x, element0 [concrete] +// CHECK:STDOUT: %struct_type.x.loc17_1.1: type = struct_type {.x: %T} [symbolic = %struct_type.x.loc17_1.2 (constants.%struct_type.x.2ac3f0.1)] +// CHECK:STDOUT: %complete_type.loc17_1.1: = complete_type_witness %struct_type.x.loc17_1.1 [symbolic = %complete_type.loc17_1.2 (constants.%complete_type.4339b3.1)] +// CHECK:STDOUT: complete_type_witness = %complete_type.loc17_1.1 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.fe1b2d.1 // CHECK:STDOUT: .T = -// CHECK:STDOUT: .x = %.loc15 +// CHECK:STDOUT: .x = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param: %Class.247) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %Class.247 = name_ref c, %c -// CHECK:STDOUT: %x.ref: %Class.elem.2d8 = name_ref x, @Class.%.loc15 [concrete = @Class.%.loc15] -// CHECK:STDOUT: %.loc19_11.1: ref %i32 = class_element_access %c.ref, element0 -// CHECK:STDOUT: %.loc19_11.2: %i32 = bind_value %.loc19_11.1 -// CHECK:STDOUT: return %.loc19_11.2 +// CHECK:STDOUT: %x.ref: %Class.elem.2d8 = name_ref x, @Class.%.loc16 [concrete = @Class.%.loc16] +// CHECK:STDOUT: %.loc20_11.1: ref %i32 = class_element_access %c.ref, element0 +// CHECK:STDOUT: %.loc20_11.2: %i32 = bind_value %.loc20_11.1 +// CHECK:STDOUT: return %.loc20_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc22_6.1: type) { -// CHECK:STDOUT: %T.loc22_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc22_26.2: type = class_type @Class, @Class(%T.loc22_6.2) [symbolic = %Class.loc22_26.2 (constants.%Class.fe1b2d.1)] -// CHECK:STDOUT: %pattern_type.loc22_16: type = pattern_type %Class.loc22_26.2 [symbolic = %pattern_type.loc22_16 (constants.%pattern_type.3c18fb.1)] -// CHECK:STDOUT: %pattern_type.loc22_29: type = pattern_type %T.loc22_6.2 [symbolic = %pattern_type.loc22_29 (constants.%pattern_type.7dcd0a.1)] +// CHECK:STDOUT: generic fn @G(%T.loc23_6.1: type) { +// CHECK:STDOUT: %T.loc23_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_6.2 (constants.%T)] +// CHECK:STDOUT: %Class.loc23_26.2: type = class_type @Class, @Class(%T.loc23_6.2) [symbolic = %Class.loc23_26.2 (constants.%Class.fe1b2d.1)] +// CHECK:STDOUT: %pattern_type.loc23_16: type = pattern_type %Class.loc23_26.2 [symbolic = %pattern_type.loc23_16 (constants.%pattern_type.3c18fb.1)] +// CHECK:STDOUT: %pattern_type.loc23_29: type = pattern_type %T.loc23_6.2 [symbolic = %pattern_type.loc23_29 (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc22: = require_complete_type %Class.loc22_26.2 [symbolic = %require_complete.loc22 (constants.%require_complete.4f8a42.1)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc22_26.2, %T.loc22_6.2 [symbolic = %Class.elem (constants.%Class.elem.e262de.1)] -// CHECK:STDOUT: %require_complete.loc23: = require_complete_type %T.loc22_6.2 [symbolic = %require_complete.loc23 (constants.%require_complete.4aeca8.1)] +// CHECK:STDOUT: %require_complete.loc23: = require_complete_type %Class.loc23_26.2 [symbolic = %require_complete.loc23 (constants.%require_complete.4f8a42.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc23_26.2, %T.loc23_6.2 [symbolic = %Class.elem (constants.%Class.elem.e262de.1)] +// CHECK:STDOUT: %require_complete.loc24: = require_complete_type %T.loc23_6.2 [symbolic = %require_complete.loc24 (constants.%require_complete.4aeca8.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param: @G.%Class.loc22_26.2 (%Class.fe1b2d.1)) -> @G.%T.loc22_6.2 (%T) { +// CHECK:STDOUT: fn(%c.param: @G.%Class.loc23_26.2 (%Class.fe1b2d.1)) -> @G.%T.loc23_6.2 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: @G.%Class.loc22_26.2 (%Class.fe1b2d.1) = name_ref c, %c -// CHECK:STDOUT: %x.ref: @G.%Class.elem (%Class.elem.e262de.1) = name_ref x, @Class.%.loc15 [concrete = @Class.%.loc15] -// CHECK:STDOUT: %.loc23_11.1: ref @G.%T.loc22_6.2 (%T) = class_element_access %c.ref, element0 -// CHECK:STDOUT: %.loc23_11.2: @G.%T.loc22_6.2 (%T) = bind_value %.loc23_11.1 -// CHECK:STDOUT: return %.loc23_11.2 +// CHECK:STDOUT: %c.ref: @G.%Class.loc23_26.2 (%Class.fe1b2d.1) = name_ref c, %c +// CHECK:STDOUT: %x.ref: @G.%Class.elem (%Class.elem.e262de.1) = name_ref x, @Class.%.loc16 [concrete = @Class.%.loc16] +// CHECK:STDOUT: %.loc24_11.1: ref @G.%T.loc23_6.2 (%T) = class_element_access %c.ref, element0 +// CHECK:STDOUT: %.loc24_11.2: @G.%T.loc23_6.2 (%T) = bind_value %.loc24_11.1 +// CHECK:STDOUT: return %.loc24_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @H(%U.loc26_6.1: type) { -// CHECK:STDOUT: %U.loc26_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc26_6.2 (constants.%U)] -// CHECK:STDOUT: %Class.loc26_26.2: type = class_type @Class, @Class(%U.loc26_6.2) [symbolic = %Class.loc26_26.2 (constants.%Class.fe1b2d.2)] -// CHECK:STDOUT: %pattern_type.loc26_16: type = pattern_type %Class.loc26_26.2 [symbolic = %pattern_type.loc26_16 (constants.%pattern_type.3c18fb.2)] -// CHECK:STDOUT: %pattern_type.loc26_29: type = pattern_type %U.loc26_6.2 [symbolic = %pattern_type.loc26_29 (constants.%pattern_type.7dcd0a.2)] +// CHECK:STDOUT: generic fn @H(%U.loc27_6.1: type) { +// CHECK:STDOUT: %U.loc27_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc27_6.2 (constants.%U)] +// CHECK:STDOUT: %Class.loc27_26.2: type = class_type @Class, @Class(%U.loc27_6.2) [symbolic = %Class.loc27_26.2 (constants.%Class.fe1b2d.2)] +// CHECK:STDOUT: %pattern_type.loc27_16: type = pattern_type %Class.loc27_26.2 [symbolic = %pattern_type.loc27_16 (constants.%pattern_type.3c18fb.2)] +// CHECK:STDOUT: %pattern_type.loc27_29: type = pattern_type %U.loc27_6.2 [symbolic = %pattern_type.loc27_29 (constants.%pattern_type.7dcd0a.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc26_29: = require_complete_type %U.loc26_6.2 [symbolic = %require_complete.loc26_29 (constants.%require_complete.4aeca8.2)] -// CHECK:STDOUT: %require_complete.loc26_17: = require_complete_type %Class.loc26_26.2 [symbolic = %require_complete.loc26_17 (constants.%require_complete.4f8a42.2)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc26_26.2, %U.loc26_6.2 [symbolic = %Class.elem (constants.%Class.elem.e262de.2)] +// CHECK:STDOUT: %require_complete.loc27_29: = require_complete_type %U.loc27_6.2 [symbolic = %require_complete.loc27_29 (constants.%require_complete.4aeca8.2)] +// CHECK:STDOUT: %require_complete.loc27_17: = require_complete_type %Class.loc27_26.2 [symbolic = %require_complete.loc27_17 (constants.%require_complete.4f8a42.2)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc27_26.2, %U.loc27_6.2 [symbolic = %Class.elem (constants.%Class.elem.e262de.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param: @H.%Class.loc26_26.2 (%Class.fe1b2d.2)) -> @H.%U.loc26_6.2 (%U) { +// CHECK:STDOUT: fn(%c.param: @H.%Class.loc27_26.2 (%Class.fe1b2d.2)) -> @H.%U.loc27_6.2 (%U) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: @H.%Class.loc26_26.2 (%Class.fe1b2d.2) = name_ref c, %c -// CHECK:STDOUT: %x.ref: @H.%Class.elem (%Class.elem.e262de.2) = name_ref x, @Class.%.loc15 [concrete = @Class.%.loc15] -// CHECK:STDOUT: %.loc27_11.1: ref @H.%U.loc26_6.2 (%U) = class_element_access %c.ref, element0 -// CHECK:STDOUT: %.loc27_11.2: @H.%U.loc26_6.2 (%U) = bind_value %.loc27_11.1 -// CHECK:STDOUT: return %.loc27_11.2 +// CHECK:STDOUT: %c.ref: @H.%Class.loc27_26.2 (%Class.fe1b2d.2) = name_ref c, %c +// CHECK:STDOUT: %x.ref: @H.%Class.elem (%Class.elem.e262de.2) = name_ref x, @Class.%.loc16 [concrete = @Class.%.loc16] +// CHECK:STDOUT: %.loc28_11.1: ref @H.%U.loc27_6.2 (%U) = class_element_access %c.ref, element0 +// CHECK:STDOUT: %.loc28_11.2: @H.%U.loc27_6.2 (%U) = bind_value %.loc28_11.1 +// CHECK:STDOUT: return %.loc28_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%T) { -// CHECK:STDOUT: %T.loc14_13.2 => constants.%T +// CHECK:STDOUT: %T.loc15_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.4aeca8.1 // CHECK:STDOUT: %Class => constants.%Class.fe1b2d.1 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.e262de.1 -// CHECK:STDOUT: %struct_type.x.loc16_1.2 => constants.%struct_type.x.2ac3f0.1 -// CHECK:STDOUT: %complete_type.loc16_1.2 => constants.%complete_type.4339b3.1 +// CHECK:STDOUT: %struct_type.x.loc17_1.2 => constants.%struct_type.x.2ac3f0.1 +// CHECK:STDOUT: %complete_type.loc17_1.2 => constants.%complete_type.4339b3.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%i32) { -// CHECK:STDOUT: %T.loc14_13.2 => constants.%i32 +// CHECK:STDOUT: %T.loc15_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: %Class => constants.%Class.247 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.2d8 -// CHECK:STDOUT: %struct_type.x.loc16_1.2 => constants.%struct_type.x.ed6 -// CHECK:STDOUT: %complete_type.loc16_1.2 => constants.%complete_type.1ec +// CHECK:STDOUT: %struct_type.x.loc17_1.2 => constants.%struct_type.x.ed6 +// CHECK:STDOUT: %complete_type.loc17_1.2 => constants.%complete_type.1ec // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.loc22_6.2 => constants.%T -// CHECK:STDOUT: %Class.loc22_26.2 => constants.%Class.fe1b2d.1 -// CHECK:STDOUT: %pattern_type.loc22_16 => constants.%pattern_type.3c18fb.1 -// CHECK:STDOUT: %pattern_type.loc22_29 => constants.%pattern_type.7dcd0a.1 +// CHECK:STDOUT: %T.loc23_6.2 => constants.%T +// CHECK:STDOUT: %Class.loc23_26.2 => constants.%Class.fe1b2d.1 +// CHECK:STDOUT: %pattern_type.loc23_16 => constants.%pattern_type.3c18fb.1 +// CHECK:STDOUT: %pattern_type.loc23_29 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%U) { -// CHECK:STDOUT: %T.loc14_13.2 => constants.%U +// CHECK:STDOUT: %T.loc15_13.2 => constants.%U // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.4aeca8.2 // CHECK:STDOUT: %Class => constants.%Class.fe1b2d.2 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.e262de.2 -// CHECK:STDOUT: %struct_type.x.loc16_1.2 => constants.%struct_type.x.2ac3f0.2 -// CHECK:STDOUT: %complete_type.loc16_1.2 => constants.%complete_type.4339b3.2 +// CHECK:STDOUT: %struct_type.x.loc17_1.2 => constants.%struct_type.x.2ac3f0.2 +// CHECK:STDOUT: %complete_type.loc17_1.2 => constants.%complete_type.4339b3.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @H(constants.%U) { -// CHECK:STDOUT: %U.loc26_6.2 => constants.%U -// CHECK:STDOUT: %Class.loc26_26.2 => constants.%Class.fe1b2d.2 -// CHECK:STDOUT: %pattern_type.loc26_16 => constants.%pattern_type.3c18fb.2 -// CHECK:STDOUT: %pattern_type.loc26_29 => constants.%pattern_type.7dcd0a.2 +// CHECK:STDOUT: %U.loc27_6.2 => constants.%U +// CHECK:STDOUT: %Class.loc27_26.2 => constants.%Class.fe1b2d.2 +// CHECK:STDOUT: %pattern_type.loc27_16 => constants.%pattern_type.3c18fb.2 +// CHECK:STDOUT: %pattern_type.loc27_29 => constants.%pattern_type.7dcd0a.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 999812894375..f0d21c0c7b77 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -84,7 +85,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -286,7 +287,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index 1e513a097e3b..6cd9f69d1152 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -109,7 +110,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index ddc954568585..ce64b4ee1681 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/class/generic/member_lookup.carbon b/toolchain/check/testdata/class/generic/member_lookup.carbon index f156ef8654c0..00220f149e15 100644 --- a/toolchain/check/testdata/class/generic/member_lookup.carbon +++ b/toolchain/check/testdata/class/generic/member_lookup.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -127,7 +128,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -444,7 +445,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 376f9bad707a..f3190eb4edf6 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -112,7 +113,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -209,8 +210,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -349,16 +350,16 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_123.fff, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_123.fff, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_123.f7f: %i32 = int_value 123 [concrete] // CHECK:STDOUT: %C.4c3: type = class_type @C, @C(%int_123.f7f) [concrete] @@ -372,9 +373,9 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -404,7 +405,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_123, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_13.2: = bound_method %int_123, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc13_13.2(%int_123) [concrete = constants.%int_123.f7f] // CHECK:STDOUT: %.loc13_13.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_123.f7f] @@ -472,16 +473,16 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -506,9 +507,9 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -539,7 +540,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc25_25.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_25.1: = bound_method %int_1, %impl.elem0.loc25_25.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc25_25.1: = specific_function %impl.elem0.loc25_25.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_25.1: = specific_function %impl.elem0.loc25_25.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.2: = bound_method %int_1, %specific_fn.loc25_25.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc25_25.1: init %i32 = call %bound_method.loc25_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc25_25.2: init %i32 = converted %int_1, %int.convert_checked.loc25_25.1 [concrete = constants.%int_1.5d2] @@ -548,7 +549,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_25.5: init %i32 = initialize_from %.loc25_25.2 to %.loc25_25.4 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc25_25.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_25.3: = bound_method %int_2, %impl.elem0.loc25_25.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc25_25.2: = specific_function %impl.elem0.loc25_25.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_25.2: = specific_function %impl.elem0.loc25_25.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.4: = bound_method %int_2, %specific_fn.loc25_25.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc25_25.2: init %i32 = call %bound_method.loc25_25.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc25_25.6: init %i32 = converted %int_2, %int.convert_checked.loc25_25.2 [concrete = constants.%int_2.ef8] @@ -604,7 +605,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %impl.elem0.loc25_53.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_53.1: = bound_method %int_3, %impl.elem0.loc25_53.1 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc25_53.1: = specific_function %impl.elem0.loc25_53.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_53.1: = specific_function %impl.elem0.loc25_53.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_53.2: = bound_method %int_3, %specific_fn.loc25_53.1 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc25_53.1: init %i32 = call %bound_method.loc25_53.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc25_53.2: init %i32 = converted %int_3, %int.convert_checked.loc25_53.1 [concrete = constants.%int_3.822] @@ -613,7 +614,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_53.5: init %i32 = initialize_from %.loc25_53.2 to %.loc25_53.4 [concrete = constants.%int_3.822] // CHECK:STDOUT: %impl.elem0.loc25_53.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_53.3: = bound_method %int_4, %impl.elem0.loc25_53.2 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc25_53.2: = specific_function %impl.elem0.loc25_53.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_53.2: = specific_function %impl.elem0.loc25_53.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_53.4: = bound_method %int_4, %specific_fn.loc25_53.2 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc25_53.2: init %i32 = call %bound_method.loc25_53.4(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc25_53.6: init %i32 = converted %int_4, %int.convert_checked.loc25_53.2 [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/const/basics.carbon b/toolchain/check/testdata/const/basics.carbon index b8bd1cd570b7..61e005b6f8bd 100644 --- a/toolchain/check/testdata/const/basics.carbon +++ b/toolchain/check/testdata/const/basics.carbon @@ -1,6 +1,7 @@ // Part of the Carbon Language project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE diff --git a/toolchain/check/testdata/deduce/binding_pattern.carbon b/toolchain/check/testdata/deduce/binding_pattern.carbon index 4e8cddd6a3bb..d6119bd9aae8 100644 --- a/toolchain/check/testdata/deduce/binding_pattern.carbon +++ b/toolchain/check/testdata/deduce/binding_pattern.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index b157264a3789..df674665ec83 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -717,16 +718,16 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %WithNontype.b82: type = class_type @WithNontype, @WithNontype(%int_0.6a9) [concrete] @@ -742,9 +743,9 @@ fn G() -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -838,7 +839,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_31.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_31.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_31.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc9_31.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index 0b2fbcb3069f..e0c39b2062f4 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -71,8 +72,8 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -200,8 +201,8 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] -// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types, Float, loaded [concrete = constants.%Float] +// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] +// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/parts/float, Float, loaded [concrete = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index fbc15f610060..fa8c83012338 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -254,16 +255,16 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -284,9 +285,9 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -361,14 +362,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %.loc8_22.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc8_22.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_22.1: = bound_method %int_1, %impl.elem0.loc8_22.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc8_22.1: = specific_function %impl.elem0.loc8_22.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8_22.1: = specific_function %impl.elem0.loc8_22.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.2: = bound_method %int_1, %specific_fn.loc8_22.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %bound_method.loc8_22.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.2: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.3: %i32 = converted %int_1, %.loc8_22.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc8_22.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_22.3: = bound_method %int_2, %impl.elem0.loc8_22.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc8_22.2: = specific_function %impl.elem0.loc8_22.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8_22.2: = specific_function %impl.elem0.loc8_22.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.4: = bound_method %int_2, %specific_fn.loc8_22.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc8_22.2: init %i32 = call %bound_method.loc8_22.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc8_22.4: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index a8dd39aee6ab..8f51b441e076 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index f088d2f9d504..b3fde9a3a57c 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -652,11 +653,11 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete] -// CHECK:STDOUT: %T.eb6: %array_type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %array_type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.dcb: type = pattern_type %array_type [concrete] // CHECK:STDOUT: %HoldsType.type: type = generic_class_type @HoldsType [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T.eb6) [symbolic] +// CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.142: type = pattern_type %HoldsType [symbolic] @@ -669,16 +670,16 @@ fn G() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -698,9 +699,9 @@ fn G() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -720,7 +721,7 @@ fn G() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete = constants.%array_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_17.1: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T.eb6)] +// CHECK:STDOUT: %T.loc4_17.1: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.dcb = symbolic_binding_pattern T, 0 [concrete] @@ -733,23 +734,23 @@ fn G() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete = constants.%array_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_6.1: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T.eb6)] +// CHECK:STDOUT: %T.loc12_6.1: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%HoldsType.loc12_40.2 (%HoldsType) = value_param call_param0 // CHECK:STDOUT: %.loc12_40: type = splice_block %HoldsType.loc12_40.1 [symbolic = %HoldsType.loc12_40.2 (constants.%HoldsType)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc12_39: %array_type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T.eb6)] -// CHECK:STDOUT: %HoldsType.loc12_40.1: type = class_type @HoldsType, @HoldsType(constants.%T.eb6) [symbolic = %HoldsType.loc12_40.2 (constants.%HoldsType)] +// CHECK:STDOUT: %T.ref.loc12_39: %array_type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] +// CHECK:STDOUT: %HoldsType.loc12_40.1: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc12_40.2 (constants.%HoldsType)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%HoldsType.loc12_40.2 (%HoldsType) = bind_name x, %x.param // CHECK:STDOUT: %a.param: = value_param call_param1 // CHECK:STDOUT: %.1: = splice_block [concrete = ] { -// CHECK:STDOUT: %T.ref.loc12_46: %array_type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T.eb6)] +// CHECK:STDOUT: %T.ref.loc12_46: %array_type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_48.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc12_48.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc12_48.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -765,7 +766,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc4_17.1: %array_type) { -// CHECK:STDOUT: %T.loc4_17.2: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T.eb6)] +// CHECK:STDOUT: %T.loc4_17.2: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -789,7 +790,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc12_6.1: %array_type) { -// CHECK:STDOUT: %T.loc12_6.2: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T.eb6)] +// CHECK:STDOUT: %T.loc12_6.2: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T)] // CHECK:STDOUT: %HoldsType.loc12_40.2: type = class_type @HoldsType, @HoldsType(%T.loc12_6.2) [symbolic = %HoldsType.loc12_40.2 (constants.%HoldsType)] // CHECK:STDOUT: %pattern_type: type = pattern_type %HoldsType.loc12_40.2 [symbolic = %pattern_type (constants.%pattern_type.142)] // CHECK:STDOUT: @@ -823,14 +824,14 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T.eb6) { -// CHECK:STDOUT: %T.loc4_17.2 => constants.%T.eb6 +// CHECK:STDOUT: specific @HoldsType(constants.%T) { +// CHECK:STDOUT: %T.loc4_17.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.eb6) { -// CHECK:STDOUT: %T.loc12_6.2 => constants.%T.eb6 +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc12_6.2 => constants.%T // CHECK:STDOUT: %HoldsType.loc12_40.2 => constants.%HoldsType // CHECK:STDOUT: %pattern_type => constants.%pattern_type.142 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 62b37ee7e8cf..0a56b1253ca0 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -35,21 +36,21 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -57,12 +58,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] @@ -78,11 +79,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/types/int, loc23_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] +// CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/parts/int, loc20_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -102,18 +103,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14_11 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_11: type = splice_block %i32.loc15_11 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_19: type = splice_block %i32.loc14_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_19: type = splice_block %i32.loc15_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 @@ -124,37 +125,37 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %arr.var_patt: %pattern_type.5d8 = var_pattern %arr.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %arr.var: ref %array_type = var %arr.var_patt [concrete] -// CHECK:STDOUT: %.loc16_30: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc17_30: type = splice_block %array_type [concrete = constants.%array_type] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc16_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_25.1: = bound_method %int_1, %impl.elem0.loc16_25 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc16_25: = specific_function %impl.elem0.loc16_25, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] -// CHECK:STDOUT: %bound_method.loc16_25.2: = bound_method %int_1, %specific_fn.loc16_25 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc16_25: init %i32 = call %bound_method.loc16_25.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc16_25.1: %i32 = value_of_initializer %int.convert_checked.loc16_25 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc16_25.2: %i32 = converted %int_1, %.loc16_25.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc16_28: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_28.1: = bound_method %int_2, %impl.elem0.loc16_28 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc16_28: = specific_function %impl.elem0.loc16_28, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] -// CHECK:STDOUT: %bound_method.loc16_28.2: = bound_method %int_2, %specific_fn.loc16_28 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc16_28: init %i32 = call %bound_method.loc16_28.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc16_28.1: %i32 = value_of_initializer %int.convert_checked.loc16_28 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc16_28.2: %i32 = converted %int_2, %.loc16_28.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc16_25.2, %.loc16_28.2) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc16_29: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] -// CHECK:STDOUT: %bound_method.loc16_29.1: = bound_method %int.sadd, %impl.elem0.loc16_29 [concrete = constants.%Convert.bound.2d6] -// CHECK:STDOUT: %specific_fn.loc16_29: = specific_function %impl.elem0.loc16_29, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] -// CHECK:STDOUT: %bound_method.loc16_29.2: = bound_method %int.sadd, %specific_fn.loc16_29 [concrete = constants.%bound_method.c6f] -// CHECK:STDOUT: %.loc16_29.1: %i32 = value_of_initializer %int.sadd [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc16_29.2: %i32 = converted %int.sadd, %.loc16_29.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %int.convert_checked.loc16_29: init Core.IntLiteral = call %bound_method.loc16_29.2(%.loc16_29.2) [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %.loc16_29.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_29 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %.loc16_29.4: Core.IntLiteral = converted %int.sadd, %.loc16_29.3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %.loc16_29.4, %i32 [concrete = constants.%array_type] +// CHECK:STDOUT: %impl.elem0.loc17_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc17_25.1: = bound_method %int_1, %impl.elem0.loc17_25 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc17_25: = specific_function %impl.elem0.loc17_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %bound_method.loc17_25.2: = bound_method %int_1, %specific_fn.loc17_25 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc17_25: init %i32 = call %bound_method.loc17_25.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc17_25.1: %i32 = value_of_initializer %int.convert_checked.loc17_25 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc17_25.2: %i32 = converted %int_1, %.loc17_25.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %impl.elem0.loc17_28: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc17_28.1: = bound_method %int_2, %impl.elem0.loc17_28 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc17_28: = specific_function %impl.elem0.loc17_28, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %bound_method.loc17_28.2: = bound_method %int_2, %specific_fn.loc17_28 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc17_28: init %i32 = call %bound_method.loc17_28.2(%int_2) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc17_28.1: %i32 = value_of_initializer %int.convert_checked.loc17_28 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc17_28.2: %i32 = converted %int_2, %.loc17_28.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc17_25.2, %.loc17_28.2) [concrete = constants.%int_3.822] +// CHECK:STDOUT: %impl.elem0.loc17_29: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %bound_method.loc17_29.1: = bound_method %int.sadd, %impl.elem0.loc17_29 [concrete = constants.%Convert.bound.2d6] +// CHECK:STDOUT: %specific_fn.loc17_29: = specific_function %impl.elem0.loc17_29, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] +// CHECK:STDOUT: %bound_method.loc17_29.2: = bound_method %int.sadd, %specific_fn.loc17_29 [concrete = constants.%bound_method.c6f] +// CHECK:STDOUT: %.loc17_29.1: %i32 = value_of_initializer %int.sadd [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc17_29.2: %i32 = converted %int.sadd, %.loc17_29.1 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %int.convert_checked.loc17_29: init Core.IntLiteral = call %bound_method.loc17_29.2(%.loc17_29.2) [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %.loc17_29.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc17_29 [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %.loc17_29.4: Core.IntLiteral = converted %int.sadd, %.loc17_29.3 [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %array_type: type = array_type %.loc17_29.4, %i32 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var [concrete = %arr.var] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [concrete = constants.%RuntimeCall] { @@ -165,18 +166,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc18_35: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_35: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc19_35: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_35: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc18_19: type = splice_block %i32.loc18_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc18_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc19_19: type = splice_block %i32.loc19_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc18_27: type = splice_block %i32.loc18_27 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc18_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc19_27: type = splice_block %i32.loc19_27 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 @@ -192,8 +193,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%a.ref, %b.ref) -// CHECK:STDOUT: %.loc19_19.1: %i32 = value_of_initializer %int.sadd -// CHECK:STDOUT: %.loc19_19.2: %i32 = converted %int.sadd, %.loc19_19.1 -// CHECK:STDOUT: return %.loc19_19.2 +// CHECK:STDOUT: %.loc20_19.1: %i32 = value_of_initializer %int.sadd +// CHECK:STDOUT: %.loc20_19.2: %i32 = converted %int.sadd, %.loc20_19.1 +// CHECK:STDOUT: return %.loc20_19.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/definition.carbon b/toolchain/check/testdata/function/builtin/definition.carbon index 9a9e266ff29e..92a627dd717c 100644 --- a/toolchain/check/testdata/function/builtin/definition.carbon +++ b/toolchain/check/testdata/function/builtin/definition.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -31,7 +32,7 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -48,18 +49,18 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14_11 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_11: type = splice_block %i32.loc15_11 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_19: type = splice_block %i32.loc14_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_19: type = splice_block %i32.loc15_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index 1d84e5878db9..e5b866d2d058 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -69,18 +70,18 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .A = %A.decl.loc14 -// CHECK:STDOUT: .B = %B.decl.loc24 -// CHECK:STDOUT: .C = %C.decl.loc34 +// CHECK:STDOUT: .A = %A.decl.loc15 +// CHECK:STDOUT: .B = %B.decl.loc25 +// CHECK:STDOUT: .C = %C.decl.loc35 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %A.decl.loc14: %A.type.00d7e7.1 = fn_decl @A.1 [concrete = constants.%A.1db889.1] { +// CHECK:STDOUT: %A.decl.loc15: %A.type.00d7e7.1 = fn_decl @A.1 [concrete = constants.%A.1db889.1] { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: %m.patt: %pattern_type.7ce = binding_pattern m [concrete] @@ -88,24 +89,24 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14_9: type = splice_block %i32.loc14_9 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_9: type = splice_block %i32.loc15_9 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %m.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_17: type = splice_block %i32.loc14_17 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_17: type = splice_block %i32.loc15_17 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %m: %i32 = bind_name m, %m.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl.loc22: %A.type.00d7e7.2 = fn_decl @A.2 [concrete = constants.%A.1db889.2] { +// CHECK:STDOUT: %A.decl.loc23: %A.type.00d7e7.2 = fn_decl @A.2 [concrete = constants.%A.1db889.2] { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: %m.patt: %pattern_type.7ce = binding_pattern m [concrete] @@ -113,24 +114,24 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc22_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc23_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc22_9: type = splice_block %i32.loc22_9 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc22_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc23_9: type = splice_block %i32.loc23_9 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc23_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %m.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc22_17: type = splice_block %i32.loc22_17 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc22_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc23_17: type = splice_block %i32.loc23_17 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc23_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %m: %i32 = bind_name m, %m.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl.loc24: %B.type.e168e5.1 = fn_decl @B.1 [concrete = constants.%B.d1e2df.1] { +// CHECK:STDOUT: %B.decl.loc25: %B.type.e168e5.1 = fn_decl @B.1 [concrete = constants.%B.d1e2df.1] { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: %m.patt: %pattern_type.7ce = binding_pattern m [concrete] @@ -138,24 +139,24 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc24_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc24_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc25_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc25_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc24_9: type = splice_block %i32.loc24_9 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc24_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc24_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc25_9: type = splice_block %i32.loc25_9 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc25_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc25_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %m.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc24_17: type = splice_block %i32.loc24_17 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc24_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc24_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc25_17: type = splice_block %i32.loc25_17 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc25_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc25_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %m: %i32 = bind_name m, %m.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl.loc32: %B.type.e168e5.2 = fn_decl @B.2 [concrete = constants.%B.d1e2df.2] { +// CHECK:STDOUT: %B.decl.loc33: %B.type.e168e5.2 = fn_decl @B.2 [concrete = constants.%B.d1e2df.2] { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: %m.patt: %pattern_type.7ce = binding_pattern m [concrete] @@ -163,24 +164,24 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc32_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc32_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc33_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc33_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc32_9: type = splice_block %i32.loc32_9 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc32_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc32_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc33_9: type = splice_block %i32.loc33_9 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc33_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc33_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %m.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc32_17: type = splice_block %i32.loc32_17 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc32_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc32_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc33_17: type = splice_block %i32.loc33_17 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc33_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc33_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %m: %i32 = bind_name m, %m.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl.loc34: %C.type.de0bfe.1 = fn_decl @C.1 [concrete = constants.%C.1b0370.1] { +// CHECK:STDOUT: %C.decl.loc35: %C.type.de0bfe.1 = fn_decl @C.1 [concrete = constants.%C.1b0370.1] { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: %m.patt: %pattern_type.7ce = binding_pattern m [concrete] @@ -188,24 +189,24 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc34_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc34_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc35_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc35_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc34_9: type = splice_block %i32.loc34_9 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc34_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc34_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc35_9: type = splice_block %i32.loc35_9 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc35_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc35_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %m.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc34_17: type = splice_block %i32.loc34_17 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc34_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc34_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc35_17: type = splice_block %i32.loc35_17 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc35_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc35_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %m: %i32 = bind_name m, %m.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl.loc42: %C.type.de0bfe.2 = fn_decl @C.2 [concrete = constants.%C.1b0370.2] { +// CHECK:STDOUT: %C.decl.loc43: %C.type.de0bfe.2 = fn_decl @C.2 [concrete = constants.%C.1b0370.2] { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: %m.patt: %pattern_type.7ce = binding_pattern m [concrete] @@ -213,18 +214,18 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc42_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc42_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc43_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc43_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc42_9: type = splice_block %i32.loc42_9 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc42_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc42_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc43_9: type = splice_block %i32.loc43_9 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc43_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc43_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %m.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc42_17: type = splice_block %i32.loc42_17 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc42_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc42_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc43_17: type = splice_block %i32.loc43_17 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc43_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc43_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %m: %i32 = bind_name m, %m.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 diff --git a/toolchain/check/testdata/function/builtin/fail_unknown.carbon b/toolchain/check/testdata/function/builtin/fail_unknown.carbon index 39be33053c4f..a2739ff58143 100644 --- a/toolchain/check/testdata/function/builtin/fail_unknown.carbon +++ b/toolchain/check/testdata/function/builtin/fail_unknown.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 3d4cfe7e3a31..182d05a6f356 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -25,8 +26,8 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.8268 [symbolic] +// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic] // CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type.b70 [symbolic] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] @@ -46,49 +47,49 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.4, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.5, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.6, @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] // CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound.c1b: = bound_method %int_1.5b8, %Convert.197 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.aad: = specific_function %Convert.197, @Convert.6(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.aad: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method.082: = bound_method %int_1.5b8, %Convert.specific_fn.aad [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %.5c7b: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] +// CHECK:STDOUT: %.5c7: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] // CHECK:STDOUT: %F.bound: = bound_method %int_1.5d2, %F.9ec [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.2, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.4, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.4(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.5, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] @@ -103,15 +104,15 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/types/int, loc23_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] +// CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/parts/int, loc20_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (%Core.import_ref.85c), @impl.971 [concrete] -// CHECK:STDOUT: %Core.import_ref.78a: @impl.686.%Convert.type (%Convert.type.062) = import_ref Core//prelude/types/int, loc28_39, loaded [symbolic = @impl.686.%Convert (constants.%Convert.527)] +// CHECK:STDOUT: %Core.import_ref.78a: @impl.686.%Convert.type (%Convert.type.062) = import_ref Core//prelude/parts/int, loc25_39, loaded [symbolic = @impl.686.%Convert (constants.%Convert.527)] // CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (%Core.import_ref.78a), @impl.686 [concrete] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -134,48 +135,48 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %arr.var_patt: %pattern_type.5d8 = var_pattern %arr.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %arr.var: ref %array_type = var %arr.var_patt [concrete] -// CHECK:STDOUT: %.loc22_40: type = splice_block %array_type [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc22_16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22_16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc23_40: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc23_16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %int_32.loc22_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc22_24: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] -// CHECK:STDOUT: %bound_method.loc22_24.1: = bound_method %int_1, %impl.elem0.loc22_24 [concrete = constants.%Convert.bound.c1b] -// CHECK:STDOUT: %specific_fn.loc22_24: = specific_function %impl.elem0.loc22_24, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn.aad] -// CHECK:STDOUT: %bound_method.loc22_24.2: = bound_method %int_1, %specific_fn.loc22_24 [concrete = constants.%bound_method.082] -// CHECK:STDOUT: %int.convert_checked.loc22_24: init %i32 = call %bound_method.loc22_24.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc22_24.1: %i32 = value_of_initializer %int.convert_checked.loc22_24 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc22_24.2: %i32 = converted %int_1, %.loc22_24.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %int_32.loc23_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc23_24: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %bound_method.loc23_24.1: = bound_method %int_1, %impl.elem0.loc23_24 [concrete = constants.%Convert.bound.c1b] +// CHECK:STDOUT: %specific_fn.loc23_24: = specific_function %impl.elem0.loc23_24, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.aad] +// CHECK:STDOUT: %bound_method.loc23_24.2: = bound_method %int_1, %specific_fn.loc23_24 [concrete = constants.%bound_method.082] +// CHECK:STDOUT: %int.convert_checked.loc23_24: init %i32 = call %bound_method.loc23_24.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc23_24.1: %i32 = value_of_initializer %int.convert_checked.loc23_24 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc23_24.2: %i32 = converted %int_1, %.loc23_24.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.82e] -// CHECK:STDOUT: %impl.elem0.loc22_31: %.5c7b = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.9ec] -// CHECK:STDOUT: %bound_method.loc22_31: = bound_method %.loc22_24.2, %impl.elem0.loc22_31 [concrete = constants.%F.bound] +// CHECK:STDOUT: %impl.elem0.loc23_31: %.5c7 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.9ec] +// CHECK:STDOUT: %bound_method.loc23_31: = bound_method %.loc23_24.2, %impl.elem0.loc23_31 [concrete = constants.%F.bound] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc22_38: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc22_38.1: = bound_method %int_2, %impl.elem0.loc22_38 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc22_38: = specific_function %impl.elem0.loc22_38, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] -// CHECK:STDOUT: %bound_method.loc22_38.2: = bound_method %int_2, %specific_fn.loc22_38 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc22_38: init %i32 = call %bound_method.loc22_38.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc22_38.1: %i32 = value_of_initializer %int.convert_checked.loc22_38 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc22_38.2: %i32 = converted %int_2, %.loc22_38.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc22_31(%.loc22_24.2, %.loc22_38.2) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc22_39: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] -// CHECK:STDOUT: %bound_method.loc22_39.1: = bound_method %int.sadd, %impl.elem0.loc22_39 [concrete = constants.%Convert.bound.2d6] -// CHECK:STDOUT: %specific_fn.loc22_39: = specific_function %impl.elem0.loc22_39, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] -// CHECK:STDOUT: %bound_method.loc22_39.2: = bound_method %int.sadd, %specific_fn.loc22_39 [concrete = constants.%bound_method.c6f] -// CHECK:STDOUT: %.loc22_39.1: %i32 = value_of_initializer %int.sadd [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc22_39.2: %i32 = converted %int.sadd, %.loc22_39.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %int.convert_checked.loc22_39: init Core.IntLiteral = call %bound_method.loc22_39.2(%.loc22_39.2) [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %.loc22_39.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc22_39 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %.loc22_39.4: Core.IntLiteral = converted %int.sadd, %.loc22_39.3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %.loc22_39.4, %i32.loc22_16 [concrete = constants.%array_type] +// CHECK:STDOUT: %impl.elem0.loc23_38: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc23_38.1: = bound_method %int_2, %impl.elem0.loc23_38 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc23_38: = specific_function %impl.elem0.loc23_38, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %bound_method.loc23_38.2: = bound_method %int_2, %specific_fn.loc23_38 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc23_38: init %i32 = call %bound_method.loc23_38.2(%int_2) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc23_38.1: %i32 = value_of_initializer %int.convert_checked.loc23_38 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc23_38.2: %i32 = converted %int_2, %.loc23_38.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc23_31(%.loc23_24.2, %.loc23_38.2) [concrete = constants.%int_3.822] +// CHECK:STDOUT: %impl.elem0.loc23_39: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %bound_method.loc23_39.1: = bound_method %int.sadd, %impl.elem0.loc23_39 [concrete = constants.%Convert.bound.2d6] +// CHECK:STDOUT: %specific_fn.loc23_39: = specific_function %impl.elem0.loc23_39, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] +// CHECK:STDOUT: %bound_method.loc23_39.2: = bound_method %int.sadd, %specific_fn.loc23_39 [concrete = constants.%bound_method.c6f] +// CHECK:STDOUT: %.loc23_39.1: %i32 = value_of_initializer %int.sadd [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc23_39.2: %i32 = converted %int.sadd, %.loc23_39.1 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %int.convert_checked.loc23_39: init Core.IntLiteral = call %bound_method.loc23_39.2(%.loc23_39.2) [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %.loc23_39.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc23_39 [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %.loc23_39.4: Core.IntLiteral = converted %int.sadd, %.loc23_39.3 [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %array_type: type = array_type %.loc23_39.4, %i32.loc23_16 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var [concrete = %arr.var] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] { // CHECK:STDOUT: %self.patt: @F.1.%pattern_type (%pattern_type.6de) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @F.1.%pattern_type (%pattern_type.6de) = value_param_pattern %self.patt, call_param0 [concrete] @@ -184,25 +185,25 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.6de) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.6de) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc15_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] -// CHECK:STDOUT: %Self.as_type.loc15_36: type = facet_access_type %Self.ref.loc15_36 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] -// CHECK:STDOUT: %.loc15_36: type = converted %Self.ref.loc15_36, %Self.as_type.loc15_36 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] -// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = value_param call_param0 -// CHECK:STDOUT: %.loc15_14.1: type = splice_block %.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] { -// CHECK:STDOUT: %Self.ref.loc15_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] -// CHECK:STDOUT: %Self.as_type.loc15_14.2: type = facet_access_type %Self.ref.loc15_14 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] -// CHECK:STDOUT: %.loc15_14.2: type = converted %Self.ref.loc15_14, %Self.as_type.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %Self.ref.loc16_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc16_36: type = facet_access_type %Self.ref.loc16_36 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %.loc16_36: type = converted %Self.ref.loc16_36, %Self.as_type.loc16_36 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70) = value_param call_param0 +// CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] { +// CHECK:STDOUT: %Self.ref.loc16_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc16_14.2: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = bind_name self, %self.param -// CHECK:STDOUT: %other.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = value_param call_param1 -// CHECK:STDOUT: %.loc15_27.1: type = splice_block %.loc15_27.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] { -// CHECK:STDOUT: %Self.ref.loc15_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] -// CHECK:STDOUT: %Self.as_type.loc15_27: type = facet_access_type %Self.ref.loc15_27 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] -// CHECK:STDOUT: %.loc15_27.2: type = converted %Self.ref.loc15_27, %Self.as_type.loc15_27 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70) = value_param call_param1 +// CHECK:STDOUT: %.loc16_27.1: type = splice_block %.loc16_27.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] { +// CHECK:STDOUT: %Self.ref.loc16_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc16_27: type = facet_access_type %Self.ref.loc16_27 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %.loc16_27.2: type = converted %Self.ref.loc16_27, %Self.as_type.loc16_27 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: } -// CHECK:STDOUT: %other: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = out_param call_param2 -// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = return_slot %return.param +// CHECK:STDOUT: %other: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70) = out_param call_param2 +// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.82e] // CHECK:STDOUT: @@ -221,18 +222,18 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc19_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc20_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc20_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %self.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc19_14: type = splice_block %i32.loc19_14 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc19_14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc20_14: type = splice_block %i32.loc20_14 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc20_14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc20_14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc19_26: type = splice_block %i32.loc19_26 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc19_26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc20_26: type = splice_block %i32.loc20_26 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc20_26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc20_26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %other: %i32 = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 @@ -245,24 +246,24 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.8268)] -// CHECK:STDOUT: %Self.as_type.loc15_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc15_14.1 [symbolic = %pattern_type (constants.%pattern_type.6de)] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc16_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_14.1 [symbolic = %pattern_type (constants.%pattern_type.6de)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70), %other.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70)) -> @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70); +// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70), %other.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70)) -> @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.b70); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%self.param: %i32, %other.param: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Self.8268) { -// CHECK:STDOUT: %Self => constants.%Self.8268 -// CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%Self.as_type.b70 +// CHECK:STDOUT: specific @F.1(constants.%Self.826) { +// CHECK:STDOUT: %Self => constants.%Self.826 +// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%Self.as_type.b70 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet -// CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%i32 +// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/positional.carbon b/toolchain/check/testdata/function/builtin/positional.carbon index 270a468f3419..3c688efcda43 100644 --- a/toolchain/check/testdata/function/builtin/positional.carbon +++ b/toolchain/check/testdata/function/builtin/positional.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -53,7 +54,7 @@ fn Mul = "int.smul"; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/as_type.carbon b/toolchain/check/testdata/interface/as_type.carbon index 093b5c2c14f8..7dc3eace00b4 100644 --- a/toolchain/check/testdata/interface/as_type.carbon +++ b/toolchain/check/testdata/interface/as_type.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/as_type_of_type.carbon b/toolchain/check/testdata/interface/as_type_of_type.carbon index dc983ee02c80..f0b9a016a2ff 100644 --- a/toolchain/check/testdata/interface/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/as_type_of_type.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index 37c19995ea3e..4e22319c9926 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -36,7 +37,7 @@ interface I { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/assoc_const_in_generic.carbon index 0802d98a59f7..b43b0d2b0601 100644 --- a/toolchain/check/testdata/interface/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/assoc_const_in_generic.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // @@ -69,26 +70,26 @@ fn H() { // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc14_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc15_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc18_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc18_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc19_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(%T.loc14_13.1: type) { -// CHECK:STDOUT: %T.loc14_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_13.2 (constants.%T)] +// CHECK:STDOUT: generic interface @I(%T.loc15_13.1: type) { +// CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc14_13.2)> [symbolic = %I.type (constants.%I.type.325)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc15_13.2)> [symbolic = %I.type (constants.%I.type.325)] // CHECK:STDOUT: %Self.2: @I.%I.type (%I.type.325) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.209)] -// CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc14_13.2) [symbolic = %F.type (constants.%F.type.2ae)] +// CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc15_13.2) [symbolic = %F.type (constants.%F.type.2ae)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.2ae) = struct_value () [symbolic = %F (constants.%F.bb2)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc14_13.2) [symbolic = %I.assoc_type (constants.%I.assoc_type.1e5)] -// CHECK:STDOUT: %assoc0.loc15_22.2: @I.%I.assoc_type (%I.assoc_type.1e5) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc15_22.2 (constants.%assoc0.8f0)] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc15_13.2) [symbolic = %I.assoc_type (constants.%I.assoc_type.1e5)] +// CHECK:STDOUT: %assoc0.loc16_22.2: @I.%I.assoc_type (%I.assoc_type.1e5) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc16_22.2 (constants.%assoc0.8f0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.325) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.209)] @@ -97,44 +98,44 @@ fn H() { // CHECK:STDOUT: %return.patt: @F.%pattern_type (%pattern_type.20f) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.%pattern_type (%pattern_type.20f) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc15_8.2 [symbolic = %U.loc15_8.1 (constants.%U)] -// CHECK:STDOUT: %U.loc15_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc15_8.1 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @F.%U.loc15_8.1 (%U) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.%U.loc15_8.1 (%U) = return_slot %return.param +// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U)] +// CHECK:STDOUT: %U.loc16_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc16_8.1 (constants.%U)] +// CHECK:STDOUT: %return.param: ref @F.%U.loc16_8.1 (%U) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.%U.loc16_8.1 (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc15_22.1: @I.%I.assoc_type (%I.assoc_type.1e5) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc15_22.2 (constants.%assoc0.8f0)] +// CHECK:STDOUT: %assoc0.loc16_22.1: @I.%I.assoc_type (%I.assoc_type.1e5) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc16_22.2 (constants.%assoc0.8f0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %assoc0.loc15_22.1 +// CHECK:STDOUT: .F = %assoc0.loc16_22.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@I.%T.loc14_13.1: type, @I.%Self.1: @I.%I.type (%I.type.325), %U.loc15_8.2: type) { -// CHECK:STDOUT: %U.loc15_8.1: type = bind_symbolic_name U, 2 [symbolic = %U.loc15_8.1 (constants.%U)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.loc15_8.1 [symbolic = %pattern_type (constants.%pattern_type.20f)] +// CHECK:STDOUT: generic fn @F(@I.%T.loc15_13.1: type, @I.%Self.1: @I.%I.type (%I.type.325), %U.loc16_8.2: type) { +// CHECK:STDOUT: %U.loc16_8.1: type = bind_symbolic_name U, 2 [symbolic = %U.loc16_8.1 (constants.%U)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.loc16_8.1 [symbolic = %pattern_type (constants.%pattern_type.20f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @F.%U.loc15_8.1 (%U); +// CHECK:STDOUT: fn() -> @F.%U.loc16_8.1 (%U); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc18_6.1: type) { -// CHECK:STDOUT: %T.loc18_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc18_6.2 (constants.%T)] +// CHECK:STDOUT: generic fn @G(%T.loc19_6.1: type) { +// CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type.loc22_6.2: type = facet_type <@I, @I(%T.loc18_6.2)> [symbolic = %I.type.loc22_6.2 (constants.%I.type.325)] -// CHECK:STDOUT: %require_complete.loc22_7.1: = require_complete_type %I.type.loc22_6.2 [symbolic = %require_complete.loc22_7.1 (constants.%require_complete.cfe)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc18_6.2) [symbolic = %I.assoc_type (constants.%I.assoc_type.1e5)] +// CHECK:STDOUT: %I.type.loc23_6.2: type = facet_type <@I, @I(%T.loc19_6.2)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.325)] +// CHECK:STDOUT: %require_complete.loc23_7.1: = require_complete_type %I.type.loc23_6.2 [symbolic = %require_complete.loc23_7.1 (constants.%require_complete.cfe)] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc19_6.2) [symbolic = %I.assoc_type (constants.%I.assoc_type.1e5)] // CHECK:STDOUT: %assoc0: @G.%I.assoc_type (%I.assoc_type.1e5) = assoc_entity element0, @I.%F.decl [symbolic = %assoc0 (constants.%assoc0.8f0)] -// CHECK:STDOUT: %require_complete.loc22_7.2: = require_complete_type %I.assoc_type [symbolic = %require_complete.loc22_7.2 (constants.%require_complete.f84)] +// CHECK:STDOUT: %require_complete.loc23_7.2: = require_complete_type %I.assoc_type [symbolic = %require_complete.loc23_7.2 (constants.%require_complete.f84)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc18_6.1 [symbolic = %T.loc18_6.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc22_6.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc22_6.2 (constants.%I.type.325)] -// CHECK:STDOUT: %.loc22: @G.%I.assoc_type (%I.assoc_type.1e5) = specific_constant @I.%assoc0.loc15_22.1, @I(constants.%T) [symbolic = %assoc0 (constants.%assoc0.8f0)] -// CHECK:STDOUT: %F.ref: @G.%I.assoc_type (%I.assoc_type.1e5) = name_ref F, %.loc22 [symbolic = %assoc0 (constants.%assoc0.8f0)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)] +// CHECK:STDOUT: %I.type.loc23_6.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.325)] +// CHECK:STDOUT: %.loc23: @G.%I.assoc_type (%I.assoc_type.1e5) = specific_constant @I.%assoc0.loc16_22.1, @I(constants.%T) [symbolic = %assoc0 (constants.%assoc0.8f0)] +// CHECK:STDOUT: %F.ref: @G.%I.assoc_type (%I.assoc_type.1e5) = name_ref F, %.loc23 [symbolic = %assoc0 (constants.%assoc0.8f0)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -142,15 +143,15 @@ fn H() { // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] -// CHECK:STDOUT: %.loc26_6: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc26_7: type = converted %.loc26_6, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc27_6: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc27_7: type = converted %.loc27_6, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%empty_struct_type) [concrete = constants.%G.specific_fn] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { -// CHECK:STDOUT: %T.loc14_13.2 => constants.%T +// CHECK:STDOUT: %T.loc15_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.325 @@ -158,31 +159,31 @@ fn H() { // CHECK:STDOUT: %F.type => constants.%F.type.2ae // CHECK:STDOUT: %F => constants.%F.bb2 // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.1e5 -// CHECK:STDOUT: %assoc0.loc15_22.2 => constants.%assoc0.8f0 +// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.8f0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%Self.209, constants.%U) { -// CHECK:STDOUT: %U.loc15_8.1 => constants.%U +// CHECK:STDOUT: %U.loc16_8.1 => constants.%U // CHECK:STDOUT: %pattern_type => constants.%pattern_type.20f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.loc18_6.2 => constants.%T +// CHECK:STDOUT: %T.loc19_6.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%empty_struct_type) { -// CHECK:STDOUT: %T.loc18_6.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.loc19_6.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type.loc22_6.2 => constants.%I.type.885 -// CHECK:STDOUT: %require_complete.loc22_7.1 => constants.%complete_type.788 +// CHECK:STDOUT: %I.type.loc23_6.2 => constants.%I.type.885 +// CHECK:STDOUT: %require_complete.loc23_7.1 => constants.%complete_type.788 // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.22c // CHECK:STDOUT: %assoc0 => constants.%assoc0.722 -// CHECK:STDOUT: %require_complete.loc22_7.2 => constants.%complete_type.d28 +// CHECK:STDOUT: %require_complete.loc23_7.2 => constants.%complete_type.d28 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%empty_struct_type) { -// CHECK:STDOUT: %T.loc14_13.2 => constants.%empty_struct_type +// CHECK:STDOUT: %T.loc15_13.2 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.885 @@ -190,6 +191,6 @@ fn H() { // CHECK:STDOUT: %F.type => constants.%F.type.684 // CHECK:STDOUT: %F => constants.%F.a8d // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.22c -// CHECK:STDOUT: %assoc0.loc15_22.2 => constants.%assoc0.722 +// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.722 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/basic.carbon b/toolchain/check/testdata/interface/basic.carbon index 9d312a942949..a9e83364b9b4 100644 --- a/toolchain/check/testdata/interface/basic.carbon +++ b/toolchain/check/testdata/interface/basic.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // @@ -36,11 +37,11 @@ interface ForwardDeclared { // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Empty = %Empty.decl -// CHECK:STDOUT: .ForwardDeclared = %ForwardDeclared.decl.loc17 +// CHECK:STDOUT: .ForwardDeclared = %ForwardDeclared.decl.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [concrete = constants.%Empty.type] {} {} -// CHECK:STDOUT: %ForwardDeclared.decl.loc17: type = interface_decl @ForwardDeclared [concrete = constants.%ForwardDeclared.type] {} {} -// CHECK:STDOUT: %ForwardDeclared.decl.loc19: type = interface_decl @ForwardDeclared [concrete = constants.%ForwardDeclared.type] {} {} +// CHECK:STDOUT: %ForwardDeclared.decl.loc18: type = interface_decl @ForwardDeclared [concrete = constants.%ForwardDeclared.type] {} {} +// CHECK:STDOUT: %ForwardDeclared.decl.loc20: type = interface_decl @ForwardDeclared [concrete = constants.%ForwardDeclared.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index 39b2b2079331..ac944454e2b1 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/interface/default_fn.carbon b/toolchain/check/testdata/interface/default_fn.carbon index 373bb22e1e71..9cb8a84d2779 100644 --- a/toolchain/check/testdata/interface/default_fn.carbon +++ b/toolchain/check/testdata/interface/default_fn.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -55,6 +55,7 @@ class C { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/export_name.carbon b/toolchain/check/testdata/interface/export_name.carbon index 077e471e9895..e41b60e22c36 100644 --- a/toolchain/check/testdata/interface/export_name.carbon +++ b/toolchain/check/testdata/interface/export_name.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_add_member_outside_definition.carbon b/toolchain/check/testdata/interface/fail_add_member_outside_definition.carbon index 8df965c316a2..320520a6c4b2 100644 --- a/toolchain/check/testdata/interface/fail_add_member_outside_definition.carbon +++ b/toolchain/check/testdata/interface/fail_add_member_outside_definition.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon index 60ba3c0b83f2..f9bb0f7dc05d 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index 9e2c0afdb7a0..34da3cb62add 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -40,7 +41,7 @@ interface I { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,7 +58,7 @@ interface I { // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.cd1] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42] -// CHECK:STDOUT: %.loc22: type = converted %int_42, [concrete = ] +// CHECK:STDOUT: %.loc23: type = converted %int_42, [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/interface/fail_assoc_const_not_binding.carbon b/toolchain/check/testdata/interface/fail_assoc_const_not_binding.carbon index bbf6a2767ac1..ed7be5eb9b98 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_not_binding.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_not_binding.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_assoc_const_template.carbon b/toolchain/check/testdata/interface/fail_assoc_const_template.carbon index 9ddb22b537ea..237e7d5f4e23 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_template.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_template.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon b/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon index ae5bda4ee31c..abdd8ad5a0e8 100644 --- a/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_definition_imported.carbon b/toolchain/check/testdata/interface/fail_definition_imported.carbon index 5a6884247e43..aacc255d005e 100644 --- a/toolchain/check/testdata/interface/fail_definition_imported.carbon +++ b/toolchain/check/testdata/interface/fail_definition_imported.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_duplicate.carbon b/toolchain/check/testdata/interface/fail_duplicate.carbon index be196fb46535..2759a44d7d27 100644 --- a/toolchain/check/testdata/interface/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/fail_duplicate.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon index f8f2ca46ad28..1b53ae737e21 100644 --- a/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // @@ -68,45 +69,45 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .NotGeneric = %NotGeneric.decl.loc14 -// CHECK:STDOUT: .Generic = %Generic.decl.loc24 -// CHECK:STDOUT: .DifferentParams = %DifferentParams.decl.loc34 +// CHECK:STDOUT: .NotGeneric = %NotGeneric.decl.loc15 +// CHECK:STDOUT: .Generic = %Generic.decl.loc25 +// CHECK:STDOUT: .DifferentParams = %DifferentParams.decl.loc35 // CHECK:STDOUT: } -// CHECK:STDOUT: %NotGeneric.decl.loc14: type = interface_decl @NotGeneric.1 [concrete = constants.%NotGeneric.type.10e] {} {} -// CHECK:STDOUT: %NotGeneric.decl.loc22: %NotGeneric.type.93b = interface_decl @NotGeneric.2 [concrete = constants.%NotGeneric.generic] { +// CHECK:STDOUT: %NotGeneric.decl.loc15: type = interface_decl @NotGeneric.1 [concrete = constants.%NotGeneric.type.10e] {} {} +// CHECK:STDOUT: %NotGeneric.decl.loc23: %NotGeneric.type.93b = interface_decl @NotGeneric.2 [concrete = constants.%NotGeneric.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc22_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_22.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc23_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_22.2 (constants.%T.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Generic.decl.loc24: %Generic.type.c21 = interface_decl @Generic.1 [concrete = constants.%Generic.generic] { +// CHECK:STDOUT: %Generic.decl.loc25: %Generic.type.c21 = interface_decl @Generic.1 [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc24_19.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc24_19.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc25_19.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc25_19.2 (constants.%T.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Generic.decl.loc32: type = interface_decl @Generic.2 [concrete = constants.%Generic.type.c99] {} {} -// CHECK:STDOUT: %DifferentParams.decl.loc34: %DifferentParams.type.d40e5c.1 = interface_decl @DifferentParams.1 [concrete = constants.%DifferentParams.generic.d33670.1] { +// CHECK:STDOUT: %Generic.decl.loc33: type = interface_decl @Generic.2 [concrete = constants.%Generic.type.c99] {} {} +// CHECK:STDOUT: %DifferentParams.decl.loc35: %DifferentParams.type.d40e5c.1 = interface_decl @DifferentParams.1 [concrete = constants.%DifferentParams.generic.d33670.1] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc34_27.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc34_27.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc35_27.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc35_27.2 (constants.%T.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %DifferentParams.decl.loc42: %DifferentParams.type.d40e5c.2 = interface_decl @DifferentParams.2 [concrete = constants.%DifferentParams.generic.d33670.2] { +// CHECK:STDOUT: %DifferentParams.decl.loc43: %DifferentParams.type.d40e5c.2 = interface_decl @DifferentParams.2 [concrete = constants.%DifferentParams.generic.d33670.2] { // CHECK:STDOUT: %T.patt: %pattern_type.cb1 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc42_32.1: type = splice_block %.loc42_32.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc42_32.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc42_32.3: type = converted %.loc42_32.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc43_32.1: type = splice_block %.loc43_32.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc43_32.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc43_32.3: type = converted %.loc43_32.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc42_27.1: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc42_27.2 (constants.%T.7a6)] +// CHECK:STDOUT: %T.loc43_27.1: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc43_27.2 (constants.%T.7a6)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NotGeneric.1; // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @NotGeneric.2(%T.loc22_22.1: type) { -// CHECK:STDOUT: %T.loc22_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_22.2 (constants.%T.8b3)] +// CHECK:STDOUT: generic interface @NotGeneric.2(%T.loc23_22.1: type) { +// CHECK:STDOUT: %T.loc23_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_22.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %NotGeneric.type: type = facet_type <@NotGeneric.2, @NotGeneric.2(%T.loc22_22.2)> [symbolic = %NotGeneric.type (constants.%NotGeneric.type.8cb)] +// CHECK:STDOUT: %NotGeneric.type: type = facet_type <@NotGeneric.2, @NotGeneric.2(%T.loc23_22.2)> [symbolic = %NotGeneric.type (constants.%NotGeneric.type.8cb)] // CHECK:STDOUT: %Self.2: @NotGeneric.2.%NotGeneric.type (%NotGeneric.type.8cb) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c08)] // CHECK:STDOUT: // CHECK:STDOUT: interface { @@ -118,8 +119,8 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Generic.1(%T.loc24_19.1: type) { -// CHECK:STDOUT: %T.loc24_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc24_19.2 (constants.%T.8b3)] +// CHECK:STDOUT: generic interface @Generic.1(%T.loc25_19.1: type) { +// CHECK:STDOUT: %T.loc25_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc25_19.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: interface; // CHECK:STDOUT: } @@ -132,17 +133,17 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @DifferentParams.1(%T.loc34_27.1: type) { -// CHECK:STDOUT: %T.loc34_27.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc34_27.2 (constants.%T.8b3)] +// CHECK:STDOUT: generic interface @DifferentParams.1(%T.loc35_27.1: type) { +// CHECK:STDOUT: %T.loc35_27.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc35_27.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: interface; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @DifferentParams.2(%T.loc42_27.1: %empty_tuple.type) { -// CHECK:STDOUT: %T.loc42_27.2: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc42_27.2 (constants.%T.7a6)] +// CHECK:STDOUT: generic interface @DifferentParams.2(%T.loc43_27.1: %empty_tuple.type) { +// CHECK:STDOUT: %T.loc43_27.2: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc43_27.2 (constants.%T.7a6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %DifferentParams.type: type = facet_type <@DifferentParams.2, @DifferentParams.2(%T.loc42_27.2)> [symbolic = %DifferentParams.type (constants.%DifferentParams.type.12c)] +// CHECK:STDOUT: %DifferentParams.type: type = facet_type <@DifferentParams.2, @DifferentParams.2(%T.loc43_27.2)> [symbolic = %DifferentParams.type (constants.%DifferentParams.type.12c)] // CHECK:STDOUT: %Self.2: @DifferentParams.2.%DifferentParams.type (%DifferentParams.type.12c) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.8d7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { @@ -155,18 +156,18 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @NotGeneric.2(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc22_22.2 => constants.%T.8b3 +// CHECK:STDOUT: %T.loc23_22.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.1(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc24_19.2 => constants.%T.8b3 +// CHECK:STDOUT: %T.loc25_19.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @DifferentParams.1(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc34_27.2 => constants.%T.8b3 +// CHECK:STDOUT: %T.loc35_27.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @DifferentParams.2(constants.%T.7a6) { -// CHECK:STDOUT: %T.loc42_27.2 => constants.%T.7a6 +// CHECK:STDOUT: %T.loc43_27.2 => constants.%T.7a6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_incomplete_type.carbon b/toolchain/check/testdata/interface/fail_incomplete_type.carbon index 96937142763a..a01c2a57ca1e 100644 --- a/toolchain/check/testdata/interface/fail_incomplete_type.carbon +++ b/toolchain/check/testdata/interface/fail_incomplete_type.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_lookup_in_type_type.carbon b/toolchain/check/testdata/interface/fail_lookup_in_type_type.carbon index b22c536c7127..9c8972aa5183 100644 --- a/toolchain/check/testdata/interface/fail_lookup_in_type_type.carbon +++ b/toolchain/check/testdata/interface/fail_lookup_in_type_type.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_lookup_undefined.carbon b/toolchain/check/testdata/interface/fail_lookup_undefined.carbon index c099175eee01..cdd8d2776dd0 100644 --- a/toolchain/check/testdata/interface/fail_lookup_undefined.carbon +++ b/toolchain/check/testdata/interface/fail_lookup_undefined.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/fail_member_lookup.carbon b/toolchain/check/testdata/interface/fail_member_lookup.carbon index 768cc5270d31..90b4e02e61ad 100644 --- a/toolchain/check/testdata/interface/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/fail_member_lookup.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -12,18 +12,9 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_member_lookup.carbon -// --- core.carbon -package Core; - -interface ImplicitAs(Dest:! type) { - fn Convert[self: Self]() -> Dest; -} - // --- fail_member_lookup.carbon library "[[@TEST_NAME]]"; -import Core; - interface Interface { fn F(); @@ -55,100 +46,6 @@ interface Different {} // CHECK:STDERR: fn G(U:! Different) -> U.(Interface.T); -// CHECK:STDOUT: --- core.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] -// CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %pattern_type.a93: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Convert: %Convert.type = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { -// CHECK:STDOUT: %Dest.patt: %pattern_type.98f = symbolic_binding_pattern Dest, 0 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Dest.loc3_22.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.2 (constants.%Dest)] -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(%Dest.loc3_22.1: type) { -// CHECK:STDOUT: %Dest.loc3_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.2 (constants.%Dest)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)] -// CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest.loc3_22.2) [symbolic = %Convert.type (constants.%Convert.type)] -// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type) = struct_value () [symbolic = %Convert (constants.%Convert)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest.loc3_22.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)] -// CHECK:STDOUT: %assoc0.loc4_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] -// CHECK:STDOUT: -// CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] -// CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type) = fn_decl @Convert [symbolic = @ImplicitAs.%Convert (constants.%Convert)] { -// CHECK:STDOUT: %self.patt: @Convert.%pattern_type.loc4_14 (%pattern_type.a93) = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Convert.%pattern_type.loc4_14 (%pattern_type.a93) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Convert.%pattern_type.loc4_28 (%pattern_type.7dc) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Convert.%pattern_type.loc4_28 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_22.1 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %self.param: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.3 [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc4_20.2: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc4_20.3: type = converted %Self.ref, %Self.as_type.loc4_20.2 [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @Convert.%Dest (%Dest) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Convert.%Dest (%Dest) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .Dest = -// CHECK:STDOUT: .Convert = %assoc0.loc4_35.1 -// CHECK:STDOUT: witness = (%Convert.decl) -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(@ImplicitAs.%Dest.loc3_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)] -// CHECK:STDOUT: %Self: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type.loc4_14: type = pattern_type %Self.as_type.loc4_20.1 [symbolic = %pattern_type.loc4_14 (constants.%pattern_type.a93)] -// CHECK:STDOUT: %pattern_type.loc4_28: type = pattern_type %Dest [symbolic = %pattern_type.loc4_28 (constants.%pattern_type.7dc)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type)) -> @Convert.%Dest (%Dest); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest.loc3_22.2 => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc4_20.1 => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type.loc4_14 => constants.%pattern_type.a93 -// CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.7dc -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_member_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -163,23 +60,6 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %F.c41: %F.type.b25 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] -// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic] -// CHECK:STDOUT: %pattern_type.f3e: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0.9f5: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.dc8: type = facet_type <@ImplicitAs, @ImplicitAs(type)> [concrete] -// CHECK:STDOUT: %Self.94d: %ImplicitAs.type.dc8 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Convert.type.30b: type = fn_type @Convert, @ImplicitAs(type) [concrete] -// CHECK:STDOUT: %Convert.732: %Convert.type.30b = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.assoc_type.ce4: type = assoc_entity_type @ImplicitAs, @ImplicitAs(type) [concrete] -// CHECK:STDOUT: %assoc0.73f: %ImplicitAs.assoc_type.ce4 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete] -// CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] // CHECK:STDOUT: %Different.type: type = facet_type <@Different> [concrete] // CHECK:STDOUT: %Self.e7f: %Different.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %U: %Different.type = bind_symbolic_name U, 0 [symbolic] @@ -192,17 +72,9 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//default +// CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst25 [no loc], unloaded -// CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)] -// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst25 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] -// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//default, loc4_35, unloaded +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -222,11 +94,11 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %return.patt: = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc34_6.1 [symbolic = %U.loc34_6.2 (constants.%U)] +// CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc32_6.1 [symbolic = %U.loc32_6.2 (constants.%U)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] // CHECK:STDOUT: %T.ref: %Interface.assoc_type = name_ref T, @T.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %Different.ref: type = name_ref Different, file.%Different.decl [concrete = constants.%Different.type] -// CHECK:STDOUT: %U.loc34_6.1: %Different.type = bind_symbolic_name U, 0 [symbolic = %U.loc34_6.2 (constants.%U)] +// CHECK:STDOUT: %U.loc32_6.1: %Different.type = bind_symbolic_name U, 0 [symbolic = %U.loc32_6.2 (constants.%U)] // CHECK:STDOUT: %return.param: ref = out_param call_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } @@ -247,25 +119,6 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: witness = (%F.decl, %T) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] -// CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)] -// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ca0)] -// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.9f5)] -// CHECK:STDOUT: -// CHECK:STDOUT: interface { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5 -// CHECK:STDOUT: .Convert = imports.%Core.import_ref.492 -// CHECK:STDOUT: witness = (imports.%Core.Convert) -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: interface @Different { // CHECK:STDOUT: %Self: %Different.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.e7f] // CHECK:STDOUT: @@ -284,7 +137,7 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Interface.ref.loc16: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] +// CHECK:STDOUT: %Interface.ref.loc14: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] // CHECK:STDOUT: %F.ref: %Interface.assoc_type = name_ref F, @Interface.%assoc0 [concrete = constants.%assoc0.b4c] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: = binding_pattern v [concrete] @@ -292,27 +145,16 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref = var %v.var_patt [concrete = ] // CHECK:STDOUT: %.1: = splice_block [concrete = ] { -// CHECK:STDOUT: %Interface.ref.loc25: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] +// CHECK:STDOUT: %Interface.ref.loc23: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] // CHECK:STDOUT: %T.ref: %Interface.assoc_type = name_ref T, @T.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %.loc25: type = converted %T.ref, [concrete = ] +// CHECK:STDOUT: %.loc23: type = converted %T.ref, [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: %v: = bind_name v, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] -// CHECK:STDOUT: %Self: @Convert.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.f3e)] -// CHECK:STDOUT: %pattern_type.2: type = pattern_type %Dest [symbolic = %pattern_type.2 (constants.%pattern_type.7dc)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%U.loc34_6.1: %Different.type) { -// CHECK:STDOUT: %U.loc34_6.2: %Different.type = bind_symbolic_name U, 0 [symbolic = %U.loc34_6.2 (constants.%U)] +// CHECK:STDOUT: generic fn @G(%U.loc32_6.1: %Different.type) { +// CHECK:STDOUT: %U.loc32_6.2: %Different.type = bind_symbolic_name U, 0 [symbolic = %U.loc32_6.2 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } @@ -321,32 +163,7 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%Self.719) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62 -// CHECK:STDOUT: %Self => constants.%Self.519 -// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.f3e -// CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.7dc -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(type) { -// CHECK:STDOUT: %Dest => type -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.dc8 -// CHECK:STDOUT: %Self => constants.%Self.94d -// CHECK:STDOUT: %Convert.type => constants.%Convert.type.30b -// CHECK:STDOUT: %Convert => constants.%Convert.732 -// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.ce4 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.73f -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%U) { -// CHECK:STDOUT: %U.loc34_6.2 => constants.%U +// CHECK:STDOUT: %U.loc32_6.2 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_redeclare_member.carbon b/toolchain/check/testdata/interface/fail_redeclare_member.carbon index ab551503bb96..fea24f944296 100644 --- a/toolchain/check/testdata/interface/fail_redeclare_member.carbon +++ b/toolchain/check/testdata/interface/fail_redeclare_member.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // @@ -31,7 +32,7 @@ interface Interface { // CHECK:STDOUT: %F.type.1ad64d.1: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.5d382e.1: %F.type.1ad64d.1 = struct_value () [concrete] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface [concrete] -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.%F.decl.loc15 [concrete] +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.%F.decl.loc16 [concrete] // CHECK:STDOUT: %F.type.1ad64d.2: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.5d382e.2: %F.type.1ad64d.2 = struct_value () [concrete] // CHECK:STDOUT: } @@ -45,14 +46,14 @@ interface Interface { // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl.loc15: %F.type.1ad64d.1 = fn_decl @F.1 [concrete = constants.%F.5d382e.1] {} {} -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %F.decl.loc15 [concrete = constants.%assoc0] -// CHECK:STDOUT: %F.decl.loc23: %F.type.1ad64d.2 = fn_decl @F.2 [concrete = constants.%F.5d382e.2] {} {} +// CHECK:STDOUT: %F.decl.loc16: %F.type.1ad64d.1 = fn_decl @F.1 [concrete = constants.%F.5d382e.1] {} {} +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %F.decl.loc16 [concrete = constants.%assoc0] +// CHECK:STDOUT: %F.decl.loc24: %F.type.1ad64d.2 = fn_decl @F.2 [concrete = constants.%F.5d382e.2] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%F.decl.loc15) +// CHECK:STDOUT: witness = (%F.decl.loc16) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Interface.%Self: %Interface.type) { diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 3b2f132156b0..1bcc0efcd4b7 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -28,7 +29,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0.cd1: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -37,22 +38,22 @@ interface I { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] -// CHECK:STDOUT: %assoc1.d15: %I.assoc_type = assoc_entity element1, @I.%N [concrete] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%N [concrete] // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] // CHECK:STDOUT: } @@ -64,9 +65,9 @@ interface I { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,26 +81,26 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.cd1] -// CHECK:STDOUT: %int_32.loc19_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc19_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc19_35: %tuple.type.24b = tuple_literal (%i32.loc19_27, %i32.loc19_32) -// CHECK:STDOUT: %.loc19_36: type = converted %.loc19_35, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] +// CHECK:STDOUT: %int_32.loc20_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc20_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc20_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc20_32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc20_35: %tuple.type.24b = tuple_literal (%i32.loc20_27, %i32.loc20_32) +// CHECK:STDOUT: %.loc20_36: type = converted %.loc20_35, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] // CHECK:STDOUT: } // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%N [concrete = constants.%assoc1.d15] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%N [concrete = constants.%assoc1] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc24_27.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc24_27.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc24_27.2(%int_42) [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %.loc24_27.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %.loc24_27.2: %i32 = converted %int_42, %.loc24_27.1 [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %bound_method.loc25_27.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc25_27.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc25_27.2(%int_42) [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_42, %.loc25_27.1 [concrete = constants.%int_42.c68] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -112,16 +113,16 @@ interface I { // CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: assoc_const T:! type = %.loc19_36; +// CHECK:STDOUT: assoc_const T:! type = %.loc20_36; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: assoc_const N:! %i32 = %.loc24_27.2; +// CHECK:STDOUT: assoc_const N:! %i32 = %.loc25_27.2; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.8268) {} +// CHECK:STDOUT: specific @T(constants.%Self.826) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self.8268) {} +// CHECK:STDOUT: specific @N(constants.%Self.826) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index 0508d2df099d..ff9b663c80dd 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -50,7 +51,7 @@ interface Interface { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -74,18 +75,18 @@ interface Interface { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc25_35: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc25_35: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc26_35: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc26_35: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc25_19: type = splice_block %i32.loc25_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc25_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc25_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc26_19: type = splice_block %i32.loc26_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc26_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc26_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc25_27: type = splice_block %i32.loc25_27 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc25_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc25_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc26_27: type = splice_block %i32.loc26_27 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc26_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc26_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index ebd81fe2653f..6c8fce7ec448 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -96,7 +97,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon index d662c553c175..8a85feb1b272 100644 --- a/toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // @@ -52,7 +53,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc14_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc15_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.2aef59.2 = fn_decl @F.2 [symbolic = constants.%F.bb2dd4.2] { // CHECK:STDOUT: %self.patt: @F.2.%pattern_type (%pattern_type.4be) = binding_pattern self [concrete] @@ -60,34 +61,34 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %return.patt: @F.2.%pattern_type (%pattern_type.4be) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.2.%pattern_type (%pattern_type.4be) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc26_6: type = bind_symbolic_name T, 0 [symbolic = @I.%T.loc14_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc26_35.1: @F.2.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc26_35: @F.2.%I.type (%I.type.325) = name_ref Self, %.loc26_35.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc26_35: type = facet_access_type %Self.ref.loc26_35 [symbolic = %Self.as_type.loc26_24.2 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc26_35.2: type = converted %Self.ref.loc26_35, %Self.as_type.loc26_35 [symbolic = %Self.as_type.loc26_24.2 (constants.%Self.as_type)] -// CHECK:STDOUT: %self.param: @F.2.%Self.as_type.loc26_24.2 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc26_24.1: type = splice_block %.loc26_24.3 [symbolic = %Self.as_type.loc26_24.2 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc26_24.2: @F.2.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc26_24: @F.2.%I.type (%I.type.325) = name_ref Self, %.loc26_24.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc26_24.1: type = facet_access_type %Self.ref.loc26_24 [symbolic = %Self.as_type.loc26_24.2 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc26_24.3: type = converted %Self.ref.loc26_24, %Self.as_type.loc26_24.1 [symbolic = %Self.as_type.loc26_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %T.loc27_6: type = bind_symbolic_name T, 0 [symbolic = @I.%T.loc15_13.2 (constants.%T)] +// CHECK:STDOUT: %.loc27_35.1: @F.2.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc27_35: @F.2.%I.type (%I.type.325) = name_ref Self, %.loc27_35.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc27_35: type = facet_access_type %Self.ref.loc27_35 [symbolic = %Self.as_type.loc27_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc27_35.2: type = converted %Self.ref.loc27_35, %Self.as_type.loc27_35 [symbolic = %Self.as_type.loc27_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.2.%Self.as_type.loc27_24.2 (%Self.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc27_24.1: type = splice_block %.loc27_24.3 [symbolic = %Self.as_type.loc27_24.2 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc27_24.2: @F.2.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc27_24: @F.2.%I.type (%I.type.325) = name_ref Self, %.loc27_24.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc27_24.1: type = facet_access_type %Self.ref.loc27_24 [symbolic = %Self.as_type.loc27_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc27_24.3: type = converted %Self.ref.loc27_24, %Self.as_type.loc27_24.1 [symbolic = %Self.as_type.loc27_24.2 (constants.%Self.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @F.2.%Self.as_type.loc26_24.2 (%Self.as_type) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.2.%Self.as_type.loc26_24.2 (%Self.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.2.%Self.as_type.loc26_24.2 (%Self.as_type) = return_slot %return.param +// CHECK:STDOUT: %self: @F.2.%Self.as_type.loc27_24.2 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.2.%Self.as_type.loc27_24.2 (%Self.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.2.%Self.as_type.loc27_24.2 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(%T.loc14_13.1: type) { -// CHECK:STDOUT: %T.loc14_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_13.2 (constants.%T)] +// CHECK:STDOUT: generic interface @I(%T.loc15_13.1: type) { +// CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc14_13.2)> [symbolic = %I.type (constants.%I.type.325)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc15_13.2)> [symbolic = %I.type (constants.%I.type.325)] // CHECK:STDOUT: %Self.2: @I.%I.type (%I.type.325) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] -// CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%T.loc14_13.2) [symbolic = %F.type (constants.%F.type.2aef59.1)] +// CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%T.loc15_13.2) [symbolic = %F.type (constants.%F.type.2aef59.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.2aef59.1) = struct_value () [symbolic = %F (constants.%F.bb2dd4.1)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc14_13.2) [symbolic = %I.assoc_type (constants.%I.assoc_type)] -// CHECK:STDOUT: %assoc0.loc16_29.2: @I.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc16_29.2 (constants.%assoc0)] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc15_13.2) [symbolic = %I.assoc_type (constants.%I.assoc_type)] +// CHECK:STDOUT: %assoc0.loc17_29.2: @I.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc17_29.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.325) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -97,59 +98,59 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.4be) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.4be) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_25.1: @F.1.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc16_25: @F.1.%I.type (%I.type.325) = name_ref Self, %.loc16_25.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc16_25: type = facet_access_type %Self.ref.loc16_25 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc16_25.2: type = converted %Self.ref.loc16_25, %Self.as_type.loc16_25 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.3 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc16_14.2: @F.1.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc16_14: @F.1.%I.type (%I.type.325) = name_ref Self, %.loc16_14.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc16_14.2: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc16_14.3: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc17_25.1: @F.1.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc17_25: @F.1.%I.type (%I.type.325) = name_ref Self, %.loc17_25.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc17_25: type = facet_access_type %Self.ref.loc17_25 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc17_25.2: type = converted %Self.ref.loc17_25, %Self.as_type.loc17_25 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc17_14.1 (%Self.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc17_14.1: type = splice_block %.loc17_14.3 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc17_14.2: @F.1.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc17_14: @F.1.%I.type (%I.type.325) = name_ref Self, %.loc17_14.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc17_14.2: type = facet_access_type %Self.ref.loc17_14 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc17_14.3: type = converted %Self.ref.loc17_14, %Self.as_type.loc17_14.2 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc16_14.1 (%Self.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc16_14.1 (%Self.as_type) = return_slot %return.param +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc17_14.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc17_14.1 (%Self.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc17_14.1 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc16_29.1: @I.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc16_29.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc17_29.1: @I.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc17_29.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .F = %assoc0.loc16_29.1 +// CHECK:STDOUT: .F = %assoc0.loc17_29.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@I.%T.loc14_13.1: type, @I.%Self.1: @I.%I.type (%I.type.325)) { +// CHECK:STDOUT: generic fn @F.1(@I.%T.loc15_13.1: type, @I.%Self.1: @I.%I.type (%I.type.325)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.325)] // CHECK:STDOUT: %Self: @F.1.%I.type (%I.type.325) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc16_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_14.1 [symbolic = %pattern_type (constants.%pattern_type.4be)] +// CHECK:STDOUT: %Self.as_type.loc17_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc17_14.1 [symbolic = %pattern_type (constants.%pattern_type.4be)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type)) -> @F.1.%Self.as_type.loc16_14.1 (%Self.as_type); +// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc17_14.1 (%Self.as_type)) -> @F.1.%Self.as_type.loc17_14.1 (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.2(%T.loc26_6: type, @I.%Self.1: @I.%I.type (%I.type.325)) { -// CHECK:STDOUT: %T.loc26_24: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_24 (constants.%T)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc26_24)> [symbolic = %I.type (constants.%I.type.325)] +// CHECK:STDOUT: generic fn @F.2(%T.loc27_6: type, @I.%Self.1: @I.%I.type (%I.type.325)) { +// CHECK:STDOUT: %T.loc27_24: type = bind_symbolic_name T, 0 [symbolic = %T.loc27_24 (constants.%T)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc27_24)> [symbolic = %I.type (constants.%I.type.325)] // CHECK:STDOUT: %Self: @F.2.%I.type (%I.type.325) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc26_24.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc26_24.2 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc26_24.2 [symbolic = %pattern_type (constants.%pattern_type.4be)] +// CHECK:STDOUT: %Self.as_type.loc27_24.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc27_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc27_24.2 [symbolic = %pattern_type (constants.%pattern_type.4be)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type.loc26_24.2 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type.loc27_24.2 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.2.%Self.as_type.loc26_24.2 (%Self.as_type)) -> @F.2.%Self.as_type.loc26_24.2 (%Self.as_type) { +// CHECK:STDOUT: fn(%self.param: @F.2.%Self.as_type.loc27_24.2 (%Self.as_type)) -> @F.2.%Self.as_type.loc27_24.2 (%Self.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @F.2.%Self.as_type.loc26_24.2 (%Self.as_type) = name_ref self, %self +// CHECK:STDOUT: %self.ref: @F.2.%Self.as_type.loc27_24.2 (%Self.as_type) = name_ref self, %self // CHECK:STDOUT: return %self.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { -// CHECK:STDOUT: %T.loc14_13.2 => constants.%T +// CHECK:STDOUT: %T.loc15_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.325 @@ -157,22 +158,22 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %F.type => constants.%F.type.2aef59.1 // CHECK:STDOUT: %F => constants.%F.bb2dd4.1 // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type -// CHECK:STDOUT: %assoc0.loc16_29.2 => constants.%assoc0 +// CHECK:STDOUT: %assoc0.loc17_29.2 => constants.%assoc0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.325 // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%Self.as_type +// CHECK:STDOUT: %Self.as_type.loc17_14.1 => constants.%Self.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4be // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T, constants.%Self) { -// CHECK:STDOUT: %T.loc26_24 => constants.%T +// CHECK:STDOUT: %T.loc27_24 => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.325 // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc26_24.2 => constants.%Self.as_type +// CHECK:STDOUT: %Self.as_type.loc27_24.2 => constants.%Self.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4be // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_todo_modifiers.carbon b/toolchain/check/testdata/interface/fail_todo_modifiers.carbon index e27c04f49c79..eda9469cd7c5 100644 --- a/toolchain/check/testdata/interface/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/interface/fail_todo_modifiers.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/generic.carbon b/toolchain/check/testdata/interface/generic.carbon index 552f03bd07e3..675ec76aaeab 100644 --- a/toolchain/check/testdata/interface/generic.carbon +++ b/toolchain/check/testdata/interface/generic.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon b/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon index 86a3d605c593..1f7a16188e33 100644 --- a/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon +++ b/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // @@ -48,7 +49,7 @@ interface I { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc15_8.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc15_8.1 (constants.%T)] +// CHECK:STDOUT: %T.loc16_8.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc16_8.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { @@ -57,7 +58,7 @@ interface I { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc19_8.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc19_8.1 (constants.%T)] +// CHECK:STDOUT: %T.loc20_8.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc20_8.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, %G.decl [concrete = constants.%assoc2] // CHECK:STDOUT: @@ -73,25 +74,25 @@ interface I { // CHECK:STDOUT: assoc_const U:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(@I.%Self: %I.type, %T.loc15_8.2: type) { -// CHECK:STDOUT: %T.loc15_8.1: type = bind_symbolic_name T, 1 [symbolic = %T.loc15_8.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(@I.%Self: %I.type, %T.loc16_8.2: type) { +// CHECK:STDOUT: %T.loc16_8.1: type = bind_symbolic_name T, 1 [symbolic = %T.loc16_8.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(@I.%Self: %I.type, %T.loc19_8.2: type) { -// CHECK:STDOUT: %T.loc19_8.1: type = bind_symbolic_name T, 1 [symbolic = %T.loc19_8.1 (constants.%T)] +// CHECK:STDOUT: generic fn @G(@I.%Self: %I.type, %T.loc20_8.2: type) { +// CHECK:STDOUT: %T.loc20_8.1: type = bind_symbolic_name T, 1 [symbolic = %T.loc20_8.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self, constants.%T) { -// CHECK:STDOUT: %T.loc15_8.1 => constants.%T +// CHECK:STDOUT: %T.loc16_8.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%Self, constants.%T) { -// CHECK:STDOUT: %T.loc19_8.1 => constants.%T +// CHECK:STDOUT: %T.loc20_8.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_import.carbon b/toolchain/check/testdata/interface/generic_import.carbon index 98cf38a61bd3..66f78133f4af 100644 --- a/toolchain/check/testdata/interface/generic_import.carbon +++ b/toolchain/check/testdata/interface/generic_import.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index 8e824bd4e6df..f49e2f8a5901 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -158,6 +158,7 @@ fn CallIndirect() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -617,6 +618,7 @@ fn CallIndirect() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_vs_params.carbon b/toolchain/check/testdata/interface/generic_vs_params.carbon index 3d1299d36cd1..37f0785b96da 100644 --- a/toolchain/check/testdata/interface/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/generic_vs_params.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/import.carbon b/toolchain/check/testdata/interface/import.carbon index d1c6e6cecd1f..1f09ff2c2828 100644 --- a/toolchain/check/testdata/interface/import.carbon +++ b/toolchain/check/testdata/interface/import.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/import_access.carbon b/toolchain/check/testdata/interface/import_access.carbon index 1a59246efca3..1e44d29f4835 100644 --- a/toolchain/check/testdata/interface/import_access.carbon +++ b/toolchain/check/testdata/interface/import_access.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/import_interface_decl.carbon b/toolchain/check/testdata/interface/import_interface_decl.carbon index 78094185966a..ff80bb4df5de 100644 --- a/toolchain/check/testdata/interface/import_interface_decl.carbon +++ b/toolchain/check/testdata/interface/import_interface_decl.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/local.carbon b/toolchain/check/testdata/interface/local.carbon index 06d2b4db7a59..65298381c3ac 100644 --- a/toolchain/check/testdata/interface/local.carbon +++ b/toolchain/check/testdata/interface/local.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // @@ -57,13 +58,13 @@ fn F() { // CHECK:STDOUT: %self.patt: @G.1.%pattern_type (%pattern_type.744) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @G.1.%pattern_type (%pattern_type.744) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc16_16.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc16_16.1: type = splice_block %.loc16_16.2 [symbolic = %Self.as_type.loc16_16.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc17_16.1 (%Self.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc17_16.1: type = splice_block %.loc17_16.2 [symbolic = %Self.as_type.loc17_16.1 (constants.%Self.as_type)] { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc16_16.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_16.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc16_16.2: type = converted %Self.ref, %Self.as_type.loc16_16.2 [symbolic = %Self.as_type.loc16_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.as_type.loc17_16.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc17_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc17_16.2: type = converted %Self.ref, %Self.as_type.loc17_16.2 [symbolic = %Self.as_type.loc17_16.1 (constants.%Self.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc16_16.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc17_16.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %G.decl [concrete = constants.%assoc0] // CHECK:STDOUT: @@ -73,13 +74,13 @@ fn F() { // CHECK:STDOUT: witness = (%G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc18_9.2 as %I.ref { +// CHECK:STDOUT: impl @impl: %.loc19_9.2 as %I.ref { // CHECK:STDOUT: %G.decl: %G.type.c84 = fn_decl @G.2 [concrete = constants.%G.5a2] { // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc18_9.2 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc19_9.2 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -92,29 +93,29 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { -// CHECK:STDOUT: %.loc18_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc18_9.2: type = converted %.loc18_9.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc19_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_9.2: type = converted %.loc19_9.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.ref: type = name_ref I, @F.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%G.decl), @impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] -// CHECK:STDOUT: %.loc21_4.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_4.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %G.ref: %I.assoc_type = name_ref G, @I.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: %.ba5 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%G.5a2] -// CHECK:STDOUT: %bound_method: = bound_method %.loc21_4.1, %impl.elem0 +// CHECK:STDOUT: %bound_method: = bound_method %.loc22_4.1, %impl.elem0 // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc21_4.2: %empty_tuple.type = converted %.loc21_4.1, %empty_tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %bound_method(%.loc21_4.2) +// CHECK:STDOUT: %.loc22_4.2: %empty_tuple.type = converted %.loc22_4.1, %empty_tuple [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %bound_method(%.loc22_4.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc16_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_16.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_16.1 [symbolic = %pattern_type (constants.%pattern_type.744)] +// CHECK:STDOUT: %Self.as_type.loc17_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc17_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc17_16.1 [symbolic = %pattern_type (constants.%pattern_type.744)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @G.1.%Self.as_type.loc16_16.1 (%Self.as_type)); +// CHECK:STDOUT: fn(%self.param: @G.1.%Self.as_type.loc17_16.1 (%Self.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G.2(%self.param: %empty_tuple.type) { @@ -124,13 +125,13 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc16_16.1 => constants.%Self.as_type +// CHECK:STDOUT: %Self.as_type.loc17_16.1 => constants.%Self.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.744 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet -// CHECK:STDOUT: %Self.as_type.loc16_16.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %Self.as_type.loc17_16.1 => constants.%empty_tuple.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index 268fbca11eb7..473c76048256 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -54,25 +55,25 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Interface.type.e32: type = generic_interface_type @Interface [concrete] // CHECK:STDOUT: %Interface.generic: %Interface.type.e32 = struct_value () [concrete] -// CHECK:STDOUT: %Interface.type.d32: type = facet_type <@Interface, @Interface(%T.8b3)> [symbolic] +// CHECK:STDOUT: %Interface.type.d32: type = facet_type <@Interface, @Interface(%T)> [symbolic] // CHECK:STDOUT: %Self.a5f: %Interface.type.d32 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] -// CHECK:STDOUT: %Interface.assoc_type.0d9: type = assoc_entity_type @Interface, @Interface(%T.8b3) [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %Interface.assoc_type.0d9: type = assoc_entity_type @Interface, @Interface(%T) [symbolic] // CHECK:STDOUT: %assoc0.dbe: %Interface.assoc_type.0d9 = assoc_entity element0, @Interface.%X [symbolic] // CHECK:STDOUT: %I.a5f: %Interface.type.d32 = bind_symbolic_name I, 1 [symbolic] // CHECK:STDOUT: %pattern_type.f17: type = pattern_type %Interface.type.d32 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] // CHECK:STDOUT: %AccessGeneric.type: type = fn_type @AccessGeneric [concrete] // CHECK:STDOUT: %AccessGeneric: %AccessGeneric.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.6f3: = require_complete_type %Interface.type.d32 [symbolic] // CHECK:STDOUT: %I.as_type.59e: type = facet_access_type %I.a5f [symbolic] -// CHECK:STDOUT: %Interface.lookup_impl_witness.854: = lookup_impl_witness %I.a5f, @Interface, @Interface(%T.8b3) [symbolic] +// CHECK:STDOUT: %Interface.lookup_impl_witness.854: = lookup_impl_witness %I.a5f, @Interface, @Interface(%T) [symbolic] // CHECK:STDOUT: %Interface.facet.e18: %Interface.type.d32 = facet_value %I.as_type.59e, (%Interface.lookup_impl_witness.854) [symbolic] -// CHECK:STDOUT: %impl.elem0.7b9: %T.8b3 = impl_witness_access %Interface.lookup_impl_witness.854, element0 [symbolic] +// CHECK:STDOUT: %impl.elem0.7b9: %T = impl_witness_access %Interface.lookup_impl_witness.854, element0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -100,7 +101,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -114,7 +115,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.decl: %Interface.type.e32 = interface_decl @Interface [concrete = constants.%Interface.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %AccessGeneric.decl: %AccessGeneric.type = fn_decl @AccessGeneric [concrete = constants.%AccessGeneric] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -122,16 +123,16 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %return.patt: @AccessGeneric.%pattern_type.loc8_46 (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @AccessGeneric.%pattern_type.loc8_46 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T.8b3)] -// CHECK:STDOUT: %T.loc8_18.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T)] +// CHECK:STDOUT: %T.loc8_18.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.2 (constants.%T)] // CHECK:STDOUT: %.loc8: type = splice_block %Interface.type.loc8_43.1 [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.d32)] { // CHECK:STDOUT: %Interface.ref: %Interface.type.e32 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] -// CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T.8b3)] -// CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(constants.%T.8b3)> [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.d32)] +// CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T)] +// CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.d32)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.loc8_28.1: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.d32) = bind_symbolic_name I, 1 [symbolic = %I.loc8_28.2 (constants.%I.a5f)] -// CHECK:STDOUT: %return.param: ref @AccessGeneric.%T.loc8_18.2 (%T.8b3) = out_param call_param0 -// CHECK:STDOUT: %return: ref @AccessGeneric.%T.loc8_18.2 (%T.8b3) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @AccessGeneric.%T.loc8_18.2 (%T) = out_param call_param0 +// CHECK:STDOUT: %return: ref @AccessGeneric.%T.loc8_18.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessConcrete.decl: %AccessConcrete.type = fn_decl @AccessConcrete [concrete = constants.%AccessConcrete] { // CHECK:STDOUT: %I.patt: %pattern_type.875 = symbolic_binding_pattern I, 0 [concrete] @@ -153,7 +154,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Interface(%T.loc4_21.1: type) { -// CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(%T.loc4_21.2)> [symbolic = %Interface.type (constants.%Interface.type.d32)] @@ -163,7 +164,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Interface.%Interface.type (%Interface.type.d32) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.a5f)] -// CHECK:STDOUT: %X: @X.%T (%T.8b3) = assoc_const_decl @X [concrete] { +// CHECK:STDOUT: %X: @X.%T (%T) = assoc_const_decl @X [concrete] { // CHECK:STDOUT: %assoc0: @Interface.%Interface.assoc_type (%Interface.assoc_type.0d9) = assoc_entity element0, @Interface.%X [symbolic = @Interface.%assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -176,14 +177,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @X(@Interface.%T.loc4_21.1: type, @Interface.%Self.1: @Interface.%Interface.type (%Interface.type.d32)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: assoc_const X:! @X.%T (%T.8b3); +// CHECK:STDOUT: assoc_const X:! @X.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @AccessGeneric(%T.loc8_18.1: type, %I.loc8_28.1: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.d32)) { -// CHECK:STDOUT: %T.loc8_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc8_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.2 (constants.%T)] // CHECK:STDOUT: %Interface.type.loc8_43.2: type = facet_type <@Interface, @Interface(%T.loc8_18.2)> [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.d32)] // CHECK:STDOUT: %I.loc8_28.2: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.d32) = bind_symbolic_name I, 1 [symbolic = %I.loc8_28.2 (constants.%I.a5f)] // CHECK:STDOUT: %pattern_type.loc8_28: type = pattern_type %Interface.type.loc8_43.2 [symbolic = %pattern_type.loc8_28 (constants.%pattern_type.f17)] @@ -195,17 +196,17 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %assoc0: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = assoc_entity element0, @Interface.%X [symbolic = %assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: %I.as_type.loc9_11.2: type = facet_access_type %I.loc8_28.2 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] // CHECK:STDOUT: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc8_28.2, @Interface, @Interface(%T.loc8_18.2) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.854)] -// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%T.loc8_18.2 (%T.8b3) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] +// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%T.loc8_18.2 (%T) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] // CHECK:STDOUT: %require_complete.loc9_13: = require_complete_type %T.loc8_18.2 [symbolic = %require_complete.loc9_13 (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @AccessGeneric.%T.loc8_18.2 (%T.8b3) { +// CHECK:STDOUT: fn() -> @AccessGeneric.%T.loc8_18.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %I.ref: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.d32) = name_ref I, %I.loc8_28.1 [symbolic = %I.loc8_28.2 (constants.%I.a5f)] -// CHECK:STDOUT: %.loc9_11.1: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = specific_constant @X.%assoc0, @Interface(constants.%T.8b3) [symbolic = %assoc0 (constants.%assoc0.dbe)] +// CHECK:STDOUT: %.loc9_11.1: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = specific_constant @X.%assoc0, @Interface(constants.%T) [symbolic = %assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: %X.ref: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = name_ref X, %.loc9_11.1 [symbolic = %assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: %I.as_type.loc9_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] // CHECK:STDOUT: %.loc9_11.2: type = converted %I.ref, %I.as_type.loc9_11.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] -// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%T.loc8_18.2 (%T.8b3) = impl_witness_access constants.%Interface.lookup_impl_witness.854, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] +// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%T.loc8_18.2 (%T) = impl_witness_access constants.%Interface.lookup_impl_witness.854, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] // CHECK:STDOUT: return %impl.elem0.loc9_11.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -230,8 +231,8 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc4_21.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @Interface(constants.%T) { +// CHECK:STDOUT: %T.loc4_21.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.d32 @@ -240,21 +241,21 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %assoc0 => constants.%assoc0.dbe // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T.8b3, constants.%Self.a5f) { -// CHECK:STDOUT: %T => constants.%T.8b3 +// CHECK:STDOUT: specific @X(constants.%T, constants.%Self.a5f) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AccessGeneric(constants.%T.8b3, constants.%I.a5f) { -// CHECK:STDOUT: %T.loc8_18.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @AccessGeneric(constants.%T, constants.%I.a5f) { +// CHECK:STDOUT: %T.loc8_18.2 => constants.%T // CHECK:STDOUT: %Interface.type.loc8_43.2 => constants.%Interface.type.d32 // CHECK:STDOUT: %I.loc8_28.2 => constants.%I.a5f // CHECK:STDOUT: %pattern_type.loc8_28 => constants.%pattern_type.f17 // CHECK:STDOUT: %pattern_type.loc8_46 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T.8b3, constants.%Interface.facet.e18) { -// CHECK:STDOUT: %T => constants.%T.8b3 +// CHECK:STDOUT: specific @X(constants.%T, constants.%Interface.facet.e18) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: @@ -316,7 +317,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/self.carbon b/toolchain/check/testdata/interface/self.carbon index 14fd4e33cc8c..8ca357444366 100644 --- a/toolchain/check/testdata/interface/self.carbon +++ b/toolchain/check/testdata/interface/self.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // @@ -43,18 +44,18 @@ interface UseSelf { // CHECK:STDOUT: %return.patt: @F.%pattern_type (%pattern_type) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.%pattern_type (%pattern_type) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc15_25: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc15_25: type = facet_access_type %Self.ref.loc15_25 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc15_25: type = converted %Self.ref.loc15_25, %Self.as_type.loc15_25 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc15_14.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc15_14.1: type = splice_block %.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %Self.ref.loc15_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc15_14.2: type = facet_access_type %Self.ref.loc15_14 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc15_14.2: type = converted %Self.ref.loc15_14, %Self.as_type.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.ref.loc16_25: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc16_25: type = facet_access_type %Self.ref.loc16_25 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc16_25: type = converted %Self.ref.loc16_25, %Self.as_type.loc16_25 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc16_14.1 (%Self.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref.loc16_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc16_14.2: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @F.%Self.as_type.loc15_14.1 (%Self.as_type) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.%Self.as_type.loc15_14.1 (%Self.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%Self.as_type.loc15_14.1 (%Self.as_type) = return_slot %return.param +// CHECK:STDOUT: %self: @F.%Self.as_type.loc16_14.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.%Self.as_type.loc16_14.1 (%Self.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%Self.as_type.loc16_14.1 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: @@ -66,15 +67,15 @@ interface UseSelf { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@UseSelf.%Self: %UseSelf.type) { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc15_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc15_14.1 [symbolic = %pattern_type (constants.%pattern_type)] +// CHECK:STDOUT: %Self.as_type.loc16_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_14.1 [symbolic = %pattern_type (constants.%pattern_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.%Self.as_type.loc15_14.1 (%Self.as_type)) -> @F.%Self.as_type.loc15_14.1 (%Self.as_type); +// CHECK:STDOUT: fn(%self.param: @F.%Self.as_type.loc16_14.1 (%Self.as_type)) -> @F.%Self.as_type.loc16_14.1 (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%Self.as_type +// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%Self.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/syntactic_merge.carbon b/toolchain/check/testdata/interface/syntactic_merge.carbon index 8b9c55423863..a12bccde0e90 100644 --- a/toolchain/check/testdata/interface/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/syntactic_merge.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index 8782dc7944b1..c724559ac0ea 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -26,7 +27,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] @@ -38,26 +39,26 @@ interface I { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.0f3: %I.assoc_type = assoc_entity element1, @I.%G.decl [concrete] -// CHECK:STDOUT: %assoc2.e9c: %I.assoc_type = assoc_entity element2, @I.%T [concrete] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%G.decl [concrete] +// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%T [concrete] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] -// CHECK:STDOUT: %assoc3.fc8: %I.assoc_type = assoc_entity element3, @I.%N [concrete] +// CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.%N [concrete] // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] // CHECK:STDOUT: } @@ -69,9 +70,9 @@ interface I { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -85,7 +86,7 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.82e] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { @@ -96,43 +97,43 @@ interface I { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc17_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc17_11: type = splice_block %i32.loc17_11 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc17_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc18_11: type = splice_block %i32.loc18_11 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc18_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc17_19: type = splice_block %i32.loc17_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc17_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc18_19: type = splice_block %i32.loc18_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc18_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1.0f3] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%T [concrete = constants.%assoc2.e9c] -// CHECK:STDOUT: %int_32.loc21_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc21_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc21_27: %tuple.type.24b = tuple_literal (%i32.loc21_19, %i32.loc21_24) -// CHECK:STDOUT: %.loc21_28: type = converted %.loc21_27, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] +// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%T [concrete = constants.%assoc2] +// CHECK:STDOUT: %int_32.loc22_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc22_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc22_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc22_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc22_27: %tuple.type.24b = tuple_literal (%i32.loc22_19, %i32.loc22_24) +// CHECK:STDOUT: %.loc22_28: type = converted %.loc22_27, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] // CHECK:STDOUT: } // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { -// CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.%N [concrete = constants.%assoc3.fc8] +// CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.%N [concrete = constants.%assoc3] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc22_19.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_19.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc22_19.2(%int_42) [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %.loc22_19.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %.loc22_19.2: %i32 = converted %int_42, %.loc22_19.1 [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %bound_method.loc23_19.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc23_19.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc23_19.2(%int_42) [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %.loc23_19.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %.loc23_19.2: %i32 = converted %int_42, %.loc23_19.1 [concrete = constants.%int_42.c68] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -147,13 +148,13 @@ interface I { // CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: assoc_const T:! type = %.loc21_28; +// CHECK:STDOUT: assoc_const T:! type = %.loc22_28; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: assoc_const N:! %i32 = %.loc22_19.2; +// CHECK:STDOUT: assoc_const N:! %i32 = %.loc23_19.2; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) { @@ -171,11 +172,11 @@ interface I { // CHECK:STDOUT: fn(%a.param: %i32, %b.param: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%Self.8268) {} +// CHECK:STDOUT: specific @F(constants.%Self.826) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%Self.8268) {} +// CHECK:STDOUT: specific @G(constants.%Self.826) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.8268) {} +// CHECK:STDOUT: specific @T(constants.%Self.826) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self.8268) {} +// CHECK:STDOUT: specific @N(constants.%Self.826) {} // CHECK:STDOUT: