diff --git a/.codespell_ignore b/.codespell_ignore index 06387ec012c8..67eebc7dd207 100644 --- a/.codespell_ignore +++ b/.codespell_ignore @@ -2,6 +2,7 @@ # Exceptions. See /LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +AggregateT ArchType atleast circularly diff --git a/core/prelude/destroy.carbon b/core/prelude/destroy.carbon index 83b42d7f200e..7205bf2f7a8c 100644 --- a/core/prelude/destroy.carbon +++ b/core/prelude/destroy.carbon @@ -4,13 +4,35 @@ package Core library "prelude/destroy"; +import library "prelude/types/bool"; +import library "prelude/types/int_literal"; + // Object destruction, including running `fn destroy()`. Note this is distinct // from memory deallocation. interface Destroy { fn Op[addr self: Self*](); } -// Provide a default blanket impl for trivial destruction. -impl forall [T:! type] T as Destroy { +// Add destruction for essential builtin types. This can't be done earlier +// because `Destroy` is using them. +// TODO: This should match trivial destruction. +impl bool as Destroy { fn Op[addr self: Self*]() = "no_op"; } +impl type as Destroy { + fn Op[addr self: Self*]() = "no_op"; +} +impl forall [PointeeT:! type] PointeeT* as Destroy { + fn Op[addr self: Self*]() = "no_op"; +} + +// Handles builtin aggregate type destruction. +private fn CanAggregateDestroy() -> type = "type.can_aggregate_destroy"; +impl forall [AggregateT:! CanAggregateDestroy()] AggregateT as Destroy { + fn Op[addr self: Self*]() = "type.aggregate_destroy"; +} + +// `const` instances always use the non-`const` destructor. +impl forall [NonConstT:! Destroy] const NonConstT as Destroy { + fn Op[addr self: Self*]() { (self unsafe as NonConstT*)->(Destroy.Op)(); } +} diff --git a/toolchain/check/impl_lookup.cpp b/toolchain/check/impl_lookup.cpp index 0898057c64bb..032da184dfba 100644 --- a/toolchain/check/impl_lookup.cpp +++ b/toolchain/check/impl_lookup.cpp @@ -548,7 +548,22 @@ static auto TypeCanAggregateDestroy(Context& context, -> bool { auto inst = context.insts().Get( context.constant_values().GetInstId(query_self_const_id)); - return inst.Is() || inst.Is(); + CARBON_KIND_SWITCH(inst) { + case CARBON_KIND(SemIR::ClassType class_type): { + // Carbon classes will generate a `Destroy` impl, but we use this to + // provide destruction for `Cpp`-scoped classes. + // TODO: Don't provide this for C++ types that lack a destructor. + auto class_info = context.classes().Get(class_type.class_id); + return context.name_scopes().Get(class_info.scope_id).is_cpp_scope(); + } + case SemIR::ArrayType::Kind: + case SemIR::MaybeUnformedType::Kind: + case SemIR::StructType::Kind: + case SemIR::TupleType::Kind: + return true; + default: + return false; + } } auto LookupImplWitness(Context& context, SemIR::LocId loc_id, diff --git a/toolchain/check/implicit_type_impls.h b/toolchain/check/implicit_type_impls.h index c144838f103a..327d7478b3e1 100644 --- a/toolchain/check/implicit_type_impls.h +++ b/toolchain/check/implicit_type_impls.h @@ -11,6 +11,7 @@ namespace Carbon::Check { // Constructs `impl as Destroy { ... }`, with appropriate implementation // based on the `destroy` function and members. +// TODO: Also generate the impl for `partial T` for non-final types. auto MakeClassDestroyImpl(Context& context, SemIR::ClassId class_id) -> void; } // namespace Carbon::Check diff --git a/toolchain/check/testdata/array/basics.carbon b/toolchain/check/testdata/array/basics.carbon index 2f3e5b60492c..2a438953c587 100644 --- a/toolchain/check/testdata/array/basics.carbon +++ b/toolchain/check/testdata/array/basics.carbon @@ -181,8 +181,10 @@ var a: array(1, 1); // CHECK:STDOUT: %tuple.type.14a: type = tuple_type (%tuple.type.734, %tuple.type.734) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.c4b: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.100: %T.as.Destroy.impl.Op.type.c4b = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.f05: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6cc: %AggregateT.as_type.as.Destroy.impl.Op.type.f05 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -209,8 +211,8 @@ var a: array(1, 1); // CHECK:STDOUT: %F.call.loc10_40: init %tuple.type.734 = call %F.ref.loc10_38() to %.loc10_41.2 // CHECK:STDOUT: %.loc10_41.3: %tuple.type.14a = tuple_literal (%F.call.loc10_35, %F.call.loc10_40) // CHECK:STDOUT: %.loc10_41.4: init %array_type = array_init (%F.call.loc10_35, %F.call.loc10_40) to %v.var -// CHECK:STDOUT: %.loc10_3: init %array_type = converted %.loc10_41.3, %.loc10_41.4 -// CHECK:STDOUT: assign %v.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %array_type = converted %.loc10_41.3, %.loc10_41.4 +// CHECK:STDOUT: assign %v.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_28: type = splice_block %array_type [concrete = constants.%array_type] { // CHECK:STDOUT: %C.ref.loc10_17: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc10_20: type = name_ref C, file.%C.decl [concrete = constants.%C] @@ -221,11 +223,13 @@ var a: array(1, 1); // CHECK:STDOUT: %array_type: type = array_type %int_2, %.loc10_24.2 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %array_type = bind_name v, %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.100 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_3.2: %type_where = converted constants.%array_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.6cc // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c6b = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -240,10 +244,13 @@ var a: array(1, 1); // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete] // CHECK:STDOUT: %ptr.7fe: type = ptr_type %tuple.type [concrete] // CHECK:STDOUT: %pattern_type.8c1: type = pattern_type %tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.13b: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.02a: %T.as.Destroy.impl.Op.type.13b = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.e84: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.3e0: %T.as.Destroy.impl.Op.type.e84 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.c7f: %type_where = facet_value %tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.b05: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.c7f) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.1d6: %AggregateT.as_type.as.Destroy.impl.Op.type.b05 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.4cf: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.7a9: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.4cf) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.190: %AggregateT.as_type.as.Destroy.impl.Op.type.7a9 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -279,16 +286,20 @@ var a: array(1, 1); // CHECK:STDOUT: %.loc8_21.6: type = converted %.loc8_21.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.02a +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%tuple.type, () [concrete = constants.%facet_value.c7f] +// CHECK:STDOUT: %.loc8_3: %type_where = converted constants.%tuple.type, %facet_value.loc8 [concrete = constants.%facet_value.c7f] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %b.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.1d6 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %b.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8: %ptr.7fe = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc7: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.3e0 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %facet_value.loc7: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value.4cf] +// CHECK:STDOUT: %.loc7_3: %type_where = converted constants.%array_type, %facet_value.loc7 [concrete = constants.%facet_value.4cf] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc7: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.190 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc7: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc7: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7: %ptr.20b = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -306,11 +317,14 @@ var a: array(1, 1); // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %array_type [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%empty_tuple) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.839: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.571: %T.as.Destroy.impl.Op.type.839 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.132: %type_where = facet_value %tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.2ee: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.132) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.7ed: %AggregateT.as_type.as.Destroy.impl.Op.type.2ee = struct_value () [concrete] // CHECK:STDOUT: %ptr.652: type = ptr_type %tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.8cb: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.36f: %T.as.Destroy.impl.Op.type.8cb = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.c1b: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.c21: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.c1b) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.e50: %AggregateT.as_type.as.Destroy.impl.Op.type.c21 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -333,8 +347,8 @@ var a: array(1, 1); // CHECK:STDOUT: %.loc8_27.4: init %empty_tuple.type = tuple_init () to %.loc8_27.3 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_27.5: init %empty_tuple.type = converted %tuple.elem0, %.loc8_27.4 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_27.6: init %array_type = array_init (%.loc8_27.5) to %t.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc8_3: init %array_type = converted %F.call, %.loc8_27.6 [concrete = constants.%array] -// CHECK:STDOUT: assign %t.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %array_type = converted %F.call, %.loc8_27.6 [concrete = constants.%array] +// CHECK:STDOUT: assign %t.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_21: type = splice_block %array_type [concrete = constants.%array_type] { // CHECK:STDOUT: %.loc8_17.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] @@ -342,16 +356,20 @@ var a: array(1, 1); // CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc8_17.2 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %t: ref %array_type = bind_name t, %t.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8_27: = bound_method %.loc8_27.2, constants.%T.as.Destroy.impl.Op.571 +// CHECK:STDOUT: %facet_value.loc8_27: %type_where = facet_value constants.%tuple.type, () [concrete = constants.%facet_value.132] +// CHECK:STDOUT: %.loc8_27.7: %type_where = converted constants.%tuple.type, %facet_value.loc8_27 [concrete = constants.%facet_value.132] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8_27: = bound_method %.loc8_27.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.7ed // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8_27: = bound_method %.loc8_27.2, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc8_27: = bound_method %.loc8_27.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8_27: %ptr.652 = addr_of %.loc8_27.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8_27: init %empty_tuple.type = call %bound_method.loc8_27(%addr.loc8_27) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8_3: = bound_method %t.var, constants.%T.as.Destroy.impl.Op.36f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8_27: init %empty_tuple.type = call %bound_method.loc8_27(%addr.loc8_27) +// CHECK:STDOUT: %facet_value.loc8_3: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value.c1b] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%array_type, %facet_value.loc8_3 [concrete = constants.%facet_value.c1b] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8_3: = bound_method %t.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.e50 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8_3: = bound_method %t.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8_3: = bound_method %t.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_3: %ptr.b99 = addr_of %t.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8_3: init %empty_tuple.type = call %bound_method.loc8_3(%addr.loc8_3) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8_3: init %empty_tuple.type = call %bound_method.loc8_3(%addr.loc8_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index 444d6dfa7792..2db02bcf6ecc 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -79,8 +79,10 @@ fn F() -> array(i32, 1) { // CHECK:STDOUT: %Copy.facet.c49: %Copy.type = facet_value %i32, (%Copy.impl_witness.a32) [concrete] // CHECK:STDOUT: %.7fa: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c49 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.f59, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.e2a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.95f: %T.as.Destroy.impl.Op.type.e2a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.b6e: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.91f: %AggregateT.as_type.as.Destroy.impl.Op.type.b6e = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -105,11 +107,13 @@ fn F() -> array(i32, 1) { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_15.2: = bound_method %.loc6_15.2, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_15.2(%.loc6_15.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc6_12.2, constants.%T.as.Destroy.impl.Op.95f +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc6_12.3: %type_where = converted constants.%array_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc6_12.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.91f // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc6_12: = bound_method %.loc6_12.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc6_12: = bound_method %.loc6_12.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.830 = addr_of %.loc6_12.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc6_12(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc6_12(%addr) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 32ef407f265a..a3299ae1ff88 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -93,8 +93,10 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %bound_method.f36: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.5d2, %int_2.ef8, %int_3.822) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.0c8: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.801: %T.as.Destroy.impl.Op.type.0c8 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.ffb: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.e7e: %AggregateT.as_type.as.Destroy.impl.Op.type.ffb = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -169,11 +171,13 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int_1.loc10_23, %.loc10_23.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc10_20.15, %.loc10_23.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc10_20.14, constants.%T.as.Destroy.impl.Op.801 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_20.16: %type_where = converted constants.%array_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc10_20.14, constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_20.7: = bound_method %.loc10_20.14, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc10_20.7: = bound_method %.loc10_20.14, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.f01 = addr_of %.loc10_20.14 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_20.7(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_20.7(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index d9ec91b27848..cd7effdd401a 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -69,32 +69,41 @@ fn H() { G(3); } // CHECK:STDOUT: %array.2ed: %array_type.281 = tuple_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.5ec: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T) [symbolic] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.4a9: %T.as.Destroy.impl.Op.type.5ec = struct_value () [symbolic] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %AggregateT: %type_where = bind_symbolic_name AggregateT, 0 [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%AggregateT) [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8a0: %AggregateT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic] +// CHECK:STDOUT: %facet_value.bf1: %type_where = facet_value %array_type.281, () [symbolic] // CHECK:STDOUT: %require_complete.662: = require_complete_type %ptr.e06 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.281, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.52c: %Destroy.type = facet_value %array_type.281, (%Destroy.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.3b0: = lookup_impl_witness %array_type.281, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.52c: %Destroy.type = facet_value %array_type.281, (%Destroy.lookup_impl_witness.3b0) [symbolic] // CHECK:STDOUT: %.657: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.52c [symbolic] -// CHECK:STDOUT: %impl.elem0: %.657 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.52c) [symbolic] +// CHECK:STDOUT: %impl.elem0.36c: %.657 = impl_witness_access %Destroy.lookup_impl_witness.3b0, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.a25: = specific_impl_function %impl.elem0.36c, @Destroy.Op(%Destroy.facet.52c) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %array_type.6f1: type = array_type %int_0, %C [concrete] // CHECK:STDOUT: %ptr.cf4: type = ptr_type %array_type.6f1 [concrete] // CHECK:STDOUT: %complete_type.ed6: = complete_type_witness %array_type.6f1 [concrete] // CHECK:STDOUT: %pattern_type.9c8: type = pattern_type %array_type.6f1 [concrete] // CHECK:STDOUT: %array.2e5: %array_type.6f1 = tuple_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.07a: = impl_witness imports.%Destroy.impl_witness_table, @T.as.Destroy.impl(%array_type.6f1) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.12f: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type.6f1) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.78b: %T.as.Destroy.impl.Op.type.12f = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.cba: %type_where = facet_value %array_type.6f1, () [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.20d: = impl_witness imports.%Destroy.impl_witness_table.2d3, @AggregateT.as_type.as.Destroy.impl(%facet_value.cba) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.710: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.cba) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.0db: %AggregateT.as_type.as.Destroy.impl.Op.type.710 = struct_value () [concrete] // CHECK:STDOUT: %complete_type.3e1: = complete_type_witness %ptr.cf4 [concrete] -// CHECK:STDOUT: %Destroy.facet.fe5: %Destroy.type = facet_value %array_type.6f1, (%Destroy.impl_witness.07a) [concrete] -// CHECK:STDOUT: %.b7a: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.fe5 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.78b, @T.as.Destroy.impl.Op(%array_type.6f1) [concrete] +// CHECK:STDOUT: %Destroy.facet.ad5: %Destroy.type = facet_value %array_type.6f1, (%Destroy.impl_witness.20d) [concrete] +// CHECK:STDOUT: %.600: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.ad5 [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.0db, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.cba) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.50f: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.5ec) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.4a9)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.50f), @T.as.Destroy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.d51: @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op.type (%AggregateT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc29_29, loaded [symbolic = @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op (constants.%AggregateT.as_type.as.Destroy.impl.Op.8a0)] +// CHECK:STDOUT: %Destroy.impl_witness_table.2d3 = impl_witness_table (%Core.import_ref.d51), @AggregateT.as_type.as.Destroy.impl [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type.6f1, () [concrete = constants.%facet_value.cba] +// CHECK:STDOUT: %.loc7: %type_where = converted constants.%array_type.6f1, %facet_value [concrete = constants.%facet_value.cba] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(%T.loc4_6.2: type) { @@ -105,11 +114,12 @@ fn H() { G(3); } // CHECK:STDOUT: %require_complete.loc7_22: = require_complete_type %array_type.loc7_22.2 [symbolic = %require_complete.loc7_22 (constants.%require_complete.b7f)] // CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc7_22.2 [symbolic = %pattern_type (constants.%pattern_type.d48)] // CHECK:STDOUT: %array: @G.%array_type.loc7_22.2 (%array_type.281) = tuple_value () [symbolic = %array (constants.%array.2ed)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.loc7_22.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] +// CHECK:STDOUT: %facet_value.loc7_3.2: %type_where = facet_value %array_type.loc7_22.2, () [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.bf1)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.loc7_22.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.3b0)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.loc7_22.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.52c)] -// CHECK:STDOUT: %.loc7_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3.3 (constants.%.657)] -// CHECK:STDOUT: %impl.elem0.loc7_3.2: @G.%.loc7_3.3 (%.657) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %.loc7_3.4: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3.4 (constants.%.657)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @G.%.loc7_3.4 (%.657) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.36c)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.a25)] // CHECK:STDOUT: %ptr: type = ptr_type %array_type.loc7_22.2 [symbolic = %ptr (constants.%ptr.e06)] // CHECK:STDOUT: %require_complete.loc7_3: = require_complete_type %ptr [symbolic = %require_complete.loc7_3 (constants.%require_complete.662)] // CHECK:STDOUT: @@ -130,12 +140,14 @@ fn H() { G(3); } // CHECK:STDOUT: %array_type.loc7_22.1: type = array_type %int_0, %T.ref [symbolic = %array_type.loc7_22.2 (constants.%array_type.281)] // CHECK:STDOUT: } // CHECK:STDOUT: %arr: ref @G.%array_type.loc7_22.2 (%array_type.281) = bind_name arr, %arr.var -// CHECK:STDOUT: %impl.elem0.loc7_3.1: @G.%.loc7_3.3 (%.657) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %facet_value.loc7_3.1: %type_where = facet_value constants.%array_type.281, () [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.bf1)] +// CHECK:STDOUT: %.loc7_3.2: %type_where = converted constants.%array_type.281, %facet_value.loc7_3.1 [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.bf1)] +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @G.%.loc7_3.4 (%.657) = impl_witness_access constants.%Destroy.lookup_impl_witness.3b0, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.36c)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %arr.var, %impl.elem0.loc7_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.52c) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.52c) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.a25)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %arr.var, %specific_impl_fn.loc7_3.1 // CHECK:STDOUT: %addr: @G.%ptr (%ptr.e06) = addr_of %arr.var -// CHECK:STDOUT: %.loc7_3.2: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) +// CHECK:STDOUT: %.loc7_3.3: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -152,11 +164,12 @@ fn H() { G(3); } // CHECK:STDOUT: %require_complete.loc7_22 => constants.%complete_type.ed6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9c8 // CHECK:STDOUT: %array => constants.%array.2e5 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.07a -// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.fe5 -// CHECK:STDOUT: %.loc7_3.3 => constants.%.b7a -// CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%T.as.Destroy.impl.Op.78b -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value.loc7_3.2 => constants.%facet_value.cba +// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.20d +// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.ad5 +// CHECK:STDOUT: %.loc7_3.4 => constants.%.600 +// CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%AggregateT.as_type.as.Destroy.impl.Op.0db +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %ptr => constants.%ptr.cf4 // CHECK:STDOUT: %require_complete.loc7_3 => constants.%complete_type.3e1 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/basics.carbon b/toolchain/check/testdata/as/basics.carbon index feb9374a1a93..6afc533e7232 100644 --- a/toolchain/check/testdata/as/basics.carbon +++ b/toolchain/check/testdata/as/basics.carbon @@ -212,8 +212,10 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.b67: type = tuple_type (%X, %X) [concrete] // CHECK:STDOUT: %pattern_type.bb7: type = pattern_type %tuple.type.b67 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.225: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.b67) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.554: %T.as.Destroy.impl.Op.type.225 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.b67, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.1bb: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.482: %AggregateT.as_type.as.Destroy.impl.Op.type.1bb = struct_value () [concrete] // CHECK:STDOUT: %ptr.120: type = ptr_type %tuple.type.b67 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -277,8 +279,8 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %.loc20_44.1: %tuple.type.24b = tuple_literal (%X.ref.loc20_40, %X.ref.loc20_43) // CHECK:STDOUT: %.loc20_44.2: type = converted %.loc20_44.1, constants.%tuple.type.b67 [concrete = constants.%tuple.type.b67] // CHECK:STDOUT: %.loc20_34.2: init %tuple.type.b67 = tuple_init (%Make.call.loc20_25, %Make.call.loc20_33) to %b.var -// CHECK:STDOUT: %.loc20_3: init %tuple.type.b67 = converted %.loc20_34.1, %.loc20_34.2 -// CHECK:STDOUT: assign %b.var, %.loc20_3 +// CHECK:STDOUT: %.loc20_3.1: init %tuple.type.b67 = converted %.loc20_34.1, %.loc20_34.2 +// CHECK:STDOUT: assign %b.var, %.loc20_3.1 // CHECK:STDOUT: %.loc20_15.1: type = splice_block %.loc20_15.3 [concrete = constants.%tuple.type.b67] { // CHECK:STDOUT: %X.ref.loc20_11: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %X.ref.loc20_14: type = name_ref X, file.%X.decl [concrete = constants.%X] @@ -286,11 +288,13 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %.loc20_15.3: type = converted %.loc20_15.2, constants.%tuple.type.b67 [concrete = constants.%tuple.type.b67] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %tuple.type.b67 = bind_name b, %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.554 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.b67, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc20_3.2: %type_where = converted constants.%tuple.type.b67, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.482 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %b.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.120 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/const.carbon b/toolchain/check/testdata/as/const.carbon index 2d5d0633235a..e74a8877a6fa 100644 --- a/toolchain/check/testdata/as/const.carbon +++ b/toolchain/check/testdata/as/const.carbon @@ -96,18 +96,21 @@ fn Use() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.7d5: = impl_witness @X.%Destroy.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.d17: type = ptr_type %X [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %Destroy.facet.387: %Destroy.type = facet_value %X, (%Destroy.impl_witness.7d5) [concrete] // CHECK:STDOUT: %Init.type: type = fn_type @Init [concrete] // CHECK:STDOUT: %Init: %Init.type = struct_value () [concrete] -// CHECK:STDOUT: %const: type = const_type %X [concrete] -// CHECK:STDOUT: %pattern_type.d7f: type = pattern_type %const [concrete] -// CHECK:STDOUT: %ptr.cbd: type = ptr_type %const [concrete] +// CHECK:STDOUT: %const.dde: type = const_type %X [concrete] +// CHECK:STDOUT: %pattern_type.d7f91: type = pattern_type %const.dde [concrete] +// CHECK:STDOUT: %ptr.cbd: type = ptr_type %const.dde [concrete] // CHECK:STDOUT: %pattern_type.855: type = pattern_type %ptr.cbd [concrete] -// CHECK:STDOUT: %reference.var: ref %const = var file.%reference.var_patt [concrete] +// CHECK:STDOUT: %reference.var: ref %const.dde = var file.%reference.var_patt [concrete] // CHECK:STDOUT: %addr.0c5: %ptr.cbd = addr_of %reference.var [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.428: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%const) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.83d: %T.as.Destroy.impl.Op.type.428 = struct_value () [concrete] +// CHECK:STDOUT: %const.as.Destroy.impl.Op.type.7c9: type = fn_type @const.as.Destroy.impl.Op, @const.as.Destroy.impl(%Destroy.facet.387) [concrete] +// CHECK:STDOUT: %const.as.Destroy.impl.Op.60f: %const.as.Destroy.impl.Op.type.7c9 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -116,48 +119,48 @@ fn Use() { // CHECK:STDOUT: fn @Use() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %i.patt: %pattern_type.d7f = binding_pattern i [concrete] -// CHECK:STDOUT: %i.var_patt: %pattern_type.d7f = var_pattern %i.patt [concrete] +// CHECK:STDOUT: %i.patt: %pattern_type.d7f91 = binding_pattern i [concrete] +// CHECK:STDOUT: %i.var_patt: %pattern_type.d7f91 = var_pattern %i.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %i.var: ref %const = var %i.var_patt +// CHECK:STDOUT: %i.var: ref %const.dde = var %i.var_patt // CHECK:STDOUT: %Init.ref: %Init.type = name_ref Init, file.%Init.decl [concrete = constants.%Init] -// CHECK:STDOUT: %.loc14_3: ref %const = splice_block %i.var {} -// CHECK:STDOUT: %Init.call: init %X = call %Init.ref() to %.loc14_3 +// CHECK:STDOUT: %.loc14_3.1: ref %const.dde = splice_block %i.var {} +// CHECK:STDOUT: %Init.call: init %X = call %Init.ref() to %.loc14_3.1 // CHECK:STDOUT: %X.ref.loc14_36: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %const.loc14_30: type = const_type %X.ref.loc14_36 [concrete = constants.%const] -// CHECK:STDOUT: %.loc14_27.1: init %const = as_compatible %Init.call -// CHECK:STDOUT: %.loc14_27.2: init %const = converted %Init.call, %.loc14_27.1 +// CHECK:STDOUT: %const.loc14_30: type = const_type %X.ref.loc14_36 [concrete = constants.%const.dde] +// CHECK:STDOUT: %.loc14_27.1: init %const.dde = as_compatible %Init.call +// CHECK:STDOUT: %.loc14_27.2: init %const.dde = converted %Init.call, %.loc14_27.1 // CHECK:STDOUT: assign %i.var, %.loc14_27.2 -// CHECK:STDOUT: %.loc14_10: type = splice_block %const.loc14_10 [concrete = constants.%const] { +// CHECK:STDOUT: %.loc14_10: type = splice_block %const.loc14_10 [concrete = constants.%const.dde] { // CHECK:STDOUT: %X.ref.loc14_16: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %const.loc14_10: type = const_type %X.ref.loc14_16 [concrete = constants.%const] +// CHECK:STDOUT: %const.loc14_10: type = const_type %X.ref.loc14_16 [concrete = constants.%const.dde] // CHECK:STDOUT: } -// CHECK:STDOUT: %i: ref %const = bind_name i, %i.var +// CHECK:STDOUT: %i: ref %const.dde = bind_name i, %i.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt: %pattern_type.d7f = binding_pattern v [concrete] +// CHECK:STDOUT: %v.patt: %pattern_type.d7f91 = binding_pattern v [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %value.ref: %X = name_ref value, file.%value // CHECK:STDOUT: %X.ref.loc15_35: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %const.loc15_29: type = const_type %X.ref.loc15_35 [concrete = constants.%const] -// CHECK:STDOUT: %.loc15_26.1: %const = as_compatible %value.ref -// CHECK:STDOUT: %.loc15_26.2: %const = converted %value.ref, %.loc15_26.1 -// CHECK:STDOUT: %.loc15_10: type = splice_block %const.loc15_10 [concrete = constants.%const] { +// CHECK:STDOUT: %const.loc15_29: type = const_type %X.ref.loc15_35 [concrete = constants.%const.dde] +// CHECK:STDOUT: %.loc15_26.1: %const.dde = as_compatible %value.ref +// CHECK:STDOUT: %.loc15_26.2: %const.dde = converted %value.ref, %.loc15_26.1 +// CHECK:STDOUT: %.loc15_10: type = splice_block %const.loc15_10 [concrete = constants.%const.dde] { // CHECK:STDOUT: %X.ref.loc15_16: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %const.loc15_10: type = const_type %X.ref.loc15_16 [concrete = constants.%const] +// CHECK:STDOUT: %const.loc15_10: type = const_type %X.ref.loc15_16 [concrete = constants.%const.dde] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: %const = bind_name v, %.loc15_26.2 +// CHECK:STDOUT: %v: %const.dde = bind_name v, %.loc15_26.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.855 = binding_pattern a [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %reference.ref: ref %X = name_ref reference, file.%reference [concrete = file.%reference.var] // CHECK:STDOUT: %X.ref.loc16_42: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %const.loc16_36: type = const_type %X.ref.loc16_42 [concrete = constants.%const] -// CHECK:STDOUT: %.loc16_33.1: ref %const = as_compatible %reference.ref [concrete = constants.%reference.var] -// CHECK:STDOUT: %.loc16_33.2: ref %const = converted %reference.ref, %.loc16_33.1 [concrete = constants.%reference.var] +// CHECK:STDOUT: %const.loc16_36: type = const_type %X.ref.loc16_42 [concrete = constants.%const.dde] +// CHECK:STDOUT: %.loc16_33.1: ref %const.dde = as_compatible %reference.ref [concrete = constants.%reference.var] +// CHECK:STDOUT: %.loc16_33.2: ref %const.dde = converted %reference.ref, %.loc16_33.1 [concrete = constants.%reference.var] // CHECK:STDOUT: %addr.loc16: %ptr.cbd = addr_of %.loc16_33.2 [concrete = constants.%addr.0c5] // CHECK:STDOUT: %.loc16_17: type = splice_block %ptr.loc16 [concrete = constants.%ptr.cbd] { // CHECK:STDOUT: %X.ref.loc16_16: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %const.loc16_10: type = const_type %X.ref.loc16_16 [concrete = constants.%const] +// CHECK:STDOUT: %const.loc16_10: type = const_type %X.ref.loc16_16 [concrete = constants.%const.dde] // CHECK:STDOUT: %ptr.loc16: type = ptr_type %const.loc16_10 [concrete = constants.%ptr.cbd] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.cbd = bind_name a, %addr.loc16 @@ -166,21 +169,23 @@ fn Use() { // CHECK:STDOUT: } // CHECK:STDOUT: %ptr.ref: %ptr.d17 = name_ref ptr, file.%ptr.loc9_5 // CHECK:STDOUT: %X.ref.loc17_34: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %const.loc17_28: type = const_type %X.ref.loc17_34 [concrete = constants.%const] +// CHECK:STDOUT: %const.loc17_28: type = const_type %X.ref.loc17_34 [concrete = constants.%const.dde] // CHECK:STDOUT: %ptr.loc17_35: type = ptr_type %const.loc17_28 [concrete = constants.%ptr.cbd] // CHECK:STDOUT: %.loc17_25.1: %ptr.cbd = as_compatible %ptr.ref // CHECK:STDOUT: %.loc17_25.2: %ptr.cbd = converted %ptr.ref, %.loc17_25.1 // CHECK:STDOUT: %.loc17_17: type = splice_block %ptr.loc17_17 [concrete = constants.%ptr.cbd] { // CHECK:STDOUT: %X.ref.loc17_16: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %const.loc17_10: type = const_type %X.ref.loc17_16 [concrete = constants.%const] +// CHECK:STDOUT: %const.loc17_10: type = const_type %X.ref.loc17_16 [concrete = constants.%const.dde] // CHECK:STDOUT: %ptr.loc17_17: type = ptr_type %const.loc17_10 [concrete = constants.%ptr.cbd] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %ptr.cbd = bind_name b, %.loc17_25.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %i.var, constants.%T.as.Destroy.impl.Op.83d +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value constants.%X, (constants.%Destroy.impl_witness.7d5) [concrete = constants.%Destroy.facet.387] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%X, %Destroy.facet [concrete = constants.%Destroy.facet.387] +// CHECK:STDOUT: %const.as.Destroy.impl.Op.bound: = bound_method %i.var, constants.%const.as.Destroy.impl.Op.60f // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %i.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %i.var, %const.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc14: %ptr.cbd = addr_of %i.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc14) +// CHECK:STDOUT: %const.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc14) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -197,7 +202,7 @@ fn Use() { // CHECK:STDOUT: %X.as.Destroy.impl.Op.type: type = fn_type @X.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %X.as.Destroy.impl.Op: %X.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %const: type = const_type %X [concrete] +// CHECK:STDOUT: %const.dde: type = const_type %X [concrete] // CHECK:STDOUT: %Init.type: type = fn_type @Init [concrete] // CHECK:STDOUT: %Init: %Init.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.019: type = pattern_type %X [concrete] @@ -215,7 +220,7 @@ fn Use() { // CHECK:STDOUT: %i.var: ref %X = var %i.var_patt // CHECK:STDOUT: %Init.ref: %Init.type = name_ref Init, file.%Init.decl [concrete = constants.%Init] // CHECK:STDOUT: %.loc12_3: ref %X = splice_block %i.var {} -// CHECK:STDOUT: %Init.call: init %const = call %Init.ref() to %.loc12_3 +// CHECK:STDOUT: %Init.call: init %const.dde = call %Init.ref() to %.loc12_3 // CHECK:STDOUT: %X.ref.loc12_24: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %.loc12_21.1: init %X = as_compatible %Init.call // CHECK:STDOUT: %.loc12_21.2: init %X = converted %Init.call, %.loc12_21.1 @@ -225,7 +230,7 @@ fn Use() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: %pattern_type.019 = binding_pattern v [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %value.ref: %const = name_ref value, file.%value +// CHECK:STDOUT: %value.ref: %const.dde = name_ref value, file.%value // CHECK:STDOUT: %X.ref.loc13_23: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %.loc13_20.1: %X = as_compatible %value.ref // CHECK:STDOUT: %.loc13_20.2: %X = converted %value.ref, %.loc13_20.1 diff --git a/toolchain/check/testdata/as/partial.carbon b/toolchain/check/testdata/as/partial.carbon index 2bce8dcd3f63..bc21920f4ee0 100644 --- a/toolchain/check/testdata/as/partial.carbon +++ b/toolchain/check/testdata/as/partial.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/as/partial.carbon -// --- add_partial.carbon +// --- fail_todo_add_partial.carbon library "[[@TEST_NAME]]"; @@ -24,6 +24,10 @@ let ptr: X* = &reference; fn Use() { // TODO: Should some of these be valid without the `as`? //@dump-sem-ir-begin + // CHECK:STDERR: fail_todo_add_partial.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.Destroy` in type `partial X` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: var i: partial X = Init() as partial X; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ + // CHECK:STDERR: var i: partial X = Init() as partial X; let v: partial X = value as partial X; let a: partial X* = &(reference as partial X); @@ -128,12 +132,11 @@ fn Use() { //@dump-sem-ir-end } -// CHECK:STDOUT: --- add_partial.carbon +// CHECK:STDOUT: --- fail_todo_add_partial.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %ptr.d17: type = ptr_type %X [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Init.type: type = fn_type @Init [concrete] // CHECK:STDOUT: %Init: %Init.type = struct_value () [concrete] // CHECK:STDOUT: %.e71: type = partial_type %X [concrete] @@ -142,8 +145,6 @@ fn Use() { // CHECK:STDOUT: %pattern_type.46e: type = pattern_type %ptr.7b2 [concrete] // CHECK:STDOUT: %reference.var: ref %.e71 = var file.%reference.var_patt [concrete] // CHECK:STDOUT: %addr.e01: %ptr.7b2 = addr_of %reference.var [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.50a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%.e71) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.602: %T.as.Destroy.impl.Op.type.50a = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -157,66 +158,61 @@ fn Use() { // CHECK:STDOUT: } // CHECK:STDOUT: %i.var: ref %.e71 = var %i.var_patt // CHECK:STDOUT: %Init.ref: %Init.type = name_ref Init, file.%Init.decl [concrete = constants.%Init] -// CHECK:STDOUT: %.loc14_3: ref %.e71 = splice_block %i.var {} -// CHECK:STDOUT: %Init.call: init %X = call %Init.ref() to %.loc14_3 -// CHECK:STDOUT: %X.ref.loc14_40: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc14_32: type = partial_type %X.ref.loc14_40 [concrete = constants.%.e71] -// CHECK:STDOUT: %.loc14_29.1: init %.e71 = as_compatible %Init.call -// CHECK:STDOUT: %.loc14_29.2: init %.e71 = converted %Init.call, %.loc14_29.1 -// CHECK:STDOUT: assign %i.var, %.loc14_29.2 -// CHECK:STDOUT: %.loc14_10.1: type = splice_block %.loc14_10.2 [concrete = constants.%.e71] { -// CHECK:STDOUT: %X.ref.loc14_18: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc14_10.2: type = partial_type %X.ref.loc14_18 [concrete = constants.%.e71] +// CHECK:STDOUT: %.loc18_3: ref %.e71 = splice_block %i.var {} +// CHECK:STDOUT: %Init.call: init %X = call %Init.ref() to %.loc18_3 +// CHECK:STDOUT: %X.ref.loc18_40: type = name_ref X, file.%X.decl [concrete = constants.%X] +// CHECK:STDOUT: %.loc18_32: type = partial_type %X.ref.loc18_40 [concrete = constants.%.e71] +// CHECK:STDOUT: %.loc18_29.1: init %.e71 = as_compatible %Init.call +// CHECK:STDOUT: %.loc18_29.2: init %.e71 = converted %Init.call, %.loc18_29.1 +// CHECK:STDOUT: assign %i.var, %.loc18_29.2 +// CHECK:STDOUT: %.loc18_10.1: type = splice_block %.loc18_10.2 [concrete = constants.%.e71] { +// CHECK:STDOUT: %X.ref.loc18_18: type = name_ref X, file.%X.decl [concrete = constants.%X] +// CHECK:STDOUT: %.loc18_10.2: type = partial_type %X.ref.loc18_18 [concrete = constants.%.e71] // CHECK:STDOUT: } // CHECK:STDOUT: %i: ref %.e71 = bind_name i, %i.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: %pattern_type.a53 = binding_pattern v [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %value.ref: %X = name_ref value, file.%value -// CHECK:STDOUT: %X.ref.loc15_39: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc15_31: type = partial_type %X.ref.loc15_39 [concrete = constants.%.e71] -// CHECK:STDOUT: %.loc15_28.1: %.e71 = as_compatible %value.ref -// CHECK:STDOUT: %.loc15_28.2: %.e71 = converted %value.ref, %.loc15_28.1 -// CHECK:STDOUT: %.loc15_10.1: type = splice_block %.loc15_10.2 [concrete = constants.%.e71] { -// CHECK:STDOUT: %X.ref.loc15_18: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc15_10.2: type = partial_type %X.ref.loc15_18 [concrete = constants.%.e71] +// CHECK:STDOUT: %X.ref.loc19_39: type = name_ref X, file.%X.decl [concrete = constants.%X] +// CHECK:STDOUT: %.loc19_31: type = partial_type %X.ref.loc19_39 [concrete = constants.%.e71] +// CHECK:STDOUT: %.loc19_28.1: %.e71 = as_compatible %value.ref +// CHECK:STDOUT: %.loc19_28.2: %.e71 = converted %value.ref, %.loc19_28.1 +// CHECK:STDOUT: %.loc19_10.1: type = splice_block %.loc19_10.2 [concrete = constants.%.e71] { +// CHECK:STDOUT: %X.ref.loc19_18: type = name_ref X, file.%X.decl [concrete = constants.%X] +// CHECK:STDOUT: %.loc19_10.2: type = partial_type %X.ref.loc19_18 [concrete = constants.%.e71] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: %.e71 = bind_name v, %.loc15_28.2 +// CHECK:STDOUT: %v: %.e71 = bind_name v, %.loc19_28.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.46e = binding_pattern a [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %reference.ref: ref %X = name_ref reference, file.%reference [concrete = file.%reference.var] -// CHECK:STDOUT: %X.ref.loc16_46: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc16_38: type = partial_type %X.ref.loc16_46 [concrete = constants.%.e71] -// CHECK:STDOUT: %.loc16_35.1: ref %.e71 = as_compatible %reference.ref [concrete = constants.%reference.var] -// CHECK:STDOUT: %.loc16_35.2: ref %.e71 = converted %reference.ref, %.loc16_35.1 [concrete = constants.%reference.var] -// CHECK:STDOUT: %addr.loc16: %ptr.7b2 = addr_of %.loc16_35.2 [concrete = constants.%addr.e01] -// CHECK:STDOUT: %.loc16_19: type = splice_block %ptr.loc16 [concrete = constants.%ptr.7b2] { -// CHECK:STDOUT: %X.ref.loc16_18: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc16_10: type = partial_type %X.ref.loc16_18 [concrete = constants.%.e71] -// CHECK:STDOUT: %ptr.loc16: type = ptr_type %.loc16_10 [concrete = constants.%ptr.7b2] +// CHECK:STDOUT: %X.ref.loc20_46: type = name_ref X, file.%X.decl [concrete = constants.%X] +// CHECK:STDOUT: %.loc20_38: type = partial_type %X.ref.loc20_46 [concrete = constants.%.e71] +// CHECK:STDOUT: %.loc20_35.1: ref %.e71 = as_compatible %reference.ref [concrete = constants.%reference.var] +// CHECK:STDOUT: %.loc20_35.2: ref %.e71 = converted %reference.ref, %.loc20_35.1 [concrete = constants.%reference.var] +// CHECK:STDOUT: %addr: %ptr.7b2 = addr_of %.loc20_35.2 [concrete = constants.%addr.e01] +// CHECK:STDOUT: %.loc20_19: type = splice_block %ptr.loc20 [concrete = constants.%ptr.7b2] { +// CHECK:STDOUT: %X.ref.loc20_18: type = name_ref X, file.%X.decl [concrete = constants.%X] +// CHECK:STDOUT: %.loc20_10: type = partial_type %X.ref.loc20_18 [concrete = constants.%.e71] +// CHECK:STDOUT: %ptr.loc20: type = ptr_type %.loc20_10 [concrete = constants.%ptr.7b2] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.7b2 = bind_name a, %addr.loc16 +// CHECK:STDOUT: %a: %ptr.7b2 = bind_name a, %addr // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %b.patt: %pattern_type.46e = binding_pattern b [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %ptr.ref: %ptr.d17 = name_ref ptr, file.%ptr.loc9_5 -// CHECK:STDOUT: %X.ref.loc17_38: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc17_30: type = partial_type %X.ref.loc17_38 [concrete = constants.%.e71] -// CHECK:STDOUT: %ptr.loc17_39: type = ptr_type %.loc17_30 [concrete = constants.%ptr.7b2] -// CHECK:STDOUT: %.loc17_27.1: %ptr.7b2 = as_compatible %ptr.ref -// CHECK:STDOUT: %.loc17_27.2: %ptr.7b2 = converted %ptr.ref, %.loc17_27.1 -// CHECK:STDOUT: %.loc17_19: type = splice_block %ptr.loc17_19 [concrete = constants.%ptr.7b2] { -// CHECK:STDOUT: %X.ref.loc17_18: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc17_10: type = partial_type %X.ref.loc17_18 [concrete = constants.%.e71] -// CHECK:STDOUT: %ptr.loc17_19: type = ptr_type %.loc17_10 [concrete = constants.%ptr.7b2] +// CHECK:STDOUT: %X.ref.loc21_38: type = name_ref X, file.%X.decl [concrete = constants.%X] +// CHECK:STDOUT: %.loc21_30: type = partial_type %X.ref.loc21_38 [concrete = constants.%.e71] +// CHECK:STDOUT: %ptr.loc21_39: type = ptr_type %.loc21_30 [concrete = constants.%ptr.7b2] +// CHECK:STDOUT: %.loc21_27.1: %ptr.7b2 = as_compatible %ptr.ref +// CHECK:STDOUT: %.loc21_27.2: %ptr.7b2 = converted %ptr.ref, %.loc21_27.1 +// CHECK:STDOUT: %.loc21_19: type = splice_block %ptr.loc21_19 [concrete = constants.%ptr.7b2] { +// CHECK:STDOUT: %X.ref.loc21_18: type = name_ref X, file.%X.decl [concrete = constants.%X] +// CHECK:STDOUT: %.loc21_10: type = partial_type %X.ref.loc21_18 [concrete = constants.%.e71] +// CHECK:STDOUT: %ptr.loc21_19: type = ptr_type %.loc21_10 [concrete = constants.%ptr.7b2] // CHECK:STDOUT: } -// CHECK:STDOUT: %b: %ptr.7b2 = bind_name b, %.loc17_27.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %i.var, constants.%T.as.Destroy.impl.Op.602 -// CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %i.var, %T.as.Destroy.impl.Op.specific_fn -// CHECK:STDOUT: %addr.loc14: %ptr.7b2 = addr_of %i.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc14) +// CHECK:STDOUT: %b: %ptr.7b2 = bind_name b, %.loc21_27.2 // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon b/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon index c1da0d4945dd..95ea2be5cdd4 100644 --- a/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon +++ b/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon @@ -104,8 +104,10 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A: %A.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] // CHECK:STDOUT: %B: %B.type = struct_value () [concrete] @@ -158,11 +160,13 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %c.ref.loc20: ref %empty_tuple.type = name_ref c, %c // CHECK:STDOUT: %.loc20_10: init %empty_tuple.type = tuple_init () to %return [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc20_11: init %empty_tuple.type = converted %c.ref.loc20, %.loc20_10 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %c.var, constants.%T.as.Destroy.impl.Op.daf +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_3: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %c.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %c.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %c.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %c.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc20_11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,8 +265,10 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %C.type: type = fn_type @C [concrete] // CHECK:STDOUT: %C: %C.type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -287,17 +293,21 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %tuple.loc17: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc17_7.3: %empty_tuple.type = converted %C.call, %tuple.loc17 [concrete = constants.%empty_tuple] // CHECK:STDOUT: -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc17: = bound_method %.loc17_7.2, constants.%T.as.Destroy.impl.Op.daf +// CHECK:STDOUT: %facet_value.loc17: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc17_7.4: %type_where = converted constants.%empty_tuple.type, %facet_value.loc17 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc17: = bound_method %.loc17_7.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc17: = bound_method %.loc17_7.2, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc17: = bound_method %.loc17_7.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc17: %ptr.843 = addr_of %.loc17_7.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc17: init %empty_tuple.type = call %bound_method.loc17(%addr.loc17) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc17: init %empty_tuple.type = call %bound_method.loc17(%addr.loc17) // CHECK:STDOUT: -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc13: = bound_method %.loc13_7.2, constants.%T.as.Destroy.impl.Op.daf +// CHECK:STDOUT: %facet_value.loc13: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc13_7.4: %type_where = converted constants.%empty_tuple.type, %facet_value.loc13 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc13: = bound_method %.loc13_7.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc13: = bound_method %.loc13_7.2, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc13: = bound_method %.loc13_7.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc13: %ptr.843 = addr_of %.loc13_7.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/duplicate_name_same_line.carbon b/toolchain/check/testdata/basics/duplicate_name_same_line.carbon index 9202e51e5755..d1d49a850ce6 100644 --- a/toolchain/check/testdata/basics/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/basics/duplicate_name_same_line.carbon @@ -25,8 +25,10 @@ fn A() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -64,16 +66,20 @@ fn A() { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !if.done: -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18_25: = bound_method %n.var.loc18_25, constants.%T.as.Destroy.impl.Op.daf +// CHECK:STDOUT: %facet_value.loc18_25: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_25: %type_where = converted constants.%empty_tuple.type, %facet_value.loc18_25 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc18_25: = bound_method %n.var.loc18_25, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc18_25: = bound_method %n.var.loc18_25, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc18_25: = bound_method %n.var.loc18_25, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18_25: %ptr.843 = addr_of %n.var.loc18_25 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18_25: init %empty_tuple.type = call %bound_method.loc18_25(%addr.loc18_25) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18_5: = bound_method %n.var.loc18_5, constants.%T.as.Destroy.impl.Op.daf +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc18_25: init %empty_tuple.type = call %bound_method.loc18_25(%addr.loc18_25) +// CHECK:STDOUT: %facet_value.loc18_5: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_5: %type_where = converted constants.%empty_tuple.type, %facet_value.loc18_5 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc18_5: = bound_method %n.var.loc18_5, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc18_5: = bound_method %n.var.loc18_5, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc18_5: = bound_method %n.var.loc18_5, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc18_5: %ptr.843 = addr_of %n.var.loc18_5 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18_5: init %empty_tuple.type = call %bound_method.loc18_5(%addr.loc18_5) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc18_5: init %empty_tuple.type = call %bound_method.loc18_5(%addr.loc18_5) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/adapter/adapt_copy.carbon b/toolchain/check/testdata/class/adapter/adapt_copy.carbon index e8bc773a373b..9f9d5f8ac2c3 100644 --- a/toolchain/check/testdata/class/adapter/adapt_copy.carbon +++ b/toolchain/check/testdata/class/adapter/adapt_copy.carbon @@ -189,6 +189,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] @@ -206,9 +207,10 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.9a3: %Copy.type = facet_value %u32, (%Copy.impl_witness.61c) [concrete] // CHECK:STDOUT: %.fbf: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.9a3 [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.1bb, @UInt.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.af3: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.2a3) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.73b: %T.as.Destroy.impl.Op.type.af3 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.73b, @T.as.Destroy.impl.Op(%tuple.type.2a3) [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.2a3, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.285: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8a01: %AggregateT.as_type.as.Destroy.impl.Op.type.285 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.8a01, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -347,8 +349,8 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem1.loc35_33.2: ref %u32 = tuple_access %d.var, element1 // CHECK:STDOUT: %.loc35_33.2: init %u32 = initialize_from %UInt.as.Copy.impl.Op.call.loc35 to %tuple.elem1.loc35_33.2 // CHECK:STDOUT: %.loc35_33.3: init %tuple.type.2a3 = tuple_init (%.loc35_33.1, %.loc35_33.2) to %d.var -// CHECK:STDOUT: %.loc35_3: init %tuple.type.2a3 = converted %c.ref, %.loc35_33.3 -// CHECK:STDOUT: assign %d.var, %.loc35_3 +// CHECK:STDOUT: %.loc35_3.1: init %tuple.type.2a3 = converted %c.ref, %.loc35_33.3 +// CHECK:STDOUT: assign %d.var, %.loc35_3.1 // CHECK:STDOUT: %.loc35_29.1: type = splice_block %.loc35_29.3 [concrete = constants.%tuple.type.2a3] { // CHECK:STDOUT: %AdaptCopyable.ref.loc35: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [concrete = constants.%AdaptCopyable] // CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -373,11 +375,13 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc43_10.4: init %u32 = initialize_from %UInt.as.Copy.impl.Op.call.loc43 to %tuple.elem1.loc43_10.2 // CHECK:STDOUT: %.loc43_10.5: init %tuple.type.2a3 = tuple_init (%.loc43_10.2, %.loc43_10.4) to %return // CHECK:STDOUT: %.loc43_11: init %tuple.type.2a3 = converted %d.ref, %.loc43_10.5 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %d.var, constants.%T.as.Destroy.impl.Op.73b -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.73b, @T.as.Destroy.impl.Op(constants.%tuple.type.2a3) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc35_3: = bound_method %d.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.2a3, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc35_3.2: %type_where = converted constants.%tuple.type.2a3, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %d.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.8a01 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.8a01, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc35_3: = bound_method %d.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c30 = addr_of %d.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc35_3(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc35_3(%addr) // CHECK:STDOUT: return %.loc43_11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -414,6 +418,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.c49: %Copy.type = facet_value %i32, (%Copy.impl_witness.a32) [concrete] // CHECK:STDOUT: %.7fa: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c49 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.f59, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] @@ -429,10 +434,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.9a3: %Copy.type = facet_value %u32, (%Copy.impl_witness.61c) [concrete] // CHECK:STDOUT: %.fbf: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.9a3 [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.1bb, @UInt.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.ab6: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.f69) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.8f2: %T.as.Destroy.impl.Op.type.ab6 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.f69, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.3a4: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.030: %AggregateT.as_type.as.Destroy.impl.Op.type.3a4 = struct_value () [concrete] // CHECK:STDOUT: %ptr.ed5: type = ptr_type %tuple.type.f69 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.8f2, @T.as.Destroy.impl.Op(%tuple.type.f69) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.030, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -640,8 +646,8 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem1.loc14_30.4: ref %u32 = tuple_access %d.var, element1 // CHECK:STDOUT: %.loc14_30.8: init %u32 = initialize_from %UInt.as.Copy.impl.Op.call.loc14 to %tuple.elem1.loc14_30.4 // CHECK:STDOUT: %.loc14_30.9: init %tuple.type.f69 = tuple_init (%.loc14_30.7, %.loc14_30.8) to %d.var -// CHECK:STDOUT: %.loc14_3: init %tuple.type.f69 = converted %c.ref, %.loc14_30.9 -// CHECK:STDOUT: assign %d.var, %.loc14_3 +// CHECK:STDOUT: %.loc14_3.1: init %tuple.type.f69 = converted %c.ref, %.loc14_30.9 +// CHECK:STDOUT: assign %d.var, %.loc14_3.1 // CHECK:STDOUT: %.loc14_26.1: type = splice_block %.loc14_26.3 [concrete = constants.%tuple.type.f69] { // CHECK:STDOUT: %AdaptTuple.ref.loc14: type = name_ref AdaptTuple, file.%AdaptTuple.decl [concrete = constants.%AdaptTuple] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -687,11 +693,13 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.11: init %u32 = initialize_from %UInt.as.Copy.impl.Op.call.loc15 to %tuple.elem1.loc15_10.4 // CHECK:STDOUT: %.loc15_10.12: init %tuple.type.f69 = tuple_init (%.loc15_10.9, %.loc15_10.11) to %return // CHECK:STDOUT: %.loc15_11: init %tuple.type.f69 = converted %d.ref, %.loc15_10.12 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %d.var, constants.%T.as.Destroy.impl.Op.8f2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.8f2, @T.as.Destroy.impl.Op(constants.%tuple.type.f69) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_3: = bound_method %d.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.f69, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc14_3.2: %type_where = converted constants.%tuple.type.f69, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %d.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.030 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.030, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc14_3: = bound_method %d.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ed5 = addr_of %d.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14_3(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14_3(%addr) // CHECK:STDOUT: return %.loc15_11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1065,6 +1073,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.c49: %Copy.type = facet_value %i32, (%Copy.impl_witness.a32) [concrete] // CHECK:STDOUT: %.7fa: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c49 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.f59, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] @@ -1081,10 +1090,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.9a3: %Copy.type = facet_value %u32, (%Copy.impl_witness.61c) [concrete] // CHECK:STDOUT: %.fbf: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.9a3 [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.1bb, @UInt.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.160: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.80b) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.abf: %T.as.Destroy.impl.Op.type.160 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.80b, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.a7b: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.4cc: %AggregateT.as_type.as.Destroy.impl.Op.type.a7b = struct_value () [concrete] // CHECK:STDOUT: %ptr.b09: type = ptr_type %tuple.type.80b [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.abf, @T.as.Destroy.impl.Op(%tuple.type.80b) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.4cc, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1291,8 +1301,8 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem1.loc14_31.2: ref %u32 = tuple_access %d.var, element1 // CHECK:STDOUT: %.loc14_31.12: init %u32 = initialize_from %UInt.as.Copy.impl.Op.call.loc14 to %tuple.elem1.loc14_31.2 // CHECK:STDOUT: %.loc14_31.13: init %tuple.type.80b = tuple_init (%.loc14_31.11, %.loc14_31.12) to %d.var -// CHECK:STDOUT: %.loc14_3: init %tuple.type.80b = converted %c.ref, %.loc14_31.13 -// CHECK:STDOUT: assign %d.var, %.loc14_3 +// CHECK:STDOUT: %.loc14_3.1: init %tuple.type.80b = converted %c.ref, %.loc14_31.13 +// CHECK:STDOUT: assign %d.var, %.loc14_3.1 // CHECK:STDOUT: %.loc14_27.1: type = splice_block %.loc14_27.3 [concrete = constants.%tuple.type.80b] { // CHECK:STDOUT: %AdaptStruct.ref.loc14: type = name_ref AdaptStruct, file.%AdaptStruct.decl [concrete = constants.%AdaptStruct] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -1338,11 +1348,13 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.15: init %u32 = initialize_from %UInt.as.Copy.impl.Op.call.loc15 to %tuple.elem1.loc15_10.2 // CHECK:STDOUT: %.loc15_10.16: init %tuple.type.80b = tuple_init (%.loc15_10.13, %.loc15_10.15) to %return // CHECK:STDOUT: %.loc15_11: init %tuple.type.80b = converted %d.ref, %.loc15_10.16 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %d.var, constants.%T.as.Destroy.impl.Op.abf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.abf, @T.as.Destroy.impl.Op(constants.%tuple.type.80b) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_3: = bound_method %d.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.80b, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc14_3.2: %type_where = converted constants.%tuple.type.80b, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %d.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.4cc +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.4cc, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc14_3: = bound_method %d.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.b09 = addr_of %d.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14_3(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14_3(%addr) // CHECK:STDOUT: return %.loc15_11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index 8542c34a2cb4..65c80f4caf58 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -356,7 +356,7 @@ fn G() { F({}); } // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %D.113: type = class_type @D, @D(%C) [concrete] -// CHECK:STDOUT: %pattern_type.c95: type = pattern_type %D.113 [concrete] +// CHECK:STDOUT: %pattern_type.c957: type = pattern_type %D.113 [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op.type.50a: type = fn_type @D.as.Destroy.impl.Op, @D.as.Destroy.impl(%C) [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op.4c5: %D.as.Destroy.impl.Op.type.50a = struct_value () [concrete] // CHECK:STDOUT: %ptr.22d: type = ptr_type %D.113 [concrete] @@ -372,8 +372,8 @@ fn G() { F({}); } // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.c95 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.c95 = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c957 = binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c957 = var_pattern %a.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %D.113 = var %a.var_patt // CHECK:STDOUT: %.loc9: type = splice_block %D [concrete = constants.%D.113] { @@ -393,17 +393,17 @@ fn G() { F({}); } // CHECK:STDOUT: --- generic_use_inside_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T.8b3d5d.1: type = bind_symbolic_name T, 0, template [template] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T.8b3d5d.1) [template] +// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [template] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.4c2: = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T.8b3d5d.1) [template] +// CHECK:STDOUT: %Destroy.impl_witness.4c2: = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [template] // CHECK:STDOUT: %ptr.7d2: type = ptr_type %C.f2e [template] -// CHECK:STDOUT: %C.as.Destroy.impl.Op.type.1da: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T.8b3d5d.1) [template] +// CHECK:STDOUT: %C.as.Destroy.impl.Op.type.1da: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T) [template] // CHECK:STDOUT: %C.as.Destroy.impl.Op.d87: %C.as.Destroy.impl.Op.type.1da = struct_value () [template] // CHECK:STDOUT: %Destroy.facet.2c0: %Destroy.type = facet_value %C.f2e, (%Destroy.impl_witness.4c2) [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -413,7 +413,7 @@ fn G() { F({}); } // CHECK:STDOUT: %require_complete.389: = require_complete_type %C.f2e [template] // CHECK:STDOUT: %pattern_type.e5e: type = pattern_type %C.f2e [template] // CHECK:STDOUT: %.c7b: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.2c0 [template] -// CHECK:STDOUT: %C.as.Destroy.impl.Op.specific_fn.d58: = specific_function %C.as.Destroy.impl.Op.d87, @C.as.Destroy.impl.Op(%T.8b3d5d.1) [template] +// CHECK:STDOUT: %C.as.Destroy.impl.Op.specific_fn.d58: = specific_function %C.as.Destroy.impl.Op.d87, @C.as.Destroy.impl.Op(%T) [template] // CHECK:STDOUT: %require_complete.448: = require_complete_type %ptr.7d2 [template] // CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete] // CHECK:STDOUT: %pattern_type.99a: type = pattern_type %C.7a7 [concrete] @@ -435,12 +435,12 @@ fn G() { F({}); } // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0, template [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: -// CHECK:STDOUT: %T.loc6_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc6_15.1 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %T.loc6_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc6_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_15.2: type) { -// CHECK:STDOUT: %T.loc6_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc6_15.1 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %T.loc6_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc6_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.loc7_13.2: type = class_type @C, @C(%T.loc6_15.1) [template = %C.loc7_13.2 (constants.%C.f2e)] @@ -464,13 +464,13 @@ fn G() { F({}); } // CHECK:STDOUT: %v.var: ref @F.%C.loc7_13.2 (%C.f2e) = var %v.var_patt // CHECK:STDOUT: %.loc7_13: type = splice_block %C.loc7_13.1 [template = %C.loc7_13.2 (constants.%C.f2e)] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.2 [template = %T.loc6_15.1 (constants.%T.8b3d5d.1)] -// CHECK:STDOUT: %C.loc7_13.1: type = class_type @C, @C(constants.%T.8b3d5d.1) [template = %C.loc7_13.2 (constants.%C.f2e)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.2 [template = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %C.loc7_13.1: type = class_type @C, @C(constants.%T) [template = %C.loc7_13.2 (constants.%C.f2e)] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref @F.%C.loc7_13.2 (%C.f2e) = bind_name v, %v.var // CHECK:STDOUT: %impl.elem0: @F.%.loc7_3 (%.c7b) = impl_witness_access constants.%Destroy.impl_witness.4c2, element0 [template = %C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op.d87)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @C.as.Destroy.impl.Op(constants.%T.8b3d5d.1) [template = %C.as.Destroy.impl.Op.specific_fn (constants.%C.as.Destroy.impl.Op.specific_fn.d58)] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @C.as.Destroy.impl.Op(constants.%T) [template = %C.as.Destroy.impl.Op.specific_fn (constants.%C.as.Destroy.impl.Op.specific_fn.d58)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_fn // CHECK:STDOUT: %addr: @F.%ptr (%ptr.7d2) = addr_of %v.var // CHECK:STDOUT: %C.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) @@ -478,8 +478,8 @@ fn G() { F({}); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.8b3d5d.1) { -// CHECK:STDOUT: %T.loc6_15.1 => constants.%T.8b3d5d.1 +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc6_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%empty_struct_type) { diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index 2eb2afb9d4c6..1aa4fe5be505 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -602,8 +602,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %Inner.lookup_impl_witness: = lookup_impl_witness %C.390, @Inner, @Inner(%T) [symbolic] // CHECK:STDOUT: %Inner.facet.949: %Inner.type.d07 = facet_value %C.390, (%Inner.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %.4e7: type = fn_type_with_self_type %Inner.F.type.0f3, %Inner.facet.949 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.4e7 = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Inner.F(%T, %Inner.facet.949) [symbolic] +// CHECK:STDOUT: %impl.elem0.e4d: %.4e7 = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.3e8: = specific_impl_function %impl.elem0.e4d, @Inner.F(%T, %Inner.facet.949) [symbolic] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -964,8 +964,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %Inner.F.type: type = fn_type @Inner.F, @Inner(%T) [symbolic = %Inner.F.type (constants.%Inner.F.type.0f3)] // CHECK:STDOUT: %Inner.facet: @C.as.Inner.impl.F.%Inner.type (%Inner.type.d07) = facet_value %C, (%Inner.lookup_impl_witness) [symbolic = %Inner.facet (constants.%Inner.facet.949)] // CHECK:STDOUT: %.loc11_41: type = fn_type_with_self_type %Inner.F.type, %Inner.facet [symbolic = %.loc11_41 (constants.%.4e7)] -// CHECK:STDOUT: %impl.elem0.loc11_41.2: @C.as.Inner.impl.F.%.loc11_41 (%.4e7) = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc11_41.2: = specific_impl_function %impl.elem0.loc11_41.2, @Inner.F(%T, %Inner.facet) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %impl.elem0.loc11_41.2: @C.as.Inner.impl.F.%.loc11_41 (%.4e7) = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0.e4d)] +// CHECK:STDOUT: %specific_impl_fn.loc11_41.2: = specific_impl_function %impl.elem0.loc11_41.2, @Inner.F(%T, %Inner.facet) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn.3e8)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @C.as.Inner.impl.F.%C (%C.390)) -> %return.param: @C.as.Inner.impl.F.%T (%T) { // CHECK:STDOUT: !entry: @@ -974,9 +974,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc11_43 [symbolic = %Inner.type (constants.%Inner.type.d07)] // CHECK:STDOUT: %.loc11_48: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.115) = specific_constant @Inner.%assoc0.loc6_28.1, @Inner(constants.%T) [symbolic = %assoc0 (constants.%assoc0.95e)] // CHECK:STDOUT: %F.ref: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.115) = name_ref F, %.loc11_48 [symbolic = %assoc0 (constants.%assoc0.95e)] -// CHECK:STDOUT: %impl.elem0.loc11_41.1: @C.as.Inner.impl.F.%.loc11_41 (%.4e7) = impl_witness_access constants.%Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc11_41.1: @C.as.Inner.impl.F.%.loc11_41 (%.4e7) = impl_witness_access constants.%Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0.e4d)] // CHECK:STDOUT: %bound_method.loc11_41: = bound_method %self.ref, %impl.elem0.loc11_41.1 -// CHECK:STDOUT: %specific_impl_fn.loc11_41.1: = specific_impl_function %impl.elem0.loc11_41.1, @Inner.F(constants.%T, constants.%Inner.facet.949) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc11_41.1: = specific_impl_function %impl.elem0.loc11_41.1, @Inner.F(constants.%T, constants.%Inner.facet.949) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn.3e8)] // CHECK:STDOUT: %bound_method.loc11_52: = bound_method %self.ref, %specific_impl_fn.loc11_41.1 // CHECK:STDOUT: %.loc11_23: ref @C.as.Inner.impl.F.%T (%T) = splice_block %return {} // CHECK:STDOUT: %.loc11_52: init @C.as.Inner.impl.F.%T (%T) = call %bound_method.loc11_52(%self.ref) to %.loc11_23 diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index 594d43f77b12..d2180b9e4465 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -49,14 +49,14 @@ class Class(T:! type) { // CHECK:STDOUT: %pattern_type.9e0: type = pattern_type %ptr.955 [symbolic] // CHECK:STDOUT: %Class.as.Destroy.impl.Op.type: type = fn_type @Class.as.Destroy.impl.Op, @Class.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %Class.as.Destroy.impl.Op: %Class.as.Destroy.impl.Op.type = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.8cc) [symbolic] +// CHECK:STDOUT: %Destroy.facet.489: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.8cc) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %require_complete.4f8: = require_complete_type %Class [symbolic] // CHECK:STDOUT: %Class.val: %Class = struct_value () [symbolic] // CHECK:STDOUT: %Class.MakeSelf.specific_fn: = specific_function %Class.MakeSelf, @Class.MakeSelf(%T) [symbolic] // CHECK:STDOUT: %Class.MakeClass.specific_fn: = specific_function %Class.MakeClass, @Class.MakeClass(%T) [symbolic] -// CHECK:STDOUT: %.856: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] +// CHECK:STDOUT: %.856: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.489 [symbolic] // CHECK:STDOUT: %Class.as.Destroy.impl.Op.specific_fn: = specific_function %Class.as.Destroy.impl.Op, @Class.as.Destroy.impl.Op(%T) [symbolic] // CHECK:STDOUT: %require_complete.2ae: = require_complete_type %ptr.955 [symbolic] // CHECK:STDOUT: } @@ -211,7 +211,7 @@ class Class(T:! type) { // CHECK:STDOUT: %Class.MakeClass: @Class.F.%Class.MakeClass.type (%Class.MakeClass.type) = struct_value () [symbolic = %Class.MakeClass (constants.%Class.MakeClass)] // CHECK:STDOUT: %Class.MakeClass.specific_fn.loc22_19.2: = specific_function %Class.MakeClass, @Class.MakeClass(%T) [symbolic = %Class.MakeClass.specific_fn.loc22_19.2 (constants.%Class.MakeClass.specific_fn)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness @Class.%Destroy.impl_witness_table, @Class.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.8cc)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class.loc21_19.2, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class.loc21_19.2, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.489)] // CHECK:STDOUT: %.loc22_5.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc22_5.2 (constants.%.856)] // CHECK:STDOUT: %Class.as.Destroy.impl.Op.type: type = fn_type @Class.as.Destroy.impl.Op, @Class.as.Destroy.impl(%T) [symbolic = %Class.as.Destroy.impl.Op.type (constants.%Class.as.Destroy.impl.Op.type)] // CHECK:STDOUT: %Class.as.Destroy.impl.Op: @Class.F.%Class.as.Destroy.impl.Op.type (%Class.as.Destroy.impl.Op.type) = struct_value () [symbolic = %Class.as.Destroy.impl.Op (constants.%Class.as.Destroy.impl.Op)] diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index cb78685430af..c85097f544df 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -307,14 +307,14 @@ fn Run() { // CHECK:STDOUT: %ptr.c62: type = ptr_type %Incomplete [concrete] // CHECK:STDOUT: %pattern_type.275: type = pattern_type %ptr.c62 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.432: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.c62) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.ba5: %T.as.Destroy.impl.Op.type.432 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.6a8: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%Incomplete) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.1a6: %ptr.as.Destroy.impl.Op.type.6a8 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c22: type = ptr_type %ptr.c62 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.4a7: = specific_function %T.as.Destroy.impl.Op.ba5, @T.as.Destroy.impl.Op(%ptr.c62) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a9d: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.6cf) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.75d: %T.as.Destroy.impl.Op.type.a9d = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.219: = specific_function %ptr.as.Destroy.impl.Op.1a6, @ptr.as.Destroy.impl.Op(%Incomplete) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.501: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%ForwardDeclared.7b34f2.1) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.368: %ptr.as.Destroy.impl.Op.type.501 = struct_value () [concrete] // CHECK:STDOUT: %ptr.df0: type = ptr_type %ptr.6cf [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.bff: = specific_function %T.as.Destroy.impl.Op.75d, @T.as.Destroy.impl.Op(%ptr.6cf) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.0de: = specific_function %ptr.as.Destroy.impl.Op.368, @ptr.as.Destroy.impl.Op(%ForwardDeclared.7b34f2.1) [concrete] // CHECK:STDOUT: %Destroy.impl_witness.146: = impl_witness imports.%Destroy.impl_witness_table.70a [concrete] // CHECK:STDOUT: %ForwardDeclared.as.Destroy.impl.Op.type: type = fn_type @ForwardDeclared.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %ForwardDeclared.as.Destroy.impl.Op: %ForwardDeclared.as.Destroy.impl.Op.type = struct_value () [concrete] @@ -535,16 +535,16 @@ fn Run() { // CHECK:STDOUT: %ptr.loc18: type = ptr_type %Incomplete.ref [concrete = constants.%ptr.c62] // CHECK:STDOUT: } // CHECK:STDOUT: %e: ref %ptr.c62 = bind_name e, %e.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18: = bound_method %e.var, constants.%T.as.Destroy.impl.Op.ba5 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.ba5, @T.as.Destroy.impl.Op(constants.%ptr.c62) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.4a7] -// CHECK:STDOUT: %bound_method.loc18: = bound_method %e.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc18: = bound_method %e.var, constants.%ptr.as.Destroy.impl.Op.1a6 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%ptr.as.Destroy.impl.Op.1a6, @ptr.as.Destroy.impl.Op(constants.%Incomplete) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn.219] +// CHECK:STDOUT: %bound_method.loc18: = bound_method %e.var, %ptr.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18: %ptr.c22 = addr_of %e.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18(%addr.loc18) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc16: = bound_method %d.var, constants.%T.as.Destroy.impl.Op.75d -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.75d, @T.as.Destroy.impl.Op(constants.%ptr.6cf) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.bff] -// CHECK:STDOUT: %bound_method.loc16_3: = bound_method %d.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18(%addr.loc18) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc16: = bound_method %d.var, constants.%ptr.as.Destroy.impl.Op.368 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%ptr.as.Destroy.impl.Op.368, @ptr.as.Destroy.impl.Op(constants.%ForwardDeclared.7b34f2.1) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn.0de] +// CHECK:STDOUT: %bound_method.loc16_3: = bound_method %d.var, %ptr.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc16_3: %ptr.df0 = addr_of %d.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16_3(%addr.loc16_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16_3(%addr.loc16_3) // CHECK:STDOUT: %ForwardDeclared.as.Destroy.impl.Op.bound: = bound_method %c.var, constants.%ForwardDeclared.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc12: %ptr.6cf = addr_of %c.var // CHECK:STDOUT: %ForwardDeclared.as.Destroy.impl.Op.call: init %empty_tuple.type = call %ForwardDeclared.as.Destroy.impl.Op.bound(%addr.loc12) diff --git a/toolchain/check/testdata/class/import_member_cycle.carbon b/toolchain/check/testdata/class/import_member_cycle.carbon index 743061a71bae..91bbed21e315 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -111,10 +111,10 @@ fn Run() { // CHECK:STDOUT: %complete_type.e4b: = complete_type_witness %struct_type.a [concrete] // CHECK:STDOUT: %pattern_type.d3d: type = pattern_type %ptr.257 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3f: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.257) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.76b: %T.as.Destroy.impl.Op.type.f3f = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.976: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%Cycle) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.594: %ptr.as.Destroy.impl.Op.type.976 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d80: type = ptr_type %ptr.257 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.76b, @T.as.Destroy.impl.Op(%ptr.257) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.594, @ptr.as.Destroy.impl.Op(%Cycle) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -169,11 +169,11 @@ fn Run() { // CHECK:STDOUT: %ptr: type = ptr_type %Cycle.ref [concrete = constants.%ptr.257] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %ptr.257 = bind_name a, %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.76b -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.76b, @T.as.Destroy.impl.Op(constants.%ptr.257) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%ptr.as.Destroy.impl.Op.594 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function constants.%ptr.as.Destroy.impl.Op.594, @ptr.as.Destroy.impl.Op(constants.%Cycle) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d80 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index fbb07d6dcd09..5bfa489a45e9 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -87,11 +87,11 @@ fn F(a: Outer*) { // CHECK:STDOUT: %complete_type.e99: = complete_type_witness %struct_type.po.qo.pi [concrete] // CHECK:STDOUT: %pattern_type.e74: type = pattern_type %Outer [concrete] // CHECK:STDOUT: %pattern_type.906: type = pattern_type %Inner [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.31f: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.8b3) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.8a8: %ptr.as.Copy.impl.Op.type.31f = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b32: = impl_witness imports.%Copy.impl_witness_table.53c, @ptr.as.Copy.impl(%Outer) [concrete] diff --git a/toolchain/check/testdata/class/raw_self_type.carbon b/toolchain/check/testdata/class/raw_self_type.carbon index 97407b8ff044..e83ef591c853 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -54,10 +54,10 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %Copy.facet.a65: %Copy.type = facet_value %ptr.e71, (%Copy.impl_witness.929) [concrete] // CHECK:STDOUT: %.93e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a65 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.275, @ptr.as.Copy.impl.Op(%Class) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.3a1: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.e71) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.5e8: %T.as.Destroy.impl.Op.type.3a1 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.302: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%Class) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.e41: %ptr.as.Destroy.impl.Op.type.302 = struct_value () [concrete] // CHECK:STDOUT: %ptr.0dd: type = ptr_type %ptr.e71 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.5e8, @T.as.Destroy.impl.Op(%ptr.e71) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.e41, @ptr.as.Destroy.impl.Op(%Class) [concrete] // CHECK:STDOUT: %MemberNamedSelf: type = class_type @MemberNamedSelf [concrete] // CHECK:STDOUT: %Self.362: type = class_type @Self [concrete] // CHECK:STDOUT: %Destroy.impl_witness.5bb: = impl_witness @Self.%Destroy.impl_witness_table [concrete] @@ -245,16 +245,16 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %ptr.loc18: type = ptr_type %Self.ref.loc18_12 [concrete = constants.%ptr.e71] // CHECK:STDOUT: } // CHECK:STDOUT: %p: ref %ptr.e71 = bind_name p, %p.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18: = bound_method %p.var, constants.%T.as.Destroy.impl.Op.5e8 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.5e8, @T.as.Destroy.impl.Op(constants.%ptr.e71) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_5: = bound_method %p.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc18: = bound_method %p.var, constants.%ptr.as.Destroy.impl.Op.e41 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%ptr.as.Destroy.impl.Op.e41, @ptr.as.Destroy.impl.Op(constants.%Class) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_5: = bound_method %p.var, %ptr.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18: %ptr.0dd = addr_of %p.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18_5(%addr.loc18) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc17: = bound_method %Self.var, constants.%T.as.Destroy.impl.Op.5e8 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.5e8, @T.as.Destroy.impl.Op(constants.%ptr.e71) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc17: = bound_method %Self.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18_5(%addr.loc18) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc17: = bound_method %Self.var, constants.%ptr.as.Destroy.impl.Op.e41 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%ptr.as.Destroy.impl.Op.e41, @ptr.as.Destroy.impl.Op(constants.%Class) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc17: = bound_method %Self.var, %ptr.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc17: %ptr.0dd = addr_of %Self.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc17: init %empty_tuple.type = call %bound_method.loc17(%addr.loc17) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc17: init %empty_tuple.type = call %bound_method.loc17(%addr.loc17) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index dbcfeaba5223..cd54a8158350 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -165,9 +165,11 @@ fn G() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %F.specific_fn.04a: = specific_function %F, @F(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.b81: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type.002) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.afd: %T.as.Destroy.impl.Op.type.b81 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(%array_type.002) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type.002, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.d02: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: %complete_type.dd1: = complete_type_witness %array_type.002 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -295,8 +297,8 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_34.2: init %C = class_init (), %.loc9_35.6 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.8: init %array_type.002 = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) to %a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %array_type.002 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %array_type.002 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %array_type [concrete = constants.%array_type.002] { // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -309,11 +311,13 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc8: ref %C = splice_block %return {} // CHECK:STDOUT: %.loc10: %array_type.002 = bind_value %a.ref // CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%.loc10) to %.loc8 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.afd -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(constants.%array_type.002) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type.002, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_3.2: %type_where = converted constants.%array_type.002, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.d02 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -400,9 +404,11 @@ fn G() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.b81: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type.002) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.afd: %T.as.Destroy.impl.Op.type.b81 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(%array_type.002) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type.002, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.d02: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: %complete_type.dd1: = complete_type_witness %array_type.002 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete] // CHECK:STDOUT: %bound_method.f36: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -552,8 +558,8 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_34.2: init %C = class_init (), %.loc9_35.6 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.8: init %array_type.002 = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) to %a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %array_type.002 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %array_type.002 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %array_type [concrete = constants.%array_type.002] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -565,11 +571,13 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_3.1ba) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc10: %array_type.002 = bind_value %a.ref // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn(%.loc10) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.afd -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(constants.%array_type.002) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type.002, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_3.2: %type_where = converted constants.%array_type.002, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.d02 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -631,9 +639,11 @@ fn G() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C, %int_3) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.b81: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type.002) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.afd: %T.as.Destroy.impl.Op.type.b81 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(%array_type.002) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type.002, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.d02: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: %complete_type.dd1: = complete_type_witness %array_type.002 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -754,8 +764,8 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_34.2: init %C = class_init (), %.loc9_35.6 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.8: init %array_type.002 = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) to %a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %array_type.002 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %array_type.002 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %array_type [concrete = constants.%array_type.002] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -767,11 +777,13 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C, constants.%int_3) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc10: %array_type.002 = bind_value %a.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc10) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.afd -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(constants.%array_type.002) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type.002, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_3.2: %type_where = converted constants.%array_type.002, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.d02 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -836,9 +848,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn.04a: = specific_function %F, @F(%C) [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.b81: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type.002) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.afd: %T.as.Destroy.impl.Op.type.b81 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(%array_type.002) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type.002, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.d02: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: %complete_type.8eb: = complete_type_witness %array_type.15a [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -968,8 +982,8 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc10_34.2: init %C = class_init (), %.loc10_35.6 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc10_35.7: init %C = converted %.loc10_34.1, %.loc10_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc10_35.8: init %array_type.002 = array_init (%.loc10_35.3, %.loc10_35.5, %.loc10_35.7) to %a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_3: init %array_type.002 = converted %.loc10_35.1, %.loc10_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %array_type.002 = converted %.loc10_35.1, %.loc10_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_20: type = splice_block %array_type [concrete = constants.%array_type.002] { // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -982,11 +996,13 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc8: ref %C = splice_block %return {} // CHECK:STDOUT: %.loc21: %array_type.15a = converted %a.ref, [concrete = ] // CHECK:STDOUT: %F.call: init %C = call %F.specific_fn() to %.loc8 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.afd -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(constants.%array_type.002) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type.002, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_3.2: %type_where = converted constants.%array_type.002, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.d02 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1081,9 +1097,11 @@ fn G() -> i32 { // CHECK:STDOUT: %array_type.002: type = array_type %int_3.1ba, %C [concrete] // CHECK:STDOUT: %pattern_type.a63: type = pattern_type %array_type.002 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.260: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type.fe4) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.70a: %T.as.Destroy.impl.Op.type.260 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.70a, @T.as.Destroy.impl.Op(%array_type.fe4) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type.fe4, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.9be: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6f0: %AggregateT.as_type.as.Destroy.impl.Op.type.9be = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.6f0, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: %complete_type.dd1: = complete_type_witness %array_type.002 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete] // CHECK:STDOUT: %bound_method.f36: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1265,8 +1283,8 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc11_34.2: init %D = class_init (), %.loc11_35.6 [concrete = constants.%D.val] // CHECK:STDOUT: %.loc11_35.7: init %D = converted %.loc11_34.1, %.loc11_34.2 [concrete = constants.%D.val] // CHECK:STDOUT: %.loc11_35.8: init %array_type.fe4 = array_init (%.loc11_35.3, %.loc11_35.5, %.loc11_35.7) to %a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %array_type.fe4 = converted %.loc11_35.1, %.loc11_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %array_type.fe4 = converted %.loc11_35.1, %.loc11_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_20: type = splice_block %array_type [concrete = constants.%array_type.fe4] { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -1278,11 +1296,13 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_3.1ba) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc22: %array_type.002 = converted %a.ref, [concrete = ] // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn() -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.70a -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.70a, @T.as.Destroy.impl.Op(constants.%array_type.fe4) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type.fe4, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc11_3.2: %type_where = converted constants.%array_type.fe4, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.6f0 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.6f0, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.af6 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1372,9 +1392,11 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.b81: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type.002) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.afd: %T.as.Destroy.impl.Op.type.b81 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(%array_type.002) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type.002, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.d02: %AggregateT.as_type.as.Destroy.impl.Op.type.0fd = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1527,8 +1549,8 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_34.2: init %C = class_init (), %.loc9_35.6 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.8: init %array_type.002 = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) to %a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %array_type.002 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %array_type.002 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %array_type [concrete = constants.%array_type.002] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -1537,11 +1559,13 @@ fn G() -> i32 { // CHECK:STDOUT: %a: ref %array_type.002 = bind_name a, %a.var // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %a.ref: ref %array_type.002 = name_ref a, %a -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.afd -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.afd, @T.as.Destroy.impl.Op(constants.%array_type.002) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type.002, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_3.2: %type_where = converted constants.%array_type.002, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.d02 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.d02, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/symbolic_facets.carbon b/toolchain/check/testdata/deduce/symbolic_facets.carbon index 346c4c001eea..746b2facd158 100644 --- a/toolchain/check/testdata/deduce/symbolic_facets.carbon +++ b/toolchain/check/testdata/deduce/symbolic_facets.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: 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 8d986170c7b6..a5207a7a1f3d 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -108,24 +108,24 @@ fn G() { // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %tuple.type: type = tuple_type (type) [concrete] -// CHECK:STDOUT: %T.6eb: %tuple.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f1e: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %HoldsType.type: type = generic_class_type @HoldsType [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType.cc9: type = class_type @HoldsType, @HoldsType(%T.6eb) [symbolic] +// CHECK:STDOUT: %HoldsType.cc9: type = class_type @HoldsType, @HoldsType(%T) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.cc4: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T.6eb) [symbolic] +// CHECK:STDOUT: %Destroy.impl_witness.cc4: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %ptr.47e: type = ptr_type %HoldsType.cc9 [symbolic] // CHECK:STDOUT: %pattern_type.c39: type = pattern_type %ptr.47e [symbolic] -// CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op.type.cd5: type = fn_type @HoldsType.as.Destroy.impl.Op, @HoldsType.as.Destroy.impl(%T.6eb) [symbolic] +// CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op.type.cd5: type = fn_type @HoldsType.as.Destroy.impl.Op, @HoldsType.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op.5e0: %HoldsType.as.Destroy.impl.Op.type.cd5 = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.ec6: type = pattern_type %HoldsType.cc9 [symbolic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %tuple.elem0: type = tuple_access %T.6eb, element0 [symbolic] +// CHECK:STDOUT: %tuple.elem0: type = tuple_access %T, element0 [symbolic] // CHECK:STDOUT: %pattern_type.08e: type = pattern_type %tuple.elem0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -180,7 +180,7 @@ fn G() { // CHECK:STDOUT: %.loc4_28.2: %tuple.type = tuple_literal (type) // CHECK:STDOUT: %.loc4_28.3: type = converted %.loc4_28.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_17.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.loc4_17.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.f1e = symbolic_binding_pattern T, 0 [concrete] @@ -194,17 +194,17 @@ fn G() { // CHECK:STDOUT: %.loc8_17.2: %tuple.type = tuple_literal (type) // CHECK:STDOUT: %.loc8_17.3: type = converted %.loc8_17.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_6.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.loc8_6.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_34.1 (%HoldsType.cc9) = value_param call_param0 // CHECK:STDOUT: %.loc8_34: type = splice_block %HoldsType.loc8_34.2 [symbolic = %HoldsType.loc8_34.1 (constants.%HoldsType.cc9)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc8_33: %tuple.type = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T.6eb)] -// CHECK:STDOUT: %HoldsType.loc8_34.2: type = class_type @HoldsType, @HoldsType(constants.%T.6eb) [symbolic = %HoldsType.loc8_34.1 (constants.%HoldsType.cc9)] +// CHECK:STDOUT: %T.ref.loc8_33: %tuple.type = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T)] +// CHECK:STDOUT: %HoldsType.loc8_34.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc8_34.1 (constants.%HoldsType.cc9)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%HoldsType.loc8_34.1 (%HoldsType.cc9) = bind_name x, %x.param // CHECK:STDOUT: %a.param: @F.%tuple.elem0.loc8_41.1 (%tuple.elem0) = value_param call_param1 // CHECK:STDOUT: %.loc8_41: type = splice_block %tuple.elem0.loc8_41.2 [symbolic = %tuple.elem0.loc8_41.1 (constants.%tuple.elem0)] { -// CHECK:STDOUT: %T.ref.loc8_40: %tuple.type = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.ref.loc8_40: %tuple.type = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc8_41.2: type = tuple_access %T.ref.loc8_40, element0 [symbolic = %tuple.elem0.loc8_41.1 (constants.%tuple.elem0)] // CHECK:STDOUT: } @@ -215,7 +215,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @HoldsType.as.Destroy.impl(@HoldsType.%T.loc4_17.2: %tuple.type) { -// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.6eb)] +// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T) [symbolic = %HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.cc4)] // CHECK:STDOUT: @@ -231,7 +231,7 @@ fn G() { // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @HoldsType.as.Destroy.impl.Op.%ptr (%ptr.47e) = value_param call_param0 // CHECK:STDOUT: %.loc4_31.2: type = splice_block %Self.ref [symbolic = %HoldsType (constants.%HoldsType.cc9)] { -// CHECK:STDOUT: %.loc4_31.3: type = specific_constant constants.%HoldsType.cc9, @HoldsType(constants.%T.6eb) [symbolic = %HoldsType (constants.%HoldsType.cc9)] +// CHECK:STDOUT: %.loc4_31.3: type = specific_constant constants.%HoldsType.cc9, @HoldsType(constants.%T) [symbolic = %HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc4_31.3 [symbolic = %HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @HoldsType.as.Destroy.impl.Op.%ptr (%ptr.47e) = bind_name self, %self.param @@ -260,7 +260,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc4_17.2: %tuple.type) { -// CHECK:STDOUT: %T.loc4_17.1: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.loc4_17.1: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -268,7 +268,7 @@ fn G() { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%HoldsType.cc9 [symbolic = @HoldsType.as.Destroy.impl.%HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: impl_decl @HoldsType.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@HoldsType.as.Destroy.impl.%HoldsType.as.Destroy.impl.Op.decl), @HoldsType.as.Destroy.impl [concrete] -// CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(constants.%T.6eb) [symbolic = @HoldsType.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.cc4)] +// CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(constants.%T) [symbolic = @HoldsType.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.cc4)] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: @@ -290,7 +290,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @HoldsType.as.Destroy.impl.Op(@HoldsType.%T.loc4_17.2: %tuple.type) { -// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.6eb)] +// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T) [symbolic = %HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: %ptr: type = ptr_type %HoldsType [symbolic = %ptr (constants.%ptr.47e)] // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.c39)] @@ -301,7 +301,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_6.2: %tuple.type) { -// CHECK:STDOUT: %T.loc8_6.1: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.loc8_6.1: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T)] // CHECK:STDOUT: %HoldsType.loc8_34.1: type = class_type @HoldsType, @HoldsType(%T.loc8_6.1) [symbolic = %HoldsType.loc8_34.1 (constants.%HoldsType.cc9)] // CHECK:STDOUT: %pattern_type.loc8_20: type = pattern_type %HoldsType.loc8_34.1 [symbolic = %pattern_type.loc8_20 (constants.%pattern_type.ec6)] // CHECK:STDOUT: %tuple.elem0.loc8_41.1: type = tuple_access %T.loc8_6.1, element0 [symbolic = %tuple.elem0.loc8_41.1 (constants.%tuple.elem0)] @@ -353,27 +353,27 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T.6eb) { -// CHECK:STDOUT: %T.loc4_17.1 => constants.%T.6eb +// CHECK:STDOUT: specific @HoldsType(constants.%T) { +// CHECK:STDOUT: %T.loc4_17.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl(constants.%T.6eb) { -// CHECK:STDOUT: %T => constants.%T.6eb +// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl(constants.%T) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HoldsType => constants.%HoldsType.cc9 // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.cc4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl.Op(constants.%T.6eb) { -// CHECK:STDOUT: %T => constants.%T.6eb +// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl.Op(constants.%T) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HoldsType => constants.%HoldsType.cc9 // CHECK:STDOUT: %ptr => constants.%ptr.47e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.6eb) { -// CHECK:STDOUT: %T.loc8_6.1 => constants.%T.6eb +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc8_6.1 => constants.%T // CHECK:STDOUT: %HoldsType.loc8_34.1 => constants.%HoldsType.cc9 // CHECK:STDOUT: %pattern_type.loc8_20 => constants.%pattern_type.ec6 // CHECK:STDOUT: %tuple.elem0.loc8_41.1 => constants.%tuple.elem0 @@ -421,23 +421,23 @@ fn G() { // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete] -// CHECK:STDOUT: %T.08d: %struct_type.t = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %struct_type.t = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.7f2: type = pattern_type %struct_type.t [concrete] // CHECK:STDOUT: %HoldsType.type: type = generic_class_type @HoldsType [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType.843: type = class_type @HoldsType, @HoldsType(%T.08d) [symbolic] +// CHECK:STDOUT: %HoldsType.843: type = class_type @HoldsType, @HoldsType(%T) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.c73: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T.08d) [symbolic] +// CHECK:STDOUT: %Destroy.impl_witness.c73: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %ptr.ca6: type = ptr_type %HoldsType.843 [symbolic] // CHECK:STDOUT: %pattern_type.051: type = pattern_type %ptr.ca6 [symbolic] -// CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op.type.73f: type = fn_type @HoldsType.as.Destroy.impl.Op, @HoldsType.as.Destroy.impl(%T.08d) [symbolic] +// CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op.type.73f: type = fn_type @HoldsType.as.Destroy.impl.Op, @HoldsType.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op.266: %HoldsType.as.Destroy.impl.Op.type.73f = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.aa4: type = pattern_type %HoldsType.843 [symbolic] -// CHECK:STDOUT: %.20a: type = struct_access %T.08d, element0 [symbolic] +// CHECK:STDOUT: %.20a: type = struct_access %T, element0 [symbolic] // CHECK:STDOUT: %pattern_type.9f0: type = pattern_type %.20a [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -491,7 +491,7 @@ fn G() { // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_17.2: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T.08d)] +// CHECK:STDOUT: %T.loc4_17.2: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.7f2 = symbolic_binding_pattern T, 0 [concrete] @@ -504,17 +504,17 @@ fn G() { // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_6.2: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T.08d)] +// CHECK:STDOUT: %T.loc8_6.2: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_36.1 (%HoldsType.843) = value_param call_param0 // CHECK:STDOUT: %.loc8_36: type = splice_block %HoldsType.loc8_36.2 [symbolic = %HoldsType.loc8_36.1 (constants.%HoldsType.843)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc8_35: %struct_type.t = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T.08d)] -// CHECK:STDOUT: %HoldsType.loc8_36.2: type = class_type @HoldsType, @HoldsType(constants.%T.08d) [symbolic = %HoldsType.loc8_36.1 (constants.%HoldsType.843)] +// CHECK:STDOUT: %T.ref.loc8_35: %struct_type.t = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T)] +// CHECK:STDOUT: %HoldsType.loc8_36.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc8_36.1 (constants.%HoldsType.843)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%HoldsType.loc8_36.1 (%HoldsType.843) = bind_name x, %x.param // CHECK:STDOUT: %a.param: @F.%.loc8_43.1 (%.20a) = value_param call_param1 // CHECK:STDOUT: %.loc8_43.2: type = splice_block %.loc8_43.3 [symbolic = %.loc8_43.1 (constants.%.20a)] { -// CHECK:STDOUT: %T.ref.loc8_42: %struct_type.t = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T.08d)] +// CHECK:STDOUT: %T.ref.loc8_42: %struct_type.t = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T)] // CHECK:STDOUT: %.loc8_43.3: type = struct_access %T.ref.loc8_42, element0 [symbolic = %.loc8_43.1 (constants.%.20a)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%.loc8_43.1 (%.20a) = bind_name a, %a.param @@ -524,7 +524,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @HoldsType.as.Destroy.impl(@HoldsType.%T.loc4_17.2: %struct_type.t) { -// CHECK:STDOUT: %T: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.08d)] +// CHECK:STDOUT: %T: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T) [symbolic = %HoldsType (constants.%HoldsType.843)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.c73)] // CHECK:STDOUT: @@ -540,7 +540,7 @@ fn G() { // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @HoldsType.as.Destroy.impl.Op.%ptr (%ptr.ca6) = value_param call_param0 // CHECK:STDOUT: %.loc4_33.2: type = splice_block %Self.ref [symbolic = %HoldsType (constants.%HoldsType.843)] { -// CHECK:STDOUT: %.loc4_33.3: type = specific_constant constants.%HoldsType.843, @HoldsType(constants.%T.08d) [symbolic = %HoldsType (constants.%HoldsType.843)] +// CHECK:STDOUT: %.loc4_33.3: type = specific_constant constants.%HoldsType.843, @HoldsType(constants.%T) [symbolic = %HoldsType (constants.%HoldsType.843)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc4_33.3 [symbolic = %HoldsType (constants.%HoldsType.843)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @HoldsType.as.Destroy.impl.Op.%ptr (%ptr.ca6) = bind_name self, %self.param @@ -569,7 +569,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc4_17.2: %struct_type.t) { -// CHECK:STDOUT: %T.loc4_17.1: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T.08d)] +// CHECK:STDOUT: %T.loc4_17.1: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -577,7 +577,7 @@ fn G() { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%HoldsType.843 [symbolic = @HoldsType.as.Destroy.impl.%HoldsType (constants.%HoldsType.843)] // CHECK:STDOUT: impl_decl @HoldsType.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@HoldsType.as.Destroy.impl.%HoldsType.as.Destroy.impl.Op.decl), @HoldsType.as.Destroy.impl [concrete] -// CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(constants.%T.08d) [symbolic = @HoldsType.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.c73)] +// CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(constants.%T) [symbolic = @HoldsType.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.c73)] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: @@ -599,7 +599,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @HoldsType.as.Destroy.impl.Op(@HoldsType.%T.loc4_17.2: %struct_type.t) { -// CHECK:STDOUT: %T: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.08d)] +// CHECK:STDOUT: %T: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T) [symbolic = %HoldsType (constants.%HoldsType.843)] // CHECK:STDOUT: %ptr: type = ptr_type %HoldsType [symbolic = %ptr (constants.%ptr.ca6)] // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.051)] @@ -610,7 +610,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_6.2: %struct_type.t) { -// CHECK:STDOUT: %T.loc8_6.1: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T.08d)] +// CHECK:STDOUT: %T.loc8_6.1: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T)] // CHECK:STDOUT: %HoldsType.loc8_36.1: type = class_type @HoldsType, @HoldsType(%T.loc8_6.1) [symbolic = %HoldsType.loc8_36.1 (constants.%HoldsType.843)] // CHECK:STDOUT: %pattern_type.loc8_22: type = pattern_type %HoldsType.loc8_36.1 [symbolic = %pattern_type.loc8_22 (constants.%pattern_type.aa4)] // CHECK:STDOUT: %.loc8_43.1: type = struct_access %T.loc8_6.1, element0 [symbolic = %.loc8_43.1 (constants.%.20a)] @@ -662,27 +662,27 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T.08d) { -// CHECK:STDOUT: %T.loc4_17.1 => constants.%T.08d +// CHECK:STDOUT: specific @HoldsType(constants.%T) { +// CHECK:STDOUT: %T.loc4_17.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl(constants.%T.08d) { -// CHECK:STDOUT: %T => constants.%T.08d +// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl(constants.%T) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HoldsType => constants.%HoldsType.843 // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.c73 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl.Op(constants.%T.08d) { -// CHECK:STDOUT: %T => constants.%T.08d +// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl.Op(constants.%T) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HoldsType => constants.%HoldsType.843 // CHECK:STDOUT: %ptr => constants.%ptr.ca6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.051 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.08d) { -// CHECK:STDOUT: %T.loc8_6.1 => constants.%T.08d +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc8_6.1 => constants.%T // CHECK:STDOUT: %HoldsType.loc8_36.1 => constants.%HoldsType.843 // CHECK:STDOUT: %pattern_type.loc8_22 => constants.%pattern_type.aa4 // CHECK:STDOUT: %.loc8_43.1 => constants.%.20a @@ -1149,9 +1149,11 @@ fn G() { // CHECK:STDOUT: %type.as.Copy.impl.Op: %type.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.Copy.impl.Op.bound: = bound_method %C, %type.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.ffe: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.f32: %T.as.Destroy.impl.Op.type.ffe = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.f32, @T.as.Destroy.impl.Op(%array_type) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.9e6: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.74c: %AggregateT.as_type.as.Destroy.impl.Op.type.9e6 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.74c, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1358,11 +1360,13 @@ fn G() { // CHECK:STDOUT: %.loc24_27.2: ref %array_type = temporary %.loc24_25.2, %.loc24_27.1 // CHECK:STDOUT: %.loc24_27.3: %array_type = bind_value %.loc24_27.2 // CHECK:STDOUT: %.loc24_48: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc24_27.2, constants.%T.as.Destroy.impl.Op.f32 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.f32, @T.as.Destroy.impl.Op(constants.%array_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc24_27: = bound_method %.loc24_27.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc24_27.4: %type_where = converted constants.%array_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc24_27.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.74c +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.74c, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc24_27: = bound_method %.loc24_27.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ea3 = addr_of %.loc24_27.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc24_27(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc24_27(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/aggregates.carbon b/toolchain/check/testdata/eval/aggregates.carbon index 0c36e9044759..92f94eb7472c 100644 --- a/toolchain/check/testdata/eval/aggregates.carbon +++ b/toolchain/check/testdata/eval/aggregates.carbon @@ -498,10 +498,10 @@ fn G(N:! i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %const: type = const_type %T [symbolic] +// CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %const.a1a: type = const_type %T [symbolic] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] -// CHECK:STDOUT: %tuple.type.4f2: type = tuple_type (%ptr.79f, %const) [symbolic] +// CHECK:STDOUT: %tuple.type.4f2: type = tuple_type (%ptr.79f131.1, %const.a1a) [symbolic] // CHECK:STDOUT: %require_complete.155: = require_complete_type %tuple.type.4f2 [symbolic] // CHECK:STDOUT: %pattern_type.973: type = pattern_type %tuple.type.4f2 [symbolic] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] @@ -514,12 +514,15 @@ fn G(N:! i32) { // CHECK:STDOUT: %pattern_type.035: type = pattern_type %array_type.ec2 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.daa: %type_where = facet_value %array_type.ec2, () [symbolic] // CHECK:STDOUT: %require_complete.b09: = require_complete_type %ptr.1a0 [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.b45: = lookup_impl_witness %array_type.ec2, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.226: %Destroy.type = facet_value %array_type.ec2, (%Destroy.lookup_impl_witness.b45) [symbolic] // CHECK:STDOUT: %.59f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.226 [symbolic] // CHECK:STDOUT: %impl.elem0.578: %.59f = impl_witness_access %Destroy.lookup_impl_witness.b45, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.73f: = specific_impl_function %impl.elem0.578, @Destroy.Op(%Destroy.facet.226) [symbolic] +// CHECK:STDOUT: %facet_value.6d7: %type_where = facet_value %struct_type.a, () [symbolic] // CHECK:STDOUT: %ptr.48a: type = ptr_type %struct_type.a [symbolic] // CHECK:STDOUT: %require_complete.86d: = require_complete_type %ptr.48a [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.b34: = lookup_impl_witness %struct_type.a, @Destroy [symbolic] @@ -527,6 +530,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %.aa5: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.90b [symbolic] // CHECK:STDOUT: %impl.elem0.d3d: %.aa5 = impl_witness_access %Destroy.lookup_impl_witness.b34, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.612: = specific_impl_function %impl.elem0.d3d, @Destroy.Op(%Destroy.facet.90b) [symbolic] +// CHECK:STDOUT: %facet_value.2b4: %type_where = facet_value %tuple.type.4f2, () [symbolic] // CHECK:STDOUT: %ptr.6cd: type = ptr_type %tuple.type.4f2 [symbolic] // CHECK:STDOUT: %require_complete.66e: = require_complete_type %ptr.6cd [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.a8a: = lookup_impl_witness %tuple.type.4f2, @Destroy [symbolic] @@ -555,6 +559,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %ptr.743: type = ptr_type %array_type.120 [symbolic] // CHECK:STDOUT: %require_complete.4c7: = require_complete_type %array_type.120 [symbolic] // CHECK:STDOUT: %pattern_type.aeb: type = pattern_type %array_type.120 [symbolic] +// CHECK:STDOUT: %facet_value.8b7: %type_where = facet_value %array_type.120, () [symbolic] // CHECK:STDOUT: %require_complete.9c4: = require_complete_type %ptr.743 [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.919: = lookup_impl_witness %array_type.120, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.69e: %Destroy.type = facet_value %array_type.120, (%Destroy.lookup_impl_witness.919) [symbolic] @@ -572,8 +577,8 @@ fn G(N:! i32) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ptr.loc6_12.2: type = ptr_type %T.loc4_6.1 [symbolic = %ptr.loc6_12.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %const.loc6_15.2: type = const_type %T.loc4_6.1 [symbolic = %const.loc6_15.2 (constants.%const)] +// CHECK:STDOUT: %ptr.loc6_12.2: type = ptr_type %T.loc4_6.1 [symbolic = %ptr.loc6_12.2 (constants.%ptr.79f131.1)] +// CHECK:STDOUT: %const.loc6_15.2: type = const_type %T.loc4_6.1 [symbolic = %const.loc6_15.2 (constants.%const.a1a)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc6_12.2, %const.loc6_15.2) [symbolic = %tuple.type (constants.%tuple.type.4f2)] // CHECK:STDOUT: %require_complete.loc6_22: = require_complete_type %tuple.type [symbolic = %require_complete.loc6_22 (constants.%require_complete.155)] // CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %tuple.type [symbolic = %pattern_type.loc6 (constants.%pattern_type.973)] @@ -583,24 +588,27 @@ fn G(N:! i32) { // CHECK:STDOUT: %array_type.loc8_20.2: type = array_type constants.%int_5, %T.loc4_6.1 [symbolic = %array_type.loc8_20.2 (constants.%array_type.ec2)] // CHECK:STDOUT: %require_complete.loc8_20: = require_complete_type %array_type.loc8_20.2 [symbolic = %require_complete.loc8_20 (constants.%require_complete.fe1)] // CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %array_type.loc8_20.2 [symbolic = %pattern_type.loc8 (constants.%pattern_type.035)] +// CHECK:STDOUT: %facet_value.loc8_3.2: %type_where = facet_value %array_type.loc8_20.2, () [symbolic = %facet_value.loc8_3.2 (constants.%facet_value.daa)] // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc8: = lookup_impl_witness %array_type.loc8_20.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc8 (constants.%Destroy.lookup_impl_witness.b45)] // CHECK:STDOUT: %Destroy.facet.loc8: %Destroy.type = facet_value %array_type.loc8_20.2, (%Destroy.lookup_impl_witness.loc8) [symbolic = %Destroy.facet.loc8 (constants.%Destroy.facet.226)] -// CHECK:STDOUT: %.loc8_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc8 [symbolic = %.loc8_3.2 (constants.%.59f)] -// CHECK:STDOUT: %impl.elem0.loc8_3.2: @F.%.loc8_3.2 (%.59f) = impl_witness_access %Destroy.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.578)] +// CHECK:STDOUT: %.loc8_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc8 [symbolic = %.loc8_3.3 (constants.%.59f)] +// CHECK:STDOUT: %impl.elem0.loc8_3.2: @F.%.loc8_3.3 (%.59f) = impl_witness_access %Destroy.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.578)] // CHECK:STDOUT: %specific_impl_fn.loc8_3.2: = specific_impl_function %impl.elem0.loc8_3.2, @Destroy.Op(%Destroy.facet.loc8) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.73f)] // CHECK:STDOUT: %ptr.loc8: type = ptr_type %array_type.loc8_20.2 [symbolic = %ptr.loc8 (constants.%ptr.1a0)] // CHECK:STDOUT: %require_complete.loc8_3: = require_complete_type %ptr.loc8 [symbolic = %require_complete.loc8_3 (constants.%require_complete.b09)] +// CHECK:STDOUT: %facet_value.loc7_3.2: %type_where = facet_value %struct_type.a.loc7_16.2, () [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.6d7)] // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc7: = lookup_impl_witness %struct_type.a.loc7_16.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc7 (constants.%Destroy.lookup_impl_witness.b34)] // CHECK:STDOUT: %Destroy.facet.loc7: %Destroy.type = facet_value %struct_type.a.loc7_16.2, (%Destroy.lookup_impl_witness.loc7) [symbolic = %Destroy.facet.loc7 (constants.%Destroy.facet.90b)] -// CHECK:STDOUT: %.loc7_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc7 [symbolic = %.loc7_3.2 (constants.%.aa5)] -// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3.2 (%.aa5) = impl_witness_access %Destroy.lookup_impl_witness.loc7, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.d3d)] +// CHECK:STDOUT: %.loc7_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc7 [symbolic = %.loc7_3.3 (constants.%.aa5)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3.3 (%.aa5) = impl_witness_access %Destroy.lookup_impl_witness.loc7, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.d3d)] // CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet.loc7) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.612)] // CHECK:STDOUT: %ptr.loc7: type = ptr_type %struct_type.a.loc7_16.2 [symbolic = %ptr.loc7 (constants.%ptr.48a)] // CHECK:STDOUT: %require_complete.loc7_3: = require_complete_type %ptr.loc7 [symbolic = %require_complete.loc7_3 (constants.%require_complete.86d)] +// CHECK:STDOUT: %facet_value.loc6_3.2: %type_where = facet_value %tuple.type, () [symbolic = %facet_value.loc6_3.2 (constants.%facet_value.2b4)] // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc6: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc6 (constants.%Destroy.lookup_impl_witness.a8a)] // CHECK:STDOUT: %Destroy.facet.loc6: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness.loc6) [symbolic = %Destroy.facet.loc6 (constants.%Destroy.facet.6c8)] -// CHECK:STDOUT: %.loc6_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc6 [symbolic = %.loc6_3.2 (constants.%.48c)] -// CHECK:STDOUT: %impl.elem0.loc6_3.2: @F.%.loc6_3.2 (%.48c) = impl_witness_access %Destroy.lookup_impl_witness.loc6, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.373)] +// CHECK:STDOUT: %.loc6_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc6 [symbolic = %.loc6_3.3 (constants.%.48c)] +// CHECK:STDOUT: %impl.elem0.loc6_3.2: @F.%.loc6_3.3 (%.48c) = impl_witness_access %Destroy.lookup_impl_witness.loc6, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.373)] // CHECK:STDOUT: %specific_impl_fn.loc6_3.2: = specific_impl_function %impl.elem0.loc6_3.2, @Destroy.Op(%Destroy.facet.loc6) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.129)] // CHECK:STDOUT: %ptr.loc6_3: type = ptr_type %tuple.type [symbolic = %ptr.loc6_3 (constants.%ptr.6cd)] // CHECK:STDOUT: %require_complete.loc6_3: = require_complete_type %ptr.loc6_3 [symbolic = %require_complete.loc6_3 (constants.%require_complete.66e)] @@ -614,9 +622,9 @@ fn G(N:! i32) { // CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.4f2) = var %u.var_patt // CHECK:STDOUT: %.loc6_22.1: type = splice_block %.loc6_22.3 [symbolic = %tuple.type (constants.%tuple.type.4f2)] { // CHECK:STDOUT: %T.ref.loc6_11: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_12.1: type = ptr_type %T.ref.loc6_11 [symbolic = %ptr.loc6_12.2 (constants.%ptr.79f)] +// CHECK:STDOUT: %ptr.loc6_12.1: type = ptr_type %T.ref.loc6_11 [symbolic = %ptr.loc6_12.2 (constants.%ptr.79f131.1)] // CHECK:STDOUT: %T.ref.loc6_21: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)] -// CHECK:STDOUT: %const.loc6_15.1: type = const_type %T.ref.loc6_21 [symbolic = %const.loc6_15.2 (constants.%const)] +// CHECK:STDOUT: %const.loc6_15.1: type = const_type %T.ref.loc6_21 [symbolic = %const.loc6_15.2 (constants.%const.a1a)] // CHECK:STDOUT: %.loc6_22.2: %tuple.type.24b = tuple_literal (%ptr.loc6_12.1, %const.loc6_15.1) // CHECK:STDOUT: %.loc6_22.3: type = converted %.loc6_22.2, constants.%tuple.type.4f2 [symbolic = %tuple.type (constants.%tuple.type.4f2)] // CHECK:STDOUT: } @@ -642,24 +650,30 @@ fn G(N:! i32) { // CHECK:STDOUT: %array_type.loc8_20.1: type = array_type %int_5, %T.ref.loc8 [symbolic = %array_type.loc8_20.2 (constants.%array_type.ec2)] // CHECK:STDOUT: } // CHECK:STDOUT: %w: ref @F.%array_type.loc8_20.2 (%array_type.ec2) = bind_name w, %w.var -// CHECK:STDOUT: %impl.elem0.loc8_3.1: @F.%.loc8_3.2 (%.59f) = impl_witness_access constants.%Destroy.lookup_impl_witness.b45, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.578)] +// CHECK:STDOUT: %facet_value.loc8_3.1: %type_where = facet_value constants.%array_type.ec2, () [symbolic = %facet_value.loc8_3.2 (constants.%facet_value.daa)] +// CHECK:STDOUT: %.loc8_3.1: %type_where = converted constants.%array_type.ec2, %facet_value.loc8_3.1 [symbolic = %facet_value.loc8_3.2 (constants.%facet_value.daa)] +// CHECK:STDOUT: %impl.elem0.loc8_3.1: @F.%.loc8_3.3 (%.59f) = impl_witness_access constants.%Destroy.lookup_impl_witness.b45, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.578)] // CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %w.var, %impl.elem0.loc8_3.1 // CHECK:STDOUT: %specific_impl_fn.loc8_3.1: = specific_impl_function %impl.elem0.loc8_3.1, @Destroy.Op(constants.%Destroy.facet.226) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.73f)] // CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %w.var, %specific_impl_fn.loc8_3.1 // CHECK:STDOUT: %addr.loc8: @F.%ptr.loc8 (%ptr.1a0) = addr_of %w.var -// CHECK:STDOUT: %.loc8_3.1: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3.2 (%.aa5) = impl_witness_access constants.%Destroy.lookup_impl_witness.b34, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.d3d)] +// CHECK:STDOUT: %.loc8_3.2: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) +// CHECK:STDOUT: %facet_value.loc7_3.1: %type_where = facet_value constants.%struct_type.a, () [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.6d7)] +// CHECK:STDOUT: %.loc7_3.1: %type_where = converted constants.%struct_type.a, %facet_value.loc7_3.1 [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.6d7)] +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3.3 (%.aa5) = impl_witness_access constants.%Destroy.lookup_impl_witness.b34, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.d3d)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7_3.1 // CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.90b) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.612)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 // CHECK:STDOUT: %addr.loc7: @F.%ptr.loc7 (%ptr.48a) = addr_of %v.var -// CHECK:STDOUT: %.loc7_3.1: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) -// CHECK:STDOUT: %impl.elem0.loc6_3.1: @F.%.loc6_3.2 (%.48c) = impl_witness_access constants.%Destroy.lookup_impl_witness.a8a, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.373)] +// CHECK:STDOUT: %.loc7_3.2: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) +// CHECK:STDOUT: %facet_value.loc6_3.1: %type_where = facet_value constants.%tuple.type.4f2, () [symbolic = %facet_value.loc6_3.2 (constants.%facet_value.2b4)] +// CHECK:STDOUT: %.loc6_3.1: %type_where = converted constants.%tuple.type.4f2, %facet_value.loc6_3.1 [symbolic = %facet_value.loc6_3.2 (constants.%facet_value.2b4)] +// CHECK:STDOUT: %impl.elem0.loc6_3.1: @F.%.loc6_3.3 (%.48c) = impl_witness_access constants.%Destroy.lookup_impl_witness.a8a, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.373)] // CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %u.var, %impl.elem0.loc6_3.1 // CHECK:STDOUT: %specific_impl_fn.loc6_3.1: = specific_impl_function %impl.elem0.loc6_3.1, @Destroy.Op(constants.%Destroy.facet.6c8) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.129)] // CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %u.var, %specific_impl_fn.loc6_3.1 // CHECK:STDOUT: %addr.loc6: @F.%ptr.loc6_3 (%ptr.6cd) = addr_of %u.var -// CHECK:STDOUT: %.loc6_3.1: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6) +// CHECK:STDOUT: %.loc6_3.2: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -674,10 +688,11 @@ fn G(N:! i32) { // CHECK:STDOUT: %array_type.loc14_22.2: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc14_21.2, constants.%i32 [symbolic = %array_type.loc14_22.2 (constants.%array_type.120)] // CHECK:STDOUT: %require_complete.loc14_22: = require_complete_type %array_type.loc14_22.2 [symbolic = %require_complete.loc14_22 (constants.%require_complete.4c7)] // CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc14_22.2 [symbolic = %pattern_type (constants.%pattern_type.aeb)] +// CHECK:STDOUT: %facet_value.loc14_3.2: %type_where = facet_value %array_type.loc14_22.2, () [symbolic = %facet_value.loc14_3.2 (constants.%facet_value.8b7)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.loc14_22.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.919)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.loc14_22.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.69e)] -// CHECK:STDOUT: %.loc14_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc14_3.2 (constants.%.83d)] -// CHECK:STDOUT: %impl.elem0.loc14_3.2: @G.%.loc14_3.2 (%.83d) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.8b9)] +// CHECK:STDOUT: %.loc14_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc14_3.3 (constants.%.83d)] +// CHECK:STDOUT: %impl.elem0.loc14_3.2: @G.%.loc14_3.3 (%.83d) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.8b9)] // CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.0a7)] // CHECK:STDOUT: %ptr: type = ptr_type %array_type.loc14_22.2 [symbolic = %ptr (constants.%ptr.743)] // CHECK:STDOUT: %require_complete.loc14_3: = require_complete_type %ptr [symbolic = %require_complete.loc14_3 (constants.%require_complete.9c4)] @@ -703,12 +718,14 @@ fn G(N:! i32) { // CHECK:STDOUT: %array_type.loc14_22.1: type = array_type %.loc14_21.2, %i32.loc14 [symbolic = %array_type.loc14_22.2 (constants.%array_type.120)] // CHECK:STDOUT: } // CHECK:STDOUT: %k: ref @G.%array_type.loc14_22.2 (%array_type.120) = bind_name k, %k.var -// CHECK:STDOUT: %impl.elem0.loc14_3.1: @G.%.loc14_3.2 (%.83d) = impl_witness_access constants.%Destroy.lookup_impl_witness.919, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.8b9)] +// CHECK:STDOUT: %facet_value.loc14_3.1: %type_where = facet_value constants.%array_type.120, () [symbolic = %facet_value.loc14_3.2 (constants.%facet_value.8b7)] +// CHECK:STDOUT: %.loc14_3.1: %type_where = converted constants.%array_type.120, %facet_value.loc14_3.1 [symbolic = %facet_value.loc14_3.2 (constants.%facet_value.8b7)] +// CHECK:STDOUT: %impl.elem0.loc14_3.1: @G.%.loc14_3.3 (%.83d) = impl_witness_access constants.%Destroy.lookup_impl_witness.919, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.8b9)] // CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %k.var, %impl.elem0.loc14_3.1 // CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.Op(constants.%Destroy.facet.69e) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.0a7)] // CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %k.var, %specific_impl_fn.loc14_3.1 // CHECK:STDOUT: %addr: @G.%ptr (%ptr.743) = addr_of %k.var -// CHECK:STDOUT: %.loc14_3.1: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr) +// CHECK:STDOUT: %.loc14_3.2: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/access.carbon b/toolchain/check/testdata/facet/access.carbon index 589223c92c5e..0ee0bb11854a 100644 --- a/toolchain/check/testdata/facet/access.carbon +++ b/toolchain/check/testdata/facet/access.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -600,7 +600,7 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 80ee07af7174..c1f5acbcd0cf 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -4,7 +4,7 @@ // // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -97,19 +97,19 @@ fn F() { // CHECK:STDOUT: %facet_type.c95: type = facet_type <@Empty & @A> [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound.49f: = bound_method %facet_type.c95, %type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %facet_type.b5f: type = facet_type <@Empty & @A & @B> [concrete] -// CHECK:STDOUT: %T.92d: %facet_type.b5f = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %facet_type.b5f = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.001: type = pattern_type %facet_type.b5f [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.92d [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %pattern_type.e02: type = pattern_type %T.as_type [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.359: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.92d, @A [symbolic] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T, @A [symbolic] // CHECK:STDOUT: %A.facet.d1f: %A.type = facet_value %T.as_type, (%A.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %.b2b: type = fn_type_with_self_type %A.AA.type, %A.facet.d1f [symbolic] // CHECK:STDOUT: %impl.elem0.d41: %.b2b = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.e57: = specific_impl_function %impl.elem0.d41, @A.AA(%A.facet.d1f) [symbolic] -// CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.92d, @B [symbolic] +// CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T, @B [symbolic] // CHECK:STDOUT: %B.facet.434: %B.type = facet_value %T.as_type, (%B.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %.1ce: type = fn_type_with_self_type %B.BB.type, %B.facet.434 [symbolic] // CHECK:STDOUT: %impl.elem0.629: %.1ce = impl_witness_access %B.lookup_impl_witness, element0 [symbolic] @@ -132,8 +132,8 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -191,10 +191,10 @@ fn F() { // CHECK:STDOUT: %.loc33_20.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_20 [concrete = constants.%facet_type.b5f] // CHECK:STDOUT: %.loc33_20.3: type = converted %type.as.BitAndWith.impl.Op.call.loc33_20, %.loc33_20.2 [concrete = constants.%facet_type.b5f] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc33_6.2: %facet_type.b5f = bind_symbolic_name T, 0 [symbolic = %T.loc33_6.1 (constants.%T.92d)] +// CHECK:STDOUT: %T.loc33_6.2: %facet_type.b5f = bind_symbolic_name T, 0 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %t.param: @G.%T.as_type.loc33_28.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc33_28.1: type = splice_block %.loc33_28.2 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc33: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T.92d)] +// CHECK:STDOUT: %T.ref.loc33: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc33_28.2: type = facet_access_type %T.ref.loc33 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc33_28.2: type = converted %T.ref.loc33, %T.as_type.loc33_28.2 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: } @@ -307,7 +307,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(%T.loc33_6.2: %facet_type.b5f) { -// CHECK:STDOUT: %T.loc33_6.1: %facet_type.b5f = bind_symbolic_name T, 0 [symbolic = %T.loc33_6.1 (constants.%T.92d)] +// CHECK:STDOUT: %T.loc33_6.1: %facet_type.b5f = bind_symbolic_name T, 0 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc33_28.1: type = facet_access_type %T.loc33_6.1 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc33_28.1 [symbolic = %pattern_type (constants.%pattern_type.e02)] // CHECK:STDOUT: @@ -328,45 +328,45 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref.loc34: @G.%T.as_type.loc33_28.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %AA.ref.loc34: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] -// CHECK:STDOUT: %T.as_type.loc34: type = facet_access_type constants.%T.92d [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc34_4.1: type = converted constants.%T.92d, %T.as_type.loc34 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc34: type = facet_access_type constants.%T [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc34_4.1: type = converted constants.%T, %T.as_type.loc34 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34_4.2 (%.b2b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.d41)] // CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @A.AA(constants.%A.facet.d1f) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.e57)] // CHECK:STDOUT: %.loc34_8: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() // CHECK:STDOUT: %t.ref.loc35: @G.%T.as_type.loc33_28.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %BB.ref.loc35: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] -// CHECK:STDOUT: %T.as_type.loc35: type = facet_access_type constants.%T.92d [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc35_4.1: type = converted constants.%T.92d, %T.as_type.loc35 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc35: type = facet_access_type constants.%T [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc35_4.1: type = converted constants.%T, %T.as_type.loc35 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem0.loc35_4.1: @G.%.loc35_4.2 (%.1ce) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.629)] // CHECK:STDOUT: %specific_impl_fn.loc35_4.1: = specific_impl_function %impl.elem0.loc35_4.1, @B.BB(constants.%B.facet.434) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.c90)] // CHECK:STDOUT: %.loc35_8: init %empty_tuple.type = call %specific_impl_fn.loc35_4.1() -// CHECK:STDOUT: %T.ref.loc37: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T.92d)] +// CHECK:STDOUT: %T.ref.loc37: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %AA.ref.loc37: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] // CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc37_4: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34_4.2 (%.b2b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.d41)] // CHECK:STDOUT: %specific_impl_fn.loc37: = specific_impl_function %impl.elem0.loc37, @A.AA(constants.%A.facet.d1f) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.e57)] // CHECK:STDOUT: %.loc37_8: init %empty_tuple.type = call %specific_impl_fn.loc37() -// CHECK:STDOUT: %T.ref.loc38: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T.92d)] +// CHECK:STDOUT: %T.ref.loc38: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %BB.ref.loc38: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] // CHECK:STDOUT: %T.as_type.loc38: type = facet_access_type %T.ref.loc38 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc38_4: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem0.loc38: @G.%.loc35_4.2 (%.1ce) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.629)] // CHECK:STDOUT: %specific_impl_fn.loc38: = specific_impl_function %impl.elem0.loc38, @B.BB(constants.%B.facet.434) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.c90)] // CHECK:STDOUT: %.loc38_8: init %empty_tuple.type = call %specific_impl_fn.loc38() -// CHECK:STDOUT: %T.ref.loc40: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T.92d)] +// CHECK:STDOUT: %T.ref.loc40: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %A.ref.loc40: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %AA.ref.loc40: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] -// CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type constants.%T.92d [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type constants.%T [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.facet.loc40: %A.type = facet_value %T.as_type.loc40, (constants.%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.d1f)] // CHECK:STDOUT: %.loc40_4: %A.type = converted %T.ref.loc40, %A.facet.loc40 [symbolic = %A.facet.loc34 (constants.%A.facet.d1f)] // CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34_4.2 (%.b2b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.d41)] // CHECK:STDOUT: %specific_impl_fn.loc40: = specific_impl_function %impl.elem0.loc40, @A.AA(constants.%A.facet.d1f) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.e57)] // CHECK:STDOUT: %.loc40_12: init %empty_tuple.type = call %specific_impl_fn.loc40() -// CHECK:STDOUT: %T.ref.loc41: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T.92d)] +// CHECK:STDOUT: %T.ref.loc41: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %B.ref.loc41: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: %BB.ref.loc41: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] -// CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type constants.%T.92d [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type constants.%T [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %B.facet.loc41: %B.type = facet_value %T.as_type.loc41, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.434)] // CHECK:STDOUT: %.loc41_4: %B.type = converted %T.ref.loc41, %B.facet.loc41 [symbolic = %B.facet.loc35 (constants.%B.facet.434)] // CHECK:STDOUT: %impl.elem0.loc41: @G.%.loc35_4.2 (%.1ce) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.629)] @@ -406,8 +406,8 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @B.BB(constants.%B.facet.c0b) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%T.92d) { -// CHECK:STDOUT: %T.loc33_6.1 => constants.%T.92d +// CHECK:STDOUT: specific @G(constants.%T) { +// CHECK:STDOUT: %T.loc33_6.1 => constants.%T // CHECK:STDOUT: %T.as_type.loc33_28.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e02 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/combine.carbon b/toolchain/check/testdata/facet/combine.carbon index 77569b75b3f4..722c0ca55eb2 100644 --- a/toolchain/check/testdata/facet/combine.carbon +++ b/toolchain/check/testdata/facet/combine.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon index 084e75b455b2..a6eed65cde54 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon @@ -30,9 +30,9 @@ fn F() { // CHECK:STDOUT: %Self.611: %Animal.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %T.611: %Animal.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %Animal.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3c3: type = pattern_type %Animal.type [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.611 [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %pattern_type.29d: type = pattern_type %T.as_type [symbolic] // CHECK:STDOUT: %WalkAnimal.type: type = fn_type @WalkAnimal [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -85,10 +85,10 @@ fn F() { // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc17_15.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T.611)] +// CHECK:STDOUT: %T.loc17_15.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T)] // CHECK:STDOUT: %a.param: @WalkAnimal.%T.as_type.loc17_30.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc17_30.1: type = splice_block %.loc17_30.2 [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_15.2 [symbolic = %T.loc17_15.1 (constants.%T.611)] +// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_15.2 [symbolic = %T.loc17_15.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc17_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc17_30.2: type = converted %T.ref, %T.as_type.loc17_30.2 [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } @@ -146,7 +146,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @WalkAnimal(%T.loc17_15.2: %Animal.type) { -// CHECK:STDOUT: %T.loc17_15.1: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T.611)] +// CHECK:STDOUT: %T.loc17_15.1: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc17_30.1: type = facet_access_type %T.loc17_15.1 [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc17_30.1 [symbolic = %pattern_type (constants.%pattern_type.29d)] // CHECK:STDOUT: @@ -183,8 +183,8 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WalkAnimal(constants.%T.611) { -// CHECK:STDOUT: %T.loc17_15.1 => constants.%T.611 +// CHECK:STDOUT: specific @WalkAnimal(constants.%T) { +// CHECK:STDOUT: %T.loc17_15.1 => constants.%T // CHECK:STDOUT: %T.as_type.loc17_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.29d // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon index b87b3d6db4e5..70b2cc42d82f 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon @@ -156,8 +156,8 @@ fn B() { // CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U, @Generic, @Generic(%T) [symbolic] // CHECK:STDOUT: %Generic.facet.57d: %Generic.type.2db63e.2 = facet_value %U.as_type, (%Generic.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %.e73: type = fn_type_with_self_type %Generic.F.type.f439a9.2, %Generic.facet.57d [symbolic] -// CHECK:STDOUT: %impl.elem0: %.e73 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Generic.F(%T, %Generic.facet.57d) [symbolic] +// CHECK:STDOUT: %impl.elem0.fcf: %.e73 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.707: = specific_impl_function %impl.elem0.fcf, @Generic.F(%T, %Generic.facet.57d) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %ImplsGeneric.val: %ImplsGeneric = struct_value () [concrete] @@ -355,8 +355,8 @@ fn B() { // CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%T.loc15_22.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.f439a9.2)] // CHECK:STDOUT: %Generic.facet: @CallGenericMethod.%Generic.type.loc15_45.1 (%Generic.type.2db63e.2) = facet_value %U.as_type.loc15_51.1, (%Generic.lookup_impl_witness) [symbolic = %Generic.facet (constants.%Generic.facet.57d)] // CHECK:STDOUT: %.loc16_4.3: type = fn_type_with_self_type %Generic.F.type, %Generic.facet [symbolic = %.loc16_4.3 (constants.%.e73)] -// CHECK:STDOUT: %impl.elem0.loc16_4.2: @CallGenericMethod.%.loc16_4.3 (%.e73) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @Generic.F(%T.loc15_22.1, %Generic.facet) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %impl.elem0.loc16_4.2: @CallGenericMethod.%.loc16_4.3 (%.e73) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.fcf)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @Generic.F(%T.loc15_22.1, %Generic.facet) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.707)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @CallGenericMethod.%U.as_type.loc15_51.1 (%U.as_type), %s.param: @CallGenericMethod.%T.loc15_22.1 (%T)) { // CHECK:STDOUT: !entry: @@ -365,8 +365,8 @@ fn B() { // CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.0fd877.2) = name_ref F, %.loc16_4.1 [symbolic = %assoc0 (constants.%assoc0.2966cb.2)] // CHECK:STDOUT: %U.as_type.loc16: type = facet_access_type %U.ref.loc16 [symbolic = %U.as_type.loc15_51.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc16_4.2: type = converted %U.ref.loc16, %U.as_type.loc16 [symbolic = %U.as_type.loc15_51.1 (constants.%U.as_type)] -// CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.e73) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @Generic.F(constants.%T, constants.%Generic.facet.57d) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.e73) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.fcf)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @Generic.F(constants.%T, constants.%Generic.facet.57d) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.707)] // CHECK:STDOUT: %.loc16_7: init %empty_tuple.type = call %specific_impl_fn.loc16_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_type_to_facet_value.carbon b/toolchain/check/testdata/facet/convert_facet_type_to_facet_value.carbon index 0df7f5e2f15c..feefd8663e06 100644 --- a/toolchain/check/testdata/facet/convert_facet_type_to_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_type_to_facet_value.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_facet_value.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_facet_value.carbon index cea8c33b2804..15ca1d2382b7 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_facet_value.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon index 3dedd505617f..1f7783ba2435 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon @@ -4,7 +4,7 @@ // // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -135,8 +135,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -324,8 +324,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -541,8 +541,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon index 01fd0bf9a473..35bccef836e5 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon @@ -32,9 +32,9 @@ fn F() { // CHECK:STDOUT: %Self.611: %Animal.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %T.611: %Animal.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %Animal.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3c3: type = pattern_type %Animal.type [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.611 [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %pattern_type.29d: type = pattern_type %T.as_type [symbolic] // CHECK:STDOUT: %FeedAnimal.type: type = fn_type @FeedAnimal [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -42,7 +42,7 @@ fn F() { // CHECK:STDOUT: %require_complete.210: = require_complete_type %T.as_type [symbolic] // CHECK:STDOUT: %HandleAnimal.type: type = fn_type @HandleAnimal [concrete] // CHECK:STDOUT: %HandleAnimal: %HandleAnimal.type = struct_value () [concrete] -// CHECK:STDOUT: %FeedAnimal.specific_fn.a33: = specific_function %FeedAnimal, @FeedAnimal(%T.611) [symbolic] +// CHECK:STDOUT: %FeedAnimal.specific_fn.a33: = specific_function %FeedAnimal, @FeedAnimal(%T) [symbolic] // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] @@ -92,10 +92,10 @@ fn F() { // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc17_15.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T.611)] +// CHECK:STDOUT: %T.loc17_15.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T)] // CHECK:STDOUT: %a.param: @FeedAnimal.%T.as_type.loc17_30.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc17_30.1: type = splice_block %.loc17_30.2 [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_15.2 [symbolic = %T.loc17_15.1 (constants.%T.611)] +// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_15.2 [symbolic = %T.loc17_15.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc17_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc17_30.2: type = converted %T.ref, %T.as_type.loc17_30.2 [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } @@ -110,10 +110,10 @@ fn F() { // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc19_17.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc19_17.1 (constants.%T.611)] +// CHECK:STDOUT: %T.loc19_17.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc19_17.1 (constants.%T)] // CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc19_32.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc19_32.1: type = splice_block %.loc19_32.2 [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc19_17.2 [symbolic = %T.loc19_17.1 (constants.%T.611)] +// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc19_17.2 [symbolic = %T.loc19_17.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc19_32.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc19_32.2: type = converted %T.ref, %T.as_type.loc19_32.2 [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @FeedAnimal(%T.loc17_15.2: %Animal.type) { -// CHECK:STDOUT: %T.loc17_15.1: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T.611)] +// CHECK:STDOUT: %T.loc17_15.1: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc17_30.1: type = facet_access_type %T.loc17_15.1 [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc17_30.1 [symbolic = %pattern_type (constants.%pattern_type.29d)] // CHECK:STDOUT: @@ -185,7 +185,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @HandleAnimal(%T.loc19_17.2: %Animal.type) { -// CHECK:STDOUT: %T.loc19_17.1: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc19_17.1 (constants.%T.611)] +// CHECK:STDOUT: %T.loc19_17.1: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc19_17.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc19_32.1: type = facet_access_type %T.loc19_17.1 [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc19_32.1 [symbolic = %pattern_type (constants.%pattern_type.29d)] // CHECK:STDOUT: @@ -197,9 +197,9 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %FeedAnimal.ref: %FeedAnimal.type = name_ref FeedAnimal, file.%FeedAnimal.decl [concrete = constants.%FeedAnimal] // CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc19_32.1 (%T.as_type) = name_ref a, %a -// CHECK:STDOUT: %.loc19_49.1: %Animal.type = converted constants.%T.as_type, constants.%T.611 [symbolic = %T.loc19_17.1 (constants.%T.611)] -// CHECK:STDOUT: %.loc19_49.2: %Animal.type = converted constants.%T.as_type, constants.%T.611 [symbolic = %T.loc19_17.1 (constants.%T.611)] -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_37.1: = specific_function %FeedAnimal.ref, @FeedAnimal(constants.%T.611) [symbolic = %FeedAnimal.specific_fn.loc19_37.2 (constants.%FeedAnimal.specific_fn.a33)] +// CHECK:STDOUT: %.loc19_49.1: %Animal.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc19_17.1 (constants.%T)] +// CHECK:STDOUT: %.loc19_49.2: %Animal.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc19_17.1 (constants.%T)] +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_37.1: = specific_function %FeedAnimal.ref, @FeedAnimal(constants.%T) [symbolic = %FeedAnimal.specific_fn.loc19_37.2 (constants.%FeedAnimal.specific_fn.a33)] // CHECK:STDOUT: %FeedAnimal.call: init %empty_tuple.type = call %FeedAnimal.specific_fn.loc19_37.1(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -229,8 +229,8 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @FeedAnimal(constants.%T.611) { -// CHECK:STDOUT: %T.loc17_15.1 => constants.%T.611 +// CHECK:STDOUT: specific @FeedAnimal(constants.%T) { +// CHECK:STDOUT: %T.loc17_15.1 => constants.%T // CHECK:STDOUT: %T.as_type.loc17_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.29d // CHECK:STDOUT: @@ -238,8 +238,8 @@ fn F() { // CHECK:STDOUT: %require_complete => constants.%require_complete.210 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HandleAnimal(constants.%T.611) { -// CHECK:STDOUT: %T.loc19_17.1 => constants.%T.611 +// CHECK:STDOUT: specific @HandleAnimal(constants.%T) { +// CHECK:STDOUT: %T.loc19_17.1 => constants.%T // CHECK:STDOUT: %T.as_type.loc19_32.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.29d // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/early_rewrites.carbon b/toolchain/check/testdata/facet/early_rewrites.carbon index 0d19e5a0bc5e..a80cdc429f86 100644 --- a/toolchain/check/testdata/facet/early_rewrites.carbon +++ b/toolchain/check/testdata/facet/early_rewrites.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/facet_assoc_const.carbon b/toolchain/check/testdata/facet/facet_assoc_const.carbon index d927edee4101..f43eb1dac735 100644 --- a/toolchain/check/testdata/facet/facet_assoc_const.carbon +++ b/toolchain/check/testdata/facet/facet_assoc_const.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon index 36bfc647282e..dfa253ed4397 100644 --- a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon +++ b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon @@ -47,18 +47,18 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %tuple.type: type = tuple_type (type) [concrete] -// CHECK:STDOUT: %T.6eb: %tuple.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f1e: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %HoldsType.type: type = generic_class_type @HoldsType [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType.cc9: type = class_type @HoldsType, @HoldsType(%T.6eb) [symbolic] +// CHECK:STDOUT: %HoldsType.cc9: type = class_type @HoldsType, @HoldsType(%T) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.cc4: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T.6eb) [symbolic] +// CHECK:STDOUT: %Destroy.impl_witness.cc4: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %ptr.47e: type = ptr_type %HoldsType.cc9 [symbolic] // CHECK:STDOUT: %pattern_type.c39: type = pattern_type %ptr.47e [symbolic] -// CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op.type: type = fn_type @HoldsType.as.Destroy.impl.Op, @HoldsType.as.Destroy.impl(%T.6eb) [symbolic] +// CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op.type: type = fn_type @HoldsType.as.Destroy.impl.Op, @HoldsType.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %HoldsType.as.Destroy.impl.Op: %HoldsType.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -86,7 +86,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b66 = facet_value %RuntimeConvertFrom, (%ImplicitAs.impl_witness) [concrete] // CHECK:STDOUT: %RuntimeConvertTo.val: %RuntimeConvertTo = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %tuple.elem0: type = tuple_access %T.6eb, element0 [symbolic] +// CHECK:STDOUT: %tuple.elem0: type = tuple_access %T, element0 [symbolic] // CHECK:STDOUT: %A: %tuple.elem0 = bind_symbolic_name A, 1 [symbolic] // CHECK:STDOUT: %pattern_type.08e: type = pattern_type %tuple.elem0 [symbolic] // CHECK:STDOUT: %pattern_type.ec6: type = pattern_type %HoldsType.cc9 [symbolic] @@ -133,7 +133,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %.loc17_28.2: %tuple.type = tuple_literal (type) // CHECK:STDOUT: %.loc17_28.3: type = converted %.loc17_28.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc17_17.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_17.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.loc17_17.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeConvertFrom.decl: type = class_decl @RuntimeConvertFrom [concrete = constants.%RuntimeConvertFrom] {} {} // CHECK:STDOUT: %RuntimeConvertTo.decl: type = class_decl @RuntimeConvertTo [concrete = constants.%RuntimeConvertTo] {} {} @@ -157,10 +157,10 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %.loc27_17.2: %tuple.type = tuple_literal (type) // CHECK:STDOUT: %.loc27_17.3: type = converted %.loc27_17.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc27_6.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc27_6.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.loc27_6.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc27_6.1 (constants.%T)] // CHECK:STDOUT: %.loc27_25: type = splice_block %tuple.elem0.loc27_25.2 [symbolic = %tuple.elem0.loc27_25.1 (constants.%tuple.elem0)] { // CHECK:STDOUT: %.Self.1: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %T.ref.loc27_24: %tuple.type = name_ref T, %T.loc27_6.2 [symbolic = %T.loc27_6.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.ref.loc27_24: %tuple.type = name_ref T, %T.loc27_6.2 [symbolic = %T.loc27_6.1 (constants.%T)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc27_25.2: type = tuple_access %T.ref.loc27_24, element0 [symbolic = %tuple.elem0.loc27_25.1 (constants.%tuple.elem0)] // CHECK:STDOUT: } @@ -168,8 +168,8 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %x.param: @F.%HoldsType.loc27_43.1 (%HoldsType.cc9) = value_param call_param0 // CHECK:STDOUT: %.loc27_43: type = splice_block %HoldsType.loc27_43.2 [symbolic = %HoldsType.loc27_43.1 (constants.%HoldsType.cc9)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc27_42: %tuple.type = name_ref T, %T.loc27_6.2 [symbolic = %T.loc27_6.1 (constants.%T.6eb)] -// CHECK:STDOUT: %HoldsType.loc27_43.2: type = class_type @HoldsType, @HoldsType(constants.%T.6eb) [symbolic = %HoldsType.loc27_43.1 (constants.%HoldsType.cc9)] +// CHECK:STDOUT: %T.ref.loc27_42: %tuple.type = name_ref T, %T.loc27_6.2 [symbolic = %T.loc27_6.1 (constants.%T)] +// CHECK:STDOUT: %HoldsType.loc27_43.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc27_43.1 (constants.%HoldsType.cc9)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%HoldsType.loc27_43.1 (%HoldsType.cc9) = bind_name x, %x.param // CHECK:STDOUT: } @@ -191,7 +191,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @HoldsType.as.Destroy.impl(@HoldsType.%T.loc17_17.2: %tuple.type) { -// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.6eb)] +// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T) [symbolic = %HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness @HoldsType.%Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.cc4)] // CHECK:STDOUT: @@ -207,7 +207,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @HoldsType.as.Destroy.impl.Op.%ptr (%ptr.47e) = value_param call_param0 // CHECK:STDOUT: %.loc17_31.2: type = splice_block %Self.ref [symbolic = %HoldsType (constants.%HoldsType.cc9)] { -// CHECK:STDOUT: %.loc17_31.3: type = specific_constant constants.%HoldsType.cc9, @HoldsType(constants.%T.6eb) [symbolic = %HoldsType (constants.%HoldsType.cc9)] +// CHECK:STDOUT: %.loc17_31.3: type = specific_constant constants.%HoldsType.cc9, @HoldsType(constants.%T) [symbolic = %HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc17_31.3 [symbolic = %HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @HoldsType.as.Destroy.impl.Op.%ptr (%ptr.47e) = bind_name self, %self.param @@ -273,7 +273,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc17_17.2: %tuple.type) { -// CHECK:STDOUT: %T.loc17_17.1: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_17.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.loc17_17.1: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_17.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -281,7 +281,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%HoldsType.cc9 [symbolic = @HoldsType.as.Destroy.impl.%HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: impl_decl @HoldsType.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@HoldsType.as.Destroy.impl.%HoldsType.as.Destroy.impl.Op.decl), @HoldsType.as.Destroy.impl [concrete] -// CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(constants.%T.6eb) [symbolic = @HoldsType.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.cc4)] +// CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @HoldsType.as.Destroy.impl(constants.%T) [symbolic = @HoldsType.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.cc4)] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: @@ -315,7 +315,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @HoldsType.as.Destroy.impl.Op(@HoldsType.%T.loc17_17.2: %tuple.type) { -// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.6eb)] +// CHECK:STDOUT: %T: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T) [symbolic = %HoldsType (constants.%HoldsType.cc9)] // CHECK:STDOUT: %ptr: type = ptr_type %HoldsType [symbolic = %ptr (constants.%ptr.47e)] // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.c39)] @@ -338,7 +338,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc27_6.2: %tuple.type, %A.loc27_20.2: @F.%tuple.elem0.loc27_25.1 (%tuple.elem0)) { -// CHECK:STDOUT: %T.loc27_6.1: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc27_6.1 (constants.%T.6eb)] +// CHECK:STDOUT: %T.loc27_6.1: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc27_6.1 (constants.%T)] // CHECK:STDOUT: %tuple.elem0.loc27_25.1: type = tuple_access %T.loc27_6.1, element0 [symbolic = %tuple.elem0.loc27_25.1 (constants.%tuple.elem0)] // CHECK:STDOUT: %A.loc27_20.1: @F.%tuple.elem0.loc27_25.1 (%tuple.elem0) = bind_symbolic_name A, 1 [symbolic = %A.loc27_20.1 (constants.%A)] // CHECK:STDOUT: %pattern_type.loc27_20: type = pattern_type %tuple.elem0.loc27_25.1 [symbolic = %pattern_type.loc27_20 (constants.%pattern_type.08e)] @@ -392,27 +392,27 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T.6eb) { -// CHECK:STDOUT: %T.loc17_17.1 => constants.%T.6eb +// CHECK:STDOUT: specific @HoldsType(constants.%T) { +// CHECK:STDOUT: %T.loc17_17.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl(constants.%T.6eb) { -// CHECK:STDOUT: %T => constants.%T.6eb +// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl(constants.%T) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HoldsType => constants.%HoldsType.cc9 // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.cc4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl.Op(constants.%T.6eb) { -// CHECK:STDOUT: %T => constants.%T.6eb +// CHECK:STDOUT: specific @HoldsType.as.Destroy.impl.Op(constants.%T) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HoldsType => constants.%HoldsType.cc9 // CHECK:STDOUT: %ptr => constants.%ptr.47e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.6eb, constants.%A) { -// CHECK:STDOUT: %T.loc27_6.1 => constants.%T.6eb +// CHECK:STDOUT: specific @F(constants.%T, constants.%A) { +// CHECK:STDOUT: %T.loc27_6.1 => constants.%T // CHECK:STDOUT: %tuple.elem0.loc27_25.1 => constants.%tuple.elem0 // CHECK:STDOUT: %A.loc27_20.1 => constants.%A // CHECK:STDOUT: %pattern_type.loc27_20 => constants.%pattern_type.08e diff --git a/toolchain/check/testdata/facet/fail_incomplete.carbon b/toolchain/check/testdata/facet/fail_incomplete.carbon index fde35b3898a1..defe4ade5d07 100644 --- a/toolchain/check/testdata/facet/fail_incomplete.carbon +++ b/toolchain/check/testdata/facet/fail_incomplete.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/named_constant.carbon b/toolchain/check/testdata/facet/named_constant.carbon index 64ad314c7c8f..1eb101b0d3b5 100644 --- a/toolchain/check/testdata/facet/named_constant.carbon +++ b/toolchain/check/testdata/facet/named_constant.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/nested_facet_types.carbon b/toolchain/check/testdata/facet/nested_facet_types.carbon index ce6a08825e14..0c296ac3325f 100644 --- a/toolchain/check/testdata/facet/nested_facet_types.carbon +++ b/toolchain/check/testdata/facet/nested_facet_types.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/runtime_value.carbon b/toolchain/check/testdata/facet/runtime_value.carbon index bba27fd830b2..c79c0101a4d1 100644 --- a/toolchain/check/testdata/facet/runtime_value.carbon +++ b/toolchain/check/testdata/facet/runtime_value.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/validate_impl_constraints.carbon b/toolchain/check/testdata/facet/validate_impl_constraints.carbon index 495fc0c0d092..b40333d26da9 100644 --- a/toolchain/check/testdata/facet/validate_impl_constraints.carbon +++ b/toolchain/check/testdata/facet/validate_impl_constraints.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/facet/validate_rewrite_constraints.carbon b/toolchain/check/testdata/facet/validate_rewrite_constraints.carbon index 31a5c709d896..ca340f950be4 100644 --- a/toolchain/check/testdata/facet/validate_rewrite_constraints.carbon +++ b/toolchain/check/testdata/facet/validate_rewrite_constraints.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/for/basic.carbon b/toolchain/check/testdata/for/basic.carbon index fe2adea0836b..6c0c5443f4d5 100644 --- a/toolchain/check/testdata/for/basic.carbon +++ b/toolchain/check/testdata/for/basic.carbon @@ -98,8 +98,10 @@ fn Run() { // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.5e3, @Optional.HasValue(%Copy.facet.d65) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.1d7, @Optional.Get(%Copy.facet.d65) [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.type.6cb: type = fn_type @Optional.as.Destroy.impl.Op, @Optional.as.Destroy.impl(%Copy.facet.d65) [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.30f: %Optional.as.Destroy.impl.Op.type.6cb = struct_value () [concrete] // CHECK:STDOUT: %ptr.17e: type = ptr_type %Optional.68c [concrete] @@ -178,21 +180,25 @@ fn Run() { // CHECK:STDOUT: !for.done: // CHECK:STDOUT: %AfterLoop.ref: %AfterLoop.type = name_ref AfterLoop, file.%AfterLoop.decl [concrete = constants.%AfterLoop] // CHECK:STDOUT: %AfterLoop.call: init %empty_tuple.type = call %AfterLoop.ref() -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18_35.1: = bound_method %.loc18_35.10, constants.%T.as.Destroy.impl.Op.daf +// CHECK:STDOUT: %facet_value.loc18_35.1: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_35.12: %type_where = converted constants.%empty_tuple.type, %facet_value.loc18_35.1 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc18_35.1: = bound_method %.loc18_35.10, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc18_35.5: = bound_method %.loc18_35.10, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc18_35.5: = bound_method %.loc18_35.10, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18_35.2: %ptr.843 = addr_of %.loc18_35.10 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18_35.1: init %empty_tuple.type = call %bound_method.loc18_35.5(%addr.loc18_35.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc18_35.1: init %empty_tuple.type = call %bound_method.loc18_35.5(%addr.loc18_35.2) // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.bound: = bound_method %.loc18_35.2, constants.%Optional.as.Destroy.impl.Op.30f // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc18_35.6: = bound_method %.loc18_35.2, %Optional.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc18_35.3: %ptr.17e = addr_of %.loc18_35.2 // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_35.6(%addr.loc18_35.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18_35.2: = bound_method %var, constants.%T.as.Destroy.impl.Op.daf +// CHECK:STDOUT: %facet_value.loc18_35.2: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_35.13: %type_where = converted constants.%empty_tuple.type, %facet_value.loc18_35.2 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc18_35.2: = bound_method %var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc18_35.7: = bound_method %var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc18_35.7: = bound_method %var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc18_35.4: %ptr.843 = addr_of %var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18_35.2: init %empty_tuple.type = call %bound_method.loc18_35.7(%addr.loc18_35.4) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc18_35.2: init %empty_tuple.type = call %bound_method.loc18_35.7(%addr.loc18_35.4) // CHECK:STDOUT: %TrivialRange.as.Destroy.impl.Op.bound: = bound_method %.loc18_18.4, constants.%TrivialRange.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc18_18: %ptr.41d = addr_of %.loc18_18.4 // CHECK:STDOUT: %TrivialRange.as.Destroy.impl.Op.call: init %empty_tuple.type = call %TrivialRange.as.Destroy.impl.Op.bound(%addr.loc18_18) diff --git a/toolchain/check/testdata/for/pattern.carbon b/toolchain/check/testdata/for/pattern.carbon index 6a2a0927ca31..d6cef6cccc64 100644 --- a/toolchain/check/testdata/for/pattern.carbon +++ b/toolchain/check/testdata/for/pattern.carbon @@ -167,14 +167,16 @@ fn Run() { // CHECK:STDOUT: %Optional.Get.71a: %Optional.Get.type.f65 = struct_value () [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.ac0, @Optional.HasValue(%Copy.facet.762) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.71a, @Optional.Get(%Copy.facet.762) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] // CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.type.524: type = fn_type @Optional.as.Destroy.impl.Op, @Optional.as.Destroy.impl(%Copy.facet.762) [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.28c: %Optional.as.Destroy.impl.Op.type.524 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c56: type = ptr_type %Optional.47f [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.711: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_struct_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.6f0: %T.as.Destroy.impl.Op.type.711 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_struct_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bf3: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4 = struct_value () [concrete] // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.type.3bb: type = fn_type @EmptyRange.as.Destroy.impl.Op, @EmptyRange.as.Destroy.impl(%Copy.facet.762) [concrete] // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.2df: %EmptyRange.as.Destroy.impl.Op.type.3bb = struct_value () [concrete] // CHECK:STDOUT: %ptr.43f: type = ptr_type %EmptyRange.ab3 [concrete] @@ -271,11 +273,13 @@ fn Run() { // CHECK:STDOUT: %bound_method.loc10_36.7: = bound_method %.loc10_36.2, %Optional.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc10_36.3: %ptr.c56 = addr_of %.loc10_36.2 // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_36.7(%addr.loc10_36.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %var, constants.%T.as.Destroy.impl.Op.6f0 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_struct_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_36.12: %type_where = converted constants.%empty_struct_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %var, constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_36.8: = bound_method %var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc10_36.8: = bound_method %var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc10_36.4: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_36.8(%addr.loc10_36.4) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_36.8(%addr.loc10_36.4) // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.bound: = bound_method %.loc10_35.2, constants.%EmptyRange.as.Destroy.impl.Op.2df // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc10_35: = bound_method %.loc10_35.2, %EmptyRange.as.Destroy.impl.Op.specific_fn @@ -335,13 +339,15 @@ fn Run() { // CHECK:STDOUT: %Optional.Get.71a: %Optional.Get.type.f65 = struct_value () [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.ac0, @Optional.HasValue(%Copy.facet.762) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.71a, @Optional.Get(%Copy.facet.762) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] // CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.type.524: type = fn_type @Optional.as.Destroy.impl.Op, @Optional.as.Destroy.impl(%Copy.facet.762) [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.28c: %Optional.as.Destroy.impl.Op.type.524 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c56: type = ptr_type %Optional.47f [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.711: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_struct_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.6f0: %T.as.Destroy.impl.Op.type.711 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_struct_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bf3: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4 = struct_value () [concrete] // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.type.3bb: type = fn_type @EmptyRange.as.Destroy.impl.Op, @EmptyRange.as.Destroy.impl(%Copy.facet.762) [concrete] // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.2df: %EmptyRange.as.Destroy.impl.Op.type.3bb = struct_value () [concrete] // CHECK:STDOUT: %ptr.43f: type = ptr_type %EmptyRange.ab3 [concrete] @@ -440,11 +446,13 @@ fn Run() { // CHECK:STDOUT: %bound_method.loc10_40.7: = bound_method %.loc10_40.2, %Optional.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc10_40.2: %ptr.c56 = addr_of %.loc10_40.2 // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_40.7(%addr.loc10_40.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %var, constants.%T.as.Destroy.impl.Op.6f0 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_struct_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_40.9: %type_where = converted constants.%empty_struct_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %var, constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_40.8: = bound_method %var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc10_40.8: = bound_method %var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc10_40.3: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_40.8(%addr.loc10_40.3) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_40.8(%addr.loc10_40.3) // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.bound: = bound_method %.loc10_39.2, constants.%EmptyRange.as.Destroy.impl.Op.2df // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc10_39: = bound_method %.loc10_39.2, %EmptyRange.as.Destroy.impl.Op.specific_fn @@ -513,13 +521,16 @@ fn Run() { // CHECK:STDOUT: %ptr.b85: type = ptr_type %tuple.type.784 [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.efe, @Optional.HasValue(%Copy.facet.bd7) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.3c3, @Optional.Get(%Copy.facet.bd7) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.dd0: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.784) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.06a: %T.as.Destroy.impl.Op.type.dd0 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.d7c: %type_where = facet_value %tuple.type.784, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fa2: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.d7c) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.b18: %AggregateT.as_type.as.Destroy.impl.Op.type.fa2 = struct_value () [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.type.807: type = fn_type @Optional.as.Destroy.impl.Op, @Optional.as.Destroy.impl(%Copy.facet.bd7) [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.f4f: %Optional.as.Destroy.impl.Op.type.807 = struct_value () [concrete] // CHECK:STDOUT: %ptr.e7c: type = ptr_type %Optional.82d [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.711: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_struct_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.6f0: %T.as.Destroy.impl.Op.type.711 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.7c2: %type_where = facet_value %empty_struct_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.7c2) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bf3: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4 = struct_value () [concrete] // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.type.b3a: type = fn_type @EmptyRange.as.Destroy.impl.Op, @EmptyRange.as.Destroy.impl(%Copy.facet.bd7) [concrete] // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.a76: %EmptyRange.as.Destroy.impl.Op.type.b3a = struct_value () [concrete] // CHECK:STDOUT: %ptr.dd0: type = ptr_type %EmptyRange.9df [concrete] @@ -635,21 +646,25 @@ fn Run() { // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10_61.1: = bound_method %.loc10_61.10, constants.%T.as.Destroy.impl.Op.06a +// CHECK:STDOUT: %facet_value.loc10_61.1: %type_where = facet_value constants.%tuple.type.784, () [concrete = constants.%facet_value.d7c] +// CHECK:STDOUT: %.loc10_61.13: %type_where = converted constants.%tuple.type.784, %facet_value.loc10_61.1 [concrete = constants.%facet_value.d7c] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10_61.1: = bound_method %.loc10_61.10, constants.%AggregateT.as_type.as.Destroy.impl.Op.b18 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_61.7: = bound_method %.loc10_61.10, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10_61.7: = bound_method %.loc10_61.10, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_61.2: %ptr.b85 = addr_of %.loc10_61.10 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10_61.1: init %empty_tuple.type = call %bound_method.loc10_61.7(%addr.loc10_61.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10_61.1: init %empty_tuple.type = call %bound_method.loc10_61.7(%addr.loc10_61.2) // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.bound: = bound_method %.loc10_61.2, constants.%Optional.as.Destroy.impl.Op.f4f // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc10_61.8: = bound_method %.loc10_61.2, %Optional.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc10_61.3: %ptr.e7c = addr_of %.loc10_61.2 // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_61.8(%addr.loc10_61.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10_61.2: = bound_method %var, constants.%T.as.Destroy.impl.Op.6f0 +// CHECK:STDOUT: %facet_value.loc10_61.2: %type_where = facet_value constants.%empty_struct_type, () [concrete = constants.%facet_value.7c2] +// CHECK:STDOUT: %.loc10_61.14: %type_where = converted constants.%empty_struct_type, %facet_value.loc10_61.2 [concrete = constants.%facet_value.7c2] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10_61.2: = bound_method %var, constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_61.9: = bound_method %var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc10_61.9: = bound_method %var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10_61.4: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10_61.2: init %empty_tuple.type = call %bound_method.loc10_61.9(%addr.loc10_61.4) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10_61.2: init %empty_tuple.type = call %bound_method.loc10_61.9(%addr.loc10_61.4) // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.bound: = bound_method %.loc10_60.2, constants.%EmptyRange.as.Destroy.impl.Op.a76 // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc10_60: = bound_method %.loc10_60.2, %EmptyRange.as.Destroy.impl.Op.specific_fn @@ -716,14 +731,17 @@ fn Run() { // CHECK:STDOUT: %Optional.Get.f3d: %Optional.Get.type.cc9 = struct_value () [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.4c8, @Optional.HasValue(%Copy.facet.ee6) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.f3d, @Optional.Get(%Copy.facet.ee6) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.c22: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.56b) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.df1: %T.as.Destroy.impl.Op.type.c22 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.c79: %type_where = facet_value %tuple.type.56b, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.bf8: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.c79) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.40e: %AggregateT.as_type.as.Destroy.impl.Op.type.bf8 = struct_value () [concrete] // CHECK:STDOUT: %ptr.9f0: type = ptr_type %tuple.type.56b [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.type.3b8: type = fn_type @Optional.as.Destroy.impl.Op, @Optional.as.Destroy.impl(%Copy.facet.ee6) [concrete] // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.421: %Optional.as.Destroy.impl.Op.type.3b8 = struct_value () [concrete] // CHECK:STDOUT: %ptr.676: type = ptr_type %Optional.696 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.711: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_struct_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.6f0: %T.as.Destroy.impl.Op.type.711 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.7c2: %type_where = facet_value %empty_struct_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.7c2) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bf3: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4 = struct_value () [concrete] // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.type.eaf: type = fn_type @EmptyRange.as.Destroy.impl.Op, @EmptyRange.as.Destroy.impl(%Copy.facet.ee6) [concrete] // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.2e1: %EmptyRange.as.Destroy.impl.Op.type.eaf = struct_value () [concrete] // CHECK:STDOUT: %ptr.1e6: type = ptr_type %EmptyRange.f6a [concrete] @@ -828,21 +846,25 @@ fn Run() { // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10_49.1: = bound_method %.loc10_49.10, constants.%T.as.Destroy.impl.Op.df1 +// CHECK:STDOUT: %facet_value.loc10_49.1: %type_where = facet_value constants.%tuple.type.56b, () [concrete = constants.%facet_value.c79] +// CHECK:STDOUT: %.loc10_49.13: %type_where = converted constants.%tuple.type.56b, %facet_value.loc10_49.1 [concrete = constants.%facet_value.c79] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10_49.1: = bound_method %.loc10_49.10, constants.%AggregateT.as_type.as.Destroy.impl.Op.40e // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_49.7: = bound_method %.loc10_49.10, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10_49.7: = bound_method %.loc10_49.10, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_49.2: %ptr.9f0 = addr_of %.loc10_49.10 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10_49.1: init %empty_tuple.type = call %bound_method.loc10_49.7(%addr.loc10_49.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10_49.1: init %empty_tuple.type = call %bound_method.loc10_49.7(%addr.loc10_49.2) // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.bound: = bound_method %.loc10_49.2, constants.%Optional.as.Destroy.impl.Op.421 // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc10_49.8: = bound_method %.loc10_49.2, %Optional.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc10_49.3: %ptr.676 = addr_of %.loc10_49.2 // CHECK:STDOUT: %Optional.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_49.8(%addr.loc10_49.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10_49.2: = bound_method %var, constants.%T.as.Destroy.impl.Op.6f0 +// CHECK:STDOUT: %facet_value.loc10_49.2: %type_where = facet_value constants.%empty_struct_type, () [concrete = constants.%facet_value.7c2] +// CHECK:STDOUT: %.loc10_49.14: %type_where = converted constants.%empty_struct_type, %facet_value.loc10_49.2 [concrete = constants.%facet_value.7c2] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10_49.2: = bound_method %var, constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_49.9: = bound_method %var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc10_49.9: = bound_method %var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10_49.4: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10_49.2: init %empty_tuple.type = call %bound_method.loc10_49.9(%addr.loc10_49.4) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10_49.2: init %empty_tuple.type = call %bound_method.loc10_49.9(%addr.loc10_49.4) // CHECK:STDOUT: %EmptyRange.as.Destroy.impl.Op.bound: = bound_method %.loc10_48.2, constants.%EmptyRange.as.Destroy.impl.Op.2e1 // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc10_48: = bound_method %.loc10_48.2, %EmptyRange.as.Destroy.impl.Op.specific_fn diff --git a/toolchain/check/testdata/function/call/alias.carbon b/toolchain/check/testdata/function/call/alias.carbon index 5847c5639934..2ab18e4e507b 100644 --- a/toolchain/check/testdata/function/call/alias.carbon +++ b/toolchain/check/testdata/function/call/alias.carbon @@ -31,10 +31,12 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [concrete] // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,11 +93,13 @@ fn Main() { // CHECK:STDOUT: %.loc20_11.3: type = converted %.loc20_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc20_3: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %b.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 461b5e8e5034..afae6315358f 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -61,10 +61,12 @@ fn Main() { // CHECK:STDOUT: %bound_method.0ef: = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_6.e56: %i32 = int_value 6 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a1d: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.a1c) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.1b2: %T.as.Destroy.impl.Op.type.a1d = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.a1c, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fb1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.5c6: %AggregateT.as_type.as.Destroy.impl.Op.type.fb1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.0b7: type = ptr_type %tuple.type.a1c [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.1b2, @T.as.Destroy.impl.Op(%tuple.type.a1c) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.5c6, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -132,8 +134,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18: init %i32 = call %bound_method.loc18_22.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_22.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_22.3: init %tuple.type.a1c = tuple_init (%.loc18_22.2) to %x.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc18_3: init %tuple.type.a1c = converted %.loc18_22.1, %.loc18_22.3 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %x.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %tuple.type.a1c = converted %.loc18_22.1, %.loc18_22.3 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %x.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_15.1: type = splice_block %.loc18_15.3 [concrete = constants.%tuple.type.a1c] { // 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] @@ -155,11 +157,13 @@ fn Main() { // CHECK:STDOUT: %.loc20_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %.loc20_12.2: %i32 = converted %int_6, %.loc20_12.1 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc20_8, %.loc20_12.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.1b2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.1b2, @T.as.Destroy.impl.Op(constants.%tuple.type.a1c) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.a1c, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_3.2: %type_where = converted constants.%tuple.type.a1c, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.5c6 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.5c6, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.0b7 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_3(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/return_implicit.carbon b/toolchain/check/testdata/function/call/return_implicit.carbon index a987cbe005bd..1cda256db520 100644 --- a/toolchain/check/testdata/function/call/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/return_implicit.carbon @@ -29,10 +29,12 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +77,13 @@ fn Main() { // CHECK:STDOUT: %.loc19_11.3: type = converted %.loc19_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc19_3: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %b.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/fail_local_decl.carbon b/toolchain/check/testdata/function/definition/fail_local_decl.carbon index eee14b235d41..41e76e6a1560 100644 --- a/toolchain/check/testdata/function/definition/fail_local_decl.carbon +++ b/toolchain/check/testdata/function/definition/fail_local_decl.carbon @@ -103,10 +103,12 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.711: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_struct_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.6f0: %T.as.Destroy.impl.Op.type.711 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_struct_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bf3: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.6f0, @T.as.Destroy.impl.Op(%empty_struct_type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.bf3, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -149,16 +151,20 @@ fn F() { // CHECK:STDOUT: %.loc14_21.3: type = converted %.loc14_21.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %w: ref %empty_struct_type = bind_name w, %w.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc14: = bound_method %w.var, constants.%T.as.Destroy.impl.Op.6f0 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.6f0, @T.as.Destroy.impl.Op(constants.%empty_struct_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc14: = bound_method %w.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc14: %type_where = facet_value constants.%empty_struct_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc14_13: %type_where = converted constants.%empty_struct_type, %facet_value.loc14 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc14: = bound_method %w.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc14: = bound_method %w.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc14: %ptr.c28 = addr_of %w.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.6f0 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.6f0, @T.as.Destroy.impl.Op(constants.%empty_struct_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14) +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%empty_struct_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_11: %type_where = converted constants.%empty_struct_type, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc9: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9: %ptr.c28 = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 419e4e09dad6..9435ac5264a2 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -524,11 +524,11 @@ fn F() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f [symbolic] +// CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f131.1 [symbolic] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.type: type = fn_type @ExplicitAndAlsoDeduced [concrete] // CHECK:STDOUT: %ExplicitAndAlsoDeduced: %ExplicitAndAlsoDeduced.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f [symbolic] +// CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f131.1 [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.41d: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T) [symbolic] // CHECK:STDOUT: %CallExplicitAndAlsoDeduced.type: type = fn_type @CallExplicitAndAlsoDeduced [concrete] @@ -565,14 +565,14 @@ fn F() { // CHECK:STDOUT: %return.param_patt: @ExplicitAndAlsoDeduced.%pattern_type.loc6_43 (%pattern_type.afe) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_46: type = name_ref T, %T.loc6_27.2 [symbolic = %T.loc6_27.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_47.2: type = ptr_type %T.ref.loc6_46 [symbolic = %ptr.loc6_47.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %ptr.loc6_47.2: type = ptr_type %T.ref.loc6_46 [symbolic = %ptr.loc6_47.1 (constants.%ptr.79f131.1)] // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_27.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_27.1 (constants.%T)] // CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, %T.loc6_27.2 [symbolic = %T.loc6_27.1 (constants.%T)] // CHECK:STDOUT: %x: @ExplicitAndAlsoDeduced.%T.loc6_27.1 (%T) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.79f) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.79f) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.79f131.1) = out_param call_param1 +// CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.79f131.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitAndAlsoDeduced.decl: %CallExplicitAndAlsoDeduced.type = fn_decl @CallExplicitAndAlsoDeduced [concrete = constants.%CallExplicitAndAlsoDeduced] { // CHECK:STDOUT: %return.patt: %pattern_type.5f8 = return_slot_pattern [concrete] @@ -618,7 +618,7 @@ fn F() { // CHECK:STDOUT: generic fn @ExplicitAndAlsoDeduced(%T.loc6_27.2: type) { // CHECK:STDOUT: %T.loc6_27.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_27.1 (constants.%T)] // CHECK:STDOUT: %pattern_type.loc6_37: type = pattern_type %T.loc6_27.1 [symbolic = %pattern_type.loc6_37 (constants.%pattern_type.7dc)] -// CHECK:STDOUT: %ptr.loc6_47.1: type = ptr_type %T.loc6_27.1 [symbolic = %ptr.loc6_47.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %ptr.loc6_47.1: type = ptr_type %T.loc6_27.1 [symbolic = %ptr.loc6_47.1 (constants.%ptr.79f131.1)] // CHECK:STDOUT: %pattern_type.loc6_43: type = pattern_type %ptr.loc6_47.1 [symbolic = %pattern_type.loc6_43 (constants.%pattern_type.afe)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -626,13 +626,13 @@ fn F() { // CHECK:STDOUT: %require_complete.loc6_38: = require_complete_type %T.loc6_27.1 [symbolic = %require_complete.loc6_38 (constants.%require_complete.4ae)] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2: = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_27.1) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.41d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.1 (%T)) -> @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.79f) { +// CHECK:STDOUT: fn(%x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.1 (%T)) -> @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.79f131.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [concrete = constants.%ExplicitAndAlsoDeduced] // CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_27.2 [symbolic = %T.loc6_27.1 (constants.%T)] // CHECK:STDOUT: %x.ref: @ExplicitAndAlsoDeduced.%T.loc6_27.1 (%T) = name_ref x, %x // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%T) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.41d)] -// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.79f) = call %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1(%x.ref) +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.79f131.1) = call %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1(%x.ref) // CHECK:STDOUT: return %ExplicitAndAlsoDeduced.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -658,7 +658,7 @@ fn F() { // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%T) { // CHECK:STDOUT: %T.loc6_27.1 => constants.%T // CHECK:STDOUT: %pattern_type.loc6_37 => constants.%pattern_type.7dc -// CHECK:STDOUT: %ptr.loc6_47.1 => constants.%ptr.79f +// CHECK:STDOUT: %ptr.loc6_47.1 => constants.%ptr.79f131.1 // CHECK:STDOUT: %pattern_type.loc6_43 => constants.%pattern_type.afe // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon index c48e55c7950e..56c1b5b3ef75 100644 --- a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon +++ b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon @@ -2,7 +2,7 @@ // 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 +// 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 // @@ -105,8 +105,8 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 574127ecc490..7723b1c3884d 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -83,10 +83,12 @@ fn G() { // CHECK:STDOUT: %Wrap.Make.type.708: type = fn_type @Wrap.Make, @Wrap(%C) [concrete] // CHECK:STDOUT: %Wrap.Make.e4b: %Wrap.Make.type.708 = struct_value () [concrete] // CHECK:STDOUT: %Wrap.Make.specific_fn.834: = specific_function %Wrap.Make.e4b, @Wrap.Make(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type.4f9: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.796: %Int.as.Destroy.impl.Op.type.4f9 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] @@ -309,11 +311,13 @@ fn G() { // CHECK:STDOUT: %C.as.Destroy.impl.Op.bound: = bound_method %c.var, constants.%C.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc24: %ptr.019 = addr_of %c.var // CHECK:STDOUT: %C.as.Destroy.impl.Op.call: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound(%addr.loc24) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc23: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc23_3: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %b.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc23: %ptr.843 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23) // CHECK:STDOUT: %Int.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%Int.as.Destroy.impl.Op.796 // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function constants.%Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Destroy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc22: = bound_method %a.var, %Int.as.Destroy.impl.Op.specific_fn diff --git a/toolchain/check/testdata/function/generic/type_param.carbon b/toolchain/check/testdata/function/generic/type_param.carbon index d295690971ee..83dcbd6b19cb 100644 --- a/toolchain/check/testdata/function/generic/type_param.carbon +++ b/toolchain/check/testdata/function/generic/type_param.carbon @@ -27,20 +27,20 @@ fn F(T:! type) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f [symbolic] -// CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f [symbolic] +// CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f131.1 [symbolic] +// CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f131.1 [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %ptr.a13: type = ptr_type %ptr.79f [symbolic] -// CHECK:STDOUT: %require_complete.132: = require_complete_type %ptr.a13 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.79f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.79f, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.fc8: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.fc8 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %ptr.a13abe.2: type = ptr_type %ptr.79f131.1 [symbolic] +// CHECK:STDOUT: %require_complete.1328e0.2: = require_complete_type %ptr.a13abe.2 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.3af: = lookup_impl_witness %ptr.79f131.1, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.64e: %Destroy.type = facet_value %ptr.79f131.1, (%Destroy.lookup_impl_witness.3af) [symbolic] +// CHECK:STDOUT: %.fc8: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.64e [symbolic] +// CHECK:STDOUT: %impl.elem0.108: %.fc8 = impl_witness_access %Destroy.lookup_impl_witness.3af, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.a84: = specific_impl_function %impl.elem0.108, @Destroy.Op(%Destroy.facet.64e) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,18 +70,18 @@ fn F(T:! type) { // CHECK:STDOUT: %T.loc15_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_6.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ptr.loc16_11.2: type = ptr_type %T.loc15_6.1 [symbolic = %ptr.loc16_11.2 (constants.%ptr.79f)] +// CHECK:STDOUT: %ptr.loc16_11.2: type = ptr_type %T.loc15_6.1 [symbolic = %ptr.loc16_11.2 (constants.%ptr.79f131.1)] // CHECK:STDOUT: %require_complete.loc16_11: = require_complete_type %ptr.loc16_11.2 [symbolic = %require_complete.loc16_11 (constants.%require_complete.6e5)] // CHECK:STDOUT: %pattern_type.loc16: type = pattern_type %ptr.loc16_11.2 [symbolic = %pattern_type.loc16 (constants.%pattern_type.afe)] // CHECK:STDOUT: %require_complete.loc17: = require_complete_type %T.loc15_6.1 [symbolic = %require_complete.loc17 (constants.%require_complete.4ae)] // CHECK:STDOUT: %pattern_type.loc17: type = pattern_type %T.loc15_6.1 [symbolic = %pattern_type.loc17 (constants.%pattern_type.7dc)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc16_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.3af)] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc16_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.64e)] // CHECK:STDOUT: %.loc16_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc16_3.2 (constants.%.fc8)] -// CHECK:STDOUT: %impl.elem0.loc16_3.2: @F.%.loc16_3.2 (%.fc8) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16_3.2: = specific_impl_function %impl.elem0.loc16_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %ptr.loc16_3: type = ptr_type %ptr.loc16_11.2 [symbolic = %ptr.loc16_3 (constants.%ptr.a13)] -// CHECK:STDOUT: %require_complete.loc16_3: = require_complete_type %ptr.loc16_3 [symbolic = %require_complete.loc16_3 (constants.%require_complete.132)] +// CHECK:STDOUT: %impl.elem0.loc16_3.2: @F.%.loc16_3.2 (%.fc8) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0.108)] +// CHECK:STDOUT: %specific_impl_fn.loc16_3.2: = specific_impl_function %impl.elem0.loc16_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn.a84)] +// CHECK:STDOUT: %ptr.loc16_3: type = ptr_type %ptr.loc16_11.2 [symbolic = %ptr.loc16_3 (constants.%ptr.a13abe.2)] +// CHECK:STDOUT: %require_complete.loc16_3: = require_complete_type %ptr.loc16_3 [symbolic = %require_complete.loc16_3 (constants.%require_complete.1328e0.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -89,26 +89,26 @@ fn F(T:! type) { // CHECK:STDOUT: %p.patt: @F.%pattern_type.loc16 (%pattern_type.afe) = binding_pattern p [concrete] // CHECK:STDOUT: %p.var_patt: @F.%pattern_type.loc16 (%pattern_type.afe) = var_pattern %p.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %p.var: ref @F.%ptr.loc16_11.2 (%ptr.79f) = var %p.var_patt -// CHECK:STDOUT: %.loc16_11: type = splice_block %ptr.loc16_11.1 [symbolic = %ptr.loc16_11.2 (constants.%ptr.79f)] { +// CHECK:STDOUT: %p.var: ref @F.%ptr.loc16_11.2 (%ptr.79f131.1) = var %p.var_patt +// CHECK:STDOUT: %.loc16_11: type = splice_block %ptr.loc16_11.1 [symbolic = %ptr.loc16_11.2 (constants.%ptr.79f131.1)] { // CHECK:STDOUT: %T.ref.loc16: type = name_ref T, %T.loc15_6.2 [symbolic = %T.loc15_6.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc16_11.1: type = ptr_type %T.ref.loc16 [symbolic = %ptr.loc16_11.2 (constants.%ptr.79f)] +// CHECK:STDOUT: %ptr.loc16_11.1: type = ptr_type %T.ref.loc16 [symbolic = %ptr.loc16_11.2 (constants.%ptr.79f131.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: ref @F.%ptr.loc16_11.2 (%ptr.79f) = bind_name p, %p.var +// CHECK:STDOUT: %p: ref @F.%ptr.loc16_11.2 (%ptr.79f131.1) = bind_name p, %p.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %n.patt: @F.%pattern_type.loc17 (%pattern_type.7dc) = binding_pattern n [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %p.ref: ref @F.%ptr.loc16_11.2 (%ptr.79f) = name_ref p, %p -// CHECK:STDOUT: %.loc17_15: @F.%ptr.loc16_11.2 (%ptr.79f) = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref @F.%ptr.loc16_11.2 (%ptr.79f131.1) = name_ref p, %p +// CHECK:STDOUT: %.loc17_15: @F.%ptr.loc16_11.2 (%ptr.79f131.1) = bind_value %p.ref // CHECK:STDOUT: %.loc17_14.1: ref @F.%T.loc15_6.1 (%T) = deref %.loc17_15 // CHECK:STDOUT: %T.ref.loc17: type = name_ref T, %T.loc15_6.2 [symbolic = %T.loc15_6.1 (constants.%T)] // CHECK:STDOUT: %.loc17_14.2: @F.%T.loc15_6.1 (%T) = bind_value %.loc17_14.1 // CHECK:STDOUT: %n: @F.%T.loc15_6.1 (%T) = bind_name n, %.loc17_14.2 -// CHECK:STDOUT: %impl.elem0.loc16_3.1: @F.%.loc16_3.2 (%.fc8) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc16_3.1: @F.%.loc16_3.2 (%.fc8) = impl_witness_access constants.%Destroy.lookup_impl_witness.3af, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0.108)] // CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %p.var, %impl.elem0.loc16_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc16_3.1: = specific_impl_function %impl.elem0.loc16_3.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc16_3.1: = specific_impl_function %impl.elem0.loc16_3.1, @Destroy.Op(constants.%Destroy.facet.64e) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn.a84)] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %p.var, %specific_impl_fn.loc16_3.1 -// CHECK:STDOUT: %addr: @F.%ptr.loc16_3 (%ptr.a13) = addr_of %p.var +// CHECK:STDOUT: %addr: @F.%ptr.loc16_3 (%ptr.a13abe.2) = addr_of %p.var // CHECK:STDOUT: %.loc16_3.1: init %empty_tuple.type = call %bound_method.loc16_3.2(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/generic/complete_type.carbon b/toolchain/check/testdata/generic/complete_type.carbon index e486d4280fd6..3bcdf451dca9 100644 --- a/toolchain/check/testdata/generic/complete_type.carbon +++ b/toolchain/check/testdata/generic/complete_type.carbon @@ -50,7 +50,8 @@ library "[[@TEST_NAME]]"; class B; fn F(T:! type) { - var v: T; + var v: T*; + *v; } // F(B) isn't resolved until the end of the file. @@ -65,13 +66,14 @@ library "[[@TEST_NAME]]"; class B; fn F(T:! type) { - // CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE+6]]:10: error: `T` evaluates to incomplete type `B` [IncompleteTypeInMonomorphization] - // CHECK:STDERR: var v: T; - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE-6]]:1: note: class was forward declared here [ClassForwardDeclaredHere] + var v: T*; + // CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE+6]]:3: error: `T` evaluates to incomplete type `B` [IncompleteTypeInMonomorphization] + // CHECK:STDERR: *v; + // CHECK:STDERR: ^~ + // CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE-7]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class B; // CHECK:STDERR: ^~~~~~~~ - var v: T; + *v; } // CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE+4]]:10: note: in `F(B)` used here [ResolvingSpecificHere] @@ -298,18 +300,23 @@ fn G() { F(B); } // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f131.1 [symbolic] +// CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f131.1 [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e4f: %Destroy.type = facet_value %T, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.e0f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.e4f [symbolic] -// CHECK:STDOUT: %impl.elem0: %.e0f = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.e4f) [symbolic] +// CHECK:STDOUT: %PointeeT: type = bind_symbolic_name PointeeT, 0 [symbolic] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.eb7d1c.1: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%PointeeT) [symbolic] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.60a6c7.1: %ptr.as.Destroy.impl.Op.type.eb7d1c.1 = struct_value () [symbolic] +// CHECK:STDOUT: %ptr.a13abe.2: type = ptr_type %ptr.79f131.1 [symbolic] +// CHECK:STDOUT: %require_complete.1328e0.2: = require_complete_type %ptr.a13abe.2 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.3af: = lookup_impl_witness %ptr.79f131.1, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.64e: %Destroy.type = facet_value %ptr.79f131.1, (%Destroy.lookup_impl_witness.3af) [symbolic] +// CHECK:STDOUT: %.fc8: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.64e [symbolic] +// CHECK:STDOUT: %impl.elem0.108: %.fc8 = impl_witness_access %Destroy.lookup_impl_witness.3af, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.a84: = specific_impl_function %impl.elem0.108, @Destroy.Op(%Destroy.facet.64e) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%B) [concrete] @@ -318,12 +325,17 @@ fn G() { F(B); } // CHECK:STDOUT: %pattern_type.960: type = pattern_type %ptr.e79 [concrete] // CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.ca2: %Destroy.type = facet_value %B, (%Destroy.impl_witness.041) [concrete] // 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.049: type = pattern_type %B [concrete] -// CHECK:STDOUT: %.fb0: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.ca2 [concrete] // CHECK:STDOUT: %complete_type.3bf: = complete_type_witness %ptr.e79 [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.40d: = impl_witness imports.%Destroy.impl_witness_table.1ab, @ptr.as.Destroy.impl(%B) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.083: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%B) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.4a5: %ptr.as.Destroy.impl.Op.type.083 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.3fb: type = ptr_type %ptr.e79 [concrete] +// CHECK:STDOUT: %complete_type.c9f: = complete_type_witness %ptr.3fb [concrete] +// CHECK:STDOUT: %Destroy.facet.f4c: %Destroy.type = facet_value %ptr.e79, (%Destroy.impl_witness.40d) [concrete] +// CHECK:STDOUT: %.f78: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.f4c [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.4a5, @ptr.as.Destroy.impl.Op(%B) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -333,6 +345,8 @@ fn G() { F(B); } // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.import_ref.58c: @ptr.as.Destroy.impl.%ptr.as.Destroy.impl.Op.type (%ptr.as.Destroy.impl.Op.type.eb7d1c.1) = import_ref Core//prelude/parts/destroy, loc23_29, loaded [symbolic = @ptr.as.Destroy.impl.%ptr.as.Destroy.impl.Op (constants.%ptr.as.Destroy.impl.Op.60a6c7.1)] +// CHECK:STDOUT: %Destroy.impl_witness_table.1ab = impl_witness_table (%Core.import_ref.58c), @ptr.as.Destroy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -351,14 +365,14 @@ fn G() { F(B); } // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} -// CHECK:STDOUT: %B.decl.loc13: type = class_decl @B [concrete = constants.%B] {} {} +// CHECK:STDOUT: %B.decl.loc14: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @B.as.Destroy.impl: @B.%Self.ref as constants.%Destroy.type { // CHECK:STDOUT: %B.as.Destroy.impl.Op.decl: %B.as.Destroy.impl.Op.type = fn_decl @B.as.Destroy.impl.Op [concrete = constants.%B.as.Destroy.impl.Op] { // CHECK:STDOUT: %self.patt: %pattern_type.960 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.960 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc13: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] +// CHECK:STDOUT: %.loc14: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: %ptr.e79 = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [concrete = constants.%B] @@ -386,30 +400,38 @@ fn G() { F(B); } // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc7_10: = require_complete_type %T.loc6_6.1 [symbolic = %require_complete.loc7_10 (constants.%require_complete.4ae)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc6_6.1 [symbolic = %pattern_type (constants.%pattern_type.7dc)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.loc6_6.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %T.loc6_6.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.e4f)] -// CHECK:STDOUT: %.loc7_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3.2 (constants.%.e0f)] -// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3.2 (%.e0f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %ptr: type = ptr_type %T.loc6_6.1 [symbolic = %ptr (constants.%ptr.79f)] -// CHECK:STDOUT: %require_complete.loc7_3: = require_complete_type %ptr [symbolic = %require_complete.loc7_3 (constants.%require_complete.6e5)] +// CHECK:STDOUT: %ptr.loc7_11.2: type = ptr_type %T.loc6_6.1 [symbolic = %ptr.loc7_11.2 (constants.%ptr.79f131.1)] +// CHECK:STDOUT: %require_complete.loc7_11: = require_complete_type %ptr.loc7_11.2 [symbolic = %require_complete.loc7_11 (constants.%require_complete.6e5)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc7_11.2 [symbolic = %pattern_type (constants.%pattern_type.afe)] +// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %T.loc6_6.1 [symbolic = %require_complete.loc8 (constants.%require_complete.4ae)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc7_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.3af)] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc7_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.64e)] +// CHECK:STDOUT: %.loc7_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3.2 (constants.%.fc8)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3.2 (%.fc8) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.108)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.a84)] +// CHECK:STDOUT: %ptr.loc7_3: type = ptr_type %ptr.loc7_11.2 [symbolic = %ptr.loc7_3 (constants.%ptr.a13abe.2)] +// CHECK:STDOUT: %require_complete.loc7_3: = require_complete_type %ptr.loc7_3 [symbolic = %require_complete.loc7_3 (constants.%require_complete.1328e0.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.7dc) = binding_pattern v [concrete] -// CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.7dc) = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.afe) = binding_pattern v [concrete] +// CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.afe) = var_pattern %v.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %v.var: ref @F.%T.loc6_6.1 (%T) = var %v.var_patt -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] -// CHECK:STDOUT: %v: ref @F.%T.loc6_6.1 (%T) = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3.2 (%.e0f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %v.var: ref @F.%ptr.loc7_11.2 (%ptr.79f131.1) = var %v.var_patt +// CHECK:STDOUT: %.loc7_11: type = splice_block %ptr.loc7_11.1 [symbolic = %ptr.loc7_11.2 (constants.%ptr.79f131.1)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc7_11.1: type = ptr_type %T.ref [symbolic = %ptr.loc7_11.2 (constants.%ptr.79f131.1)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %v: ref @F.%ptr.loc7_11.2 (%ptr.79f131.1) = bind_name v, %v.var +// CHECK:STDOUT: %v.ref: ref @F.%ptr.loc7_11.2 (%ptr.79f131.1) = name_ref v, %v +// CHECK:STDOUT: %.loc8_4: @F.%ptr.loc7_11.2 (%ptr.79f131.1) = bind_value %v.ref +// CHECK:STDOUT: %.loc8_3: ref @F.%T.loc6_6.1 (%T) = deref %.loc8_4 +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3.2 (%.fc8) = impl_witness_access constants.%Destroy.lookup_impl_witness.3af, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.108)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.e4f) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.64e) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.a84)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %addr: @F.%ptr (%ptr.79f) = addr_of %v.var +// CHECK:STDOUT: %addr: @F.%ptr.loc7_3 (%ptr.a13abe.2) = addr_of %v.var // CHECK:STDOUT: %.loc7_3.1: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -434,15 +456,17 @@ fn G() { F(B); } // CHECK:STDOUT: %T.loc6_6.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc7_10 => constants.%complete_type.357 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.049 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.041 -// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.ca2 -// CHECK:STDOUT: %.loc7_3.2 => constants.%.fb0 -// CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%B.as.Destroy.impl.Op -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%B.as.Destroy.impl.Op -// CHECK:STDOUT: %ptr => constants.%ptr.e79 -// CHECK:STDOUT: %require_complete.loc7_3 => constants.%complete_type.3bf +// CHECK:STDOUT: %ptr.loc7_11.2 => constants.%ptr.e79 +// CHECK:STDOUT: %require_complete.loc7_11 => constants.%complete_type.3bf +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.960 +// CHECK:STDOUT: %require_complete.loc8 => constants.%complete_type.357 +// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.40d +// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.f4c +// CHECK:STDOUT: %.loc7_3.2 => constants.%.f78 +// CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%ptr.as.Destroy.impl.Op.4a5 +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%ptr.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %ptr.loc7_3 => constants.%ptr.3fb +// CHECK:STDOUT: %require_complete.loc7_3 => constants.%complete_type.c9f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_incomplete_in_function_at_eof.carbon @@ -456,31 +480,36 @@ fn G() { F(B); } // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f131.1 [symbolic] +// CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f131.1 [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.5ec: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T) [symbolic] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.4a9: %T.as.Destroy.impl.Op.type.5ec = struct_value () [symbolic] -// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e4f: %Destroy.type = facet_value %T, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.e0f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.e4f [symbolic] -// CHECK:STDOUT: %impl.elem0: %.e0f = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.e4f) [symbolic] +// CHECK:STDOUT: %PointeeT: type = bind_symbolic_name PointeeT, 0 [symbolic] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.eb7d1c.1: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%PointeeT) [symbolic] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.60a6c7.1: %ptr.as.Destroy.impl.Op.type.eb7d1c.1 = struct_value () [symbolic] +// CHECK:STDOUT: %ptr.a13abe.2: type = ptr_type %ptr.79f131.1 [symbolic] +// CHECK:STDOUT: %require_complete.1328e0.2: = require_complete_type %ptr.a13abe.2 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.3af: = lookup_impl_witness %ptr.79f131.1, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.64e: %Destroy.type = facet_value %ptr.79f131.1, (%Destroy.lookup_impl_witness.3af) [symbolic] +// CHECK:STDOUT: %.fc8: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.64e [symbolic] +// CHECK:STDOUT: %impl.elem0.108: %.fc8 = impl_witness_access %Destroy.lookup_impl_witness.3af, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.a84: = specific_impl_function %impl.elem0.108, @Destroy.Op(%Destroy.facet.64e) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%B) [concrete] -// CHECK:STDOUT: %pattern_type.049: type = pattern_type %B [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.d80: = impl_witness imports.%Destroy.impl_witness_table, @T.as.Destroy.impl(%B) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.48c: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%B) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.968: %T.as.Destroy.impl.Op.type.48c = struct_value () [concrete] // CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %ptr.e79 [concrete] -// CHECK:STDOUT: %Destroy.facet.2b8: %Destroy.type = facet_value %B, (%Destroy.impl_witness.d80) [concrete] -// CHECK:STDOUT: %.86c: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.2b8 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.968, @T.as.Destroy.impl.Op(%B) [concrete] +// CHECK:STDOUT: %complete_type.3bf: = complete_type_witness %ptr.e79 [concrete] +// CHECK:STDOUT: %pattern_type.960: type = pattern_type %ptr.e79 [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.40d: = impl_witness imports.%Destroy.impl_witness_table.1ab, @ptr.as.Destroy.impl(%B) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.083: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%B) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.4a5: %ptr.as.Destroy.impl.Op.type.083 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.3fb: type = ptr_type %ptr.e79 [concrete] +// CHECK:STDOUT: %complete_type.c9f: = complete_type_witness %ptr.3fb [concrete] +// CHECK:STDOUT: %Destroy.facet.f4c: %Destroy.type = facet_value %ptr.e79, (%Destroy.impl_witness.40d) [concrete] +// CHECK:STDOUT: %.f78: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.f4c [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.4a5, @ptr.as.Destroy.impl.Op(%B) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -490,8 +519,8 @@ fn G() { F(B); } // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.50f: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.5ec) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.4a9)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.50f), @T.as.Destroy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.58c: @ptr.as.Destroy.impl.%ptr.as.Destroy.impl.Op.type (%ptr.as.Destroy.impl.Op.type.eb7d1c.1) = import_ref Core//prelude/parts/destroy, loc23_29, loaded [symbolic = @ptr.as.Destroy.impl.%ptr.as.Destroy.impl.Op (constants.%ptr.as.Destroy.impl.Op.60a6c7.1)] +// CHECK:STDOUT: %Destroy.impl_witness_table.1ab = impl_witness_table (%Core.import_ref.58c), @ptr.as.Destroy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -518,31 +547,39 @@ fn G() { F(B); } // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc13_10: = require_complete_type %T.loc6_6.1 [symbolic = %require_complete.loc13_10 (constants.%require_complete.4ae)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc6_6.1 [symbolic = %pattern_type (constants.%pattern_type.7dc)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.loc6_6.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %T.loc6_6.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.e4f)] -// CHECK:STDOUT: %.loc13_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc13_3.2 (constants.%.e0f)] -// CHECK:STDOUT: %impl.elem0.loc13_3.2: @F.%.loc13_3.2 (%.e0f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc13_3.2: = specific_impl_function %impl.elem0.loc13_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc13_3.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %ptr: type = ptr_type %T.loc6_6.1 [symbolic = %ptr (constants.%ptr.79f)] -// CHECK:STDOUT: %require_complete.loc13_3: = require_complete_type %ptr [symbolic = %require_complete.loc13_3 (constants.%require_complete.6e5)] +// CHECK:STDOUT: %ptr.loc7_11.2: type = ptr_type %T.loc6_6.1 [symbolic = %ptr.loc7_11.2 (constants.%ptr.79f131.1)] +// CHECK:STDOUT: %require_complete.loc7_11: = require_complete_type %ptr.loc7_11.2 [symbolic = %require_complete.loc7_11 (constants.%require_complete.6e5)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc7_11.2 [symbolic = %pattern_type (constants.%pattern_type.afe)] +// CHECK:STDOUT: %require_complete.loc14: = require_complete_type %T.loc6_6.1 [symbolic = %require_complete.loc14 (constants.%require_complete.4ae)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc7_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.3af)] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc7_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.64e)] +// CHECK:STDOUT: %.loc7_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3.2 (constants.%.fc8)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3.2 (%.fc8) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.108)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.a84)] +// CHECK:STDOUT: %ptr.loc7_3: type = ptr_type %ptr.loc7_11.2 [symbolic = %ptr.loc7_3 (constants.%ptr.a13abe.2)] +// CHECK:STDOUT: %require_complete.loc7_3: = require_complete_type %ptr.loc7_3 [symbolic = %require_complete.loc7_3 (constants.%require_complete.1328e0.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.7dc) = binding_pattern v [concrete] -// CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.7dc) = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.afe) = binding_pattern v [concrete] +// CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.afe) = var_pattern %v.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %v.var: ref @F.%T.loc6_6.1 (%T) = var %v.var_patt -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] -// CHECK:STDOUT: %v: ref @F.%T.loc6_6.1 (%T) = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0.loc13_3.1: @F.%.loc13_3.2 (%.e0f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %bound_method.loc13_3.1: = bound_method %v.var, %impl.elem0.loc13_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc13_3.1: = specific_impl_function %impl.elem0.loc13_3.1, @Destroy.Op(constants.%Destroy.facet.e4f) [symbolic = %specific_impl_fn.loc13_3.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %bound_method.loc13_3.2: = bound_method %v.var, %specific_impl_fn.loc13_3.1 -// CHECK:STDOUT: %addr: @F.%ptr (%ptr.79f) = addr_of %v.var -// CHECK:STDOUT: %.loc13_3.1: init %empty_tuple.type = call %bound_method.loc13_3.2(%addr) +// CHECK:STDOUT: %v.var: ref @F.%ptr.loc7_11.2 (%ptr.79f131.1) = var %v.var_patt +// CHECK:STDOUT: %.loc7_11: type = splice_block %ptr.loc7_11.1 [symbolic = %ptr.loc7_11.2 (constants.%ptr.79f131.1)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc7_11.1: type = ptr_type %T.ref [symbolic = %ptr.loc7_11.2 (constants.%ptr.79f131.1)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %v: ref @F.%ptr.loc7_11.2 (%ptr.79f131.1) = bind_name v, %v.var +// CHECK:STDOUT: %v.ref: ref @F.%ptr.loc7_11.2 (%ptr.79f131.1) = name_ref v, %v +// CHECK:STDOUT: %.loc14_4: @F.%ptr.loc7_11.2 (%ptr.79f131.1) = bind_value %v.ref +// CHECK:STDOUT: %.loc14_3: ref @F.%T.loc6_6.1 (%T) = deref %.loc14_4 +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3.2 (%.fc8) = impl_witness_access constants.%Destroy.lookup_impl_witness.3af, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.108)] +// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7_3.1 +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.64e) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.a84)] +// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 +// CHECK:STDOUT: %addr: @F.%ptr.loc7_3 (%ptr.a13abe.2) = addr_of %v.var +// CHECK:STDOUT: %.loc7_3.1: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -564,14 +601,16 @@ fn G() { F(B); } // CHECK:STDOUT: %T.loc6_6.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc13_10 => -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.049 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.d80 -// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.2b8 -// CHECK:STDOUT: %.loc13_3.2 => constants.%.86c -// CHECK:STDOUT: %impl.elem0.loc13_3.2 => constants.%T.as.Destroy.impl.Op.968 -// CHECK:STDOUT: %specific_impl_fn.loc13_3.2 => constants.%T.as.Destroy.impl.Op.specific_fn -// CHECK:STDOUT: %ptr => constants.%ptr.e79 -// CHECK:STDOUT: %require_complete.loc13_3 => constants.%complete_type +// CHECK:STDOUT: %ptr.loc7_11.2 => constants.%ptr.e79 +// CHECK:STDOUT: %require_complete.loc7_11 => constants.%complete_type.3bf +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.960 +// CHECK:STDOUT: %require_complete.loc14 => +// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.40d +// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.f4c +// CHECK:STDOUT: %.loc7_3.2 => constants.%.f78 +// CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%ptr.as.Destroy.impl.Op.4a5 +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%ptr.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %ptr.loc7_3 => constants.%ptr.3fb +// CHECK:STDOUT: %require_complete.loc7_3 => constants.%complete_type.c9f // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/fail_generic_copy.carbon b/toolchain/check/testdata/generic/fail_generic_copy.carbon index b8eaa38b3d4b..a9311aeb8f3c 100644 --- a/toolchain/check/testdata/generic/fail_generic_copy.carbon +++ b/toolchain/check/testdata/generic/fail_generic_copy.carbon @@ -29,7 +29,7 @@ fn F[T:! type](x: T) -> T { library "[[@TEST_NAME]]"; -fn F[T:! type](x: T) { +fn F[T:! Core.Destroy](x: T) { // CHECK:STDERR: fail_var.carbon:[[@LINE+7]]:14: error: cannot copy value of type `T` [CopyOfUncopyableType] // CHECK:STDERR: var y: T = x; // CHECK:STDERR: ^ diff --git a/toolchain/check/testdata/generic/template/unimplemented.carbon b/toolchain/check/testdata/generic/template/unimplemented.carbon index 127e2f481c5d..b78736955f08 100644 --- a/toolchain/check/testdata/generic/template/unimplemented.carbon +++ b/toolchain/check/testdata/generic/template/unimplemented.carbon @@ -49,7 +49,7 @@ fn F(template c:! C) -> i32 { library "[[@TEST_NAME]]"; -fn F[template T:! type](x: T) { +fn F[template T:! Core.Destroy](x: T) { // TODO: These diagnostics aren't very good, and we should only produce one error here. // CHECK:STDERR: fail_todo_unimplemented_convert.carbon:[[@LINE+8]]:3: error: member name of type `` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase] // CHECK:STDERR: var v: T = 0; @@ -279,17 +279,19 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %T.8b3d5d.1: type = bind_symbolic_name T, 0, template [template] -// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3d5d.1 [template] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %T.9ff: %Destroy.type = bind_symbolic_name T, 0, template [template] +// CHECK:STDOUT: %pattern_type.3ab: type = pattern_type %Destroy.type [concrete] +// CHECK:STDOUT: %T.as_type.a11: type = facet_access_type %T.9ff [template] +// CHECK:STDOUT: %pattern_type.d62: type = pattern_type %T.as_type.a11 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3d5d.1 [template] +// CHECK:STDOUT: %require_complete.f78d44.1: = require_complete_type %T.as_type.a11 [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [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.edbe99.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.8b3d5d.1)> [template] +// CHECK:STDOUT: %ImplicitAs.type.57b: type = facet_type <@ImplicitAs, @ImplicitAs(%T.as_type.a11)> [template] // 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] @@ -298,34 +300,33 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Copy.impl_witness.dc4: = impl_witness imports.%Copy.impl_witness_table.965, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Copy.facet.eff: %Copy.type = facet_value %i32, (%Copy.impl_witness.dc4) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type.4f9: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.796: %Int.as.Destroy.impl.Op.type.4f9 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function %Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %ptr.79f131.2: type = ptr_type %T.8b3d5d.1 [template] -// CHECK:STDOUT: %require_complete.6e5e64.2: = require_complete_type %ptr.79f131.2 [template] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.8b3d5d.1, @Destroy [template] -// CHECK:STDOUT: %Destroy.facet.e4f: %Destroy.type = facet_value %T.8b3d5d.1, (%Destroy.lookup_impl_witness) [template] -// CHECK:STDOUT: %.e0f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.e4f [template] -// CHECK:STDOUT: %impl.elem0.472: %.e0f = impl_witness_access %Destroy.lookup_impl_witness, element0 [template] -// CHECK:STDOUT: %specific_impl_fn.074: = specific_impl_function %impl.elem0.472, @Destroy.Op(%Destroy.facet.e4f) [template] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.a2f397.2: = lookup_impl_witness %T.9ff, @Destroy [template] +// CHECK:STDOUT: %Destroy.facet.8dd648.2: %Destroy.type = facet_value %T.as_type.a11, (%Destroy.lookup_impl_witness.a2f397.2) [template] +// CHECK:STDOUT: %.7dc997.2: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.8dd648.2 [template] +// CHECK:STDOUT: %impl.elem0.253469.2: %.7dc997.2 = impl_witness_access %Destroy.lookup_impl_witness.a2f397.2, element0 [template] +// CHECK:STDOUT: %ptr.983a2f.3: type = ptr_type %T.as_type.a11 [template] +// CHECK:STDOUT: %specific_impl_fn.35f40a.2: = specific_impl_function %impl.elem0.253469.2, @Destroy.Op(%Destroy.facet.8dd648.2) [template] +// CHECK:STDOUT: %require_complete.a61215.2: = require_complete_type %ptr.983a2f.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // 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/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.import_ref.2eb = import_ref Core//prelude/types/int, loc21_31, unloaded // CHECK:STDOUT: %Copy.impl_witness_table.965 = impl_witness_table (%Core.import_ref.2eb), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -335,58 +336,73 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0, template [concrete] -// CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %T.patt: %pattern_type.3ab = symbolic_binding_pattern T, 0, template [concrete] +// CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.d62) = binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.d62) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T.8b3d5d.1)] -// CHECK:STDOUT: %x.param: @F.%T.loc4_15.1 (%T.8b3d5d.1) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T.8b3d5d.1)] -// CHECK:STDOUT: %x: @F.%T.loc4_15.1 (%T.8b3d5d.1) = bind_name x, %x.param +// CHECK:STDOUT: %.loc4_23: type = splice_block %Destroy.ref [concrete = constants.%Destroy.type] { +// CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type] +// CHECK:STDOUT: } +// CHECK:STDOUT: %T.loc4_15.2: %Destroy.type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T.9ff)] +// CHECK:STDOUT: %x.param: @F.%T.as_type.loc4_36.1 (%T.as_type.a11) = value_param call_param0 +// CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] { +// CHECK:STDOUT: %T.ref.loc4: %Destroy.type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T.9ff)] +// CHECK:STDOUT: %T.as_type.loc4_36.2: type = facet_access_type %T.ref.loc4 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] +// CHECK:STDOUT: %.loc4_36.2: type = converted %T.ref.loc4, %T.as_type.loc4_36.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %x: @F.%T.as_type.loc4_36.1 (%T.as_type.a11) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc4_15.2: type) { -// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T.8b3d5d.1)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_15.1 [template = %pattern_type (constants.%pattern_type.7dcd0a.1)] +// CHECK:STDOUT: generic fn @F(%T.loc4_15.2: %Destroy.type) { +// CHECK:STDOUT: %T.loc4_15.1: %Destroy.type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T.9ff)] +// CHECK:STDOUT: %T.as_type.loc4_36.1: type = facet_access_type %T.loc4_15.1 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc4_36.1 [template = %pattern_type (constants.%pattern_type.d62)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc4: = require_complete_type %T.loc4_15.1 [template = %require_complete.loc4 (constants.%require_complete.4ae)] -// CHECK:STDOUT: %ImplicitAs.type.loc14_3.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc4_15.1)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.edbe99.2)] +// CHECK:STDOUT: %require_complete.loc4: = require_complete_type %T.as_type.loc4_36.1 [template = %require_complete.loc4 (constants.%require_complete.f78d44.1)] +// CHECK:STDOUT: %ImplicitAs.type.loc14_3.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.as_type.loc4_36.1)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.57b)] // CHECK:STDOUT: %.loc14_3.4: = access_member_action %ImplicitAs.type.loc14_3.1, Convert [template] // CHECK:STDOUT: %.loc14_3.5: type = type_of_inst %.loc14_3.4 [template] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.loc4_15.1, @Destroy [template = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %T.loc4_15.1, (%Destroy.lookup_impl_witness) [template = %Destroy.facet (constants.%Destroy.facet.e4f)] -// CHECK:STDOUT: %.loc14_3.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [template = %.loc14_3.6 (constants.%.e0f)] -// CHECK:STDOUT: %impl.elem0.loc14_3.2: @F.%.loc14_3.6 (%.e0f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.472)] -// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.Op(%Destroy.facet) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.074)] -// CHECK:STDOUT: %ptr: type = ptr_type %T.loc4_15.1 [template = %ptr (constants.%ptr.79f131.2)] -// CHECK:STDOUT: %require_complete.loc14: = require_complete_type %ptr [template = %require_complete.loc14 (constants.%require_complete.6e5e64.2)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.loc4_15.1, @Destroy [template = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.a2f397.2)] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %T.as_type.loc4_36.1, (%Destroy.lookup_impl_witness) [template = %Destroy.facet (constants.%Destroy.facet.8dd648.2)] +// CHECK:STDOUT: %.loc14_3.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [template = %.loc14_3.6 (constants.%.7dc997.2)] +// CHECK:STDOUT: %impl.elem0.loc14_3.2: @F.%.loc14_3.6 (%.7dc997.2) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.253469.2)] +// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.Op(%Destroy.facet) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.35f40a.2)] +// CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc4_36.1 [template = %ptr (constants.%ptr.983a2f.3)] +// CHECK:STDOUT: %require_complete.loc14: = require_complete_type %ptr [template = %require_complete.loc14 (constants.%require_complete.a61215.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.loc4_15.1 (%T.8b3d5d.1)) { +// CHECK:STDOUT: fn(%x.param: @F.%T.as_type.loc4_36.1 (%T.as_type.a11)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = binding_pattern v [concrete] -// CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.d62) = binding_pattern v [concrete] +// CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.d62) = var_pattern %v.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %v.var: ref @F.%T.loc4_15.1 (%T.8b3d5d.1) = var %v.var_patt +// CHECK:STDOUT: %v.var: ref @F.%T.as_type.loc4_36.1 (%T.as_type.a11) = var %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %ImplicitAs.type.loc14_3.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T.8b3d5d.1)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.edbe99.2)] +// CHECK:STDOUT: %ImplicitAs.type.loc14_3.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T.as_type.a11)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.57b)] // CHECK:STDOUT: %.loc14_3.1: @F.%.loc14_3.5 (@F.%.loc14_3.5) = splice_inst %.loc14_3.4 -// CHECK:STDOUT: %.loc14_3.2: @F.%T.loc4_15.1 (%T.8b3d5d.1) = converted %int_0, [concrete = ] +// CHECK:STDOUT: %.loc14_3.2: @F.%T.as_type.loc4_36.1 (%T.as_type.a11) = converted %int_0, [concrete = ] // CHECK:STDOUT: assign %v.var, -// CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T.8b3d5d.1)] -// CHECK:STDOUT: %v: ref @F.%T.loc4_15.1 (%T.8b3d5d.1) = bind_name v, %v.var +// CHECK:STDOUT: %.loc14_10.1: type = splice_block %.loc14_10.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] { +// CHECK:STDOUT: %T.ref.loc14: %Destroy.type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T.9ff)] +// CHECK:STDOUT: %T.as_type.loc14: type = facet_access_type %T.ref.loc14 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] +// CHECK:STDOUT: %.loc14_10.2: type = converted %T.ref.loc14, %T.as_type.loc14 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %v: ref @F.%T.as_type.loc4_36.1 (%T.as_type.a11) = bind_name v, %v.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt: %pattern_type.7ce = binding_pattern w [concrete] // CHECK:STDOUT: %w.var_patt: %pattern_type.7ce = var_pattern %w.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt -// CHECK:STDOUT: %x.ref: @F.%T.loc4_15.1 (%T.8b3d5d.1) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @F.%T.as_type.loc4_36.1 (%T.as_type.a11) = name_ref x, %x // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value constants.%i32, (constants.%Copy.impl_witness.dc4) [concrete = constants.%Copy.facet.eff] // CHECK:STDOUT: %.loc22_3.1: %Copy.type = converted constants.%i32, %Copy.facet [concrete = constants.%Copy.facet.eff] -// CHECK:STDOUT: %.loc22_3.2: %i32 = converted %x.ref, [concrete = ] +// CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type constants.%T.9ff [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] +// CHECK:STDOUT: %.loc22_3.2: type = converted constants.%T.9ff, %T.as_type.loc22 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.a11)] +// CHECK:STDOUT: %.loc22_3.3: %i32 = converted %x.ref, [concrete = ] // CHECK:STDOUT: assign %w.var, // CHECK:STDOUT: %.loc22_10: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -398,18 +414,19 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %bound_method.loc22: = bound_method %w.var, %Int.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc22: %ptr.235 = addr_of %w.var // CHECK:STDOUT: %Int.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22) -// CHECK:STDOUT: %impl.elem0.loc14_3.1: @F.%.loc14_3.6 (%.e0f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.472)] +// CHECK:STDOUT: %impl.elem0.loc14_3.1: @F.%.loc14_3.6 (%.7dc997.2) = impl_witness_access constants.%Destroy.lookup_impl_witness.a2f397.2, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.253469.2)] // CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %v.var, %impl.elem0.loc14_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.Op(constants.%Destroy.facet.e4f) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.074)] +// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.Op(constants.%Destroy.facet.8dd648.2) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.35f40a.2)] // CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %v.var, %specific_impl_fn.loc14_3.1 -// CHECK:STDOUT: %addr.loc14: @F.%ptr (%ptr.79f131.2) = addr_of %v.var +// CHECK:STDOUT: %addr.loc14: @F.%ptr (%ptr.983a2f.3) = addr_of %v.var // CHECK:STDOUT: %.loc14_3.3: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr.loc14) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.8b3d5d.1) { -// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.8b3d5d.1 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 +// CHECK:STDOUT: specific @F(constants.%T.9ff) { +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.9ff +// CHECK:STDOUT: %T.as_type.loc4_36.1 => constants.%T.as_type.a11 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d62 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index ea87f23192ac..dd69ae2ecb9d 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -66,9 +66,11 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %.7fa: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c49 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.f59, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a60: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.913: %T.as.Destroy.impl.Op.type.a60 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.913, @T.as.Destroy.impl.Op(%array_type) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.32d: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.ab1: %AggregateT.as_type.as.Destroy.impl.Op.type.32d = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.ab1, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -153,8 +155,8 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %.loc16_29.3: ref %i32 = array_index %x.var, %int_0.loc16_29 // CHECK:STDOUT: %.loc16_29.4: init %i32 = initialize_from %.loc16_29.2 to %.loc16_29.3 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_29.5: init %array_type = array_init (%.loc16_29.4) to %x.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc16_3: init %array_type = converted %.loc16_29.1, %.loc16_29.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %x.var, %.loc16_3 +// CHECK:STDOUT: %.loc16_3.1: init %array_type = converted %.loc16_29.1, %.loc16_29.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %x.var, %.loc16_3.1 // CHECK:STDOUT: %.loc16_22: type = splice_block %array_type [concrete = constants.%array_type] { // 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] @@ -190,11 +192,13 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %.loc17_10, %specific_fn.loc17 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc17_10.2(%.loc17_10) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.913 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.913, @T.as.Destroy.impl.Op(constants.%array_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc16_3.2: %type_where = converted constants.%array_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.ab1 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.ab1, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_3: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.260 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc16_3(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc16_3(%addr) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 6186a06adc69..650cb85867f4 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -101,10 +101,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %.9e2: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.7d5 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.9fb, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a18: %T.as.Destroy.impl.Op.type.f3e = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.142: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%i32) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.c04: %ptr.as.Destroy.impl.Op.type.142 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(%ptr.235) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type.4f9: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.796: %Int.as.Destroy.impl.Op.type.4f9 = struct_value () [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function %Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(%int_32) [concrete] @@ -369,11 +369,11 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc29_10.2: = bound_method %.loc29_10.2, %specific_fn.loc29 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc29_10.2(%.loc29_10.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %w.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc28_3: = bound_method %w.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %w.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc28_3: = bound_method %w.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc28_3: %ptr.5d5 = addr_of %w.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc28_3(%addr.loc28_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc28_3(%addr.loc28_3) // CHECK:STDOUT: %Int.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%Int.as.Destroy.impl.Op.796 // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function constants.%Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Destroy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc27_3.3: = bound_method %v.var, %Int.as.Destroy.impl.Op.specific_fn @@ -462,11 +462,11 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc35_10.2: = bound_method %.loc35_10.2, %specific_fn.loc35 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc35_10.2(%.loc35_10.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %w.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc34_3: = bound_method %w.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %w.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc34_3: = bound_method %w.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc34_3: %ptr.5d5 = addr_of %w.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc34_3(%addr.loc34_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc34_3(%addr.loc34_3) // CHECK:STDOUT: %Int.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%Int.as.Destroy.impl.Op.796 // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function constants.%Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Destroy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc33_3.3: = bound_method %v.var, %Int.as.Destroy.impl.Op.specific_fn diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index c103f76813f7..93912f2e14ab 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -61,9 +61,11 @@ fn F(cond: bool) { // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %struct: %struct_type.a.b.501 = struct_value (%int_1.5d2, %int_2.ef8) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.49c: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%struct_type.a.b.501) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.d1c: %T.as.Destroy.impl.Op.type.49c = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.d1c, @T.as.Destroy.impl.Op(%struct_type.a.b.501) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %struct_type.a.b.501, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.469: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.f75: %AggregateT.as_type.as.Destroy.impl.Op.type.469 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.f75, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -147,8 +149,8 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc18_46.6: ref %i32 = struct_access %a.var, element1 // CHECK:STDOUT: %.loc18_46.7: init %i32 = initialize_from %.loc18_46.5 to %.loc18_46.6 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc18_46.8: init %struct_type.a.b.501 = struct_init (%.loc18_46.4, %.loc18_46.7) to %a.var [concrete = constants.%struct] -// CHECK:STDOUT: %.loc18_3: init %struct_type.a.b.501 = converted %.loc18_46.1, %.loc18_46.8 [concrete = constants.%struct] -// CHECK:STDOUT: assign %a.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %struct_type.a.b.501 = converted %.loc18_46.1, %.loc18_46.8 [concrete = constants.%struct] +// CHECK:STDOUT: assign %a.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_27: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.501] { // 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] @@ -184,11 +186,13 @@ fn F(cond: bool) { // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc19_5: %struct_type.a.b.501 = block_arg !if.expr.result // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc19_5) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.d1c -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.d1c, @T.as.Destroy.impl.Op(constants.%struct_type.a.b.501) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%struct_type.a.b.501, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_3.2: %type_where = converted constants.%struct_type.a.b.501, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.f75 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.f75, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.3ee = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_3(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_final.carbon b/toolchain/check/testdata/impl/extend_final.carbon index 92e02467aa0f..52554a44165c 100644 --- a/toolchain/check/testdata/impl/extend_final.carbon +++ b/toolchain/check/testdata/impl/extend_final.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/forward_decls.carbon b/toolchain/check/testdata/impl/forward_decls.carbon index a799cdfc2233..4696504c1f7d 100644 --- a/toolchain/check/testdata/impl/forward_decls.carbon +++ b/toolchain/check/testdata/impl/forward_decls.carbon @@ -2,7 +2,7 @@ // 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 +// 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 // @@ -432,8 +432,8 @@ interface I { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1669,8 +1669,8 @@ interface I { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index b912f24fc4fc..3d5da70150c5 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -332,8 +332,10 @@ impl () as I({}) { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.c.d.15a = struct_value (%empty_tuple, %empty_struct) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.00c: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%struct_type.d.c.b36) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.e43: %T.as.Destroy.impl.Op.type.00c = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %struct_type.d.c.b36, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.80a: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.b26: %AggregateT.as_type.as.Destroy.impl.Op.type.80a = struct_value () [concrete] // CHECK:STDOUT: %ptr.eab: type = ptr_type %struct_type.d.c.b36 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -395,11 +397,13 @@ impl () as I({}) { // CHECK:STDOUT: %.loc10_48.10: init %empty_struct_type = converted %.loc10_48.7, %.loc10_48.9 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_48.11: init %struct_type.c.d.15a = struct_init (%.loc10_48.6, %.loc10_48.10) to %return [concrete = constants.%struct] // CHECK:STDOUT: %.loc10_48.12: init %struct_type.c.d.15a = converted %empty_tuple.type.as.I.impl.F.call, %.loc10_48.11 [concrete = constants.%struct] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc10_48.2, constants.%T.as.Destroy.impl.Op.e43 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%struct_type.d.c.b36, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_48.13: %type_where = converted constants.%struct_type.d.c.b36, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc10_48.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.b26 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc10_48.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc10_48.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.eab = addr_of %.loc10_48.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc10_48.12 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1008,8 +1012,10 @@ impl () as I({}) { // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.3e8bab.2: %empty_tuple.type.as.I.impl.F.type.109800.2 = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.a.b.f95 = struct_value (%empty_struct, %empty_struct) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.13d: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%struct_type.b.a.1b0) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b9b: %T.as.Destroy.impl.Op.type.13d = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %struct_type.b.a.1b0, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.ee6: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.696: %AggregateT.as_type.as.Destroy.impl.Op.type.ee6 = struct_value () [concrete] // CHECK:STDOUT: %ptr.30d: type = ptr_type %struct_type.b.a.1b0 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1059,11 +1065,13 @@ impl () as I({}) { // CHECK:STDOUT: %.loc10_29.10: init %empty_struct_type = converted %.loc10_29.7, %.loc10_29.9 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_29.11: init %struct_type.a.b.f95 = struct_init (%.loc10_29.6, %.loc10_29.10) to %return [concrete = constants.%struct] // CHECK:STDOUT: %.loc10_29.12: init %struct_type.a.b.f95 = converted %empty_tuple.type.as.I.impl.F.call, %.loc10_29.11 [concrete = constants.%struct] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc10_29.2, constants.%T.as.Destroy.impl.Op.b9b +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%struct_type.b.a.1b0, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_29.13: %type_where = converted constants.%struct_type.b.a.1b0, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc10_29.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.696 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc10_29.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc10_29.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.30d = addr_of %.loc10_29.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc10_29.12 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 1076044d5417..0d6d8c4df904 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -157,12 +157,12 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.f99: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Core.import_ref.f99: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc10_28, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.import_ref.8e7 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.507 = import_ref Main//a, loc5_14, unloaded // CHECK:STDOUT: %Main.F: %I.F.type = import_ref Main//a, F, loaded [concrete = constants.%I.F] // CHECK:STDOUT: %Main.import_ref.de2: %I.type = import_ref Main//a, inst19 [no loc], loaded [symbolic = constants.%Self.7ee] -// CHECK:STDOUT: %Core.import_ref.725: %Destroy.Op.type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%Destroy.Op] +// CHECK:STDOUT: %Core.import_ref.725: %Destroy.Op.type = import_ref Core//prelude/parts/destroy, loc10_28, loaded [concrete = constants.%Destroy.Op] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index c7eecf5bdbd0..9f888d4612f7 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -2,7 +2,7 @@ // 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 +// 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 // @@ -79,20 +79,20 @@ fn G() { // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %I.type, %type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %facet_type: type = facet_type <@I & @J> [concrete] -// CHECK:STDOUT: %T.aa7: %facet_type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %facet_type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.add: type = pattern_type %facet_type [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.aa7 [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %pattern_type.94b: type = pattern_type %T.as_type [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.387: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.aa7, @I [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] // CHECK:STDOUT: %I.facet.6ef: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.aa7, @J [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T, @J [symbolic] // CHECK:STDOUT: %J.facet.10a: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %.4b9: type = fn_type_with_self_type %J.JJ.type, %J.facet.10a [symbolic] -// CHECK:STDOUT: %impl.elem0: %.4b9 = impl_witness_access %J.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @J.JJ(%J.facet.10a) [symbolic] +// CHECK:STDOUT: %impl.elem0.366: %.4b9 = impl_witness_access %J.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.7b5: = specific_impl_function %impl.elem0.366, @J.JJ(%J.facet.10a) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] @@ -127,8 +127,8 @@ fn G() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } @@ -159,10 +159,10 @@ fn G() { // CHECK:STDOUT: %.loc22_12.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc22_12.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc22_12.2 [concrete = constants.%facet_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc22_6.2: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.1 (constants.%T.aa7)] +// CHECK:STDOUT: %T.loc22_6.2: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.1 (constants.%T)] // CHECK:STDOUT: %t.param: @F.%T.as_type.loc22_20.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc22_20.1: type = splice_block %.loc22_20.2 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc22: %facet_type = name_ref T, %T.loc22_6.2 [symbolic = %T.loc22_6.1 (constants.%T.aa7)] +// CHECK:STDOUT: %T.ref.loc22: %facet_type = name_ref T, %T.loc22_6.2 [symbolic = %T.loc22_6.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc22_20.2: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc22_20.2: type = converted %T.ref.loc22, %T.as_type.loc22_20.2 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] // CHECK:STDOUT: } @@ -309,7 +309,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc22_6.2: %facet_type) { -// CHECK:STDOUT: %T.loc22_6.1: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.1 (constants.%T.aa7)] +// CHECK:STDOUT: %T.loc22_6.1: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc22_20.1: type = facet_access_type %T.loc22_6.1 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_20.1 [symbolic = %pattern_type (constants.%pattern_type.94b)] // CHECK:STDOUT: @@ -320,15 +320,15 @@ fn G() { // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc22_6.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)] // CHECK:STDOUT: %J.facet.loc26_33.2: %J.type = facet_value %T.as_type.loc22_20.1, (%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.10a)] // CHECK:STDOUT: %.loc26_69.2: type = fn_type_with_self_type constants.%J.JJ.type, %J.facet.loc26_33.2 [symbolic = %.loc26_69.2 (constants.%.4b9)] -// CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69.2 (%.4b9) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc26_69.2: = specific_impl_function %impl.elem0.loc26_69.2, @J.JJ(%J.facet.loc26_33.2) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69.2 (%.4b9) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0.366)] +// CHECK:STDOUT: %specific_impl_fn.loc26_69.2: = specific_impl_function %impl.elem0.loc26_69.2, @J.JJ(%J.facet.loc26_33.2) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn.7b5)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc22_20.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: @F.%T.as_type.loc22_20.1 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_6.2 [symbolic = %T.loc22_6.1 (constants.%T.aa7)] +// CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_6.2 [symbolic = %T.loc22_6.1 (constants.%T)] // CHECK:STDOUT: %I.ref.loc26_21: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %T.as_type.loc26_18: type = facet_access_type constants.%T.aa7 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc26_18: type = facet_access_type constants.%T [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] // CHECK:STDOUT: %I.facet.loc26_18.1: %I.type = facet_value %T.as_type.loc26_18, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.6ef)] // CHECK:STDOUT: %.loc26_18: %I.type = converted %T.ref.loc26, %I.facet.loc26_18.1 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.6ef)] // CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] @@ -349,11 +349,11 @@ fn G() { // CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] // CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c] -// CHECK:STDOUT: %T.as_type.loc26_69: type = facet_access_type constants.%T.aa7 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_69.1: type = converted constants.%T.aa7, %T.as_type.loc26_69 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69.2 (%.4b9) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %T.as_type.loc26_69: type = facet_access_type constants.%T [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc26_69.1: type = converted constants.%T, %T.as_type.loc26_69 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69.2 (%.4b9) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0.366)] // CHECK:STDOUT: %bound_method.loc26_69: = bound_method %t.ref, %impl.elem0.loc26_69.1 -// CHECK:STDOUT: %specific_impl_fn.loc26_69.1: = specific_impl_function %impl.elem0.loc26_69.1, @J.JJ(constants.%J.facet.10a) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc26_69.1: = specific_impl_function %impl.elem0.loc26_69.1, @J.JJ(constants.%J.facet.10a) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn.7b5)] // CHECK:STDOUT: %bound_method.loc26_73: = bound_method %t.ref, %specific_impl_fn.loc26_69.1 // CHECK:STDOUT: %.loc26_73: init %empty_tuple.type = call %bound_method.loc26_73(%t.ref) // CHECK:STDOUT: return @@ -445,8 +445,8 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8ba // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.aa7) { -// CHECK:STDOUT: %T.loc22_6.1 => constants.%T.aa7 +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc22_6.1 => constants.%T // CHECK:STDOUT: %T.as_type.loc22_20.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.94b // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/find_in_final.carbon b/toolchain/check/testdata/impl/lookup/find_in_final.carbon index 381a192b783b..c62fe4131b60 100644 --- a/toolchain/check/testdata/impl/lookup/find_in_final.carbon +++ b/toolchain/check/testdata/impl/lookup/find_in_final.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/impl_cycle.carbon b/toolchain/check/testdata/impl/lookup/impl_cycle.carbon index 539db92dbbc0..1e8a88467fd7 100644 --- a/toolchain/check/testdata/impl/lookup/impl_cycle.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_cycle.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/impl_overlap.carbon b/toolchain/check/testdata/impl/lookup/impl_overlap.carbon index f71aa0972dfd..87b9fe3fd97d 100644 --- a/toolchain/check/testdata/impl/lookup/impl_overlap.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_overlap.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/import_error.carbon b/toolchain/check/testdata/impl/lookup/import_error.carbon index 2c208b56c4a8..cf676f4a9624 100644 --- a/toolchain/check/testdata/impl/lookup/import_error.carbon +++ b/toolchain/check/testdata/impl/lookup/import_error.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/import_final.carbon b/toolchain/check/testdata/impl/lookup/import_final.carbon index 2b136a8204eb..b5d2a6879136 100644 --- a/toolchain/check/testdata/impl/lookup/import_final.carbon +++ b/toolchain/check/testdata/impl/lookup/import_final.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon index a7a6cdb23920..780bc875cbe2 100644 --- a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon +++ b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon @@ -2,7 +2,7 @@ // 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 +// 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 // @@ -542,8 +542,8 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/specialization.carbon b/toolchain/check/testdata/impl/lookup/specialization.carbon index 7c73c4466cdf..bce3603ed770 100644 --- a/toolchain/check/testdata/impl/lookup/specialization.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/specialization_poison.carbon b/toolchain/check/testdata/impl/lookup/specialization_poison.carbon index 37d0e25a0f5f..afc907cecdbb 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_poison.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_poison.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon index c2898e579afc..3e4b1233dd7e 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon @@ -2,7 +2,7 @@ // 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 +// 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/impl/lookup/struct.carbon b/toolchain/check/testdata/impl/lookup/struct.carbon index d1ca50fa0f12..c41e6c64c1a5 100644 --- a/toolchain/check/testdata/impl/lookup/struct.carbon +++ b/toolchain/check/testdata/impl/lookup/struct.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon b/toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon index cefdccf9ec4a..32b45e456c0b 100644 --- a/toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon +++ b/toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/unused_generic_binding.carbon b/toolchain/check/testdata/impl/lookup/unused_generic_binding.carbon index 9b7a7429350d..f604081feb80 100644 --- a/toolchain/check/testdata/impl/lookup/unused_generic_binding.carbon +++ b/toolchain/check/testdata/impl/lookup/unused_generic_binding.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/use_assoc_const.carbon b/toolchain/check/testdata/impl/use_assoc_const.carbon index cfbaea2bcc25..4c8fa7110908 100644 --- a/toolchain/check/testdata/impl/use_assoc_const.carbon +++ b/toolchain/check/testdata/impl/use_assoc_const.carbon @@ -99,7 +99,7 @@ interface I { } interface J { - let U:! I; + let U:! I & Core.Destroy; fn F(u: U) -> U; } @@ -1632,58 +1632,63 @@ fn F() { // CHECK:STDOUT: %assoc0.ea8: %I.assoc_type = assoc_entity element0, @I.%I.Op.decl [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.bf6: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %facet_type: type = facet_type <@I & @Destroy> [concrete] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.dfc: %J.assoc_type = assoc_entity element0, @J.%U [concrete] +// CHECK:STDOUT: %assoc0.d3b: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.4e7: type = facet_access_type %Self.bf6 [symbolic] // CHECK:STDOUT: %J.lookup_impl_witness.0802bc.1: = lookup_impl_witness %Self.bf6, @J [symbolic] // CHECK:STDOUT: %J.facet.c211a5.1: %J.type = facet_value %Self.as_type.4e7, (%J.lookup_impl_witness.0802bc.1) [symbolic] -// CHECK:STDOUT: %impl.elem0.7d7539.1: %I.type = impl_witness_access %J.lookup_impl_witness.0802bc.1, element0 [symbolic] -// CHECK:STDOUT: %as_type.0c2809.1: type = facet_access_type %impl.elem0.7d7539.1 [symbolic] -// CHECK:STDOUT: %pattern_type.c97a06.1: type = pattern_type %as_type.0c2809.1 [symbolic] +// CHECK:STDOUT: %impl.elem0.82c3d7.1: %facet_type = impl_witness_access %J.lookup_impl_witness.0802bc.1, element0 [symbolic] +// CHECK:STDOUT: %as_type.2a6e07.1: type = facet_access_type %impl.elem0.82c3d7.1 [symbolic] +// CHECK:STDOUT: %pattern_type.cfc624.1: type = pattern_type %as_type.2a6e07.1 [symbolic] // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %T.bf6: %J.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %J.type [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.bf6 [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %pattern_type.8ba: type = pattern_type %T.as_type [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness.0802bc.2: = lookup_impl_witness %T.bf6, @J [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.0802bc.2: = lookup_impl_witness %T, @J [symbolic] // CHECK:STDOUT: %J.facet.c211a5.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.0802bc.2) [symbolic] -// CHECK:STDOUT: %impl.elem0.7d7539.2: %I.type = impl_witness_access %J.lookup_impl_witness.0802bc.2, element0 [symbolic] -// CHECK:STDOUT: %as_type.0c2809.2: type = facet_access_type %impl.elem0.7d7539.2 [symbolic] -// CHECK:STDOUT: %pattern_type.c97a06.2: type = pattern_type %as_type.0c2809.2 [symbolic] +// CHECK:STDOUT: %impl.elem0.82c3d7.2: %facet_type = impl_witness_access %J.lookup_impl_witness.0802bc.2, element0 [symbolic] +// CHECK:STDOUT: %as_type.2a6e07.2: type = facet_access_type %impl.elem0.82c3d7.2 [symbolic] +// CHECK:STDOUT: %pattern_type.cfc624.2: type = pattern_type %as_type.2a6e07.2 [symbolic] // CHECK:STDOUT: %GenericResult.type: type = fn_type @GenericResult [concrete] // CHECK:STDOUT: %GenericResult: %GenericResult.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.106: = require_complete_type %as_type.0c2809.2 [symbolic] +// CHECK:STDOUT: %require_complete.12e: = require_complete_type %as_type.2a6e07.2 [symbolic] // CHECK:STDOUT: %require_complete.8dd: = require_complete_type %T.as_type [symbolic] // CHECK:STDOUT: %.38a: type = fn_type_with_self_type %J.F.type, %J.facet.c211a5.2 [symbolic] // CHECK:STDOUT: %impl.elem1: %.38a = impl_witness_access %J.lookup_impl_witness.0802bc.2, element1 [symbolic] // CHECK:STDOUT: %specific_impl_fn.260: = specific_impl_function %impl.elem1, @J.F(%J.facet.c211a5.2) [symbolic] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %impl.elem0.7d7539.2, @I [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %as_type.0c2809.2, (%I.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.8ad: type = fn_type_with_self_type %I.Op.type, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.658: %.8ad = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.28c: = specific_impl_function %impl.elem0.658, @I.Op(%I.facet) [symbolic] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %impl.elem0.82c3d7.2, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %as_type.2a6e07.2, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.c47: type = fn_type_with_self_type %I.Op.type, %I.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.f6a: %.c47 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.456: = specific_impl_function %impl.elem0.f6a, @I.Op(%I.facet) [symbolic] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %ptr.c06: type = ptr_type %as_type.0c2809.2 [symbolic] -// CHECK:STDOUT: %require_complete.225: = require_complete_type %ptr.c06 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem0.7d7539.2, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %as_type.0c2809.2, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.766: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.2f7: %.766 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.d51: = specific_impl_function %impl.elem0.2f7, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.af1: = lookup_impl_witness %impl.elem0.82c3d7.2, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.9d9: %Destroy.type = facet_value %as_type.2a6e07.2, (%Destroy.lookup_impl_witness.af1) [symbolic] +// CHECK:STDOUT: %.c2f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.9d9 [symbolic] +// CHECK:STDOUT: %impl.elem0.dd1: %.c2f = impl_witness_access %Destroy.lookup_impl_witness.af1, element0 [symbolic] +// CHECK:STDOUT: %ptr.d16: type = ptr_type %as_type.2a6e07.2 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.07a: = specific_impl_function %impl.elem0.dd1, @Destroy.Op(%Destroy.facet.9d9) [symbolic] +// CHECK:STDOUT: %require_complete.0ed: = require_complete_type %ptr.d16 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1700,43 +1705,43 @@ fn F() { // CHECK:STDOUT: %T.patt: %pattern_type.84b = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %t.patt: @GenericResult.%pattern_type.loc12_25 (%pattern_type.8ba) = binding_pattern t [concrete] // CHECK:STDOUT: %t.param_patt: @GenericResult.%pattern_type.loc12_25 (%pattern_type.8ba) = value_param_pattern %t.patt, call_param0 [concrete] -// CHECK:STDOUT: %u.patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.c97a06.2) = binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.c97a06.2) = value_param_pattern %u.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.c97a06.2) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.c97a06.2) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %u.patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.cfc624.2) = binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.cfc624.2) = value_param_pattern %u.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.cfc624.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.cfc624.2) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc12_42: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T.bf6)] -// CHECK:STDOUT: %U.ref.loc12_43: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.dfc] +// CHECK:STDOUT: %T.ref.loc12_42: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)] +// CHECK:STDOUT: %U.ref.loc12_43: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d3b] // CHECK:STDOUT: %T.as_type.loc12_43: type = facet_access_type %T.ref.loc12_42 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc12_43.1: type = converted %T.ref.loc12_42, %T.as_type.loc12_43 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem0.loc12_43: %I.type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.2, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] -// CHECK:STDOUT: %as_type.loc12_43: type = facet_access_type %impl.elem0.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] -// CHECK:STDOUT: %.loc12_43.2: type = converted %impl.elem0.loc12_43, %as_type.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] +// CHECK:STDOUT: %impl.elem0.loc12_43: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.2, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.82c3d7.2)] +// CHECK:STDOUT: %as_type.loc12_43: type = facet_access_type %impl.elem0.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.2a6e07.2)] +// CHECK:STDOUT: %.loc12_43.2: type = converted %impl.elem0.loc12_43, %as_type.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.2a6e07.2)] // CHECK:STDOUT: %.loc12_22: type = splice_block %J.ref [concrete = constants.%J.type] { // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_18.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_18.1 (constants.%T.bf6)] +// CHECK:STDOUT: %T.loc12_18.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %t.param: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc12_28: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T.bf6)] +// CHECK:STDOUT: %T.ref.loc12_28: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc12_28.2: type = facet_access_type %T.ref.loc12_28 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc12_28.2: type = converted %T.ref.loc12_28, %T.as_type.loc12_28.2 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %t: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type) = bind_name t, %t.param -// CHECK:STDOUT: %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = value_param call_param1 -// CHECK:STDOUT: %.loc12_35.1: type = splice_block %.loc12_35.3 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] { -// CHECK:STDOUT: %T.ref.loc12_34: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T.bf6)] -// CHECK:STDOUT: %U.ref.loc12_35: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.dfc] +// CHECK:STDOUT: %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = value_param call_param1 +// CHECK:STDOUT: %.loc12_35.1: type = splice_block %.loc12_35.3 [symbolic = %as_type.loc12_35.1 (constants.%as_type.2a6e07.2)] { +// CHECK:STDOUT: %T.ref.loc12_34: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)] +// CHECK:STDOUT: %U.ref.loc12_35: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d3b] // CHECK:STDOUT: %T.as_type.loc12_35: type = facet_access_type %T.ref.loc12_34 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc12_35.2: type = converted %T.ref.loc12_34, %T.as_type.loc12_35 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem0.loc12_35.2: %I.type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.2, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] -// CHECK:STDOUT: %as_type.loc12_35.2: type = facet_access_type %impl.elem0.loc12_35.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] -// CHECK:STDOUT: %.loc12_35.3: type = converted %impl.elem0.loc12_35.2, %as_type.loc12_35.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] +// CHECK:STDOUT: %impl.elem0.loc12_35.2: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.2, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.82c3d7.2)] +// CHECK:STDOUT: %as_type.loc12_35.2: type = facet_access_type %impl.elem0.loc12_35.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.2a6e07.2)] +// CHECK:STDOUT: %.loc12_35.3: type = converted %impl.elem0.loc12_35.2, %as_type.loc12_35.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.2a6e07.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = out_param call_param2 -// CHECK:STDOUT: %return: ref @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = return_slot %return.param +// CHECK:STDOUT: %u: @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = out_param call_param2 +// CHECK:STDOUT: %return: ref @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1780,29 +1785,29 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.bf6] -// CHECK:STDOUT: %U: %I.type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.dfc] +// CHECK:STDOUT: %U: %facet_type = assoc_const_decl @U [concrete] { +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.d3b] // CHECK:STDOUT: } // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { -// CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.c97a06.1) = binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.c97a06.1) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.c97a06.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.c97a06.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.cfc624.1) = binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.cfc624.1) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.cfc624.1) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.cfc624.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc9_17: %I.type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.1, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.7d7539.1)] -// CHECK:STDOUT: %U.ref.loc9_17: %I.type = name_ref U, %impl.elem0.loc9_17 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.7d7539.1)] -// CHECK:STDOUT: %U.as_type.loc9_17: type = facet_access_type %U.ref.loc9_17 [symbolic = %as_type (constants.%as_type.0c2809.1)] -// CHECK:STDOUT: %.loc9_17: type = converted %U.ref.loc9_17, %U.as_type.loc9_17 [symbolic = %as_type (constants.%as_type.0c2809.1)] -// CHECK:STDOUT: %u.param: @J.F.%as_type (%as_type.0c2809.1) = value_param call_param0 -// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.2 [symbolic = %as_type (constants.%as_type.0c2809.1)] { -// CHECK:STDOUT: %impl.elem0.loc9_11.2: %I.type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.1, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.7d7539.1)] -// CHECK:STDOUT: %U.ref.loc9_11: %I.type = name_ref U, %impl.elem0.loc9_11.2 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.7d7539.1)] -// CHECK:STDOUT: %U.as_type.loc9_11: type = facet_access_type %U.ref.loc9_11 [symbolic = %as_type (constants.%as_type.0c2809.1)] -// CHECK:STDOUT: %.loc9_11.2: type = converted %U.ref.loc9_11, %U.as_type.loc9_11 [symbolic = %as_type (constants.%as_type.0c2809.1)] +// CHECK:STDOUT: %impl.elem0.loc9_17: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.1, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.82c3d7.1)] +// CHECK:STDOUT: %U.ref.loc9_17: %facet_type = name_ref U, %impl.elem0.loc9_17 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.82c3d7.1)] +// CHECK:STDOUT: %U.as_type.loc9_17: type = facet_access_type %U.ref.loc9_17 [symbolic = %as_type (constants.%as_type.2a6e07.1)] +// CHECK:STDOUT: %.loc9_17: type = converted %U.ref.loc9_17, %U.as_type.loc9_17 [symbolic = %as_type (constants.%as_type.2a6e07.1)] +// CHECK:STDOUT: %u.param: @J.F.%as_type (%as_type.2a6e07.1) = value_param call_param0 +// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.2 [symbolic = %as_type (constants.%as_type.2a6e07.1)] { +// CHECK:STDOUT: %impl.elem0.loc9_11.2: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.1, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.82c3d7.1)] +// CHECK:STDOUT: %U.ref.loc9_11: %facet_type = name_ref U, %impl.elem0.loc9_11.2 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.82c3d7.1)] +// CHECK:STDOUT: %U.as_type.loc9_11: type = facet_access_type %U.ref.loc9_11 [symbolic = %as_type (constants.%as_type.2a6e07.1)] +// CHECK:STDOUT: %.loc9_11.2: type = converted %U.ref.loc9_11, %U.as_type.loc9_11 [symbolic = %as_type (constants.%as_type.2a6e07.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @J.F.%as_type (%as_type.0c2809.1) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @J.F.%as_type (%as_type.0c2809.1) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.F.%as_type (%as_type.0c2809.1) = return_slot %return.param +// CHECK:STDOUT: %u: @J.F.%as_type (%as_type.2a6e07.1) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @J.F.%as_type (%as_type.2a6e07.1) = out_param call_param1 +// CHECK:STDOUT: %return: ref @J.F.%as_type (%as_type.2a6e07.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -1815,7 +1820,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! %I.type; +// CHECK:STDOUT: assoc_const U:! %facet_type; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @I.Op(@I.%Self: %I.type) { @@ -1829,96 +1834,94 @@ fn F() { // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.bf6)] // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.0802bc.1)] -// CHECK:STDOUT: %impl.elem0.loc9_11.1: %I.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.7d7539.1)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc9_11.1 [symbolic = %as_type (constants.%as_type.0c2809.1)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %as_type [symbolic = %pattern_type (constants.%pattern_type.c97a06.1)] +// CHECK:STDOUT: %impl.elem0.loc9_11.1: %facet_type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.82c3d7.1)] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc9_11.1 [symbolic = %as_type (constants.%as_type.2a6e07.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %as_type [symbolic = %pattern_type (constants.%pattern_type.cfc624.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.F.%as_type (%as_type.0c2809.1)) -> @J.F.%as_type (%as_type.0c2809.1); +// CHECK:STDOUT: fn(%u.param: @J.F.%as_type (%as_type.2a6e07.1)) -> @J.F.%as_type (%as_type.2a6e07.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GenericResult(%T.loc12_18.2: %J.type) { -// CHECK:STDOUT: %T.loc12_18.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_18.1 (constants.%T.bf6)] +// CHECK:STDOUT: %T.loc12_18.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc12_28.1: type = facet_access_type %T.loc12_18.1 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %pattern_type.loc12_25: type = pattern_type %T.as_type.loc12_28.1 [symbolic = %pattern_type.loc12_25 (constants.%pattern_type.8ba)] // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc12_18.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.0802bc.2)] -// CHECK:STDOUT: %impl.elem0.loc12_35.1: %I.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] -// CHECK:STDOUT: %as_type.loc12_35.1: type = facet_access_type %impl.elem0.loc12_35.1 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] -// CHECK:STDOUT: %pattern_type.loc12_31: type = pattern_type %as_type.loc12_35.1 [symbolic = %pattern_type.loc12_31 (constants.%pattern_type.c97a06.2)] +// CHECK:STDOUT: %impl.elem0.loc12_35.1: %facet_type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.82c3d7.2)] +// CHECK:STDOUT: %as_type.loc12_35.1: type = facet_access_type %impl.elem0.loc12_35.1 [symbolic = %as_type.loc12_35.1 (constants.%as_type.2a6e07.2)] +// CHECK:STDOUT: %pattern_type.loc12_31: type = pattern_type %as_type.loc12_35.1 [symbolic = %pattern_type.loc12_31 (constants.%pattern_type.cfc624.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc12_39: = require_complete_type %as_type.loc12_35.1 [symbolic = %require_complete.loc12_39 (constants.%require_complete.106)] +// CHECK:STDOUT: %require_complete.loc12_39: = require_complete_type %as_type.loc12_35.1 [symbolic = %require_complete.loc12_39 (constants.%require_complete.12e)] // CHECK:STDOUT: %require_complete.loc12_26: = require_complete_type %T.as_type.loc12_28.1 [symbolic = %require_complete.loc12_26 (constants.%require_complete.8dd)] // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc12_28.1, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.c211a5.2)] // CHECK:STDOUT: %.loc13_11.2: type = fn_type_with_self_type constants.%J.F.type, %J.facet [symbolic = %.loc13_11.2 (constants.%.38a)] // CHECK:STDOUT: %impl.elem1.loc13_11.2: @GenericResult.%.loc13_11.2 (%.38a) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %specific_impl_fn.loc13_11.2: = specific_impl_function %impl.elem1.loc13_11.2, @J.F(%J.facet) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.260)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc12_35.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %as_type.loc12_35.1, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet)] -// CHECK:STDOUT: %.loc13_16: type = fn_type_with_self_type constants.%I.Op.type, %I.facet [symbolic = %.loc13_16 (constants.%.8ad)] -// CHECK:STDOUT: %impl.elem0.loc13_16.2: @GenericResult.%.loc13_16 (%.8ad) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.658)] -// CHECK:STDOUT: %specific_impl_fn.loc13_16.2: = specific_impl_function %impl.elem0.loc13_16.2, @I.Op(%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.28c)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc12_35.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %as_type.loc12_35.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] -// CHECK:STDOUT: %.loc13_29.9: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc13_29.9 (constants.%.766)] -// CHECK:STDOUT: %impl.elem0.loc13_29.2: @GenericResult.%.loc13_29.9 (%.766) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.2f7)] -// CHECK:STDOUT: %specific_impl_fn.loc13_29.2: = specific_impl_function %impl.elem0.loc13_29.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.d51)] -// CHECK:STDOUT: %ptr: type = ptr_type %as_type.loc12_35.1 [symbolic = %ptr (constants.%ptr.c06)] -// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %ptr [symbolic = %require_complete.loc13 (constants.%require_complete.225)] +// CHECK:STDOUT: %I.facet.loc13_16: %I.type = facet_value %as_type.loc12_35.1, (%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)] +// CHECK:STDOUT: %.loc13_16: type = fn_type_with_self_type constants.%I.Op.type, %I.facet.loc13_16 [symbolic = %.loc13_16 (constants.%.c47)] +// CHECK:STDOUT: %impl.elem0.loc13_16.2: @GenericResult.%.loc13_16 (%.c47) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.f6a)] +// CHECK:STDOUT: %specific_impl_fn.loc13_16.2: = specific_impl_function %impl.elem0.loc13_16.2, @I.Op(%I.facet.loc13_16) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.456)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc12_35.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.af1)] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %as_type.loc12_35.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.9d9)] +// CHECK:STDOUT: %.loc13_29.8: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc13_29.8 (constants.%.c2f)] +// CHECK:STDOUT: %impl.elem0.loc13_29.2: @GenericResult.%.loc13_29.8 (%.c2f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.dd1)] +// CHECK:STDOUT: %specific_impl_fn.loc13_29.2: = specific_impl_function %impl.elem0.loc13_29.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.07a)] +// CHECK:STDOUT: %ptr: type = ptr_type %as_type.loc12_35.1 [symbolic = %ptr (constants.%ptr.d16)] +// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %ptr [symbolic = %require_complete.loc13 (constants.%require_complete.0ed)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type), %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2)) -> %return.param: @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) { +// CHECK:STDOUT: fn(%t.param: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type), %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2)) -> %return.param: @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %F.ref.loc13_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %T.as_type.loc13_11: type = facet_access_type constants.%T.bf6 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc13_11.1: type = converted constants.%T.bf6, %T.as_type.loc13_11 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc13_11: type = facet_access_type constants.%T [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc13_11.1: type = converted constants.%T, %T.as_type.loc13_11 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem1.loc13_11.1: @GenericResult.%.loc13_11.2 (%.38a) = impl_witness_access constants.%J.lookup_impl_witness.0802bc.2, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref.loc13_14: @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = name_ref u, %u -// CHECK:STDOUT: %.loc13_15.1: %I.type = converted constants.%as_type.0c2809.2, constants.%impl.elem0.7d7539.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] -// CHECK:STDOUT: %.loc13_15.2: %I.type = converted constants.%as_type.0c2809.2, constants.%impl.elem0.7d7539.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] +// CHECK:STDOUT: %u.ref.loc13_14: @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = name_ref u, %u +// CHECK:STDOUT: %.loc13_15.1: %facet_type = converted constants.%as_type.2a6e07.2, constants.%impl.elem0.82c3d7.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.82c3d7.2)] +// CHECK:STDOUT: %.loc13_15.2: %facet_type = converted constants.%as_type.2a6e07.2, constants.%impl.elem0.82c3d7.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.82c3d7.2)] // CHECK:STDOUT: %specific_impl_fn.loc13_11.1: = specific_impl_function %impl.elem1.loc13_11.1, @J.F(constants.%J.facet.c211a5.2) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.260)] -// CHECK:STDOUT: %.loc13_15.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = temporary_storage -// CHECK:STDOUT: %.loc13_15.4: init @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = call %specific_impl_fn.loc13_11.1(%u.ref.loc13_14) to %.loc13_15.3 +// CHECK:STDOUT: %.loc13_15.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = temporary_storage +// CHECK:STDOUT: %.loc13_15.4: init @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = call %specific_impl_fn.loc13_11.1(%u.ref.loc13_14) to %.loc13_15.3 // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, @I.%assoc0 [concrete = constants.%assoc0.ea8] -// CHECK:STDOUT: %impl.elem0.loc13_16.1: @GenericResult.%.loc13_16 (%.8ad) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.658)] +// CHECK:STDOUT: %impl.elem0.loc13_16.1: @GenericResult.%.loc13_16 (%.c47) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.f6a)] // CHECK:STDOUT: %bound_method.loc13_16: = bound_method %.loc13_15.4, %impl.elem0.loc13_16.1 -// CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T.bf6)] +// CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %F.ref.loc13_25: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc13_25: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc13_25: type = converted %T.ref.loc13, %T.as_type.loc13_25 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem1.loc13_25: @GenericResult.%.loc13_11.2 (%.38a) = impl_witness_access constants.%J.lookup_impl_witness.0802bc.2, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref.loc13_28: @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = name_ref u, %u -// CHECK:STDOUT: %.loc13_29.1: %I.type = converted constants.%as_type.0c2809.2, constants.%impl.elem0.7d7539.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] -// CHECK:STDOUT: %.loc13_29.2: %I.type = converted constants.%as_type.0c2809.2, constants.%impl.elem0.7d7539.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] +// CHECK:STDOUT: %u.ref.loc13_28: @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = name_ref u, %u +// CHECK:STDOUT: %.loc13_29.1: %facet_type = converted constants.%as_type.2a6e07.2, constants.%impl.elem0.82c3d7.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.82c3d7.2)] +// CHECK:STDOUT: %.loc13_29.2: %facet_type = converted constants.%as_type.2a6e07.2, constants.%impl.elem0.82c3d7.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.82c3d7.2)] // CHECK:STDOUT: %specific_impl_fn.loc13_25: = specific_impl_function %impl.elem1.loc13_25, @J.F(constants.%J.facet.c211a5.2) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.260)] -// CHECK:STDOUT: %.loc13_29.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = temporary_storage -// CHECK:STDOUT: %.loc13_29.4: init @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) to %.loc13_29.3 -// CHECK:STDOUT: %.loc13_30.1: %I.type = converted constants.%as_type.0c2809.2, constants.%impl.elem0.7d7539.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] -// CHECK:STDOUT: %.loc13_30.2: %I.type = converted constants.%as_type.0c2809.2, constants.%impl.elem0.7d7539.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.7d7539.2)] -// CHECK:STDOUT: %specific_impl_fn.loc13_16.1: = specific_impl_function %impl.elem0.loc13_16.1, @I.Op(constants.%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.28c)] +// CHECK:STDOUT: %.loc13_29.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = temporary_storage +// CHECK:STDOUT: %.loc13_29.4: init @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) to %.loc13_29.3 +// CHECK:STDOUT: %I.facet.loc13_30.1: %I.type = facet_value constants.%as_type.2a6e07.2, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)] +// CHECK:STDOUT: %.loc13_30.1: %I.type = converted constants.%as_type.2a6e07.2, %I.facet.loc13_30.1 [symbolic = %I.facet.loc13_16 (constants.%I.facet)] +// CHECK:STDOUT: %I.facet.loc13_30.2: %I.type = facet_value constants.%as_type.2a6e07.2, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)] +// CHECK:STDOUT: %.loc13_30.2: %I.type = converted constants.%as_type.2a6e07.2, %I.facet.loc13_30.2 [symbolic = %I.facet.loc13_16 (constants.%I.facet)] +// CHECK:STDOUT: %specific_impl_fn.loc13_16.1: = specific_impl_function %impl.elem0.loc13_16.1, @I.Op(constants.%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.456)] // CHECK:STDOUT: %bound_method.loc13_30: = bound_method %.loc13_15.4, %specific_impl_fn.loc13_16.1 -// CHECK:STDOUT: %.loc12_39: ref @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = splice_block %return {} -// CHECK:STDOUT: %.loc13_15.5: ref @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = temporary %.loc13_15.3, %.loc13_15.4 -// CHECK:STDOUT: %.loc13_15.6: @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = bind_value %.loc13_15.5 -// CHECK:STDOUT: %.loc13_29.5: ref @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = temporary %.loc13_29.3, %.loc13_29.4 -// CHECK:STDOUT: %.loc13_29.6: @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = bind_value %.loc13_29.5 -// CHECK:STDOUT: %.loc13_30.3: init @GenericResult.%as_type.loc12_35.1 (%as_type.0c2809.2) = call %bound_method.loc13_30(%.loc13_15.6, %.loc13_29.6) to %.loc12_39 -// CHECK:STDOUT: %as_type.loc13_29: type = facet_access_type constants.%impl.elem0.7d7539.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] -// CHECK:STDOUT: %.loc13_29.7: type = converted constants.%impl.elem0.7d7539.2, %as_type.loc13_29 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] -// CHECK:STDOUT: %impl.elem0.loc13_29.1: @GenericResult.%.loc13_29.9 (%.766) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.2f7)] +// CHECK:STDOUT: %.loc12_39: ref @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = splice_block %return {} +// CHECK:STDOUT: %.loc13_15.5: ref @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = temporary %.loc13_15.3, %.loc13_15.4 +// CHECK:STDOUT: %.loc13_15.6: @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = bind_value %.loc13_15.5 +// CHECK:STDOUT: %.loc13_29.5: ref @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = temporary %.loc13_29.3, %.loc13_29.4 +// CHECK:STDOUT: %.loc13_29.6: @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = bind_value %.loc13_29.5 +// CHECK:STDOUT: %.loc13_30.3: init @GenericResult.%as_type.loc12_35.1 (%as_type.2a6e07.2) = call %bound_method.loc13_30(%.loc13_15.6, %.loc13_29.6) to %.loc12_39 +// CHECK:STDOUT: %impl.elem0.loc13_29.1: @GenericResult.%.loc13_29.8 (%.c2f) = impl_witness_access constants.%Destroy.lookup_impl_witness.af1, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.dd1)] // CHECK:STDOUT: %bound_method.loc13_29.1: = bound_method %.loc13_29.5, %impl.elem0.loc13_29.1 -// CHECK:STDOUT: %specific_impl_fn.loc13_29.1: = specific_impl_function %impl.elem0.loc13_29.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.d51)] +// CHECK:STDOUT: %specific_impl_fn.loc13_29.1: = specific_impl_function %impl.elem0.loc13_29.1, @Destroy.Op(constants.%Destroy.facet.9d9) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.07a)] // CHECK:STDOUT: %bound_method.loc13_29.2: = bound_method %.loc13_29.5, %specific_impl_fn.loc13_29.1 -// CHECK:STDOUT: %addr.loc13_29: @GenericResult.%ptr (%ptr.c06) = addr_of %.loc13_29.5 -// CHECK:STDOUT: %.loc13_29.8: init %empty_tuple.type = call %bound_method.loc13_29.2(%addr.loc13_29) -// CHECK:STDOUT: %as_type.loc13_15: type = facet_access_type constants.%impl.elem0.7d7539.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] -// CHECK:STDOUT: %.loc13_15.7: type = converted constants.%impl.elem0.7d7539.2, %as_type.loc13_15 [symbolic = %as_type.loc12_35.1 (constants.%as_type.0c2809.2)] -// CHECK:STDOUT: %impl.elem0.loc13_15: @GenericResult.%.loc13_29.9 (%.766) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.2f7)] +// CHECK:STDOUT: %addr.loc13_29: @GenericResult.%ptr (%ptr.d16) = addr_of %.loc13_29.5 +// CHECK:STDOUT: %.loc13_29.7: init %empty_tuple.type = call %bound_method.loc13_29.2(%addr.loc13_29) +// CHECK:STDOUT: %impl.elem0.loc13_15: @GenericResult.%.loc13_29.8 (%.c2f) = impl_witness_access constants.%Destroy.lookup_impl_witness.af1, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.dd1)] // CHECK:STDOUT: %bound_method.loc13_15.1: = bound_method %.loc13_15.5, %impl.elem0.loc13_15 -// CHECK:STDOUT: %specific_impl_fn.loc13_15: = specific_impl_function %impl.elem0.loc13_15, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.d51)] +// CHECK:STDOUT: %specific_impl_fn.loc13_15: = specific_impl_function %impl.elem0.loc13_15, @Destroy.Op(constants.%Destroy.facet.9d9) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.07a)] // CHECK:STDOUT: %bound_method.loc13_15.2: = bound_method %.loc13_15.5, %specific_impl_fn.loc13_15 -// CHECK:STDOUT: %addr.loc13_15: @GenericResult.%ptr (%ptr.c06) = addr_of %.loc13_15.5 -// CHECK:STDOUT: %.loc13_15.8: init %empty_tuple.type = call %bound_method.loc13_15.2(%addr.loc13_15) +// CHECK:STDOUT: %addr.loc13_15: @GenericResult.%ptr (%ptr.d16) = addr_of %.loc13_15.5 +// CHECK:STDOUT: %.loc13_15.7: init %empty_tuple.type = call %bound_method.loc13_15.2(%addr.loc13_15) // CHECK:STDOUT: return %.loc13_30.3 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1936,35 +1939,35 @@ fn F() { // CHECK:STDOUT: specific @J.F(constants.%Self.bf6) { // CHECK:STDOUT: %Self => constants.%Self.bf6 // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.0802bc.1 -// CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.7d7539.1 -// CHECK:STDOUT: %as_type => constants.%as_type.0c2809.1 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c97a06.1 +// CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.82c3d7.1 +// CHECK:STDOUT: %as_type => constants.%as_type.2a6e07.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.cfc624.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.c211a5.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericResult(constants.%T.bf6) { -// CHECK:STDOUT: %T.loc12_18.1 => constants.%T.bf6 +// CHECK:STDOUT: specific @GenericResult(constants.%T) { +// CHECK:STDOUT: %T.loc12_18.1 => constants.%T // CHECK:STDOUT: %T.as_type.loc12_28.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type.loc12_25 => constants.%pattern_type.8ba // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.0802bc.2 -// CHECK:STDOUT: %impl.elem0.loc12_35.1 => constants.%impl.elem0.7d7539.2 -// CHECK:STDOUT: %as_type.loc12_35.1 => constants.%as_type.0c2809.2 -// CHECK:STDOUT: %pattern_type.loc12_31 => constants.%pattern_type.c97a06.2 +// CHECK:STDOUT: %impl.elem0.loc12_35.1 => constants.%impl.elem0.82c3d7.2 +// CHECK:STDOUT: %as_type.loc12_35.1 => constants.%as_type.2a6e07.2 +// CHECK:STDOUT: %pattern_type.loc12_31 => constants.%pattern_type.cfc624.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J.F(constants.%J.facet.c211a5.2) { // CHECK:STDOUT: %Self => constants.%J.facet.c211a5.2 // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.0802bc.2 -// CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.7d7539.2 -// CHECK:STDOUT: %as_type => constants.%as_type.0c2809.2 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c97a06.2 +// CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.82c3d7.2 +// CHECK:STDOUT: %as_type => constants.%as_type.2a6e07.2 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.cfc624.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.Op(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet -// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%as_type.0c2809.2 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c97a06.2 +// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%as_type.2a6e07.2 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.cfc624.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- interface_qualified.carbon @@ -3975,14 +3978,14 @@ fn F() { // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.de3 [symbolic_self] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.de3, @Z [symbolic_self] // CHECK:STDOUT: %Z.facet.4f6: %Z.type = facet_value %.Self.as_type, (%Z.lookup_impl_witness) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self] -// CHECK:STDOUT: %Z_where.type.ba1: type = facet_type <@Z where %impl.elem0 = %C.f2e> [symbolic] +// CHECK:STDOUT: %impl.elem0.a33: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %Z_where.type.ba1: type = facet_type <@Z where %impl.elem0.a33 = %C.f2e> [symbolic] // CHECK:STDOUT: %require_complete.ce8: = require_complete_type %Z_where.type.ba1 [symbolic] // CHECK:STDOUT: %Z.impl_witness.fb8: = impl_witness file.%Z.impl_witness_table, @T.as.Z.impl(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %C.131: type = class_type @C, @C(%D) [concrete] -// CHECK:STDOUT: %Z_where.type.1b9: type = facet_type <@Z where %impl.elem0 = %C.131> [concrete] +// CHECK:STDOUT: %Z_where.type.1b9: type = facet_type <@Z where %impl.elem0.a33 = %C.131> [concrete] // CHECK:STDOUT: %complete_type.ac9: = complete_type_witness %Z_where.type.1b9 [concrete] // CHECK:STDOUT: %Z.impl_witness.4bd: = impl_witness file.%Z.impl_witness_table, @T.as.Z.impl(%D) [concrete] // CHECK:STDOUT: %Z.facet.c2a: %Z.type = facet_value %D, (%Z.impl_witness.4bd) [concrete] @@ -4032,7 +4035,7 @@ fn F() { // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.659] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.a33] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %T.ref.loc9_44: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: %C.loc9_45.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc9_45.2 (constants.%C.f2e)] @@ -4113,7 +4116,7 @@ fn F() { // CHECK:STDOUT: generic impl @T.as.Z.impl(%T.loc9_14.1: type) { // CHECK:STDOUT: %T.loc9_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: %C.loc9_45.2: type = class_type @C, @C(%T.loc9_14.2) [symbolic = %C.loc9_45.2 (constants.%C.f2e)] -// CHECK:STDOUT: %Z_where.type: type = facet_type <@Z where constants.%impl.elem0 = %C.loc9_45.2> [symbolic = %Z_where.type (constants.%Z_where.type.ba1)] +// CHECK:STDOUT: %Z_where.type: type = facet_type <@Z where constants.%impl.elem0.a33 = %C.loc9_45.2> [symbolic = %Z_where.type (constants.%Z_where.type.ba1)] // CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.ce8)] // CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table, @T.as.Z.impl(%T.loc9_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.fb8)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 437d1dc7cd8c..d1bf89c6837b 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -96,13 +96,15 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %bound_method.9cd: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a18: %T.as.Destroy.impl.Op.type.f3e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.142: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%i32) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.c04: %ptr.as.Destroy.impl.Op.type.142 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.786: = specific_function %T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.0c8: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.801: %T.as.Destroy.impl.Op.type.0c8 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.288: = specific_function %T.as.Destroy.impl.Op.801, @T.as.Destroy.impl.Op(%array_type) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(%i32) [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.ffb: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.e7e: %AggregateT.as_type.as.Destroy.impl.Op.type.ffb = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.e7e, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [concrete] // CHECK:STDOUT: %ValueBinding: %ValueBinding.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -214,8 +216,8 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc18_34.9: ref %i32 = array_index %a.var, %int_2.loc18_34 // CHECK:STDOUT: %.loc18_34.10: init %i32 = initialize_from %.loc18_34.8 to %.loc18_34.9 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc18_34.11: init %array_type = array_init (%.loc18_34.4, %.loc18_34.7, %.loc18_34.10) to %a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc18_3: init %array_type = converted %.loc18_34.1, %.loc18_34.11 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %array_type = converted %.loc18_34.1, %.loc18_34.11 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_22: type = splice_block %array_type.loc18 [concrete = constants.%array_type] { // 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] @@ -273,16 +275,18 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_8: init %i32 = call %bound_method.loc22_8.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc22_8: init %i32 = converted %int_4, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_8 [concrete = constants.%int_4.940] // CHECK:STDOUT: assign %.loc22_6, %.loc22_8 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc21: = bound_method %pa.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.786] -// CHECK:STDOUT: %bound_method.loc21_3: = bound_method %pa.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %pa.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc21_3: = bound_method %pa.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc21_3: %ptr.5d5 = addr_of %pa.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc21: init %empty_tuple.type = call %bound_method.loc21_3(%addr.loc21_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.801 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.801, @T.as.Destroy.impl.Op(constants.%array_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.288] -// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc21_3(%addr.loc21_3) +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_3.2: %type_where = converted constants.%array_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc18: %ptr.f01 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18_3(%addr.loc18) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_3(%addr.loc18) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -325,8 +329,8 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc26_34.9: ref %i32 = array_index %a.var, %int_2.loc26_34 // CHECK:STDOUT: %.loc26_34.10: init %i32 = initialize_from %.loc26_34.8 to %.loc26_34.9 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc26_34.11: init %array_type = array_init (%.loc26_34.4, %.loc26_34.7, %.loc26_34.10) to %a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc26_3: init %array_type = converted %.loc26_34.1, %.loc26_34.11 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc26_3 +// CHECK:STDOUT: %.loc26_3.1: init %array_type = converted %.loc26_34.1, %.loc26_34.11 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc26_3.1 // CHECK:STDOUT: %.loc26_22: type = splice_block %array_type.loc26 [concrete = constants.%array_type] { // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -376,16 +380,20 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc32_7.2: %i32 = converted %int_0.loc32, %.loc32_7.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc32_8.1: ref %i32 = array_index %.loc32_5.2, %.loc32_7.2 // CHECK:STDOUT: %.loc32_8.2: %i32 = bind_value %.loc32_8.1 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc32: = bound_method %.loc32_5.2, constants.%T.as.Destroy.impl.Op.801 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.801, @T.as.Destroy.impl.Op(constants.%array_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.288] -// CHECK:STDOUT: %bound_method.loc32_5: = bound_method %.loc32_5.2, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc32: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc32_5.3: %type_where = converted constants.%array_type, %facet_value.loc32 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc32: = bound_method %.loc32_5.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc32_5: = bound_method %.loc32_5.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc32: %ptr.f01 = addr_of %.loc32_5.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc32: init %empty_tuple.type = call %bound_method.loc32_5(%addr.loc32) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc26: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.801 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.801, @T.as.Destroy.impl.Op(constants.%array_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.288] -// CHECK:STDOUT: %bound_method.loc26_3: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc32: init %empty_tuple.type = call %bound_method.loc32_5(%addr.loc32) +// CHECK:STDOUT: %facet_value.loc26: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc26_3.2: %type_where = converted constants.%array_type, %facet_value.loc26 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc26: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc26_3: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc26: %ptr.f01 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc26: init %empty_tuple.type = call %bound_method.loc26_3(%addr.loc26) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc26: init %empty_tuple.type = call %bound_method.loc26_3(%addr.loc26) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index e351867900b0..6baba0aabba1 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -92,13 +92,15 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %bound_method.9cd: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.0c8: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.801: %T.as.Destroy.impl.Op.type.0c8 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.288: = specific_function %T.as.Destroy.impl.Op.801, @T.as.Destroy.impl.Op(%array_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a18: %T.as.Destroy.impl.Op.type.f3e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.ffb: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.e7e: %AggregateT.as_type.as.Destroy.impl.Op.type.ffb = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.e7e, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.142: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%i32) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.c04: %ptr.as.Destroy.impl.Op.type.142 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.786: = specific_function %T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(%ptr.235) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -269,26 +271,30 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc41_10: init %i32 = call %bound_method.loc41_10.2(%int_4.loc41) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc41_10: init %i32 = converted %int_4.loc41, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc41_10 [concrete = constants.%int_4.940] // CHECK:STDOUT: assign %.loc41_8.2, %.loc41_10 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc41: = bound_method %.loc41_5.2, constants.%T.as.Destroy.impl.Op.801 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.801, @T.as.Destroy.impl.Op(constants.%array_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.288] -// CHECK:STDOUT: %bound_method.loc41_5: = bound_method %.loc41_5.2, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc41: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc41_5.3: %type_where = converted constants.%array_type, %facet_value.loc41 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc41: = bound_method %.loc41_5.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc41_5: = bound_method %.loc41_5.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc41: %ptr.f01 = addr_of %.loc41_5.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc41: init %empty_tuple.type = call %bound_method.loc41_5(%addr.loc41) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc36_21: = bound_method %.loc36_21.2, constants.%T.as.Destroy.impl.Op.801 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.801, @T.as.Destroy.impl.Op(constants.%array_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.288] -// CHECK:STDOUT: %bound_method.loc36_21: = bound_method %.loc36_21.2, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc41: init %empty_tuple.type = call %bound_method.loc41_5(%addr.loc41) +// CHECK:STDOUT: %facet_value.loc36: %type_where = facet_value constants.%array_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc36_21.3: %type_where = converted constants.%array_type, %facet_value.loc36 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc36: = bound_method %.loc36_21.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.e7e, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc36_21: = bound_method %.loc36_21.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc36_21: %ptr.f01 = addr_of %.loc36_21.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc36_21: init %empty_tuple.type = call %bound_method.loc36_21(%addr.loc36_21) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc36_3: = bound_method %pf.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.786] -// CHECK:STDOUT: %bound_method.loc36_3: = bound_method %pf.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc36: init %empty_tuple.type = call %bound_method.loc36_21(%addr.loc36_21) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc36: = bound_method %pf.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc36_3: = bound_method %pf.var, %ptr.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc36_3: %ptr.5d5 = addr_of %pf.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc36_3: init %empty_tuple.type = call %bound_method.loc36_3(%addr.loc36_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc23: = bound_method %pb.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.4: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.786] -// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %pb.var, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc36: init %empty_tuple.type = call %bound_method.loc36_3(%addr.loc36_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc23: = bound_method %pb.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %pb.var, %ptr.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc23_3: %ptr.5d5 = addr_of %pb.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23_3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/as_type_of_type.carbon b/toolchain/check/testdata/interface/as_type_of_type.carbon index 4b6be54589d5..71160339aaac 100644 --- a/toolchain/check/testdata/interface/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/as_type_of_type.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon +// 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 // @@ -14,8 +14,12 @@ interface Empty {} +class C {} + +impl C as Empty {} + fn F(T:! Empty) { - var x: T; + var x: T*; } // CHECK:STDOUT: --- as_type_of_type.carbon @@ -23,25 +27,36 @@ fn F(T:! Empty) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty> [concrete] // CHECK:STDOUT: %Self.e3a: %Empty.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %T.e3a: %Empty.type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %pattern_type.639: type = pattern_type %Empty.type [concrete] -// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.e3a [symbolic] -// CHECK:STDOUT: %require_complete.14a: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %pattern_type.ddf: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] +// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.071: = impl_witness @C.%Destroy.impl_witness_table [concrete] +// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] +// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] +// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %Empty.impl_witness: = impl_witness file.%Empty.impl_witness_table [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %T: %Empty.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.639: type = pattern_type %Empty.type [concrete] +// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] +// CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %ptr.2b9: type = ptr_type %T.as_type [symbolic] // CHECK:STDOUT: %require_complete.1f4: = require_complete_type %ptr.2b9 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.e3a, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %T.as_type, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.605: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.605 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %pattern_type.ae3: type = pattern_type %ptr.2b9 [symbolic] +// CHECK:STDOUT: %ptr.886: type = ptr_type %ptr.2b9 [symbolic] +// CHECK:STDOUT: %require_complete.67e: = require_complete_type %ptr.886 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.85e: = lookup_impl_witness %ptr.2b9, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.b61: %Destroy.type = facet_value %ptr.2b9, (%Destroy.lookup_impl_witness.85e) [symbolic] +// CHECK:STDOUT: %.2e5: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.b61 [symbolic] +// CHECK:STDOUT: %impl.elem0.ceb: %.2e5 = impl_witness_access %Destroy.lookup_impl_witness.85e, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.aea: = specific_impl_function %impl.elem0.ceb, @Destroy.Op(%Destroy.facet.b61) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,18 +72,26 @@ fn F(T:! Empty) { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Empty = %Empty.decl +// CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [concrete = constants.%Empty.type] {} {} +// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} +// CHECK:STDOUT: impl_decl @C.as.Empty.impl [concrete] {} { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] +// CHECK:STDOUT: } +// CHECK:STDOUT: %Empty.impl_witness_table = impl_witness_table (), @C.as.Empty.impl [concrete] +// CHECK:STDOUT: %Empty.impl_witness: = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.639 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17: type = splice_block %Empty.ref [concrete = constants.%Empty.type] { +// CHECK:STDOUT: %.loc21: type = splice_block %Empty.ref [concrete = constants.%Empty.type] { // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc17_6.2: %Empty.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_6.1 (constants.%T.e3a)] +// CHECK:STDOUT: %T.loc21_6.2: %Empty.type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,47 +103,82 @@ fn F(T:! Empty) { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc17_6.2: %Empty.type) { -// CHECK:STDOUT: %T.loc17_6.1: %Empty.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_6.1 (constants.%T.e3a)] +// CHECK:STDOUT: impl @C.as.Destroy.impl: @C.%Self.ref as constants.%Destroy.type { +// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] { +// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %.loc17: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] +// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl +// CHECK:STDOUT: witness = @C.%Destroy.impl_witness +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: impl @C.as.Empty.impl: %C.ref as %Empty.ref { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: witness = file.%Empty.impl_witness +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @C { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] +// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {} +// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete] +// CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.071] +// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] +// CHECK:STDOUT: complete_type_witness = %complete_type +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op"; +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @F(%T.loc21_6.2: %Empty.type) { +// CHECK:STDOUT: %T.loc21_6.1: %Empty.type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc18_10.2: type = facet_access_type %T.loc17_6.1 [symbolic = %T.as_type.loc18_10.2 (constants.%T.as_type)] -// CHECK:STDOUT: %require_complete.loc18_10: = require_complete_type %T.as_type.loc18_10.2 [symbolic = %require_complete.loc18_10 (constants.%require_complete.14a)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc18_10.2 [symbolic = %pattern_type (constants.%pattern_type.ddf)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.loc17_6.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %T.as_type.loc18_10.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] -// CHECK:STDOUT: %.loc18_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc18_3.3 (constants.%.605)] -// CHECK:STDOUT: %impl.elem0.loc18_3.2: @F.%.loc18_3.3 (%.605) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc18_3.2: = specific_impl_function %impl.elem0.loc18_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc18_3.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc18_10.2 [symbolic = %ptr (constants.%ptr.2b9)] -// CHECK:STDOUT: %require_complete.loc18_3: = require_complete_type %ptr [symbolic = %require_complete.loc18_3 (constants.%require_complete.1f4)] +// CHECK:STDOUT: %T.as_type.loc22_11.2: type = facet_access_type %T.loc21_6.1 [symbolic = %T.as_type.loc22_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %ptr.loc22_11.2: type = ptr_type %T.as_type.loc22_11.2 [symbolic = %ptr.loc22_11.2 (constants.%ptr.2b9)] +// CHECK:STDOUT: %require_complete.loc22_11: = require_complete_type %ptr.loc22_11.2 [symbolic = %require_complete.loc22_11 (constants.%require_complete.1f4)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc22_11.2 [symbolic = %pattern_type (constants.%pattern_type.ae3)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc22_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.85e)] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc22_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.b61)] +// CHECK:STDOUT: %.loc22_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc22_3.2 (constants.%.2e5)] +// CHECK:STDOUT: %impl.elem0.loc22_3.2: @F.%.loc22_3.2 (%.2e5) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0.ceb)] +// CHECK:STDOUT: %specific_impl_fn.loc22_3.2: = specific_impl_function %impl.elem0.loc22_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn.aea)] +// CHECK:STDOUT: %ptr.loc22_3: type = ptr_type %ptr.loc22_11.2 [symbolic = %ptr.loc22_3 (constants.%ptr.886)] +// CHECK:STDOUT: %require_complete.loc22_3: = require_complete_type %ptr.loc22_3 [symbolic = %require_complete.loc22_3 (constants.%require_complete.67e)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.ddf) = binding_pattern x [concrete] -// CHECK:STDOUT: %x.var_patt: @F.%pattern_type (%pattern_type.ddf) = var_pattern %x.patt [concrete] +// CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.ae3) = binding_pattern x [concrete] +// CHECK:STDOUT: %x.var_patt: @F.%pattern_type (%pattern_type.ae3) = var_pattern %x.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %x.var: ref @F.%T.as_type.loc18_10.2 (%T.as_type) = var %x.var_patt -// CHECK:STDOUT: %.loc18_10.1: type = splice_block %.loc18_10.2 [symbolic = %T.as_type.loc18_10.2 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc17_6.2 [symbolic = %T.loc17_6.1 (constants.%T.e3a)] -// CHECK:STDOUT: %T.as_type.loc18_10.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_10.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc18_10.2: type = converted %T.ref, %T.as_type.loc18_10.1 [symbolic = %T.as_type.loc18_10.2 (constants.%T.as_type)] +// CHECK:STDOUT: %x.var: ref @F.%ptr.loc22_11.2 (%ptr.2b9) = var %x.var_patt +// CHECK:STDOUT: %.loc22_11.1: type = splice_block %ptr.loc22_11.1 [symbolic = %ptr.loc22_11.2 (constants.%ptr.2b9)] { +// CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc21_6.2 [symbolic = %T.loc21_6.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc22_11.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc22_11.2: type = converted %T.ref, %T.as_type.loc22_11.1 [symbolic = %T.as_type.loc22_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %ptr.loc22_11.1: type = ptr_type %.loc22_11.2 [symbolic = %ptr.loc22_11.2 (constants.%ptr.2b9)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: ref @F.%T.as_type.loc18_10.2 (%T.as_type) = bind_name x, %x.var -// CHECK:STDOUT: %T.as_type.loc18_3: type = facet_access_type constants.%T.e3a [symbolic = %T.as_type.loc18_10.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc18_3.1: type = converted constants.%T.e3a, %T.as_type.loc18_3 [symbolic = %T.as_type.loc18_10.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem0.loc18_3.1: @F.%.loc18_3.3 (%.605) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %x.var, %impl.elem0.loc18_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc18_3.1: = specific_impl_function %impl.elem0.loc18_3.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc18_3.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %x.var, %specific_impl_fn.loc18_3.1 -// CHECK:STDOUT: %addr: @F.%ptr (%ptr.2b9) = addr_of %x.var -// CHECK:STDOUT: %.loc18_3.2: init %empty_tuple.type = call %bound_method.loc18_3.2(%addr) +// CHECK:STDOUT: %x: ref @F.%ptr.loc22_11.2 (%ptr.2b9) = bind_name x, %x.var +// CHECK:STDOUT: %impl.elem0.loc22_3.1: @F.%.loc22_3.2 (%.2e5) = impl_witness_access constants.%Destroy.lookup_impl_witness.85e, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0.ceb)] +// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %x.var, %impl.elem0.loc22_3.1 +// CHECK:STDOUT: %specific_impl_fn.loc22_3.1: = specific_impl_function %impl.elem0.loc22_3.1, @Destroy.Op(constants.%Destroy.facet.b61) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn.aea)] +// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %x.var, %specific_impl_fn.loc22_3.1 +// CHECK:STDOUT: %addr: @F.%ptr.loc22_3 (%ptr.886) = addr_of %x.var +// CHECK:STDOUT: %.loc22_3.1: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.e3a) { -// CHECK:STDOUT: %T.loc17_6.1 => constants.%T.e3a +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc21_6.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index 8095c3a6f985..baa6436566aa 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -2,7 +2,7 @@ // 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 +// 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 // @@ -1251,8 +1251,8 @@ fn Works() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } @@ -1458,8 +1458,8 @@ fn Works() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc14_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index fd3f5ba921e8..04e75f575da3 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -167,16 +167,19 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.092: type = tuple_type (%X, %Y, %ptr.fb6) [concrete] // CHECK:STDOUT: %pattern_type.48d: type = pattern_type %tuple.type.092 [concrete] // CHECK:STDOUT: %Y.as.A.impl.F.specific_fn: = specific_function %Y.as.A.impl.F, @Y.as.A.impl.F(%Z) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.5ec: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T.8b3) [symbolic] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.4a9: %T.as.Destroy.impl.Op.type.5ec = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.5ab: = impl_witness imports.%Destroy.impl_witness_table, @T.as.Destroy.impl(%tuple.type.092) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.8d5: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.092) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.1d9: %T.as.Destroy.impl.Op.type.8d5 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %AggregateT: %type_where = bind_symbolic_name AggregateT, 0 [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%AggregateT) [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8a0: %AggregateT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic] +// CHECK:STDOUT: %facet_value.352: %type_where = facet_value %tuple.type.092, () [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.89a: = impl_witness imports.%Destroy.impl_witness_table.2d3, @AggregateT.as_type.as.Destroy.impl(%facet_value.352) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.ec5: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.352) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.ed3: %AggregateT.as_type.as.Destroy.impl.Op.type.ec5 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5df: type = ptr_type %tuple.type.092 [concrete] // CHECK:STDOUT: %complete_type.aab: = complete_type_witness %ptr.5df [concrete] -// CHECK:STDOUT: %Destroy.facet.5ff: %Destroy.type = facet_value %tuple.type.092, (%Destroy.impl_witness.5ab) [concrete] -// CHECK:STDOUT: %.9ec: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.5ff [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.1d9, @T.as.Destroy.impl.Op(%tuple.type.092) [concrete] +// CHECK:STDOUT: %Destroy.facet.d0e: %Destroy.type = facet_value %tuple.type.092, (%Destroy.impl_witness.89a) [concrete] +// CHECK:STDOUT: %.f61: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.d0e [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.ed3, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.352) [concrete] // CHECK:STDOUT: %T.7bf: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.809: type = pattern_type %A.type.0a4 [concrete] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] @@ -190,12 +193,13 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.512: type = pattern_type %tuple.type.af6 [symbolic] // CHECK:STDOUT: %specific_impl_fn.940: = specific_impl_function %impl.elem0.1cf, @A.F(%X, %A.facet.ef3, %Z) [symbolic] // CHECK:STDOUT: %require_complete.6ed: = require_complete_type %tuple.type.af6 [symbolic] +// CHECK:STDOUT: %facet_value.caf: %type_where = facet_value %tuple.type.af6, () [symbolic] // CHECK:STDOUT: %ptr.fd2: type = ptr_type %tuple.type.af6 [symbolic] // CHECK:STDOUT: %require_complete.b2a: = require_complete_type %ptr.fd2 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type.af6, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.aef: %Destroy.type = facet_value %tuple.type.af6, (%Destroy.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.47b: = lookup_impl_witness %tuple.type.af6, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.aef: %Destroy.type = facet_value %tuple.type.af6, (%Destroy.lookup_impl_witness.47b) [symbolic] // CHECK:STDOUT: %.650: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.aef [symbolic] -// CHECK:STDOUT: %impl.elem0.142: %.650 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %impl.elem0.142: %.650 = impl_witness_access %Destroy.lookup_impl_witness.47b, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.fc8: = specific_impl_function %impl.elem0.142, @Destroy.Op(%Destroy.facet.aef) [symbolic] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] @@ -222,8 +226,8 @@ fn CallIndirect() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.0e4: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.31ff4e.1) = import_ref Core//prelude/parts/copy, loc36_31, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.8a8b1a.1)] // CHECK:STDOUT: %Copy.impl_witness_table.53c = impl_witness_table (%Core.import_ref.0e4), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.50f: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.5ec) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.4a9)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.50f), @T.as.Destroy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.d51: @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op.type (%AggregateT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc29_29, loaded [symbolic = @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op (constants.%AggregateT.as_type.as.Destroy.impl.Op.8a0)] +// CHECK:STDOUT: %Destroy.impl_witness_table.2d3 = impl_witness_table (%Core.import_ref.d51), @AggregateT.as_type.as.Destroy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -268,6 +272,8 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc26_16.2: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc26_16.1 (constants.%T.7bf)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {} +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.092, () [concrete = constants.%facet_value.352] +// CHECK:STDOUT: %.loc28: %type_where = converted constants.%tuple.type.092, %facet_value [concrete = constants.%facet_value.352] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @A(%T.loc5_13.2: type) { @@ -527,11 +533,13 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc23_22.1: ref %tuple.type.092 = temporary_storage // CHECK:STDOUT: %Y.as.A.impl.F.call: init %tuple.type.092 = call %specific_fn(%addr.loc23_20) to %.loc23_22.1 // CHECK:STDOUT: %.loc23_22.2: ref %tuple.type.092 = temporary %.loc23_22.1, %Y.as.A.impl.F.call -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc23_22.2, constants.%T.as.Destroy.impl.Op.1d9 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.1d9, @T.as.Destroy.impl.Op(constants.%tuple.type.092) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %.loc23_22.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.092, () [concrete = constants.%facet_value.352] +// CHECK:STDOUT: %.loc23_22.3: %type_where = converted constants.%tuple.type.092, %facet_value [concrete = constants.%facet_value.352] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc23_22.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.ed3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.ed3, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.352) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc23_22.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc23_22: %ptr.5df = addr_of %.loc23_22.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc23_22) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc23_22) // CHECK:STDOUT: %Z.as.Destroy.impl.Op.bound: = bound_method %u.var, constants.%Z.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc22: %ptr.fb6 = addr_of %u.var // CHECK:STDOUT: %Z.as.Destroy.impl.Op.call: init %empty_tuple.type = call %Z.as.Destroy.impl.Op.bound(%addr.loc22) @@ -550,10 +558,11 @@ fn CallIndirect() { // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.F(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.940)] // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%ptr.fb6) [symbolic = %tuple.type (constants.%tuple.type.af6)] // CHECK:STDOUT: %require_complete.loc28_12.1: = require_complete_type %tuple.type [symbolic = %require_complete.loc28_12.1 (constants.%require_complete.6ed)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] +// CHECK:STDOUT: %facet_value.loc28_12.2: %type_where = facet_value %tuple.type, () [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.caf)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.47b)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.aef)] -// CHECK:STDOUT: %.loc28_12.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.5 (constants.%.650)] -// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.5 (%.650) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.142)] +// CHECK:STDOUT: %.loc28_12.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.6 (constants.%.650)] +// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.6 (%.650) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.142)] // CHECK:STDOUT: %specific_impl_fn.loc28_12.2: = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.fc8)] // CHECK:STDOUT: %ptr: type = ptr_type %tuple.type [symbolic = %ptr (constants.%ptr.fd2)] // CHECK:STDOUT: %require_complete.loc28_12.2: = require_complete_type %ptr [symbolic = %require_complete.loc28_12.2 (constants.%require_complete.b2a)] @@ -580,12 +589,14 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.af6) = temporary_storage // CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.af6) = call %specific_impl_fn.loc28_4.1(%addr.loc28_10) to %.loc28_12.1 // CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.af6) = temporary %.loc28_12.1, %.loc28_12.2 -// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.5 (%.650) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.142)] +// CHECK:STDOUT: %facet_value.loc28_12.1: %type_where = facet_value constants.%tuple.type.af6, () [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.caf)] +// CHECK:STDOUT: %.loc28_12.4: %type_where = converted constants.%tuple.type.af6, %facet_value.loc28_12.1 [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.caf)] +// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.6 (%.650) = impl_witness_access constants.%Destroy.lookup_impl_witness.47b, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.142)] // CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.3, %impl.elem0.loc28_12.1 // CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.Op(constants.%Destroy.facet.aef) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.fc8)] // CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.3, %specific_impl_fn.loc28_12.1 // CHECK:STDOUT: %addr.loc28_12: @CallGeneric.%ptr (%ptr.fd2) = addr_of %.loc28_12.3 -// CHECK:STDOUT: %.loc28_12.4: init %empty_tuple.type = call %bound_method.loc28_12.2(%addr.loc28_12) +// CHECK:STDOUT: %.loc28_12.5: init %empty_tuple.type = call %bound_method.loc28_12.2(%addr.loc28_12) // CHECK:STDOUT: %Z.as.Destroy.impl.Op.bound: = bound_method %u.var, constants.%Z.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc27: %ptr.fb6 = addr_of %u.var // CHECK:STDOUT: %Z.as.Destroy.impl.Op.call: init %empty_tuple.type = call %Z.as.Destroy.impl.Op.bound(%addr.loc27) @@ -701,11 +712,12 @@ fn CallIndirect() { // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%Y.as.A.impl.F.specific_fn // CHECK:STDOUT: %tuple.type => constants.%tuple.type.092 // CHECK:STDOUT: %require_complete.loc28_12.1 => constants.%complete_type.05d -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.5ab -// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.5ff -// CHECK:STDOUT: %.loc28_12.5 => constants.%.9ec -// CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%T.as.Destroy.impl.Op.1d9 -// CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value.loc28_12.2 => constants.%facet_value.352 +// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.89a +// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.d0e +// CHECK:STDOUT: %.loc28_12.6 => constants.%.f61 +// CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%AggregateT.as_type.as.Destroy.impl.Op.ed3 +// CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %ptr => constants.%ptr.5df // CHECK:STDOUT: %require_complete.loc28_12.2 => constants.%complete_type.aab // CHECK:STDOUT: } @@ -819,16 +831,19 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.0b2: type = pattern_type %tuple.type.415 [concrete] // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.417: = specific_function %tuple.type.as.A.impl.F.e39, @tuple.type.as.A.impl.F(%Y1, %Y2, %X, %Z) [concrete] // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.5ec: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T.8b3) [symbolic] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.4a9: %T.as.Destroy.impl.Op.type.5ec = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.51a: = impl_witness imports.%Destroy.impl_witness_table, @T.as.Destroy.impl(%tuple.type.415) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a9c: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.415) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.21f: %T.as.Destroy.impl.Op.type.a9c = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %AggregateT: %type_where = bind_symbolic_name AggregateT, 0 [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%AggregateT) [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8a0: %AggregateT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic] +// CHECK:STDOUT: %facet_value.71a: %type_where = facet_value %tuple.type.415, () [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.37a: = impl_witness imports.%Destroy.impl_witness_table.2d3, @AggregateT.as_type.as.Destroy.impl(%facet_value.71a) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.d92: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.71a) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.f1a: %AggregateT.as_type.as.Destroy.impl.Op.type.d92 = struct_value () [concrete] // CHECK:STDOUT: %ptr.ad9: type = ptr_type %tuple.type.415 [concrete] // CHECK:STDOUT: %complete_type.e23: = complete_type_witness %ptr.ad9 [concrete] -// CHECK:STDOUT: %Destroy.facet.04e: %Destroy.type = facet_value %tuple.type.415, (%Destroy.impl_witness.51a) [concrete] -// CHECK:STDOUT: %.d54: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.04e [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.21f, @T.as.Destroy.impl.Op(%tuple.type.415) [concrete] +// CHECK:STDOUT: %Destroy.facet.684: %Destroy.type = facet_value %tuple.type.415, (%Destroy.impl_witness.37a) [concrete] +// CHECK:STDOUT: %.27f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.684 [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.f1a, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.71a) [concrete] // CHECK:STDOUT: %T.7bf: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.809: type = pattern_type %A.type.0a4 [concrete] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] @@ -843,12 +858,13 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.f87: type = pattern_type %tuple.type.780 [symbolic] // CHECK:STDOUT: %specific_impl_fn.940: = specific_impl_function %impl.elem0.1cf, @A.F(%X, %A.facet.ef3, %Z) [symbolic] // CHECK:STDOUT: %require_complete.4ef: = require_complete_type %tuple.type.780 [symbolic] +// CHECK:STDOUT: %facet_value.52b: %type_where = facet_value %tuple.type.780, () [symbolic] // CHECK:STDOUT: %ptr.563: type = ptr_type %tuple.type.780 [symbolic] // CHECK:STDOUT: %require_complete.147: = require_complete_type %ptr.563 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type.780, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.be7: %Destroy.type = facet_value %tuple.type.780, (%Destroy.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.295: = lookup_impl_witness %tuple.type.780, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.be7: %Destroy.type = facet_value %tuple.type.780, (%Destroy.lookup_impl_witness.295) [symbolic] // CHECK:STDOUT: %.6b1: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.be7 [symbolic] -// CHECK:STDOUT: %impl.elem0.f91: %.6b1 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %impl.elem0.f91: %.6b1 = impl_witness_access %Destroy.lookup_impl_witness.295, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.bf8: = specific_impl_function %impl.elem0.f91, @Destroy.Op(%Destroy.facet.be7) [symbolic] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] @@ -863,8 +879,8 @@ fn CallIndirect() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.50f: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.5ec) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.4a9)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.50f), @T.as.Destroy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.d51: @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op.type (%AggregateT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc29_29, loaded [symbolic = @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op (constants.%AggregateT.as_type.as.Destroy.impl.Op.8a0)] +// CHECK:STDOUT: %Destroy.impl_witness_table.2d3 = impl_witness_table (%Core.import_ref.d51), @AggregateT.as_type.as.Destroy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -924,6 +940,8 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc27_16.2: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc27_16.1 (constants.%T.7bf)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {} +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.415, () [concrete = constants.%facet_value.71a] +// CHECK:STDOUT: %.loc28: %type_where = converted constants.%tuple.type.415, %facet_value [concrete = constants.%facet_value.71a] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @A(%T.loc5_13.2: type) { @@ -1210,11 +1228,13 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc24_38.6: %Z = bind_value %.loc24_38.5 // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init %tuple.type.415 = call %specific_fn(%.loc24_38.6) to %.loc24_39.1 // CHECK:STDOUT: %.loc24_39.2: ref %tuple.type.415 = temporary %.loc24_39.1, %tuple.type.as.A.impl.F.call -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc24_39.2, constants.%T.as.Destroy.impl.Op.21f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.21f, @T.as.Destroy.impl.Op(constants.%tuple.type.415) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %.loc24_39.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.415, () [concrete = constants.%facet_value.71a] +// CHECK:STDOUT: %.loc24_39.3: %type_where = converted constants.%tuple.type.415, %facet_value [concrete = constants.%facet_value.71a] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc24_39.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.f1a +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.f1a, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.71a) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc24_39.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc24_39: %ptr.ad9 = addr_of %.loc24_39.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc24_39) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc24_39) // CHECK:STDOUT: %Z.as.Destroy.impl.Op.bound: = bound_method %.loc24_38.4, constants.%Z.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc24_38: %ptr.fb6 = addr_of %.loc24_38.4 // CHECK:STDOUT: %Z.as.Destroy.impl.Op.call: init %empty_tuple.type = call %Z.as.Destroy.impl.Op.bound(%addr.loc24_38) @@ -1233,10 +1253,11 @@ fn CallIndirect() { // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.F(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.940)] // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.780)] // CHECK:STDOUT: %require_complete.loc28_12.1: = require_complete_type %tuple.type [symbolic = %require_complete.loc28_12.1 (constants.%require_complete.4ef)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] +// CHECK:STDOUT: %facet_value.loc28_12.2: %type_where = facet_value %tuple.type, () [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.52b)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.295)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.be7)] -// CHECK:STDOUT: %.loc28_12.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.5 (constants.%.6b1)] -// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.5 (%.6b1) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.f91)] +// CHECK:STDOUT: %.loc28_12.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.6 (constants.%.6b1)] +// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.6 (%.6b1) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.f91)] // CHECK:STDOUT: %specific_impl_fn.loc28_12.2: = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.bf8)] // CHECK:STDOUT: %ptr: type = ptr_type %tuple.type [symbolic = %ptr (constants.%ptr.563)] // CHECK:STDOUT: %require_complete.loc28_12.2: = require_complete_type %ptr [symbolic = %require_complete.loc28_12.2 (constants.%require_complete.147)] @@ -1260,12 +1281,14 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc28_11.6: %Z = bind_value %.loc28_11.5 // CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.780) = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) to %.loc28_12.1 // CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.780) = temporary %.loc28_12.1, %.loc28_12.2 -// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.5 (%.6b1) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.f91)] +// CHECK:STDOUT: %facet_value.loc28_12.1: %type_where = facet_value constants.%tuple.type.780, () [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.52b)] +// CHECK:STDOUT: %.loc28_12.4: %type_where = converted constants.%tuple.type.780, %facet_value.loc28_12.1 [symbolic = %facet_value.loc28_12.2 (constants.%facet_value.52b)] +// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.6 (%.6b1) = impl_witness_access constants.%Destroy.lookup_impl_witness.295, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.f91)] // CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.3, %impl.elem0.loc28_12.1 // CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.Op(constants.%Destroy.facet.be7) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.bf8)] // CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.3, %specific_impl_fn.loc28_12.1 // CHECK:STDOUT: %addr.loc28_12: @CallGeneric.%ptr (%ptr.563) = addr_of %.loc28_12.3 -// CHECK:STDOUT: %.loc28_12.4: init %empty_tuple.type = call %bound_method.loc28_12.2(%addr.loc28_12) +// CHECK:STDOUT: %.loc28_12.5: init %empty_tuple.type = call %bound_method.loc28_12.2(%addr.loc28_12) // CHECK:STDOUT: %Z.as.Destroy.impl.Op.bound: = bound_method %.loc28_11.4, constants.%Z.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc28_11: %ptr.fb6 = addr_of %.loc28_11.4 // CHECK:STDOUT: %Z.as.Destroy.impl.Op.call: init %empty_tuple.type = call %Z.as.Destroy.impl.Op.bound(%addr.loc28_11) @@ -1431,11 +1454,12 @@ fn CallIndirect() { // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%tuple.type.as.A.impl.F.specific_fn.417 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.415 // CHECK:STDOUT: %require_complete.loc28_12.1 => constants.%complete_type.aa8 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.51a -// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.04e -// CHECK:STDOUT: %.loc28_12.5 => constants.%.d54 -// CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%T.as.Destroy.impl.Op.21f -// CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value.loc28_12.2 => constants.%facet_value.71a +// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.impl_witness.37a +// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.684 +// CHECK:STDOUT: %.loc28_12.6 => constants.%.27f +// CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%AggregateT.as_type.as.Destroy.impl.Op.f1a +// CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %ptr => constants.%ptr.ad9 // CHECK:STDOUT: %require_complete.loc28_12.2 => constants.%complete_type.e23 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interop/cpp/builtins.carbon b/toolchain/check/testdata/interop/cpp/builtins.carbon index a50a563ed5df..e21addcaf3b7 100644 --- a/toolchain/check/testdata/interop/cpp/builtins.carbon +++ b/toolchain/check/testdata/interop/cpp/builtins.carbon @@ -554,8 +554,10 @@ fn F() { // CHECK:STDOUT: %ptr.d47: type = ptr_type %unsigned_int [concrete] // CHECK:STDOUT: %unsigned_int.foo.type: type = fn_type @unsigned_int.foo [concrete] // CHECK:STDOUT: %unsigned_int.foo: %unsigned_int.foo.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.66e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%unsigned_int) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.428: %T.as.Destroy.impl.Op.type.66e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %unsigned_int, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6ba: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.e27: %AggregateT.as_type.as.Destroy.impl.Op.type.6ba = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -579,7 +581,7 @@ fn F() { // CHECK:STDOUT: %unsigned_int.var_patt: %pattern_type.5ec = var_pattern %unsigned_int.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %unsigned_int.var: ref %unsigned_int = var %unsigned_int.var_patt -// CHECK:STDOUT: %.loc12: type = splice_block %unsigned_int.ref.loc12 [concrete = constants.%unsigned_int] { +// CHECK:STDOUT: %.loc12_25: type = splice_block %unsigned_int.ref.loc12 [concrete = constants.%unsigned_int] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_int.ref.loc12: type = name_ref unsigned_int, imports.%unsigned_int.decl [concrete = constants.%unsigned_int] // CHECK:STDOUT: } @@ -599,11 +601,13 @@ fn F() { // CHECK:STDOUT: %.loc13_33.1: %u32 = value_of_initializer %unsigned_int.foo.call // CHECK:STDOUT: %.loc13_33.2: %u32 = converted %unsigned_int.foo.call, %.loc13_33.1 // CHECK:STDOUT: %x: %u32 = bind_name x, %.loc13_33.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %unsigned_int.var, constants.%T.as.Destroy.impl.Op.428 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%unsigned_int, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc12_3: %type_where = converted constants.%unsigned_int, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %unsigned_int.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.e27 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc12: = bound_method %unsigned_int.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc12: = bound_method %unsigned_int.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc12: %ptr.d47 = addr_of %unsigned_int.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/class/constructor.carbon b/toolchain/check/testdata/interop/cpp/class/constructor.carbon index 30d1da90fc1c..b6052acd495e 100644 --- a/toolchain/check/testdata/interop/cpp/class/constructor.carbon +++ b/toolchain/check/testdata/interop/cpp/class/constructor.carbon @@ -240,8 +240,10 @@ fn F() { // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete] // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -277,11 +279,13 @@ fn F() { // CHECK:STDOUT: %.loc8_26.3: ref %C = temporary %.loc8_26.1, %.loc8_26.2 // CHECK:STDOUT: %.loc8_26.4: %C = bind_value %.loc8_26.3 // CHECK:STDOUT: %c: %C = bind_name c, %.loc8_26.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_26.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_26.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_26.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_26.2: %ptr.d9e = addr_of %.loc8_26.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_26.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_26.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -317,8 +321,10 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.ec6: = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete] // CHECK:STDOUT: %bound_method.ed0: = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_456.d17: %i32 = int_value 456 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -372,11 +378,13 @@ fn F() { // CHECK:STDOUT: %.loc8_34.3: ref %C = temporary %.loc8_34.1, %.loc8_34.2 // CHECK:STDOUT: %.loc8_34.4: %C = bind_value %.loc8_34.3 // CHECK:STDOUT: %c: %C = bind_name c, %.loc8_34.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_34.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_34.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_34.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8_34: = bound_method %.loc8_34.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc8_34: = bound_method %.loc8_34.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_34.2: %ptr.d9e = addr_of %.loc8_34.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_34(%addr.loc8_34.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_34(%addr.loc8_34.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -414,8 +422,10 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.ec6: = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete] // CHECK:STDOUT: %bound_method.ed0: = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_456.d17: %i32 = int_value 456 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -491,16 +501,20 @@ fn F() { // CHECK:STDOUT: %.loc9_35.3: ref %C = temporary %.loc9_35.1, %.loc9_35.2 // CHECK:STDOUT: %.loc9_35.4: %C = bind_value %.loc9_35.3 // CHECK:STDOUT: %c2: %C = bind_name c2, %.loc9_35.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_35.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_35.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_35.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9_35: = bound_method %.loc9_35.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc9_35: = bound_method %.loc9_35.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9_35.2: %ptr.d9e = addr_of %.loc9_35.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9_35(%addr.loc9_35.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_27.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9_35(%addr.loc9_35.2) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_27.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_27.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_27.2: %ptr.d9e = addr_of %.loc8_27.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -536,8 +550,10 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.36a: = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete] // CHECK:STDOUT: %bound_method.942: = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_9.f88: %i32 = int_value 9 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -603,11 +619,13 @@ fn F() { // CHECK:STDOUT: %C.ref.loc14_14: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: %c2: %C = bind_name c2, [concrete = ] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_31.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8_31: = bound_method %.loc8_31.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc8_31: = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_31.2: %ptr.d9e = addr_of %.loc8_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_31(%addr.loc8_31.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_31(%addr.loc8_31.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -651,8 +669,10 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.414 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.414, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.80c: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -719,11 +739,13 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc16_21.3: %C = converted %.loc16_21.2, [concrete = ] // CHECK:STDOUT: %c2: %C = bind_name c2, [concrete = ] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_28.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_28.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_28.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8_28: = bound_method %.loc8_28.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc8_28: = bound_method %.loc8_28.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_28.2: %ptr.d9e = addr_of %.loc8_28.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_28(%addr.loc8_28.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_28(%addr.loc8_28.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -771,8 +793,10 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.414 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.414, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.80c: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -859,11 +883,13 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22_21.3: %C = converted %.loc22_21.2, [concrete = ] // CHECK:STDOUT: %c3: %C = bind_name c3, [concrete = ] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_31.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8_31: = bound_method %.loc8_31.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc8_31: = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_31.2: %ptr.d9e = addr_of %.loc8_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_31(%addr.loc8_31.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_31(%addr.loc8_31.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/class/method.carbon b/toolchain/check/testdata/interop/cpp/class/method.carbon index 1b970b5a8144..0d3387d382c9 100644 --- a/toolchain/check/testdata/interop/cpp/class/method.carbon +++ b/toolchain/check/testdata/interop/cpp/class/method.carbon @@ -327,16 +327,16 @@ fn Call(e: Cpp.ExplicitObjectParam, n: i32, a: Cpp.Another) { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %.4ab: type = cpp_overload_set_type @HasQualifiers.F.1 [concrete] // CHECK:STDOUT: %empty_struct: %.4ab = struct_value () [concrete] -// CHECK:STDOUT: %const: type = const_type %HasQualifiers [concrete] -// CHECK:STDOUT: %ptr.2cb: type = ptr_type %const [concrete] +// CHECK:STDOUT: %const.2b5: type = const_type %HasQualifiers [concrete] +// CHECK:STDOUT: %ptr.2cb: type = ptr_type %const.2b5 [concrete] // CHECK:STDOUT: %F__carbon_thunk.type: type = fn_type @F__carbon_thunk [concrete] // CHECK:STDOUT: %F__carbon_thunk: %F__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] // CHECK:STDOUT: %HasQualifiers.F.type.d208f0.2: type = fn_type @HasQualifiers.F.2 [concrete] // CHECK:STDOUT: %HasQualifiers.F.efd4e4.2: %HasQualifiers.F.type.d208f0.2 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a18: %T.as.Destroy.impl.Op.type.f3e = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.142: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%i32) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.c04: %ptr.as.Destroy.impl.Op.type.142 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type.4f9: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.796: %Int.as.Destroy.impl.Op.type.4f9 = struct_value () [concrete] @@ -395,11 +395,11 @@ fn Call(e: Cpp.ExplicitObjectParam, n: i32, a: Cpp.Another) { // CHECK:STDOUT: %ptr.loc9: type = ptr_type %i32.loc9 [concrete = constants.%ptr.235] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %ptr.235 = bind_name b, %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.a18 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%ptr.as.Destroy.impl.Op.c04 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9_3: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc9_3: = bound_method %b.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc9_3: %ptr.5d5 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9_3(%addr.loc9_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9_3(%addr.loc9_3) // CHECK:STDOUT: %Int.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%Int.as.Destroy.impl.Op.796 // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc8_3: = bound_method %a.var, %Int.as.Destroy.impl.Op.specific_fn diff --git a/toolchain/check/testdata/interop/cpp/enum/anonymous.carbon b/toolchain/check/testdata/interop/cpp/enum/anonymous.carbon index d19efdf9951d..95c47e816b6e 100644 --- a/toolchain/check/testdata/interop/cpp/enum/anonymous.carbon +++ b/toolchain/check/testdata/interop/cpp/enum/anonymous.carbon @@ -63,12 +63,16 @@ fn G() { // CHECK:STDOUT: %ptr.73d: type = ptr_type %.bb7 [concrete] // CHECK:STDOUT: %F__carbon_thunk.type.eda1ac.2: type = fn_type @F__carbon_thunk.2 [concrete] // CHECK:STDOUT: %F__carbon_thunk.0cd6a8.2: %F__carbon_thunk.type.eda1ac.2 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.39a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%.bb7) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bd3: %T.as.Destroy.impl.Op.type.39a = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.088: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%.4f0) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.dda: %T.as.Destroy.impl.Op.type.088 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.597: %type_where = facet_value %.bb7, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.237: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.597) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c08: %AggregateT.as_type.as.Destroy.impl.Op.type.237 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.b21: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.b21) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.21d: %type_where = facet_value %.4f0, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.a40: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.21d) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.d51: %AggregateT.as_type.as.Destroy.impl.Op.type.a40 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -133,21 +137,27 @@ fn G() { // CHECK:STDOUT: %.loc10_20.2: ref %.bb7 = temporary %.loc10_20.1, %e.ref // CHECK:STDOUT: %addr.loc10_22: %ptr.73d = addr_of %.loc10_20.2 // CHECK:STDOUT: %F__carbon_thunk.call.loc10: init %empty_tuple.type = call imports.%F__carbon_thunk.decl.e1b8ec.2(%addr.loc10_11.2, %addr.loc10_22) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10_20: = bound_method %.loc10_20.2, constants.%T.as.Destroy.impl.Op.bd3 +// CHECK:STDOUT: %facet_value.loc10_20: %type_where = facet_value constants.%.bb7, () [concrete = constants.%facet_value.597] +// CHECK:STDOUT: %.loc10_20.3: %type_where = converted constants.%.bb7, %facet_value.loc10_20 [concrete = constants.%facet_value.597] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10_20: = bound_method %.loc10_20.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.c08 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_20: = bound_method %.loc10_20.2, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10_20: = bound_method %.loc10_20.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_20: %ptr.73d = addr_of %.loc10_20.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10_20: init %empty_tuple.type = call %bound_method.loc10_20(%addr.loc10_20) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10_11: = bound_method %.loc10_11.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10_20: init %empty_tuple.type = call %bound_method.loc10_20(%addr.loc10_20) +// CHECK:STDOUT: %facet_value.loc10_11: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value.b21] +// CHECK:STDOUT: %.loc10_11.4: %type_where = converted constants.%C, %facet_value.loc10_11 [concrete = constants.%facet_value.b21] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10_11: = bound_method %.loc10_11.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_11: = bound_method %.loc10_11.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc10_11: = bound_method %.loc10_11.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10_11.3: %ptr.d9e = addr_of %.loc10_11.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10_11: init %empty_tuple.type = call %bound_method.loc10_11(%addr.loc10_11.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.2, constants.%T.as.Destroy.impl.Op.dda +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10_11: init %empty_tuple.type = call %bound_method.loc10_11(%addr.loc10_11.3) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%.4f0, () [concrete = constants.%facet_value.21d] +// CHECK:STDOUT: %.loc8_12.3: %type_where = converted constants.%.4f0, %facet_value.loc8 [concrete = constants.%facet_value.21d] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.d51 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.2, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8_12: %ptr.793 = addr_of %.loc8_12.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/enum/copy.carbon b/toolchain/check/testdata/interop/cpp/enum/copy.carbon index f2f0165c23ae..ba7f42744327 100644 --- a/toolchain/check/testdata/interop/cpp/enum/copy.carbon +++ b/toolchain/check/testdata/interop/cpp/enum/copy.carbon @@ -38,8 +38,10 @@ fn F() { // CHECK:STDOUT: %pattern_type.ebf: type = pattern_type %Enum [concrete] // CHECK:STDOUT: %int_0: %Enum = int_value 0 [concrete] // CHECK:STDOUT: %int_1: %Enum = int_value 1 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.69f: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%Enum) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.cd4: %T.as.Destroy.impl.Op.type.69f = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %Enum, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.ae5: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.5fc: %AggregateT.as_type.as.Destroy.impl.Op.type.ae5 = struct_value () [concrete] // CHECK:STDOUT: %ptr.47b: type = ptr_type %Enum [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -68,7 +70,7 @@ fn F() { // CHECK:STDOUT: %Enum.ref.loc8_24: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum] // CHECK:STDOUT: %a.ref.loc8: %Enum = name_ref a, imports.%int_0 [concrete = constants.%int_0] // CHECK:STDOUT: assign %a.var, %a.ref.loc8 -// CHECK:STDOUT: %.loc8: type = splice_block %Enum.ref.loc8_13 [concrete = constants.%Enum] { +// CHECK:STDOUT: %.loc8_13: type = splice_block %Enum.ref.loc8_13 [concrete = constants.%Enum] { // CHECK:STDOUT: %Cpp.ref.loc8_10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Enum.ref.loc8_13: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum] // CHECK:STDOUT: } @@ -78,11 +80,13 @@ fn F() { // CHECK:STDOUT: %Enum.ref.loc10: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum] // CHECK:STDOUT: %b.ref: %Enum = name_ref b, imports.%int_1 [concrete = constants.%int_1] // CHECK:STDOUT: assign %a.ref.loc10, %b.ref -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.cd4 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%Enum, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3: %type_where = converted constants.%Enum, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.5fc // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.47b = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon b/toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon index bc94d491924b..296605a19913 100644 --- a/toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon +++ b/toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon @@ -610,8 +610,8 @@ fn F() { // CHECK:STDOUT: %bool.as.Copy.impl.Op.type: type = fn_type @bool.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op: %bool.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op.bound: = bound_method %true, %bool.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f06: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(bool) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.61f: %T.as.Destroy.impl.Op.type.f06 = struct_value () [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.type: type = fn_type @bool.as.Destroy.impl.Op [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op: %bool.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -636,16 +636,14 @@ fn F() { // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %.loc8_11.1: ref bool = temporary_storage // CHECK:STDOUT: %impl.elem0: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %true, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc8_11.1(%true) [concrete = constants.%true] +// CHECK:STDOUT: %bound_method: = bound_method %true, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] +// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true) [concrete = constants.%true] // CHECK:STDOUT: %.loc8_11.2: ref bool = temporary %.loc8_11.1, %bool.as.Copy.impl.Op.call // CHECK:STDOUT: %addr.loc8_15: %ptr.bb2 = addr_of %.loc8_11.2 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_15) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.2, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.2, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc8_11: %ptr.bb2 = addr_of %.loc8_11.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_11.2(%addr.loc8_11) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound(%addr.loc8_11) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -667,8 +665,8 @@ fn F() { // CHECK:STDOUT: %bool.as.Copy.impl.Op.type: type = fn_type @bool.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op: %bool.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op.bound: = bound_method %false, %bool.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f06: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(bool) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.61f: %T.as.Destroy.impl.Op.type.f06 = struct_value () [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.type: type = fn_type @bool.as.Destroy.impl.Op [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op: %bool.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -693,16 +691,14 @@ fn F() { // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %.loc8_11.1: ref bool = temporary_storage // CHECK:STDOUT: %impl.elem0: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %false, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc8_11.1(%false) [concrete = constants.%false] +// CHECK:STDOUT: %bound_method: = bound_method %false, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] +// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%false) [concrete = constants.%false] // CHECK:STDOUT: %.loc8_11.2: ref bool = temporary %.loc8_11.1, %bool.as.Copy.impl.Op.call // CHECK:STDOUT: %addr.loc8_16: %ptr.bb2 = addr_of %.loc8_11.2 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_16) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.2, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.2, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc8_11: %ptr.bb2 = addr_of %.loc8_11.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_11.2(%addr.loc8_11) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound(%addr.loc8_11) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/class.carbon b/toolchain/check/testdata/interop/cpp/function/class.carbon index 8808f557e63b..596e15612426 100644 --- a/toolchain/check/testdata/interop/cpp/function/class.carbon +++ b/toolchain/check/testdata/interop/cpp/function/class.carbon @@ -534,8 +534,10 @@ fn F() { // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -568,11 +570,13 @@ fn F() { // CHECK:STDOUT: %.loc8_14.3: ref %C = value_as_ref %.loc8_14.2 // CHECK:STDOUT: %addr.loc8_22: %ptr.d9e = addr_of %.loc8_14.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_22) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_12: %ptr.d9e = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -587,8 +591,10 @@ fn F() { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -620,11 +626,13 @@ fn F() { // CHECK:STDOUT: %.loc24_14.1: ref %C = converted %.loc24_12.1, %.loc24_12.4 // CHECK:STDOUT: %.loc24_14.2: %C = bind_value %.loc24_14.1 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%.loc24_14.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc24_12.4, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc24_12.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc24_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc24_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc24_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc24_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -701,8 +709,10 @@ fn F() { // CHECK:STDOUT: %ptr.838: type = ptr_type %C [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.679: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b3e: %T.as.Destroy.impl.Op.type.679 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.523: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.1f8: %AggregateT.as_type.as.Destroy.impl.Op.type.523 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -745,22 +755,26 @@ fn F() { // CHECK:STDOUT: %x.var_patt: %pattern_type.69f = var_pattern %x.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %C = var %x.var_patt -// CHECK:STDOUT: %.loc10: type = splice_block %C.ref.loc10 [concrete = constants.%C] { +// CHECK:STDOUT: %.loc10_15: type = splice_block %C.ref.loc10 [concrete = constants.%C] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %N.ref.loc10: = name_ref N, imports.%N [concrete = imports.%N] // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %C = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.b3e +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_3: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10: %ptr.838 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.b3e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_12: %ptr.838 = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -776,8 +790,10 @@ fn F() { // CHECK:STDOUT: %ptr.c0c: type = ptr_type %C [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.6f2: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.c3d: %T.as.Destroy.impl.Op.type.6f2 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.532: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.52b: %AggregateT.as_type.as.Destroy.impl.Op.type.532 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -821,11 +837,13 @@ fn F() { // CHECK:STDOUT: %.loc8_17.3: ref %C = value_as_ref %.loc8_17.2 // CHECK:STDOUT: %addr.loc8_31: %ptr.c0c = addr_of %.loc8_17.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_31) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_15.4, constants.%T.as.Destroy.impl.Op.c3d +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_15.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_15.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.52b // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_15: %ptr.c0c = addr_of %.loc8_15.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_15) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_15) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -843,11 +861,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cff: type = pattern_type %O [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.9f7: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%O) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.273: %T.as.Destroy.impl.Op.type.9f7 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.568: %type_where = facet_value %O, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.a17: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.568) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c17: %AggregateT.as_type.as.Destroy.impl.Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.820: type = ptr_type %O [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.29b: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.49f: %T.as.Destroy.impl.Op.type.29b = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.e34: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fac: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.e34) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.0e1: %AggregateT.as_type.as.Destroy.impl.Op.type.fac = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -887,21 +908,25 @@ fn F() { // CHECK:STDOUT: %x.var_patt: %pattern_type.cff = var_pattern %x.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %O = var %x.var_patt -// CHECK:STDOUT: %.loc9: type = splice_block %O.ref.loc9 [concrete = constants.%O] { +// CHECK:STDOUT: %.loc9_13: type = splice_block %O.ref.loc9 [concrete = constants.%O] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %O.ref.loc9: type = name_ref O, imports.%O.decl [concrete = constants.%O] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %O = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.273 +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%O, () [concrete = constants.%facet_value.568] +// CHECK:STDOUT: %.loc9_3: %type_where = converted constants.%O, %facet_value.loc9 [concrete = constants.%facet_value.568] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c17 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9: %ptr.820 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.49f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value.e34] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value.e34] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.0e1 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_12: %ptr.de2 = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -921,8 +946,10 @@ fn F() { // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -961,11 +988,13 @@ fn F() { // CHECK:STDOUT: %.loc9_14.3: ref %C = value_as_ref %.loc9_14.2 // CHECK:STDOUT: %addr.loc9_22: %ptr.d9e = addr_of %.loc9_14.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc9_22) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc9_12.4, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_12.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc9_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc9_12: %ptr.d9e = addr_of %.loc9_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc9_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc9_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -985,8 +1014,10 @@ fn F() { // CHECK:STDOUT: %empty_struct.87a: %.442 = struct_value () [concrete] // CHECK:STDOUT: %C.bar.type: type = fn_type @C.bar [concrete] // CHECK:STDOUT: %C.bar: %C.bar.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1025,11 +1056,13 @@ fn F() { // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %bar.ref: %.442 = name_ref bar, imports.%.4a4 [concrete = constants.%empty_struct.87a] // CHECK:STDOUT: %C.bar.call: init %empty_tuple.type = call imports.%C.bar.decl() -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_12: %ptr.d9e = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1115,8 +1148,10 @@ fn F() { // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1141,11 +1176,13 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_11.1) // CHECK:STDOUT: %.loc8_11.2: init %C = in_place_init %foo__carbon_thunk.call, %.loc8_11.1 // CHECK:STDOUT: %.loc8_11.3: ref %C = temporary %.loc8_11.1, %.loc8_11.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_11.4: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_11.2: %ptr.d9e = addr_of %.loc8_11.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_11.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_11.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/operators.carbon b/toolchain/check/testdata/interop/cpp/function/operators.carbon index fe489dc719a9..2a73a8d39a51 100644 --- a/toolchain/check/testdata/interop/cpp/function/operators.carbon +++ b/toolchain/check/testdata/interop/cpp/function/operators.carbon @@ -791,8 +791,10 @@ fn F() { // CHECK:STDOUT: %operator--__carbon_thunk: %operator--__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %operator-__carbon_thunk.type: type = fn_type @operator-__carbon_thunk [concrete] // CHECK:STDOUT: %operator-__carbon_thunk: %operator-__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -876,26 +878,34 @@ fn F() { // CHECK:STDOUT: %.loc15_22.3: ref %C = temporary %.loc15_22.1, %.loc15_22.2 // CHECK:STDOUT: %.loc15_22.4: %C = bind_value %.loc15_22.3 // CHECK:STDOUT: %minus: %C = bind_name minus, %.loc15_22.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc15: = bound_method %.loc15_22.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value.loc15: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc15_22.5: %type_where = converted constants.%C, %facet_value.loc15 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc15: = bound_method %.loc15_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc15: = bound_method %.loc15_22.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc15: = bound_method %.loc15_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc15_22.3: %ptr.d9e = addr_of %.loc15_22.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15_22.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc12: = bound_method %.loc12_3.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15_22.3) +// CHECK:STDOUT: %facet_value.loc12: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc12_3.4: %type_where = converted constants.%C, %facet_value.loc12 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc12: = bound_method %.loc12_3.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc12: = bound_method %.loc12_3.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc12: = bound_method %.loc12_3.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc12_3.3: %ptr.d9e = addr_of %.loc12_3.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_3.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc11: = bound_method %.loc11_3.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_3.3) +// CHECK:STDOUT: %facet_value.loc11: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc11_3.4: %type_where = converted constants.%C, %facet_value.loc11 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc11: = bound_method %.loc11_3.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc11: = bound_method %.loc11_3.3, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc11: = bound_method %.loc11_3.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc11_3.3: %ptr.d9e = addr_of %.loc11_3.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_3.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_26.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_3.3) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_26.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_26.3, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4 // CHECK:STDOUT: %addr.loc8_26.2: %ptr.d9e = addr_of %.loc8_26.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_26.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_26.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -983,8 +993,10 @@ fn F() { // CHECK:STDOUT: %operator>=__carbon_thunk: %operator>=__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %operator<=__carbon_thunk.type: type = fn_type @operator<=__carbon_thunk [concrete] // CHECK:STDOUT: %operator<=__carbon_thunk: %operator<=__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1133,10 +1145,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc8_19: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc8_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc8_3: ref %C = splice_block %c1.var {} -// CHECK:STDOUT: %addr.loc8_27: %ptr.d9e = addr_of %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: ref %C = splice_block %c1.var {} +// CHECK:STDOUT: %addr.loc8_27: %ptr.d9e = addr_of %.loc8_3.1 // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_27) -// CHECK:STDOUT: %.loc8_27: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_3 +// CHECK:STDOUT: %.loc8_27: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_3.1 // CHECK:STDOUT: assign %c1.var, %.loc8_27 // CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] { // CHECK:STDOUT: %Cpp.ref.loc8_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1151,10 +1163,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc9_19: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc9_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc9_3: ref %C = splice_block %c2.var {} -// CHECK:STDOUT: %addr.loc9_27: %ptr.d9e = addr_of %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: ref %C = splice_block %c2.var {} +// CHECK:STDOUT: %addr.loc9_27: %ptr.d9e = addr_of %.loc9_3.1 // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc9_27) -// CHECK:STDOUT: %.loc9_27: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_3 +// CHECK:STDOUT: %.loc9_27: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_3.1 // CHECK:STDOUT: assign %c2.var, %.loc9_27 // CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] { // CHECK:STDOUT: %Cpp.ref.loc9_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1631,106 +1643,146 @@ fn F() { // CHECK:STDOUT: %.loc43_37.3: bool = value_of_initializer %.loc43_37.2 // CHECK:STDOUT: %.loc43_37.4: bool = converted %.loc43_37.2, %.loc43_37.3 // CHECK:STDOUT: %less_than_or_equal: bool = bind_name less_than_or_equal, %.loc43_37.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc35: = bound_method %.loc35_6.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value.loc35: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc35_6.4: %type_where = converted constants.%C, %facet_value.loc35 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc35: = bound_method %.loc35_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc35: = bound_method %.loc35_6.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc35: = bound_method %.loc35_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc35_6.4: %ptr.d9e = addr_of %.loc35_6.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc35: init %empty_tuple.type = call %bound_method.loc35(%addr.loc35_6.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc34: = bound_method %.loc34_6.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc35: init %empty_tuple.type = call %bound_method.loc35(%addr.loc35_6.4) +// CHECK:STDOUT: %facet_value.loc34: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc34_6.4: %type_where = converted constants.%C, %facet_value.loc34 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc34: = bound_method %.loc34_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc34: = bound_method %.loc34_6.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc34: = bound_method %.loc34_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc34_6.4: %ptr.d9e = addr_of %.loc34_6.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc34: init %empty_tuple.type = call %bound_method.loc34(%addr.loc34_6.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc33: = bound_method %.loc33_6.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc34: init %empty_tuple.type = call %bound_method.loc34(%addr.loc34_6.4) +// CHECK:STDOUT: %facet_value.loc33: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc33_6.4: %type_where = converted constants.%C, %facet_value.loc33 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc33: = bound_method %.loc33_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc33: = bound_method %.loc33_6.3, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc33: = bound_method %.loc33_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc33_6.4: %ptr.d9e = addr_of %.loc33_6.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc33: init %empty_tuple.type = call %bound_method.loc33(%addr.loc33_6.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc30: = bound_method %.loc30_6.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc33: init %empty_tuple.type = call %bound_method.loc33(%addr.loc33_6.4) +// CHECK:STDOUT: %facet_value.loc30: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc30_6.4: %type_where = converted constants.%C, %facet_value.loc30 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc30: = bound_method %.loc30_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc30: = bound_method %.loc30_6.3, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %bound_method.loc30: = bound_method %.loc30_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4 // CHECK:STDOUT: %addr.loc30_6.4: %ptr.d9e = addr_of %.loc30_6.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc30: init %empty_tuple.type = call %bound_method.loc30(%addr.loc30_6.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc29: = bound_method %.loc29_6.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc30: init %empty_tuple.type = call %bound_method.loc30(%addr.loc30_6.4) +// CHECK:STDOUT: %facet_value.loc29: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc29_6.4: %type_where = converted constants.%C, %facet_value.loc29 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc29: = bound_method %.loc29_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc29: = bound_method %.loc29_6.3, %T.as.Destroy.impl.Op.specific_fn.5 +// CHECK:STDOUT: %bound_method.loc29: = bound_method %.loc29_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.5 // CHECK:STDOUT: %addr.loc29_6.4: %ptr.d9e = addr_of %.loc29_6.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc29: init %empty_tuple.type = call %bound_method.loc29(%addr.loc29_6.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc28: = bound_method %.loc28_6.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc29: init %empty_tuple.type = call %bound_method.loc29(%addr.loc29_6.4) +// CHECK:STDOUT: %facet_value.loc28: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc28_6.4: %type_where = converted constants.%C, %facet_value.loc28 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc28: = bound_method %.loc28_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc28: = bound_method %.loc28_6.3, %T.as.Destroy.impl.Op.specific_fn.6 +// CHECK:STDOUT: %bound_method.loc28: = bound_method %.loc28_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.6 // CHECK:STDOUT: %addr.loc28_6.4: %ptr.d9e = addr_of %.loc28_6.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc28: init %empty_tuple.type = call %bound_method.loc28(%addr.loc28_6.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc27: = bound_method %.loc27_6.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc28: init %empty_tuple.type = call %bound_method.loc28(%addr.loc28_6.4) +// CHECK:STDOUT: %facet_value.loc27: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc27_6.4: %type_where = converted constants.%C, %facet_value.loc27 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc27: = bound_method %.loc27_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc27: = bound_method %.loc27_6.3, %T.as.Destroy.impl.Op.specific_fn.7 +// CHECK:STDOUT: %bound_method.loc27: = bound_method %.loc27_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.7 // CHECK:STDOUT: %addr.loc27_6.4: %ptr.d9e = addr_of %.loc27_6.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc27: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27_6.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc26: = bound_method %.loc26_6.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc27: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27_6.4) +// CHECK:STDOUT: %facet_value.loc26: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc26_6.4: %type_where = converted constants.%C, %facet_value.loc26 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc26: = bound_method %.loc26_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc26: = bound_method %.loc26_6.3, %T.as.Destroy.impl.Op.specific_fn.8 +// CHECK:STDOUT: %bound_method.loc26: = bound_method %.loc26_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.8 // CHECK:STDOUT: %addr.loc26_6.4: %ptr.d9e = addr_of %.loc26_6.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26_6.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc23: = bound_method %.loc23_31.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26_6.4) +// CHECK:STDOUT: %facet_value.loc23: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc23_31.5: %type_where = converted constants.%C, %facet_value.loc23 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc23: = bound_method %.loc23_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc23_31: = bound_method %.loc23_31.3, %T.as.Destroy.impl.Op.specific_fn.9 +// CHECK:STDOUT: %bound_method.loc23_31: = bound_method %.loc23_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.9 // CHECK:STDOUT: %addr.loc23_31.3: %ptr.d9e = addr_of %.loc23_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_31(%addr.loc23_31.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc22: = bound_method %.loc22_30.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_31(%addr.loc23_31.3) +// CHECK:STDOUT: %facet_value.loc22: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc22_30.5: %type_where = converted constants.%C, %facet_value.loc22 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc22: = bound_method %.loc22_30.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc22_30: = bound_method %.loc22_30.3, %T.as.Destroy.impl.Op.specific_fn.10 +// CHECK:STDOUT: %bound_method.loc22_30: = bound_method %.loc22_30.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.10 // CHECK:STDOUT: %addr.loc22_30.3: %ptr.d9e = addr_of %.loc22_30.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22_30(%addr.loc22_30.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc21: = bound_method %.loc21_31.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22_30(%addr.loc22_30.3) +// CHECK:STDOUT: %facet_value.loc21: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc21_31.5: %type_where = converted constants.%C, %facet_value.loc21 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc21: = bound_method %.loc21_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc21: = bound_method %.loc21_31.3, %T.as.Destroy.impl.Op.specific_fn.11 +// CHECK:STDOUT: %bound_method.loc21: = bound_method %.loc21_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.11 // CHECK:STDOUT: %addr.loc21_31.4: %ptr.d9e = addr_of %.loc21_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21_31.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc20: = bound_method %.loc20_30.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21_31.4) +// CHECK:STDOUT: %facet_value.loc20: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc20_30.5: %type_where = converted constants.%C, %facet_value.loc20 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc20: = bound_method %.loc20_30.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc20: = bound_method %.loc20_30.3, %T.as.Destroy.impl.Op.specific_fn.12 +// CHECK:STDOUT: %bound_method.loc20: = bound_method %.loc20_30.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.12 // CHECK:STDOUT: %addr.loc20_30.4: %ptr.d9e = addr_of %.loc20_30.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc20: init %empty_tuple.type = call %bound_method.loc20(%addr.loc20_30.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc19: = bound_method %.loc19_31.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc20: init %empty_tuple.type = call %bound_method.loc20(%addr.loc20_30.4) +// CHECK:STDOUT: %facet_value.loc19: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc19_31.5: %type_where = converted constants.%C, %facet_value.loc19 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc19: = bound_method %.loc19_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc19: = bound_method %.loc19_31.3, %T.as.Destroy.impl.Op.specific_fn.13 +// CHECK:STDOUT: %bound_method.loc19: = bound_method %.loc19_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.13 // CHECK:STDOUT: %addr.loc19_31.4: %ptr.d9e = addr_of %.loc19_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19(%addr.loc19_31.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc16: = bound_method %.loc16_26.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19(%addr.loc19_31.4) +// CHECK:STDOUT: %facet_value.loc16: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc16_26.5: %type_where = converted constants.%C, %facet_value.loc16 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc16: = bound_method %.loc16_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc16: = bound_method %.loc16_26.3, %T.as.Destroy.impl.Op.specific_fn.14 +// CHECK:STDOUT: %bound_method.loc16: = bound_method %.loc16_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.14 // CHECK:STDOUT: %addr.loc16_26.4: %ptr.d9e = addr_of %.loc16_26.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16(%addr.loc16_26.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc15: = bound_method %.loc15_28.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16(%addr.loc16_26.4) +// CHECK:STDOUT: %facet_value.loc15: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc15_28.5: %type_where = converted constants.%C, %facet_value.loc15 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc15: = bound_method %.loc15_28.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc15: = bound_method %.loc15_28.3, %T.as.Destroy.impl.Op.specific_fn.15 +// CHECK:STDOUT: %bound_method.loc15: = bound_method %.loc15_28.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.15 // CHECK:STDOUT: %addr.loc15_28.4: %ptr.d9e = addr_of %.loc15_28.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15_28.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc14: = bound_method %.loc14_34.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15_28.4) +// CHECK:STDOUT: %facet_value.loc14: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc14_34.5: %type_where = converted constants.%C, %facet_value.loc14 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc14: = bound_method %.loc14_34.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc14: = bound_method %.loc14_34.3, %T.as.Destroy.impl.Op.specific_fn.16 +// CHECK:STDOUT: %bound_method.loc14: = bound_method %.loc14_34.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.16 // CHECK:STDOUT: %addr.loc14_34.4: %ptr.d9e = addr_of %.loc14_34.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14_34.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc13: = bound_method %.loc13_31.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14_34.4) +// CHECK:STDOUT: %facet_value.loc13: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc13_31.5: %type_where = converted constants.%C, %facet_value.loc13 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc13: = bound_method %.loc13_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc13: = bound_method %.loc13_31.3, %T.as.Destroy.impl.Op.specific_fn.17 +// CHECK:STDOUT: %bound_method.loc13: = bound_method %.loc13_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.17 // CHECK:STDOUT: %addr.loc13_31.4: %ptr.d9e = addr_of %.loc13_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13_31.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc12: = bound_method %.loc12_28.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13_31.4) +// CHECK:STDOUT: %facet_value.loc12: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc12_28.5: %type_where = converted constants.%C, %facet_value.loc12 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc12: = bound_method %.loc12_28.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc12: = bound_method %.loc12_28.3, %T.as.Destroy.impl.Op.specific_fn.18 +// CHECK:STDOUT: %bound_method.loc12: = bound_method %.loc12_28.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.18 // CHECK:STDOUT: %addr.loc12_28.4: %ptr.d9e = addr_of %.loc12_28.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_28.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %c2.var, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_28.4) +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_3.2: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %c2.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %c2.var, %T.as.Destroy.impl.Op.specific_fn.19 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %c2.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.19 // CHECK:STDOUT: %addr.loc9_3: %ptr.d9e = addr_of %c2.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %c1.var, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_3) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %c1.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %c1.var, %T.as.Destroy.impl.Op.specific_fn.20 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %c1.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.20 // CHECK:STDOUT: %addr.loc8_3: %ptr.d9e = addr_of %c1.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_3) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1747,8 +1799,10 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete] // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1866,31 +1920,41 @@ fn F() { // CHECK:STDOUT: %.loc12_22.3: ref %C = temporary %.loc12_22.1, %.loc12_22.2 // CHECK:STDOUT: %.loc12_22.4: %C = bind_value %.loc12_22.3 // CHECK:STDOUT: %c5: %C = bind_name c5, %.loc12_22.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc12: = bound_method %.loc12_22.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value.loc12: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc12_22.5: %type_where = converted constants.%C, %facet_value.loc12 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc12: = bound_method %.loc12_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc12: = bound_method %.loc12_22.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc12: = bound_method %.loc12_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc12_22.4: %ptr.d9e = addr_of %.loc12_22.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_22.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc11: = bound_method %.loc11_22.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_22.4) +// CHECK:STDOUT: %facet_value.loc11: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc11_22.5: %type_where = converted constants.%C, %facet_value.loc11 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc11: = bound_method %.loc11_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc11: = bound_method %.loc11_22.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc11: = bound_method %.loc11_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc11_22.4: %ptr.d9e = addr_of %.loc11_22.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_22.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_22.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_22.4) +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_22.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_22.3, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc10_22.4: %ptr.d9e = addr_of %.loc10_22.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_22.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_27.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_22.4) +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_27.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_27.3, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4 // CHECK:STDOUT: %addr.loc9_27.2: %ptr.d9e = addr_of %.loc9_27.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_27.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_27.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_27.2) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_27.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_27.3, %T.as.Destroy.impl.Op.specific_fn.5 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.5 // CHECK:STDOUT: %addr.loc8_27.2: %ptr.d9e = addr_of %.loc8_27.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1907,8 +1971,10 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete] // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.679: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b3e: %T.as.Destroy.impl.Op.type.679 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.523: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.1f8: %AggregateT.as_type.as.Destroy.impl.Op.type.523 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1995,21 +2061,27 @@ fn F() { // CHECK:STDOUT: %.loc10_24.3: ref %C = temporary %.loc10_24.1, %.loc10_24.2 // CHECK:STDOUT: %.loc10_24.4: %C = bind_value %.loc10_24.3 // CHECK:STDOUT: %c3: %C = bind_name c3, %.loc10_24.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_24.3, constants.%T.as.Destroy.impl.Op.b3e +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_24.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_24.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_24.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_24.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_24.4: %ptr.838 = addr_of %.loc10_24.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_24.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_31.3, constants.%T.as.Destroy.impl.Op.b3e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_24.4) +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_31.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_31.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9_31.2: %ptr.838 = addr_of %.loc9_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_31.3, constants.%T.as.Destroy.impl.Op.b3e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_31.3, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8_31.2: %ptr.838 = addr_of %.loc8_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2035,10 +2107,13 @@ fn F() { // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %operator-__carbon_thunk.type: type = fn_type @operator-__carbon_thunk [concrete] // CHECK:STDOUT: %operator-__carbon_thunk: %operator-__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a7e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C2) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.dd1: %T.as.Destroy.impl.Op.type.a7e = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.62a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C1) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.4a1: %T.as.Destroy.impl.Op.type.62a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.d7a: %type_where = facet_value %C2, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.cd3: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.d7a) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.5ee: %AggregateT.as_type.as.Destroy.impl.Op.type.cd3 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.e5d: %type_where = facet_value %C1, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.26c: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.e5d) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.176: %AggregateT.as_type.as.Destroy.impl.Op.type.26c = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2163,26 +2238,34 @@ fn F() { // CHECK:STDOUT: %.loc11_26.3: ref %C2 = temporary %.loc11_26.1, %.loc11_26.2 // CHECK:STDOUT: %.loc11_26.4: %C2 = bind_value %.loc11_26.3 // CHECK:STDOUT: %c4: %C2 = bind_name c4, %.loc11_26.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc11: = bound_method %.loc11_26.3, constants.%T.as.Destroy.impl.Op.dd1 +// CHECK:STDOUT: %facet_value.loc11: %type_where = facet_value constants.%C2, () [concrete = constants.%facet_value.d7a] +// CHECK:STDOUT: %.loc11_26.5: %type_where = converted constants.%C2, %facet_value.loc11 [concrete = constants.%facet_value.d7a] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc11: = bound_method %.loc11_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.5ee // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc11: = bound_method %.loc11_26.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc11: = bound_method %.loc11_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc11_26.4: %ptr.51f = addr_of %.loc11_26.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_26.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_26.3, constants.%T.as.Destroy.impl.Op.dd1 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_26.4) +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C2, () [concrete = constants.%facet_value.d7a] +// CHECK:STDOUT: %.loc10_26.5: %type_where = converted constants.%C2, %facet_value.loc10 [concrete = constants.%facet_value.d7a] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.5ee // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_26.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10_26.4: %ptr.51f = addr_of %.loc10_26.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_26.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_36.3, constants.%T.as.Destroy.impl.Op.dd1 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_26.4) +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C2, () [concrete = constants.%facet_value.d7a] +// CHECK:STDOUT: %.loc9_36.5: %type_where = converted constants.%C2, %facet_value.loc9 [concrete = constants.%facet_value.d7a] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_36.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.5ee // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_36.3, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_36.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc9_36.2: %ptr.51f = addr_of %.loc9_36.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_36.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_36.3, constants.%T.as.Destroy.impl.Op.4a1 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_36.2) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C1, () [concrete = constants.%facet_value.e5d] +// CHECK:STDOUT: %.loc8_36.5: %type_where = converted constants.%C1, %facet_value.loc8 [concrete = constants.%facet_value.e5d] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_36.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.176 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_36.3, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_36.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4 // CHECK:STDOUT: %addr.loc8_36.2: %ptr.087 = addr_of %.loc8_36.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_36.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_36.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2197,8 +2280,10 @@ fn F() { // CHECK:STDOUT: %ptr.838: type = ptr_type %C [concrete] // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete] // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.679: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b3e: %T.as.Destroy.impl.Op.type.679 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.523: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.1f8: %AggregateT.as_type.as.Destroy.impl.Op.type.523 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2270,16 +2355,20 @@ fn F() { // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: %c3: %C = bind_name c3, [concrete = ] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_31.3, constants.%T.as.Destroy.impl.Op.b3e +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_31.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_31.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9_31.2: %ptr.838 = addr_of %.loc9_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_31.3, constants.%T.as.Destroy.impl.Op.b3e +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_31.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_31.2: %ptr.838 = addr_of %.loc8_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2297,8 +2386,10 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete] // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.29b: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.49f: %T.as.Destroy.impl.Op.type.29b = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fac: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.0e1: %AggregateT.as_type.as.Destroy.impl.Op.type.fac = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2382,21 +2473,27 @@ fn F() { // CHECK:STDOUT: %.loc10_24.3: ref %C = temporary %.loc10_24.1, %.loc10_24.2 // CHECK:STDOUT: %.loc10_24.4: %C = bind_value %.loc10_24.3 // CHECK:STDOUT: %c3: %C = bind_name c3, %.loc10_24.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_24.3, constants.%T.as.Destroy.impl.Op.49f +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_24.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_24.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.0e1 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_24.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_24.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_24.4: %ptr.de2 = addr_of %.loc10_24.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_24.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_31.3, constants.%T.as.Destroy.impl.Op.49f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_24.4) +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_31.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.0e1 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_31.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9_31.2: %ptr.de2 = addr_of %.loc9_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_31.3, constants.%T.as.Destroy.impl.Op.49f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.0e1 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_31.3, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8_31.2: %ptr.de2 = addr_of %.loc8_31.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2414,8 +2511,10 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete] // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.271: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.647: %T.as.Destroy.impl.Op.type.271 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fda: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.aaa: %AggregateT.as_type.as.Destroy.impl.Op.type.fda = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2508,21 +2607,27 @@ fn F() { // CHECK:STDOUT: %.loc10_26.3: ref %C = temporary %.loc10_26.1, %.loc10_26.2 // CHECK:STDOUT: %.loc10_26.4: %C = bind_value %.loc10_26.3 // CHECK:STDOUT: %c3: %C = bind_name c3, %.loc10_26.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_26.3, constants.%T.as.Destroy.impl.Op.647 +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_26.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %.loc10_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.aaa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_26.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_26.4: %ptr.4b2 = addr_of %.loc10_26.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_26.4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_35.3, constants.%T.as.Destroy.impl.Op.647 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_26.4) +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_35.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_35.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.aaa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_35.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_35.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9_35.2: %ptr.4b2 = addr_of %.loc9_35.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_35.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_35.3, constants.%T.as.Destroy.impl.Op.647 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_35.2) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_35.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_35.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.aaa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_35.3, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_35.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8_35.2: %ptr.4b2 = addr_of %.loc8_35.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_35.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_35.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2537,8 +2642,10 @@ fn F() { // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete] // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.37e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a28: %T.as.Destroy.impl.Op.type.37e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2601,16 +2708,20 @@ fn F() { // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: %c3: %C = bind_name c3, [concrete = ] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_27.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_27.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %.loc9_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_27.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9_27.2: %ptr.d9e = addr_of %.loc9_27.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_27.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_27.3, constants.%T.as.Destroy.impl.Op.a28 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_27.2) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_27.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_27.3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_27.2: %ptr.d9e = addr_of %.loc8_27.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/pointer.carbon b/toolchain/check/testdata/interop/cpp/function/pointer.carbon index 32a84696fd87..0975d6b0e2c6 100644 --- a/toolchain/check/testdata/interop/cpp/function/pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/function/pointer.carbon @@ -269,8 +269,10 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -297,8 +299,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %S = var %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_19.2: init %S = class_init (), %s.var [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -309,11 +311,13 @@ fn F() { // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %addr.loc9: %ptr.5c7 = addr_of %s.ref // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%addr.loc9) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -343,10 +347,12 @@ fn F() { // CHECK:STDOUT: %ptr.dfe: type = ptr_type %ptr.5c7 [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.929: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.5c7) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.76a: %T.as.Destroy.impl.Op.type.929 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.c2a: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%S) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.431: %ptr.as.Destroy.impl.Op.type.c2a = struct_value () [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -375,8 +381,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %S = var %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_19.2: init %S = class_init (), %s.var [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc8: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -406,16 +412,18 @@ fn F() { // CHECK:STDOUT: %p.ref: ref %ptr.5c7 = name_ref p, %p // CHECK:STDOUT: %addr.loc10: %ptr.dfe = addr_of %p.ref // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%addr.loc10) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %p.var, constants.%T.as.Destroy.impl.Op.76a +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %p.var, constants.%ptr.as.Destroy.impl.Op.431 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9_3: = bound_method %p.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc9_3: = bound_method %p.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc9_3: %ptr.dfe = addr_of %p.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9_3(%addr.loc9_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9_3(%addr.loc9_3) +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -423,18 +431,26 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %S: type = class_type @S [concrete] -// CHECK:STDOUT: %const: type = const_type %S [concrete] -// CHECK:STDOUT: %pattern_type.9be: type = pattern_type %const [concrete] +// CHECK:STDOUT: %const.e39: type = const_type %S [concrete] +// CHECK:STDOUT: %pattern_type.9be: type = pattern_type %const.e39 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %.c5d: type = cpp_overload_set_type @F [concrete] // CHECK:STDOUT: %empty_struct: %.c5d = struct_value () [concrete] -// CHECK:STDOUT: %ptr.ff5: type = ptr_type %const [concrete] +// CHECK:STDOUT: %ptr.ff5: type = ptr_type %const.e39 [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.4ce: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%const) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.7f5: %T.as.Destroy.impl.Op.type.4ce = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %AggregateT: %type_where = bind_symbolic_name AggregateT, 0 [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%AggregateT) [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8a0: %AggregateT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.c8b: = impl_witness imports.%Destroy.impl_witness_table.2d3, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %Destroy.facet.7eb: %Destroy.type = facet_value %S, (%Destroy.impl_witness.c8b) [concrete] +// CHECK:STDOUT: %const.as.Destroy.impl.Op.type.21f: type = fn_type @const.as.Destroy.impl.Op, @const.as.Destroy.impl(%Destroy.facet.7eb) [concrete] +// CHECK:STDOUT: %const.as.Destroy.impl.Op.a1c: %const.as.Destroy.impl.Op.type.21f = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -450,6 +466,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.d51: @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op.type (%AggregateT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc29_29, loaded [symbolic = @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op (constants.%AggregateT.as_type.as.Destroy.impl.Op.8a0)] +// CHECK:STDOUT: %Destroy.impl_witness_table.2d3 = impl_witness_table (%Core.import_ref.d51), @AggregateT.as_type.as.Destroy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -458,27 +476,31 @@ fn F() { // CHECK:STDOUT: %s.patt: %pattern_type.9be = binding_pattern s [concrete] // CHECK:STDOUT: %s.var_patt: %pattern_type.9be = var_pattern %s.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %s.var: ref %const = var %s.var_patt +// CHECK:STDOUT: %s.var: ref %const.e39 = var %s.var_patt // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] -// CHECK:STDOUT: %.loc10_3: ref %const = splice_block %s.var {} -// CHECK:STDOUT: %G.call: init %const = call %G.ref() to %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: ref %const.e39 = splice_block %s.var {} +// CHECK:STDOUT: %G.call: init %const.e39 = call %G.ref() to %.loc10_3.1 // CHECK:STDOUT: assign %s.var, %G.call -// CHECK:STDOUT: %.loc10_10: type = splice_block %const [concrete = constants.%const] { +// CHECK:STDOUT: %.loc10_10: type = splice_block %const [concrete = constants.%const.e39] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S] -// CHECK:STDOUT: %const: type = const_type %S.ref [concrete = constants.%const] +// CHECK:STDOUT: %const: type = const_type %S.ref [concrete = constants.%const.e39] // CHECK:STDOUT: } -// CHECK:STDOUT: %s: ref %const = bind_name s, %s.var +// CHECK:STDOUT: %s: ref %const.e39 = bind_name s, %s.var // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %.c5d = name_ref foo, imports.%.a21 [concrete = constants.%empty_struct] -// CHECK:STDOUT: %s.ref: ref %const = name_ref s, %s +// CHECK:STDOUT: %s.ref: ref %const.e39 = name_ref s, %s // CHECK:STDOUT: %addr.loc11: %ptr.ff5 = addr_of %s.ref // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%addr.loc11) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.7f5 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_3.2: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value constants.%S, (constants.%Destroy.impl_witness.c8b) [concrete = constants.%Destroy.facet.7eb] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%S, %Destroy.facet [concrete = constants.%Destroy.facet.7eb] +// CHECK:STDOUT: %const.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%const.as.Destroy.impl.Op.a1c // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %s.var, %const.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc10: %ptr.ff5 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc10) +// CHECK:STDOUT: %const.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc10) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -627,8 +649,10 @@ fn F() { // CHECK:STDOUT: %.c5d: type = cpp_overload_set_type @Destroy.Op [concrete] // CHECK:STDOUT: %empty_struct: %.c5d = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -650,8 +674,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %S = var %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_19.2: init %S = class_init (), %s.var [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -661,11 +685,13 @@ fn F() { // CHECK:STDOUT: %foo.ref: %.c5d = name_ref foo, imports.%.a21 [concrete = constants.%empty_struct] // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %addr.loc16: %ptr.5c7 = addr_of %s.ref -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -683,8 +709,10 @@ fn F() { // CHECK:STDOUT: %empty_struct: %.c5d = struct_value () [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -711,8 +739,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %S = var %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_19.2: init %S = class_init (), %s.var [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc8: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -734,11 +762,13 @@ fn F() { // CHECK:STDOUT: %.loc9_29.1: %ptr.5c7 = value_of_initializer %foo.call // CHECK:STDOUT: %.loc9_29.2: %ptr.5c7 = converted %foo.call, %.loc9_29.1 // CHECK:STDOUT: %p: %ptr.5c7 = bind_name p, %.loc9_29.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -753,12 +783,14 @@ fn F() { // CHECK:STDOUT: %.97c: type = cpp_overload_set_type @Destroy.Op [concrete] // CHECK:STDOUT: %empty_struct.504: %.97c = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %.fed: type = cpp_overload_set_type @T.as.Destroy.impl.Op [concrete] +// CHECK:STDOUT: %.fed: type = cpp_overload_set_type @ptr.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %empty_struct.6e8: %.fed = struct_value () [concrete] // CHECK:STDOUT: %Indirect.type: type = fn_type @Indirect [concrete] // CHECK:STDOUT: %Indirect: %Indirect.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -770,7 +802,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %S.decl: type = class_decl @S [concrete = constants.%S] {} {} // CHECK:STDOUT: %.e4a: %.97c = cpp_overload_set_value @Destroy.Op [concrete = constants.%empty_struct.504] -// CHECK:STDOUT: %.9c4: %.fed = cpp_overload_set_value @T.as.Destroy.impl.Op [concrete = constants.%empty_struct.6e8] +// CHECK:STDOUT: %.9c4: %.fed = cpp_overload_set_value @ptr.as.Destroy.impl.Op [concrete = constants.%empty_struct.6e8] // CHECK:STDOUT: %Indirect.decl: %Indirect.type = fn_decl @Indirect [concrete = constants.%Indirect] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -787,8 +819,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %S = var %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_19.2: init %S = class_init (), %s.var [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc8: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -809,16 +841,20 @@ fn F() { // CHECK:STDOUT: %.loc25_19.1: ref %S = converted %.loc25_17.1, %.loc25_17.4 // CHECK:STDOUT: %.loc25_19.2: %S = bind_value %.loc25_19.1 // CHECK:STDOUT: %Indirect.call: init = call imports.%Indirect.decl(%.loc25_19.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc25: = bound_method %.loc25_17.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value.loc25: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc25_17.5: %type_where = converted constants.%S, %facet_value.loc25 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc25: = bound_method %.loc25_17.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc25: = bound_method %.loc25_17.4, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc25: = bound_method %.loc25_17.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc25: %ptr.5c7 = addr_of %.loc25_17.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc25: init %empty_tuple.type = call %bound_method.loc25(%addr.loc25) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc25: init %empty_tuple.type = call %bound_method.loc25(%addr.loc25) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%S, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/reference.carbon b/toolchain/check/testdata/interop/cpp/function/reference.carbon index 002ecc18ddaf..af93d93a256e 100644 --- a/toolchain/check/testdata/interop/cpp/function/reference.carbon +++ b/toolchain/check/testdata/interop/cpp/function/reference.carbon @@ -225,8 +225,10 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %TakesLValue__carbon_thunk.type: type = fn_type @TakesLValue__carbon_thunk [concrete] // CHECK:STDOUT: %TakesLValue__carbon_thunk: %TakesLValue__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -253,8 +255,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %S = var %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_19.2: init %S = class_init (), %s.var [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -265,11 +267,13 @@ fn F() { // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %addr.loc9: %ptr.5c7 = addr_of %s.ref // CHECK:STDOUT: %TakesLValue__carbon_thunk.call: init %empty_tuple.type = call imports.%TakesLValue__carbon_thunk.decl(%addr.loc9) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -281,15 +285,18 @@ fn F() { // CHECK:STDOUT: %pattern_type.7da: type = pattern_type %S [concrete] // CHECK:STDOUT: %.547: type = cpp_overload_set_type @Destroy.Op [concrete] // CHECK:STDOUT: %empty_struct: %.547 = struct_value () [concrete] -// CHECK:STDOUT: %T.e15: type = class_type @T [concrete] -// CHECK:STDOUT: %pattern_type.e6b: type = pattern_type %T.e15 [concrete] -// CHECK:STDOUT: %const: type = const_type %S [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %T: type = class_type @T [concrete] +// CHECK:STDOUT: %pattern_type.e6b: type = pattern_type %T [concrete] +// CHECK:STDOUT: %const.e39: type = const_type %S [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.7bd: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.7bd) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.559: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T.e15) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b53: %T.as.Destroy.impl.Op.type.559 = struct_value () [concrete] -// CHECK:STDOUT: %ptr.b04: type = ptr_type %T.e15 [concrete] +// CHECK:STDOUT: %facet_value.19d: %type_where = facet_value %T, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.896: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.19d) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8c8: %AggregateT.as_type.as.Destroy.impl.Op.type.896 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.b04: type = ptr_type %T [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -301,7 +308,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %S.decl: type = class_decl @S [concrete = constants.%S] {} {} // CHECK:STDOUT: %.a7f: %.547 = cpp_overload_set_value @Destroy.Op [concrete = constants.%empty_struct] -// CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T.e15] {} {} +// CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -311,7 +318,7 @@ fn F() { // CHECK:STDOUT: %v.var_patt: %pattern_type.7da = var_pattern %v.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %S = var %v.var_patt -// CHECK:STDOUT: %.loc8: type = splice_block %S.ref.loc8 [concrete = constants.%S] { +// CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc8: type = name_ref S, imports.%S.decl [concrete = constants.%S] // CHECK:STDOUT: } @@ -333,21 +340,21 @@ fn F() { // CHECK:STDOUT: %t.patt: %pattern_type.e6b = binding_pattern t [concrete] // CHECK:STDOUT: %t.var_patt: %pattern_type.e6b = var_pattern %t.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %t.var: ref %T.e15 = var %t.var_patt -// CHECK:STDOUT: %.loc19: type = splice_block %T.ref [concrete = constants.%T.e15] { +// CHECK:STDOUT: %t.var: ref %T = var %t.var_patt +// CHECK:STDOUT: %.loc19_13: type = splice_block %T.ref [concrete = constants.%T] { // CHECK:STDOUT: %Cpp.ref.loc19: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] -// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T.e15] +// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: ref %T.e15 = bind_name t, %t.var +// CHECK:STDOUT: %t: ref %T = bind_name t, %t.var // CHECK:STDOUT: %Cpp.ref.loc27: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesLValue.ref.loc27: %.547 = name_ref TakesLValue, imports.%.a7f [concrete = constants.%empty_struct] -// CHECK:STDOUT: %t.ref: ref %T.e15 = name_ref t, %t +// CHECK:STDOUT: %t.ref: ref %T = name_ref t, %t // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %u.patt: %pattern_type.7da = binding_pattern u [concrete] // CHECK:STDOUT: %u.var_patt: %pattern_type.7da = var_pattern %u.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %u.var: ref %S = var %u.var_patt -// CHECK:STDOUT: %.loc29: type = splice_block %S.ref.loc29 [concrete = constants.%S] { +// CHECK:STDOUT: %.loc29_13: type = splice_block %S.ref.loc29 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc29: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc29: type = name_ref S, imports.%S.decl [concrete = constants.%S] // CHECK:STDOUT: } @@ -357,24 +364,30 @@ fn F() { // CHECK:STDOUT: %u.ref: ref %S = name_ref u, %u // CHECK:STDOUT: %Cpp.ref.loc37_30: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc37: type = name_ref S, imports.%S.decl [concrete = constants.%S] -// CHECK:STDOUT: %const: type = const_type %S.ref.loc37 [concrete = constants.%const] -// CHECK:STDOUT: %.loc37_21.1: ref %const = as_compatible %u.ref -// CHECK:STDOUT: %.loc37_21.2: ref %const = converted %u.ref, %.loc37_21.1 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc29: = bound_method %u.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %const: type = const_type %S.ref.loc37 [concrete = constants.%const.e39] +// CHECK:STDOUT: %.loc37_21.1: ref %const.e39 = as_compatible %u.ref +// CHECK:STDOUT: %.loc37_21.2: ref %const.e39 = converted %u.ref, %.loc37_21.1 +// CHECK:STDOUT: %facet_value.loc29: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %.loc29_3: %type_where = converted constants.%S, %facet_value.loc29 [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc29: = bound_method %u.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc29: = bound_method %u.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc29: = bound_method %u.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc29: %ptr.5c7 = addr_of %u.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc29: init %empty_tuple.type = call %bound_method.loc29(%addr.loc29) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc19: = bound_method %t.var, constants.%T.as.Destroy.impl.Op.b53 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc29: init %empty_tuple.type = call %bound_method.loc29(%addr.loc29) +// CHECK:STDOUT: %facet_value.loc19: %type_where = facet_value constants.%T, () [concrete = constants.%facet_value.19d] +// CHECK:STDOUT: %.loc19_3: %type_where = converted constants.%T, %facet_value.loc19 [concrete = constants.%facet_value.19d] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc19: = bound_method %t.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.8c8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc19: = bound_method %t.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc19: = bound_method %t.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc19: %ptr.b04 = addr_of %t.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19(%addr.loc19) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19(%addr.loc19) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %.loc8_3: %type_where = converted constants.%S, %facet_value.loc8 [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -390,8 +403,10 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %TakesRValue__carbon_thunk.type: type = fn_type @TakesRValue__carbon_thunk [concrete] // CHECK:STDOUT: %TakesRValue__carbon_thunk: %TakesRValue__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -424,11 +439,13 @@ fn F() { // CHECK:STDOUT: %.loc8_22.3: ref %S = value_as_ref %.loc8_22.2 // CHECK:STDOUT: %addr.loc8_30: %ptr.5c7 = addr_of %.loc8_22.3 // CHECK:STDOUT: %TakesRValue__carbon_thunk.call: init %empty_tuple.type = call imports.%TakesRValue__carbon_thunk.decl(%addr.loc8_30) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_20.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_20.5: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_20.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_20.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_20.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_20: %ptr.5c7 = addr_of %.loc8_20.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_20) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_20) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -445,8 +462,10 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %TakesRValue__carbon_thunk.type: type = fn_type @TakesRValue__carbon_thunk [concrete] // CHECK:STDOUT: %TakesRValue__carbon_thunk: %TakesRValue__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -486,11 +505,13 @@ fn F() { // CHECK:STDOUT: %.loc13: ref %S = value_as_ref %s.ref // CHECK:STDOUT: %addr.loc13: %ptr.5c7 = addr_of %.loc13 // CHECK:STDOUT: %TakesRValue__carbon_thunk.call: init %empty_tuple.type = call imports.%TakesRValue__carbon_thunk.decl(%addr.loc13) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc12_19.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc12_19.7: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc12_19.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc12_19.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc12_19.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc12: %ptr.5c7 = addr_of %.loc12_19.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -503,16 +524,19 @@ fn F() { // CHECK:STDOUT: %pattern_type.7da: type = pattern_type %S [concrete] // CHECK:STDOUT: %.1b9: type = cpp_overload_set_type @Destroy.Op [concrete] // CHECK:STDOUT: %empty_struct: %.1b9 = struct_value () [concrete] -// CHECK:STDOUT: %T.e15: type = class_type @T [concrete] -// CHECK:STDOUT: %pattern_type.e6b: type = pattern_type %T.e15 [concrete] +// CHECK:STDOUT: %T: type = class_type @T [concrete] +// CHECK:STDOUT: %pattern_type.e6b: type = pattern_type %T [concrete] // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] -// CHECK:STDOUT: %const: type = const_type %S [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %const.e39: type = const_type %S [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.7bd: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.7bd) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.559: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T.e15) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b53: %T.as.Destroy.impl.Op.type.559 = struct_value () [concrete] -// CHECK:STDOUT: %ptr.b04: type = ptr_type %T.e15 [concrete] +// CHECK:STDOUT: %facet_value.19d: %type_where = facet_value %T, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.896: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.19d) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8c8: %AggregateT.as_type.as.Destroy.impl.Op.type.896 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.b04: type = ptr_type %T [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -524,7 +548,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %S.decl: type = class_decl @S [concrete = constants.%S] {} {} // CHECK:STDOUT: %.1f6: %.1b9 = cpp_overload_set_value @Destroy.Op [concrete = constants.%empty_struct] -// CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T.e15] {} {} +// CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -534,7 +558,7 @@ fn F() { // CHECK:STDOUT: %s.var_patt: %pattern_type.7da = var_pattern %s.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %s.var: ref %S = var %s.var_patt -// CHECK:STDOUT: %.loc8: type = splice_block %S.ref.loc8 [concrete = constants.%S] { +// CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc8: type = name_ref S, imports.%S.decl [concrete = constants.%S] // CHECK:STDOUT: } @@ -546,15 +570,15 @@ fn F() { // CHECK:STDOUT: %t.patt: %pattern_type.e6b = binding_pattern t [concrete] // CHECK:STDOUT: %t.var_patt: %pattern_type.e6b = var_pattern %t.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %t.var: ref %T.e15 = var %t.var_patt -// CHECK:STDOUT: %.loc18: type = splice_block %T.ref [concrete = constants.%T.e15] { +// CHECK:STDOUT: %t.var: ref %T = var %t.var_patt +// CHECK:STDOUT: %.loc18_13: type = splice_block %T.ref [concrete = constants.%T] { // CHECK:STDOUT: %Cpp.ref.loc18: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] -// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T.e15] +// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: ref %T.e15 = bind_name t, %t.var +// CHECK:STDOUT: %t: ref %T = bind_name t, %t.var // CHECK:STDOUT: %Cpp.ref.loc26: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesRValue.ref.loc26: %.1b9 = name_ref TakesRValue, imports.%.1f6 [concrete = constants.%empty_struct] -// CHECK:STDOUT: %t.ref: ref %T.e15 = name_ref t, %t +// CHECK:STDOUT: %t.ref: ref %T = name_ref t, %t // CHECK:STDOUT: %Cpp.ref.loc35_3: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesRValue.ref.loc35: %.1b9 = name_ref TakesRValue, imports.%.1f6 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc35_21.1: %empty_struct_type = struct_literal () @@ -566,24 +590,30 @@ fn F() { // CHECK:STDOUT: %.loc35_23: ref %S = converted %.loc35_21.1, %.loc35_21.4 // CHECK:STDOUT: %Cpp.ref.loc35_42: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc35_45: type = name_ref S, imports.%S.decl [concrete = constants.%S] -// CHECK:STDOUT: %const: type = const_type %S.ref.loc35_45 [concrete = constants.%const] -// CHECK:STDOUT: %.loc35_33.1: ref %const = as_compatible %.loc35_23 -// CHECK:STDOUT: %.loc35_33.2: ref %const = converted %.loc35_23, %.loc35_33.1 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc35: = bound_method %.loc35_21.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %const: type = const_type %S.ref.loc35_45 [concrete = constants.%const.e39] +// CHECK:STDOUT: %.loc35_33.1: ref %const.e39 = as_compatible %.loc35_23 +// CHECK:STDOUT: %.loc35_33.2: ref %const.e39 = converted %.loc35_23, %.loc35_33.1 +// CHECK:STDOUT: %facet_value.loc35: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %.loc35_21.5: %type_where = converted constants.%S, %facet_value.loc35 [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc35: = bound_method %.loc35_21.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc35: = bound_method %.loc35_21.4, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc35: = bound_method %.loc35_21.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc35: %ptr.5c7 = addr_of %.loc35_21.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc35: init %empty_tuple.type = call %bound_method.loc35(%addr.loc35) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18: = bound_method %t.var, constants.%T.as.Destroy.impl.Op.b53 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc35: init %empty_tuple.type = call %bound_method.loc35(%addr.loc35) +// CHECK:STDOUT: %facet_value.loc18: %type_where = facet_value constants.%T, () [concrete = constants.%facet_value.19d] +// CHECK:STDOUT: %.loc18_3: %type_where = converted constants.%T, %facet_value.loc18 [concrete = constants.%facet_value.19d] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc18: = bound_method %t.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.8c8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc18: = bound_method %t.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc18: = bound_method %t.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc18: %ptr.b04 = addr_of %t.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18(%addr.loc18) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18(%addr.loc18) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %.loc8_3: %type_where = converted constants.%S, %facet_value.loc8 [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -597,13 +627,15 @@ fn F() { // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] // CHECK:STDOUT: %.4e1: type = cpp_overload_set_type @TakesConstLValue [concrete] // CHECK:STDOUT: %empty_struct: %.4e1 = struct_value () [concrete] -// CHECK:STDOUT: %const: type = const_type %S [concrete] -// CHECK:STDOUT: %ptr.ff5: type = ptr_type %const [concrete] +// CHECK:STDOUT: %const.e39: type = const_type %S [concrete] +// CHECK:STDOUT: %ptr.ff5: type = ptr_type %const.e39 [concrete] // CHECK:STDOUT: %TakesConstLValue__carbon_thunk.type: type = fn_type @TakesConstLValue__carbon_thunk [concrete] // CHECK:STDOUT: %TakesConstLValue__carbon_thunk: %TakesConstLValue__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -630,8 +662,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %S = var %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_19.2: init %S = class_init (), %s.var [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc8: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -642,9 +674,9 @@ fn F() { // CHECK:STDOUT: %s.ref.loc9: ref %S = name_ref s, %s // CHECK:STDOUT: %Cpp.ref.loc9_35: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc9: type = name_ref S, imports.%S.decl [concrete = constants.%S] -// CHECK:STDOUT: %const: type = const_type %S.ref.loc9 [concrete = constants.%const] -// CHECK:STDOUT: %.loc9_26.1: ref %const = as_compatible %s.ref.loc9 -// CHECK:STDOUT: %.loc9_26.2: ref %const = converted %s.ref.loc9, %.loc9_26.1 +// CHECK:STDOUT: %const: type = const_type %S.ref.loc9 [concrete = constants.%const.e39] +// CHECK:STDOUT: %.loc9_26.1: ref %const.e39 = as_compatible %s.ref.loc9 +// CHECK:STDOUT: %.loc9_26.2: ref %const.e39 = converted %s.ref.loc9, %.loc9_26.1 // CHECK:STDOUT: %addr.loc9: %ptr.ff5 = addr_of %.loc9_26.2 // CHECK:STDOUT: %TakesConstLValue__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%TakesConstLValue__carbon_thunk.decl(%addr.loc9) // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -654,11 +686,13 @@ fn F() { // CHECK:STDOUT: %.loc11_24.1: %ptr.ff5 = as_compatible %addr.loc11 // CHECK:STDOUT: %.loc11_24.2: %ptr.ff5 = converted %addr.loc11, %.loc11_24.1 // CHECK:STDOUT: %TakesConstLValue__carbon_thunk.call.loc11: init %empty_tuple.type = call imports.%TakesConstLValue__carbon_thunk.decl(%.loc11_24.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -672,18 +706,21 @@ fn F() { // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] // CHECK:STDOUT: %.4e1: type = cpp_overload_set_type @TakesConstLValue [concrete] // CHECK:STDOUT: %empty_struct: %.4e1 = struct_value () [concrete] -// CHECK:STDOUT: %const: type = const_type %S [concrete] -// CHECK:STDOUT: %ptr.ff5: type = ptr_type %const [concrete] +// CHECK:STDOUT: %const.e39: type = const_type %S [concrete] +// CHECK:STDOUT: %ptr.ff5: type = ptr_type %const.e39 [concrete] // CHECK:STDOUT: %TakesConstLValue__carbon_thunk.type: type = fn_type @TakesConstLValue__carbon_thunk [concrete] // CHECK:STDOUT: %TakesConstLValue__carbon_thunk: %TakesConstLValue__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %T.e15: type = class_type @T [concrete] -// CHECK:STDOUT: %pattern_type.e6b: type = pattern_type %T.e15 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.559: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T.e15) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b53: %T.as.Destroy.impl.Op.type.559 = struct_value () [concrete] -// CHECK:STDOUT: %ptr.b04: type = ptr_type %T.e15 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %T: type = class_type @T [concrete] +// CHECK:STDOUT: %pattern_type.e6b: type = pattern_type %T [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.19d: %type_where = facet_value %T, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.896: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.19d) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8c8: %AggregateT.as_type.as.Destroy.impl.Op.type.896 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.b04: type = ptr_type %T [concrete] +// CHECK:STDOUT: %facet_value.7bd: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.7bd) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -700,7 +737,7 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T.e15] {} {} +// CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -731,25 +768,29 @@ fn F() { // CHECK:STDOUT: %t.patt: %pattern_type.e6b = binding_pattern t [concrete] // CHECK:STDOUT: %t.var_patt: %pattern_type.e6b = var_pattern %t.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %t.var: ref %T.e15 = var %t.var_patt -// CHECK:STDOUT: %.loc20: type = splice_block %T.ref [concrete = constants.%T.e15] { +// CHECK:STDOUT: %t.var: ref %T = var %t.var_patt +// CHECK:STDOUT: %.loc20_13: type = splice_block %T.ref [concrete = constants.%T] { // CHECK:STDOUT: %Cpp.ref.loc20: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] -// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T.e15] +// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%T.decl [concrete = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: ref %T.e15 = bind_name t, %t.var +// CHECK:STDOUT: %t: ref %T = bind_name t, %t.var // CHECK:STDOUT: %Cpp.ref.loc28: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesConstLValue.ref.loc28: %.4e1 = name_ref TakesConstLValue, imports.%.9bc [concrete = constants.%empty_struct] -// CHECK:STDOUT: %t.ref: ref %T.e15 = name_ref t, %t -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc20: = bound_method %t.var, constants.%T.as.Destroy.impl.Op.b53 +// CHECK:STDOUT: %t.ref: ref %T = name_ref t, %t +// CHECK:STDOUT: %facet_value.loc20: %type_where = facet_value constants.%T, () [concrete = constants.%facet_value.19d] +// CHECK:STDOUT: %.loc20_3: %type_where = converted constants.%T, %facet_value.loc20 [concrete = constants.%facet_value.19d] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc20: = bound_method %t.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.8c8 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc20: = bound_method %t.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc20: = bound_method %t.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc20: %ptr.b04 = addr_of %t.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc20: init %empty_tuple.type = call %bound_method.loc20(%addr.loc20) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc12: = bound_method %.loc12_19.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc20: init %empty_tuple.type = call %bound_method.loc20(%addr.loc20) +// CHECK:STDOUT: %facet_value.loc12: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %.loc12_19.7: %type_where = converted constants.%S, %facet_value.loc12 [concrete = constants.%facet_value.7bd] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc12: = bound_method %.loc12_19.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc12: = bound_method %.loc12_19.4, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc12: = bound_method %.loc12_19.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc12: %ptr.5c7 = addr_of %.loc12_19.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/struct.carbon b/toolchain/check/testdata/interop/cpp/function/struct.carbon index 0787e332602f..3a572ed5a074 100644 --- a/toolchain/check/testdata/interop/cpp/function/struct.carbon +++ b/toolchain/check/testdata/interop/cpp/function/struct.carbon @@ -533,8 +533,10 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -567,11 +569,13 @@ fn F() { // CHECK:STDOUT: %.loc8_14.3: ref %S = value_as_ref %.loc8_14.2 // CHECK:STDOUT: %addr.loc8_22: %ptr.5c7 = addr_of %.loc8_14.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_22) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_12: %ptr.5c7 = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -586,8 +590,10 @@ fn F() { // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -619,11 +625,13 @@ fn F() { // CHECK:STDOUT: %.loc24_14.1: ref %S = converted %.loc24_12.1, %.loc24_12.4 // CHECK:STDOUT: %.loc24_14.2: %S = bind_value %.loc24_14.1 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%.loc24_14.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc24_12.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc24_12.5: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc24_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc24_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc24_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %.loc24_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -700,8 +708,10 @@ fn F() { // CHECK:STDOUT: %ptr.edf: type = ptr_type %S [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.47c: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.ee3: %T.as.Destroy.impl.Op.type.47c = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.1c1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.dc3: %AggregateT.as_type.as.Destroy.impl.Op.type.1c1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -744,22 +754,26 @@ fn F() { // CHECK:STDOUT: %x.var_patt: %pattern_type.cd8 = var_pattern %x.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %S = var %x.var_patt -// CHECK:STDOUT: %.loc10: type = splice_block %S.ref.loc10 [concrete = constants.%S] { +// CHECK:STDOUT: %.loc10_15: type = splice_block %S.ref.loc10 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %N.ref.loc10: = name_ref N, imports.%N [concrete = imports.%N] // CHECK:STDOUT: %S.ref.loc10: type = name_ref S, imports.%S.decl [concrete = constants.%S] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %S = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.ee3 +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_3: %type_where = converted constants.%S, %facet_value.loc10 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.dc3 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10: %ptr.edf = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.ee3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%S, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.dc3 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_12: %ptr.edf = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -775,8 +789,10 @@ fn F() { // CHECK:STDOUT: %ptr.887: type = ptr_type %S [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.ddb: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.d79: %T.as.Destroy.impl.Op.type.ddb = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fb3: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c17: %AggregateT.as_type.as.Destroy.impl.Op.type.fb3 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -820,11 +836,13 @@ fn F() { // CHECK:STDOUT: %.loc8_17.3: ref %S = value_as_ref %.loc8_17.2 // CHECK:STDOUT: %addr.loc8_31: %ptr.887 = addr_of %.loc8_17.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_31) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_15.4, constants.%T.as.Destroy.impl.Op.d79 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_15.5: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_15.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.c17 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_15: %ptr.887 = addr_of %.loc8_15.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_15) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_15) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -842,11 +860,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cff: type = pattern_type %O [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.9f7: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%O) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.273: %T.as.Destroy.impl.Op.type.9f7 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.568: %type_where = facet_value %O, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.a17: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.568) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c17: %AggregateT.as_type.as.Destroy.impl.Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.820: type = ptr_type %O [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.752: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.c41: %T.as.Destroy.impl.Op.type.752 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.769: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.e87: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.769) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.487: %AggregateT.as_type.as.Destroy.impl.Op.type.e87 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -886,21 +907,25 @@ fn F() { // CHECK:STDOUT: %x.var_patt: %pattern_type.cff = var_pattern %x.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %O = var %x.var_patt -// CHECK:STDOUT: %.loc9: type = splice_block %O.ref.loc9 [concrete = constants.%O] { +// CHECK:STDOUT: %.loc9_13: type = splice_block %O.ref.loc9 [concrete = constants.%O] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %O.ref.loc9: type = name_ref O, imports.%O.decl [concrete = constants.%O] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %O = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.273 +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%O, () [concrete = constants.%facet_value.568] +// CHECK:STDOUT: %.loc9_3: %type_where = converted constants.%O, %facet_value.loc9 [concrete = constants.%facet_value.568] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c17 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9: %ptr.820 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.c41 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value.769] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%S, %facet_value.loc8 [concrete = constants.%facet_value.769] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.487 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_12: %ptr.149 = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -920,8 +945,10 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -960,11 +987,13 @@ fn F() { // CHECK:STDOUT: %.loc9_14.3: ref %S = value_as_ref %.loc9_14.2 // CHECK:STDOUT: %addr.loc9_22: %ptr.5c7 = addr_of %.loc9_14.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc9_22) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc9_12.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_12.5: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc9_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc9_12: %ptr.5c7 = addr_of %.loc9_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc9_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc9_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -984,8 +1013,10 @@ fn F() { // CHECK:STDOUT: %empty_struct.21b: %.bce = struct_value () [concrete] // CHECK:STDOUT: %S.bar.type: type = fn_type @S.bar [concrete] // CHECK:STDOUT: %S.bar: %S.bar.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1024,11 +1055,13 @@ fn F() { // CHECK:STDOUT: %S.ref.loc9: type = name_ref S, imports.%S.decl [concrete = constants.%S] // CHECK:STDOUT: %bar.ref: %.bce = name_ref bar, imports.%.8f2 [concrete = constants.%empty_struct.21b] // CHECK:STDOUT: %S.bar.call: init %empty_tuple.type = call imports.%S.bar.decl() -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_12: %ptr.5c7 = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1114,8 +1147,10 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.d46: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%S) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.062: %T.as.Destroy.impl.Op.type.d46 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %S, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.df1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.cc2: %AggregateT.as_type.as.Destroy.impl.Op.type.df1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1140,11 +1175,13 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_11.1) // CHECK:STDOUT: %.loc8_11.2: init %S = in_place_init %foo__carbon_thunk.call, %.loc8_11.1 // CHECK:STDOUT: %.loc8_11.3: ref %S = temporary %.loc8_11.1, %.loc8_11.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.3, constants.%T.as.Destroy.impl.Op.062 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%S, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_11.4: %type_where = converted constants.%S, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.cc2 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_11.2: %ptr.5c7 = addr_of %.loc8_11.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_11.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_11.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/union.carbon b/toolchain/check/testdata/interop/cpp/function/union.carbon index 7ee76770a426..22f0564eb02f 100644 --- a/toolchain/check/testdata/interop/cpp/function/union.carbon +++ b/toolchain/check/testdata/interop/cpp/function/union.carbon @@ -524,8 +524,10 @@ fn F() { // CHECK:STDOUT: %ptr.86f: type = ptr_type %U [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.610: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%U) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.22a: %T.as.Destroy.impl.Op.type.610 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %U, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.981: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.4aa: %AggregateT.as_type.as.Destroy.impl.Op.type.981 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -558,11 +560,13 @@ fn F() { // CHECK:STDOUT: %.loc8_14.3: ref %U = value_as_ref %.loc8_14.2 // CHECK:STDOUT: %addr.loc8_22: %ptr.86f = addr_of %.loc8_14.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_22) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.22a +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%U, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%U, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.4aa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_12: %ptr.86f = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -639,8 +643,10 @@ fn F() { // CHECK:STDOUT: %ptr.87e: type = ptr_type %U [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.8a5: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%U) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.831: %T.as.Destroy.impl.Op.type.8a5 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %U, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.f0f: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.2bd: %AggregateT.as_type.as.Destroy.impl.Op.type.f0f = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -683,22 +689,26 @@ fn F() { // CHECK:STDOUT: %x.var_patt: %pattern_type.eb9 = var_pattern %x.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %U = var %x.var_patt -// CHECK:STDOUT: %.loc10: type = splice_block %U.ref.loc10 [concrete = constants.%U] { +// CHECK:STDOUT: %.loc10_15: type = splice_block %U.ref.loc10 [concrete = constants.%U] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %N.ref.loc10: = name_ref N, imports.%N [concrete = imports.%N] // CHECK:STDOUT: %U.ref.loc10: type = name_ref U, imports.%U.decl [concrete = constants.%U] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %U = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.831 +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%U, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_3: %type_where = converted constants.%U, %facet_value.loc10 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.2bd // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10: %ptr.87e = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.831 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%U, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%U, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.2bd // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_12: %ptr.87e = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -714,8 +724,10 @@ fn F() { // CHECK:STDOUT: %ptr.8c1: type = ptr_type %U [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.081: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%U) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b68: %T.as.Destroy.impl.Op.type.081 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %U, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.da5: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.941: %AggregateT.as_type.as.Destroy.impl.Op.type.da5 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -759,11 +771,13 @@ fn F() { // CHECK:STDOUT: %.loc8_17.3: ref %U = value_as_ref %.loc8_17.2 // CHECK:STDOUT: %addr.loc8_31: %ptr.8c1 = addr_of %.loc8_17.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_31) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_15.4, constants.%T.as.Destroy.impl.Op.b68 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%U, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_15.5: %type_where = converted constants.%U, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_15.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.941 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_15: %ptr.8c1 = addr_of %.loc8_15.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_15) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_15) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -781,11 +795,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cff: type = pattern_type %O [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.9f7: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%O) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.273: %T.as.Destroy.impl.Op.type.9f7 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.568: %type_where = facet_value %O, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.a17: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.568) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c17: %AggregateT.as_type.as.Destroy.impl.Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.820: type = ptr_type %O [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.3f8: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%U) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.6fd: %T.as.Destroy.impl.Op.type.3f8 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.f72: %type_where = facet_value %U, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.b0e: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.f72) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bcd: %AggregateT.as_type.as.Destroy.impl.Op.type.b0e = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -825,21 +842,25 @@ fn F() { // CHECK:STDOUT: %x.var_patt: %pattern_type.cff = var_pattern %x.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %O = var %x.var_patt -// CHECK:STDOUT: %.loc9: type = splice_block %O.ref.loc9 [concrete = constants.%O] { +// CHECK:STDOUT: %.loc9_13: type = splice_block %O.ref.loc9 [concrete = constants.%O] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %O.ref.loc9: type = name_ref O, imports.%O.decl [concrete = constants.%O] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %O = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.273 +// CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%O, () [concrete = constants.%facet_value.568] +// CHECK:STDOUT: %.loc9_3: %type_where = converted constants.%O, %facet_value.loc9 [concrete = constants.%facet_value.568] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c17 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc9: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9: %ptr.820 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.6fd +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%U, () [concrete = constants.%facet_value.f72] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%U, %facet_value.loc8 [concrete = constants.%facet_value.f72] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.bcd // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_12: %ptr.a6c = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -859,8 +880,10 @@ fn F() { // CHECK:STDOUT: %ptr.86f: type = ptr_type %U [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.610: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%U) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.22a: %T.as.Destroy.impl.Op.type.610 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %U, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.981: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.4aa: %AggregateT.as_type.as.Destroy.impl.Op.type.981 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -899,11 +922,13 @@ fn F() { // CHECK:STDOUT: %.loc9_14.3: ref %U = value_as_ref %.loc9_14.2 // CHECK:STDOUT: %addr.loc9_22: %ptr.86f = addr_of %.loc9_14.3 // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc9_22) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc9_12.4, constants.%T.as.Destroy.impl.Op.22a +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%U, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_12.5: %type_where = converted constants.%U, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc9_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.4aa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc9_12: %ptr.86f = addr_of %.loc9_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc9_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc9_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -923,8 +948,10 @@ fn F() { // CHECK:STDOUT: %empty_struct.e6c: %.372 = struct_value () [concrete] // CHECK:STDOUT: %U.bar.type: type = fn_type @U.bar [concrete] // CHECK:STDOUT: %U.bar: %U.bar.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.610: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%U) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.22a: %T.as.Destroy.impl.Op.type.610 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %U, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.981: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.4aa: %AggregateT.as_type.as.Destroy.impl.Op.type.981 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -963,11 +990,13 @@ fn F() { // CHECK:STDOUT: %U.ref.loc9: type = name_ref U, imports.%U.decl [concrete = constants.%U] // CHECK:STDOUT: %bar.ref: %.372 = name_ref bar, imports.%.a8c [concrete = constants.%empty_struct.e6c] // CHECK:STDOUT: %U.bar.call: init %empty_tuple.type = call imports.%U.bar.decl() -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%T.as.Destroy.impl.Op.22a +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%U, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.5: %type_where = converted constants.%U, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_12.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.4aa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_12: %ptr.86f = addr_of %.loc8_12.4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_12) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1053,8 +1082,10 @@ fn F() { // CHECK:STDOUT: %ptr.86f: type = ptr_type %U [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.610: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%U) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.22a: %T.as.Destroy.impl.Op.type.610 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %U, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.981: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.4aa: %AggregateT.as_type.as.Destroy.impl.Op.type.981 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1079,11 +1110,13 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_11.1) // CHECK:STDOUT: %.loc8_11.2: init %U = in_place_init %foo__carbon_thunk.call, %.loc8_11.1 // CHECK:STDOUT: %.loc8_11.3: ref %U = temporary %.loc8_11.1, %.loc8_11.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.3, constants.%T.as.Destroy.impl.Op.22a +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%U, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_11.4: %type_where = converted constants.%U, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.4aa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_11.2: %ptr.86f = addr_of %.loc8_11.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_11.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_11.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/namespace.carbon b/toolchain/check/testdata/interop/cpp/namespace.carbon index 82193bbf9a36..5ef4d426a2ad 100644 --- a/toolchain/check/testdata/interop/cpp/namespace.carbon +++ b/toolchain/check/testdata/interop/cpp/namespace.carbon @@ -372,8 +372,10 @@ fn Use(y: Cpp.Y) -> i32 { // CHECK:STDOUT: %ptr.13d: type = ptr_type %X [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.e9c: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%X) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.d48: %T.as.Destroy.impl.Op.type.e9c = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %X, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.24f: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.675: %AggregateT.as_type.as.Destroy.impl.Op.type.24f = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -398,11 +400,13 @@ fn Use(y: Cpp.Y) -> i32 { // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc8_11.1) // CHECK:STDOUT: %.loc8_11.2: init %X = in_place_init %foo__carbon_thunk.call, %.loc8_11.1 // CHECK:STDOUT: %.loc8_11.3: ref %X = temporary %.loc8_11.1, %.loc8_11.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.3, constants.%T.as.Destroy.impl.Op.d48 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%X, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_11.4: %type_where = converted constants.%X, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc8_11.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.675 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.3, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc8_11.2: %ptr.13d = addr_of %.loc8_11.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_11.2) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_11.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/typedef.carbon b/toolchain/check/testdata/interop/cpp/typedef.carbon index 6145755d76c3..893fd4e05e64 100644 --- a/toolchain/check/testdata/interop/cpp/typedef.carbon +++ b/toolchain/check/testdata/interop/cpp/typedef.carbon @@ -84,8 +84,8 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %Copy.facet.7d5: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.a93) [concrete] // CHECK:STDOUT: %.9e2: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.7d5 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.9fb, @ptr.as.Copy.impl.Op(%i32) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a18: %T.as.Destroy.impl.Op.type.f3e = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.142: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%i32) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.c04: %ptr.as.Destroy.impl.Op.type.142 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type.4f9: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.796: %Int.as.Destroy.impl.Op.type.4f9 = struct_value () [concrete] @@ -144,11 +144,11 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr: type = ptr_type %bar.ref [concrete = constants.%ptr.235] // CHECK:STDOUT: } // CHECK:STDOUT: %p: ref %ptr.235 = bind_name p, %p.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %p.var, constants.%T.as.Destroy.impl.Op.a18 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %p.var, constants.%ptr.as.Destroy.impl.Op.c04 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_3: = bound_method %p.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc10_3: = bound_method %p.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc10_3: %ptr.5d5 = addr_of %p.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_3(%addr.loc10_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_3(%addr.loc10_3) // CHECK:STDOUT: %Int.as.Destroy.impl.Op.bound: = bound_method %n.var, constants.%Int.as.Destroy.impl.Op.796 // CHECK:STDOUT: // CHECK:STDOUT: %bound_method.loc8_3.3: = bound_method %n.var, %Int.as.Destroy.impl.Op.specific_fn @@ -175,8 +175,8 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %Copy.facet.b1a: %Copy.type = facet_value %ptr.d9e, (%Copy.impl_witness.144) [concrete] // CHECK:STDOUT: %.7e1: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.b1a [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.106, @ptr.as.Copy.impl.Op(%C) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.c52: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.d9e) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.524: %T.as.Destroy.impl.Op.type.c52 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.fe9: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%C) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.e76: %ptr.as.Destroy.impl.Op.type.fe9 = struct_value () [concrete] // CHECK:STDOUT: %ptr.01d: type = ptr_type %ptr.d9e [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -231,16 +231,16 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr.loc10: type = ptr_type %C.ref.loc10 [concrete = constants.%ptr.d9e] // CHECK:STDOUT: } // CHECK:STDOUT: %pc: ref %ptr.d9e = bind_name pc, %pc.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %pc.var, constants.%T.as.Destroy.impl.Op.524 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc10: = bound_method %pc.var, constants.%ptr.as.Destroy.impl.Op.e76 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc10_3: = bound_method %pc.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc10_3: = bound_method %pc.var, %ptr.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_3: %ptr.01d = addr_of %pc.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10_3(%addr.loc10_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9: = bound_method %pd.var, constants.%T.as.Destroy.impl.Op.524 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10_3(%addr.loc10_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc9: = bound_method %pd.var, constants.%ptr.as.Destroy.impl.Op.e76 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc9_3: = bound_method %pd.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc9_3: = bound_method %pd.var, %ptr.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9_3: %ptr.01d = addr_of %pd.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9_3(%addr.loc9_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9_3(%addr.loc9_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 67750f7ed4d7..3d1f9e1755a2 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -398,20 +398,25 @@ impl i32 as Empty { // CHECK:STDOUT: %tuple.f41: %tuple.type.9fb = tuple_value (%empty_tuple) [concrete] // CHECK:STDOUT: %tuple.elem0.eaf: %empty_tuple.type = tuple_access %c, element0 [symbolic] // CHECK:STDOUT: %tuple.elem1: %empty_tuple.type = tuple_access %c, element1 [symbolic] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.13b: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.2d5) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.02a: %T.as.Destroy.impl.Op.type.13b = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2e5: = specific_function %T.as.Destroy.impl.Op.02a, @T.as.Destroy.impl.Op(%tuple.type.2d5) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.779: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.bcd) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.e5f: %T.as.Destroy.impl.Op.type.779 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.e29: = specific_function %T.as.Destroy.impl.Op.e5f, @T.as.Destroy.impl.Op(%tuple.type.bcd) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.839: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.9fb) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.571: %T.as.Destroy.impl.Op.type.839 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.c7f: %type_where = facet_value %tuple.type.2d5, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.b05: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.c7f) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.1d6: %AggregateT.as_type.as.Destroy.impl.Op.type.b05 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.cca: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.1d6, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.c7f) [concrete] +// CHECK:STDOUT: %facet_value.dcc: %type_where = facet_value %tuple.type.bcd, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.85e: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.dcc) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.50f: %AggregateT.as_type.as.Destroy.impl.Op.type.85e = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.c15: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.50f, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.dcc) [concrete] +// CHECK:STDOUT: %facet_value.132: %type_where = facet_value %tuple.type.9fb, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.2ee: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.132) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.7ed: %AggregateT.as_type.as.Destroy.impl.Op.type.2ee = struct_value () [concrete] // CHECK:STDOUT: %ptr.652: type = ptr_type %tuple.type.9fb [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.db0: = specific_function %T.as.Destroy.impl.Op.571, @T.as.Destroy.impl.Op(%tuple.type.9fb) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.af4: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.7ed, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.132) [concrete] +// CHECK:STDOUT: %facet_value.ff9: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.ff9) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.e94: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.a54: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.ff9) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -554,8 +559,8 @@ impl i32 as Empty { // CHECK:STDOUT: %a1.var: ref %empty_tuple.type = var %a1.var_patt // CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, @C.%a // CHECK:STDOUT: %.loc13_18: init %empty_tuple.type = tuple_init () to %a1.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_5: init %empty_tuple.type = converted %a.ref, %.loc13_18 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %a1.var, %.loc13_5 +// CHECK:STDOUT: %.loc13_5.1: init %empty_tuple.type = converted %a.ref, %.loc13_18 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %a1.var, %.loc13_5.1 // CHECK:STDOUT: %.loc13_14.1: type = splice_block %.loc13_14.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc13_14.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc13_14.3: type = converted %.loc13_14.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -572,8 +577,8 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc14_21.1: init %empty_tuple.type = tuple_init () to %tuple.elem0.loc14_21.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc14_21.2: init %empty_tuple.type = converted %tuple.elem0.loc14_21.1, %.loc14_21.1 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc14_21.3: init %tuple.type.9fb = tuple_init (%.loc14_21.2) to %b1.var [concrete = constants.%tuple.f41] -// CHECK:STDOUT: %.loc14_5: init %tuple.type.9fb = converted %b.ref, %.loc14_21.3 [concrete = constants.%tuple.f41] -// CHECK:STDOUT: assign %b1.var, %.loc14_5 +// CHECK:STDOUT: %.loc14_5.1: init %tuple.type.9fb = converted %b.ref, %.loc14_21.3 [concrete = constants.%tuple.f41] +// CHECK:STDOUT: assign %b1.var, %.loc14_5.1 // CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.4 [concrete = constants.%tuple.type.9fb] { // CHECK:STDOUT: %.loc14_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc14_17.2: %tuple.type.9fb = tuple_literal (%.loc14_15) @@ -596,8 +601,8 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc15_24.3: init %empty_tuple.type = tuple_init () to %tuple.elem1.loc15_24.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc15_24.4: init %empty_tuple.type = converted %tuple.elem1.loc15_24.1, %.loc15_24.3 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc15_24.5: init %tuple.type.bcd = tuple_init (%.loc15_24.2, %.loc15_24.4) to %c1.var [concrete = constants.%tuple.d8f] -// CHECK:STDOUT: %.loc15_5: init %tuple.type.bcd = converted %c.ref, %.loc15_24.5 [concrete = constants.%tuple.d8f] -// CHECK:STDOUT: assign %c1.var, %.loc15_5 +// CHECK:STDOUT: %.loc15_5.1: init %tuple.type.bcd = converted %c.ref, %.loc15_24.5 [concrete = constants.%tuple.d8f] +// CHECK:STDOUT: assign %c1.var, %.loc15_5.1 // CHECK:STDOUT: %.loc15_20.1: type = splice_block %.loc15_20.5 [concrete = constants.%tuple.type.bcd] { // CHECK:STDOUT: %.loc15_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_19: %empty_tuple.type = tuple_literal () @@ -626,8 +631,8 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc16_28.5: init %empty_tuple.type = tuple_init () to %tuple.elem2.loc16_28.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc16_28.6: init %empty_tuple.type = converted %tuple.elem2.loc16_28.1, %.loc16_28.5 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc16_28.7: init %tuple.type.2d5 = tuple_init (%.loc16_28.2, %.loc16_28.4, %.loc16_28.6) to %d1.var [concrete = constants.%tuple.7e4] -// CHECK:STDOUT: %.loc16_5: init %tuple.type.2d5 = converted %d.ref, %.loc16_28.7 [concrete = constants.%tuple.7e4] -// CHECK:STDOUT: assign %d1.var, %.loc16_5 +// CHECK:STDOUT: %.loc16_5.1: init %tuple.type.2d5 = converted %d.ref, %.loc16_28.7 [concrete = constants.%tuple.7e4] +// CHECK:STDOUT: assign %d1.var, %.loc16_5.1 // CHECK:STDOUT: %.loc16_24.1: type = splice_block %.loc16_24.6 [concrete = constants.%tuple.type.2d5] { // CHECK:STDOUT: %.loc16_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc16_19: %empty_tuple.type = tuple_literal () @@ -639,26 +644,34 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc16_24.6: type = converted %.loc16_24.2, constants.%tuple.type.2d5 [concrete = constants.%tuple.type.2d5] // CHECK:STDOUT: } // CHECK:STDOUT: %d1: ref %tuple.type.2d5 = bind_name d1, %d1.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc16: = bound_method %d1.var, constants.%T.as.Destroy.impl.Op.02a -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.02a, @T.as.Destroy.impl.Op(constants.%tuple.type.2d5) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.2e5] -// CHECK:STDOUT: %bound_method.loc16: = bound_method %d1.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc16: %type_where = facet_value constants.%tuple.type.2d5, () [concrete = constants.%facet_value.c7f] +// CHECK:STDOUT: %.loc16_5.2: %type_where = converted constants.%tuple.type.2d5, %facet_value.loc16 [concrete = constants.%facet_value.c7f] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc16: = bound_method %d1.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.1d6 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.1d6, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.c7f) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.cca] +// CHECK:STDOUT: %bound_method.loc16: = bound_method %d1.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc16: %ptr.7fe = addr_of %d1.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16(%addr.loc16) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc15: = bound_method %c1.var, constants.%T.as.Destroy.impl.Op.e5f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.e5f, @T.as.Destroy.impl.Op(constants.%tuple.type.bcd) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e29] -// CHECK:STDOUT: %bound_method.loc15: = bound_method %c1.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16(%addr.loc16) +// CHECK:STDOUT: %facet_value.loc15: %type_where = facet_value constants.%tuple.type.bcd, () [concrete = constants.%facet_value.dcc] +// CHECK:STDOUT: %.loc15_5.2: %type_where = converted constants.%tuple.type.bcd, %facet_value.loc15 [concrete = constants.%facet_value.dcc] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc15: = bound_method %c1.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.50f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.50f, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.dcc) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.c15] +// CHECK:STDOUT: %bound_method.loc15: = bound_method %c1.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc15: %ptr.709 = addr_of %c1.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc14: = bound_method %b1.var, constants.%T.as.Destroy.impl.Op.571 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%T.as.Destroy.impl.Op.571, @T.as.Destroy.impl.Op(constants.%tuple.type.9fb) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.db0] -// CHECK:STDOUT: %bound_method.loc14: = bound_method %b1.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15) +// CHECK:STDOUT: %facet_value.loc14: %type_where = facet_value constants.%tuple.type.9fb, () [concrete = constants.%facet_value.132] +// CHECK:STDOUT: %.loc14_5.2: %type_where = converted constants.%tuple.type.9fb, %facet_value.loc14 [concrete = constants.%facet_value.132] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc14: = bound_method %b1.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.7ed +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.7ed, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.132) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.af4] +// CHECK:STDOUT: %bound_method.loc14: = bound_method %b1.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc14: %ptr.652 = addr_of %b1.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc13: = bound_method %a1.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.4: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e94] -// CHECK:STDOUT: %bound_method.loc13: = bound_method %a1.var, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14) +// CHECK:STDOUT: %facet_value.loc13: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value.ff9] +// CHECK:STDOUT: %.loc13_5.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc13 [concrete = constants.%facet_value.ff9] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc13: = bound_method %a1.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.ff9) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.a54] +// CHECK:STDOUT: %bound_method.loc13: = bound_method %a1.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4 // CHECK:STDOUT: %addr.loc13: %ptr.843 = addr_of %a1.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 0ceddc6eab33..ba7b38b09f02 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -32,17 +32,17 @@ fn F() { // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f [symbolic] +// CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f131.1 [symbolic] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %ptr.a13: type = ptr_type %ptr.79f [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.79f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.79f, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.fc8: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.fc8 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %ptr.a13abe.2: type = ptr_type %ptr.79f131.1 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.3af: = lookup_impl_witness %ptr.79f131.1, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.64e: %Destroy.type = facet_value %ptr.79f131.1, (%Destroy.lookup_impl_witness.3af) [symbolic] +// CHECK:STDOUT: %.fc8: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.64e [symbolic] +// CHECK:STDOUT: %impl.elem0.108: %.fc8 = impl_witness_access %Destroy.lookup_impl_witness.3af, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.a84: = specific_impl_function %impl.elem0.108, @Destroy.Op(%Destroy.facet.64e) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -78,26 +78,26 @@ fn F() { // CHECK:STDOUT: %p.patt: %pattern_type.afe = binding_pattern p [concrete] // CHECK:STDOUT: %p.var_patt: %pattern_type.afe = var_pattern %p.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %p.var: ref %ptr.79f = var %p.var_patt -// CHECK:STDOUT: %.loc17_11: type = splice_block %ptr [symbolic = constants.%ptr.79f] { +// CHECK:STDOUT: %p.var: ref %ptr.79f131.1 = var %p.var_patt +// CHECK:STDOUT: %.loc17_11: type = splice_block %ptr [symbolic = constants.%ptr.79f131.1] { // CHECK:STDOUT: %T.ref.loc17: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %ptr: type = ptr_type %T.ref.loc17 [symbolic = constants.%ptr.79f] +// CHECK:STDOUT: %ptr: type = ptr_type %T.ref.loc17 [symbolic = constants.%ptr.79f131.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: ref %ptr.79f = bind_name p, %p.var +// CHECK:STDOUT: %p: ref %ptr.79f131.1 = bind_name p, %p.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.7dc = binding_pattern a [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %p.ref: ref %ptr.79f = name_ref p, %p -// CHECK:STDOUT: %.loc18_15: %ptr.79f = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref %ptr.79f131.1 = name_ref p, %p +// CHECK:STDOUT: %.loc18_15: %ptr.79f131.1 = bind_value %p.ref // CHECK:STDOUT: %.loc18_14.1: ref %T = deref %.loc18_15 // CHECK:STDOUT: %T.ref.loc18: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %.loc18_14.2: %T = bind_value %.loc18_14.1 // CHECK:STDOUT: %a: %T = bind_name a, %.loc18_14.2 -// CHECK:STDOUT: %impl.elem0: %.fc8 = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %.fc8 = impl_witness_access constants.%Destroy.lookup_impl_witness.3af, element0 [symbolic = constants.%impl.elem0.108] // CHECK:STDOUT: %bound_method.loc17_3.1: = bound_method %p.var, %impl.elem0 -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(constants.%Destroy.facet) [symbolic = constants.%specific_impl_fn] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(constants.%Destroy.facet.64e) [symbolic = constants.%specific_impl_fn.a84] // CHECK:STDOUT: %bound_method.loc17_3.2: = bound_method %p.var, %specific_impl_fn -// CHECK:STDOUT: %addr: %ptr.a13 = addr_of %p.var +// CHECK:STDOUT: %addr: %ptr.a13abe.2 = addr_of %p.var // CHECK:STDOUT: %.loc17_3: init %empty_tuple.type = call %bound_method.loc17_3.2(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index d0fd526d2bb5..27ec7d4263c7 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -58,14 +58,15 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.e94: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f06: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(bool) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.61f: %T.as.Destroy.impl.Op.type.f06 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.type: type = fn_type @bool.as.Destroy.impl.Op [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op: %bool.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.80e: = specific_function %T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [concrete] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -191,8 +192,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %a.var: ref bool = var %a.var_patt // CHECK:STDOUT: %true.loc23_47: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %impl.elem0: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc23_47: = bound_method %true.loc23_47, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc23_47(%true.loc23_47) [concrete = constants.%true] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %true.loc23_47, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] +// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc23(%true.loc23_47) [concrete = constants.%true] // CHECK:STDOUT: assign %a.var, %bool.as.Copy.impl.Op.call // CHECK:STDOUT: br !.loc23_13 // CHECK:STDOUT: @@ -233,8 +234,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var %b.var_patt // CHECK:STDOUT: %.loc24_49.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc24_49.2: init %empty_tuple.type = tuple_init () to %b.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc24_3: init %empty_tuple.type = converted %.loc24_49.1, %.loc24_49.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %b.var, %.loc24_3 +// CHECK:STDOUT: %.loc24_3.1: init %empty_tuple.type = converted %.loc24_49.1, %.loc24_49.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %b.var, %.loc24_3.1 // CHECK:STDOUT: br !.loc24_13 // CHECK:STDOUT: // CHECK:STDOUT: !.loc24_13: @@ -274,8 +275,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %c.var: ref %empty_tuple.type = var %c.var_patt // CHECK:STDOUT: %.loc25_49.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc25_49.2: init %empty_tuple.type = tuple_init () to %c.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc25_3: init %empty_tuple.type = converted %.loc25_49.1, %.loc25_49.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %c.var, %.loc25_3 +// CHECK:STDOUT: %.loc25_3.1: init %empty_tuple.type = converted %.loc25_49.1, %.loc25_49.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %c.var, %.loc25_3.1 // CHECK:STDOUT: br !.loc25_13 // CHECK:STDOUT: // CHECK:STDOUT: !.loc25_13: @@ -315,8 +316,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var %d.var_patt // CHECK:STDOUT: %.loc26_50.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc26_50.2: init %empty_tuple.type = tuple_init () to %d.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_3: init %empty_tuple.type = converted %.loc26_50.1, %.loc26_50.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %d.var, %.loc26_3 +// CHECK:STDOUT: %.loc26_3.1: init %empty_tuple.type = converted %.loc26_50.1, %.loc26_50.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %d.var, %.loc26_3.1 // CHECK:STDOUT: br !.loc26_13 // CHECK:STDOUT: // CHECK:STDOUT: !.loc26_13: @@ -349,26 +350,30 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc26_7: // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc26: = bound_method %d.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e94] -// CHECK:STDOUT: %bound_method.loc26: = bound_method %d.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc26: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc26_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc26 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc26: = bound_method %d.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc26: = bound_method %d.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc26: %ptr.843 = addr_of %d.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc25: = bound_method %c.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e94] -// CHECK:STDOUT: %bound_method.loc25: = bound_method %c.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26) +// CHECK:STDOUT: %facet_value.loc25: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc25_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc25 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc25: = bound_method %c.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc25: = bound_method %c.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc25: %ptr.843 = addr_of %c.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc25: init %empty_tuple.type = call %bound_method.loc25(%addr.loc25) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc24: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e94] -// CHECK:STDOUT: %bound_method.loc24: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc25: init %empty_tuple.type = call %bound_method.loc25(%addr.loc25) +// CHECK:STDOUT: %facet_value.loc24: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc24_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc24 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc24: = bound_method %b.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc24: = bound_method %b.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc24: %ptr.843 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc23: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.4: = specific_function constants.%T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.80e] -// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc23: %ptr.bb2 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound(%addr.loc23) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -381,8 +386,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var %a.var_patt // CHECK:STDOUT: %.loc30_46.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc30_46.2: init %empty_tuple.type = tuple_init () to %a.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc30_3: init %empty_tuple.type = converted %.loc30_46.1, %.loc30_46.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %a.var, %.loc30_3 +// CHECK:STDOUT: %.loc30_3.1: init %empty_tuple.type = converted %.loc30_46.1, %.loc30_46.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %a.var, %.loc30_3.1 // CHECK:STDOUT: br !.loc30_13 // CHECK:STDOUT: // CHECK:STDOUT: !.loc30_13: @@ -415,11 +420,13 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc30_7: // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e94] -// CHECK:STDOUT: %bound_method: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc30_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index f80bdf637c62..40fc6281f485 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -113,16 +113,19 @@ fn Main() { // CHECK:STDOUT: %bound_method.422: = bound_method %int_10.64f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_10.265: %i32 = int_value 10 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a18: %T.as.Destroy.impl.Op.type.f3e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.142: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%i32) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.c04: %ptr.as.Destroy.impl.Op.type.142 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.786: = specific_function %T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.49c: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%struct_type.a.b.501) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.d1c: %T.as.Destroy.impl.Op.type.49c = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.64d: = specific_function %T.as.Destroy.impl.Op.d1c, @T.as.Destroy.impl.Op(%struct_type.a.b.501) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a65: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.d07) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.5e9: %T.as.Destroy.impl.Op.type.a65 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.0b1: = specific_function %T.as.Destroy.impl.Op.5e9, @T.as.Destroy.impl.Op(%tuple.type.d07) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(%i32) [concrete] +// CHECK:STDOUT: %facet_value.de6: %type_where = facet_value %struct_type.a.b.501, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.469: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.de6) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.f75: %AggregateT.as_type.as.Destroy.impl.Op.type.469 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.0f3: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.f75, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.de6) [concrete] +// CHECK:STDOUT: %facet_value.5be: %type_where = facet_value %tuple.type.d07, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.c59: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.5be) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.e4f: %AggregateT.as_type.as.Destroy.impl.Op.type.c59 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.606: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.e4f, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.5be) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type.4f9: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.796: %Int.as.Destroy.impl.Op.type.4f9 = struct_value () [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function %Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(%int_32) [concrete] @@ -210,8 +213,8 @@ fn Main() { // CHECK:STDOUT: %tuple.elem1.loc19: ref %i32 = tuple_access %b.var, element1 // CHECK:STDOUT: %.loc19_28.5: init %i32 = initialize_from %.loc19_28.4 to %tuple.elem1.loc19 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc19_28.6: init %tuple.type.d07 = tuple_init (%.loc19_28.3, %.loc19_28.5) to %b.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc19_3: init %tuple.type.d07 = converted %.loc19_28.1, %.loc19_28.6 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %b.var, %.loc19_3 +// CHECK:STDOUT: %.loc19_3.1: init %tuple.type.d07 = converted %.loc19_28.1, %.loc19_28.6 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %b.var, %.loc19_3.1 // CHECK:STDOUT: %.loc19_19.1: type = splice_block %.loc19_19.3 [concrete = constants.%tuple.type.d07] { // CHECK:STDOUT: %int_32.loc19_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc19_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -268,8 +271,8 @@ fn Main() { // CHECK:STDOUT: %.loc23_46.6: ref %i32 = struct_access %c.var, element1 // CHECK:STDOUT: %.loc23_46.7: init %i32 = initialize_from %.loc23_46.5 to %.loc23_46.6 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc23_46.8: init %struct_type.a.b.501 = struct_init (%.loc23_46.4, %.loc23_46.7) to %c.var [concrete = constants.%struct] -// CHECK:STDOUT: %.loc23_3: init %struct_type.a.b.501 = converted %.loc23_46.1, %.loc23_46.8 [concrete = constants.%struct] -// CHECK:STDOUT: assign %c.var, %.loc23_3 +// CHECK:STDOUT: %.loc23_3.1: init %struct_type.a.b.501 = converted %.loc23_46.1, %.loc23_46.8 [concrete = constants.%struct] +// CHECK:STDOUT: assign %c.var, %.loc23_3.1 // CHECK:STDOUT: %.loc23_27: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.501] { // CHECK:STDOUT: %int_32.loc23_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc23_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -352,21 +355,25 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30: init %i32 = call %bound_method.loc30_29.2(%int_10) [concrete = constants.%int_10.265] // CHECK:STDOUT: %.loc30_29: init %i32 = converted %int_10, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30 [concrete = constants.%int_10.265] // CHECK:STDOUT: assign %.loc30_3, %.loc30_29 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc27: = bound_method %p.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.786] -// CHECK:STDOUT: %bound_method.loc27_3: = bound_method %p.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %p.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc27_3: = bound_method %p.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc27_3: %ptr.5d5 = addr_of %p.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc27: init %empty_tuple.type = call %bound_method.loc27_3(%addr.loc27_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc23: = bound_method %c.var, constants.%T.as.Destroy.impl.Op.d1c -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.d1c, @T.as.Destroy.impl.Op(constants.%struct_type.a.b.501) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.64d] -// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %c.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc27_3(%addr.loc27_3) +// CHECK:STDOUT: %facet_value.loc23: %type_where = facet_value constants.%struct_type.a.b.501, () [concrete = constants.%facet_value.de6] +// CHECK:STDOUT: %.loc23_3.2: %type_where = converted constants.%struct_type.a.b.501, %facet_value.loc23 [concrete = constants.%facet_value.de6] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc23: = bound_method %c.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.f75 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.f75, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.de6) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.0f3] +// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %c.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc23: %ptr.3ee = addr_of %c.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc19: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.5e9 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%T.as.Destroy.impl.Op.5e9, @T.as.Destroy.impl.Op(constants.%tuple.type.d07) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.0b1] -// CHECK:STDOUT: %bound_method.loc19_3: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23) +// CHECK:STDOUT: %facet_value.loc19: %type_where = facet_value constants.%tuple.type.d07, () [concrete = constants.%facet_value.5be] +// CHECK:STDOUT: %.loc19_3.2: %type_where = converted constants.%tuple.type.d07, %facet_value.loc19 [concrete = constants.%facet_value.5be] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc19: = bound_method %b.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.e4f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.e4f, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.5be) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.606] +// CHECK:STDOUT: %bound_method.loc19_3: = bound_method %b.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc19: %ptr.261 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19_3(%addr.loc19) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19_3(%addr.loc19) // CHECK:STDOUT: %Int.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%Int.as.Destroy.impl.Op.796 // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function constants.%Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Destroy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %a.var, %Int.as.Destroy.impl.Op.specific_fn diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index b5328634e828..514fd5c61550 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -36,10 +36,9 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f06: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(bool) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.61f: %T.as.Destroy.impl.Op.type.f06 = struct_value () [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.type: type = fn_type @bool.as.Destroy.impl.Op [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op: %bool.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,11 +80,9 @@ fn Main() { // CHECK:STDOUT: %.loc23_10.3: type = converted %Bool.call, %.loc23_10.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref bool = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr: %ptr.bb2 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index 8dd576b1b5e4..d8857b1f9017 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -58,14 +58,15 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.e94: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f06: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(bool) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.61f: %T.as.Destroy.impl.Op.type.f06 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.type: type = fn_type @bool.as.Destroy.impl.Op [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op: %bool.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.80e: = specific_function %T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [concrete] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -192,8 +193,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %a.var: ref bool = var %a.var_patt // CHECK:STDOUT: %true.loc23_46: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %impl.elem0.loc23: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc23_46: = bound_method %true.loc23_46, %impl.elem0.loc23 [concrete = constants.%bool.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc23: init bool = call %bound_method.loc23_46(%true.loc23_46) [concrete = constants.%true] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %true.loc23_46, %impl.elem0.loc23 [concrete = constants.%bool.as.Copy.impl.Op.bound] +// CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc23: init bool = call %bound_method.loc23(%true.loc23_46) [concrete = constants.%true] // CHECK:STDOUT: assign %a.var, %bool.as.Copy.impl.Op.call.loc23 // CHECK:STDOUT: br !.loc23_13 // CHECK:STDOUT: @@ -235,8 +236,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %b.var: ref bool = var %b.var_patt // CHECK:STDOUT: %true.loc24_47: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %impl.elem0.loc24: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc24_47: = bound_method %true.loc24_47, %impl.elem0.loc24 [concrete = constants.%bool.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc24: init bool = call %bound_method.loc24_47(%true.loc24_47) [concrete = constants.%true] +// CHECK:STDOUT: %bound_method.loc24: = bound_method %true.loc24_47, %impl.elem0.loc24 [concrete = constants.%bool.as.Copy.impl.Op.bound] +// CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc24: init bool = call %bound_method.loc24(%true.loc24_47) [concrete = constants.%true] // CHECK:STDOUT: assign %b.var, %bool.as.Copy.impl.Op.call.loc24 // CHECK:STDOUT: br !.loc24_13 // CHECK:STDOUT: @@ -278,8 +279,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %c.var: ref bool = var %c.var_patt // CHECK:STDOUT: %true.loc25_47: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %impl.elem0.loc25: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc25_47: = bound_method %true.loc25_47, %impl.elem0.loc25 [concrete = constants.%bool.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc25: init bool = call %bound_method.loc25_47(%true.loc25_47) [concrete = constants.%true] +// CHECK:STDOUT: %bound_method.loc25: = bound_method %true.loc25_47, %impl.elem0.loc25 [concrete = constants.%bool.as.Copy.impl.Op.bound] +// CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc25: init bool = call %bound_method.loc25(%true.loc25_47) [concrete = constants.%true] // CHECK:STDOUT: assign %c.var, %bool.as.Copy.impl.Op.call.loc25 // CHECK:STDOUT: br !.loc25_13 // CHECK:STDOUT: @@ -321,8 +322,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var %d.var_patt // CHECK:STDOUT: %.loc26_49.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc26_49.2: init %empty_tuple.type = tuple_init () to %d.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_3: init %empty_tuple.type = converted %.loc26_49.1, %.loc26_49.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %d.var, %.loc26_3 +// CHECK:STDOUT: %.loc26_3.1: init %empty_tuple.type = converted %.loc26_49.1, %.loc26_49.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %d.var, %.loc26_3.1 // CHECK:STDOUT: br !.loc26_13 // CHECK:STDOUT: // CHECK:STDOUT: !.loc26_13: @@ -356,26 +357,22 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc26_7: // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc26: = bound_method %d.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e94] -// CHECK:STDOUT: %bound_method.loc26: = bound_method %d.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc26_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %d.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc26: = bound_method %d.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc26: %ptr.843 = addr_of %d.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc25: = bound_method %c.var, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.80e] -// CHECK:STDOUT: %bound_method.loc25_3: = bound_method %c.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound.loc25: = bound_method %c.var, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc25: %ptr.bb2 = addr_of %c.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc25: init %empty_tuple.type = call %bound_method.loc25_3(%addr.loc25) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc24: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.80e] -// CHECK:STDOUT: %bound_method.loc24_3: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call.loc25: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound.loc25(%addr.loc25) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound.loc24: = bound_method %b.var, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc24: %ptr.bb2 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24_3(%addr.loc24) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc23: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.4: = specific_function constants.%T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.80e] -// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound.loc24(%addr.loc24) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound.loc23: = bound_method %a.var, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc23: %ptr.bb2 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound.loc23(%addr.loc23) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -388,8 +385,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %a.var: ref bool = var %a.var_patt // CHECK:STDOUT: %true.loc30_43: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %impl.elem0: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc30_43: = bound_method %true.loc30_43, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc30_43(%true.loc30_43) [concrete = constants.%true] +// CHECK:STDOUT: %bound_method: = bound_method %true.loc30_43, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] +// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true.loc30_43) [concrete = constants.%true] // CHECK:STDOUT: assign %a.var, %bool.as.Copy.impl.Op.call // CHECK:STDOUT: br !.loc30_13 // CHECK:STDOUT: @@ -424,11 +421,9 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc30_7: // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.80e] -// CHECK:STDOUT: %bound_method.loc30_3: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr: %ptr.bb2 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc30_3(%addr) +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index 098526140e95..2e96d8f386d9 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -48,14 +48,15 @@ fn Constant() { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op.bound: = bound_method %true, %bool.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f06: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(bool) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.61f: %T.as.Destroy.impl.Op.type.f06 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.type: type = fn_type @bool.as.Destroy.impl.Op [concrete] +// CHECK:STDOUT: %bool.as.Destroy.impl.Op: %bool.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.80e: = specific_function %T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.e94: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -141,8 +142,8 @@ fn Constant() { // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var %a.var_patt // CHECK:STDOUT: %.loc23_43.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc23_43.2: init %empty_tuple.type = tuple_init () to %a.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc23_3: init %empty_tuple.type = converted %.loc23_43.1, %.loc23_43.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %a.var, %.loc23_3 +// CHECK:STDOUT: %.loc23_3.1: init %empty_tuple.type = converted %.loc23_43.1, %.loc23_43.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %a.var, %.loc23_3.1 // CHECK:STDOUT: br !.loc23_17 // CHECK:STDOUT: // CHECK:STDOUT: !.loc23_17: @@ -174,8 +175,8 @@ fn Constant() { // CHECK:STDOUT: %b.var: ref bool = var %b.var_patt // CHECK:STDOUT: %true.loc24: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %impl.elem0: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op] -// CHECK:STDOUT: %bound_method.loc24_43: = bound_method %true.loc24, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc24_43(%true.loc24) [concrete = constants.%true] +// CHECK:STDOUT: %bound_method.loc24: = bound_method %true.loc24, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] +// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc24(%true.loc24) [concrete = constants.%true] // CHECK:STDOUT: assign %b.var, %bool.as.Copy.impl.Op.call // CHECK:STDOUT: br !.loc24_17 // CHECK:STDOUT: @@ -201,16 +202,16 @@ fn Constant() { // CHECK:STDOUT: // CHECK:STDOUT: !.loc24_7: // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc24: = bound_method %b.var, constants.%T.as.Destroy.impl.Op.61f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.61f, @T.as.Destroy.impl.Op(bool) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.80e] -// CHECK:STDOUT: %bound_method.loc24_3: = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.bound: = bound_method %b.var, constants.%bool.as.Destroy.impl.Op // CHECK:STDOUT: %addr.loc24: %ptr.bb2 = addr_of %b.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24_3(%addr.loc24) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc23: = bound_method %a.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e94] -// CHECK:STDOUT: %bound_method.loc23: = bound_method %a.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bool.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bool.as.Destroy.impl.Op.bound(%addr.loc24) +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc23_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %a.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %a.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc23: %ptr.843 = addr_of %a.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/patterns/underscore.carbon b/toolchain/check/testdata/patterns/underscore.carbon index bf6f42863509..60550b16e9a5 100644 --- a/toolchain/check/testdata/patterns/underscore.carbon +++ b/toolchain/check/testdata/patterns/underscore.carbon @@ -119,10 +119,12 @@ fn F() -> {} { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.711: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_struct_type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.6f0: %T.as.Destroy.impl.Op.type.711 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_struct_type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bf3: %AggregateT.as_type.as.Destroy.impl.Op.type.6a4 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.6f0, @T.as.Destroy.impl.Op(%empty_struct_type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.bf3, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -183,18 +185,20 @@ fn F() -> {} { // CHECK:STDOUT: %_.var: ref %empty_struct_type = var %_.var_patt // CHECK:STDOUT: %.loc9_16.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_16.2: init %empty_struct_type = struct_init () to %_.var [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc9_3: init %empty_struct_type = converted %.loc9_16.1, %.loc9_16.2 [concrete = constants.%empty_struct] -// CHECK:STDOUT: assign %_.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %empty_struct_type = converted %.loc9_16.1, %.loc9_16.2 [concrete = constants.%empty_struct] +// CHECK:STDOUT: assign %_.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.3 [concrete = constants.%empty_struct_type] { // CHECK:STDOUT: %.loc9_11.2: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_11.3: type = converted %.loc9_11.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %_.loc9: ref %empty_struct_type = bind_name _, %_.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %_.var, constants.%T.as.Destroy.impl.Op.6f0 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.6f0, @T.as.Destroy.impl.Op(constants.%empty_struct_type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %_.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_struct_type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc9_3.2: %type_where = converted constants.%empty_struct_type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %_.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.bf3, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %_.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c28 = addr_of %_.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 59226cbbbfde..5ecad992a9e7 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -88,20 +88,23 @@ fn F() { // CHECK:STDOUT: %tuple: %tuple.type.d07 = tuple_value (%int_1.5d2, %int_2.ef8) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a18: %T.as.Destroy.impl.Op.type.f3e = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.142: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%i32) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.c04: %ptr.as.Destroy.impl.Op.type.142 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.786: = specific_function %T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a65: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.d07) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.5e9: %T.as.Destroy.impl.Op.type.a65 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.0b1: = specific_function %T.as.Destroy.impl.Op.5e9, @T.as.Destroy.impl.Op(%tuple.type.d07) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.298: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.3ee) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b72: %T.as.Destroy.impl.Op.type.298 = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.487: = specific_function %ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(%i32) [concrete] +// CHECK:STDOUT: %facet_value.5be: %type_where = facet_value %tuple.type.d07, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.c59: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.5be) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.e4f: %AggregateT.as_type.as.Destroy.impl.Op.type.c59 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.606: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.e4f, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.5be) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.37e: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%struct_type.a.b.501) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.ff4: %ptr.as.Destroy.impl.Op.type.37e = struct_value () [concrete] // CHECK:STDOUT: %ptr.40c: type = ptr_type %ptr.3ee [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.410: = specific_function %T.as.Destroy.impl.Op.b72, @T.as.Destroy.impl.Op(%ptr.3ee) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.49c: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%struct_type.a.b.501) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.d1c: %T.as.Destroy.impl.Op.type.49c = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.64d: = specific_function %T.as.Destroy.impl.Op.d1c, @T.as.Destroy.impl.Op(%struct_type.a.b.501) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.8df: = specific_function %ptr.as.Destroy.impl.Op.ff4, @ptr.as.Destroy.impl.Op(%struct_type.a.b.501) [concrete] +// CHECK:STDOUT: %facet_value.de6: %type_where = facet_value %struct_type.a.b.501, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.469: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.de6) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.f75: %AggregateT.as_type.as.Destroy.impl.Op.type.469 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.0f3: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.f75, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.de6) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -159,8 +162,8 @@ fn F() { // CHECK:STDOUT: %.loc16_46.6: ref %i32 = struct_access %s.var, element1 // CHECK:STDOUT: %.loc16_46.7: init %i32 = initialize_from %.loc16_46.5 to %.loc16_46.6 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc16_46.8: init %struct_type.a.b.501 = struct_init (%.loc16_46.4, %.loc16_46.7) to %s.var [concrete = constants.%struct] -// CHECK:STDOUT: %.loc16_3: init %struct_type.a.b.501 = converted %.loc16_46.1, %.loc16_46.8 [concrete = constants.%struct] -// CHECK:STDOUT: assign %s.var, %.loc16_3 +// CHECK:STDOUT: %.loc16_3.1: init %struct_type.a.b.501 = converted %.loc16_46.1, %.loc16_46.8 [concrete = constants.%struct] +// CHECK:STDOUT: assign %s.var, %.loc16_3.1 // CHECK:STDOUT: %.loc16_27: type = splice_block %struct_type.a.b.loc16 [concrete = constants.%struct_type.a.b.501] { // CHECK:STDOUT: %int_32.loc16_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc16_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -256,8 +259,8 @@ fn F() { // CHECK:STDOUT: %tuple.elem1.loc22: ref %i32 = tuple_access %t.var, element1 // CHECK:STDOUT: %.loc22_28.5: init %i32 = initialize_from %.loc22_28.4 to %tuple.elem1.loc22 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc22_28.6: init %tuple.type.d07 = tuple_init (%.loc22_28.3, %.loc22_28.5) to %t.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc22_3: init %tuple.type.d07 = converted %.loc22_28.1, %.loc22_28.6 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %t.var, %.loc22_3 +// CHECK:STDOUT: %.loc22_3.1: init %tuple.type.d07 = converted %.loc22_28.1, %.loc22_28.6 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %t.var, %.loc22_3.1 // CHECK:STDOUT: %.loc22_19.1: type = splice_block %.loc22_19.3 [concrete = constants.%tuple.type.d07] { // CHECK:STDOUT: %int_32.loc22_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc22_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -309,41 +312,45 @@ fn F() { // CHECK:STDOUT: %ptr.loc24: type = ptr_type %i32.loc24 [concrete = constants.%ptr.235] // CHECK:STDOUT: } // CHECK:STDOUT: %t1: ref %ptr.235 = bind_name t1, %t1.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc24: = bound_method %t1.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.786] -// CHECK:STDOUT: %bound_method.loc24_3: = bound_method %t1.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc24: = bound_method %t1.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn.487] +// CHECK:STDOUT: %bound_method.loc24_3: = bound_method %t1.var, %ptr.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc24_3: %ptr.5d5 = addr_of %t1.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24_3(%addr.loc24_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc23: = bound_method %t0.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.786] -// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %t0.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24_3(%addr.loc24_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc23: = bound_method %t0.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn.487] +// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %t0.var, %ptr.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc23_3: %ptr.5d5 = addr_of %t0.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc22: = bound_method %t.var, constants.%T.as.Destroy.impl.Op.5e9 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%T.as.Destroy.impl.Op.5e9, @T.as.Destroy.impl.Op(constants.%tuple.type.d07) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.0b1] -// CHECK:STDOUT: %bound_method.loc22_3: = bound_method %t.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23_3) +// CHECK:STDOUT: %facet_value.loc22: %type_where = facet_value constants.%tuple.type.d07, () [concrete = constants.%facet_value.5be] +// CHECK:STDOUT: %.loc22_3.2: %type_where = converted constants.%tuple.type.d07, %facet_value.loc22 [concrete = constants.%facet_value.5be] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc22: = bound_method %t.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.e4f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.e4f, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.5be) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.606] +// CHECK:STDOUT: %bound_method.loc22_3: = bound_method %t.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc22: %ptr.261 = addr_of %t.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22_3(%addr.loc22) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc20: = bound_method %r.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.4: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.786] -// CHECK:STDOUT: %bound_method.loc20_3: = bound_method %r.var, %T.as.Destroy.impl.Op.specific_fn.4 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22_3(%addr.loc22) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc20: = bound_method %r.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn.487] +// CHECK:STDOUT: %bound_method.loc20_3: = bound_method %r.var, %ptr.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc20_3: %ptr.5d5 = addr_of %r.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc20: init %empty_tuple.type = call %bound_method.loc20_3(%addr.loc20_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc19: = bound_method %q.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.5: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.786] -// CHECK:STDOUT: %bound_method.loc19_3: = bound_method %q.var, %T.as.Destroy.impl.Op.specific_fn.5 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc20: init %empty_tuple.type = call %bound_method.loc20_3(%addr.loc20_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc19: = bound_method %q.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.4: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn.487] +// CHECK:STDOUT: %bound_method.loc19_3: = bound_method %q.var, %ptr.as.Destroy.impl.Op.specific_fn.4 // CHECK:STDOUT: %addr.loc19_3: %ptr.5d5 = addr_of %q.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19_3(%addr.loc19_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc18: = bound_method %p.var, constants.%T.as.Destroy.impl.Op.b72 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.6: = specific_function constants.%T.as.Destroy.impl.Op.b72, @T.as.Destroy.impl.Op(constants.%ptr.3ee) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.410] -// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %p.var, %T.as.Destroy.impl.Op.specific_fn.6 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19_3(%addr.loc19_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound.loc18: = bound_method %p.var, constants.%ptr.as.Destroy.impl.Op.ff4 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn.5: = specific_function constants.%ptr.as.Destroy.impl.Op.ff4, @ptr.as.Destroy.impl.Op(constants.%struct_type.a.b.501) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn.8df] +// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %p.var, %ptr.as.Destroy.impl.Op.specific_fn.5 // CHECK:STDOUT: %addr.loc18_3: %ptr.40c = addr_of %p.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18_3(%addr.loc18_3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc16: = bound_method %s.var, constants.%T.as.Destroy.impl.Op.d1c -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.7: = specific_function constants.%T.as.Destroy.impl.Op.d1c, @T.as.Destroy.impl.Op(constants.%struct_type.a.b.501) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.64d] -// CHECK:STDOUT: %bound_method.loc16_3: = bound_method %s.var, %T.as.Destroy.impl.Op.specific_fn.7 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18_3(%addr.loc18_3) +// CHECK:STDOUT: %facet_value.loc16: %type_where = facet_value constants.%struct_type.a.b.501, () [concrete = constants.%facet_value.de6] +// CHECK:STDOUT: %.loc16_3.2: %type_where = converted constants.%struct_type.a.b.501, %facet_value.loc16 [concrete = constants.%facet_value.de6] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc16: = bound_method %s.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.f75 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.f75, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.de6) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.0f3] +// CHECK:STDOUT: %bound_method.loc16_3: = bound_method %s.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc16: %ptr.3ee = addr_of %s.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16_3(%addr.loc16) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16_3(%addr.loc16) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 6ed2ee4614b8..7f573c894cce 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -70,10 +70,10 @@ fn F() -> i32 { // CHECK:STDOUT: %.7fa: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c49 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.f59, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f3e: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%ptr.235) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.a18: %T.as.Destroy.impl.Op.type.f3e = struct_value () [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.type.142: type = fn_type @ptr.as.Destroy.impl.Op, @ptr.as.Destroy.impl(%i32) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.c04: %ptr.as.Destroy.impl.Op.type.142 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(%ptr.235) [concrete] +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function %ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.type.4f9: type = fn_type @Int.as.Destroy.impl.Op, @Int.as.Destroy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.796: %Int.as.Destroy.impl.Op.type.4f9 = struct_value () [concrete] // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function %Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(%int_32) [concrete] @@ -165,11 +165,11 @@ fn F() -> i32 { // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc19_10.2: = bound_method %.loc19_10.2, %specific_fn.loc19 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc19_10.2(%.loc19_10.2) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %p.var, constants.%T.as.Destroy.impl.Op.a18 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.a18, @T.as.Destroy.impl.Op(constants.%ptr.235) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_3: = bound_method %p.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.bound: = bound_method %p.var, constants.%ptr.as.Destroy.impl.Op.c04 +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.specific_fn: = specific_function constants.%ptr.as.Destroy.impl.Op.c04, @ptr.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc17_3: = bound_method %p.var, %ptr.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr.loc17_3: %ptr.5d5 = addr_of %p.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc17_3(%addr.loc17_3) +// CHECK:STDOUT: %ptr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc17_3(%addr.loc17_3) // CHECK:STDOUT: %Int.as.Destroy.impl.Op.bound: = bound_method %n.var, constants.%Int.as.Destroy.impl.Op.796 // CHECK:STDOUT: %Int.as.Destroy.impl.Op.specific_fn: = specific_function constants.%Int.as.Destroy.impl.Op.796, @Int.as.Destroy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Destroy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %n.var, %Int.as.Destroy.impl.Op.specific_fn diff --git a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon index 25af833b1dd7..b0bf174b2427 100644 --- a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon @@ -57,10 +57,12 @@ fn ForgotReturnType() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -90,18 +92,20 @@ fn ForgotReturnType() { // CHECK:STDOUT: %v.var: ref %empty_tuple.type = var %v.var_patt // CHECK:STDOUT: %.loc12_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc12_25.2: init %empty_tuple.type = tuple_init () to %v.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc12_12: init %empty_tuple.type = converted %.loc12_25.1, %.loc12_25.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %v.var, %.loc12_12 +// CHECK:STDOUT: %.loc12_12.1: init %empty_tuple.type = converted %.loc12_25.1, %.loc12_25.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %v.var, %.loc12_12.1 // CHECK:STDOUT: %.loc12_20.1: type = splice_block %.loc12_20.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc12_20.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc12_20.3: type = converted %.loc12_20.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %empty_tuple.type = bind_name v, %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc12_12.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,10 +118,12 @@ fn ForgotReturnType() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -147,18 +153,20 @@ fn ForgotReturnType() { // CHECK:STDOUT: %v.var: ref %empty_tuple.type = var %v.var_patt // CHECK:STDOUT: %.loc12_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc12_25.2: init %empty_tuple.type = tuple_init () to %v.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc12_12: init %empty_tuple.type = converted %.loc12_25.1, %.loc12_25.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %v.var, %.loc12_12 +// CHECK:STDOUT: %.loc12_12.1: init %empty_tuple.type = converted %.loc12_25.1, %.loc12_25.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %v.var, %.loc12_12.1 // CHECK:STDOUT: %.loc12_20.1: type = splice_block %.loc12_20.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc12_20.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc12_20.3: type = converted %.loc12_20.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %empty_tuple.type = bind_name v, %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc12_12.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 61d5e48a3f3f..cdb364dad86b 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -49,9 +49,11 @@ fn F() -> i32 { // CHECK:STDOUT: %.7fa: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c49 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.f59, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.f2a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%struct_type.x.y.z) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.7e4: %T.as.Destroy.impl.Op.type.f2a = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.7e4, @T.as.Destroy.impl.Op(%struct_type.x.y.z) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %struct_type.x.y.z, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.8b9: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.321: %AggregateT.as_type.as.Destroy.impl.Op.type.8b9 = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.321, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -129,11 +131,13 @@ fn F() -> i32 { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_38.2: = bound_method %.loc18_38, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc18_38.2(%.loc18_38) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc18_26.2, constants.%T.as.Destroy.impl.Op.7e4 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.7e4, @T.as.Destroy.impl.Op(constants.%struct_type.x.y.z) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_26: = bound_method %.loc18_26.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%struct_type.x.y.z, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_26.9: %type_where = converted constants.%struct_type.x.y.z, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc18_26.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.321 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.321, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_26: = bound_method %.loc18_26.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.6eb = addr_of %.loc18_26.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_26(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_26(%addr) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/nested_struct_in_place.carbon b/toolchain/check/testdata/struct/nested_struct_in_place.carbon index e47c7f9acda9..dcea320c4b4f 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -36,10 +36,12 @@ fn G() { // CHECK:STDOUT: %struct_type.a.b.2f9: type = struct_type {.a: %tuple.type.189, .b: %tuple.type.189} [concrete] // CHECK:STDOUT: %pattern_type.3c2: type = pattern_type %struct_type.a.b.2f9 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.108: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%struct_type.a.b.2f9) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.8a3: %T.as.Destroy.impl.Op.type.108 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %struct_type.a.b.2f9, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.bce: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.361: %AggregateT.as_type.as.Destroy.impl.Op.type.bce = struct_value () [concrete] // CHECK:STDOUT: %ptr.c95: type = ptr_type %struct_type.a.b.2f9 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.8a3, @T.as.Destroy.impl.Op(%struct_type.a.b.2f9) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.361, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -95,8 +97,8 @@ fn G() { // CHECK:STDOUT: %F.call.loc18_73: init %tuple.type.189 = call %F.ref.loc18_71() to %.loc18_74.2 // CHECK:STDOUT: %.loc18_74.3: %struct_type.a.b.2f9 = struct_literal (%F.call.loc18_63, %F.call.loc18_73) // CHECK:STDOUT: %.loc18_74.4: init %struct_type.a.b.2f9 = struct_init (%F.call.loc18_63, %F.call.loc18_73) to %v.var -// CHECK:STDOUT: %.loc18_3: init %struct_type.a.b.2f9 = converted %.loc18_74.3, %.loc18_74.4 -// CHECK:STDOUT: assign %v.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %struct_type.a.b.2f9 = converted %.loc18_74.3, %.loc18_74.4 +// CHECK:STDOUT: assign %v.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_51: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.2f9] { // CHECK:STDOUT: %int_32.loc18_16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc18_16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -117,11 +119,13 @@ fn G() { // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %tuple.type.189, .b: %tuple.type.189} [concrete = constants.%struct_type.a.b.2f9] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %struct_type.a.b.2f9 = bind_name v, %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.8a3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.8a3, @T.as.Destroy.impl.Op(constants.%struct_type.a.b.2f9) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%struct_type.a.b.2f9, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc18_3.2: %type_where = converted constants.%struct_type.a.b.2f9, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.361 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.361, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c95 = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/element_access.carbon b/toolchain/check/testdata/tuple/element_access.carbon index 0fc80fd6f4eb..5cb7d7718f78 100644 --- a/toolchain/check/testdata/tuple/element_access.carbon +++ b/toolchain/check/testdata/tuple/element_access.carbon @@ -406,8 +406,10 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %Copy.facet.c49: %Copy.type = facet_value %i32, (%Copy.impl_witness.a32) [concrete] // CHECK:STDOUT: %.7fa: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c49 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.f59, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a1d: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.a1c) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.1b2: %T.as.Destroy.impl.Op.type.a1d = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.a1c, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fb1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.5c6: %AggregateT.as_type.as.Destroy.impl.Op.type.fb1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.0b7: type = ptr_type %tuple.type.a1c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -430,11 +432,13 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %.loc7_13, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc7_13.2(%.loc7_13) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc7_12.2, constants.%T.as.Destroy.impl.Op.1b2 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.a1c, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc7_12.3: %type_where = converted constants.%tuple.type.a1c, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc7_12.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.5c6 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc7_12: = bound_method %.loc7_12.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc7_12: = bound_method %.loc7_12.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.0b7 = addr_of %.loc7_12.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc7_12(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc7_12(%addr) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon index 753f06e1ecc2..8d904090b442 100644 --- a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon @@ -61,8 +61,10 @@ fn H() { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.261: type = ptr_type %tuple.type.d07 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a65: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.d07) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.5e9: %T.as.Destroy.impl.Op.type.a65 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.d07, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.c59: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.e4f: %AggregateT.as_type.as.Destroy.impl.Op.type.c59 = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] @@ -89,8 +91,8 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %tuple.type.d07 = var %v.var_patt // CHECK:STDOUT: %F.ref.loc7: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc7_3: ref %tuple.type.d07 = splice_block %v.var {} -// CHECK:STDOUT: %F.call.loc7: init %tuple.type.d07 = call %F.ref.loc7() to %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: ref %tuple.type.d07 = splice_block %v.var {} +// CHECK:STDOUT: %F.call.loc7: init %tuple.type.d07 = call %F.ref.loc7() to %.loc7_3.1 // CHECK:STDOUT: assign %v.var, %F.call.loc7 // CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%tuple.type.d07] { // CHECK:STDOUT: %int_32.loc7_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -109,11 +111,13 @@ fn H() { // CHECK:STDOUT: %F.ref.loc9: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: // CHECK:STDOUT: %F.call.loc9: init %tuple.type.d07 = call %F.ref.loc9() to %.loc5_8 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.5e9 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.d07, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc7_3.2: %type_where = converted constants.%tuple.type.d07, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.e4f // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.261 = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call.loc9 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -131,11 +135,13 @@ fn H() { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_13.2: = bound_method %.loc15_13, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc15_13.2(%.loc15_13) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.loc15_12.2, constants.%T.as.Destroy.impl.Op.5e9 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.d07, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc15_12.3: %type_where = converted constants.%tuple.type.d07, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc15_12.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.e4f // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc15_12: = bound_method %.loc15_12.2, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc15_12: = bound_method %.loc15_12.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.261 = addr_of %.loc15_12.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc15_12(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc15_12(%addr) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -152,8 +158,10 @@ fn H() { // CHECK:STDOUT: %tuple.type.f9f: type = tuple_type (%tuple.type.ff9, %tuple.type.ff9) [concrete] // CHECK:STDOUT: %tuple.type.99b: type = tuple_type (%tuple.type.189, %tuple.type.189) [concrete] // CHECK:STDOUT: %pattern_type.d88: type = pattern_type %tuple.type.99b [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.aa3: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.99b) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.c3c: %T.as.Destroy.impl.Op.type.aa3 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.207: %type_where = facet_value %tuple.type.99b, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.379: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.207) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8a7: %AggregateT.as_type.as.Destroy.impl.Op.type.379 = struct_value () [concrete] // CHECK:STDOUT: %ptr.8bc: type = ptr_type %tuple.type.99b [concrete] // CHECK:STDOUT: %tuple.type.3a3: type = tuple_type (type, %tuple.type.ff9, type) [concrete] // CHECK:STDOUT: %tuple.type.516: type = tuple_type (%i32, %tuple.type.189, %i32) [concrete] @@ -178,8 +186,9 @@ fn H() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete] // CHECK:STDOUT: %bound_method.8bd: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.9b9: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.516) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.fa1: %T.as.Destroy.impl.Op.type.9b9 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.edd: %type_where = facet_value %tuple.type.516, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.0ad: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.edd) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.12b: %AggregateT.as_type.as.Destroy.impl.Op.type.0ad = struct_value () [concrete] // CHECK:STDOUT: %ptr.12e: type = ptr_type %tuple.type.516 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -203,8 +212,8 @@ fn H() { // CHECK:STDOUT: %F.call.loc7_55: init %tuple.type.189 = call %F.ref.loc7_53() to %tuple.elem1 // CHECK:STDOUT: %.loc7_56.1: %tuple.type.99b = tuple_literal (%F.call.loc7_50, %F.call.loc7_55) // CHECK:STDOUT: %.loc7_56.2: init %tuple.type.99b = tuple_init (%F.call.loc7_50, %F.call.loc7_55) to %v.var -// CHECK:STDOUT: %.loc7_3: init %tuple.type.99b = converted %.loc7_56.1, %.loc7_56.2 -// CHECK:STDOUT: assign %v.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %tuple.type.99b = converted %.loc7_56.1, %.loc7_56.2 +// CHECK:STDOUT: assign %v.var, %.loc7_3.1 // CHECK:STDOUT: %.loc7_43.1: type = splice_block %.loc7_43.5 [concrete = constants.%tuple.type.99b] { // CHECK:STDOUT: %int_32.loc7_12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc7_12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -226,11 +235,13 @@ fn H() { // CHECK:STDOUT: %.loc7_43.5: type = converted %.loc7_43.2, constants.%tuple.type.99b [concrete = constants.%tuple.type.99b] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %tuple.type.99b = bind_name v, %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.c3c +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.99b, () [concrete = constants.%facet_value.207] +// CHECK:STDOUT: %.loc7_3.2: %type_where = converted constants.%tuple.type.99b, %facet_value [concrete = constants.%facet_value.207] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.8a7 // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.8bc = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -264,8 +275,8 @@ fn H() { // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %v.var, element2 // CHECK:STDOUT: %.loc13_50.5: init %i32 = initialize_from %.loc13_50.4 to %tuple.elem2 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc13_50.6: init %tuple.type.516 = tuple_init (%.loc13_50.3, %F.call, %.loc13_50.5) to %v.var -// CHECK:STDOUT: %.loc13_3: init %tuple.type.516 = converted %.loc13_50.1, %.loc13_50.6 -// CHECK:STDOUT: assign %v.var, %.loc13_3 +// CHECK:STDOUT: %.loc13_3.1: init %tuple.type.516 = converted %.loc13_50.1, %.loc13_50.6 +// CHECK:STDOUT: assign %v.var, %.loc13_3.1 // CHECK:STDOUT: %.loc13_36.1: type = splice_block %.loc13_36.4 [concrete = constants.%tuple.type.516] { // CHECK:STDOUT: %int_32.loc13_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc13_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -283,11 +294,13 @@ fn H() { // CHECK:STDOUT: %.loc13_36.4: type = converted %.loc13_36.2, constants.%tuple.type.516 [concrete = constants.%tuple.type.516] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %tuple.type.516 = bind_name v, %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.fa1 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.516, () [concrete = constants.%facet_value.edd] +// CHECK:STDOUT: %.loc13_3.2: %type_where = converted constants.%tuple.type.516, %facet_value [concrete = constants.%facet_value.edd] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.12b // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc13_3: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method.loc13_3: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.12e = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc13_3(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc13_3(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/tuple_pattern.carbon b/toolchain/check/testdata/tuple/tuple_pattern.carbon index 1b1ac67df5f5..34e94aa6c50e 100644 --- a/toolchain/check/testdata/tuple/tuple_pattern.carbon +++ b/toolchain/check/testdata/tuple/tuple_pattern.carbon @@ -109,8 +109,10 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %pattern_type.de4: type = pattern_type %tuple.type.b6b [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.730: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.b6b) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b38: %T.as.Destroy.impl.Op.type.730 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.b6b, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6bf: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.5fa: %AggregateT.as_type.as.Destroy.impl.Op.type.6bf = struct_value () [concrete] // CHECK:STDOUT: %ptr.8fc: type = ptr_type %tuple.type.b6b [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -177,8 +179,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc8_30.2: init %empty_struct_type = struct_init () to %tuple.elem1.loc8_31 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_31.3: init %empty_struct_type = converted %.loc8_30.1, %.loc8_30.2 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_31.4: init %tuple.type.b6b = tuple_init (%.loc8_31.2, %.loc8_31.3) to %.var.loc8 [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc8_3: init %tuple.type.b6b = converted %.loc8_31.1, %.loc8_31.4 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var.loc8, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %tuple.type.b6b = converted %.loc8_31.1, %.loc8_31.4 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var.loc8, %.loc8_3.1 // CHECK:STDOUT: %tuple.elem0.loc8_3: ref %empty_struct_type = tuple_access %.var.loc8, element0 // CHECK:STDOUT: %tuple.elem1.loc8_3: ref %empty_struct_type = tuple_access %.var.loc8, element1 // CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.3 [concrete = constants.%empty_struct_type] { @@ -191,16 +193,20 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc8_19.3: type = converted %.loc8_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %d: ref %empty_struct_type = bind_name d, %tuple.elem1.loc8_3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %.var.loc8, constants.%T.as.Destroy.impl.Op.b38 +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%tuple.type.b6b, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%tuple.type.b6b, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %.var.loc8, constants.%AggregateT.as_type.as.Destroy.impl.Op.5fa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc8: = bound_method %.var.loc8, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.var.loc8, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8: %ptr.8fc = addr_of %.var.loc8 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc7: = bound_method %.var.loc7, constants.%T.as.Destroy.impl.Op.b38 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %facet_value.loc7: %type_where = facet_value constants.%tuple.type.b6b, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc7_3: %type_where = converted constants.%tuple.type.b6b, %facet_value.loc7 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc7: = bound_method %.var.loc7, constants.%AggregateT.as_type.as.Destroy.impl.Op.5fa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc7: = bound_method %.var.loc7, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc7: = bound_method %.var.loc7, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7: %ptr.8fc = addr_of %.var.loc7 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -214,8 +220,10 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.730: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.b6b) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.b38: %T.as.Destroy.impl.Op.type.730 = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.b6b, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.6bf: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.5fa: %AggregateT.as_type.as.Destroy.impl.Op.type.6bf = struct_value () [concrete] // CHECK:STDOUT: %ptr.8fc: type = ptr_type %tuple.type.b6b [concrete] // CHECK:STDOUT: %MakeTuple.type: type = fn_type @MakeTuple [concrete] // CHECK:STDOUT: %MakeTuple: %MakeTuple.type = struct_value () [concrete] @@ -241,8 +249,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc6_31.2: init %empty_struct_type = struct_init () to %tuple.elem1.loc6 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_32.3: init %empty_struct_type = converted %.loc6_31.1, %.loc6_31.2 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_32.4: init %tuple.type.b6b = tuple_init (%.loc6_32.2, %.loc6_32.3) to %tuple.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc6_3: init %tuple.type.b6b = converted %.loc6_32.1, %.loc6_32.4 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %tuple.var, %.loc6_3 +// CHECK:STDOUT: %.loc6_3.1: init %tuple.type.b6b = converted %.loc6_32.1, %.loc6_32.4 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %tuple.var, %.loc6_3.1 // CHECK:STDOUT: %.loc6_21.1: type = splice_block %.loc6_21.5 [concrete = constants.%tuple.type.b6b] { // CHECK:STDOUT: %.loc6_16: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_20: %empty_struct_type = struct_literal () @@ -269,8 +277,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc7_24.3: init %empty_struct_type = struct_init () to %tuple.elem1.loc7_24.2 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_24.4: init %empty_struct_type = converted %tuple.elem1.loc7_24.1, %.loc7_24.3 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_24.5: init %tuple.type.b6b = tuple_init (%.loc7_24.2, %.loc7_24.4) to %.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc7_3: init %tuple.type.b6b = converted %tuple.ref, %.loc7_24.5 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %tuple.type.b6b = converted %tuple.ref, %.loc7_24.5 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var, %.loc7_3.1 // CHECK:STDOUT: %tuple.elem0.loc7_3: ref %empty_struct_type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1.loc7_3: ref %empty_struct_type = tuple_access %.var, element1 // CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.3 [concrete = constants.%empty_struct_type] { @@ -283,16 +291,20 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1.loc7_3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc7: = bound_method %.var, constants.%T.as.Destroy.impl.Op.b38 +// CHECK:STDOUT: %facet_value.loc7: %type_where = facet_value constants.%tuple.type.b6b, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc7_3.2: %type_where = converted constants.%tuple.type.b6b, %facet_value.loc7 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc7: = bound_method %.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.5fa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc7: = bound_method %.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %bound_method.loc7: = bound_method %.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc7: %ptr.8fc = addr_of %.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc6: = bound_method %tuple.var, constants.%T.as.Destroy.impl.Op.b38 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) +// CHECK:STDOUT: %facet_value.loc6: %type_where = facet_value constants.%tuple.type.b6b, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc6_3.2: %type_where = converted constants.%tuple.type.b6b, %facet_value.loc6 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc6: = bound_method %tuple.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.5fa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method.loc6: = bound_method %tuple.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %bound_method.loc6: = bound_method %tuple.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc6: %ptr.8fc = addr_of %tuple.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc6: init %empty_tuple.type = call %bound_method.loc6(%addr.loc6) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc6: init %empty_tuple.type = call %bound_method.loc6(%addr.loc6) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -336,8 +348,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc14_24.3: init %empty_struct_type = struct_init () to %tuple.elem1.loc14_24.2 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc14_24.4: init %empty_struct_type = converted %tuple.elem1.loc14_24.1, %.loc14_24.3 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc14_24.5: init %tuple.type.b6b = tuple_init (%.loc14_24.2, %.loc14_24.4) to %.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc14_3: init %tuple.type.b6b = converted %tuple.ref, %.loc14_24.5 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var, %.loc14_3 +// CHECK:STDOUT: %.loc14_3.1: init %tuple.type.b6b = converted %tuple.ref, %.loc14_24.5 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var, %.loc14_3.1 // CHECK:STDOUT: %tuple.elem0.loc14_3: ref %empty_struct_type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1.loc14_3: ref %empty_struct_type = tuple_access %.var, element1 // CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.3 [concrete = constants.%empty_struct_type] { @@ -350,11 +362,13 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc14_19.3: type = converted %.loc14_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1.loc14_3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.var, constants.%T.as.Destroy.impl.Op.b38 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.b6b, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc14_3.2: %type_where = converted constants.%tuple.type.b6b, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.5fa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.8fc = addr_of %.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -368,8 +382,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: } // CHECK:STDOUT: %.var: ref %tuple.type.b6b = var %.var_patt // CHECK:STDOUT: %MakeTuple.ref: %MakeTuple.type = name_ref MakeTuple, file.%MakeTuple.decl [concrete = constants.%MakeTuple] -// CHECK:STDOUT: %.loc22_3: ref %tuple.type.b6b = splice_block %.var {} -// CHECK:STDOUT: %MakeTuple.call: init %tuple.type.b6b = call %MakeTuple.ref() to %.loc22_3 +// CHECK:STDOUT: %.loc22_3.1: ref %tuple.type.b6b = splice_block %.var {} +// CHECK:STDOUT: %MakeTuple.call: init %tuple.type.b6b = call %MakeTuple.ref() to %.loc22_3.1 // CHECK:STDOUT: assign %.var, %MakeTuple.call // CHECK:STDOUT: %tuple.elem0: ref %empty_struct_type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1: ref %empty_struct_type = tuple_access %.var, element1 @@ -383,11 +397,13 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc22_19.3: type = converted %.loc22_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.var, constants.%T.as.Destroy.impl.Op.b38 +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type.b6b, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc22_3.2: %type_where = converted constants.%tuple.type.b6b, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.5fa // CHECK:STDOUT: -// CHECK:STDOUT: %bound_method: = bound_method %.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %bound_method: = bound_method %.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.8fc = addr_of %.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/decl.carbon b/toolchain/check/testdata/var/decl.carbon index 66a7677cbf7b..747c7b91048f 100644 --- a/toolchain/check/testdata/var/decl.carbon +++ b/toolchain/check/testdata/var/decl.carbon @@ -26,10 +26,12 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,11 +64,13 @@ fn Main() { // CHECK:STDOUT: %.loc3_11.3: type = converted %.loc3_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc3_3: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/decl_with_init.carbon b/toolchain/check/testdata/var/decl_with_init.carbon index 73f1571c607a..7a5ea1cf67ed 100644 --- a/toolchain/check/testdata/var/decl_with_init.carbon +++ b/toolchain/check/testdata/var/decl_with_init.carbon @@ -27,10 +27,12 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,18 +62,20 @@ fn Main() { // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var %x.var_patt // CHECK:STDOUT: %.loc3_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc3_16.2: init %empty_tuple.type = tuple_init () to %x.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc3_3: init %empty_tuple.type = converted %.loc3_16.1, %.loc3_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var, %.loc3_3 +// CHECK:STDOUT: %.loc3_3.1: init %empty_tuple.type = converted %.loc3_16.1, %.loc3_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var, %.loc3_3.1 // CHECK:STDOUT: %.loc3_11.1: type = splice_block %.loc3_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc3_11.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc3_11.3: type = converted %.loc3_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc3_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_duplicate_decl.carbon b/toolchain/check/testdata/var/fail_duplicate_decl.carbon index cd8e089b76b9..d292efc47176 100644 --- a/toolchain/check/testdata/var/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/fail_duplicate_decl.carbon @@ -35,10 +35,12 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,8 +70,8 @@ fn Main() { // CHECK:STDOUT: %x.var.loc3: ref %empty_tuple.type = var %x.var_patt.loc3 // CHECK:STDOUT: %.loc3_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc3_16.2: init %empty_tuple.type = tuple_init () to %x.var.loc3 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc3_3: init %empty_tuple.type = converted %.loc3_16.1, %.loc3_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var.loc3, %.loc3_3 +// CHECK:STDOUT: %.loc3_3.1: init %empty_tuple.type = converted %.loc3_16.1, %.loc3_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var.loc3, %.loc3_3.1 // CHECK:STDOUT: %.loc3_11.1: type = splice_block %.loc3_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc3_11.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc3_11.3: type = converted %.loc3_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -82,23 +84,27 @@ fn Main() { // CHECK:STDOUT: %x.var.loc11: ref %empty_tuple.type = var %x.var_patt.loc11 // CHECK:STDOUT: %.loc11_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_16.2: init %empty_tuple.type = tuple_init () to %x.var.loc11 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_3: init %empty_tuple.type = converted %.loc11_16.1, %.loc11_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var.loc11, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %empty_tuple.type = converted %.loc11_16.1, %.loc11_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var.loc11, %.loc11_3.1 // CHECK:STDOUT: %.loc11_11.1: type = splice_block %.loc11_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc11_11.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_11.3: type = converted %.loc11_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x.loc11: ref %empty_tuple.type = bind_name x, %x.var.loc11 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc11: = bound_method %x.var.loc11, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11: = bound_method %x.var.loc11, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc11: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc11_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc11 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc11: = bound_method %x.var.loc11, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc11: = bound_method %x.var.loc11, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc11: %ptr.843 = addr_of %x.var.loc11 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc3: = bound_method %x.var.loc3, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc3: = bound_method %x.var.loc3, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11) +// CHECK:STDOUT: %facet_value.loc3: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc3_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc3 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc3: = bound_method %x.var.loc3, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc3: = bound_method %x.var.loc3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc3: %ptr.843 = addr_of %x.var.loc3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc3: init %empty_tuple.type = call %bound_method.loc3(%addr.loc3) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc3: init %empty_tuple.type = call %bound_method.loc3(%addr.loc3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_init_with_self.carbon b/toolchain/check/testdata/var/fail_init_with_self.carbon index 379ce5876615..afd9dc8535aa 100644 --- a/toolchain/check/testdata/var/fail_init_with_self.carbon +++ b/toolchain/check/testdata/var/fail_init_with_self.carbon @@ -30,10 +30,12 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,11 +70,13 @@ fn Main() { // CHECK:STDOUT: %.loc7_11.3: type = converted %.loc7_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc7_3: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon b/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon index e0d05cc82a7b..0894a171e37e 100644 --- a/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon +++ b/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon @@ -32,10 +32,12 @@ var y: () = x; // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,11 +82,13 @@ var y: () = x; // CHECK:STDOUT: %.loc3_11.3: type = converted %.loc3_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc3_3: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/global_lookup_in_scope.carbon b/toolchain/check/testdata/var/global_lookup_in_scope.carbon index ba22afe7172d..d77cdd949c4c 100644 --- a/toolchain/check/testdata/var/global_lookup_in_scope.carbon +++ b/toolchain/check/testdata/var/global_lookup_in_scope.carbon @@ -32,10 +32,12 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [concrete] // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.fef: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%struct_type.v) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.00a: %T.as.Destroy.impl.Op.type.fef = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %struct_type.v, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.c45: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.f49: %AggregateT.as_type.as.Destroy.impl.Op.type.c45 = struct_value () [concrete] // CHECK:STDOUT: %ptr.ef9: type = ptr_type %struct_type.v [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.00a, @T.as.Destroy.impl.Op(%struct_type.v) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.f49, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,19 +83,21 @@ fn Main() { // CHECK:STDOUT: %.loc5_21.3: init %empty_tuple.type = tuple_init () to %.loc5_21.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_21.4: init %empty_tuple.type = converted %.loc5_21.1, %.loc5_21.3 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_21.5: init %struct_type.v = struct_init (%.loc5_21.4) to %y.var [concrete = constants.%struct] -// CHECK:STDOUT: %.loc5_3: init %struct_type.v = converted %x.ref, %.loc5_21.5 [concrete = constants.%struct] -// CHECK:STDOUT: assign %y.var, %.loc5_3 +// CHECK:STDOUT: %.loc5_3.1: init %struct_type.v = converted %x.ref, %.loc5_21.5 [concrete = constants.%struct] +// CHECK:STDOUT: assign %y.var, %.loc5_3.1 // CHECK:STDOUT: %.loc5_17: type = splice_block %struct_type.v [concrete = constants.%struct_type.v] { // CHECK:STDOUT: %.loc5_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_16.2: type = converted %.loc5_16.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [concrete = constants.%struct_type.v] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %struct_type.v = bind_name y, %y.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %y.var, constants.%T.as.Destroy.impl.Op.00a -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.00a, @T.as.Destroy.impl.Op(constants.%struct_type.v) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %y.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%struct_type.v, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc5_3.2: %type_where = converted constants.%struct_type.v, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %y.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.f49 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.f49, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %y.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ef9 = addr_of %y.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/lookup.carbon b/toolchain/check/testdata/var/lookup.carbon index 17ed183bdf43..f55a30fc5be1 100644 --- a/toolchain/check/testdata/var/lookup.carbon +++ b/toolchain/check/testdata/var/lookup.carbon @@ -26,10 +26,12 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,19 +61,21 @@ fn Main() { // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var %x.var_patt // CHECK:STDOUT: %.loc16_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc16_16.2: init %empty_tuple.type = tuple_init () to %x.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_3: init %empty_tuple.type = converted %.loc16_16.1, %.loc16_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var, %.loc16_3 +// CHECK:STDOUT: %.loc16_3.1: init %empty_tuple.type = converted %.loc16_16.1, %.loc16_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var, %.loc16_3.1 // CHECK:STDOUT: %.loc16_11.1: type = splice_block %.loc16_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc16_11.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc16_11.3: type = converted %.loc16_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: %x.ref: ref %empty_tuple.type = name_ref x, %x -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc16_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/shadowing.carbon b/toolchain/check/testdata/var/shadowing.carbon index 259b30faf29f..990e99d7c3ba 100644 --- a/toolchain/check/testdata/var/shadowing.carbon +++ b/toolchain/check/testdata/var/shadowing.carbon @@ -39,10 +39,12 @@ fn Main() { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,8 +76,8 @@ fn Main() { // CHECK:STDOUT: %NS.var: ref %empty_tuple.type = var %NS.var_patt // CHECK:STDOUT: %.loc5_17.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_17.2: init %empty_tuple.type = tuple_init () to %NS.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc5_3: init %empty_tuple.type = converted %.loc5_17.1, %.loc5_17.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %NS.var, %.loc5_3 +// CHECK:STDOUT: %.loc5_3.1: init %empty_tuple.type = converted %.loc5_17.1, %.loc5_17.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %NS.var, %.loc5_3.1 // CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc5_12.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_12.3: type = converted %.loc5_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -93,8 +95,8 @@ fn Main() { // CHECK:STDOUT: %x.var.loc8: ref %empty_tuple.type = var %x.var_patt.loc8 // CHECK:STDOUT: %.loc8_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_16.2: init %empty_tuple.type = tuple_init () to %x.var.loc8 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_3: init %empty_tuple.type = converted %.loc8_16.1, %.loc8_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var.loc8, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %empty_tuple.type = converted %.loc8_16.1, %.loc8_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var.loc8, %.loc8_3.1 // CHECK:STDOUT: %.loc8_11.1: type = splice_block %.loc8_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc8_11.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_11.3: type = converted %.loc8_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -111,8 +113,8 @@ fn Main() { // CHECK:STDOUT: %x.var.loc10: ref %empty_tuple.type = var %x.var_patt.loc10 // CHECK:STDOUT: %.loc10_18.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_18.2: init %empty_tuple.type = tuple_init () to %x.var.loc10 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_5: init %empty_tuple.type = converted %.loc10_18.1, %.loc10_18.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var.loc10, %.loc10_5 +// CHECK:STDOUT: %.loc10_5.1: init %empty_tuple.type = converted %.loc10_18.1, %.loc10_18.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var.loc10, %.loc10_5.1 // CHECK:STDOUT: %.loc10_13.1: type = splice_block %.loc10_13.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc10_13.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_13.3: type = converted %.loc10_13.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -126,21 +128,27 @@ fn Main() { // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc10: = bound_method %x.var.loc10, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var.loc10, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc10_5.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc10 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: = bound_method %x.var.loc10, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var.loc10, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10: %ptr.843 = addr_of %x.var.loc10 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8: = bound_method %x.var.loc8, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8: = bound_method %x.var.loc8, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) +// CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc8 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: = bound_method %x.var.loc8, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %x.var.loc8, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8: %ptr.843 = addr_of %x.var.loc8 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc5: = bound_method %NS.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc5: = bound_method %NS.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %facet_value.loc5: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc5_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc5 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc5: = bound_method %NS.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc5: = bound_method %NS.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc5: %ptr.843 = addr_of %NS.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc5: init %empty_tuple.type = call %bound_method.loc5(%addr.loc5) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc5: init %empty_tuple.type = call %bound_method.loc5(%addr.loc5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/var_pattern.carbon b/toolchain/check/testdata/var/var_pattern.carbon index a0496267ef13..c880853fb0a4 100644 --- a/toolchain/check/testdata/var/var_pattern.carbon +++ b/toolchain/check/testdata/var/var_pattern.carbon @@ -154,10 +154,12 @@ fn G() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -187,18 +189,20 @@ fn G() { // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var %x.var_patt // CHECK:STDOUT: %.loc5_20.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_20.2: init %empty_tuple.type = tuple_init () to %x.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc5_7: init %empty_tuple.type = converted %.loc5_20.1, %.loc5_20.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var, %.loc5_7 +// CHECK:STDOUT: %.loc5_7.1: init %empty_tuple.type = converted %.loc5_20.1, %.loc5_20.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var, %.loc5_7.1 // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc5_15.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_15.3: type = converted %.loc5_15.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %x.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc5_7.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %x.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -213,10 +217,12 @@ fn G() { // CHECK:STDOUT: %pattern_type.5b8: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -257,18 +263,20 @@ fn G() { // CHECK:STDOUT: %.loc5_30.2: %empty_tuple.type = converted %.loc5_30.1, %empty_tuple [concrete = constants.%empty_tuple] // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %.loc5_30.2 // CHECK:STDOUT: %.loc5_34.2: init %empty_tuple.type = tuple_init () to %y.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc5_15: init %empty_tuple.type = converted %.loc5_34.1, %.loc5_34.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %y.var, %.loc5_15 +// CHECK:STDOUT: %.loc5_15.1: init %empty_tuple.type = converted %.loc5_34.1, %.loc5_34.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %y.var, %.loc5_15.1 // CHECK:STDOUT: %.loc5_23.1: type = splice_block %.loc5_23.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc5_23.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_23.3: type = converted %.loc5_23.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %y.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %y.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %y.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc5_15.2: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %y.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %y.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %y.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -285,9 +293,11 @@ fn G() { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.779: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.e5f: %T.as.Destroy.impl.Op.type.779 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.e5f, @T.as.Destroy.impl.Op(%tuple.type) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.85e: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.50f: %AggregateT.as_type.as.Destroy.impl.Op.type.85e = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.50f, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -327,8 +337,8 @@ fn G() { // CHECK:STDOUT: %.loc5_30.2: init %empty_tuple.type = tuple_init () to %tuple.elem1.loc5_31 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_31.3: init %empty_tuple.type = converted %.loc5_30.1, %.loc5_30.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_31.4: init %tuple.type = tuple_init (%.loc5_31.2, %.loc5_31.3) to %.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc5_3: init %tuple.type = converted %.loc5_31.1, %.loc5_31.4 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var, %.loc5_3 +// CHECK:STDOUT: %.loc5_3.1: init %tuple.type = converted %.loc5_31.1, %.loc5_31.4 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var, %.loc5_3.1 // CHECK:STDOUT: %tuple.elem0.loc5_3: ref %empty_tuple.type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1.loc5_3: ref %empty_tuple.type = tuple_access %.var, element1 // CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.3 [concrete = constants.%empty_tuple.type] { @@ -341,11 +351,13 @@ fn G() { // CHECK:STDOUT: %.loc5_19.3: type = converted %.loc5_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %tuple.elem1.loc5_3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.var, constants.%T.as.Destroy.impl.Op.e5f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.e5f, @T.as.Destroy.impl.Op(constants.%tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc5_3.2: %type_where = converted constants.%tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.50f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.50f, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.709 = addr_of %.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -362,9 +374,11 @@ fn G() { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.779: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.e5f: %T.as.Destroy.impl.Op.type.779 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.e5f, @T.as.Destroy.impl.Op(%tuple.type) [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.85e: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.50f: %AggregateT.as_type.as.Destroy.impl.Op.type.85e = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.50f, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -404,8 +418,8 @@ fn G() { // CHECK:STDOUT: %.loc5_34.2: init %empty_tuple.type = tuple_init () to %tuple.elem1.loc5_35 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_35.3: init %empty_tuple.type = converted %.loc5_34.1, %.loc5_34.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_35.4: init %tuple.type = tuple_init (%.loc5_35.2, %.loc5_35.3) to %.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc5_7: init %tuple.type = converted %.loc5_35.1, %.loc5_35.4 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var, %.loc5_7 +// CHECK:STDOUT: %.loc5_7.1: init %tuple.type = converted %.loc5_35.1, %.loc5_35.4 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var, %.loc5_7.1 // CHECK:STDOUT: %tuple.elem0.loc5_7: ref %empty_tuple.type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1.loc5_7: ref %empty_tuple.type = tuple_access %.var, element1 // CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.3 [concrete = constants.%empty_tuple.type] { @@ -418,11 +432,13 @@ fn G() { // CHECK:STDOUT: %.loc5_23.3: type = converted %.loc5_23.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %tuple.elem1.loc5_7 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: = bound_method %.var, constants.%T.as.Destroy.impl.Op.e5f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function constants.%T.as.Destroy.impl.Op.e5f, @T.as.Destroy.impl.Op(constants.%tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method: = bound_method %.var, %T.as.Destroy.impl.Op.specific_fn +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc5_7.2: %type_where = converted constants.%tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: = bound_method %.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.50f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.50f, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %addr: %ptr.709 = addr_of %.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -437,10 +453,12 @@ fn G() { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -493,8 +511,8 @@ fn G() { // CHECK:STDOUT: %v.var: ref %empty_tuple.type = var %v.var_patt // CHECK:STDOUT: %.loc7_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc7_16.2: init %empty_tuple.type = tuple_init () to %v.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_3: init %empty_tuple.type = converted %.loc7_16.1, %.loc7_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %v.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %empty_tuple.type = converted %.loc7_16.1, %.loc7_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %v.var, %.loc7_3.1 // CHECK:STDOUT: %.loc7_11.1: type = splice_block %.loc7_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc7_11.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc7_11.3: type = converted %.loc7_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -510,16 +528,20 @@ fn G() { // CHECK:STDOUT: %.loc4_13.2: init %empty_tuple.type = converted %.loc8_9.1, %.loc8_9.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc4_13.3: ref %empty_tuple.type = temporary %.loc4_13.1, %.loc4_13.2 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc8_5, %.loc4_13.3) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc4: = bound_method %.loc4_13.3, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc4: = bound_method %.loc4_13.3, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc4: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc4_13.4: %type_where = converted constants.%empty_tuple.type, %facet_value.loc4 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc4: = bound_method %.loc4_13.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc4: = bound_method %.loc4_13.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc4: %ptr.843 = addr_of %.loc4_13.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc4: init %empty_tuple.type = call %bound_method.loc4(%addr.loc4) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc7: = bound_method %v.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7: = bound_method %v.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc4: init %empty_tuple.type = call %bound_method.loc4(%addr.loc4) +// CHECK:STDOUT: %facet_value.loc7: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc7_3.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc7 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc7: = bound_method %v.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc7: = bound_method %v.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7: %ptr.843 = addr_of %v.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -634,16 +656,18 @@ fn G() { // CHECK:STDOUT: %assoc0: %Destroy.assoc_type = assoc_entity element0, imports.%Core.import_ref.725 [concrete] // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.Op: %Destroy.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.5ec: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T) [symbolic] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.4a9: %T.as.Destroy.impl.Op.type.5ec = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.fec: = impl_witness imports.%Destroy.impl_witness_table, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %AggregateT: %type_where = bind_symbolic_name AggregateT, 0 [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%AggregateT) [symbolic] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.8a0: %AggregateT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %Destroy.impl_witness.8e6: = impl_witness imports.%Destroy.impl_witness_table.2d3, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.fec) [concrete] -// CHECK:STDOUT: %.7ee: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %Destroy.facet.265: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.8e6) [concrete] +// CHECK:STDOUT: %.b16: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.265 [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -658,10 +682,10 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %P.F: %F.type = import_ref P//default, F, loaded [concrete = constants.%F] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.f99: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Core.import_ref.725: %Destroy.Op.type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%Destroy.Op] -// CHECK:STDOUT: %Core.import_ref.50f: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.5ec) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.4a9)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.50f), @T.as.Destroy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.f99: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc10_28, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Core.import_ref.725: %Destroy.Op.type = import_ref Core//prelude/parts/destroy, loc10_28, loaded [concrete = constants.%Destroy.Op] +// CHECK:STDOUT: %Core.import_ref.d51: @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op.type (%AggregateT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc29_29, loaded [symbolic = @AggregateT.as_type.as.Destroy.impl.%AggregateT.as_type.as.Destroy.impl.Op (constants.%AggregateT.as_type.as.Destroy.impl.Op.8a0)] +// CHECK:STDOUT: %Destroy.impl_witness_table.2d3 = impl_witness_table (%Core.import_ref.d51), @AggregateT.as_type.as.Destroy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -689,12 +713,14 @@ fn G() { // CHECK:STDOUT: %.3: ref %empty_tuple.type = temporary %.1, %.2 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc7_8.2, %.3) // CHECK:STDOUT: %Op.ref: %Destroy.assoc_type = name_ref Op, imports.%Core.import_ref.f99 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.7ee = impl_witness_access constants.%Destroy.impl_witness.fec, element0 [concrete = constants.%T.as.Destroy.impl.Op.daf] +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.4: %type_where = converted constants.%empty_tuple.type, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %impl.elem0: %.b16 = impl_witness_access constants.%Destroy.impl_witness.8e6, element0 [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.c00] // CHECK:STDOUT: %bound_method.1: = bound_method %.3, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.2: = bound_method %.3, %specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.2(%addr) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.2(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -715,13 +741,16 @@ fn G() { // CHECK:STDOUT: %ptr.709: type = ptr_type %tuple.type.bcd [concrete] // CHECK:STDOUT: %tuple: %tuple.type.bcd = tuple_value (%empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.779: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%tuple.type.bcd) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.e5f: %T.as.Destroy.impl.Op.type.779 = struct_value () [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.e29: = specific_function %T.as.Destroy.impl.Op.e5f, @T.as.Destroy.impl.Op(%tuple.type.bcd) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value.dcc: %type_where = facet_value %tuple.type.bcd, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.85e: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.dcc) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.50f: %AggregateT.as_type.as.Destroy.impl.Op.type.85e = struct_value () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.c15: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.50f, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.dcc) [concrete] +// CHECK:STDOUT: %facet_value.ff9: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.ff9) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.e94: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.a54: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value.ff9) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -784,23 +813,27 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %tuple.elem0.loc9_15 // CHECK:STDOUT: %.loc9_15.2: init %empty_tuple.type = tuple_init () to %z.var [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_27: init %empty_tuple.type = converted %tuple.elem1.loc9_15, %.loc9_15.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %z.var, %.loc9_27 +// CHECK:STDOUT: %.loc9_27.1: init %empty_tuple.type = converted %tuple.elem1.loc9_15, %.loc9_15.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %z.var, %.loc9_27.1 // CHECK:STDOUT: %.loc9_35.1: type = splice_block %.loc9_35.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc9_35.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_35.3: type = converted %.loc9_35.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %z: ref %empty_tuple.type = bind_name z, %z.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9_15: = bound_method %.var, constants.%T.as.Destroy.impl.Op.e5f -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.e5f, @T.as.Destroy.impl.Op(constants.%tuple.type.bcd) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e29] -// CHECK:STDOUT: %bound_method.loc9_15: = bound_method %.var, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc9_15: %type_where = facet_value constants.%tuple.type.bcd, () [concrete = constants.%facet_value.dcc] +// CHECK:STDOUT: %.loc9_15.3: %type_where = converted constants.%tuple.type.bcd, %facet_value.loc9_15 [concrete = constants.%facet_value.dcc] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9_15: = bound_method %.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.50f +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.50f, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.dcc) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.c15] +// CHECK:STDOUT: %bound_method.loc9_15: = bound_method %.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9_15: %ptr.709 = addr_of %.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9_15: init %empty_tuple.type = call %bound_method.loc9_15(%addr.loc9_15) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc9_27: = bound_method %z.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.e94] -// CHECK:STDOUT: %bound_method.loc9_27: = bound_method %z.var, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9_15: init %empty_tuple.type = call %bound_method.loc9_15(%addr.loc9_15) +// CHECK:STDOUT: %facet_value.loc9_27: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value.ff9] +// CHECK:STDOUT: %.loc9_27.2: %type_where = converted constants.%empty_tuple.type, %facet_value.loc9_27 [concrete = constants.%facet_value.ff9] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9_27: = bound_method %z.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value.ff9) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn.a54] +// CHECK:STDOUT: %bound_method.loc9_27: = bound_method %z.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9_27: %ptr.843 = addr_of %z.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc9_27: init %empty_tuple.type = call %bound_method.loc9_27(%addr.loc9_27) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9_27: init %empty_tuple.type = call %bound_method.loc9_27(%addr.loc9_27) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -909,10 +942,12 @@ fn G() { // CHECK:STDOUT: %pattern_type.8c1: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.08a: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.daf: %T.as.Destroy.impl.Op.type.08a = struct_value () [concrete] +// CHECK:STDOUT: %type_where: type = facet_type > [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %empty_tuple.type, () [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.c00: %AggregateT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: = specific_function %T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: = specific_function %AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -986,21 +1021,27 @@ fn G() { // CHECK:STDOUT: %tuple.loc8_48: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_48.3: %empty_tuple.type = converted %F.call.loc8_48, %tuple.loc8_48 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %z: %empty_tuple.type = bind_name z, %.loc8_48.3 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8_48: = bound_method %.loc8_48.2, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_48: = bound_method %.loc8_48.2, %T.as.Destroy.impl.Op.specific_fn.1 +// CHECK:STDOUT: %facet_value.loc8_48: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_48.4: %type_where = converted constants.%empty_tuple.type, %facet_value.loc8_48 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8_48: = bound_method %.loc8_48.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_48: = bound_method %.loc8_48.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8_48: %ptr.843 = addr_of %.loc8_48.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8_48: init %empty_tuple.type = call %bound_method.loc8_48(%addr.loc8_48) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8_38: = bound_method %.loc8_38.2, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_38: = bound_method %.loc8_38.2, %T.as.Destroy.impl.Op.specific_fn.2 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8_48: init %empty_tuple.type = call %bound_method.loc8_48(%addr.loc8_48) +// CHECK:STDOUT: %facet_value.loc8_38: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_38.4: %type_where = converted constants.%empty_tuple.type, %facet_value.loc8_38 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8_38: = bound_method %.loc8_38.2, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_38: = bound_method %.loc8_38.2, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_38: %ptr.843 = addr_of %.loc8_38.2 -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8_38: init %empty_tuple.type = call %bound_method.loc8_38(%addr.loc8_38) -// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc8_15: = bound_method %y.var, constants.%T.as.Destroy.impl.Op.daf -// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%T.as.Destroy.impl.Op.daf, @T.as.Destroy.impl.Op(constants.%empty_tuple.type) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_15: = bound_method %y.var, %T.as.Destroy.impl.Op.specific_fn.3 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8_38: init %empty_tuple.type = call %bound_method.loc8_38(%addr.loc8_38) +// CHECK:STDOUT: %facet_value.loc8_15: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_15: %type_where = converted constants.%empty_tuple.type, %facet_value.loc8_15 [concrete = constants.%facet_value] +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8_15: = bound_method %y.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.c00 +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3: = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.c00, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_15: = bound_method %y.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8_15: %ptr.843 = addr_of %y.var -// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc8_15: init %empty_tuple.type = call %bound_method.loc8_15(%addr.loc8_15) +// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8_15: init %empty_tuple.type = call %bound_method.loc8_15(%addr.loc8_15) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/dot_self_impls.carbon b/toolchain/check/testdata/where_expr/dot_self_impls.carbon index b8e80aa86c54..0dfa1bcca5ba 100644 --- a/toolchain/check/testdata/where_expr/dot_self_impls.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_impls.carbon @@ -2,7 +2,7 @@ // 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 +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/docs/adding_features.md b/toolchain/docs/adding_features.md index aa67a3fe57e3..870c67c5810d 100644 --- a/toolchain/docs/adding_features.md +++ b/toolchain/docs/adding_features.md @@ -508,7 +508,7 @@ minimal `Core` package and `prelude` library to the file test with the `check/testdata/facet_types/min_prelude/my_test.carbon` might contain: ``` -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon ``` We have a set of minimal `Core` preludes for testing different compiler feature diff --git a/toolchain/lower/testdata/array/base.carbon b/toolchain/lower/testdata/array/base.carbon index b1575c85addf..2187b96b81d3 100644 --- a/toolchain/lower/testdata/array/base.carbon +++ b/toolchain/lower/testdata/array/base.carbon @@ -21,10 +21,10 @@ fn Run() { // CHECK:STDOUT: ; ModuleID = 'base.carbon' // CHECK:STDOUT: source_filename = "base.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @array.237.loc14_3 = internal constant [1 x i32] [i32 1] -// CHECK:STDOUT: @array.b91.loc15_3 = internal constant [2 x double] [double 1.110000e+01, double 2.200000e+00] -// CHECK:STDOUT: @array.1cb.loc16_3 = internal constant [5 x {}] zeroinitializer -// CHECK:STDOUT: @tuple.loc17_3 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } +// CHECK:STDOUT: @array.237.loc14_3.1 = internal constant [1 x i32] [i32 1] +// CHECK:STDOUT: @array.b91.loc15_3.1 = internal constant [2 x double] [double 1.110000e+01, double 2.200000e+00] +// CHECK:STDOUT: @array.1cb.loc16_3.1 = internal constant [5 x {}] zeroinitializer +// CHECK:STDOUT: @tuple.loc17_3.1 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !4 { // CHECK:STDOUT: entry: @@ -35,23 +35,23 @@ fn Run() { // CHECK:STDOUT: %e.var = alloca [3 x i32], align 4, !dbg !11 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !7 // CHECK:STDOUT: %.loc14_29.3.array.index = getelementptr inbounds [1 x i32], ptr %a.var, i32 0, i64 0, !dbg !12 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @array.237.loc14_3, i64 4, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @array.237.loc14_3.1, i64 4, i1 false), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !8 // CHECK:STDOUT: %.loc15_37.3.array.index = getelementptr inbounds [2 x double], ptr %b.var, i32 0, i64 0, !dbg !13 // CHECK:STDOUT: %.loc15_37.6.array.index = getelementptr inbounds [2 x double], ptr %b.var, i32 0, i64 1, !dbg !13 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %b.var, ptr align 8 @array.b91.loc15_3, i64 16, i1 false), !dbg !8 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %b.var, ptr align 8 @array.b91.loc15_3.1, i64 16, i1 false), !dbg !8 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !9 // CHECK:STDOUT: %.loc16_45.2.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, i64 0, !dbg !14 // CHECK:STDOUT: %.loc16_45.4.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, i64 1, !dbg !14 // CHECK:STDOUT: %.loc16_45.6.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, i64 2, !dbg !14 // CHECK:STDOUT: %.loc16_45.8.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, i64 3, !dbg !14 // CHECK:STDOUT: %.loc16_45.10.array.index = getelementptr inbounds [5 x {}], ptr %c.var, i32 0, i64 4, !dbg !14 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @array.1cb.loc16_3, i64 0, i1 false), !dbg !9 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @array.1cb.loc16_3.1, i64 0, i1 false), !dbg !9 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !10 // CHECK:STDOUT: %tuple.elem0.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !15 // CHECK:STDOUT: %tuple.elem1.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !15 // CHECK:STDOUT: %tuple.elem2.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !15 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.loc17_3, i64 12, i1 false), !dbg !10 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.loc17_3.1, i64 12, i1 false), !dbg !10 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %e.var), !dbg !11 // CHECK:STDOUT: %tuple.elem0.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !16 // CHECK:STDOUT: %.loc18_26.1 = load i32, ptr %tuple.elem0.loc18.tuple.elem, align 4, !dbg !16 diff --git a/toolchain/lower/testdata/builtins/types.carbon b/toolchain/lower/testdata/builtins/types.carbon index 7a16f32caf71..4b1df0bc3413 100644 --- a/toolchain/lower/testdata/builtins/types.carbon +++ b/toolchain/lower/testdata/builtins/types.carbon @@ -21,49 +21,33 @@ fn AsF32(f: FloatLiteral()) -> Float(32) = "float.convert_checked"; fn AsF64(f: FloatLiteral()) -> Float(64) = "float.convert_checked"; fn AsF128(f: FloatLiteral()) -> Float(128) = "float.convert_checked"; -fn F() { - var i: Int(32) = AsI32(1); - var e: Float(16) = AsF16(1.0); - var f: Float(32) = AsF32(1.0); - var g: Float(64) = AsF64(1.0); - var h: Float(128) = AsF128(1.0); - var b: Bool() = false; +fn IntParam(i: Int(32)); +fn FloatParam(e: Float(16), f: Float(32), g: Float(64), h: Float(128)); +fn BoolParam(b: Bool()); + +fn Uses() { + IntParam(AsI32(1)); + FloatParam(AsF16(1.0), AsF32(1.0), AsF64(1.0), AsF128(1.0)); + BoolParam(false); } // CHECK:STDOUT: ; ModuleID = 'types.carbon' // CHECK:STDOUT: source_filename = "types.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: define void @_CF.Main() !dbg !4 { +// CHECK:STDOUT: declare void @_CIntParam.Main(i32) +// CHECK:STDOUT: +// CHECK:STDOUT: declare void @_CFloatParam.Main(half, float, double, fp128) +// CHECK:STDOUT: +// CHECK:STDOUT: declare void @_CBoolParam.Main(i1) +// CHECK:STDOUT: +// CHECK:STDOUT: define void @_CUses.Main() !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %i.var = alloca i32, align 4, !dbg !7 -// CHECK:STDOUT: %e.var = alloca half, align 2, !dbg !8 -// CHECK:STDOUT: %f.var = alloca float, align 4, !dbg !9 -// CHECK:STDOUT: %g.var = alloca double, align 8, !dbg !10 -// CHECK:STDOUT: %h.var = alloca fp128, align 16, !dbg !11 -// CHECK:STDOUT: %b.var = alloca i1, align 1, !dbg !12 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %i.var), !dbg !7 -// CHECK:STDOUT: store i32 1, ptr %i.var, align 4, !dbg !7 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %e.var), !dbg !8 -// CHECK:STDOUT: store half 0xH3C00, ptr %e.var, align 2, !dbg !8 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %f.var), !dbg !9 -// CHECK:STDOUT: store float 1.000000e+00, ptr %f.var, align 4, !dbg !9 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %g.var), !dbg !10 -// CHECK:STDOUT: store double 1.000000e+00, ptr %g.var, align 8, !dbg !10 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %h.var), !dbg !11 -// CHECK:STDOUT: store fp128 0xL00000000000000003FFF000000000000, ptr %h.var, align 16, !dbg !11 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !12 -// CHECK:STDOUT: store i8 0, ptr %b.var, align 1, !dbg !12 -// CHECK:STDOUT: ret void, !dbg !13 +// CHECK:STDOUT: call void @_CIntParam.Main(i32 1), !dbg !7 +// CHECK:STDOUT: call void @_CFloatParam.Main(half 0xH3C00, float 1.000000e+00, double 1.000000e+00, fp128 0xL00000000000000003FFF000000000000), !dbg !8 +// CHECK:STDOUT: call void @_CBoolParam.Main(i1 false), !dbg !9 +// CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #0 -// CHECK:STDOUT: -// CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 5, 4, 3, 2, 1, 0 } -// CHECK:STDOUT: -// CHECK:STDOUT: attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -// CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} // CHECK:STDOUT: !llvm.dbg.cu = !{!2} // CHECK:STDOUT: @@ -71,13 +55,10 @@ fn F() { // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !3 = !DIFile(filename: "types.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Uses", linkageName: "_CUses.Main", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{} -// CHECK:STDOUT: !7 = !DILocation(line: 25, column: 3, scope: !4) -// CHECK:STDOUT: !8 = !DILocation(line: 26, column: 3, scope: !4) -// CHECK:STDOUT: !9 = !DILocation(line: 27, column: 3, scope: !4) -// CHECK:STDOUT: !10 = !DILocation(line: 28, column: 3, scope: !4) -// CHECK:STDOUT: !11 = !DILocation(line: 29, column: 3, scope: !4) -// CHECK:STDOUT: !12 = !DILocation(line: 30, column: 3, scope: !4) -// CHECK:STDOUT: !13 = !DILocation(line: 24, column: 1, scope: !4) +// CHECK:STDOUT: !7 = !DILocation(line: 29, column: 3, scope: !4) +// CHECK:STDOUT: !8 = !DILocation(line: 30, column: 3, scope: !4) +// CHECK:STDOUT: !9 = !DILocation(line: 31, column: 3, scope: !4) +// CHECK:STDOUT: !10 = !DILocation(line: 28, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/class/virtual.carbon b/toolchain/lower/testdata/class/virtual.carbon index c29d841f8f6c..41ee6f0d6a7f 100644 --- a/toolchain/lower/testdata/class/virtual.carbon +++ b/toolchain/lower/testdata/class/virtual.carbon @@ -120,7 +120,7 @@ base class Base(T:! type) { library "[[@TEST_NAME]]"; -base class Base(T:! type) { +base class Base(T:! Core.Destroy) { virtual fn F[self: Self]() { var v: T; } @@ -467,10 +467,10 @@ fn Make() { // CHECK:STDOUT: ; ModuleID = 'generic_use.carbon' // CHECK:STDOUT: source_filename = "generic_use.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @"_CBase.Main.$vtable.4d2ffa01ebfb7a1d" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.4d2ffa01ebfb7a1d to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.4d2ffa01ebfb7a1d" to i64)) to i32)] -// CHECK:STDOUT: @"_CBase.Main.$vtable.4f4310253a4de9ab" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.4f4310253a4de9ab to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.4f4310253a4de9ab" to i64)) to i32)] -// CHECK:STDOUT: @Base.val.20a.loc16_3 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.4d2ffa01ebfb7a1d" } -// CHECK:STDOUT: @Base.val.f56.loc17_3 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.4f4310253a4de9ab" } +// CHECK:STDOUT: @"_CBase.Main.$vtable.6f3ba65278fae545" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.6f3ba65278fae545 to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.6f3ba65278fae545" to i64)) to i32)] +// CHECK:STDOUT: @"_CBase.Main.$vtable.2f61a5251c699b4c" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.2f61a5251c699b4c to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.2f61a5251c699b4c" to i64)) to i32)] +// CHECK:STDOUT: @Base.val.e09.loc16_3 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.6f3ba65278fae545" } +// CHECK:STDOUT: @Base.val.865.loc17_3 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.2f61a5251c699b4c" } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { // CHECK:STDOUT: entry: @@ -478,21 +478,21 @@ fn Make() { // CHECK:STDOUT: %t2.var = alloca { ptr }, align 8, !dbg !8 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %t1.var), !dbg !7 // CHECK:STDOUT: %.loc16_23.2.vptr = getelementptr inbounds nuw { ptr }, ptr %t1.var, i32 0, i32 0, !dbg !9 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %t1.var, ptr align 8 @Base.val.20a.loc16_3, i64 8, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %t1.var, ptr align 8 @Base.val.e09.loc16_3, i64 8, i1 false), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %t2.var), !dbg !8 // CHECK:STDOUT: %.loc17_23.2.vptr = getelementptr inbounds nuw { ptr }, ptr %t2.var, i32 0, i32 0, !dbg !10 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %t2.var, ptr align 8 @Base.val.f56.loc17_3, i64 8, i1 false), !dbg !8 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %t2.var, ptr align 8 @Base.val.865.loc17_3, i64 8, i1 false), !dbg !8 // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.4d2ffa01ebfb7a1d(ptr %self) !dbg !12 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.6f3ba65278fae545(ptr %self) !dbg !12 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca {}, align 8, !dbg !13 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !13 // CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.4f4310253a4de9ab(ptr %self) !dbg !15 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.2f61a5251c699b4c(ptr %self) !dbg !15 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca { {} }, align 8, !dbg !16 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !16 @@ -527,10 +527,10 @@ fn Make() { // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 22, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 17, column: 22, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.4d2ffa01ebfb7a1d", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.6f3ba65278fae545", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !13 = !DILocation(line: 6, column: 5, scope: !12) // CHECK:STDOUT: !14 = !DILocation(line: 5, column: 3, scope: !12) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.4f4310253a4de9ab", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.2f61a5251c699b4c", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !16 = !DILocation(line: 6, column: 5, scope: !15) // CHECK:STDOUT: !17 = !DILocation(line: 5, column: 3, scope: !15) // CHECK:STDOUT: ; ModuleID = 'generic_base.carbon' diff --git a/toolchain/lower/testdata/function/generic/call_basic.carbon b/toolchain/lower/testdata/function/generic/call_basic.carbon index be124b540b65..6e6762f5e29b 100644 --- a/toolchain/lower/testdata/function/generic/call_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic.carbon @@ -25,7 +25,7 @@ fn H[T:! Core.Copy](x: T) -> T { // Simple stress test for single depth of calls with change in types. // Check definitions are emitted for each specific. -fn G[T:! Core.Copy](x: T) -> T { +fn G[T:! Core.Copy & Core.Destroy](x: T) -> T { H(x); H(i32); H(G(x)); @@ -85,12 +85,12 @@ fn M() { // CHECK:STDOUT: %.loc54 = load i32, ptr %n.var, align 4, !dbg !13 // CHECK:STDOUT: call void @_CF.Main.b88d1103f417c6d4(i32 %.loc54), !dbg !14 // CHECK:STDOUT: %.loc55_9 = load i32, ptr %n.var, align 4, !dbg !15 -// CHECK:STDOUT: %G.call.loc55 = call i32 @_CG.Main.de631560529e9861(i32 %.loc55_9), !dbg !16 +// CHECK:STDOUT: %G.call.loc55 = call i32 @_CG.Main.dedae426f8f6526d(i32 %.loc55_9), !dbg !16 // CHECK:STDOUT: store i32 %G.call.loc55, ptr %m.var, align 4, !dbg !17 // CHECK:STDOUT: %.loc56 = load double, ptr %p.var, align 8, !dbg !18 // CHECK:STDOUT: call void @_CF.Main.d4b5665541d5d7a8(double %.loc56), !dbg !19 // CHECK:STDOUT: %.loc57_9 = load double, ptr %p.var, align 8, !dbg !20 -// CHECK:STDOUT: %G.call.loc57 = call double @_CG.Main.3836ccc537683c19(double %.loc57_9), !dbg !21 +// CHECK:STDOUT: %G.call.loc57 = call double @_CG.Main.42589ad6dce0869e(double %.loc57_9), !dbg !21 // CHECK:STDOUT: store double %G.call.loc57, ptr %q.var, align 8, !dbg !22 // CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: } @@ -106,7 +106,7 @@ fn M() { // CHECK:STDOUT: ret void, !dbg !25 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.de631560529e9861(i32 %x) !dbg !26 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.dedae426f8f6526d(i32 %x) !dbg !26 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc29_6.3.temp = alloca i32, align 4, !dbg !27 // CHECK:STDOUT: %.loc31_8.3.temp = alloca i32, align 4, !dbg !28 @@ -122,7 +122,7 @@ fn M() { // CHECK:STDOUT: store i32 %H.call.loc29, ptr %.loc29_6.3.temp, align 4, !dbg !27 // CHECK:STDOUT: %H.call.loc30 = call %type @_CH.Main.402deed6b8733082(%type zeroinitializer), !dbg !36 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !28 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.de631560529e9861(i32 %x), !dbg !28 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.dedae426f8f6526d(i32 %x), !dbg !28 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !29 // CHECK:STDOUT: store i32 %G.call, ptr %.loc31_8.3.temp, align 4, !dbg !28 // CHECK:STDOUT: %.loc31_8.5 = load i32, ptr %.loc31_8.3.temp, align 4, !dbg !28 @@ -151,7 +151,7 @@ fn M() { // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.3836ccc537683c19(double %x) !dbg !48 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.42589ad6dce0869e(double %x) !dbg !48 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc29_6.3.temp = alloca double, align 8, !dbg !49 // CHECK:STDOUT: %.loc31_8.3.temp = alloca double, align 8, !dbg !50 @@ -167,7 +167,7 @@ fn M() { // CHECK:STDOUT: store double %H.call.loc29, ptr %.loc29_6.3.temp, align 8, !dbg !49 // CHECK:STDOUT: %H.call.loc30 = call %type @_CH.Main.402deed6b8733082(%type zeroinitializer), !dbg !58 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !50 -// CHECK:STDOUT: %G.call = call double @_CG.Main.3836ccc537683c19(double %x), !dbg !50 +// CHECK:STDOUT: %G.call = call double @_CG.Main.42589ad6dce0869e(double %x), !dbg !50 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !51 // CHECK:STDOUT: store double %G.call, ptr %.loc31_8.3.temp, align 8, !dbg !50 // CHECK:STDOUT: %.loc31_8.5 = load double, ptr %.loc31_8.3.temp, align 8, !dbg !50 @@ -257,7 +257,7 @@ fn M() { // CHECK:STDOUT: !23 = !DILocation(line: 48, column: 1, scope: !8) // CHECK:STDOUT: !24 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b88d1103f417c6d4", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !25 = !DILocation(line: 19, column: 1, scope: !24) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.de631560529e9861", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.dedae426f8f6526d", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !27 = !DILocation(line: 29, column: 3, scope: !26) // CHECK:STDOUT: !28 = !DILocation(line: 31, column: 5, scope: !26) // CHECK:STDOUT: !29 = !DILocation(line: 31, column: 3, scope: !26) @@ -279,7 +279,7 @@ fn M() { // CHECK:STDOUT: !45 = !DILocation(line: 45, column: 3, scope: !26) // CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.d4b5665541d5d7a8", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !47 = !DILocation(line: 19, column: 1, scope: !46) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.3836ccc537683c19", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.42589ad6dce0869e", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !49 = !DILocation(line: 29, column: 3, scope: !48) // CHECK:STDOUT: !50 = !DILocation(line: 31, column: 5, scope: !48) // CHECK:STDOUT: !51 = !DILocation(line: 31, column: 3, scope: !48) diff --git a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon index 2a885c69a142..cd5767d9743b 100644 --- a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon @@ -21,7 +21,7 @@ fn H[T:! Core.Copy](x: T) -> T { return x; } -fn G[T:! Core.Copy](x: T) -> T { +fn G[T:! Core.Copy & Core.Destroy](x: T) -> T { H(x); F(x); return x; @@ -48,7 +48,7 @@ fn M() { // CHECK:STDOUT: %.loc34 = load i32, ptr %n.var, align 4, !dbg !9 // CHECK:STDOUT: call void @_CF.Main.b88d1103f417c6d4(i32 %.loc34), !dbg !10 // CHECK:STDOUT: %.loc35_9 = load i32, ptr %n.var, align 4, !dbg !11 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.de631560529e9861(i32 %.loc35_9), !dbg !12 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.dedae426f8f6526d(i32 %.loc35_9), !dbg !12 // CHECK:STDOUT: store i32 %G.call, ptr %m.var, align 4, !dbg !13 // CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } @@ -61,7 +61,7 @@ fn M() { // CHECK:STDOUT: ret void, !dbg !16 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.de631560529e9861(i32 %x) !dbg !17 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.dedae426f8f6526d(i32 %x) !dbg !17 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc25_6.3.temp = alloca i32, align 4, !dbg !18 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_6.3.temp), !dbg !18 @@ -102,7 +102,7 @@ fn M() { // CHECK:STDOUT: !14 = !DILocation(line: 30, column: 1, scope: !4) // CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b88d1103f417c6d4", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !16 = !DILocation(line: 16, column: 1, scope: !15) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.de631560529e9861", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.dedae426f8f6526d", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !18 = !DILocation(line: 25, column: 3, scope: !17) // CHECK:STDOUT: !19 = !DILocation(line: 26, column: 3, scope: !17) // CHECK:STDOUT: !20 = !DILocation(line: 27, column: 3, scope: !17) diff --git a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon index 219e26c398f1..6fb3cf119ba6 100644 --- a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon @@ -23,11 +23,11 @@ fn D[U:! Core.Copy](x: U) -> U { return x; } -fn B[U:! Core.Copy](x: U*) { +fn B[U:! Core.Copy & Core.Destroy](x: U*) { D(*x); } -fn F[T:! Core.Copy](x: T*) { +fn F[T:! Core.Copy & Core.Destroy](x: T*) { A(i32); B(x); } @@ -52,26 +52,26 @@ fn M() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !8 // CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !9 -// CHECK:STDOUT: call void @_CF.Main.de631560529e9861(ptr %.loc39_5), !dbg !10 +// CHECK:STDOUT: call void @_CF.Main.dedae426f8f6526d(ptr %.loc39_5), !dbg !10 // CHECK:STDOUT: %.loc40_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !11 -// CHECK:STDOUT: call void @_CF.Main.3836ccc537683c19(ptr %.loc40_5), !dbg !12 +// CHECK:STDOUT: call void @_CF.Main.42589ad6dce0869e(ptr %.loc40_5), !dbg !12 // CHECK:STDOUT: ret void, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #0 // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.de631560529e9861(ptr %x) !dbg !14 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.dedae426f8f6526d(ptr %x) !dbg !14 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %A.call = call %type @_CA.Main.402deed6b8733082(%type zeroinitializer), !dbg !15 -// CHECK:STDOUT: call void @_CB.Main.de631560529e9861(ptr %x), !dbg !16 +// CHECK:STDOUT: call void @_CB.Main.dedae426f8f6526d(ptr %x), !dbg !16 // CHECK:STDOUT: ret void, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.3836ccc537683c19(ptr %x) !dbg !18 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.42589ad6dce0869e(ptr %x) !dbg !18 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %A.call = call %type @_CA.Main.402deed6b8733082(%type zeroinitializer), !dbg !19 -// CHECK:STDOUT: call void @_CB.Main.3836ccc537683c19(ptr %x), !dbg !20 +// CHECK:STDOUT: call void @_CB.Main.42589ad6dce0869e(ptr %x), !dbg !20 // CHECK:STDOUT: ret void, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,7 +80,7 @@ fn M() { // CHECK:STDOUT: ret %type %x, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.de631560529e9861(ptr %x) !dbg !24 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.dedae426f8f6526d(ptr %x) !dbg !24 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc27_7.3.temp = alloca i32, align 4, !dbg !25 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !25 @@ -90,7 +90,7 @@ fn M() { // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.3836ccc537683c19(ptr %x) !dbg !28 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.42589ad6dce0869e(ptr %x) !dbg !28 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc27_7.3.temp = alloca double, align 8, !dbg !29 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !29 @@ -133,21 +133,21 @@ fn M() { // CHECK:STDOUT: !11 = !DILocation(line: 40, column: 5, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 40, column: 3, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 35, column: 1, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.de631560529e9861", scope: null, file: !3, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.dedae426f8f6526d", scope: null, file: !3, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !15 = !DILocation(line: 31, column: 3, scope: !14) // CHECK:STDOUT: !16 = !DILocation(line: 32, column: 3, scope: !14) // CHECK:STDOUT: !17 = !DILocation(line: 30, column: 1, scope: !14) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.3836ccc537683c19", scope: null, file: !3, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.42589ad6dce0869e", scope: null, file: !3, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !19 = !DILocation(line: 31, column: 3, scope: !18) // CHECK:STDOUT: !20 = !DILocation(line: 32, column: 3, scope: !18) // CHECK:STDOUT: !21 = !DILocation(line: 30, column: 1, scope: !18) // CHECK:STDOUT: !22 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.402deed6b8733082", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !23 = !DILocation(line: 19, column: 3, scope: !22) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.de631560529e9861", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.dedae426f8f6526d", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !25 = !DILocation(line: 27, column: 3, scope: !24) // CHECK:STDOUT: !26 = !DILocation(line: 27, column: 5, scope: !24) // CHECK:STDOUT: !27 = !DILocation(line: 26, column: 1, scope: !24) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.3836ccc537683c19", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.42589ad6dce0869e", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !29 = !DILocation(line: 27, column: 3, scope: !28) // CHECK:STDOUT: !30 = !DILocation(line: 27, column: 5, scope: !28) // CHECK:STDOUT: !31 = !DILocation(line: 26, column: 1, scope: !28) diff --git a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon index aa92e08b58d7..a27f2be07d40 100644 --- a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon @@ -20,7 +20,7 @@ interface I { } fn G(U:! I) { - var x: U.T; + var x: U.T*; } class C {} @@ -37,36 +37,28 @@ fn H() { G(D); } - // CHECK:STDOUT: ; ModuleID = 'call_different_associated_const.carbon' // CHECK:STDOUT: source_filename = "call_different_associated_const.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CH.Main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CG.Main.f4fac657790396cb(), !dbg !7 -// CHECK:STDOUT: call void @_CG.Main.ac86dba5317b70e7(), !dbg !8 +// CHECK:STDOUT: call void @_CG.Main.f4fac657790396cb(), !dbg !8 // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define linkonce_odr void @_CG.Main.f4fac657790396cb() !dbg !10 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i1, align 1, !dbg !11 +// CHECK:STDOUT: %x.var = alloca ptr, align 8, !dbg !11 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !11 // CHECK:STDOUT: ret void, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.ac86dba5317b70e7() !dbg !13 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !14 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !14 -// CHECK:STDOUT: ret void, !dbg !15 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #0 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CG.Main.f4fac657790396cb, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -86,6 +78,3 @@ fn H() { // CHECK:STDOUT: !10 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.f4fac657790396cb", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !11 = !DILocation(line: 23, column: 3, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 22, column: 1, scope: !10) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.ac86dba5317b70e7", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !14 = !DILocation(line: 23, column: 3, scope: !13) -// CHECK:STDOUT: !15 = !DILocation(line: 22, column: 1, scope: !13) diff --git a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon index fbd1af3a4185..9cdaae203f27 100644 --- a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon @@ -13,7 +13,7 @@ import Core library "io"; interface I { - let T:! type; + let T:! Core.Destroy; fn F() -> T; } class X {} @@ -61,14 +61,14 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.0dbf1a1c1733b53e(), !dbg !13 -// CHECK:STDOUT: call void @_CG.Main.358c93ba71c2d336(), !dbg !14 +// CHECK:STDOUT: call void @_CG.Main.5595bcb1d6932ffa(), !dbg !13 +// CHECK:STDOUT: call void @_CG.Main.029df562ae676f5b(), !dbg !14 // CHECK:STDOUT: ret void, !dbg !15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @printf(ptr, ...) // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.0dbf1a1c1733b53e() !dbg !16 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.5595bcb1d6932ffa() !dbg !16 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc37_20.1.temp = alloca i1, align 1, !dbg !17 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc37_20.1.temp), !dbg !17 @@ -80,7 +80,7 @@ fn Run() { // CHECK:STDOUT: ret void, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.358c93ba71c2d336() !dbg !19 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.029df562ae676f5b() !dbg !19 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc37_20.1.temp = alloca i32, align 4, !dbg !20 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc37_20.1.temp), !dbg !20 @@ -118,9 +118,9 @@ fn Run() { // CHECK:STDOUT: !13 = !DILocation(line: 41, column: 3, scope: !12) // CHECK:STDOUT: !14 = !DILocation(line: 42, column: 3, scope: !12) // CHECK:STDOUT: !15 = !DILocation(line: 40, column: 1, scope: !12) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0dbf1a1c1733b53e", scope: null, file: !3, line: 36, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.5595bcb1d6932ffa", scope: null, file: !3, line: 36, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !17 = !DILocation(line: 37, column: 16, scope: !16) // CHECK:STDOUT: !18 = !DILocation(line: 36, column: 1, scope: !16) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.358c93ba71c2d336", scope: null, file: !3, line: 36, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.029df562ae676f5b", scope: null, file: !3, line: 36, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !20 = !DILocation(line: 37, column: 16, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 36, column: 1, scope: !19) diff --git a/toolchain/lower/testdata/function/generic/call_different_specific.carbon b/toolchain/lower/testdata/function/generic/call_different_specific.carbon index 375240f30502..1aa7300d0c08 100644 --- a/toolchain/lower/testdata/function/generic/call_different_specific.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_specific.carbon @@ -30,11 +30,11 @@ fn D[U:! Core.Copy](x: U) -> U { return x; } -fn B[U:! Core.Copy](x: U*) { +fn B[U:! Core.Copy & Core.Destroy](x: U*) { D(*x); } -fn F[T:! Core.Copy](x: T*) { +fn F[T:! Core.Copy & Core.Destroy](x: T*) { A(i32); B(x); } @@ -59,26 +59,26 @@ fn M() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !8 // CHECK:STDOUT: %.loc46_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !9 -// CHECK:STDOUT: call void @_CF.Main.de631560529e9861(ptr %.loc46_5), !dbg !10 +// CHECK:STDOUT: call void @_CF.Main.dedae426f8f6526d(ptr %.loc46_5), !dbg !10 // CHECK:STDOUT: %.loc47_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !11 -// CHECK:STDOUT: call void @_CF.Main.3836ccc537683c19(ptr %.loc47_5), !dbg !12 +// CHECK:STDOUT: call void @_CF.Main.42589ad6dce0869e(ptr %.loc47_5), !dbg !12 // CHECK:STDOUT: ret void, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #0 // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.de631560529e9861(ptr %x) !dbg !14 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.dedae426f8f6526d(ptr %x) !dbg !14 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %A.call = call %type @_CA.Main.402deed6b8733082(%type zeroinitializer), !dbg !15 -// CHECK:STDOUT: call void @_CB.Main.de631560529e9861(ptr %x), !dbg !16 +// CHECK:STDOUT: call void @_CB.Main.dedae426f8f6526d(ptr %x), !dbg !16 // CHECK:STDOUT: ret void, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.3836ccc537683c19(ptr %x) !dbg !18 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.42589ad6dce0869e(ptr %x) !dbg !18 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %A.call = call %type @_CA.Main.402deed6b8733082(%type zeroinitializer), !dbg !19 -// CHECK:STDOUT: call void @_CB.Main.3836ccc537683c19(ptr %x), !dbg !20 +// CHECK:STDOUT: call void @_CB.Main.42589ad6dce0869e(ptr %x), !dbg !20 // CHECK:STDOUT: ret void, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -87,7 +87,7 @@ fn M() { // CHECK:STDOUT: ret %type %x, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.de631560529e9861(ptr %x) !dbg !24 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.dedae426f8f6526d(ptr %x) !dbg !24 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc34_7.3.temp = alloca i32, align 4, !dbg !25 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !25 @@ -97,7 +97,7 @@ fn M() { // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.3836ccc537683c19(ptr %x) !dbg !28 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.42589ad6dce0869e(ptr %x) !dbg !28 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc34_7.3.temp = alloca double, align 8, !dbg !29 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !29 @@ -140,21 +140,21 @@ fn M() { // CHECK:STDOUT: !11 = !DILocation(line: 47, column: 5, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 47, column: 3, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 42, column: 1, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.de631560529e9861", scope: null, file: !3, line: 37, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.dedae426f8f6526d", scope: null, file: !3, line: 37, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !15 = !DILocation(line: 38, column: 3, scope: !14) // CHECK:STDOUT: !16 = !DILocation(line: 39, column: 3, scope: !14) // CHECK:STDOUT: !17 = !DILocation(line: 37, column: 1, scope: !14) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.3836ccc537683c19", scope: null, file: !3, line: 37, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.42589ad6dce0869e", scope: null, file: !3, line: 37, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !19 = !DILocation(line: 38, column: 3, scope: !18) // CHECK:STDOUT: !20 = !DILocation(line: 39, column: 3, scope: !18) // CHECK:STDOUT: !21 = !DILocation(line: 37, column: 1, scope: !18) // CHECK:STDOUT: !22 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.402deed6b8733082", scope: null, file: !3, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !23 = !DILocation(line: 26, column: 3, scope: !22) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.de631560529e9861", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.dedae426f8f6526d", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !25 = !DILocation(line: 34, column: 3, scope: !24) // CHECK:STDOUT: !26 = !DILocation(line: 34, column: 5, scope: !24) // CHECK:STDOUT: !27 = !DILocation(line: 33, column: 1, scope: !24) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.3836ccc537683c19", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.42589ad6dce0869e", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !29 = !DILocation(line: 34, column: 3, scope: !28) // CHECK:STDOUT: !30 = !DILocation(line: 34, column: 5, scope: !28) // CHECK:STDOUT: !31 = !DILocation(line: 33, column: 1, scope: !28) diff --git a/toolchain/lower/testdata/function/generic/type_representation.carbon b/toolchain/lower/testdata/function/generic/type_representation.carbon index 71fe61c4e55e..d9ef444dcf2a 100644 --- a/toolchain/lower/testdata/function/generic/type_representation.carbon +++ b/toolchain/lower/testdata/function/generic/type_representation.carbon @@ -14,9 +14,9 @@ interface Copy { fn Op[self: Self]() -> Self; } -fn F[T:! Copy](a: T) -> T { - var v: T = a.Op(); - return a.Op(); +fn F[T:! Copy & Core.Destroy](a: T) -> T { + var v: T = a.(Copy.Op)(); + return a.(Copy.Op)(); } impl i32 as Copy { @@ -84,7 +84,7 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF_i32.Main(i32 %a) !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.c51f5dcf0e081157(i32 %a), !dbg !9 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.91acb171499e2658(i32 %a), !dbg !9 // CHECK:STDOUT: ret i32 %F.call, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -103,7 +103,7 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF_X.Main(ptr sret({ i32, i32 }) %return, ptr %a) !dbg !16 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.b1d03582403d0f2e(ptr %return, ptr %a), !dbg !17 +// CHECK:STDOUT: call void @_CF.Main.6ef35d4a7684e057(ptr %return, ptr %a), !dbg !17 // CHECK:STDOUT: ret void, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,7 +114,7 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF_empty_tuple.Main() !dbg !21 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.f0b2e3523ff3fa17(), !dbg !22 +// CHECK:STDOUT: call void @_CF.Main.bcfa232a7f7e3dde(), !dbg !22 // CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -133,7 +133,7 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF_two_tuple.Main(ptr sret({ i32, i32 }) %return, ptr %a) !dbg !27 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.09ed05d6841b72fa(ptr %return, ptr %a), !dbg !28 +// CHECK:STDOUT: call void @_CF.Main.fd0a4d4c23847a64(ptr %return, ptr %a), !dbg !28 // CHECK:STDOUT: ret void, !dbg !29 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -152,21 +152,21 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF_nested_tuple.Main(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.6513c914c89dac0d(ptr %return, ptr %a), !dbg !36 +// CHECK:STDOUT: call void @_CF.Main.73a97bc8c9926cb5(ptr %return, ptr %a), !dbg !36 // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.c51f5dcf0e081157(i32 %a) !dbg !38 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.91acb171499e2658(i32 %a) !dbg !38 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca i32, align 4, !dbg !39 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !39 -// CHECK:STDOUT: %.loc18_19 = call i32 @"_COp.Int.Core:Copy.Main"(i32 %a), !dbg !40 -// CHECK:STDOUT: store i32 %.loc18_19, ptr %v.var, align 4, !dbg !39 -// CHECK:STDOUT: %.loc19_15 = call i32 @"_COp.Int.Core:Copy.Main"(i32 %a), !dbg !41 -// CHECK:STDOUT: ret i32 %.loc19_15, !dbg !42 +// CHECK:STDOUT: %.loc18_26 = call i32 @"_COp.Int.Core:Copy.Main"(i32 %a), !dbg !40 +// CHECK:STDOUT: store i32 %.loc18_26, ptr %v.var, align 4, !dbg !39 +// CHECK:STDOUT: %.loc19 = call i32 @"_COp.Int.Core:Copy.Main"(i32 %a), !dbg !41 +// CHECK:STDOUT: ret i32 %.loc19, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.b1d03582403d0f2e(ptr sret({ i32, i32 }) %return, ptr %a) !dbg !43 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6ef35d4a7684e057(ptr sret({ i32, i32 }) %return, ptr %a) !dbg !43 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca { i32, i32 }, align 8, !dbg !44 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !44 @@ -175,7 +175,7 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f0b2e3523ff3fa17() !dbg !48 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.bcfa232a7f7e3dde() !dbg !48 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca {}, align 8, !dbg !49 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !49 @@ -184,7 +184,7 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.09ed05d6841b72fa(ptr sret({ i32, i32 }) %return, ptr %a) !dbg !53 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.fd0a4d4c23847a64(ptr sret({ i32, i32 }) %return, ptr %a) !dbg !53 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca { i32, i32 }, align 8, !dbg !54 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !54 @@ -193,7 +193,7 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6513c914c89dac0d(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) !dbg !58 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.73a97bc8c9926cb5(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) !dbg !58 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca { { i32, i32 }, { i32, i32 } }, align 8, !dbg !59 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !59 @@ -251,27 +251,27 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: !35 = distinct !DISubprogram(name: "F_nested_tuple", linkageName: "_CF_nested_tuple.Main", scope: null, file: !3, line: 73, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !36 = !DILocation(line: 74, column: 10, scope: !35) // CHECK:STDOUT: !37 = !DILocation(line: 74, column: 3, scope: !35) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c51f5dcf0e081157", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.91acb171499e2658", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !39 = !DILocation(line: 18, column: 3, scope: !38) // CHECK:STDOUT: !40 = !DILocation(line: 18, column: 14, scope: !38) // CHECK:STDOUT: !41 = !DILocation(line: 19, column: 10, scope: !38) // CHECK:STDOUT: !42 = !DILocation(line: 19, column: 3, scope: !38) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b1d03582403d0f2e", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6ef35d4a7684e057", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !44 = !DILocation(line: 18, column: 3, scope: !43) // CHECK:STDOUT: !45 = !DILocation(line: 18, column: 14, scope: !43) // CHECK:STDOUT: !46 = !DILocation(line: 19, column: 10, scope: !43) // CHECK:STDOUT: !47 = !DILocation(line: 19, column: 3, scope: !43) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f0b2e3523ff3fa17", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.bcfa232a7f7e3dde", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !49 = !DILocation(line: 18, column: 3, scope: !48) // CHECK:STDOUT: !50 = !DILocation(line: 18, column: 14, scope: !48) // CHECK:STDOUT: !51 = !DILocation(line: 19, column: 10, scope: !48) // CHECK:STDOUT: !52 = !DILocation(line: 19, column: 3, scope: !48) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.09ed05d6841b72fa", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fd0a4d4c23847a64", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !54 = !DILocation(line: 18, column: 3, scope: !53) // CHECK:STDOUT: !55 = !DILocation(line: 18, column: 14, scope: !53) // CHECK:STDOUT: !56 = !DILocation(line: 19, column: 10, scope: !53) // CHECK:STDOUT: !57 = !DILocation(line: 19, column: 3, scope: !53) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6513c914c89dac0d", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.73a97bc8c9926cb5", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !59 = !DILocation(line: 18, column: 3, scope: !58) // CHECK:STDOUT: !60 = !DILocation(line: 18, column: 14, scope: !58) // CHECK:STDOUT: !61 = !DILocation(line: 19, column: 10, scope: !58) diff --git a/toolchain/lower/testdata/let/tuple.carbon b/toolchain/lower/testdata/let/tuple.carbon index d6cafb7b40f1..f9c64cce0861 100644 --- a/toolchain/lower/testdata/let/tuple.carbon +++ b/toolchain/lower/testdata/let/tuple.carbon @@ -20,8 +20,8 @@ fn F() -> i32 { // CHECK:STDOUT: ; ModuleID = 'tuple.carbon' // CHECK:STDOUT: source_filename = "tuple.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.ee6.loc14_3 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } -// CHECK:STDOUT: @tuple.0a0.loc15_3 = internal constant { i32, i32 } { i32 4, i32 5 } +// CHECK:STDOUT: @tuple.ee6.loc14_3.1 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } +// CHECK:STDOUT: @tuple.0a0.loc15_3.1 = internal constant { i32, i32 } { i32 4, i32 5 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main() !dbg !4 { // CHECK:STDOUT: entry: @@ -31,11 +31,11 @@ fn F() -> i32 { // CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !9 // CHECK:STDOUT: %tuple.elem1.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !9 // CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !9 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.ee6.loc14_3, i64 12, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.ee6.loc14_3.1, i64 12, i1 false), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !8 // CHECK:STDOUT: %tuple.elem0.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !10 // CHECK:STDOUT: %tuple.elem1.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !10 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.0a0.loc15_3, i64 8, i1 false), !dbg !8 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.0a0.loc15_3.1, i64 8, i1 false), !dbg !8 // CHECK:STDOUT: %tuple.elem0.loc16_43.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !11 // CHECK:STDOUT: %.loc16_43.1 = load i32, ptr %tuple.elem0.loc16_43.tuple.elem, align 4, !dbg !11 // CHECK:STDOUT: %tuple.elem1.loc16_43.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !11 diff --git a/toolchain/lower/testdata/pointer/address_of_field.carbon b/toolchain/lower/testdata/pointer/address_of_field.carbon index 033e85fe53d6..46f57da0600f 100644 --- a/toolchain/lower/testdata/pointer/address_of_field.carbon +++ b/toolchain/lower/testdata/pointer/address_of_field.carbon @@ -20,7 +20,7 @@ fn F() { // CHECK:STDOUT: ; ModuleID = 'address_of_field.carbon' // CHECK:STDOUT: source_filename = "address_of_field.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.loc16_3 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @struct.loc16_3.1 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: @@ -30,7 +30,7 @@ fn F() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %s.var), !dbg !7 // CHECK:STDOUT: %.loc16_46.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc16_46.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !8 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.loc16_3, i64 8, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.loc16_3.1, i64 8, i1 false), !dbg !7 // CHECK:STDOUT: %.loc17.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !9 // CHECK:STDOUT: call void @_CG.Main(ptr %.loc17.b), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 diff --git a/toolchain/lower/testdata/primitives/numeric_literals.carbon b/toolchain/lower/testdata/primitives/numeric_literals.carbon index 519aa3eb9da0..fcce62ab1302 100644 --- a/toolchain/lower/testdata/primitives/numeric_literals.carbon +++ b/toolchain/lower/testdata/primitives/numeric_literals.carbon @@ -32,8 +32,8 @@ fn F() { // CHECK:STDOUT: ; ModuleID = 'numeric_literals.carbon' // CHECK:STDOUT: source_filename = "numeric_literals.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @array.712.loc16_3 = internal constant [4 x i32] [i32 8, i32 9, i32 8, i32 8] -// CHECK:STDOUT: @array.6e0.loc22_3 = internal constant [6 x double] [double 9.000000e-01, double 8.000000e+00, double 8.000000e+01, double 1.000000e+07, double 1.000000e+08, double 1.000000e-08] +// CHECK:STDOUT: @array.712.loc16_3.1 = internal constant [4 x i32] [i32 8, i32 9, i32 8, i32 8] +// CHECK:STDOUT: @array.6e0.loc22_3.1 = internal constant [6 x double] [double 9.000000e-01, double 8.000000e+00, double 8.000000e+01, double 1.000000e+07, double 1.000000e+08, double 1.000000e-08] // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { // CHECK:STDOUT: entry: @@ -44,7 +44,7 @@ fn F() { // CHECK:STDOUT: %.loc21_3.6.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, i64 1, !dbg !9 // CHECK:STDOUT: %.loc21_3.9.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, i64 2, !dbg !9 // CHECK:STDOUT: %.loc21_3.12.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, i64 3, !dbg !9 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %ints.var, ptr align 4 @array.712.loc16_3, i64 16, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %ints.var, ptr align 4 @array.712.loc16_3.1, i64 16, i1 false), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %floats.var), !dbg !8 // CHECK:STDOUT: %.loc29_3.3.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, i64 0, !dbg !10 // CHECK:STDOUT: %.loc29_3.6.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, i64 1, !dbg !10 @@ -52,7 +52,7 @@ fn F() { // CHECK:STDOUT: %.loc29_3.12.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, i64 3, !dbg !10 // CHECK:STDOUT: %.loc29_3.15.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, i64 4, !dbg !10 // CHECK:STDOUT: %.loc29_3.18.array.index = getelementptr inbounds [6 x double], ptr %floats.var, i32 0, i64 5, !dbg !10 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %floats.var, ptr align 8 @array.6e0.loc22_3, i64 48, i1 false), !dbg !8 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %floats.var, ptr align 8 @array.6e0.loc22_3.1, i64 48, i1 false), !dbg !8 // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index d2026b1f6270..d625491a3106 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -20,7 +20,7 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'member_access.carbon' // CHECK:STDOUT: source_filename = "member_access.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.loc14_3 = internal constant { double, i32 } { double 0.000000e+00, i32 1 } +// CHECK:STDOUT: @struct.loc14_3.1 = internal constant { double, i32 } { double 0.000000e+00, i32 1 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { // CHECK:STDOUT: entry: @@ -30,7 +30,7 @@ fn Run() -> i32 { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !7 // CHECK:STDOUT: %.loc14_48.3.a = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 0, !dbg !10 // CHECK:STDOUT: %.loc14_48.6.b = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 1, !dbg !10 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.loc14_3, i64 16, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.loc14_3.1, i64 16, i1 false), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !8 // CHECK:STDOUT: %.loc15_17.1.b = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 1, !dbg !11 // CHECK:STDOUT: %.loc15_17.2 = load i32, ptr %.loc15_17.1.b, align 4, !dbg !11 diff --git a/toolchain/lower/testdata/struct/two_entries.carbon b/toolchain/lower/testdata/struct/two_entries.carbon index 992dcab0ba6d..5ddc5538b3ba 100644 --- a/toolchain/lower/testdata/struct/two_entries.carbon +++ b/toolchain/lower/testdata/struct/two_entries.carbon @@ -19,7 +19,7 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'two_entries.carbon' // CHECK:STDOUT: source_filename = "two_entries.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.loc14_3 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @struct.loc14_3.1 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { // CHECK:STDOUT: entry: @@ -28,7 +28,7 @@ fn Run() -> i32 { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !7 // CHECK:STDOUT: %.loc14_46.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !9 // CHECK:STDOUT: %.loc14_46.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !9 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @struct.loc14_3, i64 8, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @struct.loc14_3.1, i64 8, i1 false), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !8 // CHECK:STDOUT: %.loc15_31.1.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !10 // CHECK:STDOUT: %.loc15_31.2 = load i32, ptr %.loc15_31.1.a, align 4, !dbg !10 diff --git a/toolchain/lower/testdata/tuple/access/element_access.carbon b/toolchain/lower/testdata/tuple/access/element_access.carbon index 19fcbadd1641..48b2ee1f527c 100644 --- a/toolchain/lower/testdata/tuple/access/element_access.carbon +++ b/toolchain/lower/testdata/tuple/access/element_access.carbon @@ -20,7 +20,7 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'element_access.carbon' // CHECK:STDOUT: source_filename = "element_access.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.loc14_3 = internal constant { i32, i32, i32 } { i32 0, i32 1, i32 2 } +// CHECK:STDOUT: @tuple.loc14_3.1 = internal constant { i32, i32, i32 } { i32 0, i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { // CHECK:STDOUT: entry: @@ -31,7 +31,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !10 // CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !10 // CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !10 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.loc14_3, i64 12, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.loc14_3.1, i64 12, i1 false), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !8 // CHECK:STDOUT: %tuple.elem0.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !11 // CHECK:STDOUT: %.loc15_17 = load i32, ptr %tuple.elem0.loc15.tuple.elem, align 4, !dbg !11 diff --git a/toolchain/lower/testdata/tuple/two_entries.carbon b/toolchain/lower/testdata/tuple/two_entries.carbon index 6b4922237b9d..977c4b5e6ad8 100644 --- a/toolchain/lower/testdata/tuple/two_entries.carbon +++ b/toolchain/lower/testdata/tuple/two_entries.carbon @@ -19,7 +19,7 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'two_entries.carbon' // CHECK:STDOUT: source_filename = "two_entries.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.loc14_3 = internal constant { i32, i32 } { i32 12, i32 7 } +// CHECK:STDOUT: @tuple.loc14_3.1 = internal constant { i32, i32 } { i32 12, i32 7 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { // CHECK:STDOUT: entry: @@ -28,7 +28,7 @@ fn Run() -> i32 { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !7 // CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !9 // CHECK:STDOUT: %tuple.elem1.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !9 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @tuple.loc14_3, i64 8, i1 false), !dbg !7 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @tuple.loc14_3.1, i64 8, i1 false), !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !8 // CHECK:STDOUT: %tuple.elem0.loc15_23.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !10 // CHECK:STDOUT: %.loc15_23.1 = load i32, ptr %tuple.elem0.loc15_23.1.tuple.elem, align 4, !dbg !10 diff --git a/toolchain/testing/testdata/min_prelude/facet_types.carbon b/toolchain/testing/testdata/min_prelude/facet_types.carbon deleted file mode 100644 index 3a000dad7df6..000000000000 --- a/toolchain/testing/testdata/min_prelude/facet_types.carbon +++ /dev/null @@ -1,24 +0,0 @@ -// 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/parts/as.carbon -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/copy.carbon -// EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/ - -// --- min_prelude/facet_types.carbon - -// A minimal prelude for testing facet types, their use as generic types, and -// conversions to and from them. -package Core library "prelude"; - -export import library "prelude/parts/as"; -export import library "prelude/parts/copy"; - -interface BitAndWith(Other:! type) { - fn Op[self: Self](other: Other) -> Self; -} - -impl type as BitAndWith(type) { - fn Op[self: Self](other: Self) -> Self = "type.and"; -} diff --git a/toolchain/testing/testdata/min_prelude/parts/as.carbon b/toolchain/testing/testdata/min_prelude/parts/as.carbon index 198e8827481e..824146f42eff 100644 --- a/toolchain/testing/testdata/min_prelude/parts/as.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/as.carbon @@ -23,3 +23,11 @@ interface ImplicitAs(Dest:! type) { // TODO: extend As(Dest); fn Convert[self: Self]() -> Dest; } + +interface BitAndWith(Other:! type) { + fn Op[self: Self](other: Other) -> Self; +} + +impl type as BitAndWith(type) { + fn Op[self: Self](other: Self) -> Self = "type.and"; +} diff --git a/toolchain/testing/testdata/min_prelude/parts/destroy.carbon b/toolchain/testing/testdata/min_prelude/parts/destroy.carbon index da17c4a38308..2c9cced5ccc1 100644 --- a/toolchain/testing/testdata/min_prelude/parts/destroy.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/destroy.carbon @@ -2,13 +2,42 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/bool.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon + // --- min_prelude/parts/destroy.carbon package Core library "prelude/parts/destroy"; +import library "prelude/parts/bool"; +import library "prelude/parts/int_literal"; + +// Object destruction, including running `fn destroy()`. Note this is distinct +// from memory deallocation. interface Destroy { fn Op[addr self: Self*](); } -impl forall [T:! type] T as Destroy { + +// Add destruction for essential builtin types. This can't be done earlier +// because `Destroy` is using them. +// TODO: This should match trivial destruction. +impl bool as Destroy { fn Op[addr self: Self*]() = "no_op"; } +impl type as Destroy { + fn Op[addr self: Self*]() = "no_op"; +} +impl forall [PointeeT:! type] PointeeT* as Destroy { + fn Op[addr self: Self*]() = "no_op"; +} + +// Handles builtin aggregate type destruction. +private fn CanAggregateDestroy() -> type = "type.can_aggregate_destroy"; +impl forall [AggregateT:! CanAggregateDestroy()] AggregateT as Destroy { + fn Op[addr self: Self*]() = "type.aggregate_destroy"; +} + +// `const` instances always use the non-`const` destructor. +impl forall [NonConstT:! Destroy] const NonConstT as Destroy { + fn Op[addr self: Self*]() { (self unsafe as NonConstT*)->(Destroy.Op)(); } +}