diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index cb3946231fc7..d0204baecb06 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -743,10 +743,17 @@ auto AddImportedConstant(Context& context, SemIR::Inst inst) -> SemIR::ConstantId { EvalContext eval_context(&context, SemIR::InstId::None); Phase phase = Phase::Concrete; - // TODO: Can we avoid doing this replacement? It may do things that are - // undesirable during importing, such as resolving specifics. - if (!ReplaceAllFieldsWithConstantValues(eval_context, &inst, &phase)) { - return SemIR::ConstantId::NotConstant; + switch (inst.kind().value_kind()) { + case SemIR::InstValueKind::Typed: + // TODO: Can we avoid doing this replacement? It may do things that are + // undesirable during importing, such as resolving specifics. + if (!ReplaceAllFieldsWithConstantValues(eval_context, &inst, &phase)) { + return SemIR::ConstantId::NotConstant; + } + break; + case SemIR::InstValueKind::None: + // Instructions without a type_id are not evaluated. + break; } return MakeConstantResult(context, inst, phase); } diff --git a/toolchain/check/eval_inst.cpp b/toolchain/check/eval_inst.cpp index 474131cbb8f5..1eb2919cc98d 100644 --- a/toolchain/check/eval_inst.cpp +++ b/toolchain/check/eval_inst.cpp @@ -234,7 +234,9 @@ auto EvalConstantInst(Context& context, SemIR::InstId inst_id, // This is PerformAggregateAccess followed by GetConstantValueInSpecific. if (auto witness = context.insts().TryGetAs(inst.witness_id)) { - auto elements = context.inst_blocks().Get(witness->elements_id); + auto witness_table = context.insts().GetAs( + witness->witness_table_id); + auto elements = context.inst_blocks().Get(witness_table.elements_id); // `elements` can be empty if there is only a forward declaration of the // impl. if (!elements.empty()) { diff --git a/toolchain/check/facet_type.cpp b/toolchain/check/facet_type.cpp index 87b79eff5a57..036354c58767 100644 --- a/toolchain/check/facet_type.cpp +++ b/toolchain/check/facet_type.cpp @@ -76,11 +76,15 @@ auto InitialFacetTypeImplWitness( auto facet_type_info = context.facet_types().Get(facet_type.facet_type_id); if (!is_definition && facet_type_info.rewrite_constraints.empty()) { + auto witness_table_inst_id = AddInst( + context, witness_loc_id, + {.elements_id = context.inst_blocks().AddPlaceholder(), + .impl_id = SemIR::ImplId::None}); return AddInst( context, witness_loc_id, {.type_id = GetSingletonType(context, SemIR::WitnessType::SingletonInstId), - .elements_id = context.inst_blocks().AddPlaceholder(), + .witness_table_id = witness_table_inst_id, .specific_id = self_specific_id}); } @@ -107,16 +111,22 @@ auto InitialFacetTypeImplWitness( SemIR::InstId witness_inst_id = SemIR::InstId::None; llvm::MutableArrayRef table; { - llvm::SmallVector empty_table( - assoc_entities.size(), - SemIR::ImplWitnessTablePlaceholder::SingletonInstId); - auto table_id = context.inst_blocks().Add(empty_table); - table = context.inst_blocks().GetMutable(table_id); + auto elements_id = + context.inst_blocks().AddUninitialized(assoc_entities.size()); + table = context.inst_blocks().GetMutable(elements_id); + for (auto& uninit : table) { + uninit = SemIR::ImplWitnessTablePlaceholder::SingletonInstId; + } + + auto witness_table_inst_id = AddInst( + context, witness_loc_id, + {.elements_id = elements_id, .impl_id = SemIR::ImplId::None}); + witness_inst_id = AddInst( context, witness_loc_id, {.type_id = GetSingletonType(context, SemIR::WitnessType::SingletonInstId), - .elements_id = table_id, + .witness_table_id = witness_table_inst_id, .specific_id = self_specific_id}); } diff --git a/toolchain/check/handle_impl.cpp b/toolchain/check/handle_impl.cpp index 5cce23c1e8b8..b19f943f5244 100644 --- a/toolchain/check/handle_impl.cpp +++ b/toolchain/check/handle_impl.cpp @@ -425,6 +425,8 @@ static auto BuildImplDecl(Context& context, Parse::AnyImplDeclId node_id, impl_decl.impl_id = context.impls().Add(impl_info); lookup_bucket_ref.push_back(impl_decl.impl_id); + AssignImplIdInWitness(context, impl_decl.impl_id, impl_info.witness_id); + // Looking to see if there are any generic bindings on the `impl` // declaration that are not deducible. If so, and the `impl` does not // actually use all its generic bindings, and will never be matched. This diff --git a/toolchain/check/impl.cpp b/toolchain/check/impl.cpp index 13da64127128..c3b58d906c26 100644 --- a/toolchain/check/impl.cpp +++ b/toolchain/check/impl.cpp @@ -11,6 +11,7 @@ #include "toolchain/check/function.h" #include "toolchain/check/generic.h" #include "toolchain/check/import_ref.h" +#include "toolchain/check/inst.h" #include "toolchain/check/interface.h" #include "toolchain/check/name_lookup.h" #include "toolchain/check/type.h" @@ -108,14 +109,17 @@ auto ImplWitnessStartDefinition(Context& context, SemIR::Impl& impl) -> void { return; } auto witness = context.insts().GetAs(impl.witness_id); - auto witness_block = context.inst_blocks().GetMutable(witness.elements_id); - // `witness.elements_id` will be `SemIR::InstBlockId::Empty` when the + auto witness_table = + context.insts().GetAs(witness.witness_table_id); + auto witness_block = + context.inst_blocks().GetMutable(witness_table.elements_id); + // `witness_table.elements_id` will be `SemIR::InstBlockId::Empty` when the // definition is the first declaration and the interface has no members. The // other case where `witness_block` will be empty is when we are using a // placeholder witness. This happens when there is a forward declaration of // the impl and the facet type has no rewrite constraints and so it wasn't // required to be complete. - if (witness.elements_id != SemIR::InstBlockId::Empty && + if (witness_table.elements_id != SemIR::InstBlockId::Empty && witness_block.empty()) { if (!RequireCompleteFacetTypeForImplDefinition( context, impl.latest_decl_id(), impl.constraint_id)) { @@ -123,8 +127,8 @@ auto ImplWitnessStartDefinition(Context& context, SemIR::Impl& impl) -> void { } AllocateFacetTypeImplWitness(context, impl.interface.interface_id, - witness.elements_id); - witness_block = context.inst_blocks().GetMutable(witness.elements_id); + witness_table.elements_id); + witness_block = context.inst_blocks().GetMutable(witness_table.elements_id); } const auto& interface = context.interfaces().Get(impl.interface.interface_id); auto assoc_entities = @@ -171,7 +175,10 @@ auto FinishImplWitness(Context& context, SemIR::Impl& impl) -> void { return; } auto witness = context.insts().GetAs(impl.witness_id); - auto witness_block = context.inst_blocks().GetMutable(witness.elements_id); + auto witness_table = + context.insts().GetAs(witness.witness_table_id); + auto witness_block = + context.inst_blocks().GetMutable(witness_table.elements_id); auto& impl_scope = context.name_scopes().Get(impl.scope_id); auto self_type_id = context.types().GetTypeIdForTypeInstId(impl.self_id); const auto& interface = context.interfaces().Get(impl.interface.interface_id); @@ -240,7 +247,10 @@ auto FillImplWitnessWithErrors(Context& context, SemIR::Impl& impl) -> void { if (impl.witness_id.has_value() && impl.witness_id != SemIR::ErrorInst::SingletonInstId) { auto witness = context.insts().GetAs(impl.witness_id); - auto witness_block = context.inst_blocks().GetMutable(witness.elements_id); + auto witness_table = context.insts().GetAs( + witness.witness_table_id); + auto witness_block = + context.inst_blocks().GetMutable(witness_table.elements_id); for (auto& elem : witness_block) { if (elem == SemIR::ImplWitnessTablePlaceholder::SingletonInstId) { elem = SemIR::ErrorInst::SingletonInstId; @@ -249,6 +259,22 @@ auto FillImplWitnessWithErrors(Context& context, SemIR::Impl& impl) -> void { } } +auto AssignImplIdInWitness(Context& context, SemIR::ImplId impl_id, + SemIR::InstId witness_id) -> void { + if (witness_id == SemIR::ErrorInst::SingletonInstId) { + return; + } + auto witness = context.insts().GetAs(witness_id); + auto witness_table = + context.insts().GetAs(witness.witness_table_id); + witness_table.impl_id = impl_id; + // Note: The `ImplWitnessTable` instruction is `Unique`, so while this marks + // the instruction as being a dependent instruction of a generic impl, it will + // not be substituted into the eval block. + ReplaceInstBeforeConstantUse(context, witness.witness_table_id, + witness_table); +} + auto IsImplEffectivelyFinal(Context& context, const SemIR::Impl& impl) -> bool { return impl.is_final || (context.constant_values().Get(impl.self_id).is_concrete() && diff --git a/toolchain/check/impl.h b/toolchain/check/impl.h index dafe5656bea7..886eb8a62484 100644 --- a/toolchain/check/impl.h +++ b/toolchain/check/impl.h @@ -26,6 +26,10 @@ auto FinishImplWitness(Context& context, SemIR::Impl& impl) -> void; // Sets all unset members of the witness for `impl` to the error instruction. auto FillImplWitnessWithErrors(Context& context, SemIR::Impl& impl) -> void; +// Sets the `ImplId` in the `ImplWitnessTable`. +auto AssignImplIdInWitness(Context& context, SemIR::ImplId impl_id, + SemIR::InstId witness_id) -> void; + // Returns whether the impl is either `final` explicitly, or implicitly due to // being concrete. auto IsImplEffectivelyFinal(Context& context, const SemIR::Impl& impl) -> bool; diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index 91a918f3aab7..eabb8de18a4a 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -2526,6 +2526,9 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, static auto TryResolveTypedInst(ImportRefResolver& resolver, SemIR::LookupImplWitness inst) -> ResolveResult { + CARBON_CHECK(resolver.import_types().GetInstId(inst.type_id) == + SemIR::WitnessType::SingletonInstId); + auto query_self_inst_id = GetLocalConstantInstId(resolver, inst.query_self_inst_id); @@ -2553,19 +2556,23 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, static auto TryResolveTypedInst(ImportRefResolver& resolver, SemIR::ImplWitness inst) -> ResolveResult { + CARBON_CHECK(resolver.import_types().GetInstId(inst.type_id) == + SemIR::WitnessType::SingletonInstId); + auto specific_data = GetLocalSpecificData(resolver, inst.specific_id); + auto witness_table_id = + GetLocalConstantInstId(resolver, inst.witness_table_id); if (resolver.HasNewWork()) { return ResolveResult::Retry(); } - auto elements_id = GetLocalImportRefInstBlock(resolver, inst.elements_id); auto specific_id = GetOrAddLocalSpecific(resolver, inst.specific_id, specific_data); return ResolveAs( resolver, {.type_id = GetSingletonType(resolver.local_context(), SemIR::WitnessType::SingletonInstId), - .elements_id = elements_id, + .witness_table_id = witness_table_id, .specific_id = specific_id}); } @@ -2586,6 +2593,24 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, .index = inst.index}); } +static auto TryResolveTypedInst(ImportRefResolver& resolver, + SemIR::ImplWitnessTable inst) -> ResolveResult { + const auto& import_impl = resolver.import_impls().Get(inst.impl_id); + auto import_decl_inst_id = import_impl.first_decl_id(); + auto local_decl_inst_id = + GetLocalConstantInstId(resolver, import_decl_inst_id); + if (resolver.HasNewWork()) { + return ResolveResult::Retry(); + } + + auto impl_decl = + resolver.local_insts().GetAs(local_decl_inst_id); + auto impl_id = impl_decl.impl_id; + auto elements_id = GetLocalImportRefInstBlock(resolver, inst.elements_id); + return ResolveAs( + resolver, {.elements_id = elements_id, .impl_id = impl_id}); +} + static auto TryResolveTypedInst(ImportRefResolver& resolver, SemIR::IntValue inst) -> ResolveResult { auto type_id = GetLocalConstantId(resolver, inst.type_id); @@ -2945,6 +2970,9 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver, case CARBON_KIND(SemIR::ImplWitnessAccess inst): { return TryResolveTypedInst(resolver, inst); } + case CARBON_KIND(SemIR::ImplWitnessTable inst): { + return TryResolveTypedInst(resolver, inst); + } case CARBON_KIND(SemIR::ImportRefLoaded inst): { return TryResolveTypedInst(resolver, inst, inst_id); } diff --git a/toolchain/check/testdata/array/array_vs_tuple.carbon b/toolchain/check/testdata/array/array_vs_tuple.carbon index 0e73c23ea9fb..d19bcde127c6 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -29,11 +29,12 @@ fn G() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -79,7 +80,7 @@ fn G() { // CHECK:STDOUT: %int_2.loc13_30: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc13_33: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc13_34.1: %tuple.type.37f = tuple_literal (%int_1.loc13_27, %int_2.loc13_30, %int_3.loc13_33) -// CHECK:STDOUT: %impl.elem0.loc13_34.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_34.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_34.1: = bound_method %int_1.loc13_27, %impl.elem0.loc13_34.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc13_34.1: = specific_function %impl.elem0.loc13_34.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_34.2: = bound_method %int_1.loc13_27, %specific_fn.loc13_34.1 [concrete = constants.%bound_method.9a1] @@ -88,7 +89,7 @@ fn G() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc13_34.3: ref %i32 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc13_34.4: init %i32 = initialize_from %.loc13_34.2 to %.loc13_34.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_34.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_34.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_34.3: = bound_method %int_2.loc13_30, %impl.elem0.loc13_34.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc13_34.2: = specific_function %impl.elem0.loc13_34.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_34.4: = bound_method %int_2.loc13_30, %specific_fn.loc13_34.2 [concrete = constants.%bound_method.b92] @@ -97,7 +98,7 @@ fn G() { // CHECK:STDOUT: %int_1.loc13_34: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc13_34.6: ref %i32 = array_index %a.var, %int_1.loc13_34 // CHECK:STDOUT: %.loc13_34.7: init %i32 = initialize_from %.loc13_34.5 to %.loc13_34.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc13_34.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_34.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_34.5: = bound_method %int_3.loc13_33, %impl.elem0.loc13_34.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc13_34.3: = specific_function %impl.elem0.loc13_34.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_34.6: = bound_method %int_3.loc13_33, %specific_fn.loc13_34.3 [concrete = constants.%bound_method.047] @@ -125,7 +126,7 @@ fn G() { // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc14: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc14_36.1: %tuple.type.37f = tuple_literal (%int_1.loc14, %int_2.loc14, %int_3.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_36.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_36.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_36.1: = bound_method %int_1.loc14, %impl.elem0.loc14_36.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14_36.1: = specific_function %impl.elem0.loc14_36.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_36.2: = bound_method %int_1.loc14, %specific_fn.loc14_36.1 [concrete = constants.%bound_method.9a1] @@ -133,7 +134,7 @@ fn G() { // CHECK:STDOUT: %.loc14_36.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_36.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %b.var, element0 // CHECK:STDOUT: %.loc14_36.3: init %i32 = initialize_from %.loc14_36.2 to %tuple.elem0 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_36.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_36.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_36.3: = bound_method %int_2.loc14, %impl.elem0.loc14_36.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc14_36.2: = specific_function %impl.elem0.loc14_36.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_36.4: = bound_method %int_2.loc14, %specific_fn.loc14_36.2 [concrete = constants.%bound_method.b92] @@ -141,7 +142,7 @@ fn G() { // CHECK:STDOUT: %.loc14_36.4: init %i32 = converted %int_2.loc14, %int.convert_checked.loc14_36.2 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %b.var, element1 // CHECK:STDOUT: %.loc14_36.5: init %i32 = initialize_from %.loc14_36.4 to %tuple.elem1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc14_36.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_36.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_36.5: = bound_method %int_3.loc14, %impl.elem0.loc14_36.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc14_36.3: = specific_function %impl.elem0.loc14_36.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_36.6: = bound_method %int_3.loc14, %specific_fn.loc14_36.3 [concrete = constants.%bound_method.047] diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index d0c9d135c571..717ddb6945d1 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -27,11 +27,12 @@ fn Run() { // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -77,7 +78,7 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc11_30.1: %tuple.type.985 = tuple_literal (%int_0) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_30.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_30.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/array/assign_var.carbon b/toolchain/check/testdata/array/assign_var.carbon index e4aa8fba7a50..1aa23fc945e0 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -24,11 +24,12 @@ var b: array(i32, 3) = a; // CHECK:STDOUT: %tuple.type.37f: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -96,7 +97,7 @@ var b: array(i32, 3) = a; // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc11_34.1: %tuple.type.37f = tuple_literal (%int_1.loc11, %int_2.loc11, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_34.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_34.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_34.1: = bound_method %int_1.loc11, %impl.elem0.loc11_34.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11_34.1: = specific_function %impl.elem0.loc11_34.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_34.2: = bound_method %int_1.loc11, %specific_fn.loc11_34.1 [concrete = constants.%bound_method.9a1] @@ -104,7 +105,7 @@ var b: array(i32, 3) = a; // CHECK:STDOUT: %.loc11_34.2: init %i32 = converted %int_1.loc11, %int.convert_checked.loc11_34.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0.loc11: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_34.3: init %i32 = initialize_from %.loc11_34.2 to %tuple.elem0.loc11 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_34.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_34.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_34.3: = bound_method %int_2.loc11, %impl.elem0.loc11_34.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_34.2: = specific_function %impl.elem0.loc11_34.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_34.4: = bound_method %int_2.loc11, %specific_fn.loc11_34.2 [concrete = constants.%bound_method.b92] @@ -112,7 +113,7 @@ var b: array(i32, 3) = a; // CHECK:STDOUT: %.loc11_34.4: init %i32 = converted %int_2.loc11, %int.convert_checked.loc11_34.2 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %tuple.elem1.loc11: ref %i32 = tuple_access file.%a.var, element1 // CHECK:STDOUT: %.loc11_34.5: init %i32 = initialize_from %.loc11_34.4 to %tuple.elem1.loc11 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc11_34.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_34.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_34.5: = bound_method %int_3, %impl.elem0.loc11_34.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc11_34.3: = specific_function %impl.elem0.loc11_34.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_34.6: = bound_method %int_3, %specific_fn.loc11_34.3 [concrete = constants.%bound_method.047] diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index 1acb03c0ff94..343678bd6f73 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -24,11 +24,12 @@ var c: array((), 5) = ((), (), (), (), (),); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -114,7 +115,7 @@ var c: array((), 5) = ((), (), (), (), (),); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.985 = tuple_literal (%int_1.loc11) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_1.loc11, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_1.loc11, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index 17485eeadc81..482952f3d5a2 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -29,13 +29,15 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.2b8: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.2b8 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn.b6f [concrete] @@ -44,11 +46,11 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11d: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.ffe: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.ffe [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11d) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] // CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] @@ -61,11 +63,12 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.5d2, %int_2.ef8, %int_3.822) [concrete] // CHECK:STDOUT: %int_3.d14: %u32 = int_value 3 [concrete] -// CHECK:STDOUT: %impl_witness.8da2: = impl_witness (imports.%Core.import_ref.823), @impl.750(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.6ad = impl_witness_table (imports.%Core.import_ref.823), @impl.750 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a110: = impl_witness %ImplicitAs.impl_witness_table.6ad, @impl.750(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.e06: type = fn_type @Convert.9, @impl.750(%int_32) [concrete] // CHECK:STDOUT: %Convert.47f: %Convert.type.e06 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.bc2: %ImplicitAs.type.2fd = facet_value %u32, (%impl_witness.8da2) [concrete] -// CHECK:STDOUT: %.883: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.bc2 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.84e: %ImplicitAs.type.2fd = facet_value %u32, (%ImplicitAs.impl_witness.a110) [concrete] +// CHECK:STDOUT: %.268: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.84e [concrete] // CHECK:STDOUT: %Convert.bound.258: = bound_method %int_3.d14, %Convert.47f [concrete] // CHECK:STDOUT: %Convert.specific_fn.2eb: = specific_function %Convert.47f, @Convert.9(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3a6: = bound_method %int_3.d14, %Convert.specific_fn.2eb [concrete] @@ -144,14 +147,14 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %Add.ref: %Add.type.b1f = name_ref Add, %Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc14_23: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_23.1: = bound_method %int_1, %impl.elem0.loc14_23 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14_23: = specific_function %impl.elem0.loc14_23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc14_23.2: = bound_method %int_1, %specific_fn.loc14_23 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc14_23: init %i32 = call %bound_method.loc14_23.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_23.1: %i32 = value_of_initializer %int.convert_checked.loc14_23 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_23.2: %i32 = converted %int_1, %.loc14_23.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_26: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_26.1: = bound_method %int_2, %impl.elem0.loc14_26 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc14_26: = specific_function %impl.elem0.loc14_26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc14_26.2: = bound_method %int_2, %specific_fn.loc14_26 [concrete = constants.%bound_method.b92] @@ -159,7 +162,7 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %.loc14_26.1: %i32 = value_of_initializer %int.convert_checked.loc14_26 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc14_26.2: %i32 = converted %int_2, %.loc14_26.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_23.2, %.loc14_26.2) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc14_27: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0.loc14_27: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11d, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc14_27.1: = bound_method %int.sadd, %impl.elem0.loc14_27 [concrete = constants.%Convert.bound.2d6] // CHECK:STDOUT: %specific_fn.loc14_27: = specific_function %impl.elem0.loc14_27, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc14_27.2: = bound_method %int.sadd, %specific_fn.loc14_27 [concrete = constants.%bound_method.c6f] @@ -190,7 +193,7 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %ConvertToU32.ref: %ConvertToU32.type = name_ref ConvertToU32, %ConvertToU32.decl [concrete = constants.%ConvertToU32] // CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc16_32: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16_32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_32.1: = bound_method %int_3.loc16, %impl.elem0.loc16_32 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc16_32: = specific_function %impl.elem0.loc16_32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc16_32.2: = bound_method %int_3.loc16, %specific_fn.loc16_32 [concrete = constants.%bound_method.047] @@ -198,7 +201,7 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %.loc16_32.1: %i32 = value_of_initializer %int.convert_checked.loc16_32 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc16_32.2: %i32 = converted %int_3.loc16, %.loc16_32.1 [concrete = constants.%int_3.822] // CHECK:STDOUT: %int.convert_checked.loc16_33.1: init %u32 = call %ConvertToU32.ref(%.loc16_32.2) [concrete = constants.%int_3.d14] -// CHECK:STDOUT: %impl.elem0.loc16_33: %.883 = impl_witness_access constants.%impl_witness.8da2, element0 [concrete = constants.%Convert.47f] +// CHECK:STDOUT: %impl.elem0.loc16_33: %.268 = impl_witness_access constants.%ImplicitAs.impl_witness.a110, element0 [concrete = constants.%Convert.47f] // CHECK:STDOUT: %bound_method.loc16_33.1: = bound_method %int.convert_checked.loc16_33.1, %impl.elem0.loc16_33 [concrete = constants.%Convert.bound.258] // CHECK:STDOUT: %specific_fn.loc16_33: = specific_function %impl.elem0.loc16_33, @Convert.9(constants.%int_32) [concrete = constants.%Convert.specific_fn.2eb] // CHECK:STDOUT: %bound_method.loc16_33.2: = bound_method %int.convert_checked.loc16_33.1, %specific_fn.loc16_33 [concrete = constants.%bound_method.3a6] @@ -223,7 +226,7 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %int_2.loc14_36: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc14_40.1: %tuple.type = tuple_literal (%int_1.loc14_33, %int_2.loc14_36, %int_3) -// CHECK:STDOUT: %impl.elem0.loc14_40.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_40.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_40.1: = bound_method %int_1.loc14_33, %impl.elem0.loc14_40.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14_40.1: = specific_function %impl.elem0.loc14_40.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc14_40.2: = bound_method %int_1.loc14_33, %specific_fn.loc14_40.1 [concrete = constants.%bound_method.9a1] @@ -232,7 +235,7 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc14_40.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc14_40.4: init %i32 = initialize_from %.loc14_40.2 to %.loc14_40.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_40.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_40.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_40.3: = bound_method %int_2.loc14_36, %impl.elem0.loc14_40.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc14_40.2: = specific_function %impl.elem0.loc14_40.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc14_40.4: = bound_method %int_2.loc14_36, %specific_fn.loc14_40.2 [concrete = constants.%bound_method.b92] @@ -241,7 +244,7 @@ let c: array(i32, ConvertToU32(3))* = &a; // CHECK:STDOUT: %int_1.loc14_40: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc14_40.6: ref %i32 = array_index file.%a.var, %int_1.loc14_40 // CHECK:STDOUT: %.loc14_40.7: init %i32 = initialize_from %.loc14_40.5 to %.loc14_40.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc14_40.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_40.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_40.5: = bound_method %int_3, %impl.elem0.loc14_40.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc14_40.3: = specific_function %impl.elem0.loc14_40.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc14_40.6: = bound_method %int_3, %specific_fn.loc14_40.3 [concrete = constants.%bound_method.047] diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index e6a591a4c01d..b9ae4a968cfa 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -26,23 +26,25 @@ var a: array(i32, Negate(1)); // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.2b8: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.2b8 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_-1.251: %i32 = int_value -1 [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.ffe: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.ffe [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.75d: = bound_method %int_-1.251, %Convert.960 [concrete] // CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.245: = bound_method %int_-1.251, %Convert.specific_fn.8a8 [concrete] @@ -92,7 +94,7 @@ var a: array(i32, Negate(1)); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Negate.ref: %Negate.type.15b = name_ref Negate, %Negate.decl [concrete = constants.%Negate] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc17_26: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_26.1: = bound_method %int_1, %impl.elem0.loc17_26 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc17_26: = specific_function %impl.elem0.loc17_26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc17_26.2: = bound_method %int_1, %specific_fn.loc17_26 [concrete = constants.%bound_method.9a1] @@ -100,7 +102,7 @@ var a: array(i32, Negate(1)); // CHECK:STDOUT: %.loc17_26.1: %i32 = value_of_initializer %int.convert_checked.loc17_26 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_26.2: %i32 = converted %int_1, %.loc17_26.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc17_26.2) [concrete = constants.%int_-1.251] -// CHECK:STDOUT: %impl.elem0.loc17_27: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0.loc17_27: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc17_27.1: = bound_method %int.snegate, %impl.elem0.loc17_27 [concrete = constants.%Convert.bound.75d] // CHECK:STDOUT: %specific_fn.loc17_27: = specific_function %impl.elem0.loc17_27, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc17_27.2: = bound_method %int.snegate, %specific_fn.loc17_27 [concrete = constants.%bound_method.245] diff --git a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon index bab0635a0f86..061fdcbfa656 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon @@ -28,11 +28,12 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -94,7 +95,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_2.loc11_28: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc11: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc11_32.1: %tuple.type = tuple_literal (%int_1.loc11_25, %int_2.loc11_28, %int_3.loc11) -// CHECK:STDOUT: %impl.elem0.loc11_32.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_32.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_32.1: = bound_method %int_1.loc11_25, %impl.elem0.loc11_32.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11_32.1: = specific_function %impl.elem0.loc11_32.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_32.2: = bound_method %int_1.loc11_25, %specific_fn.loc11_32.1 [concrete = constants.%bound_method.9a1] @@ -103,7 +104,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_32.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_32.4: init %i32 = initialize_from %.loc11_32.2 to %.loc11_32.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_32.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_32.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_32.3: = bound_method %int_2.loc11_28, %impl.elem0.loc11_32.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_32.2: = specific_function %impl.elem0.loc11_32.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_32.4: = bound_method %int_2.loc11_28, %specific_fn.loc11_32.2 [concrete = constants.%bound_method.b92] @@ -112,7 +113,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_1.loc11_32: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_32.6: ref %i32 = array_index file.%a.var, %int_1.loc11_32 // CHECK:STDOUT: %.loc11_32.7: init %i32 = initialize_from %.loc11_32.5 to %.loc11_32.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc11_32.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_32.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_32.5: = bound_method %int_3.loc11, %impl.elem0.loc11_32.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc11_32.3: = specific_function %impl.elem0.loc11_32.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_32.6: = bound_method %int_3.loc11, %specific_fn.loc11_32.3 [concrete = constants.%bound_method.047] @@ -132,7 +133,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %.loc16_28.1: Core.IntLiteral = struct_access %.loc16_27.2, element0 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_28.1: = bound_method %.loc16_28.1, %impl.elem0.loc16 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_28.2: = bound_method %.loc16_28.1, %specific_fn.loc16 [concrete = constants.%bound_method.047] diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 024acb1f7b27..19b1232a7212 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -54,11 +54,12 @@ var d: array(i32, 3) = t2; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -173,7 +174,7 @@ var d: array(i32, 3) = t2; // CHECK:STDOUT: %str.loc18_28: String = string_literal "Hello" [concrete = constants.%str.ef1] // CHECK:STDOUT: %str.loc18_37: String = string_literal "World" [concrete = constants.%str.abb] // CHECK:STDOUT: %.loc18_44.1: %tuple.type.b0f = tuple_literal (%int_1.loc18, %str.loc18_28, %str.loc18_37) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_44.1: = bound_method %int_1.loc18, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_44.2: = bound_method %int_1.loc18, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index 0fc5fbc5acd4..b8303441d28e 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -33,11 +33,12 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -125,7 +126,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc16_20.1: %tuple.type = tuple_literal (%int_1.loc16_13, %int_2.loc16_16, %int_3) // CHECK:STDOUT: %int_1.loc16_23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc16_20.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16_20.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_20.1: = bound_method %int_1.loc16_13, %impl.elem0.loc16_20.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc16_20.1: = specific_function %impl.elem0.loc16_20.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_20.2: = bound_method %int_1.loc16_13, %specific_fn.loc16_20.1 [concrete = constants.%bound_method.9a1] @@ -135,7 +136,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc16_20.4: ref %i32 = array_index %.loc16_20.3, %int_0 // CHECK:STDOUT: %.loc16_20.5: init %i32 = initialize_from %.loc16_20.2 to %.loc16_20.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc16_20.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16_20.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_20.3: = bound_method %int_2.loc16_16, %impl.elem0.loc16_20.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc16_20.2: = specific_function %impl.elem0.loc16_20.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_20.4: = bound_method %int_2.loc16_16, %specific_fn.loc16_20.2 [concrete = constants.%bound_method.b92] @@ -144,7 +145,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1.loc16_20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc16_20.7: ref %i32 = array_index %.loc16_20.3, %int_1.loc16_20 // CHECK:STDOUT: %.loc16_20.8: init %i32 = initialize_from %.loc16_20.6 to %.loc16_20.7 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc16_20.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16_20.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_20.5: = bound_method %int_3, %impl.elem0.loc16_20.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc16_20.3: = specific_function %impl.elem0.loc16_20.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_20.6: = bound_method %int_3, %specific_fn.loc16_20.3 [concrete = constants.%bound_method.047] @@ -157,7 +158,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc16_20.13: init %array_type = converted %.loc16_20.1, %.loc16_20.12 [concrete = constants.%array] // CHECK:STDOUT: %.loc16_20.14: ref %array_type = temporary %.loc16_20.3, %.loc16_20.13 // CHECK:STDOUT: %.loc16_20.15: %array_type = bind_value %.loc16_20.14 -// CHECK:STDOUT: %impl.elem0.loc16_23: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16_23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_23.1: = bound_method %int_1.loc16_23, %impl.elem0.loc16_23 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc16_23: = specific_function %impl.elem0.loc16_23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_23.2: = bound_method %int_1.loc16_23, %specific_fn.loc16_23 [concrete = constants.%bound_method.9a1] diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 2f6985cfd1ad..5c3bb028ce24 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -24,11 +24,12 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -90,7 +91,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_2.loc11_28: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc11_32.1: %tuple.type = tuple_literal (%int_1.loc11_25, %int_2.loc11_28, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_32.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_32.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_32.1: = bound_method %int_1.loc11_25, %impl.elem0.loc11_32.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11_32.1: = specific_function %impl.elem0.loc11_32.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_32.2: = bound_method %int_1.loc11_25, %specific_fn.loc11_32.1 [concrete = constants.%bound_method.9a1] @@ -99,7 +100,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_32.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_32.4: init %i32 = initialize_from %.loc11_32.2 to %.loc11_32.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_32.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_32.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_32.3: = bound_method %int_2.loc11_28, %impl.elem0.loc11_32.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_32.2: = specific_function %impl.elem0.loc11_32.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_32.4: = bound_method %int_2.loc11_28, %specific_fn.loc11_32.2 [concrete = constants.%bound_method.b92] @@ -108,7 +109,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_1.loc11_32: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_32.6: ref %i32 = array_index file.%a.var, %int_1.loc11_32 // CHECK:STDOUT: %.loc11_32.7: init %i32 = initialize_from %.loc11_32.5 to %.loc11_32.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc11_32.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_32.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_32.5: = bound_method %int_3, %impl.elem0.loc11_32.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc11_32.3: = specific_function %impl.elem0.loc11_32.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_32.6: = bound_method %int_3, %specific_fn.loc11_32.3 [concrete = constants.%bound_method.047] @@ -128,7 +129,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = struct_access %.loc12_27.2, element0 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_28.1: = bound_method %.loc12_28.1, %impl.elem0.loc12 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_28.2: = bound_method %.loc12_28.1, %specific_fn.loc12 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index 6ce4194afe68..cfc119420857 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -46,11 +46,12 @@ fn H() { G(3); } // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %N.51e, %Convert.960 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.51e, %Convert.specific_fn [symbolic] @@ -116,7 +117,7 @@ fn H() { G(3); } // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N.51e)] -// CHECK:STDOUT: %impl.elem0: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc9_23.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_23.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc9_23.3 (constants.%bound_method)] @@ -153,35 +154,37 @@ fn H() { G(3); } // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.2b8: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.2b8 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%int_3.822) [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.ffe: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.ffe [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] // CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] // CHECK:STDOUT: %inst.splice_block: = inst_value [concrete] { -// CHECK:STDOUT: %.bd9: Core.IntLiteral = splice_block %.ade [concrete = %int_3.1ba] { -// CHECK:STDOUT: %impl.elem0: %.4d8 = impl_witness_access %impl_witness.023, element0 [concrete = %Convert.960] -// CHECK:STDOUT: %bound_method.e10: = bound_method %int_3.822, %impl.elem0 [concrete = %Convert.bound.2d6] +// CHECK:STDOUT: %.df7: Core.IntLiteral = splice_block %.dd0 [concrete = %int_3.1ba] { +// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access %ImplicitAs.impl_witness.a11, element0 [concrete = %Convert.960] +// CHECK:STDOUT: %bound_method.8d1: = bound_method %int_3.822, %impl.elem0 [concrete = %Convert.bound.2d6] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(%int_32) [concrete = %Convert.specific_fn.8a8] -// CHECK:STDOUT: %bound_method.7a1: = bound_method %int_3.822, %specific_fn [concrete = %bound_method.c6f] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.7a1(%int_3.822) [concrete = %int_3.1ba] -// CHECK:STDOUT: %.ab0: Core.IntLiteral = value_of_initializer %int.convert_checked [concrete = %int_3.1ba] -// CHECK:STDOUT: %.ade: Core.IntLiteral = converted %int_3.822, %.ab0 [concrete = %int_3.1ba] +// CHECK:STDOUT: %bound_method.9ef: = bound_method %int_3.822, %specific_fn [concrete = %bound_method.c6f] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.9ef(%int_3.822) [concrete = %int_3.1ba] +// CHECK:STDOUT: %.5d1: Core.IntLiteral = value_of_initializer %int.convert_checked [concrete = %int_3.1ba] +// CHECK:STDOUT: %.dd0: Core.IntLiteral = converted %int_3.822, %.5d1 [concrete = %int_3.1ba] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -249,7 +252,7 @@ fn H() { G(3); } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc13_13.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method.047] diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index 3a9ed6880a6d..ba719f8ee03d 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -29,11 +29,12 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -106,7 +107,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_8.loc11_46: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988] // CHECK:STDOUT: %.loc11_50.1: %tuple.type = tuple_literal (%int_1.loc11_25, %int_2.loc11_28, %int_3.loc11_31, %int_4.loc11_34, %int_5.loc11_37, %int_6.loc11_40, %int_7.loc11_43, %int_8.loc11_46, %int_9) -// CHECK:STDOUT: %impl.elem0.loc11_50.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.1: = bound_method %int_1.loc11_25, %impl.elem0.loc11_50.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11_50.1: = specific_function %impl.elem0.loc11_50.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.2: = bound_method %int_1.loc11_25, %specific_fn.loc11_50.1 [concrete = constants.%bound_method.9a1] @@ -115,7 +116,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_50.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_50.4: init %i32 = initialize_from %.loc11_50.2 to %.loc11_50.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_50.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.3: = bound_method %int_2.loc11_28, %impl.elem0.loc11_50.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_50.2: = specific_function %impl.elem0.loc11_50.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.4: = bound_method %int_2.loc11_28, %specific_fn.loc11_50.2 [concrete = constants.%bound_method.b92] @@ -124,7 +125,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_1.loc11_50: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_50.6: ref %i32 = array_index file.%a.var, %int_1.loc11_50 // CHECK:STDOUT: %.loc11_50.7: init %i32 = initialize_from %.loc11_50.5 to %.loc11_50.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc11_50.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.5: = bound_method %int_3.loc11_31, %impl.elem0.loc11_50.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc11_50.3: = specific_function %impl.elem0.loc11_50.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.6: = bound_method %int_3.loc11_31, %specific_fn.loc11_50.3 [concrete = constants.%bound_method.047] @@ -133,7 +134,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_2.loc11_50: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc11_50.9: ref %i32 = array_index file.%a.var, %int_2.loc11_50 // CHECK:STDOUT: %.loc11_50.10: init %i32 = initialize_from %.loc11_50.8 to %.loc11_50.9 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc11_50.4: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.4: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.7: = bound_method %int_4.loc11_34, %impl.elem0.loc11_50.4 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc11_50.4: = specific_function %impl.elem0.loc11_50.4, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.8: = bound_method %int_4.loc11_34, %specific_fn.loc11_50.4 [concrete = constants.%bound_method.1da] @@ -142,7 +143,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_3.loc11_50: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc11_50.12: ref %i32 = array_index file.%a.var, %int_3.loc11_50 // CHECK:STDOUT: %.loc11_50.13: init %i32 = initialize_from %.loc11_50.11 to %.loc11_50.12 [concrete = constants.%int_4.940] -// CHECK:STDOUT: %impl.elem0.loc11_50.5: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.9: = bound_method %int_5.loc11_37, %impl.elem0.loc11_50.5 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn.loc11_50.5: = specific_function %impl.elem0.loc11_50.5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.10: = bound_method %int_5.loc11_37, %specific_fn.loc11_50.5 [concrete = constants.%bound_method.a25] @@ -151,7 +152,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_4.loc11_50: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc11_50.15: ref %i32 = array_index file.%a.var, %int_4.loc11_50 // CHECK:STDOUT: %.loc11_50.16: init %i32 = initialize_from %.loc11_50.14 to %.loc11_50.15 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %impl.elem0.loc11_50.6: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.11: = bound_method %int_6.loc11_40, %impl.elem0.loc11_50.6 [concrete = constants.%Convert.bound.ce9] // CHECK:STDOUT: %specific_fn.loc11_50.6: = specific_function %impl.elem0.loc11_50.6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.12: = bound_method %int_6.loc11_40, %specific_fn.loc11_50.6 [concrete = constants.%bound_method.efa] @@ -160,7 +161,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_5.loc11_50: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %.loc11_50.18: ref %i32 = array_index file.%a.var, %int_5.loc11_50 // CHECK:STDOUT: %.loc11_50.19: init %i32 = initialize_from %.loc11_50.17 to %.loc11_50.18 [concrete = constants.%int_6.e56] -// CHECK:STDOUT: %impl.elem0.loc11_50.7: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.13: = bound_method %int_7.loc11_43, %impl.elem0.loc11_50.7 [concrete = constants.%Convert.bound.208] // CHECK:STDOUT: %specific_fn.loc11_50.7: = specific_function %impl.elem0.loc11_50.7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.14: = bound_method %int_7.loc11_43, %specific_fn.loc11_50.7 [concrete = constants.%bound_method.3bd] @@ -169,7 +170,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_6.loc11_50: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %.loc11_50.21: ref %i32 = array_index file.%a.var, %int_6.loc11_50 // CHECK:STDOUT: %.loc11_50.22: init %i32 = initialize_from %.loc11_50.20 to %.loc11_50.21 [concrete = constants.%int_7.0b1] -// CHECK:STDOUT: %impl.elem0.loc11_50.8: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.15: = bound_method %int_8.loc11_46, %impl.elem0.loc11_50.8 [concrete = constants.%Convert.bound.e09] // CHECK:STDOUT: %specific_fn.loc11_50.8: = specific_function %impl.elem0.loc11_50.8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.16: = bound_method %int_8.loc11_46, %specific_fn.loc11_50.8 [concrete = constants.%bound_method.02d] @@ -178,7 +179,7 @@ var a: array(i32, 9) = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_7.loc11_50: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] // CHECK:STDOUT: %.loc11_50.24: ref %i32 = array_index file.%a.var, %int_7.loc11_50 // CHECK:STDOUT: %.loc11_50.25: init %i32 = initialize_from %.loc11_50.23 to %.loc11_50.24 [concrete = constants.%int_8.98c] -// CHECK:STDOUT: %impl.elem0.loc11_50.9: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50.9: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.17: = bound_method %int_9, %impl.elem0.loc11_50.9 [concrete = constants.%Convert.bound.9e2] // CHECK:STDOUT: %specific_fn.loc11_50.9: = specific_function %impl.elem0.loc11_50.9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.18: = bound_method %int_9, %specific_fn.loc11_50.9 [concrete = constants.%bound_method.cd3] diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index d7eb3f09fdff..d6b2907b36ca 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -179,11 +179,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %struct_type.x.y.4cf: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -300,7 +301,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc9_27.1: %struct_type.x.y.4cf = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_27.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_27.1: = bound_method %int_1, %impl.elem0.loc9_27.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc9_27.1: = specific_function %impl.elem0.loc9_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_27.2: = bound_method %int_1, %specific_fn.loc9_27.1 [concrete = constants.%bound_method.9a1] @@ -308,7 +309,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc9_27.2: init %i32 = converted %int_1, %int.convert_checked.loc9_27.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_27.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc9_27.4: init %i32 = initialize_from %.loc9_27.2 to %.loc9_27.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc9_27.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_27.3: = bound_method %int_2, %impl.elem0.loc9_27.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc9_27.2: = specific_function %impl.elem0.loc9_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_27.4: = bound_method %int_2, %specific_fn.loc9_27.2 [concrete = constants.%bound_method.b92] @@ -326,7 +327,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc17_31.1: %struct_type.x.y.4cf = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc17_31.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_31.1: = bound_method %int_1, %impl.elem0.loc17_31.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc17_31.1: = specific_function %impl.elem0.loc17_31.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_31.2: = bound_method %int_1, %specific_fn.loc17_31.1 [concrete = constants.%bound_method.9a1] @@ -334,7 +335,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc17_31.2: init %i32 = converted %int_1, %int.convert_checked.loc17_31.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_31.3: ref %i32 = class_element_access file.%a_ref.var, element0 // CHECK:STDOUT: %.loc17_31.4: init %i32 = initialize_from %.loc17_31.2 to %.loc17_31.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_31.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_31.3: = bound_method %int_2, %impl.elem0.loc17_31.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc17_31.2: = specific_function %impl.elem0.loc17_31.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_31.4: = bound_method %int_2, %specific_fn.loc17_31.2 [concrete = constants.%bound_method.b92] @@ -377,11 +378,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -438,7 +440,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -566,11 +568,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %struct_type.x.y.4cf: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -645,7 +648,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc13_34.1: %struct_type.x.y.4cf = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] -// CHECK:STDOUT: %impl.elem0.loc13_34.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_34.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_34.1: = bound_method %int_1, %impl.elem0.loc13_34.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc13_34.1: = specific_function %impl.elem0.loc13_34.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_34.2: = bound_method %int_1, %specific_fn.loc13_34.1 [concrete = constants.%bound_method.9a1] @@ -654,7 +657,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc13_34.3: ref %A = temporary_storage // CHECK:STDOUT: %.loc13_34.4: ref %i32 = class_element_access %.loc13_34.3, element0 // CHECK:STDOUT: %.loc13_34.5: init %i32 = initialize_from %.loc13_34.2 to %.loc13_34.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_34.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_34.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_34.3: = bound_method %int_2, %impl.elem0.loc13_34.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc13_34.2: = specific_function %impl.elem0.loc13_34.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_34.4: = bound_method %int_2, %specific_fn.loc13_34.2 [concrete = constants.%bound_method.b92] @@ -686,11 +689,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %struct_type.x.y.4cf: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -767,7 +771,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc22_33.1: %struct_type.x.y.4cf = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] -// CHECK:STDOUT: %impl.elem0.loc22_33.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc22_33.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_33.1: = bound_method %int_1, %impl.elem0.loc22_33.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc22_33.1: = specific_function %impl.elem0.loc22_33.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_33.2: = bound_method %int_1, %specific_fn.loc22_33.1 [concrete = constants.%bound_method.9a1] @@ -776,7 +780,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc22_33.3: ref %A = temporary_storage // CHECK:STDOUT: %.loc22_33.4: ref %i32 = class_element_access %.loc22_33.3, element0 // CHECK:STDOUT: %.loc22_33.5: init %i32 = initialize_from %.loc22_33.2 to %.loc22_33.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc22_33.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc22_33.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_33.3: = bound_method %int_2, %impl.elem0.loc22_33.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc22_33.2: = specific_function %impl.elem0.loc22_33.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_33.4: = bound_method %int_2, %specific_fn.loc22_33.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/as/basic.carbon b/toolchain/check/testdata/as/basic.carbon index 5facbf758d66..d8552295ee5a 100644 --- a/toolchain/check/testdata/as/basic.carbon +++ b/toolchain/check/testdata/as/basic.carbon @@ -22,11 +22,12 @@ fn Main() -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -64,7 +65,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc12_12.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_12.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index 6676e74866f7..396f44accbc7 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -35,29 +35,30 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.602: type = facet_type <@As, @As(%X)> [concrete] // CHECK:STDOUT: %Convert.type.35b: type = fn_type @Convert.1, @As(%X) [concrete] -// CHECK:STDOUT: %impl_witness.491: = impl_witness (@impl.d8c.%Convert.decl) [concrete] +// CHECK:STDOUT: %As.impl_witness.cf1: = impl_witness file.%As.impl_witness_table.loc15 [concrete] // CHECK:STDOUT: %Convert.type.0e3: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.311: %Convert.type.0e3 = struct_value () [concrete] -// CHECK:STDOUT: %As.facet.206: %As.type.602 = facet_value %i32, (%impl_witness.491) [concrete] +// CHECK:STDOUT: %As.facet.f77: %As.type.602 = facet_value %i32, (%As.impl_witness.cf1) [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.662: = impl_witness (@impl.18a.%Convert.decl) [concrete] +// CHECK:STDOUT: %As.impl_witness.031: = impl_witness file.%As.impl_witness_table.loc19 [concrete] // CHECK:STDOUT: %Convert.type.c23: type = fn_type @Convert.3 [concrete] // CHECK:STDOUT: %Convert.8bb: %Convert.type.c23 = struct_value () [concrete] -// CHECK:STDOUT: %As.facet.79a: %As.type.fd4 = facet_value %X, (%impl_witness.662) [concrete] +// CHECK:STDOUT: %As.facet.de1: %As.type.fd4 = facet_value %X, (%As.impl_witness.031) [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.7, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet.d7e: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet.d7e [concrete] +// CHECK:STDOUT: %As.facet.908: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet.908 [concrete] // CHECK:STDOUT: %Convert.bound.e80: = bound_method %int_4.0c1, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.7(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] -// CHECK:STDOUT: %.e84: type = fn_type_with_self_type %Convert.type.35b, %As.facet.206 [concrete] +// CHECK:STDOUT: %.9c9: type = fn_type_with_self_type %Convert.type.35b, %As.facet.f77 [concrete] // CHECK:STDOUT: %Convert.bound.483: = bound_method %int_4.940, %Convert.311 [concrete] -// CHECK:STDOUT: %.c95: type = fn_type_with_self_type %Convert.type.99b, %As.facet.79a [concrete] +// CHECK:STDOUT: %.208: type = fn_type_with_self_type %Convert.type.99b, %As.facet.de1 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -86,7 +87,8 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%X)> [concrete = constants.%As.type.602] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness (@impl.d8c.%Convert.decl) [concrete = constants.%impl_witness.491] +// CHECK:STDOUT: %As.impl_witness_table.loc15 = impl_witness_table (@impl.d8c.%Convert.decl), @impl.d8c [concrete] +// CHECK:STDOUT: %As.impl_witness.loc15: = impl_witness %As.impl_witness_table.loc15 [concrete = constants.%As.impl_witness.cf1] // CHECK:STDOUT: impl_decl @impl.18a [concrete] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -95,7 +97,8 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [concrete = constants.%As.type.fd4] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc19: = impl_witness (@impl.18a.%Convert.decl) [concrete = constants.%impl_witness.662] +// CHECK:STDOUT: %As.impl_witness_table.loc19 = impl_witness_table (@impl.18a.%Convert.decl), @impl.18a [concrete] +// CHECK:STDOUT: %As.impl_witness.loc19: = impl_witness %As.impl_witness_table.loc19 [concrete = constants.%As.impl_witness.031] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: } @@ -127,7 +130,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: !members: // CHECK:STDOUT: .X = // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc15 +// CHECK:STDOUT: witness = file.%As.impl_witness.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.18a: %X.ref as %As.type { @@ -149,7 +152,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: !members: // CHECK:STDOUT: .X = // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc19 +// CHECK:STDOUT: witness = file.%As.impl_witness.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -192,7 +195,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %int_32.loc23_21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc23_21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc23_18: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0.loc23_18: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc23_18.1: = bound_method %int_4, %impl.elem0.loc23_18 [concrete = constants.%Convert.bound.e80] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc23_18, @Convert.7(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_18.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] @@ -200,14 +203,14 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %.loc23_18.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc23_18.2: %i32 = converted %int_4, %.loc23_18.1 [concrete = constants.%int_4.940] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %impl.elem0.loc23_26: %.e84 = impl_witness_access constants.%impl_witness.491, element0 [concrete = constants.%Convert.311] +// CHECK:STDOUT: %impl.elem0.loc23_26: %.9c9 = impl_witness_access constants.%As.impl_witness.cf1, element0 [concrete = constants.%Convert.311] // CHECK:STDOUT: %bound_method.loc23_26: = bound_method %.loc23_18.2, %impl.elem0.loc23_26 [concrete = constants.%Convert.bound.483] // CHECK:STDOUT: %.loc23_26.1: ref %X = temporary_storage // CHECK:STDOUT: %Convert.call.loc23_26: init %X = call %bound_method.loc23_26(%.loc23_18.2) to %.loc23_26.1 // CHECK:STDOUT: %.loc23_26.2: init %X = converted %.loc23_18.2, %Convert.call.loc23_26 // CHECK:STDOUT: %int_32.loc23_35: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc23_35: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc23_32: %.c95 = impl_witness_access constants.%impl_witness.662, element0 [concrete = constants.%Convert.8bb] +// CHECK:STDOUT: %impl.elem0.loc23_32: %.208 = impl_witness_access constants.%As.impl_witness.031, element0 [concrete = constants.%Convert.8bb] // CHECK:STDOUT: %bound_method.loc23_32: = bound_method %.loc23_26.2, %impl.elem0.loc23_32 // CHECK:STDOUT: %.loc23_26.3: ref %X = temporary %.loc23_26.1, %.loc23_26.2 // CHECK:STDOUT: %.loc23_26.4: %X = bind_value %.loc23_26.3 diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index 4b86898439ef..f7472b489743 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -21,11 +21,12 @@ var test_type: type = i32; // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -93,7 +94,7 @@ var test_type: type = i32; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index bd12116f9031..48783b4666b9 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -46,11 +46,12 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %int_39999999999999999993.af6: Core.IntLiteral = int_value 39999999999999999993 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.7ef: = bound_method %int_39999999999999999993.af6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.75f: = bound_method %int_39999999999999999993.af6, %Convert.specific_fn [concrete] @@ -91,7 +92,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc15: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_14.1: = bound_method @__global_init.%int_39999999999999999993, %impl.elem0.loc15 [concrete = constants.%Convert.bound.7ef] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_14.2: = bound_method @__global_init.%int_39999999999999999993, %specific_fn.loc15 [concrete = constants.%bound_method.75f] @@ -106,7 +107,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc21: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_14.1: = bound_method @__global_init.%int_2147483648.loc21, %impl.elem0.loc21 [concrete = constants.%Convert.bound.85f] // CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_14.2: = bound_method @__global_init.%int_2147483648.loc21, %specific_fn.loc21 [concrete = constants.%bound_method.f79] @@ -121,7 +122,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc27: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc27_14.1: = bound_method @__global_init.%int_2147483648.loc27, %impl.elem0.loc27 [concrete = constants.%Convert.bound.85f] // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_14.2: = bound_method @__global_init.%int_2147483648.loc27, %specific_fn.loc27 [concrete = constants.%bound_method.f79] diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index ef90a86b503e..089ab7ace9bc 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -45,11 +45,12 @@ fn F() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.e09: = bound_method %int_8.b85, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.02d: = bound_method %int_8.b85, %Convert.specific_fn [concrete] @@ -113,7 +114,7 @@ fn F() { // CHECK:STDOUT: %int_2147483647.loc19: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89] // CHECK:STDOUT: %int_2147483647.loc20: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89] // CHECK:STDOUT: %.loc21_3.1: %tuple.type.27c = tuple_literal (%int_8.loc15, %int_9, %int_8.loc17, %int_8.loc18, %int_2147483647.loc19, %int_2147483647.loc20) -// CHECK:STDOUT: %impl.elem0.loc21_3.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_3.1: = bound_method %int_8.loc15, %impl.elem0.loc21_3.1 [concrete = constants.%Convert.bound.e09] // CHECK:STDOUT: %specific_fn.loc21_3.1: = specific_function %impl.elem0.loc21_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_3.2: = bound_method %int_8.loc15, %specific_fn.loc21_3.1 [concrete = constants.%bound_method.02d] @@ -122,7 +123,7 @@ fn F() { // CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc21_3.3: ref %i32 = array_index %ints.var, %int_0.loc21 // CHECK:STDOUT: %.loc21_3.4: init %i32 = initialize_from %.loc21_3.2 to %.loc21_3.3 [concrete = constants.%int_8.98c] -// CHECK:STDOUT: %impl.elem0.loc21_3.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_3.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_3.3: = bound_method %int_9, %impl.elem0.loc21_3.2 [concrete = constants.%Convert.bound.9e2] // CHECK:STDOUT: %specific_fn.loc21_3.2: = specific_function %impl.elem0.loc21_3.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_3.4: = bound_method %int_9, %specific_fn.loc21_3.2 [concrete = constants.%bound_method.cd3] @@ -131,7 +132,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %.loc21_3.6: ref %i32 = array_index %ints.var, %int_1.loc21 // CHECK:STDOUT: %.loc21_3.7: init %i32 = initialize_from %.loc21_3.5 to %.loc21_3.6 [concrete = constants.%int_9.f88] -// CHECK:STDOUT: %impl.elem0.loc21_3.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_3.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_3.5: = bound_method %int_8.loc17, %impl.elem0.loc21_3.3 [concrete = constants.%Convert.bound.e09] // CHECK:STDOUT: %specific_fn.loc21_3.3: = specific_function %impl.elem0.loc21_3.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_3.6: = bound_method %int_8.loc17, %specific_fn.loc21_3.3 [concrete = constants.%bound_method.02d] @@ -140,7 +141,7 @@ fn F() { // CHECK:STDOUT: %int_2.loc21: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc21_3.9: ref %i32 = array_index %ints.var, %int_2.loc21 // CHECK:STDOUT: %.loc21_3.10: init %i32 = initialize_from %.loc21_3.8 to %.loc21_3.9 [concrete = constants.%int_8.98c] -// CHECK:STDOUT: %impl.elem0.loc21_3.4: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_3.4: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_3.7: = bound_method %int_8.loc18, %impl.elem0.loc21_3.4 [concrete = constants.%Convert.bound.e09] // CHECK:STDOUT: %specific_fn.loc21_3.4: = specific_function %impl.elem0.loc21_3.4, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_3.8: = bound_method %int_8.loc18, %specific_fn.loc21_3.4 [concrete = constants.%bound_method.02d] @@ -149,7 +150,7 @@ fn F() { // CHECK:STDOUT: %int_3.loc21: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] // CHECK:STDOUT: %.loc21_3.12: ref %i32 = array_index %ints.var, %int_3.loc21 // CHECK:STDOUT: %.loc21_3.13: init %i32 = initialize_from %.loc21_3.11 to %.loc21_3.12 [concrete = constants.%int_8.98c] -// CHECK:STDOUT: %impl.elem0.loc21_3.5: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_3.5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_3.9: = bound_method %int_2147483647.loc19, %impl.elem0.loc21_3.5 [concrete = constants.%Convert.bound.f38] // CHECK:STDOUT: %specific_fn.loc21_3.5: = specific_function %impl.elem0.loc21_3.5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_3.10: = bound_method %int_2147483647.loc19, %specific_fn.loc21_3.5 [concrete = constants.%bound_method.8e1] @@ -158,7 +159,7 @@ fn F() { // CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %.loc21_3.15: ref %i32 = array_index %ints.var, %int_4.loc21 // CHECK:STDOUT: %.loc21_3.16: init %i32 = initialize_from %.loc21_3.14 to %.loc21_3.15 [concrete = constants.%int_2147483647.a74] -// CHECK:STDOUT: %impl.elem0.loc21_3.6: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_3.6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_3.11: = bound_method %int_2147483647.loc20, %impl.elem0.loc21_3.6 [concrete = constants.%Convert.bound.f38] // CHECK:STDOUT: %specific_fn.loc21_3.6: = specific_function %impl.elem0.loc21_3.6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_3.12: = bound_method %int_2147483647.loc20, %specific_fn.loc21_3.6 [concrete = constants.%bound_method.8e1] diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index bf7770f59176..600574ecfdfc 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -19,11 +19,12 @@ var b: i32 = ((2)); // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -75,7 +76,7 @@ var b: i32 = ((2)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc11: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_1.1: = bound_method %int_1, %impl.elem0.loc11 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_1.2: = bound_method %int_1, %specific_fn.loc11 [concrete = constants.%bound_method.9a1] @@ -83,7 +84,7 @@ var b: i32 = ((2)); // CHECK:STDOUT: %.loc11: init %i32 = converted %int_1, %int.convert_checked.loc11 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign file.%a.var, %.loc11 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_1.1: = bound_method %int_2, %impl.elem0.loc12 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_1.2: = bound_method %int_2, %specific_fn.loc12 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/basics/run_i32.carbon b/toolchain/check/testdata/basics/run_i32.carbon index 10714f055f77..2a86a23ff919 100644 --- a/toolchain/check/testdata/basics/run_i32.carbon +++ b/toolchain/check/testdata/basics/run_i32.carbon @@ -20,11 +20,12 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -62,7 +63,7 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: fn @Run() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/builtins/bool/eq.carbon b/toolchain/check/testdata/builtins/bool/eq.carbon index 8eed1c3ec29e..1f82e796ed88 100644 --- a/toolchain/check/testdata/builtins/bool/eq.carbon +++ b/toolchain/check/testdata/builtins/bool/eq.carbon @@ -291,9 +291,10 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %False: %False.type = struct_value () [concrete] // CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] // CHECK:STDOUT: %Equal.type.79c: type = fn_type @Equal.1 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.998, imports.%Core.import_ref.fb6) [concrete] -// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value bool, (%impl_witness) [concrete] -// CHECK:STDOUT: %.75b: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] +// CHECK:STDOUT: %Eq.impl_witness_table = impl_witness_table (imports.%Core.import_ref.998, imports.%Core.import_ref.fb6), @impl.bb5 [concrete] +// CHECK:STDOUT: %Eq.impl_witness: = impl_witness %Eq.impl_witness_table [concrete] +// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value bool, (%Eq.impl_witness) [concrete] +// CHECK:STDOUT: %.7f7: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] // CHECK:STDOUT: %Equal.type.aa3: type = fn_type @Equal.2 [concrete] // CHECK:STDOUT: %Equal.6e2: %Equal.type.aa3 = struct_value () [concrete] // CHECK:STDOUT: %Equal.bound.fe0: = bound_method %true, %Equal.6e2 [concrete] @@ -360,7 +361,7 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc9_10: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %true.loc9_18: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc9: %.75b = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Equal.6e2] +// CHECK:STDOUT: %impl.elem0.loc9: %.7f7 = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.6e2] // CHECK:STDOUT: %bound_method.loc9: = bound_method %true.loc9_10, %impl.elem0.loc9 [concrete = constants.%Equal.bound.fe0] // CHECK:STDOUT: %bool.eq.loc9: init bool = call %bound_method.loc9(%true.loc9_10, %true.loc9_18) [concrete = constants.%true] // CHECK:STDOUT: %.loc9_22.2: bool = value_of_initializer %bool.eq.loc9 [concrete = constants.%true] @@ -377,7 +378,7 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc10: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %false.loc10: bool = bool_literal false [concrete = constants.%false] -// CHECK:STDOUT: %impl.elem0.loc10: %.75b = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Equal.6e2] +// CHECK:STDOUT: %impl.elem0.loc10: %.7f7 = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.6e2] // CHECK:STDOUT: %bound_method.loc10: = bound_method %true.loc10, %impl.elem0.loc10 [concrete = constants.%Equal.bound.fe0] // CHECK:STDOUT: %bool.eq.loc10: init bool = call %bound_method.loc10(%true.loc10, %false.loc10) [concrete = constants.%false] // CHECK:STDOUT: %.loc10_23.2: bool = value_of_initializer %bool.eq.loc10 [concrete = constants.%false] @@ -394,7 +395,7 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %false.loc11: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %true.loc11: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc11: %.75b = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Equal.6e2] +// CHECK:STDOUT: %impl.elem0.loc11: %.7f7 = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.6e2] // CHECK:STDOUT: %bound_method.loc11: = bound_method %false.loc11, %impl.elem0.loc11 [concrete = constants.%Equal.bound.d3c] // CHECK:STDOUT: %bool.eq.loc11: init bool = call %bound_method.loc11(%false.loc11, %true.loc11) [concrete = constants.%false] // CHECK:STDOUT: %.loc11_23.2: bool = value_of_initializer %bool.eq.loc11 [concrete = constants.%false] @@ -411,7 +412,7 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %false.loc12_10: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %false.loc12_19: bool = bool_literal false [concrete = constants.%false] -// CHECK:STDOUT: %impl.elem0.loc12: %.75b = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Equal.6e2] +// CHECK:STDOUT: %impl.elem0.loc12: %.7f7 = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.6e2] // CHECK:STDOUT: %bound_method.loc12: = bound_method %false.loc12_10, %impl.elem0.loc12 [concrete = constants.%Equal.bound.d3c] // CHECK:STDOUT: %bool.eq.loc12: init bool = call %bound_method.loc12(%false.loc12_10, %false.loc12_19) [concrete = constants.%true] // CHECK:STDOUT: %.loc12_24.2: bool = value_of_initializer %bool.eq.loc12 [concrete = constants.%true] diff --git a/toolchain/check/testdata/builtins/bool/neq.carbon b/toolchain/check/testdata/builtins/bool/neq.carbon index b71be6fc718c..4dbcc4aaedb5 100644 --- a/toolchain/check/testdata/builtins/bool/neq.carbon +++ b/toolchain/check/testdata/builtins/bool/neq.carbon @@ -291,9 +291,10 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %False: %False.type = struct_value () [concrete] // CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] // CHECK:STDOUT: %NotEqual.type.e6c: type = fn_type @NotEqual.1 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.85b, imports.%Core.import_ref.67a) [concrete] -// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value bool, (%impl_witness) [concrete] -// CHECK:STDOUT: %.d6e: type = fn_type_with_self_type %NotEqual.type.e6c, %Eq.facet [concrete] +// CHECK:STDOUT: %Eq.impl_witness_table = impl_witness_table (imports.%Core.import_ref.85b, imports.%Core.import_ref.67a), @impl.bb5 [concrete] +// CHECK:STDOUT: %Eq.impl_witness: = impl_witness %Eq.impl_witness_table [concrete] +// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value bool, (%Eq.impl_witness) [concrete] +// CHECK:STDOUT: %.f66: type = fn_type_with_self_type %NotEqual.type.e6c, %Eq.facet [concrete] // CHECK:STDOUT: %NotEqual.type.c0e: type = fn_type @NotEqual.2 [concrete] // CHECK:STDOUT: %NotEqual.bf4: %NotEqual.type.c0e = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.bound.542: = bound_method %true, %NotEqual.bf4 [concrete] @@ -360,7 +361,7 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc9_10: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %true.loc9_18: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem1.loc9: %.d6e = impl_witness_access constants.%impl_witness, element1 [concrete = constants.%NotEqual.bf4] +// CHECK:STDOUT: %impl.elem1.loc9: %.f66 = impl_witness_access constants.%Eq.impl_witness, element1 [concrete = constants.%NotEqual.bf4] // CHECK:STDOUT: %bound_method.loc9: = bound_method %true.loc9_10, %impl.elem1.loc9 [concrete = constants.%NotEqual.bound.542] // CHECK:STDOUT: %bool.neq.loc9: init bool = call %bound_method.loc9(%true.loc9_10, %true.loc9_18) [concrete = constants.%false] // CHECK:STDOUT: %.loc9_22.2: bool = value_of_initializer %bool.neq.loc9 [concrete = constants.%false] @@ -377,7 +378,7 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc10: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %false.loc10: bool = bool_literal false [concrete = constants.%false] -// CHECK:STDOUT: %impl.elem1.loc10: %.d6e = impl_witness_access constants.%impl_witness, element1 [concrete = constants.%NotEqual.bf4] +// CHECK:STDOUT: %impl.elem1.loc10: %.f66 = impl_witness_access constants.%Eq.impl_witness, element1 [concrete = constants.%NotEqual.bf4] // CHECK:STDOUT: %bound_method.loc10: = bound_method %true.loc10, %impl.elem1.loc10 [concrete = constants.%NotEqual.bound.542] // CHECK:STDOUT: %bool.neq.loc10: init bool = call %bound_method.loc10(%true.loc10, %false.loc10) [concrete = constants.%true] // CHECK:STDOUT: %.loc10_23.2: bool = value_of_initializer %bool.neq.loc10 [concrete = constants.%true] @@ -394,7 +395,7 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %false.loc11: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %true.loc11: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem1.loc11: %.d6e = impl_witness_access constants.%impl_witness, element1 [concrete = constants.%NotEqual.bf4] +// CHECK:STDOUT: %impl.elem1.loc11: %.f66 = impl_witness_access constants.%Eq.impl_witness, element1 [concrete = constants.%NotEqual.bf4] // CHECK:STDOUT: %bound_method.loc11: = bound_method %false.loc11, %impl.elem1.loc11 [concrete = constants.%NotEqual.bound.5a9] // CHECK:STDOUT: %bool.neq.loc11: init bool = call %bound_method.loc11(%false.loc11, %true.loc11) [concrete = constants.%true] // CHECK:STDOUT: %.loc11_23.2: bool = value_of_initializer %bool.neq.loc11 [concrete = constants.%true] @@ -411,7 +412,7 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %false.loc12_10: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %false.loc12_19: bool = bool_literal false [concrete = constants.%false] -// CHECK:STDOUT: %impl.elem1.loc12: %.d6e = impl_witness_access constants.%impl_witness, element1 [concrete = constants.%NotEqual.bf4] +// CHECK:STDOUT: %impl.elem1.loc12: %.f66 = impl_witness_access constants.%Eq.impl_witness, element1 [concrete = constants.%NotEqual.bf4] // CHECK:STDOUT: %bound_method.loc12: = bound_method %false.loc12_10, %impl.elem1.loc12 [concrete = constants.%NotEqual.bound.5a9] // CHECK:STDOUT: %bool.neq.loc12: init bool = call %bound_method.loc12(%false.loc12_10, %false.loc12_19) [concrete = constants.%false] // CHECK:STDOUT: %.loc12_24.2: bool = value_of_initializer %bool.neq.loc12 [concrete = constants.%false] diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index 0fac87c3ae38..a6622dc5878d 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -97,11 +97,12 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %int_64.fab: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.b97: = impl_witness (imports.%Core.import_ref.a86), @impl.c81(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.e36 = impl_witness_table (imports.%Core.import_ref.a86), @impl.c81 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness %ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%impl_witness.b97) [concrete] -// CHECK:STDOUT: %.b14: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_64.fab, %Convert.16d [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_64.fab, %Convert.specific_fn [concrete] @@ -138,7 +139,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %.loc6_16.1: type = splice_block %.loc6_16.3 [concrete = f64] { // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%Main.Float [concrete = constants.%Float] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64.fab] -// CHECK:STDOUT: %impl.elem0: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc6_14.1: = bound_method %int_64, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_14.2: = bound_method %int_64, %specific_fn [concrete = constants.%bound_method] @@ -195,11 +196,12 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32.be0) [concrete] // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.b97: = impl_witness (imports.%Core.import_ref.a86), @impl.c81(%int_32.be0) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.e36 = impl_witness_table (imports.%Core.import_ref.a86), @impl.c81 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness %ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32.be0) [concrete] // CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32.be0) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%impl_witness.b97) [concrete] -// CHECK:STDOUT: %.b14: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.cce: = bound_method %int_32.be0, %Convert.16d [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32.be0) [concrete] // CHECK:STDOUT: %bound_method.480: = bound_method %int_32.be0, %Convert.specific_fn [concrete] @@ -238,7 +240,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %.loc10_28.1: type = splice_block %.loc10_28.3 [concrete = ] { // CHECK:STDOUT: %Float.ref.loc10: %Float.type = name_ref Float, imports.%Main.Float [concrete = constants.%Float] // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32.be0] -// CHECK:STDOUT: %impl.elem0: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc10_26.1: = bound_method %int_32.loc10, %impl.elem0 [concrete = constants.%Convert.bound.cce] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32.be0) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_26.2: = bound_method %int_32.loc10, %specific_fn [concrete = constants.%bound_method.480] @@ -281,7 +283,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64.fab] -// CHECK:STDOUT: %impl.elem0: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc12_1.1: = bound_method %int_64, %impl.elem0 [concrete = constants.%Convert.bound.575] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32.be0) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_1.2: = bound_method %int_64, %specific_fn [concrete = constants.%bound_method.767] diff --git a/toolchain/check/testdata/builtins/print/char.carbon b/toolchain/check/testdata/builtins/print/char.carbon index f27df92b550a..d54d38f01672 100644 --- a/toolchain/check/testdata/builtins/print/char.carbon +++ b/toolchain/check/testdata/builtins/print/char.carbon @@ -29,11 +29,12 @@ fn Main() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -91,7 +92,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %PrintChar.ref.loc16: %PrintChar.type.c95 = name_ref PrintChar, file.%PrintChar.decl [concrete = constants.%PrintChar.843] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc16: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_13.1: = bound_method %int_1, %impl.elem0.loc16 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_13.2: = bound_method %int_1, %specific_fn.loc16 [concrete = constants.%bound_method.9a1] @@ -102,7 +103,7 @@ fn Main() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %PrintChar.ref.loc17: %PrintChar.type.089 = name_ref PrintChar, imports.%Core.PrintChar [concrete = constants.%PrintChar.d75] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc17: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_18.1: = bound_method %int_2, %impl.elem0.loc17 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_18.2: = bound_method %int_2, %specific_fn.loc17 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/builtins/print/int.carbon b/toolchain/check/testdata/builtins/print/int.carbon index 5a5891154c16..cdb43796b288 100644 --- a/toolchain/check/testdata/builtins/print/int.carbon +++ b/toolchain/check/testdata/builtins/print/int.carbon @@ -31,11 +31,12 @@ fn Main() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -87,7 +88,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Print.ref.loc16: %Print.type.980 = name_ref Print, file.%Print.decl [concrete = constants.%Print.b7c] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc16: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_9.1: = bound_method %int_1, %impl.elem0.loc16 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_9.2: = bound_method %int_1, %specific_fn.loc16 [concrete = constants.%bound_method.9a1] @@ -98,7 +99,7 @@ fn Main() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Print.ref.loc18: %Print.type.6ed = name_ref Print, imports.%Core.Print [concrete = constants.%Print.723] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc18: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_14.1: = bound_method %int_2, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_14.2: = bound_method %int_2, %specific_fn.loc18 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/choice/basic.carbon b/toolchain/check/testdata/choice/basic.carbon index c04199d0e243..cc052fc4d2b1 100644 --- a/toolchain/check/testdata/choice/basic.carbon +++ b/toolchain/check/testdata/choice/basic.carbon @@ -165,11 +165,12 @@ fn G() { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.54b: type = facet_type <@ImplicitAs, @ImplicitAs(%u2)> [concrete] // CHECK:STDOUT: %Convert.type.f0e: type = fn_type @Convert.1, @ImplicitAs(%u2) [concrete] -// CHECK:STDOUT: %impl_witness.f5e: = impl_witness (imports.%Core.import_ref.c3d), @impl.86e(%int_2.ecc) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.bb8 = impl_witness_table (imports.%Core.import_ref.c3d), @impl.86e [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.801: = impl_witness %ImplicitAs.impl_witness_table.bb8, @impl.86e(%int_2.ecc) [concrete] // CHECK:STDOUT: %Convert.type.70b: type = fn_type @Convert.2, @impl.86e(%int_2.ecc) [concrete] // CHECK:STDOUT: %Convert.474: %Convert.type.70b = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.54b = facet_value Core.IntLiteral, (%impl_witness.f5e) [concrete] -// CHECK:STDOUT: %.a2e: type = fn_type_with_self_type %Convert.type.f0e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.54b = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.801) [concrete] +// CHECK:STDOUT: %.3e0: type = fn_type_with_self_type %Convert.type.f0e, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.5bb: = bound_method %int_0.5c6, %Convert.474 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.474, @Convert.2(%int_2.ecc) [concrete] // CHECK:STDOUT: %bound_method.d36: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -218,7 +219,7 @@ fn G() { // CHECK:STDOUT: %u2: type = class_type @UInt, @UInt(constants.%int_2.ecc) [concrete = constants.%u2] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.discriminant [concrete = constants.%complete_type.de2] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc4: %.a2e = impl_witness_access constants.%impl_witness.f5e, element0 [concrete = constants.%Convert.474] +// CHECK:STDOUT: %impl.elem0.loc4: %.3e0 = impl_witness_access constants.%ImplicitAs.impl_witness.801, element0 [concrete = constants.%Convert.474] // CHECK:STDOUT: %bound_method.loc4_7.1: = bound_method %int_0, %impl.elem0.loc4 [concrete = constants.%Convert.bound.5bb] // CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Convert.2(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_7.2: = bound_method %int_0, %specific_fn.loc4 [concrete = constants.%bound_method.d36] @@ -235,7 +236,7 @@ fn G() { // CHECK:STDOUT: %.loc4_7.10: %Ordering = bind_value %.loc4_7.9 // CHECK:STDOUT: %Less: %Ordering = bind_name Less, %.loc4_7.10 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc5: %.a2e = impl_witness_access constants.%impl_witness.f5e, element0 [concrete = constants.%Convert.474] +// CHECK:STDOUT: %impl.elem0.loc5: %.3e0 = impl_witness_access constants.%ImplicitAs.impl_witness.801, element0 [concrete = constants.%Convert.474] // CHECK:STDOUT: %bound_method.loc5_13.1: = bound_method %int_1, %impl.elem0.loc5 [concrete = constants.%Convert.bound.0dd] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.2(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_13.2: = bound_method %int_1, %specific_fn.loc5 [concrete = constants.%bound_method.6bf] @@ -252,7 +253,7 @@ fn G() { // CHECK:STDOUT: %.loc5_13.10: %Ordering = bind_value %.loc5_13.9 // CHECK:STDOUT: %Equivalent: %Ordering = bind_name Equivalent, %.loc5_13.10 // CHECK:STDOUT: %int_2.loc6: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc6: %.a2e = impl_witness_access constants.%impl_witness.f5e, element0 [concrete = constants.%Convert.474] +// CHECK:STDOUT: %impl.elem0.loc6: %.3e0 = impl_witness_access constants.%ImplicitAs.impl_witness.801, element0 [concrete = constants.%Convert.474] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %int_2.loc6, %impl.elem0.loc6 [concrete = constants.%Convert.bound.122] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %int_2.loc6, %specific_fn.loc6 [concrete = constants.%bound_method.f7d] @@ -269,7 +270,7 @@ fn G() { // CHECK:STDOUT: %.loc6_10.10: %Ordering = bind_value %.loc6_10.9 // CHECK:STDOUT: %Greater: %Ordering = bind_name Greater, %.loc6_10.10 // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc8: %.a2e = impl_witness_access constants.%impl_witness.f5e, element0 [concrete = constants.%Convert.474] +// CHECK:STDOUT: %impl.elem0.loc8: %.3e0 = impl_witness_access constants.%ImplicitAs.impl_witness.801, element0 [concrete = constants.%Convert.474] // CHECK:STDOUT: %bound_method.loc8_1.1: = bound_method %int_3, %impl.elem0.loc8 [concrete = constants.%Convert.bound.a5c] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_1.2: = bound_method %int_3, %specific_fn.loc8 [concrete = constants.%bound_method.c7e] diff --git a/toolchain/check/testdata/choice/fail_todo_params.carbon b/toolchain/check/testdata/choice/fail_todo_params.carbon index 010e222b90ea..e7c910386d03 100644 --- a/toolchain/check/testdata/choice/fail_todo_params.carbon +++ b/toolchain/check/testdata/choice/fail_todo_params.carbon @@ -58,11 +58,12 @@ choice C { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.766: type = facet_type <@ImplicitAs, @ImplicitAs(%u1)> [concrete] // CHECK:STDOUT: %Convert.type.5a2: type = fn_type @Convert.1, @ImplicitAs(%u1) [concrete] -// CHECK:STDOUT: %impl_witness.514: = impl_witness (imports.%Core.import_ref.c3d), @impl.86e(%int_1.5b8) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.bb8 = impl_witness_table (imports.%Core.import_ref.c3d), @impl.86e [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.123: = impl_witness %ImplicitAs.impl_witness_table.bb8, @impl.86e(%int_1.5b8) [concrete] // CHECK:STDOUT: %Convert.type.f9b: type = fn_type @Convert.2, @impl.86e(%int_1.5b8) [concrete] // CHECK:STDOUT: %Convert.84e: %Convert.type.f9b = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.766 = facet_value Core.IntLiteral, (%impl_witness.514) [concrete] -// CHECK:STDOUT: %.df4: type = fn_type_with_self_type %Convert.type.5a2, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.766 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.123) [concrete] +// CHECK:STDOUT: %.48b: type = fn_type_with_self_type %Convert.type.5a2, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.db0: = bound_method %int_0.5c6, %Convert.84e [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.84e, @Convert.2(%int_1.5b8) [concrete] // CHECK:STDOUT: %bound_method.06f: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -110,7 +111,7 @@ choice C { // CHECK:STDOUT: %u1: type = class_type @UInt, @UInt(constants.%int_1.5b8) [concrete = constants.%u1] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.discriminant [concrete = constants.%complete_type.df6] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc4: %.df4 = impl_witness_access constants.%impl_witness.514, element0 [concrete = constants.%Convert.84e] +// CHECK:STDOUT: %impl.elem0.loc4: %.48b = impl_witness_access constants.%ImplicitAs.impl_witness.123, element0 [concrete = constants.%Convert.84e] // CHECK:STDOUT: %bound_method.loc4_7.1: = bound_method %int_0, %impl.elem0.loc4 [concrete = constants.%Convert.bound.db0] // CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Convert.2(constants.%int_1.5b8) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_7.2: = bound_method %int_0, %specific_fn.loc4 [concrete = constants.%bound_method.06f] @@ -127,7 +128,7 @@ choice C { // CHECK:STDOUT: %.loc4_7.10: %C = bind_value %.loc4_7.9 // CHECK:STDOUT: %Alt1: %C = bind_name Alt1, %.loc4_7.10 // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc10: %.df4 = impl_witness_access constants.%impl_witness.514, element0 [concrete = constants.%Convert.84e] +// CHECK:STDOUT: %impl.elem0.loc10: %.48b = impl_witness_access constants.%ImplicitAs.impl_witness.123, element0 [concrete = constants.%Convert.84e] // CHECK:STDOUT: %bound_method.loc10_7.1: = bound_method %int_1.loc10, %impl.elem0.loc10 [concrete = constants.%Convert.bound.1f9] // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Convert.2(constants.%int_1.5b8) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_7.2: = bound_method %int_1.loc10, %specific_fn.loc10 [concrete = constants.%bound_method.734] diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index d2bfcb79cb88..809ca407d6f2 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -156,11 +156,12 @@ class A { // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.a25: = bound_method %int_5.64b, %Convert.specific_fn [concrete] @@ -215,7 +216,7 @@ class A { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_45.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_45.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method.a25] @@ -255,7 +256,7 @@ class A { // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_13.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_13.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] @@ -269,7 +270,7 @@ class A { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %.loc13_24.1: %struct_type.radius.f47 = struct_literal (%int_5) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_24.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_24.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method.a25] @@ -395,11 +396,12 @@ class A { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -491,7 +493,7 @@ class A { // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_13.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_13.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -520,11 +522,12 @@ class A { // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] @@ -569,7 +572,7 @@ class A { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_16.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_16.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] @@ -602,11 +605,12 @@ class A { // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] @@ -660,7 +664,7 @@ class A { // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc5: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_26.1: = bound_method %int_5.loc5, %impl.elem0.loc5 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_26.2: = bound_method %int_5.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] @@ -676,7 +680,7 @@ class A { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc6: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_24.1: = bound_method %int_5.loc6, %impl.elem0.loc6 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_24.2: = bound_method %int_5.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/adapter/init_adapt.carbon b/toolchain/check/testdata/class/adapter/init_adapt.carbon index 9d813d9f85b1..fc1c11332980 100644 --- a/toolchain/check/testdata/class/adapter/init_adapt.carbon +++ b/toolchain/check/testdata/class/adapter/init_adapt.carbon @@ -107,11 +107,12 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -155,7 +156,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [concrete = constants.%C] -// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.1: = bound_method @__global_init.%int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc13_27.1: = specific_function %impl.elem0.loc13_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.2: = bound_method @__global_init.%int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.9a1] @@ -164,7 +165,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.3: ref %i32 = class_element_access %.loc13_27.2, element0 // CHECK:STDOUT: %.loc13_27.4: init %i32 = initialize_from %.loc13_27.1 to %.loc13_27.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.3: = bound_method @__global_init.%int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc13_27.2: = specific_function %impl.elem0.loc13_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.4: = bound_method @__global_init.%int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.b92] @@ -299,11 +300,12 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -347,7 +349,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [concrete = constants.%C] -// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.1: = bound_method @__global_init.%int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc13_27.1: = specific_function %impl.elem0.loc13_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.2: = bound_method @__global_init.%int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.9a1] @@ -356,7 +358,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.3: ref %i32 = class_element_access %.loc13_27.2, element0 // CHECK:STDOUT: %.loc13_27.4: init %i32 = initialize_from %.loc13_27.1 to %.loc13_27.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.3: = bound_method @__global_init.%int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc13_27.2: = specific_function %impl.elem0.loc13_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.4: = bound_method @__global_init.%int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index 94b451b73835..23f923c4314b 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -67,11 +67,12 @@ class Derived { // CHECK:STDOUT: %struct_type.base.d.a20: type = struct_type {.base: %struct_type.b.a15, .d: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ac3: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.1da: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] @@ -176,7 +177,7 @@ class Derived { // CHECK:STDOUT: %.loc14_26.1: %struct_type.b.a15 = struct_literal (%int_4) // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] // CHECK:STDOUT: %.loc14_35.1: %struct_type.base.d.a20 = struct_literal (%.loc14_26.1, %int_7) -// CHECK:STDOUT: %impl.elem0.loc14_26: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_26.1: = bound_method %int_4, %impl.elem0.loc14_26 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc14_26: = specific_function %impl.elem0.loc14_26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_26.2: = bound_method %int_4, %specific_fn.loc14_26 [concrete = constants.%bound_method.1da] @@ -187,7 +188,7 @@ class Derived { // CHECK:STDOUT: %.loc14_26.4: init %i32 = initialize_from %.loc14_26.2 to %.loc14_26.3 [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc14_26.5: init %Base = class_init (%.loc14_26.4), %.loc14_35.2 [concrete = constants.%Base.val] // CHECK:STDOUT: %.loc14_35.3: init %Base = converted %.loc14_26.1, %.loc14_26.5 [concrete = constants.%Base.val] -// CHECK:STDOUT: %impl.elem0.loc14_35: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_35: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_35.1: = bound_method %int_7, %impl.elem0.loc14_35 [concrete = constants.%Convert.bound.208] // CHECK:STDOUT: %specific_fn.loc14_35: = specific_function %impl.elem0.loc14_35, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_35.2: = bound_method %int_7, %specific_fn.loc14_35 [concrete = constants.%bound_method.3bd] diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index 62713d74de54..1c726dda850f 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -42,11 +42,12 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -154,7 +155,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12_8 [concrete = @Base.%.loc12_8] // CHECK:STDOUT: %.loc18_10: ref %i32 = class_element_access %.loc18_4, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 4cf2278ba69b..5f686703cea1 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -44,11 +44,12 @@ fn Run() -> i32 { // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] @@ -170,7 +171,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_18.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_18.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index 05d1c0a6431b..e8b5f7f48c5c 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -80,11 +80,12 @@ fn ConvertInit() { // CHECK:STDOUT: %struct_type.base.c.136: type = struct_type {.base: %struct_type.base.b.bf0, .c: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -329,7 +330,7 @@ fn ConvertInit() { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc38_57.1: %struct_type.base.c.136 = struct_literal (%.loc38_48.1, %int_3) // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %impl.elem0.loc38_39: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc38_39: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc38_39.1: = bound_method %int_1, %impl.elem0.loc38_39 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc38_39: = specific_function %impl.elem0.loc38_39, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc38_39.2: = bound_method %int_1, %specific_fn.loc38_39 [concrete = constants.%bound_method.9a1] @@ -342,7 +343,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc38_39.4: init %i32 = initialize_from %.loc38_39.2 to %.loc38_39.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc38_39.5: init %A = class_init (%.loc38_39.4), %.loc38_48.2 [concrete = constants.%A.val] // CHECK:STDOUT: %.loc38_48.3: init %A = converted %.loc38_39.1, %.loc38_39.5 [concrete = constants.%A.val] -// CHECK:STDOUT: %impl.elem0.loc38_48: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc38_48: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc38_48.1: = bound_method %int_2, %impl.elem0.loc38_48 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc38_48: = specific_function %impl.elem0.loc38_48, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc38_48.2: = bound_method %int_2, %specific_fn.loc38_48 [concrete = constants.%bound_method.b92] @@ -352,7 +353,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc38_48.6: init %i32 = initialize_from %.loc38_48.4 to %.loc38_48.5 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc38_48.7: init %B = class_init (%.loc38_48.3, %.loc38_48.6), %.loc38_57.3 [concrete = constants.%B.val] // CHECK:STDOUT: %.loc38_57.4: init %B = converted %.loc38_48.1, %.loc38_48.7 [concrete = constants.%B.val] -// CHECK:STDOUT: %impl.elem0.loc38_57: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc38_57: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc38_57.1: = bound_method %int_3, %impl.elem0.loc38_57 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc38_57: = specific_function %impl.elem0.loc38_57, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc38_57.2: = bound_method %int_3, %specific_fn.loc38_57 [concrete = constants.%bound_method.047] diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index faeb81e753a7..78cf4f140830 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -45,11 +45,12 @@ class Class { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -99,7 +100,7 @@ class Class { // CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc29: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_24.1: = bound_method %int_0, %impl.elem0.loc29 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_24.2: = bound_method %int_0, %specific_fn.loc29 [concrete = constants.%bound_method.b6e] @@ -115,7 +116,7 @@ class Class { // CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc35: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc35: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc35_22.1: = bound_method %int_1, %impl.elem0.loc35 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc35_22.2: = bound_method %int_1, %specific_fn.loc35 [concrete = constants.%bound_method.9a1] diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index 7e8c804f1c5d..69aa35eb2b04 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -48,11 +48,12 @@ fn F() { // CHECK:STDOUT: %struct_type.a.c: type = struct_type {.a: Core.IntLiteral, .c: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -114,7 +115,7 @@ fn F() { // CHECK:STDOUT: %int_2.loc26: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc26_18.1: %struct_type.a.c = struct_literal (%int_1.loc26, %int_2.loc26) // CHECK:STDOUT: %Class.ref.loc26: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_18.1: = bound_method %int_1.loc26, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_18.2: = bound_method %int_1.loc26, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index 8e666bf31390..b4b0219b6574 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -47,11 +47,12 @@ fn F() { // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -128,7 +129,7 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc26_33.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %Class.ref.loc26_38: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %impl.elem0.loc26_33.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc26_33.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_33.1: = bound_method %int_1, %impl.elem0.loc26_33.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc26_33.1: = specific_function %impl.elem0.loc26_33.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_33.2: = bound_method %int_1, %specific_fn.loc26_33.1 [concrete = constants.%bound_method.9a1] @@ -137,7 +138,7 @@ fn F() { // CHECK:STDOUT: %.loc26_33.3: ref %Class = temporary_storage // CHECK:STDOUT: %.loc26_33.4: ref %i32 = class_element_access %.loc26_33.3, element0 // CHECK:STDOUT: %.loc26_33.5: init %i32 = initialize_from %.loc26_33.2 to %.loc26_33.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc26_33.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc26_33.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_33.3: = bound_method %int_2, %impl.elem0.loc26_33.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc26_33.2: = specific_function %impl.elem0.loc26_33.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_33.4: = bound_method %int_2, %specific_fn.loc26_33.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index 5056acf0bf54..3f15b36cf89a 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -35,11 +35,12 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -99,7 +100,7 @@ fn G() -> i32 { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index ad914f2df795..982b50193bff 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -35,11 +35,12 @@ fn Run() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -104,7 +105,7 @@ fn Run() { // CHECK:STDOUT: %j.ref.loc18: %Class.elem = name_ref j, @Class.%.loc12_8 [concrete = @Class.%.loc12_8] // CHECK:STDOUT: %.loc18_4: ref %i32 = class_element_access %c.ref.loc18, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc18: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1, %specific_fn.loc18 [concrete = constants.%bound_method.9a1] @@ -115,7 +116,7 @@ fn Run() { // CHECK:STDOUT: %k.ref.loc19: %Class.elem = name_ref k, @Class.%.loc13_8 [concrete = @Class.%.loc13_8] // CHECK:STDOUT: %.loc19_4: ref %i32 = class_element_access %c.ref.loc19, element1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc19: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_7.1: = bound_method %int_2, %impl.elem0.loc19 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_7.2: = bound_method %int_2, %specific_fn.loc19 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index d8debbedc254..2334cb456a08 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -36,11 +36,12 @@ fn Test() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -105,7 +106,7 @@ fn Test() { // CHECK:STDOUT: %j.ref.loc18: %Class.elem = name_ref j, @Class.%.loc12_8 [concrete = @Class.%.loc12_8] // CHECK:STDOUT: %.loc18_5: ref %i32 = class_element_access %cv.ref.loc18, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc18: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_8.1: = bound_method %int_1, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_8.2: = bound_method %int_1, %specific_fn.loc18 [concrete = constants.%bound_method.9a1] @@ -116,7 +117,7 @@ fn Test() { // CHECK:STDOUT: %k.ref.loc19: %Class.elem = name_ref k, @Class.%.loc13_8 [concrete = @Class.%.loc13_8] // CHECK:STDOUT: %.loc19_5: ref %i32 = class_element_access %cv.ref.loc19, element1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc19: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_8.1: = bound_method %int_2, %impl.elem0.loc19 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_8.2: = bound_method %int_2, %specific_fn.loc19 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index ec992eb46241..82f29d066c42 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -105,11 +105,12 @@ class Outer(T:! type) { // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.a25: = bound_method %int_5.64b, %Convert.specific_fn [concrete] @@ -161,7 +162,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete = constants.%ptr.235] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc6: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_21.1: = bound_method %int_5, %impl.elem0.loc6 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_21.2: = bound_method %int_5, %specific_fn.loc6 [concrete = constants.%bound_method.a25] @@ -181,7 +182,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_15, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %impl.elem0.loc9: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_19.1: = bound_method %int_0, %impl.elem0.loc9 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_19.2: = bound_method %int_0, %specific_fn.loc9 [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index 12d7a919208e..e66a998b9aca 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -49,6 +49,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %A.generic: %A.type = struct_value () [concrete] // CHECK:STDOUT: %A.dd3: type = class_type @A, @A(%N.51e) [symbolic] // CHECK:STDOUT: %A.elem.500: type = unbound_element_type %A.dd3, %B [symbolic] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %Convert.bound.588: = bound_method %N.51e, %Convert.960 [symbolic] @@ -63,11 +64,11 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.2b8: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.2b8 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn.b6f [concrete] @@ -138,7 +139,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %.loc15_13: type = splice_block %ptr.loc15 [concrete = constants.%ptr.b65] { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc15_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 72ddbb983960..c3e1be69b5a0 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -105,11 +105,12 @@ class Class(U:! type) { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -208,7 +209,7 @@ class Class(U:! type) { // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -249,6 +250,7 @@ class Class(U:! type) { // CHECK:STDOUT: --- foo.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (imports.%Main.import_ref.773), @impl.a8d [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] @@ -278,11 +280,11 @@ class Class(U:! type) { // CHECK:STDOUT: %struct_type.n.44a: type = struct_type {.n: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.b9e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.ea0: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.847: = impl_witness (imports.%Main.import_ref.773), @impl.a8d(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness %ImplicitAs.impl_witness_table.1ad, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.2, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.4cb: %Convert.type.e14 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%impl_witness.847) [concrete] -// CHECK:STDOUT: %.419: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] +// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.4cb [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -393,7 +395,7 @@ class Class(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc9_17.1: %struct_type.n.44a = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc9_17.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_17.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 42976846c935..74ba8072bff0 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -338,11 +338,12 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %int_123.fff: Core.IntLiteral = int_value 123 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_123.fff, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_123.fff, %Convert.specific_fn [concrete] @@ -383,7 +384,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc13_13.1: type = splice_block %C [concrete = constants.%C.4c3] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_123, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_13.2: = bound_method %int_123, %specific_fn [concrete = constants.%bound_method] @@ -452,11 +453,12 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -510,7 +512,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc25_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc25_25.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc25_25.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_25.1: = bound_method %int_1, %impl.elem0.loc25_25.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc25_25.1: = specific_function %impl.elem0.loc25_25.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.2: = bound_method %int_1, %specific_fn.loc25_25.1 [concrete = constants.%bound_method.9a1] @@ -519,7 +521,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_25.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc25_25.4: ref %i32 = class_element_access %.loc25_25.3, element0 // CHECK:STDOUT: %.loc25_25.5: init %i32 = initialize_from %.loc25_25.2 to %.loc25_25.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc25_25.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc25_25.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_25.3: = bound_method %int_2, %impl.elem0.loc25_25.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc25_25.2: = specific_function %impl.elem0.loc25_25.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.4: = bound_method %int_2, %specific_fn.loc25_25.2 [concrete = constants.%bound_method.b92] @@ -580,7 +582,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc25_53.1: %struct_type.a.b.cfd = struct_literal (%int_3, %int_4) // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %impl.elem0.loc25_53.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc25_53.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_53.1: = bound_method %int_3, %impl.elem0.loc25_53.1 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc25_53.1: = specific_function %impl.elem0.loc25_53.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_53.2: = bound_method %int_3, %specific_fn.loc25_53.1 [concrete = constants.%bound_method.047] @@ -589,7 +591,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_53.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc25_53.4: ref %i32 = class_element_access %.loc25_53.3, element0 // CHECK:STDOUT: %.loc25_53.5: init %i32 = initialize_from %.loc25_53.2 to %.loc25_53.4 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc25_53.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc25_53.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_53.3: = bound_method %int_4, %impl.elem0.loc25_53.2 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc25_53.2: = specific_function %impl.elem0.loc25_53.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_53.4: = bound_method %int_4, %specific_fn.loc25_53.2 [concrete = constants.%bound_method.1da] diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 41a44a22d312..5d260cbd0207 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -174,11 +174,12 @@ fn Run() { // CHECK:STDOUT: %struct_type.x.c96: type = struct_type {.x: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.b97: = impl_witness (imports.%Core.import_ref.a86), @impl.c81(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.e36 = impl_witness_table (imports.%Core.import_ref.a86), @impl.c81 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness %ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%impl_witness.b97) [concrete] -// CHECK:STDOUT: %.b14: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.43e: = bound_method %int_1.5b8, %Convert.16d [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.947: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -294,7 +295,7 @@ fn Run() { // CHECK:STDOUT: %b.var: ref %Field = var b // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc9_25.1: %struct_type.x.c96 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc9: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0.loc9: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc9_25.1: = bound_method %int_1, %impl.elem0.loc9 [concrete = constants.%Convert.bound.43e] // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_25.2: = bound_method %int_1, %specific_fn.loc9 [concrete = constants.%bound_method.947] @@ -311,7 +312,7 @@ fn Run() { // CHECK:STDOUT: %x.ref: %Field.elem = name_ref x, imports.%Main.import_ref.4d2 [concrete = imports.%.d33] // CHECK:STDOUT: %.loc10_4: ref %i32 = class_element_access %b.ref, element0 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc10: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0.loc10: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc10_7.1: = bound_method %int_2, %impl.elem0.loc10 [concrete = constants.%Convert.bound.918] // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_7.2: = bound_method %int_2, %specific_fn.loc10 [concrete = constants.%bound_method.c74] @@ -367,5 +368,5 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %ForwardDeclared.7b34f2.1]() [from "a.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr .inst1144: %ptr.6cf]() [from "a.carbon"]; +// CHECK:STDOUT: fn @G[addr .inst1161: %ptr.6cf]() [from "a.carbon"]; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index d87942c5cc3f..bd0c0102933f 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -151,11 +151,12 @@ fn Run() { // CHECK:STDOUT: %struct_type.base.6c7: type = struct_type {.base: %struct_type.x.unused.c45} [concrete] // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.b97: = impl_witness (imports.%Core.import_ref.a86), @impl.c81(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.e36 = impl_witness_table (imports.%Core.import_ref.a86), @impl.c81 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness %ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%impl_witness.b97) [concrete] -// CHECK:STDOUT: %.b14: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.9aa: = bound_method %int_0.5c6, %Convert.16d [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.8aa: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -239,7 +240,7 @@ fn Run() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc7_47.1: %struct_type.x.unused.c45 = struct_literal (%int_0, %int_1) // CHECK:STDOUT: %.loc7_48.1: %struct_type.base.6c7 = struct_literal (%.loc7_47.1) -// CHECK:STDOUT: %impl.elem0.loc7_47.1: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0.loc7_47.1: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc7_47.1: = bound_method %int_0, %impl.elem0.loc7_47.1 [concrete = constants.%Convert.bound.9aa] // CHECK:STDOUT: %specific_fn.loc7_47.1: = specific_function %impl.elem0.loc7_47.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_47.2: = bound_method %int_0, %specific_fn.loc7_47.1 [concrete = constants.%bound_method.8aa] @@ -248,7 +249,7 @@ fn Run() { // CHECK:STDOUT: %.loc7_48.2: ref %Base = class_element_access %a.var, element0 // CHECK:STDOUT: %.loc7_47.3: ref %i32 = class_element_access %.loc7_48.2, element0 // CHECK:STDOUT: %.loc7_47.4: init %i32 = initialize_from %.loc7_47.2 to %.loc7_47.3 [concrete = constants.%int_0.263] -// CHECK:STDOUT: %impl.elem0.loc7_47.2: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0.loc7_47.2: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc7_47.3: = bound_method %int_1, %impl.elem0.loc7_47.2 [concrete = constants.%Convert.bound.43e] // CHECK:STDOUT: %specific_fn.loc7_47.2: = specific_function %impl.elem0.loc7_47.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_47.4: = bound_method %int_1, %specific_fn.loc7_47.2 [concrete = constants.%bound_method.947] @@ -269,7 +270,7 @@ fn Run() { // CHECK:STDOUT: %.loc8_4.2: ref %Base = converted %a.ref.loc8, %.loc8_4.1 // CHECK:STDOUT: %.loc8_4.3: ref %i32 = class_element_access %.loc8_4.2, element0 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc8: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0.loc8: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc8_7.1: = bound_method %int_2, %impl.elem0.loc8 [concrete = constants.%Convert.bound.918] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_7.2: = bound_method %int_2, %specific_fn.loc8 [concrete = constants.%bound_method.c74] diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 6381fd928a1b..2327db294de8 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -482,11 +482,12 @@ class B { // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] @@ -534,7 +535,7 @@ class B { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_38.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_38.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] @@ -599,7 +600,7 @@ class B { // CHECK:STDOUT: fn @SomeProtectedFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] @@ -983,11 +984,12 @@ class B { // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] @@ -1036,7 +1038,7 @@ class B { // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc5: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_48.1: = bound_method %int_5.loc5, %impl.elem0.loc5 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_48.2: = bound_method %int_5.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] @@ -1052,7 +1054,7 @@ class B { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc6: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_44.1: = bound_method %int_5.loc6, %impl.elem0.loc6 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_44.2: = bound_method %int_5.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] @@ -1079,7 +1081,7 @@ class B { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_42.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_42.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 8c995edf1dc0..ba6bb70e5c9d 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -33,11 +33,12 @@ fn F() -> i32 { // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -103,7 +104,7 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc17_26.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %impl.elem0.loc17_26.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_26.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_26.1: = bound_method %int_1, %impl.elem0.loc17_26.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc17_26.1: = specific_function %impl.elem0.loc17_26.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_26.2: = bound_method %int_1, %specific_fn.loc17_26.1 [concrete = constants.%bound_method.9a1] @@ -112,7 +113,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc17_26.3: ref %Class = temporary_storage // CHECK:STDOUT: %.loc17_26.4: ref %i32 = class_element_access %.loc17_26.3, element0 // CHECK:STDOUT: %.loc17_26.5: init %i32 = initialize_from %.loc17_26.2 to %.loc17_26.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_26.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_26.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_26.3: = bound_method %int_2, %impl.elem0.loc17_26.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc17_26.2: = specific_function %impl.elem0.loc17_26.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_26.4: = bound_method %int_2, %specific_fn.loc17_26.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/class/local.carbon b/toolchain/check/testdata/class/local.carbon index dcd51340886e..b450ef89e18a 100644 --- a/toolchain/check/testdata/class/local.carbon +++ b/toolchain/check/testdata/class/local.carbon @@ -43,11 +43,12 @@ class A { // CHECK:STDOUT: %struct_type.n.44a: type = struct_type {.n: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -138,7 +139,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc15_39.1: %struct_type.n.44a = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_39.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_39.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 5589efe876f4..54b142a8a5dc 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -82,11 +82,12 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %struct_type.k.240: type = struct_type {.k: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -343,7 +344,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc35_18.1: %struct_type.k.240 = struct_literal (%int_1) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc35_18.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc35_18.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index 848ab0919ba8..cfa78fb15815 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -33,11 +33,12 @@ class Class { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -105,7 +106,7 @@ class Class { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 53362e3bcb36..0cbdbd038fd7 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -82,11 +82,12 @@ class A { // CHECK:STDOUT: %struct_type.a.a6c: type = struct_type {.a: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -237,7 +238,7 @@ class A { // CHECK:STDOUT: %a.var: ref %A = var a // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc29_25.1: %struct_type.a.a6c = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc29: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_25.1: = bound_method %int_1, %impl.elem0.loc29 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_25.2: = bound_method %int_1, %specific_fn.loc29 [concrete = constants.%bound_method.9a1] @@ -257,7 +258,7 @@ class A { // CHECK:STDOUT: %b.var: ref %B = var b // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc30_25.1: %struct_type.b.a15 = struct_literal (%int_2) -// CHECK:STDOUT: %impl.elem0.loc30: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc30: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc30_25.1: = bound_method %int_2, %impl.elem0.loc30 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_25.2: = bound_method %int_2, %specific_fn.loc30 [concrete = constants.%bound_method.b92] @@ -277,7 +278,7 @@ class A { // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc31_25.1: %struct_type.c.5b8 = struct_literal (%int_3) -// CHECK:STDOUT: %impl.elem0.loc31: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc31: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc31_25.1: = bound_method %int_3, %impl.elem0.loc31 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc31_25.2: = bound_method %int_3, %specific_fn.loc31 [concrete = constants.%bound_method.047] @@ -297,7 +298,7 @@ class A { // CHECK:STDOUT: %d.var: ref %D = var d // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc32_25.1: %struct_type.d.3ea = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0.loc32: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc32_25.1: = bound_method %int_4, %impl.elem0.loc32 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_25.2: = bound_method %int_4, %specific_fn.loc32 [concrete = constants.%bound_method.1da] diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index 6039bfb31d86..f383591a9ac6 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -42,11 +42,12 @@ fn Run() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -123,7 +124,7 @@ fn Run() { // CHECK:STDOUT: fn @F.1() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] @@ -145,7 +146,7 @@ fn Run() { // CHECK:STDOUT: fn @F.2() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_11.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_11.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index 8627f35051d2..0f72b2847fb1 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -54,11 +54,12 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -206,7 +207,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12_8 [concrete = @Base.%.loc12_8] // CHECK:STDOUT: %.loc27_10: ref %i32 = class_element_access %.loc27_4, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc27_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index a16e01da4ac1..c9447303dfd5 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -46,11 +46,12 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %int_1000.ff9: Core.IntLiteral = int_value 1000 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.ff9, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1000.ff9, %Convert.specific_fn [concrete] @@ -94,7 +95,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc5_20.1: type = splice_block %C.loc5 [concrete = constants.%C.262] { // CHECK:STDOUT: %C.ref.loc5: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc5: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] -// CHECK:STDOUT: %impl.elem0.loc5: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_20.1: = bound_method %int_1000.loc5, %impl.elem0.loc5 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_20.2: = bound_method %int_1000.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] @@ -111,7 +112,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc6_20.1: type = splice_block %C.loc6 [concrete = constants.%C.262] { // CHECK:STDOUT: %C.ref.loc6: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc6: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] -// CHECK:STDOUT: %impl.elem0.loc6: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_20.1: = bound_method %int_1000.loc6, %impl.elem0.loc6 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_20.2: = bound_method %int_1000.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] @@ -186,11 +187,12 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %int_1000.ff9: Core.IntLiteral = int_value 1000 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.ff9, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1000.ff9, %Convert.specific_fn [concrete] @@ -236,7 +238,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc5_19.1: type = splice_block %C [concrete = constants.%C.262] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_19.1: = bound_method %int_1000, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_19.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] @@ -253,7 +255,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc13_20.1: type = splice_block %C [concrete = constants.%C.262] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_20.1: = bound_method %int_1000, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_20.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 5041ff9d8660..588dfce6828f 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -978,11 +978,12 @@ class T2 { // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] @@ -1060,7 +1061,7 @@ class T2 { // CHECK:STDOUT: } // CHECK:STDOUT: %i.var: ref %i32 = var i // CHECK:STDOUT: %int_3.loc12: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_3.loc12, %impl.elem0.loc12 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_3.loc12, %specific_fn.loc12 [concrete = constants.%bound_method.047] @@ -1105,7 +1106,7 @@ class T2 { // CHECK:STDOUT: %.loc15_35.2: ref %ptr.454 = class_element_access %b2.var, element0 // CHECK:STDOUT: %.loc15_35.3: ref %ptr.454 = vtable_ptr @Base.%.loc9 // CHECK:STDOUT: %.loc15_35.4: init %ptr.454 = initialize_from %.loc15_35.3 to %.loc15_35.2 -// CHECK:STDOUT: %impl.elem0.loc15_35.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15_35.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_35.1: = bound_method %int_5, %impl.elem0.loc15_35.1 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn.loc15_35.1: = specific_function %impl.elem0.loc15_35.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_35.2: = bound_method %int_5, %specific_fn.loc15_35.1 [concrete = constants.%bound_method.a25] @@ -1113,7 +1114,7 @@ class T2 { // CHECK:STDOUT: %.loc15_35.5: init %i32 = converted %int_5, %int.convert_checked.loc15_35.1 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc15_35.6: ref %i32 = class_element_access %b2.var, element2 // CHECK:STDOUT: %.loc15_35.7: init %i32 = initialize_from %.loc15_35.5 to %.loc15_35.6 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %impl.elem0.loc15_35.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15_35.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_35.3: = bound_method %int_3.loc15, %impl.elem0.loc15_35.2 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc15_35.2: = specific_function %impl.elem0.loc15_35.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_35.4: = bound_method %int_3.loc15, %specific_fn.loc15_35.2 [concrete = constants.%bound_method.047] @@ -1130,7 +1131,7 @@ class T2 { // CHECK:STDOUT: %m2.ref: %Base.elem = name_ref m2, @Base.%.loc6_9 [concrete = @Base.%.loc6_9] // CHECK:STDOUT: %.loc18_5: ref %i32 = class_element_access %b1.ref, element2 // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc18: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_9.1: = bound_method %int_4, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_9.2: = bound_method %int_4, %specific_fn.loc18 [concrete = constants.%bound_method.1da] @@ -1524,7 +1525,7 @@ class T2 { // 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.e40: type = facet_type <@ImplicitAs, @ImplicitAs(%T1)> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness file.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %Convert.type.c41: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.f35: %Convert.type.c41 = struct_value () [concrete] // CHECK:STDOUT: %T1.val: %T1 = struct_value () [concrete] @@ -1571,7 +1572,8 @@ class T2 { // CHECK:STDOUT: %T1.ref: type = name_ref T1, file.%T1.decl [concrete = constants.%T1] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T1)> [concrete = constants.%ImplicitAs.type.e40] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Convert.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (@impl.%Convert.decl), @impl [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness] // CHECK:STDOUT: %Base.decl: type = class_decl @Base [concrete = constants.%Base] {} {} // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [concrete = constants.%Derived] {} {} // CHECK:STDOUT: } @@ -1594,7 +1596,7 @@ class T2 { // CHECK:STDOUT: !members: // CHECK:STDOUT: .T1 = // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @T1 { diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 0e3952bb6853..e169292c5730 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -140,11 +140,12 @@ fn G() -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -232,7 +233,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_48.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -321,11 +322,12 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.d82: = require_complete_type %array_type.6a2 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.41f: = bound_method %N, %Convert.956 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.ad4: = bound_method %N, %Convert.specific_fn [symbolic] @@ -428,7 +430,7 @@ fn G() -> i32 { // CHECK:STDOUT: fn[%N.patt.loc6_6.1: Core.IntLiteral](%a.param_patt: @F.%array_type.loc6_42.2 (%array_type.6a2)) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc6_61: Core.IntLiteral = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N)] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_62.1: = bound_method %N.ref.loc6_61, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound.41f)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_62.2: = bound_method %N.ref.loc6_61, %specific_fn [symbolic = %bound_method.loc6_62.3 (constants.%bound_method.ad4)] @@ -677,11 +679,12 @@ fn G() -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -770,7 +773,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_48.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -860,11 +863,12 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.d82: = require_complete_type %array_type.6a2 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.41f: = bound_method %N, %Convert.956 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.ad4: = bound_method %N, %Convert.specific_fn [symbolic] @@ -979,7 +983,7 @@ fn G() -> i32 { // CHECK:STDOUT: fn[%N.patt.loc7_6.1: Core.IntLiteral](%a.param_patt: @F.%array_type.loc7_42.2 (%array_type.6a2)) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc7_61: Core.IntLiteral = name_ref N, %N.loc7_6.1 [symbolic = %N.loc7_6.2 (constants.%N)] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_62.1: = bound_method %N.ref.loc7_61, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound.41f)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_62.2: = bound_method %N.ref.loc7_61, %specific_fn [symbolic = %bound_method.loc7_62.3 (constants.%bound_method.ad4)] @@ -1062,11 +1066,12 @@ fn G() -> i32 { // CHECK:STDOUT: %N.patt.8e2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %N.51e, %Convert.960 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.51e, %Convert.specific_fn [symbolic] @@ -1123,7 +1128,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc6_28: type = splice_block %array_type.loc6_28.1 [symbolic = %array_type.loc6_28.2 (constants.%array_type.b2f)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %N.ref.loc6_27: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.51e)] -// CHECK:STDOUT: %impl.elem0: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc6_27.1: = bound_method %N.ref.loc6_27, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_27.2: = bound_method %N.ref.loc6_27, %specific_fn [symbolic = %bound_method.loc6_27.3 (constants.%bound_method)] diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 4cf5c90162d3..1972c88cbd9a 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -743,11 +743,12 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -855,7 +856,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_13.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [concrete = constants.%WithNontype.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_31.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_31.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index 111eb02a4080..5db0e932dc71 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -246,11 +246,12 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -343,14 +344,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc8_22.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc8_22.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc8_22.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_22.1: = bound_method %int_1, %impl.elem0.loc8_22.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc8_22.1: = specific_function %impl.elem0.loc8_22.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.2: = bound_method %int_1, %specific_fn.loc8_22.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %bound_method.loc8_22.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.2: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.3: %i32 = converted %int_1, %.loc8_22.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc8_22.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc8_22.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_22.3: = bound_method %int_2, %impl.elem0.loc8_22.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc8_22.2: = specific_function %impl.elem0.loc8_22.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.4: = bound_method %int_2, %specific_fn.loc8_22.2 [concrete = constants.%bound_method.b92] 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 17d0afe66399..5bae1e0466cd 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -665,11 +665,12 @@ fn G() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -736,7 +737,7 @@ fn G() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_48.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index d781158da052..5b44d4cca794 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -28,11 +28,12 @@ var struct_access: array(i32, 1) = (0,) as array(i32, {.a = 3, .b = 1}.b); // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -150,14 +151,14 @@ var struct_access: array(i32, 1) = (0,) as array(i32, {.a = 3, .b = 1}.b); // CHECK:STDOUT: %i32.loc11_46: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc11_49.1: %tuple.type.24b = tuple_literal (%i32.loc11_41, %i32.loc11_46) // CHECK:STDOUT: %.loc11_49.2: type = converted %.loc11_49.1, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] -// CHECK:STDOUT: %impl.elem0.loc11_35.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_35.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_35.1: = bound_method %int_1.loc11, %impl.elem0.loc11_35.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11_35.1: = specific_function %impl.elem0.loc11_35.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_35.2: = bound_method %int_1.loc11, %specific_fn.loc11_35.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %bound_method.loc11_35.2(%int_1.loc11) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc11_35.2: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc11_35.3: %i32 = converted %int_1.loc11, %.loc11_35.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_35.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_35.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_35.3: = bound_method %int_2.loc11, %impl.elem0.loc11_35.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_35.2: = specific_function %impl.elem0.loc11_35.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_35.4: = bound_method %int_2.loc11, %specific_fn.loc11_35.2 [concrete = constants.%bound_method.b92] @@ -186,21 +187,21 @@ var struct_access: array(i32, 1) = (0,) as array(i32, {.a = 3, .b = 1}.b); // CHECK:STDOUT: %int_32.loc13_99: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc13_99: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [concrete = constants.%struct_type.b.a.c] -// CHECK:STDOUT: %impl.elem0.loc13_71.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_71.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_71.1: = bound_method %int_2.loc13, %impl.elem0.loc13_71.1 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc13_71.1: = specific_function %impl.elem0.loc13_71.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_71.2: = bound_method %int_2.loc13, %specific_fn.loc13_71.1 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %bound_method.loc13_71.2(%int_2.loc13) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc13_71.2: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc13_71.3: %i32 = converted %int_2.loc13, %.loc13_71.2 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc13_71.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_71.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_71.3: = bound_method %int_1.loc13, %impl.elem0.loc13_71.2 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc13_71.2: = specific_function %impl.elem0.loc13_71.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_71.4: = bound_method %int_1.loc13, %specific_fn.loc13_71.2 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %bound_method.loc13_71.4(%int_1.loc13) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_71.4: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_71.5: %i32 = converted %int_1.loc13, %.loc13_71.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_71.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_71.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_71.5: = bound_method %int_3.loc13, %impl.elem0.loc13_71.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc13_71.3: = specific_function %impl.elem0.loc13_71.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_71.6: = bound_method %int_3.loc13, %specific_fn.loc13_71.3 [concrete = constants.%bound_method.047] @@ -235,7 +236,7 @@ var struct_access: array(i32, 1) = (0,) as array(i32, {.a = 3, .b = 1}.b); // CHECK:STDOUT: %.loc15_64.2: %tuple.type.d46 = converted %.loc15_64.1, %tuple.loc15 [concrete = constants.%tuple.869] // CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc15_64.2, element2 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %array_type.loc15: type = array_type %tuple.elem2, %i32.loc15 [concrete = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc15: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_37.1: = bound_method %int_0.loc15_35, %impl.elem0.loc15 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_37.2: = bound_method %int_0.loc15_35, %specific_fn.loc15 [concrete = constants.%bound_method.b6e] @@ -259,7 +260,7 @@ var struct_access: array(i32, 1) = (0,) as array(i32, {.a = 3, .b = 1}.b); // CHECK:STDOUT: %.loc17_70.2: %struct_type.a.b = converted %.loc17_70.1, %struct.loc17 [concrete = constants.%struct.a81] // CHECK:STDOUT: %.loc17_71: Core.IntLiteral = struct_access %.loc17_70.2, element1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %array_type.loc17: type = array_type %.loc17_71, %i32.loc17 [concrete = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc17: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_39.1: = bound_method %int_0.loc17_37, %impl.elem0.loc17 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_39.2: = bound_method %int_0.loc17_37, %specific_fn.loc17 [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index b16e7595db81..cbddbc35b12e 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -33,11 +33,12 @@ var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, // CHECK:STDOUT: %array_type.f32: type = array_type %int_4, %i32 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.a25: = bound_method %int_5.64b, %Convert.specific_fn [concrete] @@ -103,7 +104,7 @@ var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, // CHECK:STDOUT: %i32.loc17_76: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %array_type: type = array_type %int_4, %i32.loc17_76 [concrete = constants.%array_type.f32] -// CHECK:STDOUT: %impl.elem0.loc17_65.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_65.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_65.1: = bound_method %int_5, %impl.elem0.loc17_65.1 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn.loc17_65.1: = specific_function %impl.elem0.loc17_65.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_65.2: = bound_method %int_5, %specific_fn.loc17_65.1 [concrete = constants.%bound_method.a25] @@ -113,7 +114,7 @@ var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, // CHECK:STDOUT: %int_0.loc17_65: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc17_65.4: ref %i32 = array_index %.loc17_65.3, %int_0.loc17_65 // CHECK:STDOUT: %.loc17_65.5: init %i32 = initialize_from %.loc17_65.2 to %.loc17_65.4 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %impl.elem0.loc17_65.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_65.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_65.3: = bound_method %int_7, %impl.elem0.loc17_65.2 [concrete = constants.%Convert.bound.208] // CHECK:STDOUT: %specific_fn.loc17_65.2: = specific_function %impl.elem0.loc17_65.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_65.4: = bound_method %int_7, %specific_fn.loc17_65.2 [concrete = constants.%bound_method.3bd] @@ -122,7 +123,7 @@ var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, // CHECK:STDOUT: %int_1.loc17_65: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc17_65.7: ref %i32 = array_index %.loc17_65.3, %int_1.loc17_65 // CHECK:STDOUT: %.loc17_65.8: init %i32 = initialize_from %.loc17_65.6 to %.loc17_65.7 [concrete = constants.%int_7.0b1] -// CHECK:STDOUT: %impl.elem0.loc17_65.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_65.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_65.5: = bound_method %int_1.loc17_61, %impl.elem0.loc17_65.3 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc17_65.3: = specific_function %impl.elem0.loc17_65.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_65.6: = bound_method %int_1.loc17_61, %specific_fn.loc17_65.3 [concrete = constants.%bound_method.9a1] @@ -131,7 +132,7 @@ var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, // CHECK:STDOUT: %int_2.loc17_65: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc17_65.10: ref %i32 = array_index %.loc17_65.3, %int_2.loc17_65 // CHECK:STDOUT: %.loc17_65.11: init %i32 = initialize_from %.loc17_65.9 to %.loc17_65.10 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_65.4: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_65.4: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_65.7: = bound_method %int_9, %impl.elem0.loc17_65.4 [concrete = constants.%Convert.bound.9e2] // CHECK:STDOUT: %specific_fn.loc17_65.4: = specific_function %impl.elem0.loc17_65.4, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_65.8: = bound_method %int_9, %specific_fn.loc17_65.4 [concrete = constants.%bound_method.cd3] @@ -146,7 +147,7 @@ var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, // CHECK:STDOUT: %.loc17_67.2: ref %array_type.f32 = temporary %.loc17_65.3, %.loc17_67.1 // CHECK:STDOUT: %int_32.loc17_86: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc17_86: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17_85: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_85: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_85.1: = bound_method %int_2.loc17_85, %impl.elem0.loc17_85 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc17_85: = specific_function %impl.elem0.loc17_85, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_85.2: = bound_method %int_2.loc17_85, %specific_fn.loc17_85 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon index 04f6fc8f8b9d..df26257c99f1 100644 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ b/toolchain/check/testdata/eval/symbolic.carbon @@ -44,11 +44,12 @@ fn G(N:! i32) { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %N.51e, %Convert.960 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.51e, %Convert.specific_fn [symbolic] @@ -166,7 +167,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc18_6.1 [symbolic = %N.loc18_6.2 (constants.%N.51e)] -// CHECK:STDOUT: %impl.elem0: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc19_21.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_21.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc19_21.3 (constants.%bound_method)] diff --git a/toolchain/check/testdata/facet/min_prelude/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/min_prelude/call_combined_impl_witness.carbon index d8c3773abdef..821b6e617e6d 100644 --- a/toolchain/check/testdata/facet/min_prelude/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/min_prelude/call_combined_impl_witness.carbon @@ -65,15 +65,15 @@ fn F() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] -// CHECK:STDOUT: %impl_witness.97a: = impl_witness (@impl.77d.%AA.decl) [concrete] +// CHECK:STDOUT: %Empty.impl_witness: = impl_witness file.%Empty.impl_witness_table [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness file.%A.impl_witness_table [concrete] // CHECK:STDOUT: %AA.type.c29: type = fn_type @AA.2 [concrete] // CHECK:STDOUT: %AA.95d: %AA.type.c29 = struct_value () [concrete] -// CHECK:STDOUT: %A.facet.213: %A.type = facet_value %C, (%impl_witness.97a) [concrete] -// CHECK:STDOUT: %impl_witness.fe4: = impl_witness (@impl.c94.%BB.decl) [concrete] +// CHECK:STDOUT: %A.facet.66c: %A.type = facet_value %C, (%A.impl_witness) [concrete] +// CHECK:STDOUT: %B.impl_witness: = impl_witness file.%B.impl_witness_table [concrete] // CHECK:STDOUT: %BB.type.24d: type = fn_type @BB.2 [concrete] // CHECK:STDOUT: %BB.fe8: %BB.type.24d = struct_value () [concrete] -// CHECK:STDOUT: %B.facet.f74: %B.type = facet_value %C, (%impl_witness.fe4) [concrete] +// CHECK:STDOUT: %B.facet.82f: %B.type = facet_value %C, (%B.impl_witness) [concrete] // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] // CHECK:STDOUT: %Self.25f: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type @BitAnd [concrete] @@ -82,17 +82,17 @@ fn F() { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T.8b3) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl.f92 [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T.8b3) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl.f92(%T.8b3) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T.8b3) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type.473: = complete_type_witness type [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.3ea) [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete] +// CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.bound.6b1: = bound_method %A.type, %Op.444 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.444, @Op.2(type) [concrete] // CHECK:STDOUT: %bound_method.96c: = bound_method %A.type, %Op.specific_fn [concrete] @@ -119,10 +119,10 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %facet_value: %facet_type.242 = facet_value %C, (%impl_witness.1bc, %impl_witness.97a, %impl_witness.fe4) [concrete] +// CHECK:STDOUT: %facet_value: %facet_type.242 = facet_value %C, (%Empty.impl_witness, %A.impl_witness, %B.impl_witness) [concrete] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%facet_value) [concrete] -// CHECK:STDOUT: %.4b2: type = fn_type_with_self_type %AA.type.b97, %A.facet.213 [concrete] -// CHECK:STDOUT: %.2b4: type = fn_type_with_self_type %BB.type.64d, %B.facet.f74 [concrete] +// CHECK:STDOUT: %.7ab: type = fn_type_with_self_type %AA.type.b97, %A.facet.66c [concrete] +// CHECK:STDOUT: %.b43: type = fn_type_with_self_type %BB.type.64d, %B.facet.82f [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -134,11 +134,10 @@ fn F() { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0.d45] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.f92.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.f92.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -161,17 +160,20 @@ fn F() { // 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: %impl_witness.loc24: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %Empty.impl_witness_table = impl_witness_table (), @impl.d78 [concrete] +// CHECK:STDOUT: %Empty.impl_witness: = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness] // CHECK:STDOUT: impl_decl @impl.77d [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc25: = impl_witness (@impl.77d.%AA.decl) [concrete = constants.%impl_witness.97a] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@impl.77d.%AA.decl), @impl.77d [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: impl_decl @impl.c94 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc28: = impl_witness (@impl.c94.%BB.decl) [concrete = constants.%impl_witness.fe4] +// CHECK:STDOUT: %B.impl_witness_table = impl_witness_table (@impl.c94.%BB.decl), @impl.c94 [concrete] +// CHECK:STDOUT: %B.impl_witness: = impl_witness %B.impl_witness_table [concrete = constants.%B.impl_witness] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt.loc32_6.1: %facet_type.242 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc32_6.2 (constants.%T.patt.fd9)] // CHECK:STDOUT: %t.patt: @G.%T.as_type.loc32_28.2 (%T.as_type) = binding_pattern t @@ -180,13 +182,13 @@ fn F() { // CHECK:STDOUT: %.loc32_20.1: type = splice_block %.loc32_20.3 [concrete = constants.%facet_type.242] { // CHECK:STDOUT: %A.ref.loc32: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] -// CHECK:STDOUT: %impl.elem0.loc32_12: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc32_12: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc32_12.1: = bound_method %A.ref.loc32, %impl.elem0.loc32_12 [concrete = constants.%Op.bound.6b1] // CHECK:STDOUT: %specific_fn.loc32_12: = specific_function %impl.elem0.loc32_12, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc32_12.2: = bound_method %A.ref.loc32, %specific_fn.loc32_12 [concrete = constants.%bound_method.96c] // CHECK:STDOUT: %type.and.loc32_12: init type = call %bound_method.loc32_12.2(%A.ref.loc32, %Empty.ref) [concrete = constants.%facet_type.d5f] // CHECK:STDOUT: %B.ref.loc32: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %impl.elem0.loc32_20: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc32_20: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc32_20.1: = bound_method %type.and.loc32_12, %impl.elem0.loc32_20 [concrete = constants.%Op.bound.b5b] // CHECK:STDOUT: %specific_fn.loc32_20: = specific_function %impl.elem0.loc32_20, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc32_20.2: = bound_method %type.and.loc32_12, %specific_fn.loc32_20 [concrete = constants.%bound_method.cb6] @@ -251,7 +253,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.d78: %C.ref as %Empty.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc24 +// CHECK:STDOUT: witness = file.%Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.77d: %C.ref as %A.ref { @@ -259,7 +261,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .AA = %AA.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc25 +// CHECK:STDOUT: witness = file.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c94: %C.ref as %B.ref { @@ -267,13 +269,13 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .BB = %BB.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc28 +// CHECK:STDOUT: witness = file.%B.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.e01)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -282,7 +284,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -415,9 +417,9 @@ fn F() { // CHECK:STDOUT: %.loc44_6.3: init %C = class_init (), %.loc44_6.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc44_6.4: ref %C = temporary %.loc44_6.2, %.loc44_6.3 // CHECK:STDOUT: %.loc44_8.1: ref %C = converted %.loc44_6.1, %.loc44_6.4 -// CHECK:STDOUT: %facet_value.loc44_12.1: %facet_type.242 = facet_value constants.%C, (constants.%impl_witness.1bc, constants.%impl_witness.97a, constants.%impl_witness.fe4) [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value.loc44_12.1: %facet_type.242 = facet_value constants.%C, (constants.%Empty.impl_witness, constants.%A.impl_witness, constants.%B.impl_witness) [concrete = constants.%facet_value] // CHECK:STDOUT: %.loc44_12.1: %facet_type.242 = converted constants.%C, %facet_value.loc44_12.1 [concrete = constants.%facet_value] -// CHECK:STDOUT: %facet_value.loc44_12.2: %facet_type.242 = facet_value constants.%C, (constants.%impl_witness.1bc, constants.%impl_witness.97a, constants.%impl_witness.fe4) [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value.loc44_12.2: %facet_type.242 = facet_value constants.%C, (constants.%Empty.impl_witness, constants.%A.impl_witness, constants.%B.impl_witness) [concrete = constants.%facet_value] // CHECK:STDOUT: %.loc44_12.2: %facet_type.242 = converted constants.%C, %facet_value.loc44_12.2 [concrete = constants.%facet_value] // CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%facet_value) [concrete = constants.%G.specific_fn] // CHECK:STDOUT: %.loc44_8.2: %C = bind_value %.loc44_8.1 @@ -429,9 +431,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @BB.1(constants.%Self.783) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @AA.1(constants.%A.facet.213) {} +// CHECK:STDOUT: specific @AA.1(constants.%A.facet.66c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @BB.1(constants.%B.facet.f74) {} +// CHECK:STDOUT: specific @BB.1(constants.%B.facet.82f) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Self.25f) { // CHECK:STDOUT: %Self => constants.%Self.25f @@ -441,7 +443,7 @@ fn F() { // CHECK:STDOUT: specific @impl.f92(constants.%T.8b3) { // CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %T.patt => constants.%T.patt.e01 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(%T) {} @@ -453,7 +455,7 @@ fn F() { // CHECK:STDOUT: specific @impl.f92(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt.e01 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -488,14 +490,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 -// CHECK:STDOUT: %T.as_wit.iface1.loc33_4.2 => constants.%impl_witness.97a -// CHECK:STDOUT: %A.facet.loc33 => constants.%A.facet.213 -// CHECK:STDOUT: %.loc33_4.2 => constants.%.4b2 +// CHECK:STDOUT: %T.as_wit.iface1.loc33_4.2 => constants.%A.impl_witness +// CHECK:STDOUT: %A.facet.loc33 => constants.%A.facet.66c +// CHECK:STDOUT: %.loc33_4.2 => constants.%.7ab // CHECK:STDOUT: %impl.elem0.loc33_4.2 => constants.%AA.95d // CHECK:STDOUT: %specific_impl_fn.loc33_4.2 => constants.%AA.95d -// CHECK:STDOUT: %T.as_wit.iface2.loc34_4.2 => constants.%impl_witness.fe4 -// CHECK:STDOUT: %B.facet.loc34 => constants.%B.facet.f74 -// CHECK:STDOUT: %.loc34_4.2 => constants.%.2b4 +// CHECK:STDOUT: %T.as_wit.iface2.loc34_4.2 => constants.%B.impl_witness +// CHECK:STDOUT: %B.facet.loc34 => constants.%B.facet.82f +// CHECK:STDOUT: %.loc34_4.2 => constants.%.b43 // CHECK:STDOUT: %impl.elem0.loc34_4.2 => constants.%BB.fe8 // CHECK:STDOUT: %specific_impl_fn.loc34_4.2 => constants.%BB.fe8 // CHECK:STDOUT: } @@ -532,11 +534,11 @@ fn F() { // CHECK:STDOUT: %assoc0.220: %BitAnd.assoc_type = assoc_entity element0, @BitAnd.%Op.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.type.28d: type = fn_type @Op.2, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.902: %Op.type.28d = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%impl_witness) [symbolic] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%BitAnd.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -563,7 +565,8 @@ fn F() { // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, file.%BitAnd.decl [concrete = constants.%BitAnd.type] // CHECK:STDOUT: %T.loc21_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(%Dest.loc9_14.1: type) { @@ -691,7 +694,7 @@ fn F() { // CHECK:STDOUT: generic impl @impl(%T.loc21_14.1: type) { // CHECK:STDOUT: %T.loc21_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc21_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%Op.decl), @impl(%T.loc21_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T.loc21_14.2) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T.loc21_14.2) [symbolic = %Op.type (constants.%Op.type.28d)] @@ -720,7 +723,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -797,7 +800,7 @@ fn F() { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc21_14.2) {} diff --git a/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon b/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon index 563dc02d272a..3a10321e0450 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon @@ -30,7 +30,7 @@ fn F() { // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] // CHECK:STDOUT: %A: %Animal.type = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %A.patt: %Animal.type = symbolic_binding_pattern A, 0 [symbolic] // CHECK:STDOUT: %WalkAnimal.type: type = fn_type @WalkAnimal [concrete] @@ -38,7 +38,7 @@ fn F() { // CHECK:STDOUT: %WalkAnimal: %WalkAnimal.type = struct_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%impl_witness) [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal, @WalkAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -63,7 +63,8 @@ fn F() { // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Animal.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: %WalkAnimal.decl: %WalkAnimal.type = fn_decl @WalkAnimal [concrete = constants.%WalkAnimal] { // CHECK:STDOUT: %A.patt.loc19_15.1: %Animal.type = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc19_15.2 (constants.%A.patt)] // CHECK:STDOUT: } { @@ -83,7 +84,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Goat.ref as %Animal.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Goat { @@ -111,7 +112,7 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %WalkAnimal.ref: %WalkAnimal.type = name_ref WalkAnimal, file.%WalkAnimal.decl [concrete = constants.%WalkAnimal] // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc22: %Animal.type = converted %Goat.ref, %Animal.facet [concrete = constants.%Animal.facet] // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal.ref, @WalkAnimal(constants.%Animal.facet) [concrete = constants.%WalkAnimal.specific_fn] // CHECK:STDOUT: %WalkAnimal.call: init %empty_tuple.type = call %WalkAnimal.specific_fn() diff --git a/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon index 67ab8559cb40..a1901ae4dbe7 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon @@ -85,10 +85,10 @@ fn G() { // CHECK:STDOUT: %F.118: %F.type.4cf = struct_value () [concrete] // CHECK:STDOUT: %Generic.assoc_type.713: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] // CHECK:STDOUT: %assoc0.9b7: %Generic.assoc_type.713 = assoc_entity element0, @Generic.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness file.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.17b: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.a56: %F.type.17b = struct_value () [concrete] -// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value %ImplsGeneric, (%impl_witness) [concrete] +// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.91ccba.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] @@ -99,7 +99,7 @@ fn G() { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %U.patt.8ea: %Generic.type.769 = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %CallGenericMethod.specific_fn.934: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet) [concrete] +// CHECK:STDOUT: %CallGenericMethod.specific_fn.2ff: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet) [concrete] // CHECK:STDOUT: %PassThroughToGenericMethod.type: type = fn_type @PassThroughToGenericMethod [concrete] // CHECK:STDOUT: %PassThroughToGenericMethod: %PassThroughToGenericMethod.type = struct_value () [concrete] // CHECK:STDOUT: %CallGenericMethod.specific_fn.a24: = specific_function %CallGenericMethod, @CallGenericMethod(%T, %U) [symbolic] @@ -139,7 +139,8 @@ fn G() { // CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [concrete = constants.%GenericParam] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%GenericParam)> [concrete = constants.%Generic.type.769] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Generic.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness %Generic.impl_witness_table [concrete = constants.%Generic.impl_witness] // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { // CHECK:STDOUT: %T.patt.loc15_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_22.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc15_32.1: @CallGenericMethod.%Generic.type.loc15_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_32.2 (constants.%U.patt.9a6)] @@ -197,7 +198,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @GenericParam { @@ -247,9 +248,9 @@ fn G() { // CHECK:STDOUT: %CallGenericMethod.ref: %CallGenericMethod.type = name_ref CallGenericMethod, file.%CallGenericMethod.decl [concrete = constants.%CallGenericMethod] // CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [concrete = constants.%GenericParam] // CHECK:STDOUT: %ImplsGeneric.ref: type = name_ref ImplsGeneric, file.%ImplsGeneric.decl [concrete = constants.%ImplsGeneric] -// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%impl_witness) [concrete = constants.%Generic.facet] +// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%Generic.impl_witness) [concrete = constants.%Generic.facet] // CHECK:STDOUT: %.loc18: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [concrete = constants.%Generic.facet] -// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) [concrete = constants.%CallGenericMethod.specific_fn.934] +// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) [concrete = constants.%CallGenericMethod.specific_fn.2ff] // CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -280,7 +281,7 @@ fn G() { // CHECK:STDOUT: %PassThroughToGenericMethod.ref: %PassThroughToGenericMethod.type = name_ref PassThroughToGenericMethod, file.%PassThroughToGenericMethod.decl [concrete = constants.%PassThroughToGenericMethod] // CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [concrete = constants.%GenericParam] // CHECK:STDOUT: %ImplsGeneric.ref: type = name_ref ImplsGeneric, file.%ImplsGeneric.decl [concrete = constants.%ImplsGeneric] -// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%impl_witness) [concrete = constants.%Generic.facet] +// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%Generic.impl_witness) [concrete = constants.%Generic.facet] // CHECK:STDOUT: %.loc26: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [concrete = constants.%Generic.facet] // CHECK:STDOUT: %PassThroughToGenericMethod.specific_fn: = specific_function %PassThroughToGenericMethod.ref, @PassThroughToGenericMethod(constants.%GenericParam, constants.%Generic.facet) [concrete = constants.%PassThroughToGenericMethod.specific_fn] // CHECK:STDOUT: %PassThroughToGenericMethod.call: init %empty_tuple.type = call %PassThroughToGenericMethod.specific_fn() @@ -358,7 +359,7 @@ fn G() { // CHECK:STDOUT: %U.patt.loc21_41.2 => constants.%U.patt.8ea // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc22_3.2 => constants.%CallGenericMethod.specific_fn.934 +// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc22_3.2 => constants.%CallGenericMethod.specific_fn.2ff // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- generic_facet_type_from_implicit_param.carbon @@ -385,10 +386,10 @@ fn G() { // CHECK:STDOUT: %F.118: %F.type.4cf = struct_value () [concrete] // CHECK:STDOUT: %Generic.assoc_type.713: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] // CHECK:STDOUT: %assoc0.9b7: %Generic.assoc_type.713 = assoc_entity element0, @Generic.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness file.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.17b: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.a56: %F.type.17b = struct_value () [concrete] -// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value %ImplsGeneric, (%impl_witness) [concrete] +// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.91ccba.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] @@ -433,7 +434,8 @@ fn G() { // CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [concrete = constants.%GenericParam] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%GenericParam)> [concrete = constants.%Generic.type.769] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Generic.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness %Generic.impl_witness_table [concrete = constants.%Generic.impl_witness] // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { // CHECK:STDOUT: %T.patt.loc15_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_22.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc15_32.1: @CallGenericMethod.%Generic.type.loc15_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_32.2 (constants.%U.patt.9a6)] @@ -483,7 +485,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @GenericParam { @@ -539,7 +541,7 @@ fn G() { // CHECK:STDOUT: %.loc18_36.3: init %GenericParam = class_init (), %.loc18_36.2 [concrete = constants.%GenericParam.val] // CHECK:STDOUT: %.loc18_36.4: ref %GenericParam = temporary %.loc18_36.2, %.loc18_36.3 // CHECK:STDOUT: %.loc18_38.1: ref %GenericParam = converted %.loc18_36.1, %.loc18_36.4 -// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%impl_witness) [concrete = constants.%Generic.facet] +// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%Generic.impl_witness) [concrete = constants.%Generic.facet] // CHECK:STDOUT: %.loc18_53: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [concrete = constants.%Generic.facet] // CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) [concrete = constants.%CallGenericMethod.specific_fn] // CHECK:STDOUT: %.loc18_38.2: %GenericParam = bind_value %.loc18_38.1 diff --git a/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon b/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon index 8d1394be5d01..3c76932f0c44 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon @@ -37,11 +37,11 @@ fn F() { // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%impl_witness) [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal, @WalkAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -81,7 +81,8 @@ fn F() { // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Animal.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -95,7 +96,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Goat.ref as %Animal.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Goat { @@ -130,9 +131,9 @@ fn F() { // CHECK:STDOUT: %.loc22_15.3: init %Goat = class_init (), %.loc22_15.2 [concrete = constants.%Goat.val] // CHECK:STDOUT: %.loc22_15.4: ref %Goat = temporary %.loc22_15.2, %.loc22_15.3 // CHECK:STDOUT: %.loc22_17.1: ref %Goat = converted %.loc22_15.1, %.loc22_15.4 -// CHECK:STDOUT: %Animal.facet.loc22_24.1: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc22_24.1: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc22_24.1: %Animal.type = converted constants.%Goat, %Animal.facet.loc22_24.1 [concrete = constants.%Animal.facet] -// CHECK:STDOUT: %Animal.facet.loc22_24.2: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc22_24.2: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc22_24.2: %Animal.type = converted constants.%Goat, %Animal.facet.loc22_24.2 [concrete = constants.%Animal.facet] // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal.ref, @WalkAnimal(constants.%Animal.facet) [concrete = constants.%WalkAnimal.specific_fn] // CHECK:STDOUT: %.loc22_17.2: %Goat = bind_value %.loc22_17.1 diff --git a/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_generic_facet_value_value.carbon index 35dc402cbb25..3fc7db56d7a5 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_generic_facet_value_value.carbon @@ -117,10 +117,10 @@ fn B() { // CHECK:STDOUT: %F.118: %F.type.4cf = struct_value () [concrete] // CHECK:STDOUT: %Generic.assoc_type.713: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] // CHECK:STDOUT: %assoc0.9b7: %Generic.assoc_type.713 = assoc_entity element0, @Generic.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness file.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.17b: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.a56: %F.type.17b = struct_value () [concrete] -// CHECK:STDOUT: %Generic.facet.8bd: %Generic.type.769 = facet_value %ImplsGeneric, (%impl_witness) [concrete] +// CHECK:STDOUT: %Generic.facet.8ff: %Generic.type.769 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.91ccba.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] @@ -147,9 +147,9 @@ fn B() { // CHECK:STDOUT: %ImplsGeneric.val: %ImplsGeneric = struct_value () [concrete] // CHECK:STDOUT: %GenericParam.val: %GenericParam = struct_value () [concrete] // CHECK:STDOUT: %U.patt.8ea: %Generic.type.769 = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet.8bd) [concrete] +// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet.8ff) [concrete] // CHECK:STDOUT: %complete_type.997: = complete_type_witness %Generic.type.769 [concrete] -// CHECK:STDOUT: %.1eb: type = fn_type_with_self_type %F.type.4cf, %Generic.facet.8bd [concrete] +// CHECK:STDOUT: %.3e6: type = fn_type_with_self_type %F.type.4cf, %Generic.facet.8ff [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -181,7 +181,8 @@ fn B() { // CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [concrete = constants.%GenericParam] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%GenericParam)> [concrete = constants.%Generic.type.769] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Generic.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness %Generic.impl_witness_table [concrete = constants.%Generic.impl_witness] // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { // CHECK:STDOUT: %T.patt.loc15_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_22.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc15_32.1: @CallGenericMethod.%Generic.type.loc15_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_32.2 (constants.%U.patt.9a6)] @@ -240,7 +241,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @GenericParam { @@ -321,9 +322,9 @@ fn B() { // CHECK:STDOUT: %.loc20_42.3: init %GenericParam = class_init (), %.loc20_42.2 [concrete = constants.%GenericParam.val] // CHECK:STDOUT: %.loc20_42.4: ref %GenericParam = temporary %.loc20_42.2, %.loc20_42.3 // CHECK:STDOUT: %.loc20_44.1: ref %GenericParam = converted %.loc20_42.1, %.loc20_42.4 -// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%impl_witness) [concrete = constants.%Generic.facet.8bd] -// CHECK:STDOUT: %.loc20_59: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [concrete = constants.%Generic.facet.8bd] -// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8bd) [concrete = constants.%CallGenericMethod.specific_fn] +// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%Generic.impl_witness) [concrete = constants.%Generic.facet.8ff] +// CHECK:STDOUT: %.loc20_59: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [concrete = constants.%Generic.facet.8ff] +// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8ff) [concrete = constants.%CallGenericMethod.specific_fn] // CHECK:STDOUT: %.loc20_24.2: %ImplsGeneric = bind_value %.loc20_24.1 // CHECK:STDOUT: %.loc20_44.2: %GenericParam = bind_value %.loc20_44.1 // CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn(%.loc20_24.2, %.loc20_44.2) @@ -352,7 +353,7 @@ fn B() { // CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.9b7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%GenericParam, constants.%Generic.facet.8bd) {} +// CHECK:STDOUT: specific @F.1(constants.%GenericParam, constants.%Generic.facet.8ff) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%T) { // CHECK:STDOUT: %Scalar.loc4_19.2 => constants.%T @@ -382,11 +383,11 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(@CallGenericMethod.%T.loc15_22.2, @CallGenericMethod.%Generic.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8bd) { +// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8ff) { // CHECK:STDOUT: %T.loc15_22.2 => constants.%GenericParam // CHECK:STDOUT: %T.patt.loc15_22.2 => constants.%T.patt // CHECK:STDOUT: %Generic.type.loc15_45.2 => constants.%Generic.type.769 -// CHECK:STDOUT: %U.loc15_32.2 => constants.%Generic.facet.8bd +// CHECK:STDOUT: %U.loc15_32.2 => constants.%Generic.facet.8ff // CHECK:STDOUT: %U.patt.loc15_32.2 => constants.%U.patt.8ea // CHECK:STDOUT: %U.as_type.loc15_51.2 => constants.%ImplsGeneric // CHECK:STDOUT: @@ -396,10 +397,10 @@ fn B() { // CHECK:STDOUT: %require_complete.loc16 => constants.%complete_type.997 // CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.713 // CHECK:STDOUT: %assoc0 => constants.%assoc0.9b7 -// CHECK:STDOUT: %U.as_wit.iface0.loc16_4.2 => constants.%impl_witness +// CHECK:STDOUT: %U.as_wit.iface0.loc16_4.2 => constants.%Generic.impl_witness // CHECK:STDOUT: %F.type => constants.%F.type.4cf -// CHECK:STDOUT: %Generic.facet => constants.%Generic.facet.8bd -// CHECK:STDOUT: %.loc16_4.3 => constants.%.1eb +// CHECK:STDOUT: %Generic.facet => constants.%Generic.facet.8ff +// CHECK:STDOUT: %.loc16_4.3 => constants.%.3e6 // CHECK:STDOUT: %impl.elem0.loc16_4.2 => constants.%F.a56 // CHECK:STDOUT: %specific_impl_fn.loc16_4.2 => constants.%F.a56 // CHECK:STDOUT: } @@ -424,7 +425,7 @@ fn B() { // CHECK:STDOUT: %I.type.bea: type = facet_type <@I, @I(%T.8b3, %empty_tuple.type)> [symbolic] // CHECK:STDOUT: %Self.ec5: %I.type.bea = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %require_complete.5ce: = require_complete_type %I.type.bea [symbolic] -// CHECK:STDOUT: %impl_witness.298: = impl_witness (), @impl(%T.8b3) [symbolic] +// CHECK:STDOUT: %I.impl_witness.989: = impl_witness file.%I.impl_witness_table, @impl(%T.8b3) [symbolic] // CHECK:STDOUT: %I.type.202: type = facet_type <@I, @I(%empty_struct_type, %empty_tuple.type)> [concrete] // CHECK:STDOUT: %T.e96: %I.type.202 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.5b9: %I.type.202 = symbolic_binding_pattern T, 0 [symbolic] @@ -437,8 +438,8 @@ fn B() { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %Self.38c: %I.type.202 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %complete_type.3d9: = complete_type_witness %I.type.202 [concrete] -// CHECK:STDOUT: %impl_witness.e3d: = impl_witness (), @impl(%empty_struct_type) [concrete] -// CHECK:STDOUT: %I.facet: %I.type.202 = facet_value %C, (%impl_witness.e3d) [concrete] +// CHECK:STDOUT: %I.impl_witness.806: = impl_witness file.%I.impl_witness_table, @impl(%empty_struct_type) [concrete] +// CHECK:STDOUT: %I.facet: %I.type.202 = facet_value %C, (%I.impl_witness.806) [concrete] // CHECK:STDOUT: %A.specific_fn: = specific_function %A, @A(%I.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -476,7 +477,8 @@ fn B() { // CHECK:STDOUT: %I.type.loc7_36.1: type = facet_type <@I, @I(constants.%T.8b3, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.bea)] // CHECK:STDOUT: %T.loc7_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(constants.%T.8b3) [symbolic = @impl.%impl_witness (constants.%impl_witness.298)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%T.8b3) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness.989)] // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] { // CHECK:STDOUT: %T.patt.loc9_6.1: %I.type.202 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.5b9)] // CHECK:STDOUT: %t.patt: @A.%T.as_type.loc9_24.2 (%T.as_type) = binding_pattern t @@ -526,13 +528,13 @@ fn B() { // CHECK:STDOUT: %T.patt.loc7_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %I.type.loc7_36.2: type = facet_type <@I, @I(%T.loc7_14.2, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.bea)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc7_36.2 [symbolic = %require_complete (constants.%require_complete.5ce)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%T.loc7_14.2) [symbolic = %impl_witness (constants.%impl_witness.298)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table, @impl(%T.loc7_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.989)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc7_36.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -568,9 +570,9 @@ fn B() { // CHECK:STDOUT: %.loc12_6.3: init %C = class_init (), %.loc12_6.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc12_6.4: ref %C = temporary %.loc12_6.2, %.loc12_6.3 // CHECK:STDOUT: %.loc12_8.1: ref %C = converted %.loc12_6.1, %.loc12_6.4 -// CHECK:STDOUT: %I.facet.loc12_12.1: %I.type.202 = facet_value constants.%C, (constants.%impl_witness.e3d) [concrete = constants.%I.facet] +// CHECK:STDOUT: %I.facet.loc12_12.1: %I.type.202 = facet_value constants.%C, (constants.%I.impl_witness.806) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc12_12.1: %I.type.202 = converted constants.%C, %I.facet.loc12_12.1 [concrete = constants.%I.facet] -// CHECK:STDOUT: %I.facet.loc12_12.2: %I.type.202 = facet_value constants.%C, (constants.%impl_witness.e3d) [concrete = constants.%I.facet] +// CHECK:STDOUT: %I.facet.loc12_12.2: %I.type.202 = facet_value constants.%C, (constants.%I.impl_witness.806) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc12_12.2: %I.type.202 = converted constants.%C, %I.facet.loc12_12.2 [concrete = constants.%I.facet] // CHECK:STDOUT: %A.specific_fn: = specific_function %A.ref, @A(constants.%I.facet) [concrete = constants.%A.specific_fn] // CHECK:STDOUT: %.loc12_8.2: %C = bind_value %.loc12_8.1 @@ -603,7 +605,7 @@ fn B() { // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %I.type.loc7_36.2 => constants.%I.type.bea // CHECK:STDOUT: %require_complete => constants.%require_complete.5ce -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.298 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.989 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {} @@ -632,7 +634,7 @@ fn B() { // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %I.type.loc7_36.2 => constants.%I.type.202 // CHECK:STDOUT: %require_complete => constants.%complete_type.3d9 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.e3d +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.806 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -666,7 +668,7 @@ fn B() { // CHECK:STDOUT: %I.type.bea: type = facet_type <@I, @I(%T.8b3, %empty_tuple.type)> [symbolic] // CHECK:STDOUT: %Self.ec5: %I.type.bea = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %require_complete.5ce: = require_complete_type %I.type.bea [symbolic] -// CHECK:STDOUT: %impl_witness.298: = impl_witness (), @impl(%T.8b3) [symbolic] +// CHECK:STDOUT: %I.impl_witness.989: = impl_witness file.%I.impl_witness_table, @impl(%T.8b3) [symbolic] // CHECK:STDOUT: %I.type.906: type = facet_type <@I, @I(%empty_struct_type, %empty_struct_type)> [concrete] // CHECK:STDOUT: %T.4b2: %I.type.906 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.6fc: %I.type.906 = symbolic_binding_pattern T, 0 [symbolic] @@ -680,7 +682,7 @@ fn B() { // CHECK:STDOUT: %I.type.202: type = facet_type <@I, @I(%empty_struct_type, %empty_tuple.type)> [concrete] // CHECK:STDOUT: %Self.38c: %I.type.202 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %complete_type.3d9: = complete_type_witness %I.type.202 [concrete] -// CHECK:STDOUT: %impl_witness.e3d: = impl_witness (), @impl(%empty_struct_type) [concrete] +// CHECK:STDOUT: %I.impl_witness.806: = impl_witness file.%I.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -717,7 +719,8 @@ fn B() { // CHECK:STDOUT: %I.type.loc7_36.1: type = facet_type <@I, @I(constants.%T.8b3, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.bea)] // CHECK:STDOUT: %T.loc7_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(constants.%T.8b3) [symbolic = @impl.%impl_witness (constants.%impl_witness.298)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%T.8b3) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness.989)] // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] { // CHECK:STDOUT: %T.patt.loc9_6.1: %I.type.906 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.6fc)] // CHECK:STDOUT: %t.patt: @A.%T.as_type.loc9_24.2 (%T.as_type) = binding_pattern t @@ -767,13 +770,13 @@ fn B() { // CHECK:STDOUT: %T.patt.loc7_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %I.type.loc7_36.2: type = facet_type <@I, @I(%T.loc7_14.2, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.bea)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc7_36.2 [symbolic = %require_complete (constants.%require_complete.5ce)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%T.loc7_14.2) [symbolic = %impl_witness (constants.%impl_witness.298)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table, @impl(%T.loc7_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.989)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc7_36.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -837,7 +840,7 @@ fn B() { // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %I.type.loc7_36.2 => constants.%I.type.bea // CHECK:STDOUT: %require_complete => constants.%require_complete.5ce -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.298 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.989 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {} @@ -862,7 +865,7 @@ fn B() { // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %I.type.loc7_36.2 => constants.%I.type.202 // CHECK:STDOUT: %require_complete => constants.%complete_type.3d9 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.e3d +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.806 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_tuple.type) { @@ -894,7 +897,7 @@ fn B() { // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.463: type = class_type @C, @C(%T.8b3, %empty_tuple.type) [symbolic] -// CHECK:STDOUT: %impl_witness.1a1: = impl_witness (), @impl(%T.8b3) [symbolic] +// CHECK:STDOUT: %I.impl_witness.45b: = impl_witness file.%I.impl_witness_table, @impl(%T.8b3) [symbolic] // CHECK:STDOUT: %T.826: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.3ad: %I.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.826 [symbolic] @@ -906,7 +909,7 @@ fn B() { // CHECK:STDOUT: %C.c74: type = class_type @C, @C(%empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %C.val: %C.c74 = struct_value () [concrete] // CHECK:STDOUT: %C.83b: type = class_type @C, @C(%empty_struct_type, %empty_tuple.type) [concrete] -// CHECK:STDOUT: %impl_witness.366: = impl_witness (), @impl(%empty_struct_type) [concrete] +// CHECK:STDOUT: %I.impl_witness.80e: = impl_witness file.%I.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -943,7 +946,8 @@ fn B() { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %T.loc7_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(constants.%T.8b3) [symbolic = @impl.%impl_witness (constants.%impl_witness.1a1)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%T.8b3) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness.45b)] // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] { // CHECK:STDOUT: %T.patt.loc9_6.1: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.3ad)] // CHECK:STDOUT: %t.patt: @A.%T.as_type.loc9_16.2 (%T.as_type) = binding_pattern t @@ -974,13 +978,13 @@ fn B() { // CHECK:STDOUT: %T.loc7_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %T.patt.loc7_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %C.loc7_31.2: type = class_type @C, @C(%T.loc7_14.2, constants.%empty_tuple.type) [symbolic = %C.loc7_31.2 (constants.%C.463)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%T.loc7_14.2) [symbolic = %impl_witness (constants.%impl_witness.1a1)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table, @impl(%T.loc7_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.45b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.loc7_31.1 as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1051,7 +1055,7 @@ fn B() { // CHECK:STDOUT: %T.loc7_14.2 => constants.%T.8b3 // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %C.loc7_31.2 => constants.%C.463 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.1a1 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.45b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {} @@ -1077,7 +1081,7 @@ fn B() { // CHECK:STDOUT: %T.loc7_14.2 => constants.%empty_struct_type // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %C.loc7_31.2 => constants.%C.83b -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.366 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.80e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%empty_struct_type, constants.%empty_tuple.type) { diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon index 95e0a57c0da7..f4a90108b768 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon @@ -68,7 +68,8 @@ fn F() { // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness file.%Eats.impl_witness_table [concrete] // CHECK:STDOUT: %e: %Eats.type = bind_symbolic_name e, 0 [symbolic] // CHECK:STDOUT: %e.patt: %Eats.type = symbolic_binding_pattern e, 0 [symbolic] // CHECK:STDOUT: %Feed.type: type = fn_type @Feed [concrete] @@ -76,8 +77,8 @@ fn F() { // CHECK:STDOUT: %Feed: %Feed.type = struct_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%impl_witness) [concrete] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Goat, (%impl_witness) [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Goat, (%Eats.impl_witness) [concrete] // CHECK:STDOUT: %Feed.specific_fn: = specific_function %Feed, @Feed(%Eats.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -104,12 +105,14 @@ fn F() { // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc8: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Animal.impl_witness_table = impl_witness_table (), @impl.27e [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: impl_decl @impl.b88 [concrete] {} { // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc9: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @impl.b88 [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness %Eats.impl_witness_table [concrete = constants.%Eats.impl_witness] // CHECK:STDOUT: %Feed.decl: %Feed.type = fn_decl @Feed [concrete = constants.%Feed] { // CHECK:STDOUT: %e.patt.loc11_9.1: %Eats.type = symbolic_binding_pattern e, 0 [symbolic = %e.patt.loc11_9.2 (constants.%e.patt)] // CHECK:STDOUT: } { @@ -137,12 +140,12 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.27e: %Goat.ref as %Animal.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc8 +// CHECK:STDOUT: witness = file.%Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.b88: %Goat.ref as %Eats.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc9 +// CHECK:STDOUT: witness = file.%Eats.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Goat { @@ -171,11 +174,11 @@ fn F() { // CHECK:STDOUT: %Feed.ref: %Feed.type = name_ref Feed, file.%Feed.decl [concrete = constants.%Feed] // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc14_14: %Animal.type = converted %Goat.ref, %Animal.facet [concrete = constants.%Animal.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc14_14 [concrete = constants.%Goat] // CHECK:STDOUT: %.loc14_25: type = converted %.loc14_14, %as_type [concrete = constants.%Goat] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value constants.%Goat, (constants.%impl_witness) [concrete = constants.%Eats.facet] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value constants.%Goat, (constants.%Eats.impl_witness) [concrete = constants.%Eats.facet] // CHECK:STDOUT: %.loc14_32: %Eats.type = converted %.loc14_25, %Eats.facet [concrete = constants.%Eats.facet] // CHECK:STDOUT: %Feed.specific_fn: = specific_function %Feed.ref, @Feed(constants.%Eats.facet) [concrete = constants.%Feed.specific_fn] // CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn() @@ -209,18 +212,18 @@ fn F() { // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %Bleet.type: type = fn_type @Bleet [concrete] // CHECK:STDOUT: %Bleet: %Bleet.type = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] -// CHECK:STDOUT: %impl_witness.9a5: = impl_witness (@impl.626.%Eat.decl) [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness @Goat.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness @Goat.%Eats.impl_witness_table [concrete] // CHECK:STDOUT: %Eat.type.1b3: type = fn_type @Eat.2 [concrete] // CHECK:STDOUT: %Eat.73e: %Eat.type.1b3 = struct_value () [concrete] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Goat, (%impl_witness.9a5) [concrete] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Goat, (%Eats.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%impl_witness.1bc) [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] -// CHECK:STDOUT: %.aa8: type = fn_type_with_self_type %Eat.type.e5d, %Eats.facet [concrete] +// CHECK:STDOUT: %.f6e: type = fn_type_with_self_type %Eat.type.e5d, %Eats.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -265,7 +268,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.32f: %Self.ref as %Animal.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = @Goat.%impl_witness.loc12 +// CHECK:STDOUT: witness = @Goat.%Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.626: %Self.ref as %Eats.ref { @@ -273,7 +276,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Eat = %Eat.decl -// CHECK:STDOUT: witness = @Goat.%impl_witness.loc13 +// CHECK:STDOUT: witness = @Goat.%Eats.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Goat { @@ -282,12 +285,14 @@ fn F() { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Goat [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc12: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %Animal.impl_witness_table = impl_witness_table (), @impl.32f [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: impl_decl @impl.626 [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Goat [concrete = constants.%Goat] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc13: = impl_witness (@impl.626.%Eat.decl) [concrete = constants.%impl_witness.9a5] +// CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (@impl.626.%Eat.decl), @impl.626 [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness %Eats.impl_witness_table [concrete = constants.%Eats.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -329,7 +334,7 @@ fn F() { // CHECK:STDOUT: %.loc22_15.1: type = splice_block %.loc22_15.3 [concrete = constants.%Goat] { // CHECK:STDOUT: %Goat.ref.loc22_10: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref.loc22: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %Animal.facet.loc22: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness.1bc) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc22: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc22_15.2: %Animal.type = converted %Goat.ref.loc22_10, %Animal.facet.loc22 [concrete = constants.%Animal.facet] // CHECK:STDOUT: %as_type.loc22: type = facet_access_type %.loc22_15.2 [concrete = constants.%Goat] // CHECK:STDOUT: %.loc22_15.3: type = converted %.loc22_15.2, %as_type.loc22 [concrete = constants.%Goat] @@ -340,7 +345,7 @@ fn F() { // CHECK:STDOUT: %Bleet.call.loc23: init %empty_tuple.type = call %Bleet.ref.loc23() // CHECK:STDOUT: %x.ref.loc24: ref %Goat = name_ref x, %x // CHECK:STDOUT: %Eat.ref.loc24: %Eats.assoc_type = name_ref Eat, @Eats.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc24: %.aa8 = impl_witness_access constants.%impl_witness.9a5, element0 [concrete = constants.%Eat.73e] +// CHECK:STDOUT: %impl.elem0.loc24: %.f6e = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Eat.73e] // CHECK:STDOUT: %Eat.call.loc24: init %empty_tuple.type = call %impl.elem0.loc24() // CHECK:STDOUT: %.loc26_6.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %Goat.ref.loc26_11: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] @@ -350,7 +355,7 @@ fn F() { // CHECK:STDOUT: %.loc26_8: ref %Goat = converted %.loc26_6.1, %.loc26_6.4 // CHECK:STDOUT: %Goat.ref.loc26_21: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref.loc26: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %Animal.facet.loc26: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness.1bc) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc26: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc26_26: %Animal.type = converted %Goat.ref.loc26_21, %Animal.facet.loc26 [concrete = constants.%Animal.facet] // CHECK:STDOUT: %as_type.loc26: type = facet_access_type %.loc26_26 [concrete = constants.%Goat] // CHECK:STDOUT: %.loc26_35: type = converted %.loc26_26, %as_type.loc26 [concrete = constants.%Goat] @@ -364,12 +369,12 @@ fn F() { // CHECK:STDOUT: %.loc27_8: ref %Goat = converted %.loc27_6.1, %.loc27_6.4 // CHECK:STDOUT: %Goat.ref.loc27_21: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref.loc27: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %Animal.facet.loc27: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness.1bc) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc27: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc27_26: %Animal.type = converted %Goat.ref.loc27_21, %Animal.facet.loc27 [concrete = constants.%Animal.facet] // CHECK:STDOUT: %as_type.loc27: type = facet_access_type %.loc27_26 [concrete = constants.%Goat] // CHECK:STDOUT: %.loc27_35: type = converted %.loc27_26, %as_type.loc27 [concrete = constants.%Goat] // CHECK:STDOUT: %Eat.ref.loc27: %Eats.assoc_type = name_ref Eat, @Eats.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc27: %.aa8 = impl_witness_access constants.%impl_witness.9a5, element0 [concrete = constants.%Eat.73e] +// CHECK:STDOUT: %impl.elem0.loc27: %.f6e = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Eat.73e] // CHECK:STDOUT: %Eat.call.loc27: init %empty_tuple.type = call %impl.elem0.loc27() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon index e24d206a9e2f..b3b8292aa572 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon @@ -40,12 +40,12 @@ fn F() { // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%impl_witness) [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet) [concrete] -// CHECK:STDOUT: %FeedAnimal.specific_fn.5d0: = specific_function %FeedAnimal, @FeedAnimal(%Animal.facet) [concrete] +// CHECK:STDOUT: %FeedAnimal.specific_fn.82e: = specific_function %FeedAnimal, @FeedAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -82,7 +82,8 @@ fn F() { // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Animal.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -96,7 +97,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Goat.ref as %Animal.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Goat { @@ -141,7 +142,7 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %HandleAnimal.ref: %HandleAnimal.type = name_ref HandleAnimal, file.%HandleAnimal.decl [concrete = constants.%HandleAnimal] // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc24: %Animal.type = converted %Goat.ref, %Animal.facet [concrete = constants.%Animal.facet] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal.ref, @HandleAnimal(constants.%Animal.facet) [concrete = constants.%HandleAnimal.specific_fn] // CHECK:STDOUT: %HandleAnimal.call: init %empty_tuple.type = call %HandleAnimal.specific_fn() @@ -167,7 +168,7 @@ fn F() { // CHECK:STDOUT: %T.patt.loc18_17.2 => constants.%T.patt // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc18_31.2 => constants.%FeedAnimal.specific_fn.5d0 +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc18_31.2 => constants.%FeedAnimal.specific_fn.82e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%Animal.facet) { diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_narrowed_facet_type.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_narrowed_facet_type.carbon index 8d1233c37466..57341013c918 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_narrowed_facet_type.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_narrowed_facet_type.carbon @@ -110,17 +110,17 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl(%T.8b3) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl(%T.8b3) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl(%T.8b3) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl(%T.8b3) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness type [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.3ea) [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete] +// CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %Animal.type, %Op.444 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.444, @Op.2(type) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %Animal.type, %Op.specific_fn [concrete] @@ -145,11 +145,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -187,7 +186,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc8_28.1: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_28.2: = bound_method %Animal.ref, %specific_fn [concrete = constants.%bound_method] @@ -232,7 +231,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic impl @impl(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.e01)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -241,7 +240,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -315,7 +314,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @impl(constants.%T.8b3) { // CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %T.patt => constants.%T.patt.e01 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T) {} @@ -327,7 +326,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @impl(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt.e01 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -376,17 +375,17 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness type [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.3ea) [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete] +// CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.bound.9f8: = bound_method %Tame.type, %Op.444 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.444, @Op.2(type) [concrete] // CHECK:STDOUT: %bound_method.a56: = bound_method %Tame.type, %Op.specific_fn [concrete] @@ -424,11 +423,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -453,7 +451,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc7_22.1: type = splice_block %.loc7_22.3 [concrete = constants.%facet_type.6ff] { // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc7_22.1: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%Op.bound.9f8] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_22.2: = bound_method %Tame.ref, %specific_fn [concrete = constants.%bound_method.a56] @@ -478,13 +476,13 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc9_39.1: type = splice_block %.loc9_39.3 [concrete = constants.%facet_type.a95] { // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %impl.elem0.loc9_30: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc9_30: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc9_30.1: = bound_method %Eats.ref, %impl.elem0.loc9_30 [concrete = constants.%Op.bound.d46] // CHECK:STDOUT: %specific_fn.loc9_30: = specific_function %impl.elem0.loc9_30, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_30.2: = bound_method %Eats.ref, %specific_fn.loc9_30 [concrete = constants.%bound_method.f8f] // CHECK:STDOUT: %type.and.loc9_30: init type = call %bound_method.loc9_30.2(%Eats.ref, %Animal.ref) [concrete = constants.%facet_type.c3f] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] -// CHECK:STDOUT: %impl.elem0.loc9_39: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc9_39: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc9_39.1: = bound_method %type.and.loc9_30, %impl.elem0.loc9_39 [concrete = constants.%Op.bound.c0a] // CHECK:STDOUT: %specific_fn.loc9_39: = specific_function %impl.elem0.loc9_39, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_39.2: = bound_method %type.and.loc9_30, %specific_fn.loc9_39 [concrete = constants.%bound_method.7fc] @@ -539,7 +537,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic impl @impl(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -548,7 +546,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -619,7 +617,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T) {} @@ -631,7 +629,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @impl(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -680,7 +678,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %A: %Animal.type = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %A.patt: %Animal.type = symbolic_binding_pattern A, 0 [symbolic] // CHECK:STDOUT: %A.as_type: type = facet_access_type %A [symbolic] -// CHECK:STDOUT: %impl_witness.110: = impl_witness (), @impl.e7b(%A) [symbolic] +// CHECK:STDOUT: %Eats.impl_witness.8ab: = impl_witness file.%Eats.impl_witness_table, @impl.e7b(%A) [symbolic] // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] // CHECK:STDOUT: %Self.25f: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type @BitAnd [concrete] @@ -690,17 +688,17 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl.f92 [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness type [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.3ea) [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete] +// CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.bound.9f8: = bound_method %Tame.type, %Op.444 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.444, @Op.2(type) [concrete] // CHECK:STDOUT: %bound_method.a56: = bound_method %Tame.type, %Op.specific_fn [concrete] @@ -722,7 +720,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %require_complete.ba9: = require_complete_type %W.as_type [symbolic] // CHECK:STDOUT: %W.as_wit.iface0: = facet_access_witness %W, element0 [symbolic] // CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %W.as_type, (%W.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl_witness.1d8: = impl_witness (), @impl.e7b(%Animal.facet) [symbolic] +// CHECK:STDOUT: %Eats.impl_witness.498: = impl_witness file.%Eats.impl_witness_table, @impl.e7b(%Animal.facet) [symbolic] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %W, @Eats [symbolic] // CHECK:STDOUT: %W.as_wit.iface1: = facet_access_witness %W, element1 [symbolic] // CHECK:STDOUT: %facet_value: %facet_type.6ff = facet_value %W.as_type, (%Eats.lookup_impl_witness, %W.as_wit.iface1) [symbolic] @@ -738,11 +736,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.f92.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.f92.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -769,7 +766,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %A.loc7_14.1: %Animal.type = bind_symbolic_name A, 0 [symbolic = %A.loc7_14.2 (constants.%A)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.e7b(constants.%A) [symbolic = @impl.e7b.%impl_witness (constants.%impl_witness.110)] +// CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @impl.e7b [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness %Eats.impl_witness_table, @impl.e7b(constants.%A) [symbolic = @impl.e7b.%Eats.impl_witness (constants.%Eats.impl_witness.8ab)] // CHECK:STDOUT: %FeedTame2.decl: %FeedTame2.type = fn_decl @FeedTame2 [concrete = constants.%FeedTame2] { // CHECK:STDOUT: %V.patt.loc9_14.1: %facet_type.6ff = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc9_14.2 (constants.%V.patt)] // CHECK:STDOUT: %v.patt: @FeedTame2.%V.as_type.loc9_34.2 (%V.as_type) = binding_pattern v @@ -778,7 +776,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.3 [concrete = constants.%facet_type.6ff] { // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc9_23.1: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%Op.bound.9f8] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_23.2: = bound_method %Tame.ref, %specific_fn [concrete = constants.%bound_method.a56] @@ -803,7 +801,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc11_33.1: type = splice_block %.loc11_33.3 [concrete = constants.%facet_type.65c] { // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] -// CHECK:STDOUT: %impl.elem0: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc11_33.1: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%Op.bound.fe3] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc11_33.2: = bound_method %Animal.ref, %specific_fn [concrete = constants.%bound_method.a26] @@ -857,20 +855,20 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %A.loc7_14.2: %Animal.type = bind_symbolic_name A, 0 [symbolic = %A.loc7_14.2 (constants.%A)] // CHECK:STDOUT: %A.patt.loc7_14.2: %Animal.type = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc7_14.2 (constants.%A.patt)] // CHECK:STDOUT: %A.as_type.loc7_26.2: type = facet_access_type %A.loc7_14.2 [symbolic = %A.as_type.loc7_26.2 (constants.%A.as_type)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.e7b(%A.loc7_14.2) [symbolic = %impl_witness (constants.%impl_witness.110)] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness file.%Eats.impl_witness_table, @impl.e7b(%A.loc7_14.2) [symbolic = %Eats.impl_witness (constants.%Eats.impl_witness.8ab)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc7 as %Eats.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Eats.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -879,7 +877,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -954,7 +952,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %A.loc7_14.2 => constants.%A // CHECK:STDOUT: %A.patt.loc7_14.2 => constants.%A.patt // CHECK:STDOUT: %A.as_type.loc7_26.2 => constants.%A.as_type -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.110 +// CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.8ab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.e7b(%A.loc7_14.2) {} @@ -967,7 +965,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @impl.f92(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(%T) {} @@ -979,7 +977,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @impl.f92(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -1009,7 +1007,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %A.loc7_14.2 => constants.%Animal.facet // CHECK:STDOUT: %A.patt.loc7_14.2 => constants.%A.patt // CHECK:STDOUT: %A.as_type.loc7_26.2 => constants.%W.as_type -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.1d8 +// CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.498 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1597,11 +1595,11 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %assoc0.220: %BitAnd.assoc_type = assoc_entity element0, @BitAnd.%Op.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.type.28d: type = fn_type @Op.2, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.902: %Op.type.28d = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%impl_witness) [symbolic] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%BitAnd.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1628,7 +1626,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, file.%BitAnd.decl [concrete = constants.%BitAnd.type] // CHECK:STDOUT: %T.loc21_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(%Dest.loc9_14.1: type) { @@ -1756,7 +1755,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic impl @impl(%T.loc21_14.1: type) { // CHECK:STDOUT: %T.loc21_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc21_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%Op.decl), @impl(%T.loc21_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T.loc21_14.2) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T.loc21_14.2) [symbolic = %Op.type (constants.%Op.type.28d)] @@ -1785,7 +1784,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1862,7 +1861,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc21_14.2) {} diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon index 6d3bdd8ab82f..a43b9f2ceafa 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon @@ -30,7 +30,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %A: %Animal.type = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %A.patt: %Animal.type = symbolic_binding_pattern A, 0 [symbolic] // CHECK:STDOUT: %A.as_type: type = facet_access_type %A [symbolic] -// CHECK:STDOUT: %impl_witness.11010a.1: = impl_witness (), @impl(%A) [symbolic] +// CHECK:STDOUT: %Eats.impl_witness.8abeaf.1: = impl_witness file.%Eats.impl_witness_table, @impl(%A) [symbolic] // CHECK:STDOUT: %T.1b5: %Eats.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.6be: %Eats.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type.27d: type = facet_access_type %T.1b5 [symbolic] @@ -44,7 +44,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %HandleAnimal.type: type = fn_type @HandleAnimal [concrete] // CHECK:STDOUT: %HandleAnimal: %HandleAnimal.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.234: = require_complete_type %T.as_type.2ad [symbolic] -// CHECK:STDOUT: %impl_witness.11010a.2: = impl_witness (), @impl(%T.fd4) [symbolic] +// CHECK:STDOUT: %Eats.impl_witness.8abeaf.2: = impl_witness file.%Eats.impl_witness_table, @impl(%T.fd4) [symbolic] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %T.fd4, @Eats [symbolic] // CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %T.as_type.2ad, (%Eats.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %Feed.specific_fn: = specific_function %Feed, @Feed(%Eats.facet) [symbolic] @@ -77,7 +77,8 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %A.loc17_14.1: %Animal.type = bind_symbolic_name A, 0 [symbolic = %A.loc17_14.2 (constants.%A)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(constants.%A) [symbolic = @impl.%impl_witness (constants.%impl_witness.11010a.1)] +// CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness %Eats.impl_witness_table, @impl(constants.%A) [symbolic = @impl.%Eats.impl_witness (constants.%Eats.impl_witness.8abeaf.1)] // CHECK:STDOUT: %Feed.decl: %Feed.type = fn_decl @Feed [concrete = constants.%Feed] { // CHECK:STDOUT: %T.patt.loc19_9.1: %Eats.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_9.2 (constants.%T.patt.6be)] // CHECK:STDOUT: %e.patt: @Feed.%T.as_type.loc19_22.2 (%T.as_type.27d) = binding_pattern e @@ -130,13 +131,13 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %A.loc17_14.2: %Animal.type = bind_symbolic_name A, 0 [symbolic = %A.loc17_14.2 (constants.%A)] // CHECK:STDOUT: %A.patt.loc17_14.2: %Animal.type = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc17_14.2 (constants.%A.patt)] // CHECK:STDOUT: %A.as_type.loc17_26.2: type = facet_access_type %A.loc17_14.2 [symbolic = %A.as_type.loc17_26.2 (constants.%A.as_type)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%A.loc17_14.2) [symbolic = %impl_witness (constants.%impl_witness.11010a.1)] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness file.%Eats.impl_witness_table, @impl(%A.loc17_14.2) [symbolic = %Eats.impl_witness (constants.%Eats.impl_witness.8abeaf.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc17 as %Eats.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Eats.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -189,7 +190,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %A.loc17_14.2 => constants.%A // CHECK:STDOUT: %A.patt.loc17_14.2 => constants.%A.patt // CHECK:STDOUT: %A.as_type.loc17_26.2 => constants.%A.as_type -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.11010a.1 +// CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.8abeaf.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%A.loc17_14.2) {} @@ -210,7 +211,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %A.loc17_14.2 => constants.%T.fd4 // CHECK:STDOUT: %A.patt.loc17_14.2 => constants.%A.patt // CHECK:STDOUT: %A.as_type.loc17_26.2 => constants.%T.as_type.2ad -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.11010a.2 +// CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.8abeaf.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon index 50b109789854..f2c67cec370a 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon @@ -42,7 +42,7 @@ fn F() { // CHECK:STDOUT: %Grass: type = class_type @Grass [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %Edible.impl_witness: = impl_witness file.%Edible.impl_witness_table [concrete] // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Food.8b3: type = bind_symbolic_name Food, 0 [symbolic] @@ -61,8 +61,9 @@ fn F() { // CHECK:STDOUT: %Eats.type.f54c3d.1: type = facet_type <@Eats, @Eats(%U.as_type)> [symbolic] // CHECK:STDOUT: %Self.c30: %Eats.type.f54c3d.1 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %require_complete.42532a.1: = require_complete_type %Eats.type.f54c3d.1 [symbolic] -// CHECK:STDOUT: %impl_witness.c7c36b.1: = impl_witness (), @impl.009(%T.fd4, %U) [symbolic] +// CHECK:STDOUT: %Eats.impl_witness.fabf92.1: = impl_witness file.%Eats.impl_witness_table, @impl.009(%T.fd4, %U) [symbolic] // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] // CHECK:STDOUT: %Food.9af: %Edible.type = bind_symbolic_name Food, 0 [symbolic] // CHECK:STDOUT: %Food.patt.0b7: %Edible.type = symbolic_binding_pattern Food, 0 [symbolic] // CHECK:STDOUT: %Food.as_type.952: type = facet_access_type %Food.9af [symbolic] @@ -83,7 +84,7 @@ fn F() { // CHECK:STDOUT: %require_complete.444: = require_complete_type %Food.as_type.fae [symbolic] // CHECK:STDOUT: %Eats.type.f54c3d.2: type = facet_type <@Eats, @Eats(%Food.as_type.fae)> [symbolic] // CHECK:STDOUT: %require_complete.42532a.2: = require_complete_type %Eats.type.f54c3d.2 [symbolic] -// CHECK:STDOUT: %impl_witness.c7c36b.2: = impl_witness (), @impl.009(%T.fd4, %Food.5fe) [symbolic] +// CHECK:STDOUT: %Eats.impl_witness.fabf92.2: = impl_witness file.%Eats.impl_witness_table, @impl.009(%T.fd4, %Food.5fe) [symbolic] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %T.fd4, @Eats, @Eats(%Food.as_type.fae) [symbolic] // CHECK:STDOUT: %Eats.facet.512: %Eats.type.f54c3d.2 = facet_value %T.as_type.2ad, (%Eats.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %T.patt.1f1: %Eats.type.f54c3d.2 = symbolic_binding_pattern T, 1 [symbolic] @@ -92,16 +93,16 @@ fn F() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] // CHECK:STDOUT: %Grass.val: %Grass = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%impl_witness.1bc) [concrete] -// CHECK:STDOUT: %Edible.facet: %Edible.type = facet_value %Grass, (%impl_witness.1bc) [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] +// CHECK:STDOUT: %Edible.facet: %Edible.type = facet_value %Grass, (%Edible.impl_witness) [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet, %Edible.facet) [concrete] // CHECK:STDOUT: %Eats.type.1ae: type = facet_type <@Eats, @Eats(%Grass)> [concrete] // CHECK:STDOUT: %Self.016: %Eats.type.1ae = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %complete_type.004: = complete_type_witness %Eats.type.1ae [concrete] -// CHECK:STDOUT: %impl_witness.4f1: = impl_witness (), @impl.009(%Animal.facet, %Edible.facet) [concrete] -// CHECK:STDOUT: %Eats.facet.fa6: %Eats.type.1ae = facet_value %Goat, (%impl_witness.4f1) [concrete] +// CHECK:STDOUT: %Eats.impl_witness.1cf: = impl_witness file.%Eats.impl_witness_table, @impl.009(%Animal.facet, %Edible.facet) [concrete] +// CHECK:STDOUT: %Eats.facet.cb1: %Eats.type.1ae = facet_value %Goat, (%Eats.impl_witness.1cf) [concrete] // CHECK:STDOUT: %T.patt.1ac: %Eats.type.1ae = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %Feed.specific_fn.d82: = specific_function %Feed, @Feed(%Edible.facet, %Eats.facet.fa6) [concrete] +// CHECK:STDOUT: %Feed.specific_fn.86c: = specific_function %Feed, @Feed(%Edible.facet, %Eats.facet.cb1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -129,7 +130,8 @@ fn F() { // CHECK:STDOUT: %Grass.ref: type = name_ref Grass, file.%Grass.decl [concrete = constants.%Grass] // CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %Edible.impl_witness_table = impl_witness_table (), @impl.592 [concrete] +// CHECK:STDOUT: %Edible.impl_witness: = impl_witness %Edible.impl_witness_table [concrete = constants.%Edible.impl_witness] // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %Eats.decl: %Eats.type.ba2 = interface_decl @Eats [concrete = constants.%Eats.generic] { // CHECK:STDOUT: %Food.patt.loc20_16.1: type = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc20_16.2 (constants.%Food.patt.e01)] @@ -153,13 +155,15 @@ fn F() { // CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] // CHECK:STDOUT: %U.loc25_26.1: %Edible.type = bind_symbolic_name U, 1 [symbolic = %U.loc25_26.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc25: = impl_witness (), @impl.009(constants.%T.fd4, constants.%U) [symbolic = @impl.009.%impl_witness (constants.%impl_witness.c7c36b.1)] +// CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @impl.009 [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness %Eats.impl_witness_table, @impl.009(constants.%T.fd4, constants.%U) [symbolic = @impl.009.%Eats.impl_witness (constants.%Eats.impl_witness.fabf92.1)] // CHECK:STDOUT: %Goat.decl: type = class_decl @Goat [concrete = constants.%Goat] {} {} // CHECK:STDOUT: impl_decl @impl.27e [concrete] {} { // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc28: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %Animal.impl_witness_table = impl_witness_table (), @impl.27e [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: %Feed.decl: %Feed.type = fn_decl @Feed [concrete = constants.%Feed] { // CHECK:STDOUT: %Food.patt.loc30_9.1: %Edible.type = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc30_9.2 (constants.%Food.patt.0b7)] // CHECK:STDOUT: %T.patt.loc30_24.1: @Feed.%Eats.type.loc30_37.2 (%Eats.type.b39) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc30_24.2 (constants.%T.patt.f09)] @@ -221,9 +225,9 @@ fn F() { // CHECK:STDOUT: %food: @HandleAnimal.%Food.as_type.loc31_56.2 (%Food.as_type.fae) = bind_name food, %food.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} -// CHECK:STDOUT: %Edible.facet: %Edible.type = facet_value constants.%Grass, (constants.%impl_witness.1bc) [concrete = constants.%Edible.facet] +// CHECK:STDOUT: %Edible.facet: %Edible.type = facet_value constants.%Grass, (constants.%Edible.impl_witness) [concrete = constants.%Edible.facet] // CHECK:STDOUT: %.loc31_76.1: %Edible.type = converted constants.%Grass, %Edible.facet [concrete = constants.%Edible.facet] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness.1bc) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc31_76.2: %Animal.type = converted constants.%Goat, %Animal.facet [concrete = constants.%Animal.facet] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -262,7 +266,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.592: %Grass.ref as %Edible.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%Edible.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.009(%T.loc25_14.1: %Animal.type, %U.loc25_26.1: %Edible.type) { @@ -274,19 +278,19 @@ fn F() { // CHECK:STDOUT: %U.as_type.loc25_49.2: type = facet_access_type %U.loc25_26.2 [symbolic = %U.as_type.loc25_49.2 (constants.%U.as_type)] // CHECK:STDOUT: %Eats.type.loc25_49.2: type = facet_type <@Eats, @Eats(%U.as_type.loc25_49.2)> [symbolic = %Eats.type.loc25_49.2 (constants.%Eats.type.f54c3d.1)] // CHECK:STDOUT: %require_complete: = require_complete_type %Eats.type.loc25_49.2 [symbolic = %require_complete (constants.%require_complete.42532a.1)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.009(%T.loc25_14.2, %U.loc25_26.2) [symbolic = %impl_witness (constants.%impl_witness.c7c36b.1)] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness file.%Eats.impl_witness_table, @impl.009(%T.loc25_14.2, %U.loc25_26.2) [symbolic = %Eats.impl_witness (constants.%Eats.impl_witness.fabf92.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc25_38 as %Eats.type.loc25_49.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc25 +// CHECK:STDOUT: witness = file.%Eats.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.27e: %Goat.ref as %Animal.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc28 +// CHECK:STDOUT: witness = file.%Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Grass { @@ -376,13 +380,13 @@ fn F() { // CHECK:STDOUT: %.loc34_29.3: init %Grass = class_init (), %.loc34_29.2 [concrete = constants.%Grass.val] // CHECK:STDOUT: %.loc34_29.4: ref %Grass = temporary %.loc34_29.2, %.loc34_29.3 // CHECK:STDOUT: %.loc34_31.1: ref %Grass = converted %.loc34_29.1, %.loc34_29.4 -// CHECK:STDOUT: %Animal.facet.loc34_39.1: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness.1bc) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc34_39.1: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc34_39.1: %Animal.type = converted constants.%Goat, %Animal.facet.loc34_39.1 [concrete = constants.%Animal.facet] -// CHECK:STDOUT: %Animal.facet.loc34_39.2: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness.1bc) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc34_39.2: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc34_39.2: %Animal.type = converted constants.%Goat, %Animal.facet.loc34_39.2 [concrete = constants.%Animal.facet] -// CHECK:STDOUT: %Edible.facet.loc34_39.1: %Edible.type = facet_value constants.%Grass, (constants.%impl_witness.1bc) [concrete = constants.%Edible.facet] +// CHECK:STDOUT: %Edible.facet.loc34_39.1: %Edible.type = facet_value constants.%Grass, (constants.%Edible.impl_witness) [concrete = constants.%Edible.facet] // CHECK:STDOUT: %.loc34_39.3: %Edible.type = converted constants.%Grass, %Edible.facet.loc34_39.1 [concrete = constants.%Edible.facet] -// CHECK:STDOUT: %Edible.facet.loc34_39.2: %Edible.type = facet_value constants.%Grass, (constants.%impl_witness.1bc) [concrete = constants.%Edible.facet] +// CHECK:STDOUT: %Edible.facet.loc34_39.2: %Edible.type = facet_value constants.%Grass, (constants.%Edible.impl_witness) [concrete = constants.%Edible.facet] // CHECK:STDOUT: %.loc34_39.4: %Edible.type = converted constants.%Grass, %Edible.facet.loc34_39.2 [concrete = constants.%Edible.facet] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal.ref, @HandleAnimal(constants.%Animal.facet, constants.%Edible.facet) [concrete = constants.%HandleAnimal.specific_fn] // CHECK:STDOUT: %.loc34_19.2: %Goat = bind_value %.loc34_19.1 @@ -416,7 +420,7 @@ fn F() { // CHECK:STDOUT: %U.as_type.loc25_49.2 => constants.%U.as_type // CHECK:STDOUT: %Eats.type.loc25_49.2 => constants.%Eats.type.f54c3d.1 // CHECK:STDOUT: %require_complete => constants.%require_complete.42532a.1 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.c7c36b.1 +// CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.fabf92.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Eats(@impl.009.%U.as_type.loc25_49.2) {} @@ -463,7 +467,7 @@ fn F() { // CHECK:STDOUT: %U.as_type.loc25_49.2 => constants.%Food.as_type.fae // CHECK:STDOUT: %Eats.type.loc25_49.2 => constants.%Eats.type.f54c3d.2 // CHECK:STDOUT: %require_complete => constants.%require_complete.42532a.2 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.c7c36b.2 +// CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.fabf92.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -497,10 +501,10 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc31_45 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc31_54 => constants.%complete_type.357 -// CHECK:STDOUT: %Eats.lookup_impl_witness => constants.%impl_witness.4f1 +// CHECK:STDOUT: %Eats.lookup_impl_witness => constants.%Eats.impl_witness.1cf // CHECK:STDOUT: %Eats.type => constants.%Eats.type.1ae -// CHECK:STDOUT: %Eats.facet.loc31_76.2 => constants.%Eats.facet.fa6 -// CHECK:STDOUT: %Feed.specific_fn.loc31_64.2 => constants.%Feed.specific_fn.d82 +// CHECK:STDOUT: %Eats.facet.loc31_76.2 => constants.%Eats.facet.cb1 +// CHECK:STDOUT: %Feed.specific_fn.loc31_64.2 => constants.%Feed.specific_fn.86c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Eats(constants.%Grass) { @@ -521,17 +525,17 @@ fn F() { // CHECK:STDOUT: %U.as_type.loc25_49.2 => constants.%Grass // CHECK:STDOUT: %Eats.type.loc25_49.2 => constants.%Eats.type.1ae // CHECK:STDOUT: %require_complete => constants.%complete_type.004 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.4f1 +// CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.1cf // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Feed(constants.%Edible.facet, constants.%Eats.facet.fa6) { +// CHECK:STDOUT: specific @Feed(constants.%Edible.facet, constants.%Eats.facet.cb1) { // CHECK:STDOUT: %Food.loc30_9.2 => constants.%Edible.facet // CHECK:STDOUT: %Food.patt.loc30_9.2 => constants.%Food.patt.0b7 // CHECK:STDOUT: %Food.as_type.loc30_37.2 => constants.%Grass // CHECK:STDOUT: %Eats.type.loc30_37.2 => constants.%Eats.type.1ae -// CHECK:STDOUT: %T.loc30_24.2 => constants.%Eats.facet.fa6 +// CHECK:STDOUT: %T.loc30_24.2 => constants.%Eats.facet.cb1 // CHECK:STDOUT: %T.patt.loc30_24.2 => constants.%T.patt.1ac // CHECK:STDOUT: %T.as_type.loc30_43.2 => constants.%Goat // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon index 6aafc4d5ce09..298464896cd7 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon @@ -42,13 +42,13 @@ fn F() { // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%impl_witness) [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet) [concrete] -// CHECK:STDOUT: %FeedAnimal.specific_fn.5d0: = specific_function %FeedAnimal, @FeedAnimal(%Animal.facet) [concrete] +// CHECK:STDOUT: %FeedAnimal.specific_fn.82e: = specific_function %FeedAnimal, @FeedAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -103,7 +103,8 @@ fn F() { // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Animal.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -117,7 +118,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Goat.ref as %Animal.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Goat { @@ -173,9 +174,9 @@ fn F() { // CHECK:STDOUT: %.loc24_17.3: init %Goat = class_init (), %.loc24_17.2 [concrete = constants.%Goat.val] // CHECK:STDOUT: %.loc24_17.4: ref %Goat = temporary %.loc24_17.2, %.loc24_17.3 // CHECK:STDOUT: %.loc24_19.1: ref %Goat = converted %.loc24_17.1, %.loc24_17.4 -// CHECK:STDOUT: %Animal.facet.loc24_26.1: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc24_26.1: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc24_26.1: %Animal.type = converted constants.%Goat, %Animal.facet.loc24_26.1 [concrete = constants.%Animal.facet] -// CHECK:STDOUT: %Animal.facet.loc24_26.2: %Animal.type = facet_value constants.%Goat, (constants.%impl_witness) [concrete = constants.%Animal.facet] +// CHECK:STDOUT: %Animal.facet.loc24_26.2: %Animal.type = facet_value constants.%Goat, (constants.%Animal.impl_witness) [concrete = constants.%Animal.facet] // CHECK:STDOUT: %.loc24_26.2: %Animal.type = converted constants.%Goat, %Animal.facet.loc24_26.2 [concrete = constants.%Animal.facet] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal.ref, @HandleAnimal(constants.%Animal.facet) [concrete = constants.%HandleAnimal.specific_fn] // CHECK:STDOUT: %.loc24_19.2: %Goat = bind_value %.loc24_19.1 @@ -207,7 +208,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc18_37.2 => constants.%FeedAnimal.specific_fn.5d0 +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc18_37.2 => constants.%FeedAnimal.specific_fn.82e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%Animal.facet) { diff --git a/toolchain/check/testdata/facet/min_prelude/convert_interface.carbon b/toolchain/check/testdata/facet/min_prelude/convert_interface.carbon index 9916c6127a70..b9923b6a1666 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_interface.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_interface.carbon @@ -28,13 +28,13 @@ fn G() { F(Animal); } // CHECK:STDOUT: %Self.1b5: %Eats.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness file.%Eats.impl_witness_table [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: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Animal.type, (%impl_witness) [concrete] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Animal.type, (%Eats.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,7 +58,8 @@ fn G() { F(Animal); } // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %Eats.impl_witness: = impl_witness %Eats.impl_witness_table [concrete = constants.%Eats.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %e.patt: %Eats.type = binding_pattern e // CHECK:STDOUT: %e.param_patt: %Eats.type = value_param_pattern %e.patt, call_param0 @@ -88,7 +89,7 @@ fn G() { F(Animal); } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Animal.ref as %Eats.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Eats.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%e.param_patt: %Eats.type) { @@ -100,7 +101,7 @@ fn G() { F(Animal); } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value constants.%Animal.type, (constants.%impl_witness) [concrete = constants.%Eats.facet] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value constants.%Animal.type, (constants.%Eats.impl_witness) [concrete = constants.%Eats.facet] // CHECK:STDOUT: %.loc22: %Eats.type = converted %Animal.ref, %Eats.facet [concrete = constants.%Eats.facet] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc22) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon index 9beae7921efb..8ed1cbb1dc53 100644 --- a/toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon @@ -61,10 +61,10 @@ fn G() { // CHECK:STDOUT: %F.118: %F.type.4cf = struct_value () [concrete] // CHECK:STDOUT: %Generic.assoc_type.713: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] // CHECK:STDOUT: %assoc0.9b7: %Generic.assoc_type.713 = assoc_entity element0, @Generic.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness file.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.17b: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.a56: %F.type.17b = struct_value () [concrete] -// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value %ImplsGeneric, (%impl_witness) [concrete] +// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.91ccba.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] @@ -109,7 +109,8 @@ fn G() { // CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [concrete = constants.%GenericParam] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%GenericParam)> [concrete = constants.%Generic.type.769] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Generic.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness %Generic.impl_witness_table [concrete = constants.%Generic.impl_witness] // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { // CHECK:STDOUT: %T.patt.loc26_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_22.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc26_32.1: @CallGenericMethod.%Generic.type.loc26_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc26_32.2 (constants.%U.patt.9a6)] @@ -154,7 +155,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @GenericParam { diff --git a/toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon b/toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon index 86ac87edbb85..4823de018071 100644 --- a/toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon +++ b/toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon @@ -38,7 +38,7 @@ fn F() { // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] // CHECK:STDOUT: %a: %Animal.type = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %Animal.type = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %WalkAnimal.type: type = fn_type @WalkAnimal [concrete] @@ -70,7 +70,8 @@ fn F() { // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Animal.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %Animal.impl_witness: = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness] // CHECK:STDOUT: %WalkAnimal.decl: %WalkAnimal.type = fn_decl @WalkAnimal [concrete = constants.%WalkAnimal] { // CHECK:STDOUT: %a.patt.loc19_15.1: %Animal.type = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc19_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { @@ -90,7 +91,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Goat.ref as %Animal.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Animal.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Goat { diff --git a/toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon b/toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon index 185e467ad049..62496a771d96 100644 --- a/toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon +++ b/toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon @@ -71,10 +71,10 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %Convert.993: %Convert.type.50a = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.assoc_type.e1d: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%RuntimeConvertTo) [concrete] // CHECK:STDOUT: %assoc0.c91: %ImplicitAs.assoc_type.e1d = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness file.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %Convert.type.e8b: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.e81: %Convert.type.e8b = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.580 = facet_value %RuntimeConvertFrom, (%impl_witness) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.580 = 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, element0 [symbolic] @@ -91,7 +91,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %from.patt: %RuntimeConvertFrom = symbolic_binding_pattern from, 0 [symbolic] // CHECK:STDOUT: %RuntimeConvertFrom.val: %RuntimeConvertFrom = struct_value () [concrete] // CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] -// CHECK:STDOUT: %.31e: type = fn_type_with_self_type %Convert.type.50a, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %.f4e: type = fn_type_with_self_type %Convert.type.50a, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %from, %Convert.e81 [symbolic] // CHECK:STDOUT: %A.patt.78b: %RuntimeConvertTo = symbolic_binding_pattern A, 1 [symbolic] // CHECK:STDOUT: } @@ -139,7 +139,8 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %RuntimeConvertTo.ref: type = name_ref RuntimeConvertTo, file.%RuntimeConvertTo.decl [concrete = constants.%RuntimeConvertTo] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%RuntimeConvertTo)> [concrete = constants.%ImplicitAs.type.580] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Convert.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (@impl.%Convert.decl), @impl [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc26_6.1: %tuple.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_6.2 (constants.%T.patt)] // CHECK:STDOUT: %A.patt.loc26_20.1: @F.%tuple.elem0.loc26_25.2 (%tuple.elem0) = symbolic_binding_pattern A, 1 [symbolic = %A.patt.loc26_20.2 (constants.%A.patt.f80)] @@ -220,7 +221,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .RuntimeConvertTo = // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc16_17.1: %tuple.type) { @@ -307,7 +308,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %from.ref: %RuntimeConvertFrom = name_ref from, %from [symbolic = constants.%from] // CHECK:STDOUT: %holds_to.ref: %HoldsType.066 = name_ref holds_to, %holds_to -// CHECK:STDOUT: %impl.elem0: %.31e = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Convert.e81] +// CHECK:STDOUT: %impl.elem0: %.f4e = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Convert.e81] // CHECK:STDOUT: %bound_method: = bound_method constants.%from, %impl.elem0 [symbolic = constants.%Convert.bound] // CHECK:STDOUT: %.loc40_19.1: ref %RuntimeConvertTo = temporary_storage // CHECK:STDOUT: %Convert.call: init %RuntimeConvertTo = call %bound_method(constants.%from) to %.loc40_19.1 diff --git a/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon b/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon index f8d4174cd2d0..2bd63c22253a 100644 --- a/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon @@ -156,12 +156,12 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type.473: = complete_type_witness type [concrete] @@ -182,11 +182,10 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -238,7 +237,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: generic impl @impl(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -247,7 +246,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,7 +304,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T) {} @@ -317,7 +316,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: specific @impl(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -356,7 +355,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %Z.facet: %Z.type.049 = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%C) where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant), @impl(%T) [symbolic] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -403,7 +402,8 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_20.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%Z.impl_witness (constants.%Z.impl_witness)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %Z.type.049 = binding_pattern T @@ -459,13 +459,13 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: generic impl @impl(%T.loc8_20.1: type) { // CHECK:STDOUT: %T.loc8_20.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_20.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_20.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant), @impl(%T.loc8_20.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table, @impl(%T.loc8_20.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %.loc8_40 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -509,7 +509,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc8_20.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_20.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_20.2) {} @@ -546,11 +546,11 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %assoc0.220: %BitAnd.assoc_type = assoc_entity element0, @BitAnd.%Op.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.type.28d: type = fn_type @Op.2, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.902: %Op.type.28d = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%impl_witness) [symbolic] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%BitAnd.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -577,7 +577,8 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, file.%BitAnd.decl [concrete = constants.%BitAnd.type] // CHECK:STDOUT: %T.loc21_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(%Dest.loc9_14.1: type) { @@ -705,7 +706,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: generic impl @impl(%T.loc21_14.1: type) { // CHECK:STDOUT: %T.loc21_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc21_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%Op.decl), @impl(%T.loc21_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T.loc21_14.2) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T.loc21_14.2) [symbolic = %Op.type (constants.%Op.type.28d)] @@ -734,7 +735,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -811,7 +812,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc21_14.2) {} diff --git a/toolchain/check/testdata/facet/no_prelude/access.carbon b/toolchain/check/testdata/facet/no_prelude/access.carbon index 9ae9174956d5..99e5b5b0073d 100644 --- a/toolchain/check/testdata/facet/no_prelude/access.carbon +++ b/toolchain/check/testdata/facet/no_prelude/access.carbon @@ -847,7 +847,7 @@ interface J { // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Id.specific_fn: = specific_function %Id, @Id(%I.assoc_type) [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %I.assoc_type [concrete] // CHECK:STDOUT: } @@ -891,7 +891,8 @@ interface J { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: = binding_pattern v @@ -927,7 +928,7 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc5_7.2 as %.loc5_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Id(%U.loc4_7.1: type) { diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 7420da611910..aa1420de4d07 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -27,13 +27,15 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.2b8: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.2b8 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn.b6f [concrete] @@ -42,11 +44,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.ffe: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.ffe [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] // CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] @@ -109,14 +111,14 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Add.ref: %Add.type.b1f = name_ref Add, %Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc13_25: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_25.1: = bound_method %int_1, %impl.elem0.loc13_25 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc13_25: = specific_function %impl.elem0.loc13_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc13_25.2: = bound_method %int_1, %specific_fn.loc13_25 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc13_25: init %i32 = call %bound_method.loc13_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_25.1: %i32 = value_of_initializer %int.convert_checked.loc13_25 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_25.2: %i32 = converted %int_1, %.loc13_25.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_28: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_28: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_28.1: = bound_method %int_2, %impl.elem0.loc13_28 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc13_28: = specific_function %impl.elem0.loc13_28, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc13_28.2: = bound_method %int_2, %specific_fn.loc13_28 [concrete = constants.%bound_method.b92] @@ -124,7 +126,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc13_28.1: %i32 = value_of_initializer %int.convert_checked.loc13_28 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc13_28.2: %i32 = converted %int_2, %.loc13_28.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_25.2, %.loc13_28.2) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc13_29: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0.loc13_29: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc13_29.1: = bound_method %int.sadd, %impl.elem0.loc13_29 [concrete = constants.%Convert.bound.2d6] // CHECK:STDOUT: %specific_fn.loc13_29: = specific_function %impl.elem0.loc13_29, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc13_29.2: = bound_method %int.sadd, %specific_fn.loc13_29 [concrete = constants.%bound_method.c6f] diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 4ea9b42841ff..efe38532f6b9 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -30,44 +30,47 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %assoc0.82e: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness.da7: = impl_witness (@impl.a9a.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.066: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.9ec: %F.type.066 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, (%impl_witness.da7) [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, (%I.impl_witness) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound.c1b: = bound_method %int_1.5b8, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn.aad: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method.082: = bound_method %int_1.5b8, %Convert.specific_fn.aad [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %.62e: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] +// CHECK:STDOUT: %.5c7: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] // CHECK:STDOUT: %F.bound: = bound_method %int_1.5d2, %F.9ec [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.2, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.2b8: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.2b8 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.ffe: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.ffe [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] // CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] @@ -98,7 +101,8 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.a9a.%F.decl) [concrete = constants.%impl_witness.da7] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.a9a.%F.decl), @impl.a9a [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %arr.patt: %array_type = binding_pattern arr // CHECK:STDOUT: %.loc19_1: %array_type = var_pattern %arr.patt @@ -110,7 +114,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc19_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc19_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19_24: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0.loc19_24: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc19_24.1: = bound_method %int_1, %impl.elem0.loc19_24 [concrete = constants.%Convert.bound.c1b] // CHECK:STDOUT: %specific_fn.loc19_24: = specific_function %impl.elem0.loc19_24, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.aad] // CHECK:STDOUT: %bound_method.loc19_24.2: = bound_method %int_1, %specific_fn.loc19_24 [concrete = constants.%bound_method.082] @@ -119,10 +123,10 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %.loc19_24.2: %i32 = converted %int_1, %.loc19_24.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.82e] -// CHECK:STDOUT: %impl.elem0.loc19_31: %.62e = impl_witness_access constants.%impl_witness.da7, element0 [concrete = constants.%F.9ec] +// CHECK:STDOUT: %impl.elem0.loc19_31: %.5c7 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.9ec] // CHECK:STDOUT: %bound_method.loc19_31: = bound_method %.loc19_24.2, %impl.elem0.loc19_31 [concrete = constants.%F.bound] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc19_38: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc19_38: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_38.1: = bound_method %int_2, %impl.elem0.loc19_38 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc19_38: = specific_function %impl.elem0.loc19_38, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc19_38.2: = bound_method %int_2, %specific_fn.loc19_38 [concrete = constants.%bound_method.b92] @@ -130,7 +134,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %.loc19_38.1: %i32 = value_of_initializer %int.convert_checked.loc19_38 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc19_38.2: %i32 = converted %int_2, %.loc19_38.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc19_31(%.loc19_24.2, %.loc19_38.2) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc19_39: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0.loc19_39: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc19_39.1: = bound_method %int.sadd, %impl.elem0.loc19_39 [concrete = constants.%Convert.bound.2d6] // CHECK:STDOUT: %specific_fn.loc19_39: = specific_function %impl.elem0.loc19_39, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc19_39.2: = bound_method %int.sadd, %specific_fn.loc19_39 [concrete = constants.%bound_method.c6f] @@ -211,7 +215,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index a0a12fe8a4d8..1e21a376c079 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -85,40 +85,40 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.8f8: %ImplicitAs.assoc_type.095 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] -// CHECK:STDOUT: %impl_witness.8b6: = impl_witness (@impl.c45.%Op.decl) [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.c2a: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.4e3: %Op.type.c2a = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, (%impl_witness.8b6) [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, (%Add.impl_witness) [concrete] // CHECK:STDOUT: %As.type.a09: type = facet_type <@As, @As(%i32.builtin)> [concrete] // CHECK:STDOUT: %Self.2fa: %As.type.a09 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.c0d: type = fn_type @Convert.1, @As(%i32.builtin) [concrete] // CHECK:STDOUT: %Convert.713: %Convert.type.c0d = struct_value () [concrete] // CHECK:STDOUT: %As.assoc_type.b9b: type = assoc_entity_type @As, @As(%i32.builtin) [concrete] // CHECK:STDOUT: %assoc0.b02: %As.assoc_type.b9b = assoc_entity element0, @As.%Convert.decl [concrete] -// CHECK:STDOUT: %impl_witness.213: = impl_witness (@impl.028.%Convert.decl) [concrete] +// CHECK:STDOUT: %As.impl_witness: = impl_witness file.%As.impl_witness_table [concrete] // CHECK:STDOUT: %Convert.type.fc9: type = fn_type @Convert.3 [concrete] // CHECK:STDOUT: %Convert.33c: %Convert.type.fc9 = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.a09 = facet_value Core.IntLiteral, (%impl_witness.213) [concrete] +// CHECK:STDOUT: %As.facet: %As.type.a09 = facet_value Core.IntLiteral, (%As.impl_witness) [concrete] // CHECK:STDOUT: %ImplicitAs.type.11a: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete] // CHECK:STDOUT: %Self.e0a: %ImplicitAs.type.11a = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.752: type = fn_type @Convert.2, @ImplicitAs(%i32.builtin) [concrete] // CHECK:STDOUT: %Convert.fcc: %Convert.type.752 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.assoc_type.1cf: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete] // CHECK:STDOUT: %assoc0.3ce: %ImplicitAs.assoc_type.1cf = assoc_entity element0, @ImplicitAs.%Convert.decl [concrete] -// CHECK:STDOUT: %impl_witness.48c: = impl_witness (@impl.e13.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.be0: = impl_witness file.%ImplicitAs.impl_witness_table.loc27 [concrete] // CHECK:STDOUT: %Convert.type.c2a: type = fn_type @Convert.4 [concrete] // CHECK:STDOUT: %Convert.40d: %Convert.type.c2a = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.224: %ImplicitAs.type.11a = facet_value Core.IntLiteral, (%impl_witness.48c) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.bcb: %ImplicitAs.type.11a = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.be0) [concrete] // CHECK:STDOUT: %ImplicitAs.type.9fc: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Self.37e: %ImplicitAs.type.9fc = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.60e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %Convert.c73: %Convert.type.60e = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.assoc_type.014: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %assoc0.757: %ImplicitAs.assoc_type.014 = assoc_entity element0, @ImplicitAs.%Convert.decl [concrete] -// CHECK:STDOUT: %impl_witness.caf: = impl_witness (@impl.3df.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.95b: = impl_witness file.%ImplicitAs.impl_witness_table.loc31 [concrete] // CHECK:STDOUT: %Convert.type.295: type = fn_type @Convert.5 [concrete] // CHECK:STDOUT: %Convert.2bf: %Convert.type.295 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.b1b: %ImplicitAs.type.9fc = facet_value %i32.builtin, (%impl_witness.caf) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.a85: %ImplicitAs.type.9fc = facet_value %i32.builtin, (%ImplicitAs.impl_witness.95b) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -171,7 +171,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed, %.loc19_6.1 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [concrete = constants.%Add.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc19: = impl_witness (@impl.c45.%Op.decl) [concrete = constants.%impl_witness.8b6] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (@impl.c45.%Op.decl), @impl.c45 [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table [concrete = constants.%Add.impl_witness] // CHECK:STDOUT: impl_decl @impl.028 [concrete] {} { // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] @@ -184,7 +185,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc23_28.2: type = converted %int.make_type_signed, %.loc23_28.1 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32.builtin)> [concrete = constants.%As.type.a09] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc23: = impl_witness (@impl.028.%Convert.decl) [concrete = constants.%impl_witness.213] +// CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (@impl.028.%Convert.decl), @impl.028 [concrete] +// CHECK:STDOUT: %As.impl_witness: = impl_witness %As.impl_witness_table [concrete = constants.%As.impl_witness] // CHECK:STDOUT: impl_decl @impl.e13 [concrete] {} { // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] @@ -197,7 +199,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc27_36.2: type = converted %int.make_type_signed, %.loc27_36.1 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32.builtin)> [concrete = constants.%ImplicitAs.type.11a] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc27: = impl_witness (@impl.e13.%Convert.decl) [concrete = constants.%impl_witness.48c] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc27 = impl_witness_table (@impl.e13.%Convert.decl), @impl.e13 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc27: = impl_witness %ImplicitAs.impl_witness_table.loc27 [concrete = constants.%ImplicitAs.impl_witness.be0] // CHECK:STDOUT: impl_decl @impl.3df [concrete] {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin] @@ -210,7 +213,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc31_36.2: type = converted %int_literal.make_type, %.loc31_36.1 [concrete = Core.IntLiteral] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete = constants.%ImplicitAs.type.9fc] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc31: = impl_witness (@impl.3df.%Convert.decl) [concrete = constants.%impl_witness.caf] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc31 = impl_witness_table (@impl.3df.%Convert.decl), @impl.3df [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc31: = impl_witness %ImplicitAs.impl_witness_table.loc31 [concrete = constants.%ImplicitAs.impl_witness.95b] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { @@ -357,7 +361,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc19 +// CHECK:STDOUT: witness = file.%Add.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.028: %.loc23_17.2 as %As.type { @@ -380,7 +384,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc23 +// CHECK:STDOUT: witness = file.%As.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.e13: %.loc27_17.2 as %ImplicitAs.type { @@ -403,7 +407,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc27 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc27 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3df: %.loc31_6.2 as %ImplicitAs.type { @@ -427,7 +431,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: !members: // CHECK:STDOUT: .IntLiteral = // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc31 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type"; @@ -542,10 +546,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.3ce // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%i32.builtin, constants.%ImplicitAs.facet.224) { +// CHECK:STDOUT: specific @Convert.2(constants.%i32.builtin, constants.%ImplicitAs.facet.bcb) { // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.11a -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.224 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.bcb // CHECK:STDOUT: %Self.as_type.loc16_20.1 => Core.IntLiteral // CHECK:STDOUT: } // CHECK:STDOUT: @@ -562,10 +566,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.757 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(Core.IntLiteral, constants.%ImplicitAs.facet.b1b) { +// CHECK:STDOUT: specific @Convert.2(Core.IntLiteral, constants.%ImplicitAs.facet.a85) { // CHECK:STDOUT: %T => Core.IntLiteral // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fc -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.b1b +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.a85 // CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%i32.builtin // CHECK:STDOUT: } // CHECK:STDOUT: @@ -614,9 +618,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Convert.0e2: %Convert.type.71e = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.assoc_type.959: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %assoc0.8c4: %ImplicitAs.assoc_type.959 = assoc_entity element0, imports.%Core.import_ref.1c752f.2 [concrete] -// CHECK:STDOUT: %impl_witness.d9b: = impl_witness (imports.%Core.import_ref.73a) [concrete] -// CHECK:STDOUT: %As.facet: %As.type.a6d = facet_value Core.IntLiteral, (%impl_witness.d9b) [concrete] -// CHECK:STDOUT: %.425: type = fn_type_with_self_type %Convert.type.378, %As.facet [concrete] +// CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (imports.%Core.import_ref.73a), @impl.2cc [concrete] +// CHECK:STDOUT: %As.impl_witness: = impl_witness %As.impl_witness_table [concrete] +// CHECK:STDOUT: %As.facet: %As.type.a6d = facet_value Core.IntLiteral, (%As.impl_witness) [concrete] +// CHECK:STDOUT: %.387: type = fn_type_with_self_type %Convert.type.378, %As.facet [concrete] // CHECK:STDOUT: %Convert.type.953: type = fn_type @Convert.3 [concrete] // CHECK:STDOUT: %Convert.5bc: %Convert.type.953 = struct_value () [concrete] // CHECK:STDOUT: %Convert.bound.b34: = bound_method %int_1.5b8, %Convert.5bc [concrete] @@ -628,17 +633,19 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.c7d: %Add.assoc_type = assoc_entity element0, imports.%Core.import_ref.6dd [concrete] // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %Self.as_type.da9: type = facet_access_type %Self.a99 [symbolic] -// CHECK:STDOUT: %impl_witness.bd0: = impl_witness (imports.%Core.import_ref.db4) [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, (%impl_witness.bd0) [concrete] -// CHECK:STDOUT: %.6d9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (imports.%Core.import_ref.db4), @impl.a1d [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, (%Add.impl_witness) [concrete] +// CHECK:STDOUT: %.a7d: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] // CHECK:STDOUT: %Op.type.240: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.0e2: %Op.type.240 = struct_value () [concrete] // CHECK:STDOUT: %Op.bound.393: = bound_method %int_1.f38, %Op.0e2 [concrete] // CHECK:STDOUT: %int_3.a0f: %i32.builtin = int_value 3 [concrete] // CHECK:STDOUT: %assoc0.dc001e.2: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic] -// CHECK:STDOUT: %impl_witness.8f3: = impl_witness (imports.%Core.import_ref.4f9) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.4e9: %ImplicitAs.type.2fd = facet_value %i32.builtin, (%impl_witness.8f3) [concrete] -// CHECK:STDOUT: %.89c: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.4e9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.5fc = impl_witness_table (imports.%Core.import_ref.4f9), @impl.ddc [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.9c5: = impl_witness %ImplicitAs.impl_witness_table.5fc [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.07b: %ImplicitAs.type.2fd = facet_value %i32.builtin, (%ImplicitAs.impl_witness.9c5) [concrete] +// CHECK:STDOUT: %.53b: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.07b [concrete] // CHECK:STDOUT: %Convert.type.0e4: type = fn_type @Convert.4 [concrete] // CHECK:STDOUT: %Convert.b32: %Convert.type.0e4 = struct_value () [concrete] // CHECK:STDOUT: %Convert.bound.65a: = bound_method %int_3.a0f, %Convert.b32 [concrete] @@ -652,9 +659,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int_7: %i32.builtin = int_value 7 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32.builtin) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %impl_witness.39c: = impl_witness (imports.%Core.import_ref.f35) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.673: %ImplicitAs.type.61e = facet_value Core.IntLiteral, (%impl_witness.39c) [concrete] -// CHECK:STDOUT: %.5e0: type = fn_type_with_self_type %Convert.type.059, %ImplicitAs.facet.673 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.78e = impl_witness_table (imports.%Core.import_ref.f35), @impl.68b [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.07a: = impl_witness %ImplicitAs.impl_witness_table.78e [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.a3d: %ImplicitAs.type.61e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.07a) [concrete] +// CHECK:STDOUT: %.ec1: type = fn_type_with_self_type %Convert.type.059, %ImplicitAs.facet.a3d [concrete] // CHECK:STDOUT: %Convert.type.49f: type = fn_type @Convert.5 [concrete] // CHECK:STDOUT: %Convert.cb5: %Convert.type.49f = struct_value () [concrete] // CHECK:STDOUT: %Convert.bound.b6b: = bound_method %int_3.1ba, %Convert.cb5 [concrete] @@ -680,23 +688,23 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Core.import_ref.07c = import_ref Core//default, inst41 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.f6c: %Add.assoc_type = import_ref Core//default, loc8_41, loaded [concrete = constants.%assoc0.c7d] // CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded -// CHECK:STDOUT: %Core.import_ref.595: = import_ref Core//default, loc19_17, loaded [concrete = constants.%impl_witness.bd0] +// CHECK:STDOUT: %Core.import_ref.902: = import_ref Core//default, loc19_17, loaded [concrete = constants.%Add.impl_witness] // CHECK:STDOUT: %Core.import_ref.c8c7cd.1: type = import_ref Core//default, loc19_6, loaded [concrete = constants.%i32.builtin] // CHECK:STDOUT: %Core.import_ref.bf0: type = import_ref Core//default, loc19_13, loaded [concrete = constants.%Add.type] -// CHECK:STDOUT: %Core.import_ref.8aa: = import_ref Core//default, loc23_30, loaded [concrete = constants.%impl_witness.d9b] +// CHECK:STDOUT: %Core.import_ref.cb6: = import_ref Core//default, loc23_30, loaded [concrete = constants.%As.impl_witness] // CHECK:STDOUT: %Core.import_ref.8721d7.1: type = import_ref Core//default, loc23_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.1e5: type = import_ref Core//default, loc23_28, loaded [concrete = constants.%As.type.a6d] // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst126 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc001e.2)] // CHECK:STDOUT: %Core.Convert.e69 = import_ref Core//default, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.de9: = import_ref Core//default, loc27_38, loaded [concrete = constants.%impl_witness.39c] +// CHECK:STDOUT: %Core.import_ref.c62: = import_ref Core//default, loc27_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a] // CHECK:STDOUT: %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e] // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst126 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc16_32, unloaded -// CHECK:STDOUT: %Core.import_ref.3b6: = import_ref Core//default, loc31_38, loaded [concrete = constants.%impl_witness.8f3] +// CHECK:STDOUT: %Core.import_ref.c5f: = import_ref Core//default, loc31_38, loaded [concrete = constants.%ImplicitAs.impl_witness.9c5] // CHECK:STDOUT: %Core.import_ref.c8c7cd.2: type = import_ref Core//default, loc31_6, loaded [concrete = constants.%i32.builtin] // CHECK:STDOUT: %Core.import_ref.efb: type = import_ref Core//default, loc31_36, loaded [concrete = constants.%ImplicitAs.type.2fd] // CHECK:STDOUT: %Core.import_ref.442: %Add.type = import_ref Core//default, inst41 [no loc], loaded [symbolic = constants.%Self.a99] @@ -721,7 +729,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_24: %.425 = impl_witness_access constants.%impl_witness.d9b, element0 [concrete = constants.%Convert.5bc] +// CHECK:STDOUT: %impl.elem0.loc4_24: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc] // CHECK:STDOUT: %bound_method.loc4_24: = bound_method %int_1, %impl.elem0.loc4_24 [concrete = constants.%Convert.bound.b34] // CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32.builtin = call %bound_method.loc4_24(%int_1) [concrete = constants.%int_1.f38] // CHECK:STDOUT: %.loc4_24.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_24 [concrete = constants.%int_1.f38] @@ -731,17 +739,17 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int.make_type_signed.loc4_40: init type = call constants.%Int(%int_32.loc4_40) [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_40.1: type = value_of_initializer %int.make_type_signed.loc4_40 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_40.2: type = converted %int.make_type_signed.loc4_40, %.loc4_40.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_37: %.425 = impl_witness_access constants.%impl_witness.d9b, element0 [concrete = constants.%Convert.5bc] +// CHECK:STDOUT: %impl.elem0.loc4_37: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc] // CHECK:STDOUT: %bound_method.loc4_37: = bound_method %int_2, %impl.elem0.loc4_37 [concrete = constants.%Convert.bound.324] // CHECK:STDOUT: %int.convert_checked.loc4_37: init %i32.builtin = call %bound_method.loc4_37(%int_2) [concrete = constants.%int_2.5a1] // CHECK:STDOUT: %.loc4_37.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_37 [concrete = constants.%int_2.5a1] // CHECK:STDOUT: %.loc4_37.2: %i32.builtin = converted %int_2, %.loc4_37.1 [concrete = constants.%int_2.5a1] -// CHECK:STDOUT: %impl.elem0.loc4_32.1: %.6d9 = impl_witness_access constants.%impl_witness.bd0, element0 [concrete = constants.%Op.0e2] +// CHECK:STDOUT: %impl.elem0.loc4_32.1: %.a7d = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.0e2] // CHECK:STDOUT: %bound_method.loc4_32.1: = bound_method %.loc4_24.2, %impl.elem0.loc4_32.1 [concrete = constants.%Op.bound.393] // CHECK:STDOUT: %int.sadd: init %i32.builtin = call %bound_method.loc4_32.1(%.loc4_24.2, %.loc4_37.2) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %int.make_type_signed.loc4_16 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_signed.loc4_16, %.loc4_16.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_32.2: %.89c = impl_witness_access constants.%impl_witness.8f3, element0 [concrete = constants.%Convert.b32] +// CHECK:STDOUT: %impl.elem0.loc4_32.2: %.53b = impl_witness_access constants.%ImplicitAs.impl_witness.9c5, element0 [concrete = constants.%Convert.b32] // CHECK:STDOUT: %bound_method.loc4_32.2: = bound_method %int.sadd, %impl.elem0.loc4_32.2 [concrete = constants.%Convert.bound.65a] // CHECK:STDOUT: %.loc4_32.1: %i32.builtin = value_of_initializer %int.sadd [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_32.2: %i32.builtin = converted %int.sadd, %.loc4_32.1 [concrete = constants.%int_3.a0f] @@ -802,22 +810,22 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a1d: imports.%Core.import_ref.c8c7cd.1 as imports.%Core.import_ref.bf0 [from "core.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.595 +// CHECK:STDOUT: witness = imports.%Core.import_ref.902 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2cc: imports.%Core.import_ref.8721d7.1 as imports.%Core.import_ref.1e5 [from "core.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.8aa +// CHECK:STDOUT: witness = imports.%Core.import_ref.cb6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.68b: imports.%Core.import_ref.8721d7.2 as imports.%Core.import_ref.4d9 [from "core.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.de9 +// CHECK:STDOUT: witness = imports.%Core.import_ref.c62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.ddc: imports.%Core.import_ref.c8c7cd.2 as imports.%Core.import_ref.efb [from "core.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.3b6 +// CHECK:STDOUT: witness = imports.%Core.import_ref.c5f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param_patt: Core.IntLiteral) -> type = "int.make_type_signed" [from "core.carbon"]; @@ -864,7 +872,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int.make_type_signed.loc4_61: init type = call constants.%Int(%int_32.loc4_61) [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_61.1: type = value_of_initializer %int.make_type_signed.loc4_61 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_61.2: type = converted %int.make_type_signed.loc4_61, %.loc4_61.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_58: %.425 = impl_witness_access constants.%impl_witness.d9b, element0 [concrete = constants.%Convert.5bc] +// CHECK:STDOUT: %impl.elem0.loc4_58: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc] // CHECK:STDOUT: %bound_method.loc4_58: = bound_method %int_3.loc4_56, %impl.elem0.loc4_58 [concrete = constants.%Convert.bound.94d] // CHECK:STDOUT: %int.convert_checked.loc4_58: init %i32.builtin = call %bound_method.loc4_58(%int_3.loc4_56) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_58.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_58 [concrete = constants.%int_3.a0f] @@ -874,23 +882,23 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int.make_type_signed.loc4_74: init type = call constants.%Int(%int_32.loc4_74) [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_74.1: type = value_of_initializer %int.make_type_signed.loc4_74 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_74.2: type = converted %int.make_type_signed.loc4_74, %.loc4_74.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_71: %.425 = impl_witness_access constants.%impl_witness.d9b, element0 [concrete = constants.%Convert.5bc] +// CHECK:STDOUT: %impl.elem0.loc4_71: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc] // CHECK:STDOUT: %bound_method.loc4_71: = bound_method %int_4.loc4_69, %impl.elem0.loc4_71 [concrete = constants.%Convert.bound.8fc] // CHECK:STDOUT: %int.convert_checked.loc4_71: init %i32.builtin = call %bound_method.loc4_71(%int_4.loc4_69) [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc4_71.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_71 [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc4_71.2: %i32.builtin = converted %int_4.loc4_69, %.loc4_71.1 [concrete = constants.%int_4.4f1] -// CHECK:STDOUT: %impl.elem0.loc4_66: %.6d9 = impl_witness_access constants.%impl_witness.bd0, element0 [concrete = constants.%Op.0e2] +// CHECK:STDOUT: %impl.elem0.loc4_66: %.a7d = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.0e2] // CHECK:STDOUT: %bound_method.loc4_66: = bound_method %.loc4_58.2, %impl.elem0.loc4_66 [concrete = constants.%Op.bound.423] // CHECK:STDOUT: %int.sadd: init %i32.builtin = call %bound_method.loc4_66(%.loc4_58.2, %.loc4_71.2) [concrete = constants.%int_7] // CHECK:STDOUT: %.loc4_78.1: %tuple.type = tuple_literal (%int_3.loc4_49, %int_4.loc4_52, %int.sadd) -// CHECK:STDOUT: %impl.elem0.loc4_78.1: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc4_78.1: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc4_78.1: = bound_method %int_3.loc4_49, %impl.elem0.loc4_78.1 [concrete = constants.%Convert.bound.b6b] // CHECK:STDOUT: %int.convert_checked.loc4_78.1: init %i32.builtin = call %bound_method.loc4_78.1(%int_3.loc4_49) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_78.2: init %i32.builtin = converted %int_3.loc4_49, %int.convert_checked.loc4_78.1 [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc4_78.3: ref %i32.builtin = array_index file.%arr.var, %int_0 // CHECK:STDOUT: %.loc4_78.4: init %i32.builtin = initialize_from %.loc4_78.2 to %.loc4_78.3 [concrete = constants.%int_3.a0f] -// CHECK:STDOUT: %impl.elem0.loc4_78.2: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc4_78.2: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc4_78.2: = bound_method %int_4.loc4_52, %impl.elem0.loc4_78.2 [concrete = constants.%Convert.bound.626] // CHECK:STDOUT: %int.convert_checked.loc4_78.2: init %i32.builtin = call %bound_method.loc4_78.2(%int_4.loc4_52) [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc4_78.5: init %i32.builtin = converted %int_4.loc4_52, %int.convert_checked.loc4_78.2 [concrete = constants.%int_4.4f1] diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 08884c825a80..6caa88927f4d 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -28,11 +28,12 @@ fn Main() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -90,7 +91,7 @@ fn Main() { // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [concrete = constants.%Echo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_21.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_21.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index a1702776c05b..10d3a5bb87dd 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -32,11 +32,12 @@ fn Main() { // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -101,7 +102,7 @@ fn Main() { // CHECK:STDOUT: %x.var: ref %tuple.type.a1c = var x // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc14_22.1: %tuple.type.985 = tuple_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc14: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_22.1: = bound_method %int_1, %impl.elem0.loc14 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_22.2: = bound_method %int_1, %specific_fn.loc14 [concrete = constants.%bound_method.9a1] @@ -123,7 +124,7 @@ fn Main() { // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %x.ref, element0 // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %.loc16_8: %i32 = bind_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0.loc16: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_12.1: = bound_method %int_6, %impl.elem0.loc16 [concrete = constants.%Convert.bound.ce9] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_12.2: = bound_method %int_6, %specific_fn.loc16 [concrete = constants.%bound_method.efa] diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 645f5e8858c1..9c8debd2764e 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -27,11 +27,12 @@ fn Main() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -77,7 +78,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_7.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_7.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 759e496eb977..40264bdcf447 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -28,11 +28,12 @@ fn Main() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -78,7 +79,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc14: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_7.1: = bound_method %int_1.loc14, %impl.elem0.loc14 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_7.2: = bound_method %int_1.loc14, %specific_fn.loc14 [concrete = constants.%bound_method] @@ -88,7 +89,7 @@ fn Main() { // CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.2) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc15: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_7.1: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_7.2: = bound_method %int_1.loc15, %specific_fn.loc15 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 01bcbb35d69f..1c30a116f10d 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -28,11 +28,12 @@ fn Main() { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -90,14 +91,14 @@ fn Main() { // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc14_7: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_7.1: = bound_method %int_1, %impl.elem0.loc14_7 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14_7: = specific_function %impl.elem0.loc14_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_7.2: = bound_method %int_1, %specific_fn.loc14_7 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %bound_method.loc14_7.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1, %.loc14_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_10: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_10.1: = bound_method %int_2, %impl.elem0.loc14_10 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc14_10: = specific_function %impl.elem0.loc14_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_10.2: = bound_method %int_2, %specific_fn.loc14_10 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index e623f8475b94..1cd606804e8d 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -29,11 +29,12 @@ fn Main() { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -91,14 +92,14 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc14_7: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_7.1: = bound_method %int_1.loc14, %impl.elem0.loc14_7 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14_7: = specific_function %impl.elem0.loc14_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_7.2: = bound_method %int_1.loc14, %specific_fn.loc14_7 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %bound_method.loc14_7.2(%int_1.loc14) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1.loc14, %.loc14_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_10: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_10.1: = bound_method %int_2.loc14, %impl.elem0.loc14_10 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc14_10: = specific_function %impl.elem0.loc14_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_10.2: = bound_method %int_2.loc14, %specific_fn.loc14_10 [concrete = constants.%bound_method.b92] @@ -109,14 +110,14 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc15_7: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_7.1: = bound_method %int_1.loc15, %impl.elem0.loc15_7 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc15_7: = specific_function %impl.elem0.loc15_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_7.2: = bound_method %int_1.loc15, %specific_fn.loc15_7 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc15_7: init %i32 = call %bound_method.loc15_7.2(%int_1.loc15) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_7.1: %i32 = value_of_initializer %int.convert_checked.loc15_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_7.2: %i32 = converted %int_1.loc15, %.loc15_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc15_10: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_10.1: = bound_method %int_2.loc15, %impl.elem0.loc15_10 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc15_10: = specific_function %impl.elem0.loc15_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_10.2: = bound_method %int_2.loc15, %specific_fn.loc15_10 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index fff199935e66..e39dc5218875 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -44,11 +44,12 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -150,7 +151,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_29.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_29.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 95f95952c255..080ef1598e50 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -455,11 +455,12 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -580,7 +581,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc7: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_16.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_16.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] @@ -592,7 +593,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.985 = tuple_literal (%int_1.loc8) -// CHECK:STDOUT: %impl.elem0.loc8: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_25.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] @@ -635,11 +636,12 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -777,7 +779,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc53: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc53: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] @@ -789,7 +791,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) -// CHECK:STDOUT: %impl.elem0.loc54: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc54: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] @@ -832,11 +834,12 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.b97: = impl_witness (imports.%Core.import_ref.a86), @impl.c81(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.e36 = impl_witness_table (imports.%Core.import_ref.a86), @impl.c81 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness %ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%impl_witness.b97) [concrete] -// CHECK:STDOUT: %.b14: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.16d [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -974,7 +977,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc13: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0.loc13: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc13_16.1: = bound_method %int_1.loc13, %impl.elem0.loc13 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_16.2: = bound_method %int_1.loc13, %specific_fn.loc13 [concrete = constants.%bound_method] @@ -986,7 +989,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc14_25.1: %tuple.type.985 = tuple_literal (%int_1.loc14) -// CHECK:STDOUT: %impl.elem0.loc14: %.b14 = impl_witness_access constants.%impl_witness.b97, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %impl.elem0.loc14: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc14_25.1: = bound_method %int_1.loc14, %impl.elem0.loc14 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_25.2: = bound_method %int_1.loc14, %specific_fn.loc14 [concrete = constants.%bound_method] @@ -1020,11 +1023,12 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -1145,7 +1149,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc53: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc53: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] @@ -1157,7 +1161,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) -// CHECK:STDOUT: %impl.elem0.loc54: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc54: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] @@ -1191,11 +1195,12 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -1316,7 +1321,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc53: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc53: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] @@ -1328,7 +1333,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) -// CHECK:STDOUT: %impl.elem0.loc54: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc54: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index aa217b6ea1d7..fbaa850f8243 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -249,11 +249,12 @@ fn D() {} // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -338,7 +339,7 @@ fn D() {} // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc7: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_16.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_16.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] @@ -350,7 +351,7 @@ fn D() {} // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.985 = tuple_literal (%int_1.loc8) -// CHECK:STDOUT: %impl.elem0.loc8: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_25.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon index f4e93ce31f33..156f93a95467 100644 --- a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon +++ b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon @@ -58,20 +58,20 @@ fn G() { // CHECK:STDOUT: %F.118: %F.type.4cf = struct_value () [concrete] // CHECK:STDOUT: %Generic.assoc_type.713: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] // CHECK:STDOUT: %assoc0.9b7: %Generic.assoc_type.713 = assoc_entity element0, @Generic.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness.b42: = impl_witness (@impl.046.%F.decl) [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness file.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.17b: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.a56: %F.type.17b = struct_value () [concrete] -// CHECK:STDOUT: %Generic.facet.8bd: %Generic.type.769 = facet_value %ImplsGeneric, (%impl_witness.b42) [concrete] +// CHECK:STDOUT: %Generic.facet.8ff: %Generic.type.769 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] // CHECK:STDOUT: %Other.type: type = facet_type <@Other> [concrete] // CHECK:STDOUT: %Self.807: %Other.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.0c6: type = fn_type @G.1 [concrete] // CHECK:STDOUT: %G.17f: %G.type.0c6 = struct_value () [concrete] // CHECK:STDOUT: %Other.assoc_type: type = assoc_entity_type @Other [concrete] // CHECK:STDOUT: %assoc0.25d: %Other.assoc_type = assoc_entity element0, @Other.%G.decl [concrete] -// CHECK:STDOUT: %impl_witness.51c: = impl_witness (@impl.728.%G.decl) [concrete] +// CHECK:STDOUT: %Other.impl_witness: = impl_witness file.%Other.impl_witness_table [concrete] // CHECK:STDOUT: %G.type.58d: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.b67: %G.type.58d = struct_value () [concrete] -// CHECK:STDOUT: %Other.facet: %Other.type = facet_value %ImplsGeneric, (%impl_witness.51c) [concrete] +// CHECK:STDOUT: %Other.facet: %Other.type = facet_value %ImplsGeneric, (%Other.impl_witness) [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.91ccba.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] @@ -94,9 +94,9 @@ fn G() { // CHECK:STDOUT: %G.type.9f9: type = fn_type @G.3 [concrete] // CHECK:STDOUT: %G.57b: %G.type.9f9 = struct_value () [concrete] // CHECK:STDOUT: %U.patt.8ea: %Generic.type.769 = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet.8bd) [concrete] +// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet.8ff) [concrete] // CHECK:STDOUT: %complete_type.997: = complete_type_witness %Generic.type.769 [concrete] -// CHECK:STDOUT: %.1eb: type = fn_type_with_self_type %F.type.4cf, %Generic.facet.8bd [concrete] +// CHECK:STDOUT: %.3e6: type = fn_type_with_self_type %F.type.4cf, %Generic.facet.8ff [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -130,13 +130,15 @@ fn G() { // CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [concrete = constants.%GenericParam] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%GenericParam)> [concrete = constants.%Generic.type.769] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc18: = impl_witness (@impl.046.%F.decl) [concrete = constants.%impl_witness.b42] +// CHECK:STDOUT: %Generic.impl_witness_table = impl_witness_table (@impl.046.%F.decl), @impl.046 [concrete] +// CHECK:STDOUT: %Generic.impl_witness: = impl_witness %Generic.impl_witness_table [concrete = constants.%Generic.impl_witness] // CHECK:STDOUT: %Other.decl: type = interface_decl @Other [concrete = constants.%Other.type] {} {} // CHECK:STDOUT: impl_decl @impl.728 [concrete] {} { // CHECK:STDOUT: %ImplsGeneric.ref: type = name_ref ImplsGeneric, file.%ImplsGeneric.decl [concrete = constants.%ImplsGeneric] // CHECK:STDOUT: %Other.ref: type = name_ref Other, file.%Other.decl [concrete = constants.%Other.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc25: = impl_witness (@impl.728.%G.decl) [concrete = constants.%impl_witness.51c] +// CHECK:STDOUT: %Other.impl_witness_table = impl_witness_table (@impl.728.%G.decl), @impl.728 [concrete] +// CHECK:STDOUT: %Other.impl_witness: = impl_witness %Other.impl_witness_table [concrete = constants.%Other.impl_witness] // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { // CHECK:STDOUT: %T.patt.loc29_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc29_22.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc29_32.1: @CallGenericMethod.%Generic.type.loc29_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc29_32.2 (constants.%U.patt.9a6)] @@ -192,7 +194,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc18 +// CHECK:STDOUT: witness = file.%Generic.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.728: %ImplsGeneric.ref as %Other.ref { @@ -200,7 +202,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc25 +// CHECK:STDOUT: witness = file.%Other.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @GenericParam { @@ -275,9 +277,9 @@ fn G() { // CHECK:STDOUT: %CallGenericMethod.ref: %CallGenericMethod.type = name_ref CallGenericMethod, file.%CallGenericMethod.decl [concrete = constants.%CallGenericMethod] // CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [concrete = constants.%GenericParam] // CHECK:STDOUT: %ImplsGeneric.ref: type = name_ref ImplsGeneric, file.%ImplsGeneric.decl [concrete = constants.%ImplsGeneric] -// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%impl_witness.b42) [concrete = constants.%Generic.facet.8bd] -// CHECK:STDOUT: %.loc34: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [concrete = constants.%Generic.facet.8bd] -// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8bd) [concrete = constants.%CallGenericMethod.specific_fn] +// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, (constants.%Generic.impl_witness) [concrete = constants.%Generic.facet.8ff] +// CHECK:STDOUT: %.loc34: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [concrete = constants.%Generic.facet.8ff] +// CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8ff) [concrete = constants.%CallGenericMethod.specific_fn] // CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -304,7 +306,7 @@ fn G() { // CHECK:STDOUT: %assoc0.loc12_9.2 => constants.%assoc0.9b7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%GenericParam, constants.%Generic.facet.8bd) {} +// CHECK:STDOUT: specific @F.1(constants.%GenericParam, constants.%Generic.facet.8ff) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self.807) {} // CHECK:STDOUT: @@ -337,11 +339,11 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(@CallGenericMethod.%T.loc29_22.2, @CallGenericMethod.%Generic.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8bd) { +// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8ff) { // CHECK:STDOUT: %T.loc29_22.2 => constants.%GenericParam // CHECK:STDOUT: %T.patt.loc29_22.2 => constants.%T.patt // CHECK:STDOUT: %Generic.type.loc29_45.2 => constants.%Generic.type.769 -// CHECK:STDOUT: %U.loc29_32.2 => constants.%Generic.facet.8bd +// CHECK:STDOUT: %U.loc29_32.2 => constants.%Generic.facet.8ff // CHECK:STDOUT: %U.patt.loc29_32.2 => constants.%U.patt.8ea // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -349,10 +351,10 @@ fn G() { // CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.713 // CHECK:STDOUT: %assoc0 => constants.%assoc0.9b7 // CHECK:STDOUT: %U.as_type.loc30_4.2 => constants.%ImplsGeneric -// CHECK:STDOUT: %U.as_wit.iface0.loc30_4.2 => constants.%impl_witness.b42 +// CHECK:STDOUT: %U.as_wit.iface0.loc30_4.2 => constants.%Generic.impl_witness // CHECK:STDOUT: %F.type => constants.%F.type.4cf -// CHECK:STDOUT: %Generic.facet => constants.%Generic.facet.8bd -// CHECK:STDOUT: %.loc30_4.3 => constants.%.1eb +// CHECK:STDOUT: %Generic.facet => constants.%Generic.facet.8ff +// CHECK:STDOUT: %.loc30_4.3 => constants.%.3e6 // CHECK:STDOUT: %impl.elem0.loc30_4.2 => constants.%F.a56 // CHECK:STDOUT: %specific_impl_fn.loc30_4.2 => constants.%F.a56 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index e1206e0cd36a..e054ecbf51b4 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -819,11 +819,12 @@ fn F() { // CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam, @TupleParam(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] @@ -888,7 +889,7 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc7_19.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) // CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [concrete = constants.%TupleParam.specific_fn] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_19.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_19.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] @@ -937,11 +938,12 @@ fn F() { // CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam, @StructParam(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] @@ -1005,7 +1007,7 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc7_30.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [concrete = constants.%StructParam.specific_fn] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_30.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_30.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] @@ -1508,13 +1510,13 @@ fn F() { // CHECK:STDOUT: %EE: type = class_type @EE [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %Z.impl_witness.354: = impl_witness file.%Z.impl_witness_table.loc6 [concrete] // CHECK:STDOUT: %E: type = bind_symbolic_name E, 0 [symbolic] // CHECK:STDOUT: %E.patt: type = symbolic_binding_pattern E, 0 [symbolic] // CHECK:STDOUT: %DD.type: type = generic_class_type @DD [concrete] // CHECK:STDOUT: %DD.generic: %DD.type = struct_value () [concrete] // CHECK:STDOUT: %DD.296: type = class_type @DD, @DD(%E) [symbolic] -// CHECK:STDOUT: %impl_witness.d1b: = impl_witness (), @impl.266(%E) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.c98: = impl_witness file.%Z.impl_witness_table.loc9, @impl.266(%E) [symbolic] // CHECK:STDOUT: %D: %Z.type = bind_symbolic_name D, 0 [symbolic] // CHECK:STDOUT: %D.patt: %Z.type = symbolic_binding_pattern D, 0 [symbolic] // CHECK:STDOUT: %CC.type: type = generic_class_type @CC [concrete] @@ -1523,15 +1525,15 @@ fn F() { // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %DD.296, @Z [symbolic] // CHECK:STDOUT: %Z.facet.aae: %Z.type = facet_value %DD.296, (%Z.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %CC.23e: type = class_type @CC, @CC(%Z.facet.aae) [symbolic] -// CHECK:STDOUT: %impl_witness.1a4: = impl_witness (), @impl.497(%E) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.b58: = impl_witness file.%Z.impl_witness_table.loc12, @impl.497(%E) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %DD.689: type = class_type @DD, @DD(%EE) [concrete] -// CHECK:STDOUT: %impl_witness.f62: = impl_witness (), @impl.266(%EE) [concrete] -// CHECK:STDOUT: %Z.facet.85b: %Z.type = facet_value %DD.689, (%impl_witness.f62) [concrete] -// CHECK:STDOUT: %CC.4de: type = class_type @CC, @CC(%Z.facet.85b) [concrete] -// CHECK:STDOUT: %impl_witness.ebe: = impl_witness (), @impl.497(%EE) [concrete] -// CHECK:STDOUT: %Z.facet.833: %Z.type = facet_value %CC.4de, (%impl_witness.ebe) [concrete] +// CHECK:STDOUT: %Z.impl_witness.0e8: = impl_witness file.%Z.impl_witness_table.loc9, @impl.266(%EE) [concrete] +// CHECK:STDOUT: %Z.facet.a96: %Z.type = facet_value %DD.689, (%Z.impl_witness.0e8) [concrete] +// CHECK:STDOUT: %CC.402: type = class_type @CC, @CC(%Z.facet.a96) [concrete] +// CHECK:STDOUT: %Z.impl_witness.db1: = impl_witness file.%Z.impl_witness_table.loc12, @impl.497(%EE) [concrete] +// CHECK:STDOUT: %Z.facet.49b: %Z.type = facet_value %CC.402, (%Z.impl_witness.db1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1557,7 +1559,8 @@ fn F() { // CHECK:STDOUT: %EE.ref: type = name_ref EE, file.%EE.decl [concrete = constants.%EE] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc6: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %Z.impl_witness_table.loc6 = impl_witness_table (), @impl.a6b [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc6: = impl_witness %Z.impl_witness_table.loc6 [concrete = constants.%Z.impl_witness.354] // CHECK:STDOUT: %DD.decl: %DD.type = class_decl @DD [concrete = constants.%DD.generic] { // CHECK:STDOUT: %E.patt.loc8_10.1: type = symbolic_binding_pattern E, 0 [symbolic = %E.patt.loc8_10.2 (constants.%E.patt)] // CHECK:STDOUT: } { @@ -1572,7 +1575,8 @@ fn F() { // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %E.loc9_14.1: type = bind_symbolic_name E, 0 [symbolic = %E.loc9_14.2 (constants.%E)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc9: = impl_witness (), @impl.266(constants.%E) [symbolic = @impl.266.%impl_witness (constants.%impl_witness.d1b)] +// CHECK:STDOUT: %Z.impl_witness_table.loc9 = impl_witness_table (), @impl.266 [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc9: = impl_witness %Z.impl_witness_table.loc9, @impl.266(constants.%E) [symbolic = @impl.266.%Z.impl_witness (constants.%Z.impl_witness.c98)] // CHECK:STDOUT: %CC.decl: %CC.type = class_decl @CC [concrete = constants.%CC.generic] { // CHECK:STDOUT: %D.patt.loc11_10.1: %Z.type = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc11_10.2 (constants.%D.patt)] // CHECK:STDOUT: } { @@ -1592,7 +1596,8 @@ fn F() { // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %E.loc12_14.1: type = bind_symbolic_name E, 0 [symbolic = %E.loc12_14.2 (constants.%E)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc12: = impl_witness (), @impl.497(constants.%E) [symbolic = @impl.497.%impl_witness (constants.%impl_witness.1a4)] +// CHECK:STDOUT: %Z.impl_witness_table.loc12 = impl_witness_table (), @impl.497 [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc12: = impl_witness %Z.impl_witness_table.loc12, @impl.497(constants.%E) [symbolic = @impl.497.%Z.impl_witness (constants.%Z.impl_witness.b58)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1606,20 +1611,20 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a6b: %EE.ref as %Z.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc6 +// CHECK:STDOUT: witness = file.%Z.impl_witness.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.266(%E.loc9_14.1: type) { // CHECK:STDOUT: %E.loc9_14.2: type = bind_symbolic_name E, 0 [symbolic = %E.loc9_14.2 (constants.%E)] // CHECK:STDOUT: %E.patt.loc9_14.2: type = symbolic_binding_pattern E, 0 [symbolic = %E.patt.loc9_14.2 (constants.%E.patt)] // CHECK:STDOUT: %DD.loc9_28.2: type = class_type @DD, @DD(%E.loc9_14.2) [symbolic = %DD.loc9_28.2 (constants.%DD.296)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.266(%E.loc9_14.2) [symbolic = %impl_witness (constants.%impl_witness.d1b)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc9, @impl.266(%E.loc9_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.c98)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %DD.loc9_28.1 as %Z.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc9 +// CHECK:STDOUT: witness = file.%Z.impl_witness.loc9 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1630,13 +1635,13 @@ fn F() { // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %DD.loc12_31.2, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] // CHECK:STDOUT: %Z.facet.loc12_32.2: %Z.type = facet_value %DD.loc12_31.2, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc12_32.2 (constants.%Z.facet.aae)] // CHECK:STDOUT: %CC.loc12_32.2: type = class_type @CC, @CC(%Z.facet.loc12_32.2) [symbolic = %CC.loc12_32.2 (constants.%CC.23e)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.497(%E.loc12_14.2) [symbolic = %impl_witness (constants.%impl_witness.1a4)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc12, @impl.497(%E.loc12_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.b58)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %CC.loc12_32.1 as %Z.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc12 +// CHECK:STDOUT: witness = file.%Z.impl_witness.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1687,12 +1692,12 @@ fn F() { // CHECK:STDOUT: %DD.ref: %DD.type = name_ref DD, file.%DD.decl [concrete = constants.%DD.generic] // CHECK:STDOUT: %EE.ref: type = name_ref EE, file.%EE.decl [concrete = constants.%EE] // CHECK:STDOUT: %DD: type = class_type @DD, @DD(constants.%EE) [concrete = constants.%DD.689] -// CHECK:STDOUT: %Z.facet.loc15_12: %Z.type = facet_value constants.%DD.689, (constants.%impl_witness.f62) [concrete = constants.%Z.facet.85b] -// CHECK:STDOUT: %.loc15_12: %Z.type = converted %DD, %Z.facet.loc15_12 [concrete = constants.%Z.facet.85b] -// CHECK:STDOUT: %CC: type = class_type @CC, @CC(constants.%Z.facet.85b) [concrete = constants.%CC.4de] +// CHECK:STDOUT: %Z.facet.loc15_12: %Z.type = facet_value constants.%DD.689, (constants.%Z.impl_witness.0e8) [concrete = constants.%Z.facet.a96] +// CHECK:STDOUT: %.loc15_12: %Z.type = converted %DD, %Z.facet.loc15_12 [concrete = constants.%Z.facet.a96] +// CHECK:STDOUT: %CC: type = class_type @CC, @CC(constants.%Z.facet.a96) [concrete = constants.%CC.402] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %Z.facet.loc15_14: %Z.type = facet_value constants.%CC.4de, (constants.%impl_witness.ebe) [concrete = constants.%Z.facet.833] -// CHECK:STDOUT: %.loc15_14: %Z.type = converted %CC, %Z.facet.loc15_14 [concrete = constants.%Z.facet.833] +// CHECK:STDOUT: %Z.facet.loc15_14: %Z.type = facet_value constants.%CC.402, (constants.%Z.impl_witness.db1) [concrete = constants.%Z.facet.49b] +// CHECK:STDOUT: %.loc15_14: %Z.type = converted %CC, %Z.facet.loc15_14 [concrete = constants.%Z.facet.49b] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1705,7 +1710,7 @@ fn F() { // CHECK:STDOUT: %E.loc9_14.2 => constants.%E // CHECK:STDOUT: %E.patt.loc9_14.2 => constants.%E.patt // CHECK:STDOUT: %DD.loc9_28.2 => constants.%DD.296 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.d1b +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.c98 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1731,7 +1736,7 @@ fn F() { // CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness // CHECK:STDOUT: %Z.facet.loc12_32.2 => constants.%Z.facet.aae // CHECK:STDOUT: %CC.loc12_32.2 => constants.%CC.23e -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.1a4 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.b58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @DD(@impl.497.%E.loc12_14.2) {} @@ -1749,13 +1754,13 @@ fn F() { // CHECK:STDOUT: %E.loc9_14.2 => constants.%EE // CHECK:STDOUT: %E.patt.loc9_14.2 => constants.%E.patt // CHECK:STDOUT: %DD.loc9_28.2 => constants.%DD.689 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.f62 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.0e8 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CC(constants.%Z.facet.85b) { -// CHECK:STDOUT: %D.loc11_10.2 => constants.%Z.facet.85b +// CHECK:STDOUT: specific @CC(constants.%Z.facet.a96) { +// CHECK:STDOUT: %D.loc11_10.2 => constants.%Z.facet.a96 // CHECK:STDOUT: %D.patt.loc11_10.2 => constants.%D.patt // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1763,10 +1768,10 @@ fn F() { // CHECK:STDOUT: %E.loc12_14.2 => constants.%EE // CHECK:STDOUT: %E.patt.loc12_14.2 => constants.%E.patt // CHECK:STDOUT: %DD.loc12_31.2 => constants.%DD.689 -// CHECK:STDOUT: %Z.lookup_impl_witness => constants.%impl_witness.f62 -// CHECK:STDOUT: %Z.facet.loc12_32.2 => constants.%Z.facet.85b -// CHECK:STDOUT: %CC.loc12_32.2 => constants.%CC.4de -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.ebe +// CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.impl_witness.0e8 +// CHECK:STDOUT: %Z.facet.loc12_32.2 => constants.%Z.facet.a96 +// CHECK:STDOUT: %CC.loc12_32.2 => constants.%CC.402 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.db1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1781,7 +1786,8 @@ fn F() { // CHECK:STDOUT: %DD: type = class_type @DD [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness file.%Y.impl_witness_table [concrete] +// CHECK:STDOUT: %W.impl_witness: = impl_witness file.%W.impl_witness_table [concrete] // CHECK:STDOUT: %D: %Y.type = bind_symbolic_name D, 0 [symbolic] // CHECK:STDOUT: %D.patt: %Y.type = symbolic_binding_pattern D, 0 [symbolic] // CHECK:STDOUT: %CC.type: type = generic_class_type @CC [concrete] @@ -1791,9 +1797,10 @@ fn F() { // CHECK:STDOUT: %Self.6e6: %Z.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] // CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %impl_witness.ec2: = impl_witness (imports.%Core.import_ref.d90) [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.ec2) [concrete] -// CHECK:STDOUT: %.3a2: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] +// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %Y.type, %Op.0a6 [concrete] @@ -1804,14 +1811,14 @@ fn F() { // CHECK:STDOUT: %E.as_type: type = facet_access_type %E [symbolic] // CHECK:STDOUT: %Y.facet.15a: %Y.type = facet_value %E.as_type, (%E.as_wit.iface0) [symbolic] // CHECK:STDOUT: %CC.ed1: type = class_type @CC, @CC(%Y.facet.15a) [symbolic] -// CHECK:STDOUT: %impl_witness.b63: = impl_witness (), @impl.0ce(%E) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.6bf: = impl_witness file.%Z.impl_witness_table, @impl.0ce(%E) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %Y.facet.885: %Y.type = facet_value %DD, (%impl_witness.1bc) [concrete] -// CHECK:STDOUT: %CC.49f: type = class_type @CC, @CC(%Y.facet.885) [concrete] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value %DD, (%impl_witness.1bc, %impl_witness.1bc) [concrete] -// CHECK:STDOUT: %impl_witness.454: = impl_witness (), @impl.0ce(%facet_value) [concrete] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC.49f, (%impl_witness.454) [concrete] +// CHECK:STDOUT: %Y.facet.268: %Y.type = facet_value %DD, (%Y.impl_witness) [concrete] +// CHECK:STDOUT: %CC.7bf: type = class_type @CC, @CC(%Y.facet.268) [concrete] +// CHECK:STDOUT: %facet_value: %facet_type = facet_value %DD, (%Y.impl_witness, %W.impl_witness) [concrete] +// CHECK:STDOUT: %Z.impl_witness.1d4: = impl_witness file.%Z.impl_witness_table, @impl.0ce(%facet_value) [concrete] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC.7bf, (%Z.impl_witness.1d4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1840,12 +1847,14 @@ fn F() { // CHECK:STDOUT: %DD.ref: type = name_ref DD, file.%DD.decl [concrete = constants.%DD] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc8: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @impl.3d7 [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: impl_decl @impl.e11 [concrete] {} { // CHECK:STDOUT: %DD.ref: type = name_ref DD, file.%DD.decl [concrete = constants.%DD] // CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc9: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %W.impl_witness_table = impl_witness_table (), @impl.e11 [concrete] +// CHECK:STDOUT: %W.impl_witness: = impl_witness %W.impl_witness_table [concrete = constants.%W.impl_witness] // CHECK:STDOUT: %CC.decl: %CC.type = class_decl @CC [concrete = constants.%CC.generic] { // CHECK:STDOUT: %D.patt.loc12_10.1: %Y.type = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc12_10.2 (constants.%D.patt)] // CHECK:STDOUT: } { @@ -1867,7 +1876,7 @@ fn F() { // CHECK:STDOUT: %.loc19_20.1: type = splice_block %.loc19_20.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type] -// CHECK:STDOUT: %impl.elem0: %.3a2 = impl_witness_access constants.%impl_witness.ec2, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] // CHECK:STDOUT: %bound_method: = bound_method %Y.ref, %impl.elem0 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and: init type = call %bound_method(%Y.ref, %W.ref) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc19_20.2: type = value_of_initializer %type.and [concrete = constants.%facet_type] @@ -1875,7 +1884,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %E.loc19_14.1: %facet_type = bind_symbolic_name E, 0 [symbolic = %E.loc19_14.2 (constants.%E)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc19: = impl_witness (), @impl.0ce(constants.%E) [symbolic = @impl.0ce.%impl_witness (constants.%impl_witness.b63)] +// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @impl.0ce [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table, @impl.0ce(constants.%E) [symbolic = @impl.0ce.%Z.impl_witness (constants.%Z.impl_witness.6bf)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1905,12 +1915,12 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3d7: %DD.ref as %Y.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc8 +// CHECK:STDOUT: witness = file.%Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.e11: %DD.ref as %W.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc9 +// CHECK:STDOUT: witness = file.%W.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.0ce(%E.loc19_14.1: %facet_type) { @@ -1920,13 +1930,13 @@ fn F() { // CHECK:STDOUT: %E.as_type.loc19_29.2: type = facet_access_type %E.loc19_14.2 [symbolic = %E.as_type.loc19_29.2 (constants.%E.as_type)] // CHECK:STDOUT: %Y.facet.loc19_29.2: %Y.type = facet_value %E.as_type.loc19_29.2, (%E.as_wit.iface0.loc19_29.2) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.15a)] // CHECK:STDOUT: %CC.loc19_29.2: type = class_type @CC, @CC(%Y.facet.loc19_29.2) [symbolic = %CC.loc19_29.2 (constants.%CC.ed1)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.0ce(%E.loc19_14.2) [symbolic = %impl_witness (constants.%impl_witness.b63)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table, @impl.0ce(%E.loc19_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.6bf)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %CC.loc19_29.1 as %Z.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc19 +// CHECK:STDOUT: witness = file.%Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1959,13 +1969,13 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %CC.ref: %CC.type = name_ref CC, file.%CC.decl [concrete = constants.%CC.generic] // CHECK:STDOUT: %DD.ref: type = name_ref DD, file.%DD.decl [concrete = constants.%DD] -// CHECK:STDOUT: %Y.facet: %Y.type = facet_value constants.%DD, (constants.%impl_witness.1bc) [concrete = constants.%Y.facet.885] -// CHECK:STDOUT: %.loc22_9: %Y.type = converted %DD.ref, %Y.facet [concrete = constants.%Y.facet.885] -// CHECK:STDOUT: %CC: type = class_type @CC, @CC(constants.%Y.facet.885) [concrete = constants.%CC.49f] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value constants.%DD, (constants.%Y.impl_witness) [concrete = constants.%Y.facet.268] +// CHECK:STDOUT: %.loc22_9: %Y.type = converted %DD.ref, %Y.facet [concrete = constants.%Y.facet.268] +// CHECK:STDOUT: %CC: type = class_type @CC, @CC(constants.%Y.facet.268) [concrete = constants.%CC.7bf] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value constants.%DD, (constants.%impl_witness.1bc, constants.%impl_witness.1bc) [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value: %facet_type = facet_value constants.%DD, (constants.%Y.impl_witness, constants.%W.impl_witness) [concrete = constants.%facet_value] // CHECK:STDOUT: %.loc22_12.1: %facet_type = converted constants.%DD, %facet_value [concrete = constants.%facet_value] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%CC.49f, (constants.%impl_witness.454) [concrete = constants.%Z.facet] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%CC.7bf, (constants.%Z.impl_witness.1d4) [concrete = constants.%Z.facet] // CHECK:STDOUT: %.loc22_12.2: %Z.type = converted %CC, %Z.facet [concrete = constants.%Z.facet] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1987,26 +1997,26 @@ fn F() { // CHECK:STDOUT: %E.as_type.loc19_29.2 => constants.%E.as_type // CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.15a // CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.ed1 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.b63 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.6bf // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CC(@impl.0ce.%Y.facet.loc19_29.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.0ce(%E.loc19_14.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @CC(constants.%Y.facet.885) { -// CHECK:STDOUT: %D.loc12_10.2 => constants.%Y.facet.885 +// CHECK:STDOUT: specific @CC(constants.%Y.facet.268) { +// CHECK:STDOUT: %D.loc12_10.2 => constants.%Y.facet.268 // CHECK:STDOUT: %D.patt.loc12_10.2 => constants.%D.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.0ce(constants.%facet_value) { // CHECK:STDOUT: %E.loc19_14.2 => constants.%facet_value // CHECK:STDOUT: %E.patt.loc19_14.2 => constants.%E.patt -// CHECK:STDOUT: %E.as_wit.iface0.loc19_29.2 => constants.%impl_witness.1bc +// CHECK:STDOUT: %E.as_wit.iface0.loc19_29.2 => constants.%Y.impl_witness // CHECK:STDOUT: %E.as_type.loc19_29.2 => constants.%DD -// CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.885 -// CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.49f -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.454 +// CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.268 +// CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.7bf +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.1d4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/param_in_type.carbon b/toolchain/check/testdata/function/generic/param_in_type.carbon index 3e6f09807ce1..b147077309a3 100644 --- a/toolchain/check/testdata/function/generic/param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/param_in_type.carbon @@ -19,11 +19,12 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %N.patt.8e2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %N.51e, %Convert.960 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.51e, %Convert.specific_fn [symbolic] @@ -64,7 +65,7 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %int_32.loc11_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc11_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc11_6.1 [symbolic = %N.loc11_6.2 (constants.%N.51e)] -// CHECK:STDOUT: %impl.elem0: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc11_29.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_29.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc11_29.3 (constants.%bound_method)] diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index d202c50193ee..546acf16834f 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -68,11 +68,12 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -142,7 +143,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc9_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -185,11 +186,12 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -275,7 +277,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc7_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -316,11 +318,12 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -383,7 +386,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc14_22.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_22.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/generic/call_basic_depth.carbon b/toolchain/check/testdata/generic/call_basic_depth.carbon index 248774453093..a0e30eac323c 100644 --- a/toolchain/check/testdata/generic/call_basic_depth.carbon +++ b/toolchain/check/testdata/generic/call_basic_depth.carbon @@ -69,11 +69,12 @@ fn M() { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -265,7 +266,7 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc35_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc35_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/generic/dependent_param.carbon b/toolchain/check/testdata/generic/dependent_param.carbon index e19ae0c17cc7..ffc2edbb936e 100644 --- a/toolchain/check/testdata/generic/dependent_param.carbon +++ b/toolchain/check/testdata/generic/dependent_param.carbon @@ -48,11 +48,12 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] @@ -176,7 +177,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %.loc10_24: %Inner.type.bac = specific_constant @Outer.%Inner.decl, @Outer(constants.%i32) [concrete = constants.%Inner.generic.ba0] // CHECK:STDOUT: %Inner.ref: %Inner.type.bac = name_ref Inner, %.loc10_24 [concrete = constants.%Inner.generic.ba0] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_33.1: = bound_method constants.%int_42.20e, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_33.2: = bound_method constants.%int_42.20e, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index 9f798d9bb832..9422859ca41b 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -69,11 +69,12 @@ class C(C:! type) { // CHECK:STDOUT: %struct_type.x.c96: type = struct_type {.x: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -141,7 +142,7 @@ class C(C:! type) { // CHECK:STDOUT: %v.var: ref %C.d45 = var v // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc8_26.1: %struct_type.x.c96 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_26.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_26.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index ecb0881eedf7..d8ea72adf55e 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -76,10 +76,10 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.fc4: = impl_witness (@impl.4e3.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.96d: = impl_witness @C.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %Convert.type.dae: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.937: %Convert.type.dae = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value %C, (%impl_witness.fc4) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value %C, (%ImplicitAs.impl_witness.96d) [concrete] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.54b: = complete_type_witness %struct_type.n [concrete] // CHECK:STDOUT: %Test2.type: type = fn_type @Test2 [concrete] @@ -94,14 +94,14 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %inst.as_compatible.c0a: = inst_value [concrete] { // CHECK:STDOUT: %.fbe: %C = as_compatible @F.%x.ref // CHECK:STDOUT: } -// CHECK:STDOUT: %.b1f: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %inst.splice_block.76e: = inst_value [concrete] { -// CHECK:STDOUT: %.83c: %i32 = splice_block %.137 { -// CHECK:STDOUT: %impl.elem0: %.b1f = impl_witness_access %impl_witness.fc4, element0 [concrete = %Convert.937] +// CHECK:STDOUT: %.2ce: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %inst.splice_block.1fd: = inst_value [concrete] { +// CHECK:STDOUT: %.96d: %i32 = splice_block %.521 { +// CHECK:STDOUT: %impl.elem0: %.2ce = impl_witness_access %ImplicitAs.impl_witness.96d, element0 [concrete = %Convert.937] // CHECK:STDOUT: %bound_method: = bound_method %.fbe, %impl.elem0 // CHECK:STDOUT: %Convert.call: init %i32 = call %bound_method(%.fbe) -// CHECK:STDOUT: %.967: %i32 = value_of_initializer %Convert.call -// CHECK:STDOUT: %.137: %i32 = converted %.fbe, %.967 +// CHECK:STDOUT: %.fa7: %i32 = value_of_initializer %Convert.call +// CHECK:STDOUT: %.521: %i32 = converted %.fbe, %.fa7 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -193,7 +193,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = @C.%impl_witness +// CHECK:STDOUT: witness = @C.%ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -210,7 +210,8 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [concrete = constants.%ImplicitAs.type.205] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.4e3.%Convert.decl) [concrete = constants.%impl_witness.fc4] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (@impl.4e3.%Convert.decl), @impl.4e3 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness.96d] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete = constants.%struct_type.n] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [concrete = constants.%complete_type.54b] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -291,7 +292,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.54b // CHECK:STDOUT: %.loc5_11.3 => constants.%inst.as_compatible.c0a -// CHECK:STDOUT: %.loc5_11.4 => constants.%inst.splice_block.76e +// CHECK:STDOUT: %.loc5_11.4 => constants.%inst.splice_block.1fd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_cannot_convert.carbon diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index 3f29d884501e..26ea1641873f 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -17,11 +17,12 @@ var a: i32 = 0; // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -58,7 +59,7 @@ var a: i32 = 0; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index b9ecb6cfa7f8..bbbf16b7262a 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -24,11 +24,12 @@ var a: i32 = test_a(); // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -75,7 +76,7 @@ var a: i32 = test_a(); // CHECK:STDOUT: fn @test_a() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index 57d29be6c7e7..04ac39e3b8d8 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -52,11 +52,12 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -152,7 +153,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] @@ -177,7 +178,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_13.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_13.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] @@ -196,7 +197,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc35_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc35_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index c78656661b9d..a5b6d32e4c2d 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -32,11 +32,12 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] @@ -92,7 +93,7 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_5.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index e43892df298f..436fdb822ca5 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -29,11 +29,12 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -87,7 +88,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc13: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_1, %impl.elem0.loc13 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_13.2: = bound_method %int_1, %specific_fn.loc13 [concrete = constants.%bound_method.9a1] @@ -98,7 +99,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc15: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_13.1: = bound_method %int_2, %impl.elem0.loc15 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_13.2: = bound_method %int_2, %specific_fn.loc15 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 4397c366d91a..fc1f5dcff504 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -28,11 +28,12 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -101,7 +102,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %x.var: ref %array_type = var x // CHECK:STDOUT: %int_0.loc12_27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc12_29.1: %tuple.type = tuple_literal (%int_0.loc12_27) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_29.1: = bound_method %int_0.loc12_27, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_29.2: = bound_method %int_0.loc12_27, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index a7315fc3c67a..f398338689b2 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -41,11 +41,12 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -152,7 +153,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] @@ -165,7 +166,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] @@ -231,7 +232,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] @@ -307,7 +308,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 3fb8b4076f68..0527f11e4ace 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -25,11 +25,12 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -105,7 +106,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] @@ -118,7 +119,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index 4563675665cc..2a7d7708818b 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -94,7 +94,7 @@ class C { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: %i32 = bind_name x, .inst1066.loc27_14 +// CHECK:STDOUT: %x: %i32 = bind_name x, .inst1083.loc27_14 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %y.patt: %i32 = binding_pattern y // CHECK:STDOUT: %.loc37: %i32 = var_pattern %y.patt diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 77f8a39f5bce..e1d4c449cfb9 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -24,11 +24,12 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -114,7 +115,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc12_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc12_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12_25: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_25.1: = bound_method %int_1, %impl.elem0.loc12_25 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc12_25: = specific_function %impl.elem0.loc12_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_25.2: = bound_method %int_1, %specific_fn.loc12_25 [concrete = constants.%bound_method.9a1] @@ -125,7 +126,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_20: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc12_32: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_32.1: = bound_method %int_2, %impl.elem0.loc12_32 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc12_32: = specific_function %impl.elem0.loc12_32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_32.2: = bound_method %int_2, %specific_fn.loc12_32 [concrete = constants.%bound_method.b92] @@ -146,7 +147,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_32.loc12_49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc12_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12_49: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_49: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_49.1: = bound_method %int_3, %impl.elem0.loc12_49 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc12_49: = specific_function %impl.elem0.loc12_49, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_49.2: = bound_method %int_3, %specific_fn.loc12_49 [concrete = constants.%bound_method.047] @@ -157,7 +158,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_44: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc12_56: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_56: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_56.1: = bound_method %int_4, %impl.elem0.loc12_56 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc12_56: = specific_function %impl.elem0.loc12_56, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_56.2: = bound_method %int_4, %specific_fn.loc12_56 [concrete = constants.%bound_method.1da] diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index f4a9eb32342e..f2b811f17b5c 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -33,11 +33,12 @@ fn F(cond: bool) { // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -105,7 +106,7 @@ fn F(cond: bool) { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc14_46.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc14_46.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_46.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_46.1: = bound_method %int_1, %impl.elem0.loc14_46.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14_46.1: = specific_function %impl.elem0.loc14_46.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_46.2: = bound_method %int_1, %specific_fn.loc14_46.1 [concrete = constants.%bound_method.9a1] @@ -113,7 +114,7 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc14_46.2: init %i32 = converted %int_1, %int.convert_checked.loc14_46.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_46.3: ref %i32 = struct_access %a.var, element0 // CHECK:STDOUT: %.loc14_46.4: init %i32 = initialize_from %.loc14_46.2 to %.loc14_46.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_46.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_46.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_46.3: = bound_method %int_2, %impl.elem0.loc14_46.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc14_46.2: = specific_function %impl.elem0.loc14_46.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_46.4: = bound_method %int_2, %specific_fn.loc14_46.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index 7448277f691b..497cd5bd4985 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -117,24 +117,25 @@ fn CallF() { // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I_where.type.9d4: type = facet_type <@I where %impl.elem0 = %empty_struct> [concrete] -// CHECK:STDOUT: %impl_witness.313: = impl_witness (file.%impl_witness_assoc_constant.loc8) [concrete] -// CHECK:STDOUT: %I.facet.012: %I.type = facet_value %empty_struct_type, (%impl_witness.313) [concrete] +// CHECK:STDOUT: %I.impl_witness.172: = impl_witness file.%I.impl_witness_table.loc8 [concrete] +// CHECK:STDOUT: %I.facet.892: %I.type = facet_value %empty_struct_type, (%I.impl_witness.172) [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %I_where.type.b5a: type = facet_type <@I where %impl.elem0 = %int_0.5c6> [concrete] -// CHECK:STDOUT: %impl_witness.2ac: = impl_witness (file.%impl_witness_assoc_constant.loc10) [concrete] -// CHECK:STDOUT: %I.facet.255: %I.type = facet_value %i32, (%impl_witness.2ac) [concrete] +// CHECK:STDOUT: %I.impl_witness.0a6: = impl_witness file.%I.impl_witness_table.loc10 [concrete] +// CHECK:STDOUT: %I.facet.7c1: %I.type = facet_value %i32, (%I.impl_witness.0a6) [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -175,7 +176,8 @@ fn CallF() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc8: = impl_witness (%impl_witness_assoc_constant.loc8) [concrete = constants.%impl_witness.313] +// CHECK:STDOUT: %I.impl_witness_table.loc8 = impl_witness_table (%impl_witness_assoc_constant.loc8), @impl.77e [concrete] +// CHECK:STDOUT: %I.impl_witness.loc8: = impl_witness %I.impl_witness_table.loc8 [concrete = constants.%I.impl_witness.172] // CHECK:STDOUT: %impl_witness_assoc_constant.loc8: %empty_struct_type = impl_witness_assoc_constant constants.%empty_struct [concrete = constants.%empty_struct] // CHECK:STDOUT: impl_decl @impl.a12 [concrete] {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -193,8 +195,9 @@ fn CallF() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (%impl_witness_assoc_constant.loc10) [concrete = constants.%impl_witness.2ac] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %I.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @impl.a12 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc10: = impl_witness %I.impl_witness_table.loc10 [concrete = constants.%I.impl_witness.0a6] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_15.1: = bound_method constants.%int_0.5c6, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_15.2: = bound_method constants.%int_0.5c6, %specific_fn [concrete = constants.%bound_method] @@ -226,12 +229,12 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.77e: %.loc8_7.2 as %.loc8_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc8 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a12: %i32 as %.loc10_15 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @V(constants.%Self.826) { @@ -246,14 +249,14 @@ fn CallF() { // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.012) { -// CHECK:STDOUT: %Self => constants.%I.facet.012 +// CHECK:STDOUT: specific @V(constants.%I.facet.892) { +// CHECK:STDOUT: %Self => constants.%I.facet.892 // CHECK:STDOUT: %Self.as_type => constants.%empty_struct_type // CHECK:STDOUT: %require_complete => constants.%complete_type.357 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.255) { -// CHECK:STDOUT: %Self => constants.%I.facet.255 +// CHECK:STDOUT: specific @V(constants.%I.facet.7c1) { +// CHECK:STDOUT: %Self => constants.%I.facet.7c1 // CHECK:STDOUT: %Self.as_type => constants.%i32 // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: } @@ -276,8 +279,8 @@ fn CallF() { // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %int_0> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] -// CHECK:STDOUT: %I.facet.5b8: %I.type = facet_value %empty_struct_type, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet.d0c: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -312,7 +315,8 @@ fn CallF() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %.loc15: %empty_struct_type = converted constants.%int_0, [concrete = ] // CHECK:STDOUT: %impl_witness_assoc_constant: = impl_witness_assoc_constant [concrete = ] // CHECK:STDOUT: } @@ -339,7 +343,7 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc15_7.2 as %.loc15_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @V(constants.%Self.826) { @@ -354,8 +358,8 @@ fn CallF() { // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.5b8) { -// CHECK:STDOUT: %Self => constants.%I.facet.5b8 +// CHECK:STDOUT: specific @V(constants.%I.facet.d0c) { +// CHECK:STDOUT: %Self => constants.%I.facet.d0c // CHECK:STDOUT: %Self.as_type => constants.%empty_struct_type // CHECK:STDOUT: %require_complete => constants.%complete_type // CHECK:STDOUT: } @@ -377,10 +381,10 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.15e: type = facet_type <@ImplicitAs, @ImplicitAs(%C)> [concrete] // CHECK:STDOUT: %Convert.type.56d: type = fn_type @Convert.1, @ImplicitAs(%C) [concrete] -// CHECK:STDOUT: %impl_witness.3db: = impl_witness (@impl.e86.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness file.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %Convert.type.721: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.155: %Convert.type.721 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.15e = facet_value %empty_tuple.type, (%impl_witness.3db) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.15e = facet_value %empty_tuple.type, (%ImplicitAs.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] @@ -390,9 +394,9 @@ fn CallF() { // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple> [concrete] -// CHECK:STDOUT: %impl_witness.880: = impl_witness (file.%impl_witness_assoc_constant) [concrete] -// CHECK:STDOUT: %I.facet.3ae: %I.type = facet_value %C, (%impl_witness.880) [concrete] -// CHECK:STDOUT: %.32d: type = fn_type_with_self_type %Convert.type.56d, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet.662: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %.5c3: type = fn_type_with_self_type %Convert.type.56d, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %empty_tuple, %Convert.155 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -422,7 +426,8 @@ fn CallF() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%C)> [concrete = constants.%ImplicitAs.type.15e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (@impl.e86.%Convert.decl) [concrete = constants.%impl_witness.3db] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (@impl.e86.%Convert.decl), @impl.e86 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness] // CHECK:STDOUT: impl_decl @impl.bb1 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] @@ -440,8 +445,9 @@ fn CallF() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc18_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc18: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness.880] -// CHECK:STDOUT: %impl.elem0: %.32d = impl_witness_access constants.%impl_witness.3db, element0 [concrete = constants.%Convert.155] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.bb1 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] +// CHECK:STDOUT: %impl.elem0: %.5c3 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Convert.155] // CHECK:STDOUT: %bound_method: = bound_method constants.%empty_tuple, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %.loc18_13.1: ref %C = temporary_storage // CHECK:STDOUT: %Convert.call: init %C = call %bound_method(constants.%empty_tuple) to %.loc18_13.1 @@ -492,12 +498,12 @@ fn CallF() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.bb1: %C.ref as %.loc18_13 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc18 +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -529,8 +535,8 @@ fn CallF() { // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.3ae) { -// CHECK:STDOUT: %Self => constants.%I.facet.3ae +// CHECK:STDOUT: specific @V(constants.%I.facet.662) { +// CHECK:STDOUT: %Self => constants.%I.facet.662 // CHECK:STDOUT: %Self.as_type => constants.%C // CHECK:STDOUT: %require_complete => constants.%complete_type // CHECK:STDOUT: } @@ -556,9 +562,10 @@ fn CallF() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.c15) [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%impl_witness) [concrete] -// CHECK:STDOUT: %.690: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (imports.%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Negate.impl_witness: = impl_witness %Negate.impl_witness_table [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] +// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] // CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %int_1, %Op.bba [concrete] @@ -606,7 +613,7 @@ fn CallF() { // CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem0.loc15_14: %.690 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Op.bba] +// CHECK:STDOUT: %impl.elem0.loc15_14: %.63a = impl_witness_access constants.%Negate.impl_witness, element0 [concrete = constants.%Op.bba] // CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem0.loc15_14 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method(%int_1) [concrete = constants.%int_-1] // CHECK:STDOUT: %.loc15_16.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-1] diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index fb29f80c75b3..93ea46a08d96 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -21,7 +21,7 @@ impl i32 as I {} // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -44,7 +44,8 @@ impl i32 as I {} // CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -62,6 +63,6 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %i32.loc13 as %I.ref.loc13 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index 391a6e13d776..6a0f42d80272 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -21,7 +21,7 @@ impl i32 as Empty { // CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %Empty.impl_witness: = impl_witness file.%Empty.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -44,7 +44,8 @@ impl i32 as Empty { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Empty.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %Empty.impl_witness: = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { @@ -57,6 +58,6 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %i32 as %Empty.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index 3df61f9d08b2..192822e7f6d8 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -34,15 +34,15 @@ fn G(c: C) { // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness @C.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.a65: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.ad8: %F.type.a65 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %.1bc: type = fn_type_with_self_type %F.type.b7b, %HasF.facet [concrete] +// CHECK:STDOUT: %.a44: type = fn_type_with_self_type %F.type.b7b, %HasF.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,7 +88,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @C.%impl_witness +// CHECK:STDOUT: witness = @C.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -96,7 +96,8 @@ fn G(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -121,11 +122,11 @@ fn G(c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %F.ref.loc22: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc22: %.1bc = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.ad8] +// CHECK:STDOUT: %impl.elem0.loc22: %.a44 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.ad8] // CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %impl.elem0.loc22() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %F.ref.loc23: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc23: %.1bc = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.ad8] +// CHECK:STDOUT: %impl.elem0.loc23: %.a44 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.ad8] // CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %impl.elem0.loc23() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 13f7c9c63b07..a7ae87f058b9 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -73,21 +73,22 @@ class X(U:! type) { // CHECK:STDOUT: %F.eff: %F.type.7f1 = struct_value () [concrete] // CHECK:STDOUT: %HasF.assoc_type.257: type = assoc_entity_type @HasF, @HasF(%Param) [concrete] // CHECK:STDOUT: %assoc0.afb: %HasF.assoc_type.257 = assoc_entity element0, @HasF.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness.9bf: = impl_witness (@impl.3b1.%F.decl) [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness @C.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.94c: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.901: %F.type.94c = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet: %HasF.type.b18 = facet_value %C, (%impl_witness.9bf) [concrete] +// CHECK:STDOUT: %HasF.facet: %HasF.type.b18 = facet_value %C, (%HasF.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %struct_type.x.c96: type = struct_type {.x: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] @@ -95,7 +96,7 @@ class X(U:! type) { // CHECK:STDOUT: %Param.val: %Param = struct_value (%int_2.ef8) [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %.75e: type = fn_type_with_self_type %F.type.7f1, %HasF.facet [concrete] +// CHECK:STDOUT: %.22c: type = fn_type_with_self_type %F.type.7f1, %HasF.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -179,7 +180,7 @@ class X(U:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Param = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @C.%impl_witness +// CHECK:STDOUT: witness = @C.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Param { @@ -204,7 +205,8 @@ class X(U:! type) { // CHECK:STDOUT: %Param.ref: type = name_ref Param, file.%Param.decl [concrete = constants.%Param] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%Param)> [concrete = constants.%HasF.type.b18] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.3b1.%F.decl) [concrete = constants.%impl_witness.9bf] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.3b1.%F.decl), @impl.3b1 [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -227,7 +229,7 @@ class X(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc15_21.1: %struct_type.x.c96 = struct_literal (%int_2) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_21.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_21.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] @@ -248,7 +250,7 @@ class X(U:! type) { // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %.loc21_17: %HasF.assoc_type.257 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [concrete = constants.%assoc0.afb] // CHECK:STDOUT: %F.ref.loc21: %HasF.assoc_type.257 = name_ref F, %.loc21_17 [concrete = constants.%assoc0.afb] -// CHECK:STDOUT: %impl.elem0.loc21: %.75e = impl_witness_access constants.%impl_witness.9bf, element0 [concrete = constants.%F.901] +// CHECK:STDOUT: %impl.elem0.loc21: %.22c = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.901] // CHECK:STDOUT: %.loc21_20.1: ref %Param = temporary_storage // CHECK:STDOUT: %F.call.loc21: init %Param = call %impl.elem0.loc21() to %.loc21_20.1 // CHECK:STDOUT: %.loc21_20.2: ref %Param = temporary %.loc21_20.1, %F.call.loc21 @@ -267,7 +269,7 @@ class X(U:! type) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %.loc22_17: %HasF.assoc_type.257 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [concrete = constants.%assoc0.afb] // CHECK:STDOUT: %F.ref.loc22: %HasF.assoc_type.257 = name_ref F, %.loc22_17 [concrete = constants.%assoc0.afb] -// CHECK:STDOUT: %impl.elem0.loc22: %.75e = impl_witness_access constants.%impl_witness.9bf, element0 [concrete = constants.%F.901] +// CHECK:STDOUT: %impl.elem0.loc22: %.22c = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.901] // CHECK:STDOUT: %.loc22_20.1: ref %Param = temporary_storage // CHECK:STDOUT: %F.call.loc22: init %Param = call %impl.elem0.loc22() to %.loc22_20.1 // CHECK:STDOUT: %.loc22_20.2: ref %Param = temporary %.loc22_20.1, %F.call.loc22 @@ -337,10 +339,10 @@ class X(U:! type) { // CHECK:STDOUT: %I.assoc_type.1e5078.2: type = assoc_entity_type @I, @I(%U) [symbolic] // CHECK:STDOUT: %assoc0.8f0422.2: %I.assoc_type.1e5078.2 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %require_complete.cfe: = require_complete_type %I.type.325e65.2 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(%U) [symbolic] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @X.%I.impl_witness_table, @impl(%U) [symbolic] // CHECK:STDOUT: %F.type.e88: type = fn_type @F.2, @impl(%U) [symbolic] // CHECK:STDOUT: %F.b02: %F.type.e88 = struct_value () [symbolic] -// CHECK:STDOUT: %I.facet: %I.type.325e65.2 = facet_value %X, (%impl_witness) [symbolic] +// CHECK:STDOUT: %I.facet: %I.type.325e65.2 = facet_value %X, (%I.impl_witness) [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.441: = require_complete_type %X [symbolic] @@ -421,7 +423,7 @@ class X(U:! type) { // CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic = %X (constants.%X)] // CHECK:STDOUT: %I.type.loc9_21.2: type = facet_type <@I, @I(%U)> [symbolic = %I.type.loc9_21.2 (constants.%I.type.325e65.2)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc9_21.2 [symbolic = %require_complete (constants.%require_complete.cfe)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%U) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @X.%I.impl_witness_table, @impl(%U) [symbolic = %I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%U) [symbolic = %F.type (constants.%F.type.e88)] @@ -448,7 +450,7 @@ class X(U:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .U = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @X.%impl_witness +// CHECK:STDOUT: witness = @X.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -467,7 +469,8 @@ class X(U:! type) { // CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc8_9.1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %I.type.loc9_21.1: type = facet_type <@I, @I(constants.%U)> [symbolic = %I.type.loc9_21.2 (constants.%I.type.325e65.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%U) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%U) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: %.loc9: type = specific_constant @impl.%I.type.loc9_21.1, @impl(constants.%U) [symbolic = %I.type (constants.%I.type.325e65.2)] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] @@ -549,7 +552,7 @@ class X(U:! type) { // CHECK:STDOUT: %X => constants.%X // CHECK:STDOUT: %I.type.loc9_21.2 => constants.%I.type.325e65.2 // CHECK:STDOUT: %require_complete => constants.%require_complete.cfe -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.e88 diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index 8fe6adf63a6a..93929b6cebeb 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -36,13 +36,13 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %assoc0.db2: %Simple.assoc_type = assoc_entity element0, @Simple.%G.decl [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness.85b: = impl_witness () [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness file.%Simple.impl_witness_table [concrete] // CHECK:STDOUT: %G.type.c98: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.e73: %G.type.c98 = struct_value () [concrete] -// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %i32, (%impl_witness.85b) [concrete] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %i32, (%Simple.impl_witness) [concrete] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [concrete] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [concrete] -// CHECK:STDOUT: %.e92: type = fn_type_with_self_type %G.type.b60, %Simple.facet [concrete] +// CHECK:STDOUT: %.0aa: type = fn_type_with_self_type %G.type.b60, %Simple.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,7 +67,8 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85b] +// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (), @impl.006 [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness %Simple.impl_witness_table [concrete = constants.%Simple.impl_witness] // CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [concrete = constants.%InstanceCall] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, call_param0 @@ -116,7 +117,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Undeclared = // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { @@ -133,7 +134,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] // CHECK:STDOUT: %G.ref: %Simple.assoc_type = name_ref G, @Simple.%assoc0 [concrete = constants.%assoc0.db2] -// CHECK:STDOUT: %impl.elem0: %.e92 = impl_witness_access constants.%impl_witness.85b, element0 [concrete = ] +// CHECK:STDOUT: %impl.elem0: %.0aa = impl_witness_access constants.%Simple.impl_witness, element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index eeb7907a61e6..29f405052d9a 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -37,7 +37,7 @@ class C { // CHECK:STDOUT: %assoc0: %GenericInterface.assoc_type = assoc_entity element0, @GenericInterface.%F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %require_complete.70f: = require_complete_type %GenericInterface.type.3fe [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%T) [symbolic] +// CHECK:STDOUT: %GenericInterface.impl_witness: = impl_witness @C.%GenericInterface.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.2cb: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.4b1: %F.type.2cb = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -104,7 +104,7 @@ class C { // CHECK:STDOUT: %T.patt.loc20_23.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_23.2 (constants.%T.patt)] // CHECK:STDOUT: %GenericInterface.type.loc20_54.2: type = facet_type <@GenericInterface, @GenericInterface(%T.loc20_23.2)> [symbolic = %GenericInterface.type.loc20_54.2 (constants.%GenericInterface.type.3fe)] // CHECK:STDOUT: %require_complete: = require_complete_type %GenericInterface.type.loc20_54.2 [symbolic = %require_complete (constants.%require_complete.70f)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%T.loc20_23.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %GenericInterface.impl_witness: = impl_witness @C.%GenericInterface.impl_witness_table, @impl(%T.loc20_23.2) [symbolic = %GenericInterface.impl_witness (constants.%GenericInterface.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc20_23.2) [symbolic = %F.type (constants.%F.type.2cb)] @@ -137,7 +137,8 @@ class C { // CHECK:STDOUT: %GenericInterface.type.loc20_54.1: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc20_54.2 (constants.%GenericInterface.type.3fe)] // CHECK:STDOUT: %T.loc20_23.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_23.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %GenericInterface.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %GenericInterface.impl_witness: = impl_witness %GenericInterface.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%GenericInterface.impl_witness (constants.%GenericInterface.impl_witness)] // CHECK:STDOUT: %.loc20: type = specific_constant @impl.%GenericInterface.type.loc20_54.1, @impl(constants.%T) [symbolic = constants.%GenericInterface.type.3fe] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] @@ -191,7 +192,7 @@ class C { // CHECK:STDOUT: %T.patt.loc20_23.2 => constants.%T.patt // CHECK:STDOUT: %GenericInterface.type.loc20_54.2 => constants.%GenericInterface.type.3fe // CHECK:STDOUT: %require_complete => constants.%require_complete.70f -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %GenericInterface.impl_witness => constants.%GenericInterface.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2cb diff --git a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon index 8c2a6464bc8c..c3d946841955 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -52,12 +52,13 @@ class E { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness.1bcebf.1: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.bf7: = impl_witness @C.%I.impl_witness_table [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %impl_witness.1bcebf.2: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.fa5: = impl_witness @D.%I.impl_witness_table [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] +// CHECK:STDOUT: %I.impl_witness.7f3: = impl_witness @E.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -100,7 +101,7 @@ class E { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c98: %Self.ref as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = @E.%impl_witness +// CHECK:STDOUT: witness = @E.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -109,7 +110,8 @@ class E { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.1bcebf.1] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.154 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.bf7] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -125,7 +127,8 @@ class E { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.1bcebf.2] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.ca7 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.fa5] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -142,7 +145,8 @@ class E { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.1bcebf.1] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.c98 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.7f3] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon index 7aa0028bc807..0a19e58ba51e 100644 --- a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon @@ -28,7 +28,7 @@ interface I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C.f28: type = class_type @C [concrete] // CHECK:STDOUT: %C.6b4: type = class_type @C, @C(%Self) [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%Self) [symbolic] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.%I.impl_witness_table, @impl(%Self) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } @@ -63,7 +63,7 @@ interface I { // CHECK:STDOUT: generic impl @impl(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C.6b4)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%Self) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.%I.impl_witness_table, @impl(%Self) [symbolic = %I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %Self.ref as %I.ref; // CHECK:STDOUT: } @@ -76,7 +76,8 @@ interface I { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C.6b4 [symbolic = %C (constants.%C.6b4)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(constants.%Self) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%Self) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: %.loc20: type = specific_constant @impl.%I.ref, @impl(constants.%Self) [concrete = constants.%I.type] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] @@ -94,7 +95,7 @@ interface I { // CHECK:STDOUT: specific @impl(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %C => constants.%C.6b4 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(@impl.%Self) {} diff --git a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon index a1bded6841a0..72fe043877e2 100644 --- a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon @@ -31,7 +31,7 @@ fn F(c: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.%I.impl_witness_table [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -74,7 +74,8 @@ fn F(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index 6b3c6021e793..8da4e53d3338 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -224,33 +224,33 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0.82e: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] // CHECK:STDOUT: %NoF: type = class_type @NoF [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.1: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.901: = impl_witness @NoF.%I.impl_witness_table [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %FNotFunction: type = class_type @FNotFunction [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.2: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.44e: = impl_witness @FNotFunction.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.70c: type = class_type @F.16 [concrete] // CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [concrete] // CHECK:STDOUT: %PossiblyF: %PossiblyF.type = struct_value () [concrete] // CHECK:STDOUT: %FAlias: type = class_type @FAlias [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.3: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.c80: = impl_witness @FAlias.%I.impl_witness_table [concrete] // CHECK:STDOUT: %FExtraParam: type = class_type @FExtraParam [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.4: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.f6b: = impl_witness @FExtraParam.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] // CHECK:STDOUT: %F.type.44e: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.424: %F.type.44e = struct_value () [concrete] -// CHECK:STDOUT: %I.facet.bbf: %I.type = facet_value %FExtraParam, (%impl_witness.85bcb7.4) [concrete] +// CHECK:STDOUT: %I.facet.86d: %I.type = facet_value %FExtraParam, (%I.impl_witness.f6b) [concrete] // CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.5: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.e58: = impl_witness @FExtraImplicitParam.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.e1a: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.6ff: %F.type.e1a = struct_value () [concrete] -// CHECK:STDOUT: %I.facet.f18: %I.type = facet_value %FExtraImplicitParam, (%impl_witness.85bcb7.5) [concrete] +// CHECK:STDOUT: %I.facet.919: %I.type = facet_value %FExtraImplicitParam, (%I.impl_witness.e58) [concrete] // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.6: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.59a: = impl_witness @FExtraReturnType.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.387: type = fn_type @F.4 [concrete] // CHECK:STDOUT: %F.df5: %F.type.387 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet.e05: %I.type = facet_value %FExtraReturnType, (%impl_witness.85bcb7.6) [concrete] +// CHECK:STDOUT: %I.facet.d5c: %I.type = facet_value %FExtraReturnType, (%I.impl_witness.59a) [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.c14: type = fn_type @F.5 [concrete] @@ -258,40 +258,40 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.922: %J.assoc_type = assoc_entity element0, @J.%F.decl [concrete] // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.7: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness.b4b: = impl_witness @FMissingParam.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.695: type = fn_type @F.6 [concrete] // CHECK:STDOUT: %F.738: %F.type.695 = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.746: %J.type = facet_value %FMissingParam, (%impl_witness.85bcb7.7) [concrete] +// CHECK:STDOUT: %J.facet.97d: %J.type = facet_value %FMissingParam, (%J.impl_witness.b4b) [concrete] // CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.8: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness.c79: = impl_witness @FMissingImplicitParam.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.d97: type = fn_type @F.7 [concrete] // CHECK:STDOUT: %F.01d: %F.type.d97 = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.300: %J.type = facet_value %FMissingImplicitParam, (%impl_witness.85bcb7.8) [concrete] +// CHECK:STDOUT: %J.facet.0d0: %J.type = facet_value %FMissingImplicitParam, (%J.impl_witness.c79) [concrete] // CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.9: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness.39b: = impl_witness @FMissingReturnType.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.123: type = fn_type @F.8 [concrete] // CHECK:STDOUT: %F.c7d: %F.type.123 = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.c9e: %J.type = facet_value %FMissingReturnType, (%impl_witness.85bcb7.9) [concrete] +// CHECK:STDOUT: %J.facet.97a: %J.type = facet_value %FMissingReturnType, (%J.impl_witness.39b) [concrete] // CHECK:STDOUT: %FDifferentParamType: type = class_type @FDifferentParamType [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.10: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness.eab: = impl_witness @FDifferentParamType.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.6b5: type = fn_type @F.9 [concrete] // CHECK:STDOUT: %F.043: %F.type.6b5 = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.ee9: %J.type = facet_value %FDifferentParamType, (%impl_witness.85bcb7.10) [concrete] +// CHECK:STDOUT: %J.facet.955: %J.type = facet_value %FDifferentParamType, (%J.impl_witness.eab) [concrete] // CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.11: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness.103: = impl_witness @FDifferentImplicitParamType.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.d62: type = fn_type @F.10 [concrete] // CHECK:STDOUT: %F.886: %F.type.d62 = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.5d6: %J.type = facet_value %FDifferentImplicitParamType, (%impl_witness.85bcb7.11) [concrete] +// CHECK:STDOUT: %J.facet.130: %J.type = facet_value %FDifferentImplicitParamType, (%J.impl_witness.103) [concrete] // CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.12: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness.6f7: = impl_witness @FDifferentReturnType.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.d3b: type = fn_type @F.11 [concrete] // CHECK:STDOUT: %F.be8: %F.type.d3b = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.1f5: %J.type = facet_value %FDifferentReturnType, (%impl_witness.85bcb7.12) [concrete] +// CHECK:STDOUT: %J.facet.1a7: %J.type = facet_value %FDifferentReturnType, (%J.impl_witness.6f7) [concrete] // CHECK:STDOUT: %FDifferentParamName: type = class_type @FDifferentParamName [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.13: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness.3ab: = impl_witness @FDifferentParamName.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.d19: type = fn_type @F.12 [concrete] // CHECK:STDOUT: %F.669: %F.type.d19 = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.19c: %J.type = facet_value %FDifferentParamName, (%impl_witness.85bcb7.13) [concrete] +// CHECK:STDOUT: %J.facet.366: %J.type = facet_value %FDifferentParamName, (%J.impl_witness.3ab) [concrete] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete] // CHECK:STDOUT: %Self.2ff: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.2ff [symbolic] @@ -308,24 +308,24 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete] // CHECK:STDOUT: %assoc0.beb: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%F.decl [concrete] // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.14: = impl_witness () [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.21a: = impl_witness @SelfNestedBadParam.%SelfNested.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.4cd: type = ptr_type %SelfNestedBadParam [concrete] // CHECK:STDOUT: %struct_type.x.y.871: type = struct_type {.x: %i32, .y: %i32} [concrete] // CHECK:STDOUT: %tuple.type.a7d: type = tuple_type (%ptr.4cd, %struct_type.x.y.871) [concrete] // CHECK:STDOUT: %array_type.a41: type = array_type %int_4, %SelfNestedBadParam [concrete] // CHECK:STDOUT: %F.type.f90: type = fn_type @F.14 [concrete] // CHECK:STDOUT: %F.fa8: %F.type.f90 = struct_value () [concrete] -// CHECK:STDOUT: %SelfNested.facet.46a: %SelfNested.type = facet_value %SelfNestedBadParam, (%impl_witness.85bcb7.14) [concrete] +// CHECK:STDOUT: %SelfNested.facet.9f5: %SelfNested.type = facet_value %SelfNestedBadParam, (%SelfNested.impl_witness.21a) [concrete] // CHECK:STDOUT: %struct_type.x.y.a89: type = struct_type {.x: %SelfNestedBadParam, .y: %i32} [concrete] // CHECK:STDOUT: %tuple.type.9c9: type = tuple_type (%ptr.4cd, %struct_type.x.y.a89) [concrete] // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [concrete] -// CHECK:STDOUT: %impl_witness.85bcb7.15: = impl_witness () [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.b10: = impl_witness @SelfNestedBadReturnType.%SelfNested.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.612: type = ptr_type %SelfNestedBadReturnType [concrete] // CHECK:STDOUT: %struct_type.x.y.ac5: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [concrete] // CHECK:STDOUT: %tuple.type.eb9: type = tuple_type (%ptr.612, %struct_type.x.y.ac5) [concrete] // CHECK:STDOUT: %F.type.0e7: type = fn_type @F.15 [concrete] // CHECK:STDOUT: %F.0bc: %F.type.0e7 = struct_value () [concrete] -// CHECK:STDOUT: %SelfNested.facet.e62: %SelfNested.type = facet_value %SelfNestedBadReturnType, (%impl_witness.85bcb7.15) [concrete] +// CHECK:STDOUT: %SelfNested.facet.3bd: %SelfNested.type = facet_value %SelfNestedBadReturnType, (%SelfNested.impl_witness.b10) [concrete] // CHECK:STDOUT: %array_type.126: type = array_type %int_4, %SelfNestedBadReturnType [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -475,7 +475,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: impl @impl.0c9: %Self.ref as %I.ref { // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = -// CHECK:STDOUT: witness = @NoF.%impl_witness +// CHECK:STDOUT: witness = @NoF.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.b55: %Self.ref as %I.ref { @@ -483,7 +483,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FNotFunction.%impl_witness +// CHECK:STDOUT: witness = @FNotFunction.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.199: %Self.ref as %I.ref { @@ -493,7 +493,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: !members: // CHECK:STDOUT: .PossiblyF = // CHECK:STDOUT: .F = %F -// CHECK:STDOUT: witness = @FAlias.%impl_witness +// CHECK:STDOUT: witness = @FAlias.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.ddd: %Self.ref as %I.ref { @@ -512,7 +512,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FExtraParam.%impl_witness +// CHECK:STDOUT: witness = @FExtraParam.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.698: %Self.ref as %I.ref { @@ -527,7 +527,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FExtraImplicitParam.%impl_witness +// CHECK:STDOUT: witness = @FExtraImplicitParam.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.77b: %Self.ref as %I.ref { @@ -544,7 +544,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FExtraReturnType.%impl_witness +// CHECK:STDOUT: witness = @FExtraReturnType.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5cf: %Self.ref as %J.ref { @@ -570,7 +570,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FMissingParam.%impl_witness +// CHECK:STDOUT: witness = @FMissingParam.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.bac: %Self.ref as %J.ref { @@ -596,7 +596,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FMissingImplicitParam.%impl_witness +// CHECK:STDOUT: witness = @FMissingImplicitParam.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1a7: %Self.ref as %J.ref { @@ -624,7 +624,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FMissingReturnType.%impl_witness +// CHECK:STDOUT: witness = @FMissingReturnType.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.f2b: %Self.ref as %J.ref { @@ -655,7 +655,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FDifferentParamType.%impl_witness +// CHECK:STDOUT: witness = @FDifferentParamType.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.db4: %Self.ref as %J.ref { @@ -686,7 +686,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FDifferentImplicitParamType.%impl_witness +// CHECK:STDOUT: witness = @FDifferentImplicitParamType.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.fcc: %Self.ref as %J.ref { @@ -719,7 +719,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FDifferentReturnType.%impl_witness +// CHECK:STDOUT: witness = @FDifferentReturnType.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c5d: %Self.ref as %J.ref { @@ -754,7 +754,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @FDifferentParamName.%impl_witness +// CHECK:STDOUT: witness = @FDifferentParamName.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.6a5: %Self.ref as %SelfNested.ref { @@ -787,7 +787,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: !members: // CHECK:STDOUT: .SelfNestedBadParam = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @SelfNestedBadParam.%impl_witness +// CHECK:STDOUT: witness = @SelfNestedBadParam.%SelfNested.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.bfc: %Self.ref as %SelfNested.ref { @@ -820,7 +820,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: .SelfNestedBadReturnType = // CHECK:STDOUT: .SelfNestedBadParam = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @SelfNestedBadReturnType.%impl_witness +// CHECK:STDOUT: witness = @SelfNestedBadReturnType.%SelfNested.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NoF { @@ -828,7 +828,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [concrete = constants.%NoF] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.1] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.0c9 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.901] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -843,7 +844,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FNotFunction [concrete = constants.%FNotFunction] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.2] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.b55 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.44e] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -860,7 +862,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FAlias [concrete = constants.%FAlias] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.3] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.199 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.c80] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -876,7 +879,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [concrete = constants.%FExtraParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.4] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.ddd [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.f6b] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -891,7 +895,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [concrete = constants.%FExtraImplicitParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.5] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.698 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.e58] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -906,7 +911,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraReturnType [concrete = constants.%FExtraReturnType] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.6] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.77b [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.59a] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -921,7 +927,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [concrete = constants.%FMissingParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.7] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl.5cf [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.b4b] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -936,7 +943,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [concrete = constants.%FMissingImplicitParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.8] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl.bac [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.c79] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -951,7 +959,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [concrete = constants.%FMissingReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.9] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl.1a7 [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.39b] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -966,7 +975,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [concrete = constants.%FDifferentParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.10] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl.f2b [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.eab] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -981,7 +991,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.11] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl.db4 [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.103] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -996,7 +1007,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [concrete = constants.%FDifferentReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.12] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl.fcc [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.6f7] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -1011,7 +1023,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamName [concrete = constants.%FDifferentParamName] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.13] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl.c5d [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.3ab] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -1026,7 +1039,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [concrete = constants.%SelfNestedBadParam] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.14] +// CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (), @impl.6a5 [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness: = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.21a] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -1042,7 +1056,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [concrete = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85bcb7.15] +// CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (), @impl.bfc [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness: = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.b10] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -1101,27 +1116,27 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.826) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%I.facet.bbf) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet.86d) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%I.facet.f18) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet.919) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%I.facet.e05) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet.d5c) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.5(constants.%Self.ccd) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%J.facet.746) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.97d) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%J.facet.300) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.0d0) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%J.facet.c9e) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.97a) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%J.facet.ee9) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.955) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%J.facet.5d6) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.130) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%J.facet.1f5) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.1a7) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%J.facet.19c) {} +// CHECK:STDOUT: specific @F.5(constants.%J.facet.366) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%Self.2ff) { // CHECK:STDOUT: %Self => constants.%Self.2ff @@ -1132,8 +1147,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %array_type.loc188_57.1 => constants.%array_type.873 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.13(constants.%SelfNested.facet.46a) { -// CHECK:STDOUT: %Self => constants.%SelfNested.facet.46a +// CHECK:STDOUT: specific @F.13(constants.%SelfNested.facet.9f5) { +// CHECK:STDOUT: %Self => constants.%SelfNested.facet.9f5 // CHECK:STDOUT: %Self.as_type.loc188_16.1 => constants.%SelfNestedBadParam // CHECK:STDOUT: %ptr.loc188_16.1 => constants.%ptr.4cd // CHECK:STDOUT: %struct_type.x.y.loc188_37.1 => constants.%struct_type.x.y.a89 @@ -1141,8 +1156,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %array_type.loc188_57.1 => constants.%array_type.a41 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.13(constants.%SelfNested.facet.e62) { -// CHECK:STDOUT: %Self => constants.%SelfNested.facet.e62 +// CHECK:STDOUT: specific @F.13(constants.%SelfNested.facet.3bd) { +// CHECK:STDOUT: %Self => constants.%SelfNested.facet.3bd // CHECK:STDOUT: %Self.as_type.loc188_16.1 => constants.%SelfNestedBadReturnType // CHECK:STDOUT: %ptr.loc188_16.1 => constants.%ptr.612 // CHECK:STDOUT: %struct_type.x.y.loc188_37.1 => constants.%struct_type.x.y.ac5 diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index e76425ed0d40..c1ca764980e7 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -28,7 +28,8 @@ impl i32 as I {} // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.684cdb.1: = impl_witness file.%I.impl_witness_table.loc13 [concrete] +// CHECK:STDOUT: %I.impl_witness.684cdb.2: = impl_witness file.%I.impl_witness_table.loc22 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,13 +52,15 @@ impl i32 as I {} // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc13: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table.loc13 = impl_witness_table (), @impl.a9ac64.1 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc13: = impl_witness %I.impl_witness_table.loc13 [concrete = constants.%I.impl_witness.684cdb.1] // CHECK:STDOUT: impl_decl @impl.a9ac64.2 [concrete] {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table.loc22 = impl_witness_table (), @impl.a9ac64.2 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc22: = impl_witness %I.impl_witness_table.loc22 [concrete = constants.%I.impl_witness.684cdb.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -70,11 +73,11 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a9ac64.1: %i32 as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc13 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a9ac64.2: %i32 as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index 1fc67f878787..16e295765ae7 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -55,20 +55,20 @@ impl i32 as I { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.8b6: = impl_witness (@impl.049.%F.decl) [concrete] -// CHECK:STDOUT: %I.facet.ba7: %I.type = facet_value bool, (%impl_witness.8b6) [concrete] -// CHECK:STDOUT: %C.338: type = class_type @C, @C(%I.type, %I.facet.ba7) [concrete] +// CHECK:STDOUT: %I.impl_witness.c21: = impl_witness file.%I.impl_witness_table.loc18 [concrete] +// CHECK:STDOUT: %I.facet.e8a: %I.type = facet_value bool, (%I.impl_witness.c21) [concrete] +// CHECK:STDOUT: %C.7db: type = class_type @C, @C(%I.type, %I.facet.e8a) [concrete] // CHECK:STDOUT: %F.type.8ba: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.2cf: %F.type.8ba = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness.85b: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.d39: = impl_witness file.%I.impl_witness_table.loc25 [concrete] // CHECK:STDOUT: %X.patt.7a9: type = symbolic_binding_pattern X, 1 [symbolic] // CHECK:STDOUT: %C.6fb: type = class_type @C, @C(type, %i32) [concrete] // CHECK:STDOUT: %F.type.066: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.9ec: %F.type.066 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet.6ef: %I.type = facet_value %i32, (%impl_witness.85b) [concrete] -// CHECK:STDOUT: %C.90e: type = class_type @C, @C(%I.type, %I.facet.6ef) [concrete] +// CHECK:STDOUT: %I.facet.8b2: %I.type = facet_value %i32, (%I.impl_witness.d39) [concrete] +// CHECK:STDOUT: %C.835: type = class_type @C, @C(%I.type, %I.facet.8b2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -102,13 +102,15 @@ impl i32 as I { // CHECK:STDOUT: %.loc18_6.2: type = converted %bool.make_type, %.loc18_6.1 [concrete = bool] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc18: = impl_witness (@impl.049.%F.decl) [concrete = constants.%impl_witness.8b6] +// CHECK:STDOUT: %I.impl_witness_table.loc18 = impl_witness_table (@impl.049.%F.decl), @impl.049 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc18: = impl_witness %I.impl_witness_table.loc18 [concrete = constants.%I.impl_witness.c21] // CHECK:STDOUT: impl_decl @impl.a9a [concrete] {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc25: = impl_witness () [concrete = constants.%impl_witness.85b] +// CHECK:STDOUT: %I.impl_witness_table.loc25 = impl_witness_table (), @impl.a9a [concrete] +// CHECK:STDOUT: %I.impl_witness.loc25: = impl_witness %I.impl_witness_table.loc25 [concrete = constants.%I.impl_witness.d39] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -136,26 +138,26 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.049: %.loc18_6.2 as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.8ba = fn_decl @F.2 [concrete = constants.%F.2cf] { -// CHECK:STDOUT: %c.patt: %C.338 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %C.338 = value_param_pattern %c.patt, call_param0 +// CHECK:STDOUT: %c.patt: %C.7db = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %C.7db = value_param_pattern %c.patt, call_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %c.param: %C.338 = value_param call_param0 -// CHECK:STDOUT: %.loc22_22: type = splice_block %C [concrete = constants.%C.338] { +// CHECK:STDOUT: %c.param: %C.7db = value_param call_param0 +// CHECK:STDOUT: %.loc22_22: type = splice_block %C [concrete = constants.%C.7db] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %I.facet: %I.type = facet_value bool, (constants.%impl_witness.8b6) [concrete = constants.%I.facet.ba7] -// CHECK:STDOUT: %.loc22_18: %I.type = converted %bool.make_type, %I.facet [concrete = constants.%I.facet.ba7] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%I.type, constants.%I.facet.ba7) [concrete = constants.%C.338] +// CHECK:STDOUT: %I.facet: %I.type = facet_value bool, (constants.%I.impl_witness.c21) [concrete = constants.%I.facet.e8a] +// CHECK:STDOUT: %.loc22_18: %I.type = converted %bool.make_type, %I.facet [concrete = constants.%I.facet.e8a] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%I.type, constants.%I.facet.e8a) [concrete = constants.%C.7db] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: %C.338 = bind_name c, %c.param +// CHECK:STDOUT: %c: %C.7db = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .I = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc18 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a9a: %i32 as %I.ref { @@ -176,7 +178,7 @@ impl i32 as I { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc25 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc11_9.1: type, %X.loc11_19.1: @C.%T.loc11_9.2 (%T)) { @@ -204,7 +206,7 @@ impl i32 as I { // CHECK:STDOUT: fn(%c.param_patt: @F.1.%C.loc15_17.1 (%C.dbb)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%c.param_patt: %C.338); +// CHECK:STDOUT: fn @F.2(%c.param_patt: %C.7db); // CHECK:STDOUT: // CHECK:STDOUT: fn @F.3(%c.param_patt: %C.6fb); // CHECK:STDOUT: @@ -229,16 +231,16 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%I.type, @F.1.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.ba7) { +// CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.e8a) { // CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type // CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%T.patt -// CHECK:STDOUT: %X.loc11_19.2 => constants.%I.facet.ba7 +// CHECK:STDOUT: %X.loc11_19.2 => constants.%I.facet.e8a // CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%X.patt.3c8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%I.facet.ba7) { -// CHECK:STDOUT: %Self => constants.%I.facet.ba7 -// CHECK:STDOUT: %C.loc15_17.1 => constants.%C.338 +// CHECK:STDOUT: specific @F.1(constants.%I.facet.e8a) { +// CHECK:STDOUT: %Self => constants.%I.facet.e8a +// CHECK:STDOUT: %C.loc15_17.1 => constants.%C.7db // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(type, constants.%i32) { @@ -248,15 +250,15 @@ impl i32 as I { // CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%X.patt.7a9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%I.facet.6ef) { -// CHECK:STDOUT: %Self => constants.%I.facet.6ef -// CHECK:STDOUT: %C.loc15_17.1 => constants.%C.90e +// CHECK:STDOUT: specific @F.1(constants.%I.facet.8b2) { +// CHECK:STDOUT: %Self => constants.%I.facet.8b2 +// CHECK:STDOUT: %C.loc15_17.1 => constants.%C.835 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.6ef) { +// CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.8b2) { // CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type // CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%T.patt -// CHECK:STDOUT: %X.loc11_19.2 => constants.%I.facet.6ef +// CHECK:STDOUT: %X.loc11_19.2 => constants.%I.facet.8b2 // CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%X.patt.3c8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 175d9c4631d5..2b56a1e4c9bd 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -31,10 +31,10 @@ class C { // CHECK:STDOUT: %Simple.assoc_type: type = assoc_entity_type @Simple [concrete] // CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, @Simple.%F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness @C.%Simple.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.e4b: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.c94: %F.type.e4b = struct_value () [concrete] -// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %C, (%Simple.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] @@ -75,7 +75,7 @@ class C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .C = -// CHECK:STDOUT: witness = @C.%impl_witness +// CHECK:STDOUT: witness = @C.%Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -83,7 +83,8 @@ class C { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness %Simple.impl_witness_table [concrete = constants.%Simple.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/impl/impl_assoc_const.carbon b/toolchain/check/testdata/impl/impl_assoc_const.carbon index 7e7a66f52d66..9136fd24aa59 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const.carbon @@ -52,13 +52,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %struct_type.a.b.aa4: type = struct_type {.a: bool, .b: %tuple.type.f94} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Div.type: type = facet_type <@Div> [concrete] // CHECK:STDOUT: %Sub.type: type = facet_type <@Sub> [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -71,22 +72,24 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Op.type.111: type = fn_type @Op.13 [concrete] -// CHECK:STDOUT: %impl_witness.e4a: = impl_witness (imports.%Core.import_ref.6c4) [concrete] -// CHECK:STDOUT: %Sub.facet: %Sub.type = facet_value Core.IntLiteral, (%impl_witness.e4a) [concrete] -// CHECK:STDOUT: %.76a: type = fn_type_with_self_type %Op.type.111, %Sub.facet [concrete] +// CHECK:STDOUT: %Sub.impl_witness_table.d7b = impl_witness_table (imports.%Core.import_ref.6c4), @impl.bf8 [concrete] +// CHECK:STDOUT: %Sub.impl_witness.37d: = impl_witness %Sub.impl_witness_table.d7b [concrete] +// CHECK:STDOUT: %Sub.facet: %Sub.type = facet_value Core.IntLiteral, (%Sub.impl_witness.37d) [concrete] +// CHECK:STDOUT: %.07b: type = fn_type_with_self_type %Op.type.111, %Sub.facet [concrete] // CHECK:STDOUT: %Op.type.2b9: type = fn_type @Op.14 [concrete] // CHECK:STDOUT: %Op.667: %Op.type.2b9 = struct_value () [concrete] // CHECK:STDOUT: %Op.bound.645: = bound_method %int_3, %Op.667 [concrete] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Op.type.784: type = fn_type @Op.15 [concrete] -// CHECK:STDOUT: %impl_witness.586: = impl_witness (imports.%Core.import_ref.dfd) [concrete] -// CHECK:STDOUT: %Div.facet: %Div.type = facet_value Core.IntLiteral, (%impl_witness.586) [concrete] -// CHECK:STDOUT: %.cf0: type = fn_type_with_self_type %Op.type.784, %Div.facet [concrete] +// CHECK:STDOUT: %Div.impl_witness_table.381 = impl_witness_table (imports.%Core.import_ref.dfd), @impl.f0e [concrete] +// CHECK:STDOUT: %Div.impl_witness.ec4: = impl_witness %Div.impl_witness_table.381 [concrete] +// CHECK:STDOUT: %Div.facet: %Div.type = facet_value Core.IntLiteral, (%Div.impl_witness.ec4) [concrete] +// CHECK:STDOUT: %.d13: type = fn_type_with_self_type %Op.type.784, %Div.facet [concrete] // CHECK:STDOUT: %Op.type.c38: type = fn_type @Op.16 [concrete] // CHECK:STDOUT: %Op.553: %Op.type.c38 = struct_value () [concrete] // CHECK:STDOUT: %Op.bound.2e7: = bound_method %int_4, %Op.553 [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %struct> [concrete] -// CHECK:STDOUT: %impl_witness.f56: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -124,14 +127,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %int_2.loc6_46: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_47.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2.loc6_46) // CHECK:STDOUT: %.loc6_48.1: %struct_type.a.b.aa4 = struct_literal (%true, %.loc6_47.1) -// CHECK:STDOUT: %impl.elem0.loc6_47.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6_47.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_47.1: = bound_method %int_1, %impl.elem0.loc6_47.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc6_47.1: = specific_function %impl.elem0.loc6_47.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.2: = bound_method %int_1, %specific_fn.loc6_47.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc6_47.1: init %i32 = call %bound_method.loc6_47.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_47.2: %i32 = value_of_initializer %int.convert_checked.loc6_47.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_47.3: %i32 = converted %int_1, %.loc6_47.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc6_47.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6_47.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_47.3: = bound_method %int_2.loc6_46, %impl.elem0.loc6_47.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc6_47.2: = specific_function %impl.elem0.loc6_47.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.4: = bound_method %int_2.loc6_46, %specific_fn.loc6_47.2 [concrete = constants.%bound_method.b92] @@ -152,17 +155,17 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc6_65: bool = not %false [concrete = constants.%true] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] // CHECK:STDOUT: %int_2.loc6_86: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc6_84: %.76a = impl_witness_access constants.%impl_witness.e4a, element0 [concrete = constants.%Op.667] +// CHECK:STDOUT: %impl.elem0.loc6_84: %.07b = impl_witness_access constants.%Sub.impl_witness.37d, element0 [concrete = constants.%Op.667] // CHECK:STDOUT: %bound_method.loc6_84: = bound_method %int_3, %impl.elem0.loc6_84 [concrete = constants.%Op.bound.645] // CHECK:STDOUT: %int.ssub: init Core.IntLiteral = call %bound_method.loc6_84(%int_3, %int_2.loc6_86) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %int_2.loc6_93: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc6_91: %.cf0 = impl_witness_access constants.%impl_witness.586, element0 [concrete = constants.%Op.553] +// CHECK:STDOUT: %impl.elem0.loc6_91: %.d13 = impl_witness_access constants.%Div.impl_witness.ec4, element0 [concrete = constants.%Op.553] // CHECK:STDOUT: %bound_method.loc6_91: = bound_method %int_4, %impl.elem0.loc6_91 [concrete = constants.%Op.bound.2e7] // CHECK:STDOUT: %int.sdiv: init Core.IntLiteral = call %bound_method.loc6_91(%int_4, %int_2.loc6_93) [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_94.1: %tuple.type.f94 = tuple_literal (%int.ssub, %int.sdiv) // CHECK:STDOUT: %.loc6_95.1: %struct_type.a.b.aa4 = struct_literal (%.loc6_65, %.loc6_94.1) -// CHECK:STDOUT: %impl.elem0.loc6_94.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6_94.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_94.1: = bound_method %int.ssub, %impl.elem0.loc6_94.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc6_94.1: = specific_function %impl.elem0.loc6_94.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_94.2: = bound_method %int.ssub, %specific_fn.loc6_94.1 [concrete = constants.%bound_method.9a1] @@ -171,7 +174,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %int.convert_checked.loc6_94.1: init %i32 = call %bound_method.loc6_94.2(%.loc6_84.2) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_94.2: %i32 = value_of_initializer %int.convert_checked.loc6_94.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_94.3: %i32 = converted %int.ssub, %.loc6_94.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc6_94.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6_94.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_94.3: = bound_method %int.sdiv, %impl.elem0.loc6_94.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc6_94.2: = specific_function %impl.elem0.loc6_94.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_94.4: = bound_method %int.sdiv, %specific_fn.loc6_94.2 [concrete = constants.%bound_method.b92] @@ -189,7 +192,8 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc6_54, %.loc6_95.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness.f56] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.540 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.b.fe2 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -211,7 +215,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.540: %.loc6_7.2 as %.loc6_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%Self.826) {} @@ -242,11 +246,12 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %struct_type.a.b.aa4: type = struct_type {.a: bool, .b: %tuple.type.f94} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -268,7 +273,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %tuple.ffd: %tuple.type.d07 = tuple_value (%int_3.822, %int_4.940) [concrete] // CHECK:STDOUT: %struct.68c: %struct_type.a.b.fe2 = struct_value (%false, %tuple.ffd) [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %struct.682 and %impl.elem0 = %struct.68c> [concrete] -// CHECK:STDOUT: %impl_witness.85b: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -304,14 +309,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc10_47.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) // CHECK:STDOUT: %.loc10_48.1: %struct_type.a.b.aa4 = struct_literal (%true, %.loc10_47.1) -// CHECK:STDOUT: %impl.elem0.loc10_47.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc10_47.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_47.1: = bound_method %int_1, %impl.elem0.loc10_47.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc10_47.1: = specific_function %impl.elem0.loc10_47.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_47.2: = bound_method %int_1, %specific_fn.loc10_47.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc10_47.1: init %i32 = call %bound_method.loc10_47.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_47.2: %i32 = value_of_initializer %int.convert_checked.loc10_47.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_47.3: %i32 = converted %int_1, %.loc10_47.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_47.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc10_47.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_47.3: = bound_method %int_2, %impl.elem0.loc10_47.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc10_47.2: = specific_function %impl.elem0.loc10_47.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_47.4: = bound_method %int_2, %specific_fn.loc10_47.2 [concrete = constants.%bound_method.b92] @@ -333,14 +338,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc10_82.1: %tuple.type.f94 = tuple_literal (%int_3, %int_4) // CHECK:STDOUT: %.loc10_83.1: %struct_type.a.b.aa4 = struct_literal (%false, %.loc10_82.1) -// CHECK:STDOUT: %impl.elem0.loc10_82.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc10_82.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_82.1: = bound_method %int_3, %impl.elem0.loc10_82.1 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc10_82.1: = specific_function %impl.elem0.loc10_82.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_82.2: = bound_method %int_3, %specific_fn.loc10_82.1 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc10_82.1: init %i32 = call %bound_method.loc10_82.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_82.2: %i32 = value_of_initializer %int.convert_checked.loc10_82.1 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_82.3: %i32 = converted %int_3, %.loc10_82.2 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc10_82.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc10_82.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_82.3: = bound_method %int_4, %impl.elem0.loc10_82.2 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc10_82.2: = specific_function %impl.elem0.loc10_82.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_82.4: = bound_method %int_4, %specific_fn.loc10_82.2 [concrete = constants.%bound_method.1da] @@ -356,7 +361,8 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_54, %.loc10_83.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.85b] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.347 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.b.fe2 = impl_witness_assoc_constant constants.%struct.682 [concrete = constants.%struct.682] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -378,7 +384,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.347: %.loc10_7.2 as %.loc10_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%Self.826) {} diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 10851b546384..941ea3d90eba 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -27,10 +27,10 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, @Simple.%F.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness file.%Simple.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.1e1: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.4c3: %F.type.1e1 = struct_value () [symbolic] -// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %T, (%impl_witness) [symbolic] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %T, (%Simple.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,7 +54,8 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] // CHECK:STDOUT: %T.loc15_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness %Simple.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%Simple.impl_witness (constants.%Simple.impl_witness)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { @@ -71,7 +72,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: generic impl @impl(%T.loc15_14.1: type) { // CHECK:STDOUT: %T.loc15_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc15_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%T.loc15_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness file.%Simple.impl_witness_table, @impl(%T.loc15_14.2) [symbolic = %Simple.impl_witness (constants.%Simple.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc15_14.2) [symbolic = %F.type (constants.%F.type.1e1)] @@ -82,7 +83,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -104,7 +105,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc15_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc15_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %Simple.impl_witness => constants.%Simple.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.1e1 diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index 3e1775a5ca09..4fb42cbfd492 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -38,13 +38,13 @@ fn G(c: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.a02: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.dc7: %F.type.a02 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %.be1: type = fn_type_with_self_type %F.type.b7b, %HasF.facet [concrete] +// CHECK:STDOUT: %.fec: type = fn_type_with_self_type %F.type.b7b, %HasF.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,8 @@ fn G(c: C) { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, call_param0 @@ -95,7 +96,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -125,11 +126,11 @@ fn G(c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %G.ref.loc24: %HasF.assoc_type = name_ref G, @C.%G [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc24: %.be1 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.dc7] +// CHECK:STDOUT: %impl.elem0.loc24: %.fec = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.dc7] // CHECK:STDOUT: %F.call.loc24: init %empty_tuple.type = call %impl.elem0.loc24() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %G.ref.loc25: %HasF.assoc_type = name_ref G, @C.%G [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc25: %.be1 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.dc7] +// CHECK:STDOUT: %impl.elem0.loc25: %.fec = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.dc7] // CHECK:STDOUT: %F.call.loc25: init %empty_tuple.type = call %impl.elem0.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon index 366ce87f0a63..15cfaa507c1d 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -54,17 +54,17 @@ fn G() { // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.ab4: = impl_witness @C.%I.impl_witness_table [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %F.type.b25: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.c41: %F.type.b25 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet.998: %I.type = facet_value %C, (%impl_witness.1bc) [concrete] -// CHECK:STDOUT: %.995: type = fn_type_with_self_type %F.type.cf0, %I.facet.998 [concrete] -// CHECK:STDOUT: %impl_witness.054: = impl_witness (@impl.770.%F.decl) [concrete] +// CHECK:STDOUT: %I.facet.580: %I.type = facet_value %C, (%I.impl_witness.ab4) [concrete] +// CHECK:STDOUT: %.3ac: type = fn_type_with_self_type %F.type.cf0, %I.facet.580 [concrete] +// CHECK:STDOUT: %I.impl_witness.6f2: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.5d6: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.a2e: %F.type.5d6 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet.702: %I.type = facet_value %C, (%impl_witness.054) [concrete] +// CHECK:STDOUT: %I.facet.029: %I.type = facet_value %C, (%I.impl_witness.6f2) [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -92,7 +92,8 @@ fn G() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.770.%F.decl) [concrete = constants.%impl_witness.054] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.770.%F.decl), @impl.770 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.6f2] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,7 +115,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -122,7 +123,8 @@ fn G() { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.a21 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.ab4] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -142,7 +144,7 @@ fn G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.995 = impl_witness_access constants.%impl_witness.1bc, element0 [concrete = ] +// CHECK:STDOUT: %impl.elem0: %.3ac = impl_witness_access constants.%I.impl_witness.ab4, element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -155,11 +157,11 @@ fn G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.995 = impl_witness_access constants.%impl_witness.1bc, element0 [concrete = ] +// CHECK:STDOUT: %impl.elem0: %.3ac = impl_witness_access constants.%I.impl_witness.ab4, element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%I.facet.702) {} +// CHECK:STDOUT: specific @F.1(constants.%I.facet.029) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 94725f489c16..c666f3dd0345 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -136,19 +136,19 @@ fn G(x: A) { // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%F.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.d55: = impl_witness (@impl.%F.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %HasF.impl_witness.ec7: = impl_witness file.%HasF.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.3fd: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.c98: %F.type.3fd = struct_value () [symbolic] -// CHECK:STDOUT: %HasF.facet.322: %HasF.type = facet_value %T, (%impl_witness.d55) [symbolic] +// CHECK:STDOUT: %HasF.facet.216: %HasF.type = facet_value %T, (%HasF.impl_witness.ec7) [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.d9b: = impl_witness (@impl.%F.decl), @impl(%empty_struct_type) [concrete] +// CHECK:STDOUT: %HasF.impl_witness.6e4: = impl_witness file.%HasF.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.type.2e4: type = fn_type @F.2, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.f13: %F.type.2e4 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet.ccf: %HasF.type = facet_value %empty_struct_type, (%impl_witness.d9b) [concrete] -// CHECK:STDOUT: %.23a: type = fn_type_with_self_type %F.type.b7b, %HasF.facet.ccf [concrete] +// CHECK:STDOUT: %HasF.facet.fa2: %HasF.type = facet_value %empty_struct_type, (%HasF.impl_witness.6e4) [concrete] +// CHECK:STDOUT: %.e02: type = fn_type_with_self_type %F.type.b7b, %HasF.facet.fa2 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.f13, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } @@ -175,7 +175,8 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness.d55)] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%HasF.impl_witness (constants.%HasF.impl_witness.ec7)] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, call_param0 @@ -214,7 +215,7 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @impl(%T.loc8_14.1: type) { // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%T.loc8_14.2) [symbolic = %impl_witness (constants.%impl_witness.d55)] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table, @impl(%T.loc8_14.2) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness.ec7)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.3fd)] @@ -232,7 +233,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -260,7 +261,7 @@ fn G(x: A) { // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.23a = impl_witness_access constants.%impl_witness.d9b, element0 [concrete = constants.%F.f13] +// CHECK:STDOUT: %impl.elem0: %.e02 = impl_witness_access constants.%HasF.impl_witness.6e4, element0 [concrete = constants.%F.f13] // CHECK:STDOUT: %bound_method.loc13_4: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %bound_method.loc13_14: = bound_method %x.ref, %specific_fn @@ -276,7 +277,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.d55 +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.ec7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3fd @@ -289,15 +290,15 @@ fn G(x: A) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%HasF.facet.322) { -// CHECK:STDOUT: %Self => constants.%HasF.facet.322 +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet.216) { +// CHECK:STDOUT: %Self => constants.%HasF.facet.216 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%empty_struct_type // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.d9b +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.6e4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2e4 @@ -323,19 +324,19 @@ fn G(x: A) { // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%F.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.d55: = impl_witness (@impl.%F.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %HasF.impl_witness.ec7: = impl_witness file.%HasF.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.3fd: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.c98: %F.type.3fd = struct_value () [symbolic] -// CHECK:STDOUT: %HasF.facet.322: %HasF.type = facet_value %T, (%impl_witness.d55) [symbolic] +// CHECK:STDOUT: %HasF.facet.216: %HasF.type = facet_value %T, (%HasF.impl_witness.ec7) [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.d9b: = impl_witness (@impl.%F.decl), @impl(%empty_struct_type) [concrete] +// CHECK:STDOUT: %HasF.impl_witness.6e4: = impl_witness file.%HasF.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.type.2e4: type = fn_type @F.2, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.f13: %F.type.2e4 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet.ccf: %HasF.type = facet_value %empty_struct_type, (%impl_witness.d9b) [concrete] -// CHECK:STDOUT: %.23a: type = fn_type_with_self_type %F.type.b7b, %HasF.facet.ccf [concrete] +// CHECK:STDOUT: %HasF.facet.fa2: %HasF.type = facet_value %empty_struct_type, (%HasF.impl_witness.6e4) [concrete] +// CHECK:STDOUT: %.e02: type = fn_type_with_self_type %F.type.b7b, %HasF.facet.fa2 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.f13, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -363,7 +364,8 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness.d55)] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%HasF.impl_witness (constants.%HasF.impl_witness.ec7)] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, call_param0 @@ -415,7 +417,7 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @impl(%T.loc8_14.1: type) { // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%T.loc8_14.2) [symbolic = %impl_witness (constants.%impl_witness.d55)] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table, @impl(%T.loc8_14.2) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness.ec7)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.3fd)] @@ -439,7 +441,7 @@ fn G(x: A) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -468,7 +470,7 @@ fn G(x: A) { // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.23a = impl_witness_access constants.%impl_witness.d9b, element0 [concrete = constants.%F.f13] +// CHECK:STDOUT: %impl.elem0: %.e02 = impl_witness_access constants.%HasF.impl_witness.6e4, element0 [concrete = constants.%F.f13] // CHECK:STDOUT: %bound_method.loc13_11: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %bound_method.loc13_21: = bound_method %x.ref, %specific_fn @@ -488,7 +490,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.d55 +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.ec7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3fd @@ -501,15 +503,15 @@ fn G(x: A) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%HasF.facet.322) { -// CHECK:STDOUT: %Self => constants.%HasF.facet.322 +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet.216) { +// CHECK:STDOUT: %Self => constants.%HasF.facet.216 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%empty_struct_type // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.d9b +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.6e4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2e4 @@ -541,19 +543,19 @@ fn G(x: A) { // CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.7d1: = impl_witness (@impl.%F.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %HasF.impl_witness.834: = impl_witness file.%HasF.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.8fe: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.92a: %F.type.8fe = struct_value () [symbolic] -// CHECK:STDOUT: %HasF.facet.0a3: %HasF.type = facet_value %C.f2e, (%impl_witness.7d1) [symbolic] +// CHECK:STDOUT: %HasF.facet.766: %HasF.type = facet_value %C.f2e, (%HasF.impl_witness.834) [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %C.f2e [symbolic] // CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.770: = impl_witness (@impl.%F.decl), @impl(%empty_struct_type) [concrete] +// CHECK:STDOUT: %HasF.impl_witness.0de: = impl_witness file.%HasF.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.type.2e5: type = fn_type @F.2, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.c77: %F.type.2e5 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet.7f6: %HasF.type = facet_value %C.7a7, (%impl_witness.770) [concrete] -// CHECK:STDOUT: %.4ce: type = fn_type_with_self_type %F.type.b7b, %HasF.facet.7f6 [concrete] +// CHECK:STDOUT: %HasF.facet.672: %HasF.type = facet_value %C.7a7, (%HasF.impl_witness.0de) [concrete] +// CHECK:STDOUT: %.0c7: type = fn_type_with_self_type %F.type.b7b, %HasF.facet.672 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.c77, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -587,7 +589,8 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness.7d1)] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%HasF.impl_witness (constants.%HasF.impl_witness.834)] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %x.patt: %C.7a7 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C.7a7 = value_param_pattern %x.patt, call_param0 @@ -629,7 +632,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] // CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_27.2 (constants.%C.f2e)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%T.loc10_14.2) [symbolic = %impl_witness (constants.%impl_witness.7d1)] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table, @impl(%T.loc10_14.2) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness.834)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.8fe)] @@ -647,7 +650,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -692,7 +695,7 @@ fn G(x: A) { // CHECK:STDOUT: %x.ref: %C.7a7 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.4ce = impl_witness_access constants.%impl_witness.770, element0 [concrete = constants.%F.c77] +// CHECK:STDOUT: %impl.elem0: %.0c7 = impl_witness_access constants.%HasF.impl_witness.0de, element0 [concrete = constants.%F.c77] // CHECK:STDOUT: %bound_method.loc15_4: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %bound_method.loc15_14: = bound_method %x.ref, %specific_fn @@ -716,7 +719,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T.patt // CHECK:STDOUT: %C.loc10_27.2 => constants.%C.f2e -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.7d1 +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.834 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.8fe @@ -734,8 +737,8 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: specific @C(@F.2.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%HasF.facet.0a3) { -// CHECK:STDOUT: %Self => constants.%HasF.facet.0a3 +// CHECK:STDOUT: specific @F.1(constants.%HasF.facet.766) { +// CHECK:STDOUT: %Self => constants.%HasF.facet.766 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%C.f2e // CHECK:STDOUT: } // CHECK:STDOUT: @@ -750,7 +753,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%empty_struct_type // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T.patt // CHECK:STDOUT: %C.loc10_27.2 => constants.%C.7a7 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.770 +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.0de // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2e5 @@ -782,10 +785,10 @@ fn G(x: A) { // CHECK:STDOUT: %assoc0.d31: %HasF.assoc_type.dd8 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %HasF.type.901 [symbolic] -// CHECK:STDOUT: %impl_witness.142: = impl_witness (@impl.%F.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %HasF.impl_witness.55c: = impl_witness file.%HasF.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.6c8: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.008: %F.type.6c8 = struct_value () [symbolic] -// CHECK:STDOUT: %HasF.facet.557: %HasF.type.901 = facet_value %empty_struct_type, (%impl_witness.142) [symbolic] +// CHECK:STDOUT: %HasF.facet.566: %HasF.type.901 = facet_value %empty_struct_type, (%HasF.impl_witness.55c) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.type.072: type = facet_type <@HasF, @HasF(%empty_struct_type)> [concrete] @@ -795,11 +798,11 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.assoc_type.9e4: type = assoc_entity_type @HasF, @HasF(%empty_struct_type) [concrete] // CHECK:STDOUT: %assoc0.f76: %HasF.assoc_type.9e4 = assoc_entity element0, @HasF.%F.decl [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %HasF.type.072 [concrete] -// CHECK:STDOUT: %impl_witness.221: = impl_witness (@impl.%F.decl), @impl(%empty_struct_type) [concrete] +// CHECK:STDOUT: %HasF.impl_witness.25d: = impl_witness file.%HasF.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.type.a13: type = fn_type @F.2, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.8c6: %F.type.a13 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet.ab8: %HasF.type.072 = facet_value %empty_struct_type, (%impl_witness.221) [concrete] -// CHECK:STDOUT: %.ad0: type = fn_type_with_self_type %F.type.b0b, %HasF.facet.ab8 [concrete] +// CHECK:STDOUT: %HasF.facet.07d: %HasF.type.072 = facet_value %empty_struct_type, (%HasF.impl_witness.25d) [concrete] +// CHECK:STDOUT: %.21f: type = fn_type_with_self_type %F.type.b0b, %HasF.facet.07d [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.8c6, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -832,7 +835,8 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type.loc8_36.1: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.2 (constants.%HasF.type.901)] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness.142)] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%HasF.impl_witness (constants.%HasF.impl_witness.55c)] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, call_param0 @@ -887,7 +891,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: %HasF.type.loc8_36.2: type = facet_type <@HasF, @HasF(%T.loc8_14.2)> [symbolic = %HasF.type.loc8_36.2 (constants.%HasF.type.901)] // CHECK:STDOUT: %require_complete: = require_complete_type %HasF.type.loc8_36.2 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%T.loc8_14.2) [symbolic = %impl_witness (constants.%impl_witness.142)] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table, @impl(%T.loc8_14.2) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness.55c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.6c8)] @@ -905,7 +909,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -936,7 +940,7 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%empty_struct_type)> [concrete = constants.%HasF.type.072] // CHECK:STDOUT: %.loc13_14: %HasF.assoc_type.9e4 = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%empty_struct_type) [concrete = constants.%assoc0.f76] // CHECK:STDOUT: %F.ref: %HasF.assoc_type.9e4 = name_ref F, %.loc13_14 [concrete = constants.%assoc0.f76] -// CHECK:STDOUT: %impl.elem0: %.ad0 = impl_witness_access constants.%impl_witness.221, element0 [concrete = constants.%F.8c6] +// CHECK:STDOUT: %impl.elem0: %.21f = impl_witness_access constants.%HasF.impl_witness.25d, element0 [concrete = constants.%F.8c6] // CHECK:STDOUT: %bound_method.loc13_4: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %bound_method.loc13_18: = bound_method %x.ref, %specific_fn @@ -973,7 +977,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt // CHECK:STDOUT: %HasF.type.loc8_36.2 => constants.%HasF.type.901 // CHECK:STDOUT: %require_complete => constants.%require_complete -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.142 +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.55c // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.6c8 @@ -986,10 +990,10 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%HasF.facet.557) { +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%HasF.facet.566) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HasF.type => constants.%HasF.type.901 -// CHECK:STDOUT: %Self => constants.%HasF.facet.557 +// CHECK:STDOUT: %Self => constants.%HasF.facet.566 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_struct_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1011,7 +1015,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt // CHECK:STDOUT: %HasF.type.loc8_36.2 => constants.%HasF.type.072 // CHECK:STDOUT: %require_complete => constants.%complete_type -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.221 +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.25d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.a13 @@ -1036,7 +1040,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%T, %U) [symbolic] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table, @impl(%T, %U) [symbolic] // CHECK:STDOUT: %F.type.56e: type = fn_type @F.2, @impl(%T, %U) [symbolic] // CHECK:STDOUT: %F.9b8: %F.type.56e = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] @@ -1069,7 +1073,8 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc12_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T)] // CHECK:STDOUT: %U.loc12_24.1: type = bind_symbolic_name U, 1 [symbolic = %U.loc12_24.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(constants.%T, constants.%U) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table, @impl(constants.%T, constants.%U) [symbolic = @impl.%HasF.impl_witness (constants.%HasF.impl_witness)] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, call_param0 @@ -1110,7 +1115,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc12_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt)] // CHECK:STDOUT: %U.loc12_24.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc12_24.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc12_24.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_24.2 (constants.%U.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%T.loc12_14.2, %U.loc12_24.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table, @impl(%T.loc12_14.2, %U.loc12_24.2) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc12_14.2, %U.loc12_24.2) [symbolic = %F.type (constants.%F.type.56e)] @@ -1169,7 +1174,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc12_14.2 => constants.%T.patt // CHECK:STDOUT: %U.loc12_24.2 => constants.%U // CHECK:STDOUT: %U.patt.loc12_24.2 => constants.%U.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.56e @@ -1197,10 +1202,10 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.assoc_type.dd8: type = assoc_entity_type @HasF, @HasF(%T) [symbolic] // CHECK:STDOUT: %assoc0.d31: %HasF.assoc_type.dd8 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %require_complete.03f: = require_complete_type %HasF.type.901 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.912: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.f30: %F.type.912 = struct_value () [symbolic] -// CHECK:STDOUT: %HasF.facet: %HasF.type.901 = facet_value %T, (%impl_witness) [symbolic] +// CHECK:STDOUT: %HasF.facet: %HasF.type.901 = facet_value %T, (%HasF.impl_witness) [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -1246,7 +1251,8 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.2 (constants.%HasF.type.901)] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%HasF.impl_witness (constants.%HasF.impl_witness)] // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { @@ -1300,7 +1306,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(%T.loc8_14.2)> [symbolic = %HasF.type.loc8_35.2 (constants.%HasF.type.901)] // CHECK:STDOUT: %require_complete: = require_complete_type %HasF.type.loc8_35.2 [symbolic = %require_complete (constants.%require_complete.03f)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%T.loc8_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table, @impl(%T.loc8_14.2) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.912)] @@ -1318,7 +1324,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1401,7 +1407,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt // CHECK:STDOUT: %HasF.type.loc8_35.2 => constants.%HasF.type.901 // CHECK:STDOUT: %require_complete => constants.%require_complete.03f -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.912 diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 2123f14659b5..665727210199 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -37,15 +37,15 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.f36: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.4c3: %F.type.f36 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %F.type.b25: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.c41: %F.type.b25 = struct_value () [concrete] -// CHECK:STDOUT: %.ed5: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] +// CHECK:STDOUT: %.832: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -129,7 +129,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @C.%impl_witness +// CHECK:STDOUT: witness = @C.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -137,7 +137,8 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -162,7 +163,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.ed5 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.4c3] +// CHECK:STDOUT: %impl.elem0: %.832 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.4c3] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %F.call: init %i32 = call %bound_method(%c.ref) // CHECK:STDOUT: %.loc24_15.1: %i32 = value_of_initializer %F.call diff --git a/toolchain/check/testdata/impl/lookup/min_prelude/specialization_with_symbolic_rewrite.carbon b/toolchain/check/testdata/impl/lookup/min_prelude/specialization_with_symbolic_rewrite.carbon index 8a2b8b533fc1..5042a6142bc9 100644 --- a/toolchain/check/testdata/impl/lookup/min_prelude/specialization_with_symbolic_rewrite.carbon +++ b/toolchain/check/testdata/impl/lookup/min_prelude/specialization_with_symbolic_rewrite.carbon @@ -129,7 +129,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.a53: type = impl_witness_access %.Self.as_wit.iface0.178, element0 [symbolic] // CHECK:STDOUT: %Z_where.type.93a: type = facet_type <@Z, @Z(%S) where %impl.elem0.a53 = %empty_tuple.type> [symbolic] // CHECK:STDOUT: %require_complete.619: = require_complete_type %Z_where.type.93a [symbolic] -// CHECK:STDOUT: %impl_witness.dba: = impl_witness (file.%impl_witness_assoc_constant.loc9), @impl.76d(%T.8b3, %S) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.7f6: = impl_witness file.%Z.impl_witness_table.loc9, @impl.76d(%T.8b3, %S) [symbolic] // CHECK:STDOUT: %Z.type.049: type = facet_type <@Z, @Z(%C)> [concrete] // CHECK:STDOUT: %.Self.3c5: %Z.type.049 = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Self.a38: %Z.type.049 = bind_symbolic_name Self, 1 [symbolic] @@ -141,7 +141,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.802: type = impl_witness_access %.Self.as_wit.iface0.72c, element0 [symbolic_self] // CHECK:STDOUT: %Z_where.type.bee: type = facet_type <@Z, @Z(%C) where %impl.elem0.802 = %T.8b3> [symbolic] // CHECK:STDOUT: %require_complete.13f: = require_complete_type %Z_where.type.bee [symbolic] -// CHECK:STDOUT: %impl_witness.a9c: = impl_witness (file.%impl_witness_assoc_constant.loc11), @impl.44b(%T.8b3) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.fae: = impl_witness file.%Z.impl_witness_table.loc11, @impl.44b(%T.8b3) [symbolic] // CHECK:STDOUT: %T.62d: %Z.type.049 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.897: %Z.type.049 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.62d [symbolic] @@ -150,8 +150,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.2b1: = require_complete_type %T.as_type [symbolic] // CHECK:STDOUT: %Z_where.type.c29: type = facet_type <@Z, @Z(%C) where %impl.elem0.802 = %T.as_type> [symbolic] // CHECK:STDOUT: %require_complete.c8a: = require_complete_type %Z_where.type.c29 [symbolic] -// CHECK:STDOUT: %impl_witness.7ef: = impl_witness (file.%impl_witness_assoc_constant.loc11), @impl.44b(%T.as_type) [symbolic] -// CHECK:STDOUT: %Z.facet.ffe: %Z.type.049 = facet_value %T.as_type, (%impl_witness.7ef) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.731: = impl_witness file.%Z.impl_witness_table.loc11, @impl.44b(%T.as_type) [symbolic] +// CHECK:STDOUT: %Z.facet.e47: %Z.type.049 = facet_value %T.as_type, (%Z.impl_witness.731) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -198,7 +198,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc9_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %S.loc9_24.1: type = bind_symbolic_name S, 1 [symbolic = %S.loc9_24.2 (constants.%S)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc9: = impl_witness (%impl_witness_assoc_constant.loc9), @impl.76d(constants.%T.8b3, constants.%S) [symbolic = @impl.76d.%impl_witness (constants.%impl_witness.dba)] +// CHECK:STDOUT: %Z.impl_witness_table.loc9 = impl_witness_table (%impl_witness_assoc_constant.loc9), @impl.76d [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc9: = impl_witness %Z.impl_witness_table.loc9, @impl.76d(constants.%T.8b3, constants.%S) [symbolic = @impl.76d.%Z.impl_witness (constants.%Z.impl_witness.7f6)] // CHECK:STDOUT: %impl_witness_assoc_constant.loc9: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: impl_decl @impl.44b [concrete] { // CHECK:STDOUT: %T.patt.loc11_20.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_20.2 (constants.%T.patt.e01)] @@ -221,7 +222,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc11_20.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_20.2 (constants.%T.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc11: = impl_witness (%impl_witness_assoc_constant.loc11), @impl.44b(constants.%T.8b3) [symbolic = @impl.44b.%impl_witness (constants.%impl_witness.a9c)] +// CHECK:STDOUT: %Z.impl_witness_table.loc11 = impl_witness_table (%impl_witness_assoc_constant.loc11), @impl.44b [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc11: = impl_witness %Z.impl_witness_table.loc11, @impl.44b(constants.%T.8b3) [symbolic = @impl.44b.%Z.impl_witness (constants.%Z.impl_witness.fae)] // CHECK:STDOUT: %impl_witness_assoc_constant.loc11: type = impl_witness_assoc_constant constants.%T.8b3 [symbolic = @impl.44b.%T.loc11_20.2 (constants.%T.8b3)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc13_6.1: %Z.type.049 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt.897)] @@ -286,13 +288,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.loc9_50.2: type = impl_witness_access %.Self.as_wit.iface0.loc9_50.2, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.a53)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc9_24.2) where %impl.elem0.loc9_50.2 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.93a)] // CHECK:STDOUT: %require_complete.loc9_44: = require_complete_type %Z_where.type [symbolic = %require_complete.loc9_44 (constants.%require_complete.619)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant.loc9), @impl.76d(%T.loc9_14.2, %S.loc9_24.2) [symbolic = %impl_witness (constants.%impl_witness.dba)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc9, @impl.76d(%T.loc9_14.2, %S.loc9_24.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.7f6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %.loc9_44 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc9 +// CHECK:STDOUT: witness = file.%Z.impl_witness.loc9 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -301,13 +303,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc11_20.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_20.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(constants.%C) where constants.%impl.elem0.802 = %T.loc11_20.2> [symbolic = %Z_where.type (constants.%Z_where.type.bee)] // CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.13f)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant.loc11), @impl.44b(%T.loc11_20.2) [symbolic = %impl_witness (constants.%impl_witness.a9c)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc11, @impl.44b(%T.loc11_20.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.fae)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref.loc11_30 as %.loc11_40 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc11 +// CHECK:STDOUT: witness = file.%Z.impl_witness.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -342,7 +344,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.loc15_11.3: type = converted %T.ref.loc15, %T.as_type.loc15_11.1 [symbolic = %T.as_type.loc13_19.2 (constants.%T.as_type)] // CHECK:STDOUT: %T.as_type.loc15_11.2: type = facet_access_type constants.%T.62d [symbolic = %T.as_type.loc13_19.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc15_11.4: type = converted constants.%T.62d, %T.as_type.loc15_11.2 [symbolic = %T.as_type.loc13_19.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%impl_witness.7ef, element0 [symbolic = %T.as_type.loc13_19.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.731, element0 [symbolic = %T.as_type.loc13_19.2 (constants.%T.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%T.as_type.loc13_19.2 (%T.as_type) = bind_name a, %t.ref // CHECK:STDOUT: return @@ -386,7 +388,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.loc9_50.2 => constants.%impl.elem0.a53 // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.93a // CHECK:STDOUT: %require_complete.loc9_44 => constants.%require_complete.619 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.dba +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.7f6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(@impl.76d.%S.loc9_24.2) {} @@ -411,7 +413,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc11_20.2 => constants.%T.patt.e01 // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.bee // CHECK:STDOUT: %require_complete => constants.%require_complete.13f -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.a9c +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.fae // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.44b(%T.loc11_20.2) {} @@ -427,12 +429,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc11_20.2 => constants.%T.patt.e01 // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.c29 // CHECK:STDOUT: %require_complete => constants.%require_complete.c8a -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.7ef +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.731 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.ffe) {} +// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.e47) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_nonfinal_specialized_symbolic_rewrite.carbon // CHECK:STDOUT: @@ -465,7 +467,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.a53: type = impl_witness_access %.Self.as_wit.iface0.178, element0 [symbolic] // CHECK:STDOUT: %Z_where.type.93a: type = facet_type <@Z, @Z(%S) where %impl.elem0.a53 = %empty_tuple.type> [symbolic] // CHECK:STDOUT: %require_complete.619: = require_complete_type %Z_where.type.93a [symbolic] -// CHECK:STDOUT: %impl_witness.dba: = impl_witness (file.%impl_witness_assoc_constant.loc10), @impl.76d(%T.8b3, %S) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.7f6: = impl_witness file.%Z.impl_witness_table.loc10, @impl.76d(%T.8b3, %S) [symbolic] // CHECK:STDOUT: %Z.type.049: type = facet_type <@Z, @Z(%C)> [concrete] // CHECK:STDOUT: %.Self.3c5: %Z.type.049 = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Self.a38: %Z.type.049 = bind_symbolic_name Self, 1 [symbolic] @@ -477,7 +479,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.802: type = impl_witness_access %.Self.as_wit.iface0.72c, element0 [symbolic_self] // CHECK:STDOUT: %Z_where.type.bee: type = facet_type <@Z, @Z(%C) where %impl.elem0.802 = %T.8b3> [symbolic] // CHECK:STDOUT: %require_complete.13f: = require_complete_type %Z_where.type.bee [symbolic] -// CHECK:STDOUT: %impl_witness.a9c: = impl_witness (file.%impl_witness_assoc_constant.loc12), @impl.44b(%T.8b3) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.fae: = impl_witness file.%Z.impl_witness_table.loc12, @impl.44b(%T.8b3) [symbolic] // CHECK:STDOUT: %T.62d: %Z.type.049 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.897: %Z.type.049 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.62d [symbolic] @@ -506,7 +508,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.462: = require_complete_type %ImplicitAs.type.fb2 [symbolic] // CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T.8b3) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.bd4), @impl.f92 [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T.8b3) [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op, @impl.f92(%T.8b3) [symbolic] // CHECK:STDOUT: %Op: %Op.type = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] @@ -527,11 +530,10 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst102 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.02e = import_ref Core//prelude, loc18_41, unloaded // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded -// CHECK:STDOUT: %Core.import_ref.f80 = import_ref Core//prelude, loc21_36, unloaded +// CHECK:STDOUT: %Core.import_ref.287 = import_ref Core//prelude, loc21_36, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.bd4 = import_ref Core//prelude, loc22_42, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -575,7 +577,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %S.loc10_24.1: type = bind_symbolic_name S, 1 [symbolic = %S.loc10_24.2 (constants.%S)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (%impl_witness_assoc_constant.loc10), @impl.76d(constants.%T.8b3, constants.%S) [symbolic = @impl.76d.%impl_witness (constants.%impl_witness.dba)] +// CHECK:STDOUT: %Z.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @impl.76d [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc10: = impl_witness %Z.impl_witness_table.loc10, @impl.76d(constants.%T.8b3, constants.%S) [symbolic = @impl.76d.%Z.impl_witness (constants.%Z.impl_witness.7f6)] // CHECK:STDOUT: %impl_witness_assoc_constant.loc10: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: impl_decl @impl.44b [concrete] { // CHECK:STDOUT: %T.patt.loc12_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.e01)] @@ -598,7 +601,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc12: = impl_witness (%impl_witness_assoc_constant.loc12), @impl.44b(constants.%T.8b3) [symbolic = @impl.44b.%impl_witness (constants.%impl_witness.a9c)] +// CHECK:STDOUT: %Z.impl_witness_table.loc12 = impl_witness_table (%impl_witness_assoc_constant.loc12), @impl.44b [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc12: = impl_witness %Z.impl_witness_table.loc12, @impl.44b(constants.%T.8b3) [symbolic = @impl.44b.%Z.impl_witness (constants.%Z.impl_witness.fae)] // CHECK:STDOUT: %impl_witness_assoc_constant.loc12: type = impl_witness_assoc_constant constants.%T.8b3 [symbolic = @impl.44b.%T.loc12_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc14_6.1: %Z.type.049 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_6.2 (constants.%T.patt.897)] @@ -698,13 +702,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.loc10_50.2: type = impl_witness_access %.Self.as_wit.iface0.loc10_50.2, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.a53)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc10_24.2) where %impl.elem0.loc10_50.2 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.93a)] // CHECK:STDOUT: %require_complete.loc10_44: = require_complete_type %Z_where.type [symbolic = %require_complete.loc10_44 (constants.%require_complete.619)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant.loc10), @impl.76d(%T.loc10_14.2, %S.loc10_24.2) [symbolic = %impl_witness (constants.%impl_witness.dba)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc10, @impl.76d(%T.loc10_14.2, %S.loc10_24.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.7f6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %.loc10_44 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%Z.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -713,20 +717,20 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc12_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(constants.%C) where constants.%impl.elem0.802 = %T.loc12_14.2> [symbolic = %Z_where.type (constants.%Z_where.type.bee)] // CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.13f)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant.loc12), @impl.44b(%T.loc12_14.2) [symbolic = %impl_witness (constants.%impl_witness.a9c)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc12, @impl.44b(%T.loc12_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.fae)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref.loc12_24 as %.loc12_34 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc12 +// CHECK:STDOUT: witness = file.%Z.impl_witness.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.3: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.e01)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T) [symbolic = %impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type)] @@ -735,7 +739,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.f80 +// CHECK:STDOUT: witness = imports.%Core.import_ref.287 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -836,7 +840,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.loc10_50.2 => constants.%impl.elem0.a53 // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.93a // CHECK:STDOUT: %require_complete.loc10_44 => constants.%require_complete.619 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.dba +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.7f6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(@impl.76d.%S.loc10_24.2) {} @@ -861,7 +865,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc12_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.bee // CHECK:STDOUT: %require_complete => constants.%require_complete.13f -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.a9c +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.fae // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.44b(%T.loc12_14.2) {} @@ -906,7 +910,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @impl.f92(constants.%T.8b3) { // CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %T.patt => constants.%T.patt.e01 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.b81 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(%T) {} @@ -934,14 +938,14 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %U [symbolic] // CHECK:STDOUT: %Ptr_where.type.d906c9.1: type = facet_type <@Ptr where %impl.elem0 = %ptr.79f131.1> [symbolic] // CHECK:STDOUT: %require_complete.0dd5ec.1: = require_complete_type %Ptr_where.type.d906c9.1 [symbolic] -// CHECK:STDOUT: %impl_witness.4de5dc.1: = impl_witness (file.%impl_witness_assoc_constant), @impl(%U) [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.bda667.1: = impl_witness file.%Ptr.impl_witness_table, @impl(%U) [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %ptr.79f131.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: %Ptr_where.type.d906c9.2: type = facet_type <@Ptr where %impl.elem0 = %ptr.79f131.2> [symbolic] // CHECK:STDOUT: %require_complete.0dd5ec.2: = require_complete_type %Ptr_where.type.d906c9.2 [symbolic] -// CHECK:STDOUT: %impl_witness.4de5dc.2: = impl_witness (file.%impl_witness_assoc_constant), @impl(%T) [symbolic] -// CHECK:STDOUT: %Ptr.facet.55b: %Ptr.type = facet_value %T, (%impl_witness.4de5dc.2) [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.bda667.2: = impl_witness file.%Ptr.impl_witness_table, @impl(%T) [symbolic] +// CHECK:STDOUT: %Ptr.facet.c57: %Ptr.type = facet_value %T, (%Ptr.impl_witness.bda667.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.6e5: = require_complete_type %ptr.79f131.2 [symbolic] @@ -981,7 +985,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc7_20.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant), @impl(constants.%U) [symbolic = @impl.%impl_witness (constants.%impl_witness.4de5dc.1)] +// CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness %Ptr.impl_witness_table, @impl(constants.%U) [symbolic = @impl.%Ptr.impl_witness (constants.%Ptr.impl_witness.bda667.1)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.79f131.1 [symbolic = @impl.%ptr.loc7_54.2 (constants.%ptr.79f131.1)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc9_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt)] @@ -994,9 +999,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.ref.loc9_29: type = name_ref T, %T.loc9_6.1 [symbolic = %T.loc9_6.2 (constants.%T)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %Ptr.facet.loc9_30.1: %Ptr.type = facet_value constants.%T, (constants.%impl_witness.4de5dc.2) [symbolic = %Ptr.facet.loc9_30.2 (constants.%Ptr.facet.55b)] -// CHECK:STDOUT: %.loc9_30: %Ptr.type = converted %T.ref.loc9_29, %Ptr.facet.loc9_30.1 [symbolic = %Ptr.facet.loc9_30.2 (constants.%Ptr.facet.55b)] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc9_30, element0 [symbolic = %impl_witness (constants.%impl_witness.4de5dc.2)] +// CHECK:STDOUT: %Ptr.facet.loc9_30.1: %Ptr.type = facet_value constants.%T, (constants.%Ptr.impl_witness.bda667.2) [symbolic = %Ptr.facet.loc9_30.2 (constants.%Ptr.facet.c57)] +// CHECK:STDOUT: %.loc9_30: %Ptr.type = converted %T.ref.loc9_29, %Ptr.facet.loc9_30.1 [symbolic = %Ptr.facet.loc9_30.2 (constants.%Ptr.facet.c57)] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc9_30, element0 [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.bda667.2)] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %as_wit.iface0, element0 [symbolic = %ptr (constants.%ptr.79f131.2)] // CHECK:STDOUT: %T.loc9_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.2 (constants.%T)] // CHECK:STDOUT: %t.param: ref @F.%T.loc9_6.2 (%T) = ref_param call_param0 @@ -1029,21 +1034,21 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_20.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f131.1)] // CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0 = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.d906c9.1)] // CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.0dd5ec.1)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant), @impl(%U.loc7_20.2) [symbolic = %impl_witness (constants.%impl_witness.4de5dc.1)] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness file.%Ptr.impl_witness_table, @impl(%U.loc7_20.2) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.bda667.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %U.ref.loc7_30 as %.loc7_39 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Ptr.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc9_6.1: type) { // CHECK:STDOUT: %T.loc9_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc9_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant), @impl(%T.loc9_6.2) [symbolic = %impl_witness (constants.%impl_witness.4de5dc.2)] -// CHECK:STDOUT: %Ptr.facet.loc9_30.2: %Ptr.type = facet_value %T.loc9_6.2, (%impl_witness) [symbolic = %Ptr.facet.loc9_30.2 (constants.%Ptr.facet.55b)] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness file.%Ptr.impl_witness_table, @impl(%T.loc9_6.2) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.bda667.2)] +// CHECK:STDOUT: %Ptr.facet.loc9_30.2: %Ptr.type = facet_value %T.loc9_6.2, (%Ptr.impl_witness) [symbolic = %Ptr.facet.loc9_30.2 (constants.%Ptr.facet.c57)] // CHECK:STDOUT: %ptr: type = ptr_type %T.loc9_6.2 [symbolic = %ptr (constants.%ptr.79f131.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1068,7 +1073,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.79f131.1 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.d906c9.1 // CHECK:STDOUT: %require_complete => constants.%require_complete.0dd5ec.1 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.4de5dc.1 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.bda667.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%U.loc7_20.2) {} @@ -1079,18 +1084,18 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.79f131.2 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.d906c9.2 // CHECK:STDOUT: %require_complete => constants.%require_complete.0dd5ec.2 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.4de5dc.2 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.bda667.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.55b) {} +// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.c57) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc9_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc9_6.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.4de5dc.2 -// CHECK:STDOUT: %Ptr.facet.loc9_30.2 => constants.%Ptr.facet.55b +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.bda667.2 +// CHECK:STDOUT: %Ptr.facet.loc9_30.2 => constants.%Ptr.facet.c57 // CHECK:STDOUT: %ptr => constants.%ptr.79f131.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1113,15 +1118,15 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.79f: type = ptr_type %U [symbolic] // CHECK:STDOUT: %Ptr_where.type.d90: type = facet_type <@Ptr where %impl.elem0 = %ptr.79f> [symbolic] // CHECK:STDOUT: %require_complete.0dd: = require_complete_type %Ptr_where.type.d90 [symbolic] -// CHECK:STDOUT: %impl_witness.4de: = impl_witness (file.%impl_witness_assoc_constant), @impl(%U) [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.bda: = impl_witness file.%Ptr.impl_witness_table, @impl(%U) [symbolic] // CHECK:STDOUT: %T: %Ptr.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %Ptr.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %ptr.900: type = ptr_type %T.as_type [symbolic] // CHECK:STDOUT: %Ptr_where.type.a9b: type = facet_type <@Ptr where %impl.elem0 = %ptr.900> [symbolic] // CHECK:STDOUT: %require_complete.a17: = require_complete_type %Ptr_where.type.a9b [symbolic] -// CHECK:STDOUT: %impl_witness.780: = impl_witness (file.%impl_witness_assoc_constant), @impl(%T.as_type) [symbolic] -// CHECK:STDOUT: %Ptr.facet.7fd: %Ptr.type = facet_value %T.as_type, (%impl_witness.780) [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.b0e: = impl_witness file.%Ptr.impl_witness_table, @impl(%T.as_type) [symbolic] +// CHECK:STDOUT: %Ptr.facet.517: %Ptr.type = facet_value %T.as_type, (%Ptr.impl_witness.b0e) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.df6: = require_complete_type %ptr.900 [symbolic] @@ -1161,7 +1166,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc7_20.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant), @impl(constants.%U) [symbolic = @impl.%impl_witness (constants.%impl_witness.4de)] +// CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness %Ptr.impl_witness_table, @impl(constants.%U) [symbolic = @impl.%Ptr.impl_witness (constants.%Ptr.impl_witness.bda)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.79f [symbolic = @impl.%ptr.loc7_54.2 (constants.%ptr.79f)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc9_6.1: %Ptr.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt)] @@ -1177,7 +1183,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.loc9_29.1: type = converted %T.ref.loc9_28, %T.as_type.loc9_29.1 [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] // CHECK:STDOUT: %T.as_type.loc9_29.2: type = facet_access_type constants.%T [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_29.2: type = converted constants.%T, %T.as_type.loc9_29.2 [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%impl_witness.780, element0 [symbolic = %ptr (constants.%ptr.900)] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.impl_witness.b0e, element0 [symbolic = %ptr (constants.%ptr.900)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] // CHECK:STDOUT: %T.loc9_6.1: %Ptr.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.2 (constants.%T)] // CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_22.2 (%T.as_type) = ref_param call_param0 @@ -1214,13 +1220,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_20.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f)] // CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0 = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.d90)] // CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.0dd)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant), @impl(%U.loc7_20.2) [symbolic = %impl_witness (constants.%impl_witness.4de)] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness file.%Ptr.impl_witness_table, @impl(%U.loc7_20.2) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.bda)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %U.ref.loc7_30 as %.loc7_39 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Ptr.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1252,7 +1258,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.79f // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.d90 // CHECK:STDOUT: %require_complete => constants.%require_complete.0dd -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.4de +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.bda // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%U.loc7_20.2) {} @@ -1263,12 +1269,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.900 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.a9b // CHECK:STDOUT: %require_complete => constants.%require_complete.a17 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.780 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.b0e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.7fd) {} +// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.517) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc9_6.2 => constants.%T @@ -1294,7 +1300,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.79f: type = ptr_type %U [symbolic] // CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where %impl.elem0.dff = %ptr.79f> [symbolic] // CHECK:STDOUT: %require_complete.0dd: = require_complete_type %Ptr_where.type [symbolic] -// CHECK:STDOUT: %impl_witness.4de: = impl_witness (file.%impl_witness_assoc_constant), @impl.a8e(%U) [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness file.%Ptr.impl_witness_table, @impl.a8e(%U) [symbolic] // CHECK:STDOUT: %T.972: %Ptr.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.0a1: %Ptr.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.972 [symbolic] @@ -1326,7 +1332,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T.8b3) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.bd4), @impl.f92 [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T.8b3) [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op, @impl.f92(%T.8b3) [symbolic] // CHECK:STDOUT: %Op: %Op.type = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] @@ -1347,11 +1354,10 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst102 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.02e = import_ref Core//prelude, loc18_41, unloaded // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded -// CHECK:STDOUT: %Core.import_ref.f80 = import_ref Core//prelude, loc21_36, unloaded +// CHECK:STDOUT: %Core.import_ref.287 = import_ref Core//prelude, loc21_36, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.bd4 = import_ref Core//prelude, loc22_42, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1382,7 +1388,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc7_20.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant), @impl.a8e(constants.%U) [symbolic = @impl.a8e.%impl_witness (constants.%impl_witness.4de)] +// CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.a8e [concrete] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness %Ptr.impl_witness_table, @impl.a8e(constants.%U) [symbolic = @impl.a8e.%Ptr.impl_witness (constants.%Ptr.impl_witness)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.79f [symbolic = @impl.a8e.%ptr.loc7_54.2 (constants.%ptr.79f)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc9_6.1: %Ptr.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.0a1)] @@ -1460,20 +1467,20 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_20.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f)] // CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.dff = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type)] // CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.0dd)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant), @impl.a8e(%U.loc7_20.2) [symbolic = %impl_witness (constants.%impl_witness.4de)] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness file.%Ptr.impl_witness_table, @impl.a8e(%U.loc7_20.2) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %U.ref.loc7_30 as %.loc7_39 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Ptr.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.3: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.e01)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T) [symbolic = %impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type)] @@ -1482,7 +1489,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.f80 +// CHECK:STDOUT: witness = imports.%Core.import_ref.287 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1536,7 +1543,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.79f // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type // CHECK:STDOUT: %require_complete => constants.%require_complete.0dd -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.4de +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.a8e(%U.loc7_20.2) {} @@ -1583,7 +1590,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @impl.f92(constants.%T.8b3) { // CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %T.patt => constants.%T.patt.e01 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.b81 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(%T) {} @@ -1626,11 +1633,11 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %assoc0.220: %BitAnd.assoc_type = assoc_entity element0, @BitAnd.%Op.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.type.28d: type = fn_type @Op.2, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.902: %Op.type.28d = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%impl_witness) [symbolic] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%BitAnd.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1657,7 +1664,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, file.%BitAnd.decl [concrete = constants.%BitAnd.type] // CHECK:STDOUT: %T.loc21_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(%Dest.loc9_14.1: type) { @@ -1785,7 +1793,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: generic impl @impl(%T.loc21_14.1: type) { // CHECK:STDOUT: %T.loc21_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc21_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%Op.decl), @impl(%T.loc21_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T.loc21_14.2) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T.loc21_14.2) [symbolic = %Op.type (constants.%Op.type.28d)] @@ -1814,7 +1822,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1891,7 +1899,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc21_14.2) {} diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon index 6089de9e5913..799a0fdcd4c2 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon @@ -66,10 +66,10 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.assoc_type.1e5078.2: type = assoc_entity_type @I, @I(%V) [symbolic] // CHECK:STDOUT: %assoc0.8f0422.2: %I.assoc_type.1e5078.2 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %require_complete.cfebb2.1: = require_complete_type %I.type.325e65.2 [symbolic] -// CHECK:STDOUT: %impl_witness.ab3b51.1: = impl_witness (@impl.%F.decl), @impl(%V) [symbolic] +// CHECK:STDOUT: %I.impl_witness.40ab31.1: = impl_witness file.%I.impl_witness_table, @impl(%V) [symbolic] // CHECK:STDOUT: %F.type.0fea45.1: type = fn_type @F.2, @impl(%V) [symbolic] // CHECK:STDOUT: %F.d6ae34.1: %F.type.0fea45.1 = struct_value () [symbolic] -// CHECK:STDOUT: %I.facet.129: %I.type.325e65.2 = facet_value %A.13025a.2, (%impl_witness.ab3b51.1) [symbolic] +// CHECK:STDOUT: %I.facet.de3: %I.type.325e65.2 = facet_value %A.13025a.2, (%I.impl_witness.40ab31.1) [symbolic] // CHECK:STDOUT: %require_complete.4aeca8.2: = require_complete_type %V [symbolic] // CHECK:STDOUT: %A.elem.1ceb36.2: type = unbound_element_type %A.13025a.2, %V [symbolic] // CHECK:STDOUT: %struct_type.n.848971.2: type = struct_type {.n: %V} [symbolic] @@ -92,7 +92,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.assoc_type.1e5078.3: type = assoc_entity_type @I, @I(%W) [symbolic] // CHECK:STDOUT: %assoc0.8f0422.3: %I.assoc_type.1e5078.3 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %require_complete.cfebb2.2: = require_complete_type %I.type.325e65.3 [symbolic] -// CHECK:STDOUT: %impl_witness.ab3b51.2: = impl_witness (@impl.%F.decl), @impl(%W) [symbolic] +// CHECK:STDOUT: %I.impl_witness.40ab31.2: = impl_witness file.%I.impl_witness_table, @impl(%W) [symbolic] // CHECK:STDOUT: %F.type.0fea45.2: type = fn_type @F.2, @impl(%W) [symbolic] // CHECK:STDOUT: %F.d6ae34.2: %F.type.0fea45.2 = struct_value () [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %A.13025a.3, @I, @I(%W) [symbolic] @@ -115,11 +115,11 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.assoc_type.22c: type = assoc_entity_type @I, @I(%empty_struct_type) [concrete] // CHECK:STDOUT: %assoc0.722: %I.assoc_type.22c = assoc_entity element0, @I.%F.decl [concrete] // CHECK:STDOUT: %complete_type.788: = complete_type_witness %I.type.885 [concrete] -// CHECK:STDOUT: %impl_witness.f35: = impl_witness (@impl.%F.decl), @impl(%empty_struct_type) [concrete] +// CHECK:STDOUT: %I.impl_witness.0f2: = impl_witness file.%I.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.type.875: type = fn_type @F.2, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.158: %F.type.875 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet.b64: %I.type.885 = facet_value %A.235, (%impl_witness.f35) [concrete] -// CHECK:STDOUT: %.f80: type = fn_type_with_self_type %F.type.684, %I.facet.b64 [concrete] +// CHECK:STDOUT: %I.facet.bd5: %I.type.885 = facet_value %A.235, (%I.impl_witness.0f2) [concrete] +// CHECK:STDOUT: %.8fd: type = fn_type_with_self_type %F.type.684, %I.facet.bd5 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.158, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: } @@ -152,7 +152,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.type.loc11_35.1: type = facet_type <@I, @I(constants.%V)> [symbolic = %I.type.loc11_35.2 (constants.%I.type.325e65.2)] // CHECK:STDOUT: %V.loc11_14.1: type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%V) [symbolic = @impl.%impl_witness (constants.%impl_witness.ab3b51.1)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%V) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness.40ab31.1)] // CHECK:STDOUT: %TestGeneric.decl: %TestGeneric.type = fn_decl @TestGeneric [concrete = constants.%TestGeneric] { // CHECK:STDOUT: %W.patt.loc17_16.1: type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc17_16.2 (constants.%W.patt)] // CHECK:STDOUT: %a.patt: @TestGeneric.%A.loc17_32.2 (%A.13025a.3) = binding_pattern a @@ -241,7 +242,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A.loc11_27.2: type = class_type @A, @A(%V.loc11_14.2) [symbolic = %A.loc11_27.2 (constants.%A.13025a.2)] // CHECK:STDOUT: %I.type.loc11_35.2: type = facet_type <@I, @I(%V.loc11_14.2)> [symbolic = %I.type.loc11_35.2 (constants.%I.type.325e65.2)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc11_35.2 [symbolic = %require_complete (constants.%require_complete.cfebb2.1)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%V.loc11_14.2) [symbolic = %impl_witness (constants.%impl_witness.ab3b51.1)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table, @impl(%V.loc11_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.40ab31.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%V.loc11_14.2) [symbolic = %F.type (constants.%F.type.0fea45.1)] @@ -265,7 +266,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !members: // CHECK:STDOUT: .V = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -372,7 +373,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type)> [concrete = constants.%I.type.885] // CHECK:STDOUT: %.loc22_18: %I.assoc_type.22c = specific_constant @I.%assoc0.loc8_26.1, @I(constants.%empty_struct_type) [concrete = constants.%assoc0.722] // CHECK:STDOUT: %F.ref: %I.assoc_type.22c = name_ref F, %.loc22_18 [concrete = constants.%assoc0.722] -// CHECK:STDOUT: %impl.elem0: %.f80 = impl_witness_access constants.%impl_witness.f35, element0 [concrete = constants.%F.158] +// CHECK:STDOUT: %impl.elem0: %.8fd = impl_witness_access constants.%I.impl_witness.0f2, element0 [concrete = constants.%F.158] // CHECK:STDOUT: %bound_method.loc22_11: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %bound_method.loc22_22: = bound_method %a.ref, %specific_fn @@ -438,7 +439,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A.loc11_27.2 => constants.%A.13025a.2 // CHECK:STDOUT: %I.type.loc11_35.2 => constants.%I.type.325e65.2 // CHECK:STDOUT: %require_complete => constants.%require_complete.cfebb2.1 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.ab3b51.1 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.40ab31.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.0fea45.1 @@ -458,10 +459,10 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@F.2.%V) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%V, constants.%I.facet.129) { +// CHECK:STDOUT: specific @F.1(constants.%V, constants.%I.facet.de3) { // CHECK:STDOUT: %U => constants.%V // CHECK:STDOUT: %I.type => constants.%I.type.325e65.2 -// CHECK:STDOUT: %Self => constants.%I.facet.129 +// CHECK:STDOUT: %Self => constants.%I.facet.de3 // CHECK:STDOUT: %Self.as_type.loc8_14.1 => constants.%A.13025a.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -504,7 +505,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A.loc11_27.2 => constants.%A.13025a.3 // CHECK:STDOUT: %I.type.loc11_35.2 => constants.%I.type.325e65.3 // CHECK:STDOUT: %require_complete => constants.%require_complete.cfebb2.2 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.ab3b51.2 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.40ab31.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.0fea45.2 @@ -553,7 +554,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A.loc11_27.2 => constants.%A.235 // CHECK:STDOUT: %I.type.loc11_35.2 => constants.%I.type.885 // CHECK:STDOUT: %require_complete => constants.%complete_type.788 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.f35 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.0f2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.875 diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index d79224c79731..19c00ef3bd76 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -232,10 +232,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.a02: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.dc7: %F.type.a02 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -249,7 +249,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { @@ -286,7 +287,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -334,23 +335,23 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %impl_witness.722: = impl_witness (@impl.e95.%G.decl) [concrete] +// CHECK:STDOUT: %HasG.impl_witness.69b: = impl_witness file.%HasG.impl_witness_table.loc13 [concrete] // CHECK:STDOUT: %G.type.05c: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.486: %G.type.05c = struct_value () [concrete] -// CHECK:STDOUT: %HasG.facet.062: %HasG.type = facet_value %C, (%impl_witness.722) [concrete] +// CHECK:STDOUT: %HasG.facet.704: %HasG.type = facet_value %C, (%HasG.impl_witness.69b) [concrete] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete] // CHECK:STDOUT: %Self.cf3: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.dbc: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.a2b: %F.type.dbc = struct_value () [concrete] // CHECK:STDOUT: %Self.as_type.7cf: type = facet_access_type %Self.cf3 [symbolic] -// CHECK:STDOUT: %impl_witness.a36: = impl_witness (@impl.8af.%F.decl) [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness file.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.bab: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.46f: %F.type.bab = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, (%impl_witness.a36) [concrete] -// CHECK:STDOUT: %impl_witness.9ed: = impl_witness (@impl.da9.%G.decl) [concrete] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %HasG.impl_witness.b2b: = impl_witness file.%HasG.impl_witness_table.loc23 [concrete] // CHECK:STDOUT: %G.type.c1d: type = fn_type @G.3 [concrete] // CHECK:STDOUT: %G.294: %G.type.c1d = struct_value () [concrete] -// CHECK:STDOUT: %HasG.facet.548: %HasG.type = facet_value %D, (%impl_witness.9ed) [concrete] +// CHECK:STDOUT: %HasG.facet.9c8: %HasG.type = facet_value %D, (%HasG.impl_witness.b2b) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -383,18 +384,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%PackageA.C [concrete = constants.%C] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, file.%HasG.decl [concrete = constants.%HasG.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc13: = impl_witness (@impl.e95.%G.decl) [concrete = constants.%impl_witness.722] +// CHECK:STDOUT: %HasG.impl_witness_table.loc13 = impl_witness_table (@impl.e95.%G.decl), @impl.e95 [concrete] +// CHECK:STDOUT: %HasG.impl_witness.loc13: = impl_witness %HasG.impl_witness_table.loc13 [concrete = constants.%HasG.impl_witness.69b] // CHECK:STDOUT: impl_decl @impl.8af [concrete] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %PackageA.ref: = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%PackageA.HasF [concrete = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc18: = impl_witness (@impl.8af.%F.decl) [concrete = constants.%impl_witness.a36] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.8af.%F.decl), @impl.8af [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: impl_decl @impl.da9 [concrete] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, file.%HasG.decl [concrete = constants.%HasG.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc23: = impl_witness (@impl.da9.%G.decl) [concrete = constants.%impl_witness.9ed] +// CHECK:STDOUT: %HasG.impl_witness_table.loc23 = impl_witness_table (@impl.da9.%G.decl), @impl.da9 [concrete] +// CHECK:STDOUT: %HasG.impl_witness.loc23: = impl_witness %HasG.impl_witness_table.loc23 [concrete = constants.%HasG.impl_witness.b2b] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasG { @@ -438,7 +442,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc13 +// CHECK:STDOUT: witness = file.%HasG.impl_witness.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.8af: %D.ref as %HasF.ref { @@ -453,7 +457,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc18 +// CHECK:STDOUT: witness = file.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.da9: %D.ref as %HasG.ref { @@ -468,7 +472,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc23 +// CHECK:STDOUT: witness = file.%HasG.impl_witness.loc23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -521,8 +525,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%Self.as_type.133 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%HasG.facet.062) { -// CHECK:STDOUT: %Self => constants.%HasG.facet.062 +// CHECK:STDOUT: specific @G.1(constants.%HasG.facet.704) { +// CHECK:STDOUT: %Self => constants.%HasG.facet.704 // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: @@ -536,8 +540,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.as_type => constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%HasG.facet.548) { -// CHECK:STDOUT: %Self => constants.%HasG.facet.548 +// CHECK:STDOUT: specific @G.1(constants.%HasG.facet.9c8) { +// CHECK:STDOUT: %Self => constants.%HasG.facet.9c8 // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: @@ -556,9 +560,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.ab2 [concrete] // CHECK:STDOUT: %F.type.dbc: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%PackageA.import_ref.148) [concrete] -// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%impl_witness) [concrete] -// CHECK:STDOUT: %.a6c: type = fn_type_with_self_type %F.type.dbc, %HasF.facet [concrete] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (imports.%PackageA.import_ref.148), @impl [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table [concrete] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %.d3f: type = fn_type_with_self_type %F.type.dbc, %HasF.facet [concrete] // CHECK:STDOUT: %F.type.4e3: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.857: %F.type.4e3 = struct_value () [concrete] // CHECK:STDOUT: } @@ -577,7 +582,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded // CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst17 [no loc], loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %PackageA.import_ref.a71: = import_ref PackageA//default, loc11_16, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %PackageA.import_ref.c12: = import_ref PackageA//default, loc11_16, loaded [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type] // CHECK:STDOUT: } @@ -610,7 +615,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%PackageA.import_ref.29a as imports.%PackageA.import_ref.e8c [from "package_a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageA.import_ref.a71 +// CHECK:STDOUT: witness = imports.%PackageA.import_ref.c12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "package_a.carbon"] { @@ -626,7 +631,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.ref.loc7: = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%PackageA.HasF [concrete = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, imports.%PackageA.import_ref.b36 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.a6c = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.857] +// CHECK:STDOUT: %impl.elem0: %.d3f = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.857] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: return @@ -663,9 +668,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.cf3 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%PackageB.import_ref.0cd) [concrete] -// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, (%impl_witness) [concrete] -// CHECK:STDOUT: %.769: type = fn_type_with_self_type %F.type.dbc, %HasF.facet [concrete] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (imports.%PackageB.import_ref.0cd), @impl.52b [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table [concrete] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %.bc0: type = fn_type_with_self_type %F.type.dbc, %HasF.facet [concrete] // CHECK:STDOUT: %F.type.394: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.1fc: %F.type.394 = struct_value () [concrete] // CHECK:STDOUT: } @@ -687,7 +693,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded // CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst17 [no loc], loaded [symbolic = constants.%Self.cf3] -// CHECK:STDOUT: %PackageA.import_ref.0e8 = import_ref PackageA//default, loc11_16, unloaded +// CHECK:STDOUT: %PackageA.import_ref.5cd = import_ref PackageA//default, loc11_16, unloaded // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst38 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C] @@ -695,13 +701,13 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst19 [no loc], unloaded // CHECK:STDOUT: %PackageB.import_ref.910 = import_ref PackageB//default, loc7_21, unloaded // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded -// CHECK:STDOUT: %PackageB.import_ref.fa0 = import_ref PackageB//default, loc13_25, unloaded +// CHECK:STDOUT: %PackageB.import_ref.ea7 = import_ref PackageB//default, loc13_25, unloaded // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.f2f: = import_ref PackageB//default, loc18_25, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %PackageB.import_ref.ce6: = import_ref PackageB//default, loc18_25, loaded [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.831: type = import_ref PackageB//default, loc18_19, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageB.import_ref.231 = import_ref PackageB//default, loc23_16, unloaded +// CHECK:STDOUT: %PackageB.import_ref.569 = import_ref PackageB//default, loc23_16, unloaded // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.2: type = import_ref PackageB//default, loc23_6, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.cee586.2: type = import_ref PackageB//default, loc23_11, loaded [concrete = constants.%HasG.type] // CHECK:STDOUT: } @@ -743,22 +749,22 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4b2: imports.%PackageA.import_ref.29a as imports.%PackageA.import_ref.e8c [from "package_a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageA.import_ref.0e8 +// CHECK:STDOUT: witness = imports.%PackageA.import_ref.5cd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.922: imports.%PackageB.import_ref.dfb as imports.%PackageB.import_ref.cee586.1 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.fa0 +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.ea7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.52b: imports.%PackageB.import_ref.aa9f8a.1 as imports.%PackageB.import_ref.831 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.f2f +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.ce6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.47e: imports.%PackageB.import_ref.aa9f8a.2 as imports.%PackageB.import_ref.cee586.2 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.231 +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.569 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D [from "package_b.carbon"] { @@ -781,7 +787,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.ref: = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%PackageA.HasF [concrete = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, imports.%PackageA.import_ref.b36 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.769 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.1fc] +// CHECK:STDOUT: %impl.elem0: %.bc0 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.1fc] // CHECK:STDOUT: %bound_method: = bound_method %d.ref, %impl.elem0 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method(%d.ref) // CHECK:STDOUT: return @@ -818,9 +824,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.fcb [symbolic] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%PackageB.import_ref.9ec) [concrete] -// CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %C, (%impl_witness) [concrete] -// CHECK:STDOUT: %.145: type = fn_type_with_self_type %G.type.d9e, %HasG.facet [concrete] +// CHECK:STDOUT: %HasG.impl_witness_table = impl_witness_table (imports.%PackageB.import_ref.9ec), @impl.922 [concrete] +// CHECK:STDOUT: %HasG.impl_witness: = impl_witness %HasG.impl_witness_table [concrete] +// CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %C, (%HasG.impl_witness) [concrete] +// CHECK:STDOUT: %.a26: type = fn_type_with_self_type %G.type.d9e, %HasG.facet [concrete] // CHECK:STDOUT: %G.type.18e: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.dbb: %G.type.18e = struct_value () [concrete] // CHECK:STDOUT: } @@ -845,18 +852,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst17 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.c63 = import_ref PackageA//default, loc5_21, unloaded // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded -// CHECK:STDOUT: %PackageA.import_ref.0e8 = import_ref PackageA//default, loc11_16, unloaded +// CHECK:STDOUT: %PackageA.import_ref.5cd = import_ref PackageA//default, loc11_16, unloaded // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageB.import_ref.5d9: = import_ref PackageB//default, loc13_25, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %PackageB.import_ref.1f6: = import_ref PackageB//default, loc13_25, loaded [concrete = constants.%HasG.impl_witness] // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.7db = import_ref PackageB//default, loc18_25, unloaded +// CHECK:STDOUT: %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst40 [no loc], unloaded // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.831: type = import_ref PackageB//default, loc18_19, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageB.import_ref.231 = import_ref PackageB//default, loc23_16, unloaded +// CHECK:STDOUT: %PackageB.import_ref.569 = import_ref PackageB//default, loc23_16, unloaded // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.2: type = import_ref PackageB//default, loc23_6, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.cee586.2: type = import_ref PackageB//default, loc23_11, loaded [concrete = constants.%HasG.type] // CHECK:STDOUT: } @@ -898,22 +905,22 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4b2: imports.%PackageA.import_ref.29a as imports.%PackageA.import_ref.e8c [from "package_a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageA.import_ref.0e8 +// CHECK:STDOUT: witness = imports.%PackageA.import_ref.5cd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.922: imports.%PackageB.import_ref.dfb as imports.%PackageB.import_ref.cee586.1 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.5d9 +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.1f6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.52b: imports.%PackageB.import_ref.aa9f8a.1 as imports.%PackageB.import_ref.831 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.7db +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.5ba // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.47e: imports.%PackageB.import_ref.aa9f8a.2 as imports.%PackageB.import_ref.cee586.2 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.231 +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.569 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "package_a.carbon"] { @@ -936,7 +943,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageB.ref: = name_ref PackageB, imports.%PackageB [concrete = imports.%PackageB] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%PackageB.HasG [concrete = constants.%HasG.type] // CHECK:STDOUT: %G.ref: %HasG.assoc_type = name_ref G, imports.%PackageB.import_ref.6c2 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.145 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%G.dbb] +// CHECK:STDOUT: %impl.elem0: %.a26 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%G.dbb] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: return @@ -973,9 +980,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.fcb [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%PackageB.import_ref.b0a) [concrete] -// CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %D, (%impl_witness) [concrete] -// CHECK:STDOUT: %.b47: type = fn_type_with_self_type %G.type.d9e, %HasG.facet [concrete] +// CHECK:STDOUT: %HasG.impl_witness_table = impl_witness_table (imports.%PackageB.import_ref.b0a), @impl.47e [concrete] +// CHECK:STDOUT: %HasG.impl_witness: = impl_witness %HasG.impl_witness_table [concrete] +// CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %D, (%HasG.impl_witness) [concrete] +// CHECK:STDOUT: %.132: type = fn_type_with_self_type %G.type.d9e, %HasG.facet [concrete] // CHECK:STDOUT: %G.type.405: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.703: %G.type.405 = struct_value () [concrete] // CHECK:STDOUT: } @@ -994,18 +1002,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded // CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst19 [no loc], loaded [symbolic = constants.%Self.fcb] -// CHECK:STDOUT: %PackageB.import_ref.fa0 = import_ref PackageB//default, loc13_25, unloaded +// CHECK:STDOUT: %PackageB.import_ref.ea7 = import_ref PackageB//default, loc13_25, unloaded // CHECK:STDOUT: %PackageB.import_ref.8db: = import_ref PackageB//default, inst49 [indirect], loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageB.import_ref.6a9 = import_ref PackageB//default, inst50 [indirect], unloaded // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.96f = import_ref PackageB//default, inst73 [indirect], unloaded -// CHECK:STDOUT: %PackageB.import_ref.a0b = import_ref PackageB//default, inst74 [indirect], unloaded +// CHECK:STDOUT: %PackageB.import_ref.96f = import_ref PackageB//default, inst74 [indirect], unloaded +// CHECK:STDOUT: %PackageB.import_ref.a0b = import_ref PackageB//default, inst75 [indirect], unloaded // CHECK:STDOUT: %PackageB.F = import_ref PackageB//default, F, unloaded -// CHECK:STDOUT: %PackageB.import_ref.7db = import_ref PackageB//default, loc18_25, unloaded +// CHECK:STDOUT: %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.831: type = import_ref PackageB//default, loc18_19, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageB.import_ref.240: = import_ref PackageB//default, loc23_16, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %PackageB.import_ref.bb9: = import_ref PackageB//default, loc23_16, loaded [concrete = constants.%HasG.impl_witness] // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.2: type = import_ref PackageB//default, loc23_6, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.cee586.2: type = import_ref PackageB//default, loc23_11, loaded [concrete = constants.%HasG.type] // CHECK:STDOUT: } @@ -1045,17 +1053,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.162: imports.%PackageB.import_ref.dfb as imports.%PackageB.import_ref.cee586.1 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.fa0 +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.ea7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5f1: imports.%PackageB.import_ref.aa9f8a.1 as imports.%PackageB.import_ref.831 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.7db +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.5ba // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.47e: imports.%PackageB.import_ref.aa9f8a.2 as imports.%PackageB.import_ref.cee586.2 [from "package_b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageB.import_ref.240 +// CHECK:STDOUT: witness = imports.%PackageB.import_ref.bb9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D [from "package_b.carbon"] { @@ -1078,7 +1086,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageB.ref.loc7: = name_ref PackageB, imports.%PackageB [concrete = imports.%PackageB] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%PackageB.HasG [concrete = constants.%HasG.type] // CHECK:STDOUT: %G.ref: %HasG.assoc_type = name_ref G, imports.%PackageB.import_ref.6c2 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.b47 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%G.703] +// CHECK:STDOUT: %impl.elem0: %.132 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%G.703] // CHECK:STDOUT: %bound_method: = bound_method %d.ref, %impl.elem0 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %bound_method(%d.ref) // CHECK:STDOUT: return @@ -1109,10 +1117,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %H.c1d: %H.type.474 = struct_value () [concrete] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete] // CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.%H.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%H.decl) [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table [concrete] // CHECK:STDOUT: %H.type.707: type = fn_type @H.2 [concrete] // CHECK:STDOUT: %H.8d7: %H.type.707 = struct_value () [concrete] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%impl_witness) [concrete] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%Z.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1125,7 +1133,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%H.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (@impl.%H.decl), @impl [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table [concrete = constants.%Z.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { @@ -1162,7 +1171,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .H = %H.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @H.1(@Z.%Self: %Z.type) { @@ -1199,9 +1208,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, imports.%PackageAssociatedInterface.import_ref.250 [concrete] // CHECK:STDOUT: %H.type.386: type = fn_type @H.1 [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%PackageAssociatedInterface.import_ref.6d7) [concrete] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%impl_witness) [concrete] -// CHECK:STDOUT: %.c44: type = fn_type_with_self_type %H.type.386, %Z.facet [concrete] +// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (imports.%PackageAssociatedInterface.import_ref.6d7), @impl [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table [concrete] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%Z.impl_witness) [concrete] +// CHECK:STDOUT: %.7f5: type = fn_type_with_self_type %H.type.386, %Z.facet [concrete] // CHECK:STDOUT: %H.type.ab3: type = fn_type @H.2 [concrete] // CHECK:STDOUT: %H.c25: %H.type.ab3 = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] @@ -1217,7 +1227,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.609: %Z.assoc_type = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageAssociatedInterface.H = import_ref PackageAssociatedInterface//default, H, unloaded // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d26: %Z.type = import_ref PackageAssociatedInterface//default, inst17 [no loc], loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.998: = import_ref PackageAssociatedInterface//default, loc8_14, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d8c: = import_ref PackageAssociatedInterface//default, loc8_14, loaded [concrete = constants.%Z.impl_witness] // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.e5c: type = import_ref PackageAssociatedInterface//default, loc8_7, loaded [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.df1: type = import_ref PackageAssociatedInterface//default, loc8_12, loaded [concrete = constants.%Z.type] // CHECK:STDOUT: } @@ -1240,7 +1250,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%PackageAssociatedInterface.import_ref.e5c as imports.%PackageAssociatedInterface.import_ref.df1 [from "associated_interface.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageAssociatedInterface.import_ref.998 +// CHECK:STDOUT: witness = imports.%PackageAssociatedInterface.import_ref.d8c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @J() { @@ -1249,7 +1259,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageAssociatedInterface.ref: = name_ref PackageAssociatedInterface, imports.%PackageAssociatedInterface [concrete = imports.%PackageAssociatedInterface] // CHECK:STDOUT: %Z.ref: type = name_ref Z, imports.%PackageAssociatedInterface.Z [concrete = constants.%Z.type] // CHECK:STDOUT: %H.ref: %Z.assoc_type = name_ref H, imports.%PackageAssociatedInterface.import_ref.609 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.c44 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%H.c25] +// CHECK:STDOUT: %impl.elem0: %.7f5 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%H.c25] // CHECK:STDOUT: %bound_method: = bound_method %.loc7_4.1, %impl.elem0 // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_4.2: %empty_tuple.type = converted %.loc7_4.1, %empty_tuple [concrete = constants.%empty_tuple] @@ -1400,16 +1410,16 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %K.7a1: %K.type.311 = struct_value () [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.f64 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%K.decl) [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness file.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %K.type.dcd: type = fn_type @K.2 [concrete] // CHECK:STDOUT: %K.2e9: %K.type.dcd = struct_value () [concrete] -// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.241, (%impl_witness) [concrete] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.241, (%Y.impl_witness) [concrete] // CHECK:STDOUT: %L.type: type = fn_type @L [concrete] // CHECK:STDOUT: %L: %L.type = struct_value () [concrete] // CHECK:STDOUT: %AnyParam.val: %AnyParam.241 = struct_value () [concrete] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] // CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete] -// CHECK:STDOUT: %.bae: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] +// CHECK:STDOUT: %.0fb: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1450,7 +1460,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc8_52: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%K.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (@impl.%K.decl), @impl [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: %L.decl: %L.type = fn_decl @L [concrete = constants.%L] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1490,7 +1501,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %K.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.5ab: type, imports.%PackageHasParam.import_ref.34c: @AnyParam.%T (%T)) [from "has_param.carbon"] { @@ -1546,7 +1557,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.bae = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%K.2e9] +// CHECK:STDOUT: %impl.elem0: %.0fb = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.2e9] // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc14: %AnyParam.241 = bind_value %obj.ref // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method(%.loc14) @@ -1616,9 +1627,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %K.type.311: type = fn_type @K.1 [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.f64 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%PackageGenericInterface.import_ref.456) [concrete] -// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.861, (%impl_witness) [concrete] -// CHECK:STDOUT: %.808: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] +// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (imports.%PackageGenericInterface.import_ref.456), @impl [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.861, (%Y.impl_witness) [concrete] +// CHECK:STDOUT: %.e17: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] // CHECK:STDOUT: %K.type.7f9: type = fn_type @K.2 [concrete] // CHECK:STDOUT: %K.c3c: %K.type.7f9 = struct_value () [concrete] // CHECK:STDOUT: } @@ -1646,7 +1658,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst39 [no loc], loaded [symbolic = constants.%Self.f64] -// CHECK:STDOUT: %PackageGenericInterface.import_ref.ca8: = import_ref PackageGenericInterface//default, loc8_70, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %PackageGenericInterface.import_ref.53c: = import_ref PackageGenericInterface//default, loc8_70, loaded [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: %PackageGenericInterface.import_ref.321: type = import_ref PackageGenericInterface//default, loc8_47, loaded [concrete = constants.%AnyParam.861] // CHECK:STDOUT: %PackageGenericInterface.import_ref.ca6: type = import_ref PackageGenericInterface//default, loc8_67, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: } @@ -1686,7 +1698,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%PackageGenericInterface.import_ref.321 as imports.%PackageGenericInterface.import_ref.ca6 [from "has_generic_interface.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageGenericInterface.import_ref.ca8 +// CHECK:STDOUT: witness = imports.%PackageGenericInterface.import_ref.53c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.5ab: type, imports.%PackageHasParam.import_ref.34c: @AnyParam.%T (%T)) [from "has_param.carbon"] { @@ -1728,7 +1740,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc10: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.808 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%K.c3c] +// CHECK:STDOUT: %impl.elem0: %.e17 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.c3c] // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc10: %AnyParam.861 = bind_value %obj.ref // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method(%.loc10) @@ -1800,16 +1812,16 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %K.7a1: %K.type.311 = struct_value () [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%K.decl) [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness file.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %K.type.965: type = fn_type @K.2 [concrete] // CHECK:STDOUT: %K.5a9: %K.type.965 = struct_value () [concrete] -// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.0dd, (%impl_witness) [concrete] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.0dd, (%Y.impl_witness) [concrete] // CHECK:STDOUT: %L.type: type = fn_type @L [concrete] // CHECK:STDOUT: %L: %L.type = struct_value () [concrete] // CHECK:STDOUT: %AnyParam.val: %AnyParam.0dd = struct_value () [concrete] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] // CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete] -// CHECK:STDOUT: %.e27: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] +// CHECK:STDOUT: %.701: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1850,7 +1862,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc8_48: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%K.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (@impl.%K.decl), @impl [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: %L.decl: %L.type = fn_decl @L [concrete = constants.%L] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1873,7 +1886,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %K.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @GenericClass(%U.loc6_20.1: type) { @@ -1945,7 +1958,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.e27 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%K.5a9] +// CHECK:STDOUT: %impl.elem0: %.701 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.5a9] // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc14: %AnyParam.0dd = bind_value %obj.ref // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method(%.loc14) @@ -2011,9 +2024,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %K.type.311: type = fn_type @K.1 [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%PackageGenericClass.import_ref.fbf) [concrete] -// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.d71, (%impl_witness) [concrete] -// CHECK:STDOUT: %.3b2: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] +// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (imports.%PackageGenericClass.import_ref.fbf), @impl [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.d71, (%Y.impl_witness) [concrete] +// CHECK:STDOUT: %.0dd: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] // CHECK:STDOUT: %K.type.9cf: type = fn_type @K.2 [concrete] // CHECK:STDOUT: %K.039: %K.type.9cf = struct_value () [concrete] // CHECK:STDOUT: } @@ -2042,7 +2056,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst39 [no loc], loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %PackageGenericClass.import_ref.f23: = import_ref PackageGenericClass//default, loc8_66, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %PackageGenericClass.import_ref.246: = import_ref PackageGenericClass//default, loc8_66, loaded [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: %PackageGenericClass.import_ref.a0e: type = import_ref PackageGenericClass//default, loc8_43, loaded [concrete = constants.%AnyParam.d71] // CHECK:STDOUT: %PackageGenericClass.import_ref.ca6: type = import_ref PackageGenericClass//default, loc8_63, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: } @@ -2067,7 +2081,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%PackageGenericClass.import_ref.a0e as imports.%PackageGenericClass.import_ref.ca6 [from "has_generic_class.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%PackageGenericClass.import_ref.f23 +// CHECK:STDOUT: witness = imports.%PackageGenericClass.import_ref.246 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.5ab: type, imports.%PackageHasParam.import_ref.34c: @AnyParam.%T (%T)) [from "has_param.carbon"] { @@ -2123,7 +2137,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc9: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.3b2 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%K.039] +// CHECK:STDOUT: %impl.elem0: %.0dd = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.039] // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc9: %AnyParam.d71 = bind_value %obj.ref // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method(%.loc9) @@ -2204,10 +2218,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %tuple.type.c53: type = tuple_type (type, type, type, type, type, type, type, type) [concrete] // CHECK:STDOUT: %tuple.type.15d: type = tuple_type (%Extra1.type, %Extra2.type, %Extra3.type, %Extra4.type, %Extra5.type, %Extra6.type, %Extra7.type, %Extra8.type) [concrete] // CHECK:STDOUT: %C.69b: type = class_type @C, @C(%tuple.type.15d) [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.06f: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.13c: %F.type.06f = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C.69b, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C.69b, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2252,7 +2266,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.type.15d) [concrete = constants.%C.69b] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra1 { @@ -2353,7 +2368,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc13_9.1: type) { @@ -2450,7 +2465,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %HasExtraInterfaces.import_ref.be9: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %HasExtraInterfaces.F = import_ref HasExtraInterfaces//default, F, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst64 [no loc], loaded [symbolic = constants.%Self.013] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1c8 = import_ref HasExtraInterfaces//default, loc16_79, unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.bca = import_ref HasExtraInterfaces//default, loc16_79, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst45 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.dfe = import_ref HasExtraInterfaces//default, inst41 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.6b6 = import_ref HasExtraInterfaces//default, inst37 [no loc], unloaded @@ -2540,7 +2555,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%HasExtraInterfaces.import_ref.aa8 as imports.%HasExtraInterfaces.import_ref.301 [from "has_extra_interfaces.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%HasExtraInterfaces.import_ref.1c8 +// CHECK:STDOUT: witness = imports.%HasExtraInterfaces.import_ref.bca // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(imports.%HasExtraInterfaces.import_ref.5ab: type) [from "has_extra_interfaces.carbon"] { diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon index b1f5f95b171d..6c0b14ec217d 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon @@ -207,10 +207,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %F.b81: %F.type.14f = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type.521: type = assoc_entity_type @I, @I(%InInterfaceArgs) [concrete] // CHECK:STDOUT: %assoc0.676: %I.assoc_type.521 = assoc_entity element0, imports.%Main.import_ref.479 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.b63: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.d5f: %F.type.b63 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type.e45 = facet_value %X, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.facet: %I.type.e45 = facet_value %X, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -243,7 +243,8 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %InInterfaceArgs.ref: type = name_ref InInterfaceArgs, file.%InInterfaceArgs.decl [concrete = constants.%InInterfaceArgs] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%InInterfaceArgs)> [concrete = constants.%I.type.e45] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.5ab3ec.1: type) [from "types.carbon"] { @@ -278,7 +279,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @InInterfaceArgs { @@ -375,9 +376,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.assoc_type.521: type = assoc_entity_type @I, @I(%InInterfaceArgs) [concrete] // CHECK:STDOUT: %assoc0.63d: %I.assoc_type.521 = assoc_entity element0, imports.%Main.import_ref.e54 [concrete] // CHECK:STDOUT: %assoc0.688: %I.assoc_type.1e5 = assoc_entity element0, imports.%Main.import_ref.479 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.7f5) [concrete] -// CHECK:STDOUT: %I.facet: %I.type.e45 = facet_value %X, (%impl_witness) [concrete] -// CHECK:STDOUT: %.f71: type = fn_type_with_self_type %F.type.14f, %I.facet [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (imports.%Main.import_ref.7f5), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type.e45 = facet_value %X, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %.658: type = fn_type_with_self_type %F.type.14f, %I.facet [concrete] // CHECK:STDOUT: %F.type.b63: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.d5f: %F.type.b63 = struct_value () [concrete] // CHECK:STDOUT: } @@ -398,7 +400,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.import_ref.e54: @I.%F.type (%F.type.2ae) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%F (constants.%F.bb2)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_interface_args, loc5_24, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.bf8 = import_ref Main//impl_in_interface_args, inst20 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.f9f: = import_ref Main//impl_in_interface_args, loc7_30, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Main.import_ref.e08: = import_ref Main//impl_in_interface_args, loc7_30, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.956: type = import_ref Main//impl_in_interface_args, loc7_6, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.e8c: type = import_ref Main//impl_in_interface_args, loc7_28, loaded [concrete = constants.%I.type.e45] // CHECK:STDOUT: } @@ -444,7 +446,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%Main.import_ref.956 as imports.%Main.import_ref.e8c [from "impl_in_interface_args.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.f9f +// CHECK:STDOUT: witness = imports.%Main.import_ref.e08 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X [from "types.carbon"] { @@ -469,7 +471,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%InInterfaceArgs)> [concrete = constants.%I.type.e45] // CHECK:STDOUT: %.loc6: %I.assoc_type.521 = specific_constant imports.%Main.import_ref.474, @I(constants.%InInterfaceArgs) [concrete = constants.%assoc0.63d] // CHECK:STDOUT: %F.ref: %I.assoc_type.521 = name_ref F, %.loc6 [concrete = constants.%assoc0.63d] -// CHECK:STDOUT: %impl.elem0: %.f71 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.d5f] +// CHECK:STDOUT: %impl.elem0: %.658 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.d5f] // CHECK:STDOUT: %bound_method: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method(%x.ref) // CHECK:STDOUT: return @@ -542,10 +544,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %F.a79: %F.type.56a = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type.2db: type = assoc_entity_type @I, @I(%X) [concrete] // CHECK:STDOUT: %assoc0.8c1: %I.assoc_type.2db = assoc_entity element0, imports.%Main.import_ref.479 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.fab: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.7ab: %F.type.fab = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type.45c = facet_value %C.23b, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.facet: %I.type.45c = facet_value %C.23b, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -583,7 +585,8 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %X.ref: type = name_ref X, imports.%Main.X [concrete = constants.%X] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%X)> [concrete = constants.%I.type.45c] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.5ab3ec.2: type) [from "types.carbon"] { @@ -618,7 +621,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @InClassArgs { @@ -744,9 +747,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.assoc_type.2db: type = assoc_entity_type @I, @I(%X) [concrete] // CHECK:STDOUT: %assoc0.071: %I.assoc_type.2db = assoc_entity element0, imports.%Main.import_ref.e54 [concrete] // CHECK:STDOUT: %assoc0.688: %I.assoc_type.1e5 = assoc_entity element0, imports.%Main.import_ref.479 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.ae4) [concrete] -// CHECK:STDOUT: %I.facet: %I.type.45c = facet_value %C.23b, (%impl_witness) [concrete] -// CHECK:STDOUT: %.0e8: type = fn_type_with_self_type %F.type.56a, %I.facet [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (imports.%Main.import_ref.ae4), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type.45c = facet_value %C.23b, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %.d3f: type = fn_type_with_self_type %F.type.56a, %I.facet [concrete] // CHECK:STDOUT: %F.type.fab: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.7ab: %F.type.fab = struct_value () [concrete] // CHECK:STDOUT: } @@ -770,7 +774,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.import_ref.e54: @I.%F.type (%F.type.2ae) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%F (constants.%F.bb2)] // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.6de: = import_ref Main//impl_in_class_args, loc7_29, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Main.import_ref.a72: = import_ref Main//impl_in_class_args, loc7_29, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.d6e: type = import_ref Main//impl_in_class_args, loc7_19, loaded [concrete = constants.%C.23b] // CHECK:STDOUT: %Main.import_ref.208: type = import_ref Main//impl_in_class_args, loc7_27, loaded [concrete = constants.%I.type.45c] // CHECK:STDOUT: } @@ -820,7 +824,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%Main.import_ref.d6e as imports.%Main.import_ref.208 [from "impl_in_class_args.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.6de +// CHECK:STDOUT: witness = imports.%Main.import_ref.a72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(imports.%Main.import_ref.5ab3ec.1: type) [from "types.carbon"] { @@ -859,7 +863,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%X)> [concrete = constants.%I.type.45c] // CHECK:STDOUT: %.loc6_34: %I.assoc_type.2db = specific_constant imports.%Main.import_ref.474, @I(constants.%X) [concrete = constants.%assoc0.071] // CHECK:STDOUT: %F.ref: %I.assoc_type.2db = name_ref F, %.loc6_34 [concrete = constants.%assoc0.071] -// CHECK:STDOUT: %impl.elem0: %.0e8 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.7ab] +// CHECK:STDOUT: %impl.elem0: %.d3f = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.7ab] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/impl/lookup/transitive.carbon b/toolchain/check/testdata/impl/lookup/transitive.carbon index ca9e0892205e..028fba6e7940 100644 --- a/toolchain/check/testdata/impl/lookup/transitive.carbon +++ b/toolchain/check/testdata/impl/lookup/transitive.carbon @@ -116,10 +116,10 @@ fn Call() { // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.5d6: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.a2e: %F.type.5d6 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -147,7 +147,8 @@ fn Call() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I [from "i.carbon"] { @@ -169,7 +170,7 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -267,9 +268,10 @@ fn Call() { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e03 [concrete] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.742) [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [concrete] -// CHECK:STDOUT: %.bfe: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (imports.%Main.import_ref.742), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %.1b3: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] // CHECK:STDOUT: %F.type.5d6: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.a2e: %F.type.5d6 = struct_value () [concrete] // CHECK:STDOUT: } @@ -287,7 +289,7 @@ fn Call() { // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//i, loc4_33, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//i, F, unloaded // CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst19 [no loc], loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %Main.import_ref.e53: = import_ref Main//c, loc7_13, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Main.import_ref.f0d: = import_ref Main//c, loc7_13, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.29a: type = import_ref Main//c, loc7_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.f50: type = import_ref Main//c, loc7_11, loaded [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -313,7 +315,7 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%Main.import_ref.29a as imports.%Main.import_ref.f50 [from "c.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.e53 +// CHECK:STDOUT: witness = imports.%Main.import_ref.f0d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "get.carbon"] { @@ -330,7 +332,7 @@ fn Call() { // CHECK:STDOUT: %Get.call: init %C = call %Get.ref() to %.loc9_7.1 // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.c44 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.bfe = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.a2e] +// CHECK:STDOUT: %impl.elem0: %.1b3 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.a2e] // CHECK:STDOUT: %bound_method: = bound_method %Get.call, %impl.elem0 // CHECK:STDOUT: %.loc9_7.2: ref %C = temporary %.loc9_7.1, %Get.call // CHECK:STDOUT: %.loc9_7.3: %C = bind_value %.loc9_7.2 diff --git a/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon b/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon index b1f60331f8a8..e4dd1b5d2372 100644 --- a/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon +++ b/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon @@ -275,7 +275,7 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -297,7 +297,8 @@ interface I { // CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc4: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %I.decl.loc6: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %.loc7_7.1: %empty_struct_type = struct_literal () @@ -316,7 +317,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc4_7.2 as %I.ref.loc4 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- method.carbon @@ -324,7 +325,7 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%G.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.ccd: type = fn_type @G.1 [concrete] // CHECK:STDOUT: %G.600: %G.type.ccd = struct_value () [concrete] @@ -332,7 +333,7 @@ interface I { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%G.decl [concrete] // CHECK:STDOUT: %G.type.d6f: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.d07: %G.type.d6f = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -353,7 +354,8 @@ interface I { // CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc4: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%G.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%G.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %I.decl.loc6: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %.loc9_7.1: %empty_struct_type = struct_literal () @@ -378,7 +380,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@I.%Self: %I.type) { @@ -407,21 +409,21 @@ interface I { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl.f92 [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness type [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.3ea) [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete] +// CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %I.type, %Op.444 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.444, @Op.2(type) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %I.type, %Op.specific_fn [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -434,11 +436,10 @@ interface I { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.f92.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.f92.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -456,13 +457,14 @@ interface I { // CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc4_12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %I.ref.loc4_16: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] -// CHECK:STDOUT: %impl.elem0.loc4: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc4: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc4_14.1: = bound_method %I.ref.loc4_12, %impl.elem0.loc4 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc4_14.2: = bound_method %I.ref.loc4_12, %specific_fn.loc4 [concrete = constants.%bound_method] // CHECK:STDOUT: %type.and.loc4: init type = call %bound_method.loc4_14.2(%I.ref.loc4_12, %I.ref.loc4_16) [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.8dc [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %I.decl.loc6: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %.loc7_14.1: type = value_of_initializer @impl.8dc.%type.and.loc7 [concrete = constants.%I.type] // CHECK:STDOUT: %.loc7_14.2: type = converted @impl.8dc.%type.and.loc7, %.loc7_14.1 [concrete = constants.%I.type] @@ -471,7 +473,7 @@ interface I { // CHECK:STDOUT: %.loc7_7.2: type = converted %.loc7_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc7_12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %I.ref.loc7_16: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] -// CHECK:STDOUT: %impl.elem0.loc7: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc7: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc7_14.1: = bound_method %I.ref.loc7_12, %impl.elem0.loc7 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_14.2: = bound_method %I.ref.loc7_12, %specific_fn.loc7 [concrete = constants.%bound_method] @@ -497,7 +499,7 @@ interface I { // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -506,13 +508,13 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.8dc: %.loc4_7.2 as file.%.loc4_14.2 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.040: %BitAnd.type) [from "include_files/facet_types.carbon"] { @@ -538,7 +540,7 @@ interface I { // CHECK:STDOUT: specific @impl.f92(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(%T) {} @@ -550,7 +552,7 @@ interface I { // CHECK:STDOUT: specific @impl.f92(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -579,7 +581,7 @@ interface I { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -612,7 +614,8 @@ interface I { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc6, %.loc6_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %.loc8_7.1: %empty_struct_type = struct_literal () @@ -651,7 +654,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc6_7.2 as %.loc6_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%Self) {} @@ -675,8 +678,8 @@ interface I { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] -// CHECK:STDOUT: %I.facet.e26: %I.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet.62e: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -712,7 +715,8 @@ interface I { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc7, %.loc7_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x @@ -721,9 +725,9 @@ interface I { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%impl_witness) [concrete = constants.%I.facet.e26] -// CHECK:STDOUT: %.loc9_9.2: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.e26] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc9_9.2, element0 [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.62e] +// CHECK:STDOUT: %.loc9_9.2: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.62e] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc9_9.2, element0 [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] @@ -765,7 +769,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref.loc7 as %.loc7_13 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -787,7 +791,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%I.facet.d87) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet.e26) {} +// CHECK:STDOUT: specific @T(constants.%I.facet.62e) {} // CHECK:STDOUT: // CHECK:STDOUT: --- associated_const_of_facet.carbon // CHECK:STDOUT: @@ -806,8 +810,8 @@ interface I { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] -// CHECK:STDOUT: %I.facet.e26: %I.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet.62e: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -843,7 +847,8 @@ interface I { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc7, %.loc7_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x @@ -851,12 +856,12 @@ interface I { // CHECK:STDOUT: %.loc9_16.1: type = splice_block %impl.elem0 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%impl_witness) [concrete = constants.%I.facet.e26] -// CHECK:STDOUT: %.loc9_11: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.e26] +// CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.62e] +// CHECK:STDOUT: %.loc9_11: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.62e] // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc9_11 [concrete = constants.%C] // CHECK:STDOUT: %.loc9_16.2: type = converted %.loc9_11, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc9_11, element0 [concrete = constants.%impl_witness] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc9_11, element0 [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] @@ -898,7 +903,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref.loc7 as %.loc7_13 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -920,7 +925,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%I.facet.d87) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet.e26) {} +// CHECK:STDOUT: specific @T(constants.%I.facet.62e) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_unset_associated_const.carbon // CHECK:STDOUT: @@ -932,8 +937,8 @@ interface I { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -957,19 +962,20 @@ interface I { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: = binding_pattern x // CHECK:STDOUT: } // CHECK:STDOUT: %.loc13_16.1: type = splice_block %impl.elem0 [concrete = ] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%impl_witness) [concrete = constants.%I.facet] +// CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc13_11: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc13_11 [concrete = constants.%C] // CHECK:STDOUT: %.loc13_16.2: type = converted %.loc13_11, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc13_11, element0 [concrete = constants.%impl_witness] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc13_11, element0 [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %as_wit.iface0, element0 [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: %x: = bind_name x, @@ -997,7 +1003,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref.loc7 as %I.ref.loc7 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -1130,7 +1136,7 @@ interface I { // CHECK:STDOUT: %I.facet: %I.type.e7a = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I, @I(%C) where %impl.elem0 = %C> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1172,7 +1178,8 @@ interface I { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %C.ref.loc8_27 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C] // CHECK:STDOUT: %C.decl.loc10: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { @@ -1224,7 +1231,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %D.ref.loc8 as %.loc8_16 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -1274,14 +1281,14 @@ interface I { // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] // CHECK:STDOUT: %C.54e: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %D, (%impl_witness) [concrete] -// CHECK:STDOUT: %C.a9d: type = class_type @C, @C(%I.facet) [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %D, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %C.8b1: type = class_type @C, @C(%I.facet) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] @@ -1308,7 +1315,8 @@ interface I { // CHECK:STDOUT: %D.ref.loc5: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %I.ref.loc5: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %C.decl.loc6: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc12: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -1316,18 +1324,18 @@ interface I { // CHECK:STDOUT: %T.loc6_9.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc8: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %x.patt: %C.a9d = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %C.a9d = value_param_pattern %x.patt, call_param0 +// CHECK:STDOUT: %x.patt: %C.8b1 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %C.8b1 = value_param_pattern %x.patt, call_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %x.param.loc8: %C.a9d = value_param call_param0 -// CHECK:STDOUT: %.loc8_12.1: type = splice_block %C.loc8 [concrete = constants.%C.a9d] { +// CHECK:STDOUT: %x.param.loc8: %C.8b1 = value_param call_param0 +// CHECK:STDOUT: %.loc8_12.1: type = splice_block %C.loc8 [concrete = constants.%C.8b1] { // CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C.generic] // CHECK:STDOUT: %D.ref.loc8: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %I.facet.loc8: %I.type = facet_value constants.%D, (constants.%impl_witness) [concrete = constants.%I.facet] +// CHECK:STDOUT: %I.facet.loc8: %I.type = facet_value constants.%D, (constants.%I.impl_witness) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc8_12.2: %I.type = converted %D.ref.loc8, %I.facet.loc8 [concrete = constants.%I.facet] -// CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%I.facet) [concrete = constants.%C.a9d] +// CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%I.facet) [concrete = constants.%C.8b1] // CHECK:STDOUT: } -// CHECK:STDOUT: %x.loc8: %C.a9d = bind_name x, %x.param.loc8 +// CHECK:STDOUT: %x.loc8: %C.8b1 = bind_name x, %x.param.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl.loc10: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { @@ -1341,18 +1349,18 @@ interface I { // CHECK:STDOUT: %T.loc12: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc14: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %x.patt: %C.a9d = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %C.a9d = value_param_pattern %x.patt, call_param0 +// CHECK:STDOUT: %x.patt: %C.8b1 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %C.8b1 = value_param_pattern %x.patt, call_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %x.param.loc14: %C.a9d = value_param call_param0 -// CHECK:STDOUT: %.loc14_12.1: type = splice_block %C.loc14 [concrete = constants.%C.a9d] { +// CHECK:STDOUT: %x.param.loc14: %C.8b1 = value_param call_param0 +// CHECK:STDOUT: %.loc14_12.1: type = splice_block %C.loc14 [concrete = constants.%C.8b1] { // CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C.generic] // CHECK:STDOUT: %D.ref.loc14: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %I.facet.loc14: %I.type = facet_value constants.%D, (constants.%impl_witness) [concrete = constants.%I.facet] +// CHECK:STDOUT: %I.facet.loc14: %I.type = facet_value constants.%D, (constants.%I.impl_witness) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc14_12.2: %I.type = converted %D.ref.loc14, %I.facet.loc14 [concrete = constants.%I.facet] -// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%I.facet) [concrete = constants.%C.a9d] +// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%I.facet) [concrete = constants.%C.8b1] // CHECK:STDOUT: } -// CHECK:STDOUT: %x.loc14: %C.a9d = bind_name x, %x.param.loc14 +// CHECK:STDOUT: %x.loc14: %C.8b1 = bind_name x, %x.param.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1366,7 +1374,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %D.ref.loc5 as %I.ref.loc5 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -1394,7 +1402,7 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%x.param_patt: %C.a9d) { +// CHECK:STDOUT: fn @F(%x.param_patt: %C.8b1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1425,17 +1433,17 @@ interface I { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl.f92 [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness type [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.3ea) [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete] +// CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %I.type, %Op.444 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.444, @Op.2(type) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %I.type, %Op.specific_fn [concrete] @@ -1453,11 +1461,10 @@ interface I { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.f92.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.f92.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1477,7 +1484,7 @@ interface I { // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl.loc4 [concrete = constants.%J.type] -// CHECK:STDOUT: %impl.elem0: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc10_14.1: = bound_method %I.ref, %impl.elem0 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_14.2: = bound_method %I.ref, %specific_fn [concrete = constants.%bound_method] @@ -1513,7 +1520,7 @@ interface I { // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -1522,7 +1529,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1551,7 +1558,7 @@ interface I { // CHECK:STDOUT: specific @impl.f92(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(%T) {} @@ -1563,7 +1570,7 @@ interface I { // CHECK:STDOUT: specific @impl.f92(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -1595,7 +1602,7 @@ interface I { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant, ) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1629,7 +1636,8 @@ interface I { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc9, %.loc9_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant, ) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, ), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc18: type = name_ref C, file.%C.decl [concrete = constants.%C] @@ -1675,7 +1683,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref.loc9 as %.loc9_13 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -1706,19 +1714,19 @@ interface I { // 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] -// CHECK:STDOUT: %impl_witness.1bcebf.1: = impl_witness () [concrete] +// CHECK:STDOUT: %X.impl_witness: = impl_witness file.%X.impl_witness_table [concrete] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] // CHECK:STDOUT: %Self.e5e: %X.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %X.facet: %X.type = facet_value %C, (%impl_witness.1bcebf.1) [concrete] +// CHECK:STDOUT: %X.facet: %X.type = facet_value %C, (%X.impl_witness) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%X.facet) [concrete] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%X.facet) [concrete] // CHECK:STDOUT: %Self.b29: %Y.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type [symbolic] -// CHECK:STDOUT: %impl_witness.1bcebf.2: = impl_witness () [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness file.%Y.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1765,7 +1773,8 @@ interface I { // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C] // CHECK:STDOUT: %X.ref.loc12: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc12: = impl_witness () [concrete = constants.%impl_witness.1bcebf.1] +// CHECK:STDOUT: %X.impl_witness_table = impl_witness_table (), @impl.10e [concrete] +// CHECK:STDOUT: %X.impl_witness: = impl_witness %X.impl_witness_table [concrete = constants.%X.impl_witness] // CHECK:STDOUT: %Y.decl.loc14: type = interface_decl @Y [concrete = constants.%Y.type] {} {} // CHECK:STDOUT: %X.decl.loc16: type = interface_decl @X [concrete = constants.%X.type] {} {} // CHECK:STDOUT: %C.decl.loc23: type = class_decl @C [concrete = constants.%C] {} {} @@ -1803,7 +1812,8 @@ interface I { // CHECK:STDOUT: %C.ref.loc36: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C] // CHECK:STDOUT: %Y.ref.loc36: type = name_ref Y, file.%Y.decl.loc14 [concrete = constants.%Y.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc36: = impl_witness () [concrete = constants.%impl_witness.1bcebf.2] +// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @impl.a85 [concrete] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: impl_decl @impl.10e [concrete] {} { // CHECK:STDOUT: %C.ref.loc37: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C] // CHECK:STDOUT: %X.ref.loc37: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] @@ -1832,12 +1842,12 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.10e: %C.ref.loc12 as %X.ref.loc12 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc12 +// CHECK:STDOUT: witness = file.%X.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a85: %C.ref.loc36 as %Y.ref.loc36 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc36 +// CHECK:STDOUT: witness = file.%Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -1879,15 +1889,15 @@ interface I { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc6 [concrete = constants.%F] // CHECK:STDOUT: %C.ref.loc27: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C] -// CHECK:STDOUT: %X.facet.loc27: %X.type = facet_value constants.%C, (constants.%impl_witness.1bcebf.1) [concrete = constants.%X.facet] +// CHECK:STDOUT: %X.facet.loc27: %X.type = facet_value constants.%C, (constants.%X.impl_witness) [concrete = constants.%X.facet] // CHECK:STDOUT: %.loc27: %X.type = converted %C.ref.loc27, %X.facet.loc27 [concrete = constants.%X.facet] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%X.facet) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn() // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl.loc7 [concrete = constants.%G] // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %X.facet.loc28_6.1: %X.type = facet_value constants.%C, (constants.%impl_witness.1bcebf.1) [concrete = constants.%X.facet] +// CHECK:STDOUT: %X.facet.loc28_6.1: %X.type = facet_value constants.%C, (constants.%X.impl_witness) [concrete = constants.%X.facet] // CHECK:STDOUT: %.loc28_6.1: %X.type = converted constants.%C, %X.facet.loc28_6.1 [concrete = constants.%X.facet] -// CHECK:STDOUT: %X.facet.loc28_6.2: %X.type = facet_value constants.%C, (constants.%impl_witness.1bcebf.1) [concrete = constants.%X.facet] +// CHECK:STDOUT: %X.facet.loc28_6.2: %X.type = facet_value constants.%C, (constants.%X.impl_witness) [concrete = constants.%X.facet] // CHECK:STDOUT: %.loc28_6.2: %X.type = converted constants.%C, %X.facet.loc28_6.2 [concrete = constants.%X.facet] // CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%X.facet) [concrete = constants.%G.specific_fn] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn(%c.ref) @@ -1934,7 +1944,7 @@ interface I { // CHECK:STDOUT: %C.023: type = class_type @C, @C(%Self) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%Self) [symbolic] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1966,7 +1976,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(%Self) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic = %I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.ref; // CHECK:STDOUT: } @@ -1994,7 +2004,8 @@ interface I { // CHECK:STDOUT: %C.ref: type = name_ref C, @F.%C.decl [concrete = constants.%C.a2d] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl(constants.%Self) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%Self) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2005,7 +2016,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%Self) {} @@ -2030,7 +2041,7 @@ interface I { // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %C.a2d> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@F.%impl_witness_assoc_constant, ), @impl(%Self) [symbolic] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2070,7 +2081,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %impl_witness: = impl_witness (@F.%impl_witness_assoc_constant, ), @impl(%Self) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic = %I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -2114,7 +2125,8 @@ interface I { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc16, %C.ref.loc16_28 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant, ), @impl(constants.%Self) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, ), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%Self) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C.a2d [concrete = constants.%C.a2d] // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc18_10: type = name_ref C, @F.%C.decl [concrete = constants.%C.a2d] @@ -2145,7 +2157,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%Self) {} @@ -2182,11 +2194,11 @@ interface I { // CHECK:STDOUT: %assoc0.220: %BitAnd.assoc_type = assoc_entity element0, @BitAnd.%Op.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.type.28d: type = fn_type @Op.2, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.902: %Op.type.28d = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%impl_witness) [symbolic] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%BitAnd.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2213,7 +2225,8 @@ interface I { // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, file.%BitAnd.decl [concrete = constants.%BitAnd.type] // CHECK:STDOUT: %T.loc21_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(%Dest.loc9_14.1: type) { @@ -2341,7 +2354,7 @@ interface I { // CHECK:STDOUT: generic impl @impl(%T.loc21_14.1: type) { // CHECK:STDOUT: %T.loc21_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc21_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%Op.decl), @impl(%T.loc21_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T.loc21_14.2) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T.loc21_14.2) [symbolic = %Op.type (constants.%Op.type.28d)] @@ -2370,7 +2383,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2447,7 +2460,7 @@ interface I { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc21_14.2) {} diff --git a/toolchain/check/testdata/impl/multiple_extend.carbon b/toolchain/check/testdata/impl/multiple_extend.carbon index 5a70879e4225..b81383735473 100644 --- a/toolchain/check/testdata/impl/multiple_extend.carbon +++ b/toolchain/check/testdata/impl/multiple_extend.carbon @@ -177,20 +177,20 @@ fn P(o: O) { // CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete] // CHECK:STDOUT: %assoc0.319: %HasG.assoc_type = assoc_entity element0, @HasG.%G.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %impl_witness.329: = impl_witness (@impl.670.%F.decl) [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness @C.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.a65: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.ad8: %F.type.a65 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%impl_witness.329) [concrete] -// CHECK:STDOUT: %impl_witness.42a: = impl_witness (@impl.096.%G.decl) [concrete] +// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %HasG.impl_witness: = impl_witness @C.%HasG.impl_witness_table [concrete] // CHECK:STDOUT: %G.type.cf6: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.957: %G.type.cf6 = struct_value () [concrete] -// CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %C, (%impl_witness.42a) [concrete] +// CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %C, (%HasG.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %.1bc: type = fn_type_with_self_type %F.type.b7b, %HasF.facet [concrete] -// CHECK:STDOUT: %.bba: type = fn_type_with_self_type %G.type.d27, %HasG.facet [concrete] +// CHECK:STDOUT: %.a44: type = fn_type_with_self_type %F.type.b7b, %HasF.facet [concrete] +// CHECK:STDOUT: %.521: type = fn_type_with_self_type %G.type.d27, %HasG.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -252,7 +252,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @C.%impl_witness.loc13 +// CHECK:STDOUT: witness = @C.%HasF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.096: %Self.ref as %HasG.ref { @@ -260,7 +260,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = @C.%impl_witness.loc16 +// CHECK:STDOUT: witness = @C.%HasG.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -268,12 +268,14 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc13: = impl_witness (@impl.670.%F.decl) [concrete = constants.%impl_witness.329] +// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.670.%F.decl), @impl.670 [concrete] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: impl_decl @impl.096 [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, file.%HasG.decl [concrete = constants.%HasG.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc16: = impl_witness (@impl.096.%G.decl) [concrete = constants.%impl_witness.42a] +// CHECK:STDOUT: %HasG.impl_witness_table = impl_witness_table (@impl.096.%G.decl), @impl.096 [concrete] +// CHECK:STDOUT: %HasG.impl_witness: = impl_witness %HasG.impl_witness_table [concrete = constants.%HasG.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -310,19 +312,19 @@ fn P(o: O) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %F.ref.loc22: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.97a] -// CHECK:STDOUT: %impl.elem0.loc22: %.1bc = impl_witness_access constants.%impl_witness.329, element0 [concrete = constants.%F.ad8] +// CHECK:STDOUT: %impl.elem0.loc22: %.a44 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.ad8] // CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %impl.elem0.loc22() // CHECK:STDOUT: %c.ref.loc23: %C = name_ref c, %c // CHECK:STDOUT: %F.ref.loc23: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.97a] -// CHECK:STDOUT: %impl.elem0.loc23: %.1bc = impl_witness_access constants.%impl_witness.329, element0 [concrete = constants.%F.ad8] +// CHECK:STDOUT: %impl.elem0.loc23: %.a44 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.ad8] // CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %impl.elem0.loc23() // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %G.ref.loc24: %HasG.assoc_type = name_ref G, @HasG.%assoc0 [concrete = constants.%assoc0.319] -// CHECK:STDOUT: %impl.elem0.loc24: %.bba = impl_witness_access constants.%impl_witness.42a, element0 [concrete = constants.%G.957] +// CHECK:STDOUT: %impl.elem0.loc24: %.521 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%G.957] // CHECK:STDOUT: %G.call.loc24: init %empty_tuple.type = call %impl.elem0.loc24() // CHECK:STDOUT: %c.ref.loc25: %C = name_ref c, %c // CHECK:STDOUT: %G.ref.loc25: %HasG.assoc_type = name_ref G, @HasG.%assoc0 [concrete = constants.%assoc0.319] -// CHECK:STDOUT: %impl.elem0.loc25: %.bba = impl_witness_access constants.%impl_witness.42a, element0 [concrete = constants.%G.957] +// CHECK:STDOUT: %impl.elem0.loc25: %.521 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%G.957] // CHECK:STDOUT: %G.call.loc25: init %empty_tuple.type = call %impl.elem0.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -351,14 +353,14 @@ fn P(o: O) { // CHECK:STDOUT: %HasA2.assoc_type: type = assoc_entity_type @HasA2 [concrete] // CHECK:STDOUT: %assoc0.316: %HasA2.assoc_type = assoc_entity element0, @HasA2.%A.decl [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %impl_witness.73a: = impl_witness (@impl.909.%A.decl) [concrete] +// CHECK:STDOUT: %HasA1.impl_witness: = impl_witness @D.%HasA1.impl_witness_table [concrete] // CHECK:STDOUT: %A.type.468: type = fn_type @A.3 [concrete] // CHECK:STDOUT: %A.efc: %A.type.468 = struct_value () [concrete] -// CHECK:STDOUT: %HasA1.facet: %HasA1.type = facet_value %D, (%impl_witness.73a) [concrete] -// CHECK:STDOUT: %impl_witness.baf: = impl_witness (@impl.390.%A.decl) [concrete] +// CHECK:STDOUT: %HasA1.facet: %HasA1.type = facet_value %D, (%HasA1.impl_witness) [concrete] +// CHECK:STDOUT: %HasA2.impl_witness: = impl_witness @D.%HasA2.impl_witness_table [concrete] // CHECK:STDOUT: %A.type.938: type = fn_type @A.4 [concrete] // CHECK:STDOUT: %A.890: %A.type.938 = struct_value () [concrete] -// CHECK:STDOUT: %HasA2.facet: %HasA2.type = facet_value %D, (%impl_witness.baf) [concrete] +// CHECK:STDOUT: %HasA2.facet: %HasA2.type = facet_value %D, (%HasA2.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] @@ -422,7 +424,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl -// CHECK:STDOUT: witness = @D.%impl_witness.loc13 +// CHECK:STDOUT: witness = @D.%HasA1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.390: %Self.ref as %HasA2.ref { @@ -430,7 +432,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl -// CHECK:STDOUT: witness = @D.%impl_witness.loc16 +// CHECK:STDOUT: witness = @D.%HasA2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -438,12 +440,14 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D [concrete = constants.%D] // CHECK:STDOUT: %HasA1.ref: type = name_ref HasA1, file.%HasA1.decl [concrete = constants.%HasA1.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc13: = impl_witness (@impl.909.%A.decl) [concrete = constants.%impl_witness.73a] +// CHECK:STDOUT: %HasA1.impl_witness_table = impl_witness_table (@impl.909.%A.decl), @impl.909 [concrete] +// CHECK:STDOUT: %HasA1.impl_witness: = impl_witness %HasA1.impl_witness_table [concrete = constants.%HasA1.impl_witness] // CHECK:STDOUT: impl_decl @impl.390 [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D [concrete = constants.%D] // CHECK:STDOUT: %HasA2.ref: type = name_ref HasA2, file.%HasA2.decl [concrete = constants.%HasA2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc16: = impl_witness (@impl.390.%A.decl) [concrete = constants.%impl_witness.baf] +// CHECK:STDOUT: %HasA2.impl_witness_table = impl_witness_table (@impl.390.%A.decl), @impl.390 [concrete] +// CHECK:STDOUT: %HasA2.impl_witness: = impl_witness %HasA2.impl_witness_table [concrete = constants.%HasA2.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -509,15 +513,15 @@ fn P(o: O) { // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %E.elem: type = unbound_element_type %E, %B [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%I.decl) [concrete] +// CHECK:STDOUT: %HasI.impl_witness: = impl_witness @E.%HasI.impl_witness_table [concrete] // CHECK:STDOUT: %I.type.395: type = fn_type @I.2 [concrete] // CHECK:STDOUT: %I.e74: %I.type.395 = struct_value () [concrete] -// CHECK:STDOUT: %HasI.facet: %HasI.type = facet_value %E, (%impl_witness) [concrete] +// CHECK:STDOUT: %HasI.facet: %HasI.type = facet_value %E, (%HasI.impl_witness) [concrete] // CHECK:STDOUT: %struct_type.base.0ff: type = struct_type {.base: %B} [concrete] // CHECK:STDOUT: %complete_type.98e: = complete_type_witness %struct_type.base.0ff [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %.52d: type = fn_type_with_self_type %I.type.9bd, %HasI.facet [concrete] +// CHECK:STDOUT: %.06f: type = fn_type_with_self_type %I.type.9bd, %HasI.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -566,7 +570,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .I = %I.decl -// CHECK:STDOUT: witness = @E.%impl_witness +// CHECK:STDOUT: witness = @E.%HasI.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { @@ -589,7 +593,8 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] // CHECK:STDOUT: %HasI.ref: type = name_ref HasI, file.%HasI.decl [concrete = constants.%HasI.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%I.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %HasI.impl_witness_table = impl_witness_table (@impl.%I.decl), @impl [concrete] +// CHECK:STDOUT: %HasI.impl_witness: = impl_witness %HasI.impl_witness_table [concrete = constants.%HasI.impl_witness] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %B} [concrete = constants.%struct_type.base.0ff] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [concrete = constants.%complete_type.98e] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -623,11 +628,11 @@ fn P(o: O) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %E.ref.loc20: type = name_ref E, file.%E.decl [concrete = constants.%E] // CHECK:STDOUT: %I.ref.loc20: %HasI.assoc_type = name_ref I, @HasI.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc20: %.52d = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%I.e74] +// CHECK:STDOUT: %impl.elem0.loc20: %.06f = impl_witness_access constants.%HasI.impl_witness, element0 [concrete = constants.%I.e74] // CHECK:STDOUT: %I.call.loc20: init %empty_tuple.type = call %impl.elem0.loc20() // CHECK:STDOUT: %e.ref.loc21: %E = name_ref e, %e // CHECK:STDOUT: %I.ref.loc21: %HasI.assoc_type = name_ref I, @HasI.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc21: %.52d = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%I.e74] +// CHECK:STDOUT: %impl.elem0.loc21: %.06f = impl_witness_access constants.%HasI.impl_witness, element0 [concrete = constants.%I.e74] // CHECK:STDOUT: %I.call.loc21: init %empty_tuple.type = call %impl.elem0.loc21() // CHECK:STDOUT: %E.ref.loc22: type = name_ref E, file.%E.decl [concrete = constants.%E] // CHECK:STDOUT: %J.ref.loc22: %J.type = name_ref J, @B.%J.decl [concrete = constants.%J] @@ -658,10 +663,10 @@ fn P(o: O) { // CHECK:STDOUT: %assoc0: %HasK.assoc_type = assoc_entity element0, @HasK.%K.decl [concrete] // CHECK:STDOUT: %L: type = class_type @L [concrete] // CHECK:STDOUT: %L.elem: type = unbound_element_type %L, %Base [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%K.decl) [concrete] +// CHECK:STDOUT: %HasK.impl_witness: = impl_witness @L.%HasK.impl_witness_table [concrete] // CHECK:STDOUT: %K.type.bc2: type = fn_type @K.3 [concrete] // CHECK:STDOUT: %K.bd6: %K.type.bc2 = struct_value () [concrete] -// CHECK:STDOUT: %HasK.facet: %HasK.type = facet_value %L, (%impl_witness) [concrete] +// CHECK:STDOUT: %HasK.facet: %HasK.type = facet_value %L, (%HasK.impl_witness) [concrete] // CHECK:STDOUT: %struct_type.base.b1e: type = struct_type {.base: %Base} [concrete] // CHECK:STDOUT: %complete_type.15c: = complete_type_witness %struct_type.base.b1e [concrete] // CHECK:STDOUT: %M.type: type = fn_type @M [concrete] @@ -713,7 +718,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %K.decl -// CHECK:STDOUT: witness = @L.%impl_witness +// CHECK:STDOUT: witness = @L.%HasK.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { @@ -735,7 +740,8 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%L [concrete = constants.%L] // CHECK:STDOUT: %HasK.ref: type = name_ref HasK, file.%HasK.decl [concrete = constants.%HasK.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%K.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %HasK.impl_witness_table = impl_witness_table (@impl.%K.decl), @impl [concrete] +// CHECK:STDOUT: %HasK.impl_witness: = impl_witness %HasK.impl_witness_table [concrete = constants.%HasK.impl_witness] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [concrete = constants.%struct_type.base.b1e] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [concrete = constants.%complete_type.15c] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -800,14 +806,14 @@ fn P(o: O) { // CHECK:STDOUT: %assoc0.7d1: %HasN2.assoc_type = assoc_entity element0, @HasN2.%N.decl [concrete] // CHECK:STDOUT: %O: type = class_type @O [concrete] // CHECK:STDOUT: %O.elem: type = unbound_element_type %O, %NBase [concrete] -// CHECK:STDOUT: %impl_witness.982: = impl_witness (@impl.968.%N.decl) [concrete] +// CHECK:STDOUT: %HasN1.impl_witness: = impl_witness @O.%HasN1.impl_witness_table [concrete] // CHECK:STDOUT: %N.type.ffc: type = fn_type @N.4 [concrete] // CHECK:STDOUT: %N.4f5: %N.type.ffc = struct_value () [concrete] -// CHECK:STDOUT: %HasN1.facet: %HasN1.type = facet_value %O, (%impl_witness.982) [concrete] -// CHECK:STDOUT: %impl_witness.599: = impl_witness (@impl.117.%N.decl) [concrete] +// CHECK:STDOUT: %HasN1.facet: %HasN1.type = facet_value %O, (%HasN1.impl_witness) [concrete] +// CHECK:STDOUT: %HasN2.impl_witness: = impl_witness @O.%HasN2.impl_witness_table [concrete] // CHECK:STDOUT: %N.type.8af: type = fn_type @N.5 [concrete] // CHECK:STDOUT: %N.308: %N.type.8af = struct_value () [concrete] -// CHECK:STDOUT: %HasN2.facet: %HasN2.type = facet_value %O, (%impl_witness.599) [concrete] +// CHECK:STDOUT: %HasN2.facet: %HasN2.type = facet_value %O, (%HasN2.impl_witness) [concrete] // CHECK:STDOUT: %N.type.8b4: type = fn_type @N.6 [concrete] // CHECK:STDOUT: %N.cc3: %N.type.8b4 = struct_value () [concrete] // CHECK:STDOUT: %struct_type.base.9c6: type = struct_type {.base: %NBase} [concrete] @@ -875,7 +881,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %N.decl -// CHECK:STDOUT: witness = @O.%impl_witness.loc18 +// CHECK:STDOUT: witness = @O.%HasN1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.117: %Self.ref as %HasN2.ref { @@ -883,7 +889,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %N.decl -// CHECK:STDOUT: witness = @O.%impl_witness.loc21 +// CHECK:STDOUT: witness = @O.%HasN2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NBase { @@ -906,12 +912,14 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%O [concrete = constants.%O] // CHECK:STDOUT: %HasN1.ref: type = name_ref HasN1, file.%HasN1.decl [concrete = constants.%HasN1.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc18: = impl_witness (@impl.968.%N.decl) [concrete = constants.%impl_witness.982] +// CHECK:STDOUT: %HasN1.impl_witness_table = impl_witness_table (@impl.968.%N.decl), @impl.968 [concrete] +// CHECK:STDOUT: %HasN1.impl_witness: = impl_witness %HasN1.impl_witness_table [concrete = constants.%HasN1.impl_witness] // CHECK:STDOUT: impl_decl @impl.117 [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%O [concrete = constants.%O] // CHECK:STDOUT: %HasN2.ref: type = name_ref HasN2, file.%HasN2.decl [concrete = constants.%HasN2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc21: = impl_witness (@impl.117.%N.decl) [concrete = constants.%impl_witness.599] +// CHECK:STDOUT: %HasN2.impl_witness_table = impl_witness_table (@impl.117.%N.decl), @impl.117 [concrete] +// CHECK:STDOUT: %HasN2.impl_witness: = impl_witness %HasN2.impl_witness_table [concrete = constants.%HasN2.impl_witness] // CHECK:STDOUT: %N.decl: %N.type.8b4 = fn_decl @N.6 [concrete = constants.%N.cc3] {} {} // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %NBase} [concrete = constants.%struct_type.base.9c6] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [concrete = constants.%complete_type.121] diff --git a/toolchain/check/testdata/impl/no_prelude/basic.carbon b/toolchain/check/testdata/impl/no_prelude/basic.carbon index 5da1fccef127..8599e6887bf4 100644 --- a/toolchain/check/testdata/impl/no_prelude/basic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/basic.carbon @@ -30,10 +30,10 @@ impl C as Simple { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness file.%Simple.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.f9e: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.f50: %F.type.f9e = struct_value () [concrete] -// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %C, (%Simple.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,7 +47,8 @@ impl C as Simple { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness %Simple.impl_witness_table [concrete = constants.%Simple.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { @@ -66,7 +67,7 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/impl/no_prelude/compound.carbon b/toolchain/check/testdata/impl/no_prelude/compound.carbon index 73bb94eb9cc9..8d4b28f04197 100644 --- a/toolchain/check/testdata/impl/no_prelude/compound.carbon +++ b/toolchain/check/testdata/impl/no_prelude/compound.carbon @@ -221,13 +221,13 @@ fn InstanceCallFail() { // CHECK:STDOUT: %NonInstance1.assoc_type: type = assoc_entity_type @NonInstance1 [concrete] // CHECK:STDOUT: %assoc0: %NonInstance1.assoc_type = assoc_entity element0, @NonInstance1.%F1.decl [concrete] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F1.decl) [concrete] +// CHECK:STDOUT: %NonInstance1.impl_witness: = impl_witness file.%NonInstance1.impl_witness_table [concrete] // CHECK:STDOUT: %F1.type.d4a: type = fn_type @F1.2 [concrete] // CHECK:STDOUT: %F1.c75: %F1.type.d4a = struct_value () [concrete] -// CHECK:STDOUT: %NonInstance1.facet: %NonInstance1.type = facet_value %struct_type.a, (%impl_witness) [concrete] +// CHECK:STDOUT: %NonInstance1.facet: %NonInstance1.type = facet_value %struct_type.a, (%NonInstance1.impl_witness) [concrete] // CHECK:STDOUT: %NonInstanceCall1.type: type = fn_type @NonInstanceCall1 [concrete] // CHECK:STDOUT: %NonInstanceCall1: %NonInstanceCall1.type = struct_value () [concrete] -// CHECK:STDOUT: %.971: type = fn_type_with_self_type %F1.type.163, %NonInstance1.facet [concrete] +// CHECK:STDOUT: %.a2c: type = fn_type_with_self_type %F1.type.163, %NonInstance1.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -242,7 +242,8 @@ fn InstanceCallFail() { // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete = constants.%struct_type.a] // CHECK:STDOUT: %NonInstance1.ref: type = name_ref NonInstance1, file.%NonInstance1.decl [concrete = constants.%NonInstance1.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F1.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %NonInstance1.impl_witness_table = impl_witness_table (@impl.%F1.decl), @impl [concrete] +// CHECK:STDOUT: %NonInstance1.impl_witness: = impl_witness %NonInstance1.impl_witness_table [concrete = constants.%NonInstance1.impl_witness] // CHECK:STDOUT: %NonInstanceCall1.decl: %NonInstanceCall1.type = fn_decl @NonInstanceCall1 [concrete = constants.%NonInstanceCall1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -262,7 +263,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F1 = %F1.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%NonInstance1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F1.1(@NonInstance1.%Self: %NonInstance1.type) { @@ -281,10 +282,10 @@ fn InstanceCallFail() { // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete = constants.%struct_type.a] // CHECK:STDOUT: %NonInstance1.ref: type = name_ref NonInstance1, file.%NonInstance1.decl [concrete = constants.%NonInstance1.type] // CHECK:STDOUT: %F1.ref: %NonInstance1.assoc_type = name_ref F1, @NonInstance1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %NonInstance1.facet: %NonInstance1.type = facet_value constants.%struct_type.a, (constants.%impl_witness) [concrete = constants.%NonInstance1.facet] +// CHECK:STDOUT: %NonInstance1.facet: %NonInstance1.type = facet_value constants.%struct_type.a, (constants.%NonInstance1.impl_witness) [concrete = constants.%NonInstance1.facet] // CHECK:STDOUT: %.loc12_11: %NonInstance1.type = converted %struct_type.a, %NonInstance1.facet [concrete = constants.%NonInstance1.facet] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc12_11, element0 [concrete = constants.%impl_witness] -// CHECK:STDOUT: %impl.elem0: %.971 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F1.c75] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc12_11, element0 [concrete = constants.%NonInstance1.impl_witness] +// CHECK:STDOUT: %impl.elem0: %.a2c = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F1.c75] // CHECK:STDOUT: %F1.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -304,10 +305,10 @@ fn InstanceCallFail() { // CHECK:STDOUT: %NonInstance2.assoc_type: type = assoc_entity_type @NonInstance2 [concrete] // CHECK:STDOUT: %assoc0.92e: %NonInstance2.assoc_type = assoc_entity element0, @NonInstance2.%F2.decl [concrete] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F2.decl) [concrete] +// CHECK:STDOUT: %NonInstance2.impl_witness: = impl_witness file.%NonInstance2.impl_witness_table [concrete] // CHECK:STDOUT: %F2.type.1ec: type = fn_type @F2.2 [concrete] // CHECK:STDOUT: %F2.941: %F2.type.1ec = struct_value () [concrete] -// CHECK:STDOUT: %NonInstance2.facet: %NonInstance2.type = facet_value %struct_type.b, (%impl_witness) [concrete] +// CHECK:STDOUT: %NonInstance2.facet: %NonInstance2.type = facet_value %struct_type.b, (%NonInstance2.impl_witness) [concrete] // CHECK:STDOUT: %NonInstanceCall2.type: type = fn_type @NonInstanceCall2 [concrete] // CHECK:STDOUT: %NonInstanceCall2: %NonInstanceCall2.type = struct_value () [concrete] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] @@ -356,7 +357,8 @@ fn InstanceCallFail() { // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_tuple.type} [concrete = constants.%struct_type.b] // CHECK:STDOUT: %NonInstance2.ref: type = name_ref NonInstance2, file.%NonInstance2.decl [concrete = constants.%NonInstance2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F2.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %NonInstance2.impl_witness_table = impl_witness_table (@impl.%F2.decl), @impl [concrete] +// CHECK:STDOUT: %NonInstance2.impl_witness: = impl_witness %NonInstance2.impl_witness_table [concrete = constants.%NonInstance2.impl_witness] // CHECK:STDOUT: %NonInstanceCall2.decl: %NonInstanceCall2.type = fn_decl @NonInstanceCall2 [concrete = constants.%NonInstanceCall2] { // CHECK:STDOUT: %n.patt: %struct_type.b = binding_pattern n // CHECK:STDOUT: %n.param_patt: %struct_type.b = value_param_pattern %n.patt, call_param0 @@ -407,7 +409,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F2 = %F2.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%NonInstance2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F2.1(@NonInstance2.%Self: %NonInstance2.type) { @@ -481,10 +483,10 @@ fn InstanceCallFail() { // CHECK:STDOUT: %NonInstance3.assoc_type: type = assoc_entity_type @NonInstance3 [concrete] // CHECK:STDOUT: %assoc0.2f5: %NonInstance3.assoc_type = assoc_entity element0, @NonInstance3.%F3.decl [concrete] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F3.decl) [concrete] +// CHECK:STDOUT: %NonInstance3.impl_witness: = impl_witness file.%NonInstance3.impl_witness_table [concrete] // CHECK:STDOUT: %F3.type.1c2: type = fn_type @F3.2 [concrete] // CHECK:STDOUT: %F3.1d3: %F3.type.1c2 = struct_value () [concrete] -// CHECK:STDOUT: %NonInstance3.facet: %NonInstance3.type = facet_value %struct_type.c, (%impl_witness) [concrete] +// CHECK:STDOUT: %NonInstance3.facet: %NonInstance3.type = facet_value %struct_type.c, (%NonInstance3.impl_witness) [concrete] // CHECK:STDOUT: %ptr: type = ptr_type %struct_type.c [concrete] // CHECK:STDOUT: %NonInstanceCallIndirect.type: type = fn_type @NonInstanceCallIndirect [concrete] // CHECK:STDOUT: %NonInstanceCallIndirect: %NonInstanceCallIndirect.type = struct_value () [concrete] @@ -534,7 +536,8 @@ fn InstanceCallFail() { // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %empty_tuple.type} [concrete = constants.%struct_type.c] // CHECK:STDOUT: %NonInstance3.ref: type = name_ref NonInstance3, file.%NonInstance3.decl [concrete = constants.%NonInstance3.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F3.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %NonInstance3.impl_witness_table = impl_witness_table (@impl.%F3.decl), @impl [concrete] +// CHECK:STDOUT: %NonInstance3.impl_witness: = impl_witness %NonInstance3.impl_witness_table [concrete = constants.%NonInstance3.impl_witness] // CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [concrete = constants.%NonInstanceCallIndirect] { // CHECK:STDOUT: %p.patt: %ptr = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, call_param0 @@ -586,7 +589,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F3 = %F3.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%NonInstance3.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F3.1(@NonInstance3.%Self: %NonInstance3.type) { @@ -662,13 +665,13 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Instance1.assoc_type: type = assoc_entity_type @Instance1 [concrete] // CHECK:STDOUT: %assoc0: %Instance1.assoc_type = assoc_entity element0, @Instance1.%G1.decl [concrete] // CHECK:STDOUT: %struct_type.d: type = struct_type {.d: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%G1.decl) [concrete] +// CHECK:STDOUT: %Instance1.impl_witness: = impl_witness file.%Instance1.impl_witness_table [concrete] // CHECK:STDOUT: %G1.type.c50: type = fn_type @G1.2 [concrete] // CHECK:STDOUT: %G1.fee: %G1.type.c50 = struct_value () [concrete] -// CHECK:STDOUT: %Instance1.facet: %Instance1.type = facet_value %struct_type.d, (%impl_witness) [concrete] +// CHECK:STDOUT: %Instance1.facet: %Instance1.type = facet_value %struct_type.d, (%Instance1.impl_witness) [concrete] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [concrete] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [concrete] -// CHECK:STDOUT: %.dfe: type = fn_type_with_self_type %G1.type.cde, %Instance1.facet [concrete] +// CHECK:STDOUT: %.d09: type = fn_type_with_self_type %G1.type.cde, %Instance1.facet [concrete] // CHECK:STDOUT: %ptr: type = ptr_type %struct_type.d [concrete] // CHECK:STDOUT: %InstanceCallIndirect.type: type = fn_type @InstanceCallIndirect [concrete] // CHECK:STDOUT: %InstanceCallIndirect: %InstanceCallIndirect.type = struct_value () [concrete] @@ -689,7 +692,8 @@ fn InstanceCallFail() { // CHECK:STDOUT: %struct_type.d: type = struct_type {.d: %empty_tuple.type} [concrete = constants.%struct_type.d] // CHECK:STDOUT: %Instance1.ref: type = name_ref Instance1, file.%Instance1.decl [concrete = constants.%Instance1.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%G1.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Instance1.impl_witness_table = impl_witness_table (@impl.%G1.decl), @impl [concrete] +// CHECK:STDOUT: %Instance1.impl_witness: = impl_witness %Instance1.impl_witness_table [concrete = constants.%Instance1.impl_witness] // CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [concrete = constants.%InstanceCall] { // CHECK:STDOUT: %n.patt: %struct_type.d = binding_pattern n // CHECK:STDOUT: %n.param_patt: %struct_type.d = value_param_pattern %n.patt, call_param0 @@ -751,7 +755,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G1 = %G1.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Instance1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G1.1(@Instance1.%Self: %Instance1.type) { @@ -771,7 +775,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: %n.ref: %struct_type.d = name_ref n, %n // CHECK:STDOUT: %Instance1.ref: type = name_ref Instance1, file.%Instance1.decl [concrete = constants.%Instance1.type] // CHECK:STDOUT: %G1.ref: %Instance1.assoc_type = name_ref G1, @Instance1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.dfe = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%G1.fee] +// CHECK:STDOUT: %impl.elem0: %.d09 = impl_witness_access constants.%Instance1.impl_witness, element0 [concrete = constants.%G1.fee] // CHECK:STDOUT: %bound_method: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %G1.call: init %empty_tuple.type = call %bound_method(%n.ref) // CHECK:STDOUT: return @@ -783,7 +787,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Instance1.ref: type = name_ref Instance1, file.%Instance1.decl [concrete = constants.%Instance1.type] // CHECK:STDOUT: %G1.ref: %Instance1.assoc_type = name_ref G1, @Instance1.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.loc16_4.1: ref %struct_type.d = deref %p.ref -// CHECK:STDOUT: %impl.elem0: %.dfe = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%G1.fee] +// CHECK:STDOUT: %impl.elem0: %.d09 = impl_witness_access constants.%Instance1.impl_witness, element0 [concrete = constants.%G1.fee] // CHECK:STDOUT: %bound_method: = bound_method %.loc16_4.1, %impl.elem0 // CHECK:STDOUT: %.loc16_4.2: ref %empty_tuple.type = struct_access %.loc16_4.1, element0 // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] @@ -816,10 +820,10 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Instance2.assoc_type: type = assoc_entity_type @Instance2 [concrete] // CHECK:STDOUT: %assoc0: %Instance2.assoc_type = assoc_entity element0, @Instance2.%G2.decl [concrete] // CHECK:STDOUT: %struct_type.e: type = struct_type {.e: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%G2.decl) [concrete] +// CHECK:STDOUT: %Instance2.impl_witness: = impl_witness file.%Instance2.impl_witness_table [concrete] // CHECK:STDOUT: %G2.type.50c: type = fn_type @G2.2 [concrete] // CHECK:STDOUT: %G2.707: %G2.type.50c = struct_value () [concrete] -// CHECK:STDOUT: %Instance2.facet: %Instance2.type = facet_value %struct_type.e, (%impl_witness) [concrete] +// CHECK:STDOUT: %Instance2.facet: %Instance2.type = facet_value %struct_type.e, (%Instance2.impl_witness) [concrete] // CHECK:STDOUT: %InstanceCallFail.type: type = fn_type @InstanceCallFail [concrete] // CHECK:STDOUT: %InstanceCallFail: %InstanceCallFail.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -836,7 +840,8 @@ fn InstanceCallFail() { // CHECK:STDOUT: %struct_type.e: type = struct_type {.e: %empty_tuple.type} [concrete = constants.%struct_type.e] // CHECK:STDOUT: %Instance2.ref: type = name_ref Instance2, file.%Instance2.decl [concrete = constants.%Instance2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%G2.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Instance2.impl_witness_table = impl_witness_table (@impl.%G2.decl), @impl [concrete] +// CHECK:STDOUT: %Instance2.impl_witness: = impl_witness %Instance2.impl_witness_table [concrete = constants.%Instance2.impl_witness] // CHECK:STDOUT: %InstanceCallFail.decl: %InstanceCallFail.type = fn_decl @InstanceCallFail [concrete = constants.%InstanceCallFail] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -874,7 +879,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G2 = %G2.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Instance2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G2.1(@Instance2.%Self: %Instance2.type) { diff --git a/toolchain/check/testdata/impl/no_prelude/error_recovery.carbon b/toolchain/check/testdata/impl/no_prelude/error_recovery.carbon index 4fdf819c3fc6..3fcd2646f303 100644 --- a/toolchain/check/testdata/impl/no_prelude/error_recovery.carbon +++ b/toolchain/check/testdata/impl/no_prelude/error_recovery.carbon @@ -27,7 +27,7 @@ impl forall [T: type] C as I { } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,7 +41,8 @@ impl forall [T: type] C as I { } // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -54,7 +55,7 @@ impl forall [T: type] C as I { } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon index 0b800b7248e9..3a9af76470a7 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon @@ -33,7 +33,8 @@ impl AC as AI {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.215123.1: = impl_witness file.%I.impl_witness_table.loc17 [concrete] +// CHECK:STDOUT: %I.impl_witness.215123.2: = impl_witness file.%I.impl_witness_table.loc26 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,12 +54,14 @@ impl AC as AI {} // CHECK:STDOUT: %AC.ref: type = name_ref AC, file.%AC [concrete = constants.%C] // CHECK:STDOUT: %AI.ref: type = name_ref AI, file.%AI [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table.loc17 = impl_witness_table (), @impl.7704ae.1 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc17: = impl_witness %I.impl_witness_table.loc17 [concrete = constants.%I.impl_witness.215123.1] // CHECK:STDOUT: impl_decl @impl.7704ae.2 [concrete] {} { // CHECK:STDOUT: %AC.ref: type = name_ref AC, file.%AC [concrete = constants.%C] // CHECK:STDOUT: %AI.ref: type = name_ref AI, file.%AI [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc26: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table.loc26 = impl_witness_table (), @impl.7704ae.2 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc26: = impl_witness %I.impl_witness_table.loc26 [concrete = constants.%I.impl_witness.215123.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -71,12 +74,12 @@ impl AC as AI {} // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.7704ae.1: %AC.ref as %AI.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.7704ae.2: %AC.ref as %AI.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc26 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc26 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/impl/no_prelude/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/no_prelude/fail_extend_impl_scope.carbon index 686bcbcdf4db..6ad92d86af12 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_extend_impl_scope.carbon @@ -66,7 +66,7 @@ fn F() { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -79,7 +79,8 @@ fn F() { // CHECK:STDOUT: %.loc9_14.2: type = converted %.loc9_14.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -103,7 +104,7 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness @F.%J.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -135,7 +136,8 @@ fn F() { // CHECK:STDOUT: %.loc10_16.2: type = converted %.loc10_16.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -152,16 +154,16 @@ fn F() { // CHECK:STDOUT: %Zero.type.db4: type = fn_type @Zero.2, @impl.6b5(%Self) [symbolic] // CHECK:STDOUT: %Zero.8fb: %Zero.type.db4 = struct_value () [symbolic] // CHECK:STDOUT: %Point: type = class_type @Point [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.c94.%Zero.decl) [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness @Point.%Z.impl_witness_table [concrete] // CHECK:STDOUT: %Zero.type.e33: type = fn_type @Zero.3 [concrete] // CHECK:STDOUT: %Zero.dec: %Zero.type.e33 = struct_value () [concrete] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point, (%impl_witness) [concrete] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point, (%Z.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Point.val: %Point = struct_value () [concrete] -// CHECK:STDOUT: %.728: type = fn_type_with_self_type %Zero.type.822, %Z.facet [concrete] +// CHECK:STDOUT: %.766: type = fn_type_with_self_type %Zero.type.822, %Z.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -211,7 +213,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Zero.decl -// CHECK:STDOUT: witness = @Point.%impl_witness +// CHECK:STDOUT: witness = @Point.%Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Point { @@ -219,7 +221,8 @@ fn F() { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Point [concrete = constants.%Point] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.c94.%Zero.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (@impl.c94.%Zero.decl), @impl.c94 [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table [concrete = constants.%Z.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -258,7 +261,7 @@ fn F() { // CHECK:STDOUT: %.loc25_5.4: ref %Point = temporary %.loc25_5.2, %.loc25_5.3 // CHECK:STDOUT: %.loc25_7: ref %Point = converted %.loc25_5.1, %.loc25_5.4 // CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.728 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Zero.dec] +// CHECK:STDOUT: %impl.elem0: %.766 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Zero.dec] // CHECK:STDOUT: %Zero.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/no_prelude/fail_impl_as_scope.carbon index ae7416c07f9f..4c8c5fc425f1 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_impl_as_scope.carbon @@ -219,19 +219,19 @@ class X { // CHECK:STDOUT: %Method.84d: %Method.type.163 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic] // CHECK:STDOUT: %Point: type = class_type @Point [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.c94.%Zero.decl, @impl.c94.%Method.decl) [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness @Point.%Z.impl_witness_table [concrete] // CHECK:STDOUT: %Zero.type.e33: type = fn_type @Zero.3 [concrete] // CHECK:STDOUT: %Zero.dec: %Zero.type.e33 = struct_value () [concrete] // CHECK:STDOUT: %Method.type.2ed: type = fn_type @Method.3 [concrete] // CHECK:STDOUT: %Method.2c2: %Method.type.2ed = struct_value () [concrete] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point, (%impl_witness) [concrete] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point, (%Z.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %.071: type = fn_type_with_self_type %Zero.type.822, %Z.facet [concrete] +// CHECK:STDOUT: %.d52: type = fn_type_with_self_type %Zero.type.822, %Z.facet [concrete] // CHECK:STDOUT: %Point.val: %Point = struct_value () [concrete] -// CHECK:STDOUT: %.2c0: type = fn_type_with_self_type %Method.type.f12, %Z.facet [concrete] +// CHECK:STDOUT: %.462: type = fn_type_with_self_type %Method.type.f12, %Z.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -319,7 +319,7 @@ class X { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Zero.decl // CHECK:STDOUT: .Method = %Method.decl -// CHECK:STDOUT: witness = @Point.%impl_witness +// CHECK:STDOUT: witness = @Point.%Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Point { @@ -327,7 +327,8 @@ class X { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Point [concrete = constants.%Point] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.c94.%Zero.decl, @impl.c94.%Method.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (@impl.c94.%Zero.decl, @impl.c94.%Method.decl), @impl.c94 [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table [concrete = constants.%Z.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -385,10 +386,10 @@ class X { // CHECK:STDOUT: %Point.ref.loc28: type = name_ref Point, file.%Point.decl [concrete = constants.%Point] // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%Point, (constants.%impl_witness) [concrete = constants.%Z.facet] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%Point, (constants.%Z.impl_witness) [concrete = constants.%Z.facet] // CHECK:STDOUT: %.loc28: %Z.type = converted %Point.ref.loc28, %Z.facet [concrete = constants.%Z.facet] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc28, element0 [concrete = constants.%impl_witness] -// CHECK:STDOUT: %impl.elem0: %.071 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%Zero.dec] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc28, element0 [concrete = constants.%Z.impl_witness] +// CHECK:STDOUT: %impl.elem0: %.d52 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%Zero.dec] // CHECK:STDOUT: %Zero.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: %.loc29_5.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %Point.ref.loc29: type = name_ref Point, file.%Point.decl [concrete = constants.%Point] @@ -398,7 +399,7 @@ class X { // CHECK:STDOUT: %.loc29_7.1: ref %Point = converted %.loc29_5.1, %.loc29_5.4 // CHECK:STDOUT: %Z.ref.loc29: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %Method.ref: %Z.assoc_type = name_ref Method, @Z.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1: %.2c0 = impl_witness_access constants.%impl_witness, element1 [concrete = constants.%Method.2c2] +// CHECK:STDOUT: %impl.elem1: %.462 = impl_witness_access constants.%Z.impl_witness, element1 [concrete = constants.%Method.2c2] // CHECK:STDOUT: %bound_method: = bound_method %.loc29_7.1, %impl.elem1 // CHECK:STDOUT: %.loc29_7.2: %Point = bind_value %.loc29_7.1 // CHECK:STDOUT: %Method.call: init %empty_tuple.type = call %bound_method(%.loc29_7.2) @@ -452,10 +453,10 @@ class X { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.3b4.%B.decl) [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness @X.%A.impl_witness_table [concrete] // CHECK:STDOUT: %B.type.d47: type = fn_type @B.2 [concrete] // CHECK:STDOUT: %B.4af: %B.type.d47 = struct_value () [concrete] -// CHECK:STDOUT: %A.facet: %A.type = facet_value %X, (%impl_witness) [concrete] +// CHECK:STDOUT: %A.facet: %A.type = facet_value %X, (%A.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } @@ -503,7 +504,7 @@ class X { // CHECK:STDOUT: .C = // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .G = -// CHECK:STDOUT: witness = @X.%impl_witness +// CHECK:STDOUT: witness = @X.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4cc: %Self.ref as %C.ref { @@ -516,7 +517,8 @@ class X { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X [concrete = constants.%X] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.3b4.%B.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@impl.3b4.%B.decl), @impl.3b4 [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_assoc_const.carbon b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_assoc_const.carbon index a9ebf9b351a4..f64058dc503b 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_assoc_const.carbon @@ -27,7 +27,7 @@ impl () as I {} // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,7 +40,8 @@ impl () as I {} // CHECK:STDOUT: %.loc20_7.2: type = converted %.loc20_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -61,7 +62,7 @@ impl () as I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc20_7.2 as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%Self) {} diff --git a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon index dbd1421a780b..073315d3bba5 100644 --- a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon @@ -105,19 +105,19 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.826: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.3ad: %I.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type.b70: type = facet_access_type %T.826 [symbolic] -// CHECK:STDOUT: %impl_witness.d14: = impl_witness (), @impl.c3d(%T.826) [symbolic] +// CHECK:STDOUT: %Interface.impl_witness.a14: = impl_witness file.%Interface.impl_witness_table.loc11, @impl.c3d(%T.826) [symbolic] // CHECK:STDOUT: %T.ccd: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.371: %J.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type.3df: type = facet_access_type %T.ccd [symbolic] -// CHECK:STDOUT: %impl_witness.d94: = impl_witness (), @impl.793(%T.ccd) [symbolic] +// CHECK:STDOUT: %Interface.impl_witness.608: = impl_witness file.%Interface.impl_witness_table.loc12, @impl.793(%T.ccd) [symbolic] // CHECK:STDOUT: %T.09f: %K.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.036: %K.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type.037: type = facet_access_type %T.09f [symbolic] -// CHECK:STDOUT: %impl_witness.8aa: = impl_witness (), @impl.c93(%T.09f) [symbolic] +// CHECK:STDOUT: %Interface.impl_witness.b9e: = impl_witness file.%Interface.impl_witness_table.loc13, @impl.c93(%T.09f) [symbolic] // CHECK:STDOUT: %T.1d2: %L.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.29d: %L.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type.0ed: type = facet_access_type %T.1d2 [symbolic] -// CHECK:STDOUT: %impl_witness.da5: = impl_witness (), @impl.9e6(%T.1d2) [symbolic] +// CHECK:STDOUT: %Interface.impl_witness.e9d: = impl_witness file.%Interface.impl_witness_table.loc14, @impl.9e6(%T.1d2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -143,7 +143,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %I.ref.loc11: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %T.loc11_14.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T.826)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc11: = impl_witness (), @impl.c3d(constants.%T.826) [symbolic = @impl.c3d.%impl_witness (constants.%impl_witness.d14)] +// CHECK:STDOUT: %Interface.impl_witness_table.loc11 = impl_witness_table (), @impl.c3d [concrete] +// CHECK:STDOUT: %Interface.impl_witness.loc11: = impl_witness %Interface.impl_witness_table.loc11, @impl.c3d(constants.%T.826) [symbolic = @impl.c3d.%Interface.impl_witness (constants.%Interface.impl_witness.a14)] // CHECK:STDOUT: impl_decl @impl.793 [concrete] { // CHECK:STDOUT: %T.patt.loc12_14.1: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.371)] // CHECK:STDOUT: } { @@ -154,7 +155,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %J.ref.loc12: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %T.loc12_14.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.ccd)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc12: = impl_witness (), @impl.793(constants.%T.ccd) [symbolic = @impl.793.%impl_witness (constants.%impl_witness.d94)] +// CHECK:STDOUT: %Interface.impl_witness_table.loc12 = impl_witness_table (), @impl.793 [concrete] +// CHECK:STDOUT: %Interface.impl_witness.loc12: = impl_witness %Interface.impl_witness_table.loc12, @impl.793(constants.%T.ccd) [symbolic = @impl.793.%Interface.impl_witness (constants.%Interface.impl_witness.608)] // CHECK:STDOUT: impl_decl @impl.c93 [concrete] { // CHECK:STDOUT: %T.patt.loc13_14.1: %K.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_14.2 (constants.%T.patt.036)] // CHECK:STDOUT: } { @@ -165,7 +167,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %K.ref.loc13: type = name_ref K, file.%K.decl [concrete = constants.%K.type] // CHECK:STDOUT: %T.loc13_14.1: %K.type = bind_symbolic_name T, 0 [symbolic = %T.loc13_14.2 (constants.%T.09f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc13: = impl_witness (), @impl.c93(constants.%T.09f) [symbolic = @impl.c93.%impl_witness (constants.%impl_witness.8aa)] +// CHECK:STDOUT: %Interface.impl_witness_table.loc13 = impl_witness_table (), @impl.c93 [concrete] +// CHECK:STDOUT: %Interface.impl_witness.loc13: = impl_witness %Interface.impl_witness_table.loc13, @impl.c93(constants.%T.09f) [symbolic = @impl.c93.%Interface.impl_witness (constants.%Interface.impl_witness.b9e)] // CHECK:STDOUT: impl_decl @impl.9e6 [concrete] { // CHECK:STDOUT: %T.patt.loc14_14.1: %L.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt.29d)] // CHECK:STDOUT: } { @@ -176,7 +179,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %L.ref.loc14: type = name_ref L, file.%L.decl [concrete = constants.%L.type] // CHECK:STDOUT: %T.loc14_14.1: %L.type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T.1d2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc14: = impl_witness (), @impl.9e6(constants.%T.1d2) [symbolic = @impl.9e6.%impl_witness (constants.%impl_witness.da5)] +// CHECK:STDOUT: %Interface.impl_witness_table.loc14 = impl_witness_table (), @impl.9e6 [concrete] +// CHECK:STDOUT: %Interface.impl_witness.loc14: = impl_witness %Interface.impl_witness_table.loc14, @impl.9e6(constants.%T.1d2) [symbolic = @impl.9e6.%Interface.impl_witness (constants.%Interface.impl_witness.e9d)] // CHECK:STDOUT: impl_decl @impl.c3d [concrete] { // CHECK:STDOUT: %T.patt.loc11_14.1: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt.3ad)] // CHECK:STDOUT: } { @@ -263,13 +267,13 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc11_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T.826)] // CHECK:STDOUT: %T.patt.loc11_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt.3ad)] // CHECK:STDOUT: %T.as_type.loc11_21.2: type = facet_access_type %T.loc11_14.2 [symbolic = %T.as_type.loc11_21.2 (constants.%T.as_type.b70)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.c3d(%T.loc11_14.2) [symbolic = %impl_witness (constants.%impl_witness.d14)] +// CHECK:STDOUT: %Interface.impl_witness: = impl_witness file.%Interface.impl_witness_table.loc11, @impl.c3d(%T.loc11_14.2) [symbolic = %Interface.impl_witness (constants.%Interface.impl_witness.a14)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc11 as %Interface.ref.loc11 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc11 +// CHECK:STDOUT: witness = file.%Interface.impl_witness.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -277,13 +281,13 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc12_14.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.ccd)] // CHECK:STDOUT: %T.patt.loc12_14.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.371)] // CHECK:STDOUT: %T.as_type.loc12_21.2: type = facet_access_type %T.loc12_14.2 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.3df)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.793(%T.loc12_14.2) [symbolic = %impl_witness (constants.%impl_witness.d94)] +// CHECK:STDOUT: %Interface.impl_witness: = impl_witness file.%Interface.impl_witness_table.loc12, @impl.793(%T.loc12_14.2) [symbolic = %Interface.impl_witness (constants.%Interface.impl_witness.608)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc12 as %Interface.ref.loc12 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc12 +// CHECK:STDOUT: witness = file.%Interface.impl_witness.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -291,13 +295,13 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc13_14.2: %K.type = bind_symbolic_name T, 0 [symbolic = %T.loc13_14.2 (constants.%T.09f)] // CHECK:STDOUT: %T.patt.loc13_14.2: %K.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_14.2 (constants.%T.patt.036)] // CHECK:STDOUT: %T.as_type.loc13_21.2: type = facet_access_type %T.loc13_14.2 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.037)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.c93(%T.loc13_14.2) [symbolic = %impl_witness (constants.%impl_witness.8aa)] +// CHECK:STDOUT: %Interface.impl_witness: = impl_witness file.%Interface.impl_witness_table.loc13, @impl.c93(%T.loc13_14.2) [symbolic = %Interface.impl_witness (constants.%Interface.impl_witness.b9e)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc13 as %Interface.ref.loc13 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc13 +// CHECK:STDOUT: witness = file.%Interface.impl_witness.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,13 +309,13 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc14_14.2: %L.type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T.1d2)] // CHECK:STDOUT: %T.patt.loc14_14.2: %L.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt.29d)] // CHECK:STDOUT: %T.as_type.loc14_21.2: type = facet_access_type %T.loc14_14.2 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.0ed)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.9e6(%T.loc14_14.2) [symbolic = %impl_witness (constants.%impl_witness.da5)] +// CHECK:STDOUT: %Interface.impl_witness: = impl_witness file.%Interface.impl_witness_table.loc14, @impl.9e6(%T.loc14_14.2) [symbolic = %Interface.impl_witness (constants.%Interface.impl_witness.e9d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc14 as %Interface.ref.loc14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc14 +// CHECK:STDOUT: witness = file.%Interface.impl_witness.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -319,7 +323,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc11_14.2 => constants.%T.826 // CHECK:STDOUT: %T.patt.loc11_14.2 => constants.%T.patt.3ad // CHECK:STDOUT: %T.as_type.loc11_21.2 => constants.%T.as_type.b70 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.d14 +// CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.a14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.c3d(%T.loc11_14.2) {} @@ -328,7 +332,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc12_14.2 => constants.%T.ccd // CHECK:STDOUT: %T.patt.loc12_14.2 => constants.%T.patt.371 // CHECK:STDOUT: %T.as_type.loc12_21.2 => constants.%T.as_type.3df -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.d94 +// CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.608 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.793(%T.loc12_14.2) {} @@ -337,7 +341,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc13_14.2 => constants.%T.09f // CHECK:STDOUT: %T.patt.loc13_14.2 => constants.%T.patt.036 // CHECK:STDOUT: %T.as_type.loc13_21.2 => constants.%T.as_type.037 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.8aa +// CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.b9e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.c93(%T.loc13_14.2) {} @@ -346,7 +350,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc14_14.2 => constants.%T.1d2 // CHECK:STDOUT: %T.patt.loc14_14.2 => constants.%T.patt.29d // CHECK:STDOUT: %T.as_type.loc14_21.2 => constants.%T.as_type.0ed -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.da5 +// CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.e9d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.9e6(%T.loc14_14.2) {} @@ -361,8 +365,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %impl_witness.1896b7.1: = impl_witness (), @impl.bfd509.1(%T) [symbolic] -// CHECK:STDOUT: %impl_witness.1896b7.2: = impl_witness (), @impl.bfd509.2(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness.a529f4.1: = impl_witness file.%J.impl_witness_table.loc7, @impl.bfd509.1(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness.a529f4.2: = impl_witness file.%J.impl_witness_table.loc15, @impl.bfd509.2(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -382,7 +386,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %T.loc7_14.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc7: = impl_witness (), @impl.bfd509.1(constants.%T) [symbolic = @impl.bfd509.1.%impl_witness (constants.%impl_witness.1896b7.1)] +// CHECK:STDOUT: %J.impl_witness_table.loc7 = impl_witness_table (), @impl.bfd509.1 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc7: = impl_witness %J.impl_witness_table.loc7, @impl.bfd509.1(constants.%T) [symbolic = @impl.bfd509.1.%J.impl_witness (constants.%J.impl_witness.a529f4.1)] // CHECK:STDOUT: impl_decl @impl.bfd509.2 [concrete] { // CHECK:STDOUT: %T.patt.loc15_14.1: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -393,7 +398,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %T.loc15_14.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness (), @impl.bfd509.2(constants.%T) [symbolic = @impl.bfd509.2.%impl_witness (constants.%impl_witness.1896b7.2)] +// CHECK:STDOUT: %J.impl_witness_table.loc15 = impl_witness_table (), @impl.bfd509.2 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc15: = impl_witness %J.impl_witness_table.loc15, @impl.bfd509.2(constants.%T) [symbolic = @impl.bfd509.2.%J.impl_witness (constants.%J.impl_witness.a529f4.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -416,13 +422,13 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc7_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.as_type.loc7_21.2: type = facet_access_type %T.loc7_14.2 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.bfd509.1(%T.loc7_14.2) [symbolic = %impl_witness (constants.%impl_witness.1896b7.1)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table.loc7, @impl.bfd509.1(%T.loc7_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.a529f4.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc7 as %J.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc7 +// CHECK:STDOUT: witness = file.%J.impl_witness.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -430,13 +436,13 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc15_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc15_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.as_type.loc15_21.2: type = facet_access_type %T.loc15_14.2 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.bfd509.2(%T.loc15_14.2) [symbolic = %impl_witness (constants.%impl_witness.1896b7.2)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table.loc15, @impl.bfd509.2(%T.loc15_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.a529f4.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc15 as %J.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc15 +// CHECK:STDOUT: witness = file.%J.impl_witness.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -444,7 +450,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc7_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T.patt // CHECK:STDOUT: %T.as_type.loc7_21.2 => constants.%T.as_type -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.1896b7.1 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.a529f4.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.bfd509.1(%T.loc7_14.2) {} @@ -453,7 +459,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.loc15_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc15_14.2 => constants.%T.patt // CHECK:STDOUT: %T.as_type.loc15_21.2 => constants.%T.as_type -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.1896b7.2 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.a529f4.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.bfd509.2(%T.loc15_14.2) {} @@ -464,10 +470,11 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.215123.1: = impl_witness file.%I.impl_witness_table.loc13 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%C, %C) [concrete] +// CHECK:STDOUT: %I.impl_witness.215123.2: = impl_witness file.%I.impl_witness_table.loc14 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -481,7 +488,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc13: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table.loc13 = impl_witness_table (), @impl.7704ae.1 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc13: = impl_witness %I.impl_witness_table.loc13 [concrete = constants.%I.impl_witness.215123.1] // CHECK:STDOUT: impl_decl @impl.7704ae.2 [concrete] {} { // CHECK:STDOUT: %C.ref.loc14_7: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc14_10: type = name_ref C, file.%C.decl [concrete = constants.%C] @@ -492,7 +500,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %tuple.elem0: type = tuple_access %.loc14_11.2, element0 [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc14: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table.loc14 = impl_witness_table (), @impl.7704ae.2 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc14: = impl_witness %I.impl_witness_table.loc14 [concrete = constants.%I.impl_witness.215123.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -505,12 +514,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.7704ae.1: %C.ref as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc13 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.7704ae.2: %tuple.elem0 as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc14 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C; @@ -522,11 +531,11 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.1f09a1.1: = impl_witness (), @impl.2caff2.1(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.dad390.1: = impl_witness file.%I.impl_witness_table.loc4, @impl.2caff2.1(%T) [symbolic] // CHECK:STDOUT: %A.type: type = fn_type @A, @impl.2caff2.1(%T) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A: %A.type = struct_value () [symbolic] -// CHECK:STDOUT: %impl_witness.1f09a1.2: = impl_witness (), @impl.2caff2.2(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.dad390.2: = impl_witness file.%I.impl_witness_table.loc15, @impl.2caff2.2(%T) [symbolic] // CHECK:STDOUT: %B.type: type = fn_type @B, @impl.2caff2.2(%T) [symbolic] // CHECK:STDOUT: %B: %B.type = struct_value () [symbolic] // CHECK:STDOUT: %C.type: type = fn_type @C, @impl.2caff2.2(%T) [symbolic] @@ -549,7 +558,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %T.loc4_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc4: = impl_witness (), @impl.2caff2.1(constants.%T) [symbolic = @impl.2caff2.1.%impl_witness (constants.%impl_witness.1f09a1.1)] +// CHECK:STDOUT: %I.impl_witness_table.loc4 = impl_witness_table (), @impl.2caff2.1 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc4: = impl_witness %I.impl_witness_table.loc4, @impl.2caff2.1(constants.%T) [symbolic = @impl.2caff2.1.%I.impl_witness (constants.%I.impl_witness.dad390.1)] // CHECK:STDOUT: impl_decl @impl.2caff2.2 [concrete] { // CHECK:STDOUT: %T.patt.loc15_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -557,7 +567,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %T.loc15_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness (), @impl.2caff2.2(constants.%T) [symbolic = @impl.2caff2.2.%impl_witness (constants.%impl_witness.1f09a1.2)] +// CHECK:STDOUT: %I.impl_witness_table.loc15 = impl_witness_table (), @impl.2caff2.2 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc15: = impl_witness %I.impl_witness_table.loc15, @impl.2caff2.2(constants.%T) [symbolic = @impl.2caff2.2.%I.impl_witness (constants.%I.impl_witness.dad390.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -571,7 +582,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: generic impl @impl.2caff2.1(%T.loc4_14.1: type) { // CHECK:STDOUT: %T.loc4_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.2caff2.1(%T.loc4_14.2) [symbolic = %impl_witness (constants.%impl_witness.1f09a1.1)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table.loc4, @impl.2caff2.1(%T.loc4_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.dad390.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.type: type = fn_type @A, @impl.2caff2.1(%T.loc4_14.2) [symbolic = %A.type (constants.%A.type)] @@ -582,14 +593,14 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc4 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.2caff2.2(%T.loc15_14.1: type) { // CHECK:STDOUT: %T.loc15_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc15_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.2caff2.2(%T.loc15_14.2) [symbolic = %impl_witness (constants.%impl_witness.1f09a1.2)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table.loc15, @impl.2caff2.2(%T.loc15_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.dad390.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %B.type: type = fn_type @B, @impl.2caff2.2(%T.loc15_14.2) [symbolic = %B.type (constants.%B.type)] @@ -624,7 +635,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .D = %D.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc15 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -682,7 +693,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: specific @impl.2caff2.1(constants.%T) { // CHECK:STDOUT: %T.loc4_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.1f09a1.1 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.dad390.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.type => constants.%A.type @@ -696,7 +707,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: specific @impl.2caff2.2(constants.%T) { // CHECK:STDOUT: %T.loc15_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc15_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.1f09a1.2 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.dad390.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %B.type => constants.%B.type diff --git a/toolchain/check/testdata/impl/no_prelude/impl_assoc_const.carbon b/toolchain/check/testdata/impl/no_prelude/impl_assoc_const.carbon index 9d9561fbf039..b76379994e94 100644 --- a/toolchain/check/testdata/impl/no_prelude/impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/no_prelude/impl_assoc_const.carbon @@ -189,7 +189,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -214,7 +214,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -236,7 +237,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc5_7.2 as %.loc5_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%Self) {} @@ -258,7 +259,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %I2_where.type: type = facet_type <@I2 where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I2.impl_witness: = impl_witness file.%I2.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -283,7 +284,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc5, %.loc5_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I2.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I2.impl_witness: = impl_witness %I2.impl_witness_table [concrete = constants.%I2.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %.loc6_7.1: %empty_tuple.type = tuple_literal () @@ -322,7 +324,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc5_7.2 as %.loc5_15 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T2(constants.%Self) {} @@ -337,7 +339,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I3.assoc_type: type = assoc_entity_type @I3 [concrete] // CHECK:STDOUT: %assoc0: %I3.assoc_type = assoc_entity element0, @I3.%T3 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %I3.impl_witness.c9d: = impl_witness file.%I3.impl_witness_table.loc9 [concrete] // CHECK:STDOUT: %.Self: %I3.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] // CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self, element0 [symbolic_self] @@ -345,7 +347,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %I3_where.type: type = facet_type <@I3 where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness.039: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I3.impl_witness.8b6: = impl_witness file.%I3.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -358,7 +360,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I3.ref: type = name_ref I3, file.%I3.decl [concrete = constants.%I3.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc9: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %I3.impl_witness_table.loc9 = impl_witness_table (), @impl.b46 [concrete] +// CHECK:STDOUT: %I3.impl_witness.loc9: = impl_witness %I3.impl_witness_table.loc9 [concrete = constants.%I3.impl_witness.c9d] // CHECK:STDOUT: impl_decl @impl.2b6 [concrete] {} { // CHECK:STDOUT: %.loc10_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -376,7 +379,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness.039] +// CHECK:STDOUT: %I3.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant), @impl.2b6 [concrete] +// CHECK:STDOUT: %I3.impl_witness.loc10: = impl_witness %I3.impl_witness_table.loc10 [concrete = constants.%I3.impl_witness.8b6] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -400,7 +404,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2b6: %.loc10_7.2 as %.loc10_15 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%I3.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T3(constants.%Self) {} @@ -422,9 +426,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %J_where.type.5f6: type = facet_type <@J where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness.039: = impl_witness (file.%impl_witness_assoc_constant.loc9) [concrete] +// CHECK:STDOUT: %J.impl_witness.54d: = impl_witness file.%J.impl_witness_table.loc9 [concrete] // CHECK:STDOUT: %J_where.type.143: type = facet_type <@J where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness.ae4: = impl_witness (file.%impl_witness_assoc_constant.loc10) [concrete] +// CHECK:STDOUT: %J.impl_witness.4f1: = impl_witness file.%J.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -449,7 +453,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc9: = impl_witness (%impl_witness_assoc_constant.loc9) [concrete = constants.%impl_witness.039] +// CHECK:STDOUT: %J.impl_witness_table.loc9 = impl_witness_table (%impl_witness_assoc_constant.loc9), @impl.8c7 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc9: = impl_witness %J.impl_witness_table.loc9 [concrete = constants.%J.impl_witness.54d] // CHECK:STDOUT: %impl_witness_assoc_constant.loc9: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: impl_decl @impl.6a8 [concrete] {} { // CHECK:STDOUT: %.loc10_7.1: %empty_tuple.type = tuple_literal () @@ -468,7 +473,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (%impl_witness_assoc_constant.loc10) [concrete = constants.%impl_witness.ae4] +// CHECK:STDOUT: %J.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @impl.6a8 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc10: = impl_witness %J.impl_witness_table.loc10 [concrete = constants.%J.impl_witness.4f1] // CHECK:STDOUT: %impl_witness_assoc_constant.loc10: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -492,7 +498,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.6a8: %.loc10_7.2 as %.loc10_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%J.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self) {} @@ -666,8 +672,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %K_where.type: type = facet_type <@K where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness.039: = impl_witness (file.%impl_witness_assoc_constant) [concrete] -// CHECK:STDOUT: %impl_witness.85b: = impl_witness () [concrete] +// CHECK:STDOUT: %K.impl_witness.812: = impl_witness file.%K.impl_witness_table.loc5 [concrete] +// CHECK:STDOUT: %K.impl_witness.3f0: = impl_witness file.%K.impl_witness_table.loc17 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -692,14 +698,16 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc5: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness.039] +// CHECK:STDOUT: %K.impl_witness_table.loc5 = impl_witness_table (%impl_witness_assoc_constant), @impl.a6a [concrete] +// CHECK:STDOUT: %K.impl_witness.loc5: = impl_witness %K.impl_witness_table.loc5 [concrete = constants.%K.impl_witness.812] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: impl_decl @impl.4b0 [concrete] {} { // CHECK:STDOUT: %.loc17_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc17_7.2: type = converted %.loc17_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [concrete = constants.%K.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness () [concrete = constants.%impl_witness.85b] +// CHECK:STDOUT: %K.impl_witness_table.loc17 = impl_witness_table (), @impl.4b0 [concrete] +// CHECK:STDOUT: %K.impl_witness.loc17: = impl_witness %K.impl_witness_table.loc17 [concrete = constants.%K.impl_witness.3f0] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @K { @@ -722,7 +730,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4b0: %.loc17_7.2 as %K.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%K.impl_witness.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @V(constants.%Self) {} @@ -744,7 +752,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %L_where.type: type = facet_type <@L where %impl.elem0 = %empty_tuple.type and %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %L.impl_witness: = impl_witness file.%L.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -778,7 +786,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc9_32, %.loc9_38.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %L.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %L.impl_witness: = impl_witness %L.impl_witness_table [concrete = constants.%L.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -800,7 +809,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc9_7.2 as %.loc9_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%L.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @W(constants.%Self) {} @@ -1042,7 +1051,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %M_where.type: type = facet_type <@M where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %M.impl_witness: = impl_witness file.%M.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1076,7 +1085,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc5_32, %.loc5_38.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %M.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %M.impl_witness: = impl_witness %M.impl_witness_table [concrete = constants.%M.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1098,7 +1108,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc5_7.2 as %.loc5_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%M.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%Self) {} @@ -1123,7 +1133,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.a.225 = struct_value (%empty_struct) [concrete] // CHECK:STDOUT: %N_where.type: type = facet_type <@N where %impl.elem0 = %struct> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %N.impl_witness: = impl_witness file.%N.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1152,7 +1162,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc7_33.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %N.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %N.impl_witness: = impl_witness %N.impl_witness_table [concrete = constants.%N.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.225 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1174,7 +1185,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc7_7.2 as %.loc7_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%N.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Y(constants.%Self) {} @@ -1201,10 +1212,10 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: %.bf5 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %IF_where.type: type = facet_type <@IF where %impl.elem0 = %int_0> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %IF.impl_witness: = impl_witness file.%IF.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.2b5: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.479: %F.type.2b5 = struct_value () [concrete] -// CHECK:STDOUT: %IF.facet.0db: %IF.type = facet_value %CD, (%impl_witness) [concrete] +// CHECK:STDOUT: %IF.facet.c94: %IF.type = facet_value %CD, (%IF.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1229,7 +1240,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %IF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %IF.impl_witness: = impl_witness %IF.impl_witness_table [concrete = constants.%IF.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @IF { @@ -1248,7 +1260,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%IF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @CD { @@ -1271,5 +1283,5 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%IF.facet.0db) {} +// CHECK:STDOUT: specific @F.1(constants.%IF.facet.c94) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon b/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon index d2bce3d6c539..efedaeb7ce4e 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon @@ -98,11 +98,11 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %iN.builtin: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %require_complete.f1b: = require_complete_type %iN.builtin [symbolic] // CHECK:STDOUT: %complete_type: = complete_type_witness %iN.builtin [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(%N) [symbolic] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table, @impl(%N) [symbolic] // CHECK:STDOUT: %Op.type.883: type = fn_type @Op.2, @impl(%N) [symbolic] // CHECK:STDOUT: %Op.8bc: %Op.type.883 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.fc7: = require_complete_type %MyInt [symbolic] -// CHECK:STDOUT: %Add.facet.c2b: %Add.type = facet_value %MyInt, (%impl_witness) [symbolic] +// CHECK:STDOUT: %Add.facet.0e5: %Add.type = facet_value %MyInt, (%Add.impl_witness) [symbolic] // CHECK:STDOUT: %Double.type: type = fn_type @Double [concrete] // CHECK:STDOUT: %Double: %Double.type = struct_value () [concrete] // CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %MyInt, @Add [symbolic] @@ -171,7 +171,8 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc15_14.1: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc15_14.2 (constants.%N)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(constants.%N) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table, @impl(constants.%N) [symbolic = @impl.%Add.impl_witness (constants.%Add.impl_witness)] // CHECK:STDOUT: %Double.decl: %Double.type = fn_decl @Double [concrete = constants.%Double] { // CHECK:STDOUT: %N.patt.loc19_11.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc19_11.2 (constants.%N.patt)] // CHECK:STDOUT: %x.patt: @Double.%MyInt.loc19_39.2 (%MyInt) = binding_pattern x @@ -243,7 +244,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %N.loc15_14.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc15_14.2 (constants.%N)] // CHECK:STDOUT: %N.patt.loc15_14.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc15_14.2 (constants.%N.patt)] // CHECK:STDOUT: %MyInt.loc15_39.2: type = class_type @MyInt, @MyInt(%N.loc15_14.2) [symbolic = %MyInt.loc15_39.2 (constants.%MyInt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%Op.decl), @impl(%N.loc15_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table, @impl(%N.loc15_14.2) [symbolic = %Add.impl_witness (constants.%Add.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%N.loc15_14.2) [symbolic = %Op.type (constants.%Op.type.883)] @@ -272,7 +273,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Add.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -375,7 +376,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %N.loc15_14.2 => constants.%N // CHECK:STDOUT: %N.patt.loc15_14.2 => constants.%N.patt // CHECK:STDOUT: %MyInt.loc15_39.2 => constants.%MyInt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %Add.impl_witness => constants.%Add.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.883 @@ -394,8 +395,8 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: // CHECK:STDOUT: specific @MyInt(@Op.2.%N) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%Add.facet.c2b) { -// CHECK:STDOUT: %Self => constants.%Add.facet.c2b +// CHECK:STDOUT: specific @Op.1(constants.%Add.facet.0e5) { +// CHECK:STDOUT: %Self => constants.%Add.facet.0e5 // CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%MyInt // CHECK:STDOUT: } // CHECK:STDOUT: @@ -437,16 +438,16 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, imports.%Main.import_ref.5a3 [concrete] // CHECK:STDOUT: %Op.type.31b: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %impl_witness.3a3: = impl_witness (imports.%Main.import_ref.19b), @impl(%N) [symbolic] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (imports.%Main.import_ref.19b), @impl [concrete] +// CHECK:STDOUT: %Add.impl_witness.e7c: = impl_witness %Add.impl_witness_table, @impl(%N) [symbolic] // CHECK:STDOUT: %Op.type.883: type = fn_type @Op.2, @impl(%N) [symbolic] // CHECK:STDOUT: %Op.8bc: %Op.type.883 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.fc7: = require_complete_type %MyInt.09f [symbolic] -// CHECK:STDOUT: %impl_witness.8d6: = impl_witness (imports.%Main.import_ref.19b), @impl(%int_64) [concrete] -// CHECK:STDOUT: %impl_witness.7e5: = impl_witness (imports.%Main.import_ref.464), @impl(%N) [symbolic] +// CHECK:STDOUT: %Add.impl_witness.976: = impl_witness %Add.impl_witness_table, @impl(%int_64) [concrete] // CHECK:STDOUT: %Op.type.5a6: type = fn_type @Op.2, @impl(%int_64) [concrete] // CHECK:STDOUT: %Op.cf9: %Op.type.5a6 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet.8db: %Add.type = facet_value %MyInt.f30, (%impl_witness.8d6) [concrete] -// CHECK:STDOUT: %.1ca: type = fn_type_with_self_type %Op.type.31b, %Add.facet.8db [concrete] +// CHECK:STDOUT: %Add.facet.434: %Add.type = facet_value %MyInt.f30, (%Add.impl_witness.976) [concrete] +// CHECK:STDOUT: %.39b: type = fn_type_with_self_type %Op.type.31b, %Add.facet.434 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.cf9, @Op.2(%int_64) [concrete] // CHECK:STDOUT: %CallImportedDouble.type: type = fn_type @CallImportedDouble [concrete] // CHECK:STDOUT: %CallImportedDouble: %CallImportedDouble.type = struct_value () [concrete] @@ -473,11 +474,10 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Main.import_ref.f99: %Add.assoc_type = import_ref Main//generic_impl, loc5_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Op = import_ref Main//generic_impl, Op, unloaded // CHECK:STDOUT: %Main.import_ref.e5e: %Add.type = import_ref Main//generic_impl, inst17 [no loc], loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %Main.import_ref.33b: = import_ref Main//generic_impl, loc15_48, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.7e5)] +// CHECK:STDOUT: %Main.import_ref.9fe: = import_ref Main//generic_impl, loc15_48, loaded [symbolic = @impl.%Add.impl_witness (constants.%Add.impl_witness.e7c)] // CHECK:STDOUT: %Main.import_ref.f1e294.2: Core.IntLiteral = import_ref Main//generic_impl, loc15_14, loaded [symbolic = @impl.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.719: type = import_ref Main//generic_impl, loc15_39, loaded [symbolic = @impl.%MyInt (constants.%MyInt.09f)] // CHECK:STDOUT: %Main.import_ref.bf0: type = import_ref Main//generic_impl, loc15_44, loaded [concrete = constants.%Add.type] -// CHECK:STDOUT: %Main.import_ref.19b: @impl.%Op.type (%Op.type.883) = import_ref Main//generic_impl, loc16_42, loaded [symbolic = @impl.%Op (constants.%Op.8bc)] // CHECK:STDOUT: %Main.import_ref.f1e294.3: Core.IntLiteral = import_ref Main//generic_impl, loc15_14, loaded [symbolic = @impl.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.f1e294.4: Core.IntLiteral = import_ref Main//generic_impl, loc19_11, loaded [symbolic = @Double.%N (constants.%N)] // CHECK:STDOUT: } @@ -544,7 +544,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)] // CHECK:STDOUT: %MyInt: type = class_type @MyInt, @MyInt(%N) [symbolic = %MyInt (constants.%MyInt.09f)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.19b), @impl(%N) [symbolic = %impl_witness (constants.%impl_witness.3a3)] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness constants.%Add.impl_witness_table, @impl(%N) [symbolic = %Add.impl_witness (constants.%Add.impl_witness.e7c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%N) [symbolic = %Op.type (constants.%Op.type.883)] @@ -553,7 +553,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.719 as imports.%Main.import_ref.bf0 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.33b +// CHECK:STDOUT: witness = imports.%Main.import_ref.9fe // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -579,7 +579,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %x.ref.loc9_10: %MyInt.f30 = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Main.Add [concrete = constants.%Add.type] // CHECK:STDOUT: %Op.ref: %Add.assoc_type = name_ref Op, imports.%Main.import_ref.f99 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.1ca = impl_witness_access constants.%impl_witness.8d6, element0 [concrete = constants.%Op.cf9] +// CHECK:STDOUT: %impl.elem0: %.39b = impl_witness_access constants.%Add.impl_witness.976, element0 [concrete = constants.%Op.cf9] // CHECK:STDOUT: %bound_method.loc9_11: = bound_method %x.ref.loc9_10, %impl.elem0 // CHECK:STDOUT: %x.ref.loc9_21: %MyInt.f30 = name_ref x, %x // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%int_64) [concrete = constants.%Op.specific_fn] @@ -662,7 +662,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %N => constants.%N // CHECK:STDOUT: %N.patt => constants.%N.patt // CHECK:STDOUT: %MyInt => constants.%MyInt.09f -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3a3 +// CHECK:STDOUT: %Add.impl_witness => constants.%Add.impl_witness.e7c // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.883 @@ -685,7 +685,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %N => constants.%int_64 // CHECK:STDOUT: %N.patt => constants.%N.patt // CHECK:STDOUT: %MyInt => constants.%MyInt.f30 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.8d6 +// CHECK:STDOUT: %Add.impl_witness => constants.%Add.impl_witness.976 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.5a6 @@ -722,15 +722,15 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.4a1 -// CHECK:STDOUT: %Add.lookup_impl_witness => constants.%impl_witness.8d6 -// CHECK:STDOUT: %Add.facet => constants.%Add.facet.8db -// CHECK:STDOUT: %.1 => constants.%.1ca +// CHECK:STDOUT: %Add.lookup_impl_witness => constants.%Add.impl_witness.976 +// CHECK:STDOUT: %Add.facet => constants.%Add.facet.434 +// CHECK:STDOUT: %.1 => constants.%.39b // CHECK:STDOUT: %impl.elem0 => constants.%Op.cf9 // CHECK:STDOUT: %specific_impl_fn => constants.%Op.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%Add.facet.8db) { -// CHECK:STDOUT: %Self => constants.%Add.facet.8db +// CHECK:STDOUT: specific @Op.1(constants.%Add.facet.434) { +// CHECK:STDOUT: %Self => constants.%Add.facet.434 // CHECK:STDOUT: %Self.as_type => constants.%MyInt.f30 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_compound.carbon b/toolchain/check/testdata/impl/no_prelude/import_compound.carbon index e90745cedc70..18909c705c5e 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_compound.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_compound.carbon @@ -209,10 +209,10 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %NonInstance.assoc_type: type = assoc_entity_type @NonInstance [concrete] // CHECK:STDOUT: %assoc0.525: %NonInstance.assoc_type = assoc_entity element0, @NonInstance.%F.decl [concrete] // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete] -// CHECK:STDOUT: %impl_witness.e97: = impl_witness (@impl.c58.%F.decl) [concrete] +// CHECK:STDOUT: %NonInstance.impl_witness: = impl_witness file.%NonInstance.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.042: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.db4: %F.type.042 = struct_value () [concrete] -// CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value %struct_type.i, (%impl_witness.e97) [concrete] +// CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value %struct_type.i, (%NonInstance.impl_witness) [concrete] // CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete] // CHECK:STDOUT: %Self.cf8: %Instance.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.cf8 [symbolic] @@ -220,10 +220,10 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %G.449: %G.type.1e1 = struct_value () [concrete] // CHECK:STDOUT: %Instance.assoc_type: type = assoc_entity_type @Instance [concrete] // CHECK:STDOUT: %assoc0.ab8: %Instance.assoc_type = assoc_entity element0, @Instance.%G.decl [concrete] -// CHECK:STDOUT: %impl_witness.114: = impl_witness (@impl.477.%G.decl) [concrete] +// CHECK:STDOUT: %Instance.impl_witness: = impl_witness file.%Instance.impl_witness_table [concrete] // CHECK:STDOUT: %G.type.0c0: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.484: %G.type.0c0 = struct_value () [concrete] -// CHECK:STDOUT: %Instance.facet: %Instance.type = facet_value %struct_type.i, (%impl_witness.114) [concrete] +// CHECK:STDOUT: %Instance.facet: %Instance.type = facet_value %struct_type.i, (%Instance.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -238,7 +238,8 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete = constants.%struct_type.i] // CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, file.%NonInstance.decl [concrete = constants.%NonInstance.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc7: = impl_witness (@impl.c58.%F.decl) [concrete = constants.%impl_witness.e97] +// CHECK:STDOUT: %NonInstance.impl_witness_table = impl_witness_table (@impl.c58.%F.decl), @impl.c58 [concrete] +// CHECK:STDOUT: %NonInstance.impl_witness: = impl_witness %NonInstance.impl_witness_table [concrete = constants.%NonInstance.impl_witness] // CHECK:STDOUT: %Instance.decl: type = interface_decl @Instance [concrete = constants.%Instance.type] {} {} // CHECK:STDOUT: impl_decl @impl.477 [concrete] {} { // CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () @@ -246,7 +247,8 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Instance.ref: type = name_ref Instance, file.%Instance.decl [concrete = constants.%Instance.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness (@impl.477.%G.decl) [concrete = constants.%impl_witness.114] +// CHECK:STDOUT: %Instance.impl_witness_table = impl_witness_table (@impl.477.%G.decl), @impl.477 [concrete] +// CHECK:STDOUT: %Instance.impl_witness: = impl_witness %Instance.impl_witness_table [concrete = constants.%Instance.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NonInstance { @@ -287,7 +289,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc7 +// CHECK:STDOUT: witness = file.%NonInstance.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.477: %struct_type.i as %Instance.ref { @@ -302,7 +304,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc15 +// CHECK:STDOUT: witness = file.%Instance.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@NonInstance.%Self: %NonInstance.type) { @@ -353,9 +355,10 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %assoc0: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.474 [concrete] // CHECK:STDOUT: %F.type.9e5: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.2d7) [concrete] -// CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value %struct_type.i, (%impl_witness) [concrete] -// CHECK:STDOUT: %.1bc: type = fn_type_with_self_type %F.type.9e5, %NonInstance.facet [concrete] +// CHECK:STDOUT: %NonInstance.impl_witness_table = impl_witness_table (imports.%Main.import_ref.2d7), @impl.c58 [concrete] +// CHECK:STDOUT: %NonInstance.impl_witness: = impl_witness %NonInstance.impl_witness_table [concrete] +// CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value %struct_type.i, (%NonInstance.impl_witness) [concrete] +// CHECK:STDOUT: %.923: type = fn_type_with_self_type %F.type.9e5, %NonInstance.facet [concrete] // CHECK:STDOUT: %F.type.042: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.db4: %F.type.042 = struct_value () [concrete] // CHECK:STDOUT: } @@ -367,13 +370,13 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Main.import_ref.e3c: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst17 [no loc], loaded [symbolic = constants.%Self.73c] -// CHECK:STDOUT: %Main.import_ref.826: = import_ref Main//lib, loc7_30, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Main.import_ref.a26: = import_ref Main//lib, loc7_30, loaded [concrete = constants.%NonInstance.impl_witness] // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst41 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded -// CHECK:STDOUT: %Main.import_ref.ab2 = import_ref Main//lib, loc15_27, unloaded +// CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.2: type = import_ref Main//lib, loc15_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.b49: type = import_ref Main//lib, loc15_18, loaded [concrete = constants.%Instance.type] // CHECK:STDOUT: } @@ -404,12 +407,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c58: imports.%Main.import_ref.c9a3b6.1 as imports.%Main.import_ref.ef5 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.826 +// CHECK:STDOUT: witness = imports.%Main.import_ref.a26 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.477: imports.%Main.import_ref.c9a3b6.2 as imports.%Main.import_ref.b49 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.ab2 +// CHECK:STDOUT: witness = imports.%Main.import_ref.a9f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NonInstanceCallImport() { @@ -419,10 +422,10 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete = constants.%struct_type.i] // CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, imports.%Main.NonInstance [concrete = constants.%NonInstance.type] // CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.e3c [concrete = constants.%assoc0] -// CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value constants.%struct_type.i, (constants.%impl_witness) [concrete = constants.%NonInstance.facet] +// CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value constants.%struct_type.i, (constants.%NonInstance.impl_witness) [concrete = constants.%NonInstance.facet] // CHECK:STDOUT: %.loc6_11: %NonInstance.type = converted %struct_type.i, %NonInstance.facet [concrete = constants.%NonInstance.facet] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc6_11, element0 [concrete = constants.%impl_witness] -// CHECK:STDOUT: %impl.elem0: %.1bc = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.db4] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc6_11, element0 [concrete = constants.%NonInstance.impl_witness] +// CHECK:STDOUT: %impl.elem0: %.923 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.db4] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -483,13 +486,13 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst26 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %Main.import_ref.112 = import_ref Main//lib, loc7_30, unloaded +// CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst41 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded -// CHECK:STDOUT: %Main.import_ref.ab2 = import_ref Main//lib, loc15_27, unloaded +// CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.2: type = import_ref Main//lib, loc15_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.b49: type = import_ref Main//lib, loc15_18, loaded [concrete = constants.%Instance.type] // CHECK:STDOUT: } @@ -553,12 +556,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c58: imports.%Main.import_ref.c9a3b6.1 as imports.%Main.import_ref.ef5 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.112 +// CHECK:STDOUT: witness = imports.%Main.import_ref.eb8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.477: imports.%Main.import_ref.c9a3b6.2 as imports.%Main.import_ref.b49 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.ab2 +// CHECK:STDOUT: witness = imports.%Main.import_ref.a9f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NonInstanceCallImportFail(%n.param_patt: %struct_type.i) { @@ -663,13 +666,13 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst26 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %Main.import_ref.112 = import_ref Main//lib, loc7_30, unloaded +// CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst41 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded -// CHECK:STDOUT: %Main.import_ref.ab2 = import_ref Main//lib, loc15_27, unloaded +// CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.2: type = import_ref Main//lib, loc15_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.b49: type = import_ref Main//lib, loc15_18, loaded [concrete = constants.%Instance.type] // CHECK:STDOUT: } @@ -734,12 +737,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c58: imports.%Main.import_ref.c9a3b6.1 as imports.%Main.import_ref.ef5 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.112 +// CHECK:STDOUT: witness = imports.%Main.import_ref.eb8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.477: imports.%Main.import_ref.c9a3b6.2 as imports.%Main.import_ref.b49 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.ab2 +// CHECK:STDOUT: witness = imports.%Main.import_ref.a9f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NonInstanceCallIndirectImport(%p.param_patt: %ptr) { @@ -810,9 +813,10 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %G.type.1e1: type = fn_type @G.1 [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.cf8 [symbolic] // CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.373) [concrete] -// CHECK:STDOUT: %Instance.facet: %Instance.type = facet_value %struct_type.i, (%impl_witness) [concrete] -// CHECK:STDOUT: %.59b: type = fn_type_with_self_type %G.type.1e1, %Instance.facet [concrete] +// CHECK:STDOUT: %Instance.impl_witness_table = impl_witness_table (imports.%Main.import_ref.373), @impl.477 [concrete] +// CHECK:STDOUT: %Instance.impl_witness: = impl_witness %Instance.impl_witness_table [concrete] +// CHECK:STDOUT: %Instance.facet: %Instance.type = facet_value %struct_type.i, (%Instance.impl_witness) [concrete] +// CHECK:STDOUT: %.efa: type = fn_type_with_self_type %G.type.1e1, %Instance.facet [concrete] // CHECK:STDOUT: %G.type.0c0: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.484: %G.type.0c0 = struct_value () [concrete] // CHECK:STDOUT: %ptr: type = ptr_type %struct_type.i [concrete] @@ -825,17 +829,17 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.NonInstance = import_ref Main//lib, NonInstance, unloaded // CHECK:STDOUT: %Main.Instance: type = import_ref Main//lib, Instance, loaded [concrete = constants.%Instance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst41 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded -// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst41 [no loc], loaded [symbolic = constants.%Self.cf8] +// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst42 [no loc], loaded [symbolic = constants.%Self.cf8] // CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded -// CHECK:STDOUT: %Main.import_ref.112 = import_ref Main//lib, loc7_30, unloaded +// CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.97c: = import_ref Main//lib, loc15_27, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Main.import_ref.97f: = import_ref Main//lib, loc15_27, loaded [concrete = constants.%Instance.impl_witness] // CHECK:STDOUT: %Main.import_ref.c9a3b6.2: type = import_ref Main//lib, loc15_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.b49: type = import_ref Main//lib, loc15_18, loaded [concrete = constants.%Instance.type] // CHECK:STDOUT: } @@ -891,12 +895,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c58: imports.%Main.import_ref.c9a3b6.1 as imports.%Main.import_ref.ef5 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.112 +// CHECK:STDOUT: witness = imports.%Main.import_ref.eb8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.477: imports.%Main.import_ref.c9a3b6.2 as imports.%Main.import_ref.b49 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.97c +// CHECK:STDOUT: witness = imports.%Main.import_ref.97f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @InstanceCallImport(%n.param_patt: %struct_type.i) { @@ -904,7 +908,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %n.ref: %struct_type.i = name_ref n, %n // CHECK:STDOUT: %Instance.ref: type = name_ref Instance, imports.%Main.Instance [concrete = constants.%Instance.type] // CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.124 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.59b = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%G.484] +// CHECK:STDOUT: %impl.elem0: %.efa = impl_witness_access constants.%Instance.impl_witness, element0 [concrete = constants.%G.484] // CHECK:STDOUT: %bound_method: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %bound_method(%n.ref) // CHECK:STDOUT: return @@ -925,7 +929,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Instance.ref: type = name_ref Instance, imports.%Main.Instance [concrete = constants.%Instance.type] // CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.124 [concrete = constants.%assoc0] // CHECK:STDOUT: %.loc10_4.1: ref %struct_type.i = deref %p.ref -// CHECK:STDOUT: %impl.elem0: %.59b = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%G.484] +// CHECK:STDOUT: %impl.elem0: %.efa = impl_witness_access constants.%Instance.impl_witness, element0 [concrete = constants.%G.484] // CHECK:STDOUT: %bound_method: = bound_method %.loc10_4.1, %impl.elem0 // CHECK:STDOUT: %.loc10_4.2: ref %empty_tuple.type = struct_access %.loc10_4.1, element0 // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] @@ -962,17 +966,17 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst41 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded -// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst41 [no loc], loaded [symbolic = constants.%Self.cf8] +// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst42 [no loc], loaded [symbolic = constants.%Self.cf8] // CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded -// CHECK:STDOUT: %Main.import_ref.112 = import_ref Main//lib, loc7_30, unloaded +// CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.ab2 = import_ref Main//lib, loc15_27, unloaded +// CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.2: type = import_ref Main//lib, loc15_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.b49: type = import_ref Main//lib, loc15_18, loaded [concrete = constants.%Instance.type] // CHECK:STDOUT: } @@ -1005,12 +1009,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c58: imports.%Main.import_ref.c9a3b6.1 as imports.%Main.import_ref.ef5 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.112 +// CHECK:STDOUT: witness = imports.%Main.import_ref.eb8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.477: imports.%Main.import_ref.c9a3b6.2 as imports.%Main.import_ref.b49 [from "lib.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.ab2 +// CHECK:STDOUT: witness = imports.%Main.import_ref.a9f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @InstanceCallImportFail() { diff --git a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon index c060e51bc9c3..f9345c5688d0 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon @@ -43,10 +43,10 @@ fn G(c: C) { // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.f36: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.4c3: %F.type.f36 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } @@ -76,7 +76,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @C.%impl_witness +// CHECK:STDOUT: witness = @C.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -84,7 +84,8 @@ fn G(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -121,10 +122,11 @@ fn G(c: C) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e03 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.f6d) [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (imports.%Main.import_ref.f6d), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [concrete] -// CHECK:STDOUT: %.5cc: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %.038: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] // CHECK:STDOUT: %F.type.f36: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.4c3: %F.type.f36 = struct_value () [concrete] // CHECK:STDOUT: } @@ -138,7 +140,7 @@ fn G(c: C) { // CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//extend_impl_library, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//extend_impl_library, loc5_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//extend_impl_library, F, unloaded -// CHECK:STDOUT: %Main.import_ref.b86: = import_ref Main//extend_impl_library, loc9_20, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Main.import_ref.9d1: = import_ref Main//extend_impl_library, loc9_20, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.0ed: type = import_ref Main//extend_impl_library, loc9_15, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.3019d1.2: type = import_ref Main//extend_impl_library, loc9_18, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//extend_impl_library, inst17 [no loc], loaded [symbolic = constants.%Self] @@ -170,7 +172,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%Main.import_ref.0ed as imports.%Main.import_ref.3019d1.2 [from "extend_impl_library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.b86 +// CHECK:STDOUT: witness = imports.%Main.import_ref.9d1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "extend_impl_library.carbon"] { @@ -186,11 +188,11 @@ fn G(c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %F.ref.loc7: %I.assoc_type = name_ref F, imports.%Main.import_ref.c44 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc7: %.5cc = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.4c3] +// CHECK:STDOUT: %impl.elem0.loc7: %.038 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.4c3] // CHECK:STDOUT: %F.call.loc7: init %empty_tuple.type = call %impl.elem0.loc7() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %F.ref.loc8: %I.assoc_type = name_ref F, imports.%Main.import_ref.c44 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc8: %.5cc = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.4c3] +// CHECK:STDOUT: %impl.elem0.loc8: %.038 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.4c3] // CHECK:STDOUT: %F.call.loc8: init %empty_tuple.type = call %impl.elem0.loc8() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon index a4e84feeb886..2975802b5d8c 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon @@ -109,13 +109,13 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete] // CHECK:STDOUT: %I.type.325: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.209: %I.type.325 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %impl_witness.eff: = impl_witness (), @impl.084(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.1a9: = impl_witness file.%I.impl_witness_table.loc8, @impl.084(%T) [symbolic] // CHECK:STDOUT: %require_complete.cfe: = require_complete_type %I.type.325 [symbolic] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %I.type.0e2: type = facet_type <@I, @I(%ptr)> [symbolic] // CHECK:STDOUT: %Self.fb4: %I.type.0e2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %require_complete.0e6: = require_complete_type %I.type.0e2 [symbolic] -// CHECK:STDOUT: %impl_witness.465: = impl_witness (), @impl.cd2(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.6ad: = impl_witness file.%I.impl_witness_table.loc12, @impl.cd2(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -138,7 +138,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.325)] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc8: = impl_witness (), @impl.084(constants.%T) [symbolic = @impl.084.%impl_witness (constants.%impl_witness.eff)] +// CHECK:STDOUT: %I.impl_witness_table.loc8 = impl_witness_table (), @impl.084 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc8: = impl_witness %I.impl_witness_table.loc8, @impl.084(constants.%T) [symbolic = @impl.084.%I.impl_witness (constants.%I.impl_witness.1a9)] // CHECK:STDOUT: impl_decl @impl.084 [concrete] { // CHECK:STDOUT: %T.patt.loc8_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -158,7 +159,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.type.loc12_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.0e2)] // CHECK:STDOUT: %T.loc12_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc12: = impl_witness (), @impl.cd2(constants.%T) [symbolic = @impl.cd2.%impl_witness (constants.%impl_witness.465)] +// CHECK:STDOUT: %I.impl_witness_table.loc12 = impl_witness_table (), @impl.cd2 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc12: = impl_witness %I.impl_witness_table.loc12, @impl.cd2(constants.%T) [symbolic = @impl.cd2.%I.impl_witness (constants.%I.impl_witness.6ad)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @I(%T.loc5_13.1: type) { @@ -182,14 +184,14 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: %I.type.loc8_32.2: type = facet_type <@I, @I(%T.loc8_14.2)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.325)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.084(%T.loc8_14.2) [symbolic = %impl_witness (constants.%impl_witness.eff)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table.loc8, @impl.084(%T.loc8_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.1a9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc8_32.2 [symbolic = %require_complete (constants.%require_complete.cfe)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref.loc8 as %I.type.loc8_32.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc8 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -199,13 +201,13 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr.loc12_32.2: type = ptr_type %T.loc12_14.2 [symbolic = %ptr.loc12_32.2 (constants.%ptr)] // CHECK:STDOUT: %I.type.loc12_33.2: type = facet_type <@I, @I(%ptr.loc12_32.2)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.0e2)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc12_33.2 [symbolic = %require_complete (constants.%require_complete.0e6)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.cd2(%T.loc12_14.2) [symbolic = %impl_witness (constants.%impl_witness.465)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table.loc12, @impl.cd2(%T.loc12_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.6ad)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc12_33.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc12 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -233,7 +235,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.325 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.eff +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.1a9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.084.%T.loc8_14.2) {} @@ -255,7 +257,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr.loc12_32.2 => constants.%ptr // CHECK:STDOUT: %I.type.loc12_33.2 => constants.%I.type.0e2 // CHECK:STDOUT: %require_complete => constants.%require_complete.0e6 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.465 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6ad // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.cd2.%ptr.loc12_32.2) {} @@ -274,17 +276,19 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.eff58b.1: = impl_witness (), @impl.08450a.1(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness_table.028 = impl_witness_table (), @impl.08450a.1 [concrete] +// CHECK:STDOUT: %I.impl_witness.1a9ed3.1: = impl_witness %I.impl_witness_table.028, @impl.08450a.1(%T) [symbolic] // CHECK:STDOUT: %require_complete.cfe: = require_complete_type %I.type.325 [symbolic] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %I.type.0e2: type = facet_type <@I, @I(%ptr)> [symbolic] // CHECK:STDOUT: %require_complete.0e6: = require_complete_type %I.type.0e2 [symbolic] -// CHECK:STDOUT: %impl_witness.46542c.1: = impl_witness (), @impl.cd2fdc.1(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness_table.e14 = impl_witness_table (), @impl.cd2fdc.1 [concrete] +// CHECK:STDOUT: %I.impl_witness.6ad3bf.1: = impl_witness %I.impl_witness_table.e14, @impl.cd2fdc.1(%T) [symbolic] // CHECK:STDOUT: %Self.fb4: %I.type.0e2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %impl_witness.eff58b.2: = impl_witness (), @impl.08450a.2(%T) [symbolic] -// CHECK:STDOUT: %impl_witness.eff58b.3: = impl_witness (), @impl.08450a.3(%T) [symbolic] -// CHECK:STDOUT: %impl_witness.46542c.2: = impl_witness (), @impl.cd2fdc.2(%T) [symbolic] -// CHECK:STDOUT: %impl_witness.46542c.3: = impl_witness (), @impl.cd2fdc.3(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.1a9ed3.2: = impl_witness file.%I.impl_witness_table.loc8, @impl.08450a.2(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.1a9ed3.3: = impl_witness file.%I.impl_witness_table.loc14, @impl.08450a.3(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.6ad3bf.2: = impl_witness file.%I.impl_witness_table.loc20, @impl.cd2fdc.2(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.6ad3bf.3: = impl_witness file.%I.impl_witness_table.loc26, @impl.cd2fdc.3(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -292,13 +296,13 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %Main.I: %I.type.dac = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//import_generic, inst32 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.003 = import_ref Main//import_generic, loc8_33, unloaded +// CHECK:STDOUT: %Main.import_ref.cc6 = import_ref Main//import_generic, loc8_33, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//import_generic, inst16 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic, loc8_14, loaded [symbolic = @impl.08450a.1.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.29aca8.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.4be: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @impl.08450a.1.%I.type (constants.%I.type.325)] -// CHECK:STDOUT: %Main.import_ref.4e1 = import_ref Main//import_generic, loc12_35, unloaded +// CHECK:STDOUT: %Main.import_ref.fc2 = import_ref Main//import_generic, loc12_35, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//import_generic, loc12_14, loaded [symbolic = @impl.cd2fdc.1.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.29aca8.2: type = import_ref Main//import_generic, loc12_24, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.3e2: type = import_ref Main//import_generic, loc12_33, loaded [symbolic = @impl.cd2fdc.1.%I.type (constants.%I.type.0e2)] @@ -320,7 +324,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.325)] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc8: = impl_witness (), @impl.08450a.2(constants.%T) [symbolic = @impl.08450a.2.%impl_witness (constants.%impl_witness.eff58b.2)] +// CHECK:STDOUT: %I.impl_witness_table.loc8 = impl_witness_table (), @impl.08450a.2 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc8: = impl_witness %I.impl_witness_table.loc8, @impl.08450a.2(constants.%T) [symbolic = @impl.08450a.2.%I.impl_witness (constants.%I.impl_witness.1a9ed3.2)] // CHECK:STDOUT: impl_decl @impl.08450a.3 [concrete] { // CHECK:STDOUT: %T.patt.loc14_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -330,7 +335,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.type.loc14_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.325)] // CHECK:STDOUT: %T.loc14_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc14: = impl_witness (), @impl.08450a.3(constants.%T) [symbolic = @impl.08450a.3.%impl_witness (constants.%impl_witness.eff58b.3)] +// CHECK:STDOUT: %I.impl_witness_table.loc14 = impl_witness_table (), @impl.08450a.3 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc14: = impl_witness %I.impl_witness_table.loc14, @impl.08450a.3(constants.%T) [symbolic = @impl.08450a.3.%I.impl_witness (constants.%I.impl_witness.1a9ed3.3)] // CHECK:STDOUT: impl_decl @impl.cd2fdc.2 [concrete] { // CHECK:STDOUT: %T.patt.loc20_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -341,7 +347,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.type.loc20_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.0e2)] // CHECK:STDOUT: %T.loc20_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc20: = impl_witness (), @impl.cd2fdc.2(constants.%T) [symbolic = @impl.cd2fdc.2.%impl_witness (constants.%impl_witness.46542c.2)] +// CHECK:STDOUT: %I.impl_witness_table.loc20 = impl_witness_table (), @impl.cd2fdc.2 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc20: = impl_witness %I.impl_witness_table.loc20, @impl.cd2fdc.2(constants.%T) [symbolic = @impl.cd2fdc.2.%I.impl_witness (constants.%I.impl_witness.6ad3bf.2)] // CHECK:STDOUT: impl_decl @impl.cd2fdc.3 [concrete] { // CHECK:STDOUT: %T.patt.loc26_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -352,7 +359,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.type.loc26_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.0e2)] // CHECK:STDOUT: %T.loc26_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc26: = impl_witness (), @impl.cd2fdc.3(constants.%T) [symbolic = @impl.cd2fdc.3.%impl_witness (constants.%impl_witness.46542c.3)] +// CHECK:STDOUT: %I.impl_witness_table.loc26 = impl_witness_table (), @impl.cd2fdc.3 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc26: = impl_witness %I.impl_witness_table.loc26, @impl.cd2fdc.3(constants.%T) [symbolic = @impl.cd2fdc.3.%I.impl_witness (constants.%I.impl_witness.6ad3bf.3)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.5ab3ec.1: type) [from "import_generic.carbon"] { @@ -374,14 +382,14 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.325)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.08450a.1(%T) [symbolic = %impl_witness (constants.%impl_witness.eff58b.1)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness constants.%I.impl_witness_table.028, @impl.08450a.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.1a9ed3.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.cfe)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.29aca8.1 as imports.%Main.import_ref.4be { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.003 +// CHECK:STDOUT: witness = imports.%Main.import_ref.cc6 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -391,13 +399,13 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%ptr)> [symbolic = %I.type (constants.%I.type.0e2)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.0e6)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.cd2fdc.1(%T) [symbolic = %impl_witness (constants.%impl_witness.46542c.1)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness constants.%I.impl_witness_table.e14, @impl.cd2fdc.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.6ad3bf.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.29aca8.2 as imports.%Main.import_ref.3e2 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.4e1 +// CHECK:STDOUT: witness = imports.%Main.import_ref.fc2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -405,7 +413,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: %I.type.loc8_32.2: type = facet_type <@I, @I(%T.loc8_14.2)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.325)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.08450a.2(%T.loc8_14.2) [symbolic = %impl_witness (constants.%impl_witness.eff58b.2)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table.loc8, @impl.08450a.2(%T.loc8_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.1a9ed3.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc8_32.1; // CHECK:STDOUT: } @@ -415,13 +423,13 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc14_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)] // CHECK:STDOUT: %I.type.loc14_32.2: type = facet_type <@I, @I(%T.loc14_14.2)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.325)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc14_32.2 [symbolic = %require_complete (constants.%require_complete.cfe)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.08450a.3(%T.loc14_14.2) [symbolic = %impl_witness (constants.%impl_witness.eff58b.3)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table.loc14, @impl.08450a.3(%T.loc14_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.1a9ed3.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc14 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -430,7 +438,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc20_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)] // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)] // CHECK:STDOUT: %I.type.loc20_33.2: type = facet_type <@I, @I(%ptr.loc20_32.2)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.0e2)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.cd2fdc.2(%T.loc20_14.2) [symbolic = %impl_witness (constants.%impl_witness.46542c.2)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table.loc20, @impl.cd2fdc.2(%T.loc20_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.6ad3bf.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc20_33.1; // CHECK:STDOUT: } @@ -441,13 +449,13 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)] // CHECK:STDOUT: %I.type.loc26_33.2: type = facet_type <@I, @I(%ptr.loc26_32.2)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.0e2)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc26_33.2 [symbolic = %require_complete (constants.%require_complete.0e6)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.cd2fdc.3(%T.loc26_14.2) [symbolic = %impl_witness (constants.%impl_witness.46542c.3)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table.loc26, @impl.cd2fdc.3(%T.loc26_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.6ad3bf.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc26 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc26 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -473,7 +481,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt // CHECK:STDOUT: %I.type => constants.%I.type.325 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.eff58b.1 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.1a9ed3.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.08450a.1.%T) {} @@ -495,7 +503,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr => constants.%ptr // CHECK:STDOUT: %I.type => constants.%I.type.0e2 // CHECK:STDOUT: %require_complete => constants.%require_complete.0e6 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.46542c.1 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6ad3bf.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.cd2fdc.1.%ptr) {} @@ -506,7 +514,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.325 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.eff58b.2 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.1a9ed3.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.08450a.2.%T.loc8_14.2) {} @@ -518,7 +526,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc14_14.2 => constants.%T.patt // CHECK:STDOUT: %I.type.loc14_32.2 => constants.%I.type.325 // CHECK:STDOUT: %require_complete => constants.%require_complete.cfe -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.eff58b.3 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.1a9ed3.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.08450a.3.%T.loc14_14.2) {} @@ -530,7 +538,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc20_14.2 => constants.%T.patt // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr // CHECK:STDOUT: %I.type.loc20_33.2 => constants.%I.type.0e2 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.46542c.2 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6ad3bf.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.cd2fdc.2.%ptr.loc20_32.2) {} @@ -543,7 +551,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr // CHECK:STDOUT: %I.type.loc26_33.2 => constants.%I.type.0e2 // CHECK:STDOUT: %require_complete => constants.%require_complete.0e6 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.46542c.3 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6ad3bf.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.cd2fdc.3.%ptr.loc26_32.2) {} @@ -562,10 +570,10 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.generic: %J.type.2b8 = struct_value () [concrete] // CHECK:STDOUT: %J.type.b72: type = facet_type <@J, @J(%T)> [symbolic] // CHECK:STDOUT: %Self: %J.type.b72 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %impl_witness.0ef: = impl_witness (), @impl.199(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness.809: = impl_witness file.%J.impl_witness_table.loc11, @impl.199(%T) [symbolic] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %J.type.628: type = facet_type <@J, @J(%ptr)> [symbolic] -// CHECK:STDOUT: %impl_witness.b80: = impl_witness (), @impl.dfd(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness.5a8: = impl_witness file.%J.impl_witness_table.loc17, @impl.dfd(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -588,7 +596,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.type.loc11_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc11_32.2 (constants.%J.type.b72)] // CHECK:STDOUT: %T.loc11_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc11: = impl_witness (), @impl.199(constants.%T) [symbolic = @impl.199.%impl_witness (constants.%impl_witness.0ef)] +// CHECK:STDOUT: %J.impl_witness_table.loc11 = impl_witness_table (), @impl.199 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc11: = impl_witness %J.impl_witness_table.loc11, @impl.199(constants.%T) [symbolic = @impl.199.%J.impl_witness (constants.%J.impl_witness.809)] // CHECK:STDOUT: impl_decl @impl.dfd [concrete] { // CHECK:STDOUT: %T.patt.loc17_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -599,7 +608,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.type.loc17_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc17_33.2 (constants.%J.type.628)] // CHECK:STDOUT: %T.loc17_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc17_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (), @impl.dfd(constants.%T) [symbolic = @impl.dfd.%impl_witness (constants.%impl_witness.b80)] +// CHECK:STDOUT: %J.impl_witness_table.loc17 = impl_witness_table (), @impl.dfd [concrete] +// CHECK:STDOUT: %J.impl_witness.loc17: = impl_witness %J.impl_witness_table.loc17, @impl.dfd(constants.%T) [symbolic = @impl.dfd.%J.impl_witness (constants.%J.impl_witness.5a8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @J(%T.loc5_13.1: type) { @@ -623,7 +633,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc11_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc11_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt)] // CHECK:STDOUT: %J.type.loc11_32.2: type = facet_type <@J, @J(%T.loc11_14.2)> [symbolic = %J.type.loc11_32.2 (constants.%J.type.b72)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.199(%T.loc11_14.2) [symbolic = %impl_witness (constants.%impl_witness.0ef)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table.loc11, @impl.199(%T.loc11_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.809)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %J.type.loc11_32.1; // CHECK:STDOUT: } @@ -633,7 +643,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc17_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_14.2 (constants.%T.patt)] // CHECK:STDOUT: %ptr.loc17_32.2: type = ptr_type %T.loc17_14.2 [symbolic = %ptr.loc17_32.2 (constants.%ptr)] // CHECK:STDOUT: %J.type.loc17_33.2: type = facet_type <@J, @J(%ptr.loc17_32.2)> [symbolic = %J.type.loc17_33.2 (constants.%J.type.628)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.dfd(%T.loc17_14.2) [symbolic = %impl_witness (constants.%impl_witness.b80)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table.loc17, @impl.dfd(%T.loc17_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.5a8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %J.type.loc17_33.1; // CHECK:STDOUT: } @@ -658,7 +668,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc11_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc11_14.2 => constants.%T.patt // CHECK:STDOUT: %J.type.loc11_32.2 => constants.%J.type.b72 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.0ef +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.809 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(@impl.199.%T.loc11_14.2) {} @@ -675,7 +685,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc17_14.2 => constants.%T.patt // CHECK:STDOUT: %ptr.loc17_32.2 => constants.%ptr // CHECK:STDOUT: %J.type.loc17_33.2 => constants.%J.type.628 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.b80 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.5a8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(@impl.dfd.%ptr.loc17_32.2) {} @@ -694,17 +704,19 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.0ef94b.1: = impl_witness (), @impl.199bba.1(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness_table.891 = impl_witness_table (), @impl.199bba.1 [concrete] +// CHECK:STDOUT: %J.impl_witness.80964e.1: = impl_witness %J.impl_witness_table.891, @impl.199bba.1(%T) [symbolic] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %J.type.628: type = facet_type <@J, @J(%ptr)> [symbolic] -// CHECK:STDOUT: %impl_witness.b80f53.1: = impl_witness (), @impl.dfd2f7.1(%T) [symbolic] -// CHECK:STDOUT: %impl_witness.0ef94b.2: = impl_witness (), @impl.199bba.2(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness_table.487 = impl_witness_table (), @impl.dfd2f7.1 [concrete] +// CHECK:STDOUT: %J.impl_witness.5a859e.1: = impl_witness %J.impl_witness_table.487, @impl.dfd2f7.1(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness.80964e.2: = impl_witness file.%J.impl_witness_table.loc8, @impl.199bba.2(%T) [symbolic] // CHECK:STDOUT: %require_complete.287: = require_complete_type %J.type.b72 [symbolic] -// CHECK:STDOUT: %impl_witness.0ef94b.3: = impl_witness (), @impl.199bba.3(%T) [symbolic] -// CHECK:STDOUT: %impl_witness.b80f53.2: = impl_witness (), @impl.dfd2f7.2(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness.80964e.3: = impl_witness file.%J.impl_witness_table.loc14, @impl.199bba.3(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness.5a859e.2: = impl_witness file.%J.impl_witness_table.loc20, @impl.dfd2f7.2(%T) [symbolic] // CHECK:STDOUT: %Self.fbe: %J.type.628 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %require_complete.c60: = require_complete_type %J.type.628 [symbolic] -// CHECK:STDOUT: %impl_witness.b80f53.3: = impl_witness (), @impl.dfd2f7.3(%T) [symbolic] +// CHECK:STDOUT: %J.impl_witness.5a859e.3: = impl_witness file.%J.impl_witness_table.loc26, @impl.dfd2f7.3(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -738,7 +750,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.type.loc8_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.b72)] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc8: = impl_witness (), @impl.199bba.2(constants.%T) [symbolic = @impl.199bba.2.%impl_witness (constants.%impl_witness.0ef94b.2)] +// CHECK:STDOUT: %J.impl_witness_table.loc8 = impl_witness_table (), @impl.199bba.2 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc8: = impl_witness %J.impl_witness_table.loc8, @impl.199bba.2(constants.%T) [symbolic = @impl.199bba.2.%J.impl_witness (constants.%J.impl_witness.80964e.2)] // CHECK:STDOUT: impl_decl @impl.199bba.3 [concrete] { // CHECK:STDOUT: %T.patt.loc14_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -748,7 +761,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.type.loc14_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.b72)] // CHECK:STDOUT: %T.loc14_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc14: = impl_witness (), @impl.199bba.3(constants.%T) [symbolic = @impl.199bba.3.%impl_witness (constants.%impl_witness.0ef94b.3)] +// CHECK:STDOUT: %J.impl_witness_table.loc14 = impl_witness_table (), @impl.199bba.3 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc14: = impl_witness %J.impl_witness_table.loc14, @impl.199bba.3(constants.%T) [symbolic = @impl.199bba.3.%J.impl_witness (constants.%J.impl_witness.80964e.3)] // CHECK:STDOUT: impl_decl @impl.dfd2f7.2 [concrete] { // CHECK:STDOUT: %T.patt.loc20_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -759,7 +773,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.type.loc20_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.628)] // CHECK:STDOUT: %T.loc20_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc20: = impl_witness (), @impl.dfd2f7.2(constants.%T) [symbolic = @impl.dfd2f7.2.%impl_witness (constants.%impl_witness.b80f53.2)] +// CHECK:STDOUT: %J.impl_witness_table.loc20 = impl_witness_table (), @impl.dfd2f7.2 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc20: = impl_witness %J.impl_witness_table.loc20, @impl.dfd2f7.2(constants.%T) [symbolic = @impl.dfd2f7.2.%J.impl_witness (constants.%J.impl_witness.5a859e.2)] // CHECK:STDOUT: impl_decl @impl.dfd2f7.3 [concrete] { // CHECK:STDOUT: %T.patt.loc26_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -770,7 +785,8 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.type.loc26_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.628)] // CHECK:STDOUT: %T.loc26_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc26: = impl_witness (), @impl.dfd2f7.3(constants.%T) [symbolic = @impl.dfd2f7.3.%impl_witness (constants.%impl_witness.b80f53.3)] +// CHECK:STDOUT: %J.impl_witness_table.loc26 = impl_witness_table (), @impl.dfd2f7.3 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc26: = impl_witness %J.impl_witness_table.loc26, @impl.dfd2f7.3(constants.%T) [symbolic = @impl.dfd2f7.3.%J.impl_witness (constants.%J.impl_witness.5a859e.3)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.5ab3ec.1: type) [from "fail_import_generic_decl.carbon"] { @@ -792,7 +808,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.b72)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.199bba.1(%T) [symbolic = %impl_witness (constants.%impl_witness.0ef94b.1)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness constants.%J.impl_witness_table.891, @impl.199bba.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.80964e.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.aa9f8a.1 as imports.%Main.import_ref.ded; // CHECK:STDOUT: } @@ -802,7 +818,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%ptr)> [symbolic = %J.type (constants.%J.type.628)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.dfd2f7.1(%T) [symbolic = %impl_witness (constants.%impl_witness.b80f53.1)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness constants.%J.impl_witness_table.487, @impl.dfd2f7.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.5a859e.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.aa9f8a.2 as imports.%Main.import_ref.0d3; // CHECK:STDOUT: } @@ -811,7 +827,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: %J.type.loc8_32.2: type = facet_type <@J, @J(%T.loc8_14.2)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.b72)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.199bba.2(%T.loc8_14.2) [symbolic = %impl_witness (constants.%impl_witness.0ef94b.2)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table.loc8, @impl.199bba.2(%T.loc8_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.80964e.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %J.type.loc8_32.1; // CHECK:STDOUT: } @@ -821,13 +837,13 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc14_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)] // CHECK:STDOUT: %J.type.loc14_32.2: type = facet_type <@J, @J(%T.loc14_14.2)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.b72)] // CHECK:STDOUT: %require_complete: = require_complete_type %J.type.loc14_32.2 [symbolic = %require_complete (constants.%require_complete.287)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.199bba.3(%T.loc14_14.2) [symbolic = %impl_witness (constants.%impl_witness.0ef94b.3)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table.loc14, @impl.199bba.3(%T.loc14_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.80964e.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc14 +// CHECK:STDOUT: witness = file.%J.impl_witness.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -836,7 +852,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc20_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)] // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)] // CHECK:STDOUT: %J.type.loc20_33.2: type = facet_type <@J, @J(%ptr.loc20_32.2)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.628)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.dfd2f7.2(%T.loc20_14.2) [symbolic = %impl_witness (constants.%impl_witness.b80f53.2)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table.loc20, @impl.dfd2f7.2(%T.loc20_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.5a859e.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %J.type.loc20_33.1; // CHECK:STDOUT: } @@ -847,13 +863,13 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)] // CHECK:STDOUT: %J.type.loc26_33.2: type = facet_type <@J, @J(%ptr.loc26_32.2)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.628)] // CHECK:STDOUT: %require_complete: = require_complete_type %J.type.loc26_33.2 [symbolic = %require_complete (constants.%require_complete.c60)] -// CHECK:STDOUT: %impl_witness: = impl_witness (), @impl.dfd2f7.3(%T.loc26_14.2) [symbolic = %impl_witness (constants.%impl_witness.b80f53.3)] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table.loc26, @impl.dfd2f7.3(%T.loc26_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.5a859e.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %D.ref as %J.type.loc26_33.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc26 +// CHECK:STDOUT: witness = file.%J.impl_witness.loc26 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -879,7 +895,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt // CHECK:STDOUT: %J.type => constants.%J.type.b72 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.0ef94b.1 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.80964e.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(@impl.199bba.1.%T) {} @@ -900,7 +916,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt => constants.%T.patt // CHECK:STDOUT: %ptr => constants.%ptr // CHECK:STDOUT: %J.type => constants.%J.type.628 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.b80f53.1 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.5a859e.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(@impl.dfd2f7.1.%ptr) {} @@ -911,7 +927,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T.patt // CHECK:STDOUT: %J.type.loc8_32.2 => constants.%J.type.b72 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.0ef94b.2 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.80964e.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(@impl.199bba.2.%T.loc8_14.2) {} @@ -923,7 +939,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc14_14.2 => constants.%T.patt // CHECK:STDOUT: %J.type.loc14_32.2 => constants.%J.type.b72 // CHECK:STDOUT: %require_complete => constants.%require_complete.287 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.0ef94b.3 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.80964e.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(@impl.199bba.3.%T.loc14_14.2) {} @@ -935,7 +951,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.patt.loc20_14.2 => constants.%T.patt // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr // CHECK:STDOUT: %J.type.loc20_33.2 => constants.%J.type.628 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.b80f53.2 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.5a859e.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(@impl.dfd2f7.2.%ptr.loc20_32.2) {} @@ -948,7 +964,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr // CHECK:STDOUT: %J.type.loc26_33.2 => constants.%J.type.628 // CHECK:STDOUT: %require_complete => constants.%require_complete.c60 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.b80f53.3 +// CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.5a859e.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(@impl.dfd2f7.3.%ptr.loc26_32.2) {} diff --git a/toolchain/check/testdata/impl/no_prelude/import_interface_assoc_const.carbon b/toolchain/check/testdata/impl/no_prelude/import_interface_assoc_const.carbon index 8a9b61a7c575..eab267779f3a 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_interface_assoc_const.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_interface_assoc_const.carbon @@ -320,7 +320,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -358,7 +358,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -375,7 +376,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C1.ref as %.loc5_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C1 { @@ -407,7 +408,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -445,7 +446,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc5, %.loc5_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %C2.ref.loc6: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] @@ -478,7 +480,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C2.ref.loc5 as %.loc5_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C2 { @@ -502,7 +504,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.21f: = impl_witness file.%I.impl_witness_table.loc9 [concrete] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.652 [concrete] @@ -511,7 +513,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness.039: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness.c1a: = impl_witness file.%I.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -537,7 +539,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %C3.ref: type = name_ref C3, file.%C3.decl [concrete = constants.%C3] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc9: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %I.impl_witness_table.loc9 = impl_witness_table (), @impl.16e [concrete] +// CHECK:STDOUT: %I.impl_witness.loc9: = impl_witness %I.impl_witness_table.loc9 [concrete = constants.%I.impl_witness.21f] // CHECK:STDOUT: impl_decl @impl.5ad [concrete] {} { // CHECK:STDOUT: %C3.ref: type = name_ref C3, file.%C3.decl [concrete = constants.%C3] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] @@ -554,7 +557,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness.039] +// CHECK:STDOUT: %I.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant), @impl.5ad [concrete] +// CHECK:STDOUT: %I.impl_witness.loc10: = impl_witness %I.impl_witness_table.loc10 [concrete = constants.%I.impl_witness.c1a] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -573,7 +577,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5ad: %C3.ref as %.loc10_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C3 { @@ -605,10 +609,10 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type.872: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness.039: = impl_witness (file.%impl_witness_assoc_constant.loc9) [concrete] +// CHECK:STDOUT: %I.impl_witness.21c: = impl_witness file.%I.impl_witness_table.loc9 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I_where.type.4fe: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness.ae4: = impl_witness (file.%impl_witness_assoc_constant.loc10) [concrete] +// CHECK:STDOUT: %I.impl_witness.94c: = impl_witness file.%I.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -646,7 +650,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc9: = impl_witness (%impl_witness_assoc_constant.loc9) [concrete = constants.%impl_witness.039] +// CHECK:STDOUT: %I.impl_witness_table.loc9 = impl_witness_table (%impl_witness_assoc_constant.loc9), @impl.4d8 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc9: = impl_witness %I.impl_witness_table.loc9 [concrete = constants.%I.impl_witness.21c] // CHECK:STDOUT: %impl_witness_assoc_constant.loc9: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: impl_decl @impl.2de [concrete] {} { // CHECK:STDOUT: %C4.ref: type = name_ref C4, file.%C4.decl [concrete = constants.%C4] @@ -664,7 +669,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (%impl_witness_assoc_constant.loc10) [concrete = constants.%impl_witness.ae4] +// CHECK:STDOUT: %I.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @impl.2de [concrete] +// CHECK:STDOUT: %I.impl_witness.loc10: = impl_witness %I.impl_witness_table.loc10 [concrete = constants.%I.impl_witness.94c] // CHECK:STDOUT: %impl_witness_assoc_constant.loc10: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -683,7 +689,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2de: %C4.ref as %.loc10_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C4 { @@ -884,8 +890,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness.039: = impl_witness (file.%impl_witness_assoc_constant) [concrete] -// CHECK:STDOUT: %impl_witness.85b: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness.ddd: = impl_witness file.%I.impl_witness_table.loc5 [concrete] +// CHECK:STDOUT: %I.impl_witness.6de: = impl_witness file.%I.impl_witness_table.loc18 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -923,13 +929,15 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc5: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness.039] +// CHECK:STDOUT: %I.impl_witness_table.loc5 = impl_witness_table (%impl_witness_assoc_constant), @impl.e9b [concrete] +// CHECK:STDOUT: %I.impl_witness.loc5: = impl_witness %I.impl_witness_table.loc5 [concrete = constants.%I.impl_witness.ddd] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: impl_decl @impl.482 [concrete] {} { // CHECK:STDOUT: %C6.ref: type = name_ref C6, file.%C6.decl [concrete = constants.%C6] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc18: = impl_witness () [concrete = constants.%impl_witness.85b] +// CHECK:STDOUT: %I.impl_witness_table.loc18 = impl_witness_table (), @impl.482 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc18: = impl_witness %I.impl_witness_table.loc18 [concrete = constants.%I.impl_witness.6de] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I [from "interface.carbon"] { @@ -947,7 +955,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.482: %C6.ref as %I.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc18 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C6 { @@ -980,7 +988,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type and %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1027,7 +1035,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_32, %.loc10_38.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1044,7 +1053,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C7.ref as %.loc10_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C7 { @@ -1353,7 +1362,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1400,7 +1409,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc6_32, %.loc6_38.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1417,7 +1427,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %CB.ref as %.loc6_14 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @CB { @@ -1452,7 +1462,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.a.225 = struct_value (%empty_struct) [concrete] // CHECK:STDOUT: %NonType_where.type: type = facet_type <@NonType where %impl.elem0 = %struct> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant) [concrete] +// CHECK:STDOUT: %NonType.impl_witness: = impl_witness file.%NonType.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1494,7 +1504,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc6_39.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %NonType.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %NonType.impl_witness: = impl_witness %NonType.impl_witness_table [concrete = constants.%NonType.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.225 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1511,7 +1522,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %CC.ref as %.loc6_20 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%NonType.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @CC { @@ -1582,10 +1593,10 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %impl.elem0: %.bf5 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %IF_where.type: type = facet_type <@IF where %impl.elem0 = %int_0> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %IF.impl_witness: = impl_witness file.%IF.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.2b5: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.479: %F.type.2b5 = struct_value () [concrete] -// CHECK:STDOUT: %IF.facet.0db: %IF.type = facet_value %CD, (%impl_witness) [concrete] +// CHECK:STDOUT: %IF.facet.c94: %IF.type = facet_value %CD, (%IF.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1618,7 +1629,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %IF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %IF.impl_witness: = impl_witness %IF.impl_witness_table [concrete = constants.%IF.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @IF [from "interface_with_function.carbon"] { @@ -1633,7 +1645,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%IF.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @CD { @@ -1656,5 +1668,5 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%IF.facet.0db) {} +// CHECK:STDOUT: specific @F.1(constants.%IF.facet.c94) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index 88f01925149f..9aa64a3c9084 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -108,16 +108,16 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Op.type.31b: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %Op.d59: %Op.type.31b = struct_value () [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl) [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.adf: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.489: %Op.type.adf = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %empty_tuple.type, (%impl_witness) [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %empty_tuple.type, (%Add.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type @Add [concrete] // CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, imports.%Main.import_ref.5a3 [concrete] -// CHECK:STDOUT: %.9ca: type = fn_type_with_self_type %Op.type.31b, %Add.facet [concrete] +// CHECK:STDOUT: %.59e: type = fn_type_with_self_type %Op.type.31b, %Add.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -139,7 +139,8 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Main.Add [concrete = constants.%Add.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table [concrete = constants.%Add.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, call_param0 @@ -196,7 +197,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Add.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.1(imports.%Main.import_ref.e5e: %Add.type) [from "a.carbon"] { @@ -219,7 +220,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Main.Add [concrete = constants.%Add.type] // CHECK:STDOUT: %Op.ref: %Add.assoc_type = name_ref Op, imports.%Main.import_ref.f99 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.9ca = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Op.489] +// CHECK:STDOUT: %impl.elem0: %.59e = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.489] // CHECK:STDOUT: %bound_method: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %y.ref: %empty_tuple.type = name_ref y, %y // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%x.ref, %y.ref) diff --git a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon index 9a9fdb73439d..b1719cbad910 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon @@ -65,10 +65,10 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.40c: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.071: %F.type.40c = struct_value () [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -91,7 +91,8 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -109,7 +110,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] // CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_27.2 (constants.%C)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%T.loc10_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table, @impl(%T.loc10_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.40c)] @@ -120,7 +121,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -164,7 +165,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T.patt // CHECK:STDOUT: %C.loc10_27.2 => constants.%C -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.40c @@ -199,15 +200,15 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.681: = impl_witness (imports.%Main.import_ref.e2c), @impl(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (imports.%Main.import_ref.e2c), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness.443: = impl_witness %I.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type.40c: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.071: %F.type.40c = struct_value () [symbolic] -// CHECK:STDOUT: %impl_witness.02b: = impl_witness (imports.%Main.import_ref.e2c), @impl(%empty_struct_type) [concrete] -// CHECK:STDOUT: %impl_witness.bbe: = impl_witness (imports.%Main.import_ref.c57), @impl(%T) [symbolic] +// CHECK:STDOUT: %I.impl_witness.6bb: = impl_witness %I.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.type.4a4: type = fn_type @F.2, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %F.9e6: %F.type.4a4 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C.7a7, (%impl_witness.02b) [concrete] -// CHECK:STDOUT: %.dd0: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C.7a7, (%I.impl_witness.6bb) [concrete] +// CHECK:STDOUT: %.81d: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.9e6, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] @@ -223,11 +224,10 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//import_generic, F, unloaded // CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//import_generic, inst32 [no loc], loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %Main.import_ref.d91: = import_ref Main//import_generic, loc10_34, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.bbe)] +// CHECK:STDOUT: %Main.import_ref.6ac: = import_ref Main//import_generic, loc10_34, loaded [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness.443)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic, loc10_14, loaded [symbolic = @impl.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.499: type = import_ref Main//import_generic, loc10_27, loaded [symbolic = @impl.%C (constants.%C.f2e)] // CHECK:STDOUT: %Main.import_ref.301: type = import_ref Main//import_generic, loc10_32, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref.e2c: @impl.%F.type (%F.type.40c) = import_ref Main//import_generic, loc11_10, loaded [symbolic = @impl.%F (constants.%F.071)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//import_generic, loc10_14, loaded [symbolic = @impl.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -273,10 +273,10 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.7a7] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.c44 [concrete = constants.%assoc0] -// CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C.7a7, (constants.%impl_witness.02b) [concrete = constants.%I.facet] +// CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C.7a7, (constants.%I.impl_witness.6bb) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc25_16: %I.type = converted %C, %I.facet [concrete = constants.%I.facet] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc25_16, element0 [concrete = constants.%impl_witness.02b] -// CHECK:STDOUT: %impl.elem0: %.dd0 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.9e6] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc25_16, element0 [concrete = constants.%I.impl_witness.6bb] +// CHECK:STDOUT: %impl.elem0: %.81d = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.9e6] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %specific_fn() // CHECK:STDOUT: %.loc25_23.1: ref %empty_tuple.type = temporary_storage @@ -298,7 +298,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.f2e)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.e2c), @impl(%T) [symbolic = %impl_witness (constants.%impl_witness.681)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness constants.%I.impl_witness_table, @impl(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.443)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T) [symbolic = %F.type (constants.%F.type.40c)] @@ -306,7 +306,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Main.import_ref.499 as imports.%Main.import_ref.301 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.d91 +// CHECK:STDOUT: witness = imports.%Main.import_ref.6ac // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -369,7 +369,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt // CHECK:STDOUT: %C => constants.%C.f2e -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.681 +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.443 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.40c @@ -386,7 +386,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %T => constants.%empty_struct_type // CHECK:STDOUT: %T.patt => constants.%T.patt // CHECK:STDOUT: %C => constants.%C.7a7 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.02b +// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6bb // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.4a4 diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 583b74a42aea..fc4258216bfb 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -223,13 +223,13 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Op.dba: %Op.type.54d = struct_value () [concrete] // CHECK:STDOUT: %Action.assoc_type.4ee: type = assoc_entity_type @Action, @Action(%B) [concrete] // CHECK:STDOUT: %assoc0.f3b: %Action.assoc_type.4ee = assoc_entity element0, @Action.%Op.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl) [concrete] +// CHECK:STDOUT: %Action.impl_witness: = impl_witness file.%Action.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.4b4: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.40d: %Op.type.4b4 = struct_value () [concrete] -// CHECK:STDOUT: %Action.facet: %Action.type.cb0 = facet_value %A, (%impl_witness) [concrete] +// CHECK:STDOUT: %Action.facet: %Action.type.cb0 = facet_value %A, (%Action.impl_witness) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %.dde: type = fn_type_with_self_type %Op.type.54d, %Action.facet [concrete] +// CHECK:STDOUT: %.584: type = fn_type_with_self_type %Op.type.54d, %Action.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -254,7 +254,8 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [concrete = constants.%Action.type.cb0] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Action.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %Action.impl_witness: = impl_witness %Action.impl_witness_table [concrete = constants.%Action.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %a.patt: %A = binding_pattern a // CHECK:STDOUT: %a.param_patt: %A = value_param_pattern %a.patt, call_param0 @@ -313,7 +314,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Action.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -365,7 +366,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [concrete = constants.%Action.type.cb0] // CHECK:STDOUT: %.loc16: %Action.assoc_type.4ee = specific_constant @Action.%assoc0.loc5_22.1, @Action(constants.%B) [concrete = constants.%assoc0.f3b] // CHECK:STDOUT: %Op.ref: %Action.assoc_type.4ee = name_ref Op, %.loc16 [concrete = constants.%assoc0.f3b] -// CHECK:STDOUT: %impl.elem0: %.dde = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Op.40d] +// CHECK:STDOUT: %impl.elem0: %.584 = impl_witness_access constants.%Action.impl_witness, element0 [concrete = constants.%Op.40d] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%a.ref) // CHECK:STDOUT: return @@ -435,9 +436,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %assoc0.f18741.2: %Action.assoc_type.32e = assoc_entity element0, imports.%Main.import_ref.0e3753.2 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.d0b) [concrete] -// CHECK:STDOUT: %Action.facet: %Action.type.cb0 = facet_value %A, (%impl_witness) [concrete] -// CHECK:STDOUT: %.584: type = fn_type_with_self_type %Op.type.54d, %Action.facet [concrete] +// CHECK:STDOUT: %Action.impl_witness_table = impl_witness_table (imports.%Main.import_ref.d0b), @impl [concrete] +// CHECK:STDOUT: %Action.impl_witness: = impl_witness %Action.impl_witness_table [concrete] +// CHECK:STDOUT: %Action.facet: %Action.type.cb0 = facet_value %A, (%Action.impl_witness) [concrete] +// CHECK:STDOUT: %.6c7: type = fn_type_with_self_type %Op.type.54d, %Action.facet [concrete] // CHECK:STDOUT: %Op.type.4b4: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.40d: %Op.type.4b4 = struct_value () [concrete] // CHECK:STDOUT: } @@ -454,7 +456,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c55: @Action.%Action.assoc_type (%Action.assoc_type.32e) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.f18741.2)] // CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded -// CHECK:STDOUT: %Main.import_ref.71c: = import_ref Main//action, loc12_21, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Main.import_ref.995: = import_ref Main//action, loc12_21, loaded [concrete = constants.%Action.impl_witness] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst55 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.984: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A] @@ -509,7 +511,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: impl @impl: imports.%Main.import_ref.984 as imports.%Main.import_ref.bb2 [from "action.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = imports.%Main.import_ref.7b5 -// CHECK:STDOUT: witness = imports.%Main.import_ref.71c +// CHECK:STDOUT: witness = imports.%Main.import_ref.995 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B [from "action.carbon"] { @@ -543,7 +545,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [concrete = constants.%Action.type.cb0] // CHECK:STDOUT: %.loc4: %Action.assoc_type.4ee = specific_constant imports.%Main.import_ref.c55, @Action(constants.%B) [concrete = constants.%assoc0.8a8] // CHECK:STDOUT: %Op.ref: %Action.assoc_type.4ee = name_ref Op, %.loc4 [concrete = constants.%assoc0.8a8] -// CHECK:STDOUT: %impl.elem0: %.584 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Op.40d] +// CHECK:STDOUT: %impl.elem0: %.6c7 = impl_witness_access constants.%Action.impl_witness, element0 [concrete = constants.%Op.40d] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%a.ref) // CHECK:STDOUT: return @@ -628,7 +630,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c55: @Action.%Action.assoc_type (%Action.assoc_type.32e) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.f18)] // CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded -// CHECK:STDOUT: %Main.import_ref.7a1 = import_ref Main//action, loc12_21, unloaded +// CHECK:STDOUT: %Main.import_ref.19c = import_ref Main//action, loc12_21, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst55 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.984: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A] @@ -685,7 +687,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: impl @impl: imports.%Main.import_ref.984 as imports.%Main.import_ref.bb2 [from "action.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = imports.%Main.import_ref.7b5 -// CHECK:STDOUT: witness = imports.%Main.import_ref.7a1 +// CHECK:STDOUT: witness = imports.%Main.import_ref.19c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B [from "action.carbon"] { @@ -801,12 +803,12 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Method.type.117: type = fn_type @Method.1, @Factory(%B) [concrete] // CHECK:STDOUT: %Method.ea9: %Method.type.117 = struct_value () [concrete] // CHECK:STDOUT: %assoc1.02a: %Factory.assoc_type.579 = assoc_entity element1, @Factory.%Method.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Make.decl, @impl.%Method.decl) [concrete] +// CHECK:STDOUT: %Factory.impl_witness: = impl_witness file.%Factory.impl_witness_table [concrete] // CHECK:STDOUT: %Make.type.ec4: type = fn_type @Make.2 [concrete] // CHECK:STDOUT: %Make.377: %Make.type.ec4 = struct_value () [concrete] // CHECK:STDOUT: %Method.type.af5: type = fn_type @Method.2 [concrete] // CHECK:STDOUT: %Method.3d4: %Method.type.af5 = struct_value () [concrete] -// CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value %A, (%impl_witness) [concrete] +// CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value %A, (%Factory.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -828,7 +830,8 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%B)> [concrete = constants.%Factory.type.a5d] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Make.decl, @impl.%Method.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Factory.impl_witness_table = impl_witness_table (@impl.%Make.decl, @impl.%Method.decl), @impl [concrete] +// CHECK:STDOUT: %Factory.impl_witness: = impl_witness %Factory.impl_witness_table [concrete = constants.%Factory.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Factory(%T.loc4_19.1: type) { @@ -913,7 +916,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .B = // CHECK:STDOUT: .Make = %Make.decl // CHECK:STDOUT: .Method = %Method.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Factory.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -1033,15 +1036,16 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %MakeB.type: type = fn_type @MakeB [concrete] // CHECK:STDOUT: %MakeB: %MakeB.type = struct_value () [concrete] // CHECK:STDOUT: %assoc0.46d25f.2: %Factory.assoc_type.207 = assoc_entity element0, imports.%Main.import_ref.21018a.2 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Main.import_ref.9ec, imports.%Main.import_ref.7dd) [concrete] -// CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value %A, (%impl_witness) [concrete] -// CHECK:STDOUT: %.b98: type = fn_type_with_self_type %Make.type.c59, %Factory.facet [concrete] +// CHECK:STDOUT: %Factory.impl_witness_table = impl_witness_table (imports.%Main.import_ref.9ec, imports.%Main.import_ref.7dd), @impl [concrete] +// CHECK:STDOUT: %Factory.impl_witness: = impl_witness %Factory.impl_witness_table [concrete] +// CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value %A, (%Factory.impl_witness) [concrete] +// CHECK:STDOUT: %.711: type = fn_type_with_self_type %Make.type.c59, %Factory.facet [concrete] // CHECK:STDOUT: %Make.type.ec4: type = fn_type @Make.2 [concrete] // CHECK:STDOUT: %Make.377: %Make.type.ec4 = struct_value () [concrete] // CHECK:STDOUT: %InstanceB.type: type = fn_type @InstanceB [concrete] // CHECK:STDOUT: %InstanceB: %InstanceB.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1.16541d.2: %Factory.assoc_type.207 = assoc_entity element1, imports.%Main.import_ref.46fc3c.2 [symbolic] -// CHECK:STDOUT: %.ac0: type = fn_type_with_self_type %Method.type.117, %Factory.facet [concrete] +// CHECK:STDOUT: %.fed: type = fn_type_with_self_type %Method.type.117, %Factory.facet [concrete] // CHECK:STDOUT: %Method.type.af5: type = fn_type @Method.2 [concrete] // CHECK:STDOUT: %Method.3d4: %Method.type.af5 = struct_value () [concrete] // CHECK:STDOUT: } @@ -1058,7 +1062,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.2e4: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.16541d.2)] // CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded // CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded -// CHECK:STDOUT: %Main.import_ref.f8d: = import_ref Main//factory, loc14_22, loaded [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Main.import_ref.6fd: = import_ref Main//factory, loc14_22, loaded [concrete = constants.%Factory.impl_witness] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst74 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.984: type = import_ref Main//factory, loc14_6, loaded [concrete = constants.%A] @@ -1134,7 +1138,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = imports.%Main.import_ref.a27 // CHECK:STDOUT: .Method = imports.%Main.import_ref.163 -// CHECK:STDOUT: witness = imports.%Main.import_ref.f8d +// CHECK:STDOUT: witness = imports.%Main.import_ref.6fd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B [from "factory.carbon"] { @@ -1174,10 +1178,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%B)> [concrete = constants.%Factory.type.a5d] // CHECK:STDOUT: %.loc5_23: %Factory.assoc_type.579 = specific_constant imports.%Main.import_ref.46c, @Factory(constants.%B) [concrete = constants.%assoc0.153] // CHECK:STDOUT: %Make.ref: %Factory.assoc_type.579 = name_ref Make, %.loc5_23 [concrete = constants.%assoc0.153] -// CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value constants.%A, (constants.%impl_witness) [concrete = constants.%Factory.facet] +// CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value constants.%A, (constants.%Factory.impl_witness) [concrete = constants.%Factory.facet] // CHECK:STDOUT: %.loc5_11: %Factory.type.a5d = converted %A.ref, %Factory.facet [concrete = constants.%Factory.facet] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc5_11, element0 [concrete = constants.%impl_witness] -// CHECK:STDOUT: %impl.elem0: %.b98 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%Make.377] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc5_11, element0 [concrete = constants.%Factory.impl_witness] +// CHECK:STDOUT: %impl.elem0: %.711 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%Make.377] // CHECK:STDOUT: %.loc4: ref %B = splice_block %return {} // CHECK:STDOUT: %Make.call: init %B = call %impl.elem0() to %.loc4 // CHECK:STDOUT: return %Make.call to %return @@ -1193,7 +1197,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%B)> [concrete = constants.%Factory.type.a5d] // CHECK:STDOUT: %.loc8: %Factory.assoc_type.579 = specific_constant imports.%Main.import_ref.2e4, @Factory(constants.%B) [concrete = constants.%assoc1.a48] // CHECK:STDOUT: %Method.ref: %Factory.assoc_type.579 = name_ref Method, %.loc8 [concrete = constants.%assoc1.a48] -// CHECK:STDOUT: %impl.elem1: %.ac0 = impl_witness_access constants.%impl_witness, element1 [concrete = constants.%Method.3d4] +// CHECK:STDOUT: %impl.elem1: %.fed = impl_witness_access constants.%Factory.impl_witness, element1 [concrete = constants.%Method.3d4] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %.loc7: ref %B = splice_block %return {} // CHECK:STDOUT: %Method.call: init %B = call %bound_method(%a.ref) to %.loc7 @@ -1301,7 +1305,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.2e4: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.165)] // CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded // CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded -// CHECK:STDOUT: %Main.import_ref.e41 = import_ref Main//factory, loc14_22, unloaded +// CHECK:STDOUT: %Main.import_ref.4c3 = import_ref Main//factory, loc14_22, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst74 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.984: type = import_ref Main//factory, loc14_6, loaded [concrete = constants.%A] @@ -1381,7 +1385,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = imports.%Main.import_ref.a27 // CHECK:STDOUT: .Method = imports.%Main.import_ref.163 -// CHECK:STDOUT: witness = imports.%Main.import_ref.e41 +// CHECK:STDOUT: witness = imports.%Main.import_ref.4c3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B [from "factory.carbon"] { diff --git a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon index 5eabffb9e5d8..2654c3e7e7d0 100644 --- a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon @@ -106,7 +106,7 @@ impl () as D; // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness file.%A.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -119,7 +119,8 @@ impl () as D; // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { @@ -137,8 +138,8 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.1bcebf.1: = impl_witness () [concrete] -// CHECK:STDOUT: %impl_witness.1bcebf.2: = impl_witness () [concrete] +// CHECK:STDOUT: %A.impl_witness.b6792d.1: = impl_witness file.%A.impl_witness_table.loc8 [concrete] +// CHECK:STDOUT: %A.impl_witness.b6792d.2: = impl_witness file.%A.impl_witness_table.loc14 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -159,13 +160,15 @@ impl () as D; // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%Main.A [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc8: = impl_witness () [concrete = constants.%impl_witness.1bcebf.1] +// CHECK:STDOUT: %A.impl_witness_table.loc8 = impl_witness_table (), @impl.064930.2 [concrete] +// CHECK:STDOUT: %A.impl_witness.loc8: = impl_witness %A.impl_witness_table.loc8 [concrete = constants.%A.impl_witness.b6792d.1] // CHECK:STDOUT: impl_decl @impl.064930.3 [concrete] {} { // CHECK:STDOUT: %.loc14_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc14_7.2: type = converted %.loc14_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%Main.A [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc14: = impl_witness () [concrete = constants.%impl_witness.1bcebf.2] +// CHECK:STDOUT: %A.impl_witness_table.loc14 = impl_witness_table (), @impl.064930.3 [concrete] +// CHECK:STDOUT: %A.impl_witness.loc14: = impl_witness %A.impl_witness_table.loc14 [concrete = constants.%A.impl_witness.b6792d.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A [from "fail_decl_in_api_definition_in_impl.carbon"] { @@ -180,7 +183,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.064930.3: %.loc14_7.2 as %A.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc14 +// CHECK:STDOUT: witness = file.%A.impl_witness.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- use_decl_in_api.carbon @@ -209,7 +212,7 @@ impl () as D; // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] // CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %B.impl_witness: = impl_witness file.%B.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -222,7 +225,8 @@ impl () as D; // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %B.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %B.impl_witness: = impl_witness %B.impl_witness_table [concrete = constants.%B.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @B { @@ -271,7 +275,7 @@ impl () as D; // CHECK:STDOUT: %C.type: type = facet_type <@C> [concrete] // CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %C.impl_witness: = impl_witness file.%C.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -284,7 +288,8 @@ impl () as D; // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %C.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %C.impl_witness: = impl_witness %C.impl_witness_table [concrete = constants.%C.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @C { @@ -302,7 +307,7 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = facet_type <@C> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %C.impl_witness: = impl_witness file.%C.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -323,7 +328,8 @@ impl () as D; // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %C.impl_witness_table = impl_witness_table (), @impl.590fe9.2 [concrete] +// CHECK:STDOUT: %C.impl_witness: = impl_witness %C.impl_witness_table [concrete = constants.%C.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @C [from "fail_decl_in_api_decl_in_impl.carbon"] { @@ -348,7 +354,7 @@ impl () as D; // CHECK:STDOUT: %D.type: type = facet_type <@D> [concrete] // CHECK:STDOUT: %Self: %D.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %D.impl_witness: = impl_witness file.%D.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -363,7 +369,8 @@ impl () as D; // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %D.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %D.impl_witness: = impl_witness %D.impl_witness_table [concrete = constants.%D.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @D { diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon index d307617b8108..39e216e16698 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon @@ -36,10 +36,10 @@ class A { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %A: type = class_type @A [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Make.decl) [concrete] +// CHECK:STDOUT: %DefaultConstructible.impl_witness: = impl_witness @A.%DefaultConstructible.impl_witness_table [concrete] // CHECK:STDOUT: %Make.type.351: type = fn_type @Make.2 [concrete] // CHECK:STDOUT: %Make.b73: %Make.type.351 = struct_value () [concrete] -// CHECK:STDOUT: %DefaultConstructible.facet: %DefaultConstructible.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %DefaultConstructible.facet: %DefaultConstructible.type = facet_value %C, (%DefaultConstructible.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -86,7 +86,7 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: witness = @A.%impl_witness +// CHECK:STDOUT: witness = @A.%DefaultConstructible.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -103,7 +103,8 @@ class A { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %DefaultConstructible.ref: type = name_ref DefaultConstructible, file.%DefaultConstructible.decl [concrete = constants.%DefaultConstructible.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Make.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %DefaultConstructible.impl_witness_table = impl_witness_table (@impl.%Make.decl), @impl [concrete] +// CHECK:STDOUT: %DefaultConstructible.impl_witness: = impl_witness %DefaultConstructible.impl_witness_table [concrete = constants.%DefaultConstructible.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon index 471c55eca759..df8202fef9ba 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -51,15 +51,15 @@ impl D as SelfNested { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %impl_witness.9ff: = impl_witness (@impl.c4a.%F.decl) [concrete] +// CHECK:STDOUT: %UseSelf.impl_witness.b25: = impl_witness file.%UseSelf.impl_witness_table.loc19 [concrete] // CHECK:STDOUT: %F.type.fc6: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.5e2: %F.type.fc6 = struct_value () [concrete] -// CHECK:STDOUT: %UseSelf.facet.692: %UseSelf.type = facet_value %C, (%impl_witness.9ff) [concrete] +// CHECK:STDOUT: %UseSelf.facet.727: %UseSelf.type = facet_value %C, (%UseSelf.impl_witness.b25) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.320: = impl_witness (@impl.659.%F.decl) [concrete] +// CHECK:STDOUT: %UseSelf.impl_witness.f90: = impl_witness file.%UseSelf.impl_witness_table.loc23 [concrete] // CHECK:STDOUT: %F.type.0aa: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.f71: %F.type.0aa = struct_value () [concrete] -// CHECK:STDOUT: %UseSelf.facet.5ea: %UseSelf.type = facet_value %D, (%impl_witness.320) [concrete] +// CHECK:STDOUT: %UseSelf.facet.d11: %UseSelf.type = facet_value %D, (%UseSelf.impl_witness.f90) [concrete] // CHECK:STDOUT: %D.val: %D = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete] // CHECK:STDOUT: %Self.2ff: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] @@ -72,20 +72,20 @@ impl D as SelfNested { // CHECK:STDOUT: %F.998: %F.type.6ed = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete] // CHECK:STDOUT: %assoc0.beb: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness.f4e: = impl_witness (@impl.730.%F.decl) [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.5d5: = impl_witness file.%SelfNested.impl_witness_table.loc31 [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %struct_type.x.y.2f0: type = struct_type {.x: %C, .y: %empty_tuple.type} [concrete] // CHECK:STDOUT: %tuple.type.a17: type = tuple_type (%ptr.019, %struct_type.x.y.2f0) [concrete] // CHECK:STDOUT: %F.type.ef0: type = fn_type @F.5 [concrete] // CHECK:STDOUT: %F.9a9: %F.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %SelfNested.facet.5ec: %SelfNested.type = facet_value %C, (%impl_witness.f4e) [concrete] -// CHECK:STDOUT: %impl_witness.4b5: = impl_witness (@impl.82d.%F.decl) [concrete] +// CHECK:STDOUT: %SelfNested.facet.2b2: %SelfNested.type = facet_value %C, (%SelfNested.impl_witness.5d5) [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.16b: = impl_witness file.%SelfNested.impl_witness_table.loc35 [concrete] // CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete] // CHECK:STDOUT: %struct_type.x.y.527: type = struct_type {.x: %D, .y: %empty_tuple.type} [concrete] // CHECK:STDOUT: %tuple.type.a5f: type = tuple_type (%ptr.19c, %struct_type.x.y.527) [concrete] // CHECK:STDOUT: %F.type.a9d: type = fn_type @F.6 [concrete] // CHECK:STDOUT: %F.c41: %F.type.a9d = struct_value () [concrete] -// CHECK:STDOUT: %SelfNested.facet.821: %SelfNested.type = facet_value %D, (%impl_witness.4b5) [concrete] +// CHECK:STDOUT: %SelfNested.facet.f2c: %SelfNested.type = facet_value %D, (%SelfNested.impl_witness.16b) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -102,23 +102,27 @@ impl D as SelfNested { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [concrete = constants.%UseSelf.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc19: = impl_witness (@impl.c4a.%F.decl) [concrete = constants.%impl_witness.9ff] +// CHECK:STDOUT: %UseSelf.impl_witness_table.loc19 = impl_witness_table (@impl.c4a.%F.decl), @impl.c4a [concrete] +// CHECK:STDOUT: %UseSelf.impl_witness.loc19: = impl_witness %UseSelf.impl_witness_table.loc19 [concrete = constants.%UseSelf.impl_witness.b25] // CHECK:STDOUT: impl_decl @impl.659 [concrete] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [concrete = constants.%UseSelf.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc23: = impl_witness (@impl.659.%F.decl) [concrete = constants.%impl_witness.320] +// CHECK:STDOUT: %UseSelf.impl_witness_table.loc23 = impl_witness_table (@impl.659.%F.decl), @impl.659 [concrete] +// CHECK:STDOUT: %UseSelf.impl_witness.loc23: = impl_witness %UseSelf.impl_witness_table.loc23 [concrete = constants.%UseSelf.impl_witness.f90] // CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [concrete = constants.%SelfNested.type] {} {} // CHECK:STDOUT: impl_decl @impl.730 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc31: = impl_witness (@impl.730.%F.decl) [concrete = constants.%impl_witness.f4e] +// CHECK:STDOUT: %SelfNested.impl_witness_table.loc31 = impl_witness_table (@impl.730.%F.decl), @impl.730 [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.loc31: = impl_witness %SelfNested.impl_witness_table.loc31 [concrete = constants.%SelfNested.impl_witness.5d5] // CHECK:STDOUT: impl_decl @impl.82d [concrete] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc35: = impl_witness (@impl.82d.%F.decl) [concrete = constants.%impl_witness.4b5] +// CHECK:STDOUT: %SelfNested.impl_witness_table.loc35 = impl_witness_table (@impl.82d.%F.decl), @impl.82d [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.loc35: = impl_witness %SelfNested.impl_witness_table.loc35 [concrete = constants.%SelfNested.impl_witness.16b] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { @@ -213,7 +217,7 @@ impl D as SelfNested { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc19 +// CHECK:STDOUT: witness = file.%UseSelf.impl_witness.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.659: %D.ref as %UseSelf.ref { @@ -238,7 +242,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc23 +// CHECK:STDOUT: witness = file.%UseSelf.impl_witness.loc23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.730: %C.ref as %SelfNested.ref { @@ -263,7 +267,7 @@ impl D as SelfNested { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc31 +// CHECK:STDOUT: witness = file.%SelfNested.impl_witness.loc31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.82d: %D.ref as %SelfNested.ref { @@ -287,7 +291,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc35 +// CHECK:STDOUT: witness = file.%SelfNested.impl_witness.loc35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -350,13 +354,13 @@ impl D as SelfNested { // CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type.599 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%UseSelf.facet.692) { -// CHECK:STDOUT: %Self => constants.%UseSelf.facet.692 +// CHECK:STDOUT: specific @F.1(constants.%UseSelf.facet.727) { +// CHECK:STDOUT: %Self => constants.%UseSelf.facet.727 // CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%UseSelf.facet.5ea) { -// CHECK:STDOUT: %Self => constants.%UseSelf.facet.5ea +// CHECK:STDOUT: specific @F.1(constants.%UseSelf.facet.d11) { +// CHECK:STDOUT: %Self => constants.%UseSelf.facet.d11 // CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: @@ -368,16 +372,16 @@ impl D as SelfNested { // CHECK:STDOUT: %tuple.type => constants.%tuple.type.46b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.4(constants.%SelfNested.facet.5ec) { -// CHECK:STDOUT: %Self => constants.%SelfNested.facet.5ec +// CHECK:STDOUT: specific @F.4(constants.%SelfNested.facet.2b2) { +// CHECK:STDOUT: %Self => constants.%SelfNested.facet.2b2 // CHECK:STDOUT: %Self.as_type.loc28_16.1 => constants.%C // CHECK:STDOUT: %ptr.loc28_16.1 => constants.%ptr.019 // CHECK:STDOUT: %struct_type.x.y.loc28_36.1 => constants.%struct_type.x.y.2f0 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.4(constants.%SelfNested.facet.821) { -// CHECK:STDOUT: %Self => constants.%SelfNested.facet.821 +// CHECK:STDOUT: specific @F.4(constants.%SelfNested.facet.f2c) { +// CHECK:STDOUT: %Self => constants.%SelfNested.facet.f2c // CHECK:STDOUT: %Self.as_type.loc28_16.1 => constants.%D // CHECK:STDOUT: %ptr.loc28_16.1 => constants.%ptr.19c // CHECK:STDOUT: %struct_type.x.y.loc28_36.1 => constants.%struct_type.x.y.527 diff --git a/toolchain/check/testdata/impl/no_prelude/todo_impl_with_unrelated_fn.carbon b/toolchain/check/testdata/impl/no_prelude/todo_impl_with_unrelated_fn.carbon index 230fdba869ec..b23d484cd5ca 100644 --- a/toolchain/check/testdata/impl/no_prelude/todo_impl_with_unrelated_fn.carbon +++ b/toolchain/check/testdata/impl/no_prelude/todo_impl_with_unrelated_fn.carbon @@ -31,12 +31,12 @@ class X { // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%B.decl [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%B.decl) [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness @X.%A.impl_witness_table [concrete] // CHECK:STDOUT: %B.type.d47: type = fn_type @B.2 [concrete] // CHECK:STDOUT: %B.4af: %B.type.d47 = struct_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %A.facet: %A.type = facet_value %X, (%impl_witness) [concrete] +// CHECK:STDOUT: %A.facet: %A.type = facet_value %X, (%A.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } @@ -68,7 +68,7 @@ class X { // CHECK:STDOUT: !members: // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @X.%impl_witness +// CHECK:STDOUT: witness = @X.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -76,7 +76,8 @@ class X { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X [concrete = constants.%X] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%B.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@impl.%B.decl), @impl [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index 9a0e63362c7b..9fb6f32e1d41 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -25,7 +25,7 @@ impl i32 as I {} // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -52,7 +52,8 @@ impl i32 as I {} // CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -71,7 +72,7 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %i32.loc13 as %I.ref.loc13 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { diff --git a/toolchain/check/testdata/impl/use_assoc_const.carbon b/toolchain/check/testdata/impl/use_assoc_const.carbon index 677605dd0a1f..aff0059a5ffe 100644 --- a/toolchain/check/testdata/impl/use_assoc_const.carbon +++ b/toolchain/check/testdata/impl/use_assoc_const.carbon @@ -306,33 +306,35 @@ fn F() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %J_where.type.b78: type = facet_type <@J where %impl.elem0.53a = %i32> [concrete] -// CHECK:STDOUT: %impl_witness.081: = impl_witness (file.%impl_witness_assoc_constant.loc8, @impl.05c.%F.decl) [concrete] +// CHECK:STDOUT: %J.impl_witness.98f: = impl_witness file.%J.impl_witness_table.loc8 [concrete] // CHECK:STDOUT: %F.type.ea9: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.405: %F.type.ea9 = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.ed1: %J.type = facet_value %empty_tuple.type, (%impl_witness.081) [concrete] +// CHECK:STDOUT: %J.facet.9f4: %J.type = facet_value %empty_tuple.type, (%J.impl_witness.98f) [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %impl_witness.01d: = impl_witness (imports.%Core.import_ref.344), @impl.2c2(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (imports.%Core.import_ref.344), @impl.2c2 [concrete] +// CHECK:STDOUT: %Add.impl_witness.dbc: = impl_witness %Add.impl_witness_table, @impl.2c2(%int_32) [concrete] // CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete] // CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%impl_witness.01d) [concrete] -// CHECK:STDOUT: %.f1a: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete] +// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c82, @Op.2(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %CallMethod.type: type = fn_type @CallMethod [concrete] // CHECK:STDOUT: %CallMethod: %CallMethod.type = struct_value () [concrete] -// CHECK:STDOUT: %.9d9: type = fn_type_with_self_type %F.type.c14, %J.facet.ed1 [concrete] +// CHECK:STDOUT: %.011: type = fn_type_with_self_type %F.type.c14, %J.facet.9f4 [concrete] // CHECK:STDOUT: %int_40.f80: Core.IntLiteral = int_value 40 [concrete] // CHECK:STDOUT: %Convert.bound.e52: = bound_method %int_40.f80, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.7b8: = bound_method %int_40.f80, %Convert.specific_fn [concrete] @@ -341,10 +343,10 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %J_where.type.6f2: type = facet_type <@J where %impl.elem0.53a = %C> [concrete] -// CHECK:STDOUT: %impl_witness.282: = impl_witness (file.%impl_witness_assoc_constant.loc21, @impl.f57.%F.decl) [concrete] +// CHECK:STDOUT: %J.impl_witness.a6b: = impl_witness file.%J.impl_witness_table.loc21 [concrete] // CHECK:STDOUT: %F.type.69d: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.451: %F.type.69d = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.444: %J.type = facet_value %C, (%impl_witness.282) [concrete] +// CHECK:STDOUT: %J.facet.54f: %J.type = facet_value %C, (%J.impl_witness.a6b) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -383,7 +385,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc8: = impl_witness (%impl_witness_assoc_constant.loc8, @impl.05c.%F.decl) [concrete = constants.%impl_witness.081] +// CHECK:STDOUT: %J.impl_witness_table.loc8 = impl_witness_table (%impl_witness_assoc_constant.loc8, @impl.05c.%F.decl), @impl.05c [concrete] +// CHECK:STDOUT: %J.impl_witness.loc8: = impl_witness %J.impl_witness_table.loc8 [concrete = constants.%J.impl_witness.98f] // CHECK:STDOUT: %impl_witness_assoc_constant.loc8: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %CallMethod.decl: %CallMethod.type = fn_decl @CallMethod [concrete = constants.%CallMethod] { // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x @@ -418,7 +421,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.ref.loc21_24 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc21: = impl_witness (%impl_witness_assoc_constant.loc21, @impl.f57.%F.decl) [concrete = constants.%impl_witness.282] +// CHECK:STDOUT: %J.impl_witness_table.loc21 = impl_witness_table (%impl_witness_assoc_constant.loc21, @impl.f57.%F.decl), @impl.f57 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc21: = impl_witness %J.impl_witness_table.loc21 [concrete = constants.%J.impl_witness.a6b] // CHECK:STDOUT: %impl_witness_assoc_constant.loc21: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -494,7 +498,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc8 +// CHECK:STDOUT: witness = file.%J.impl_witness.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.f57: %C.ref.loc21_6 as %.loc21_13 { @@ -520,7 +524,7 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc21 +// CHECK:STDOUT: witness = file.%J.impl_witness.loc21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -547,11 +551,11 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc9_46: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0.loc9_46: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method.loc9_46.1: = bound_method %u.ref, %impl.elem0.loc9_46 // CHECK:STDOUT: %specific_fn.loc9_46: = specific_function %impl.elem0.loc9_46, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_46.2: = bound_method %u.ref, %specific_fn.loc9_46 -// CHECK:STDOUT: %impl.elem0.loc9_48: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9_48: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_48.1: = bound_method %int_2, %impl.elem0.loc9_48 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc9_48: = specific_function %impl.elem0.loc9_48, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_48.2: = bound_method %int_2, %specific_fn.loc9_48 [concrete = constants.%bound_method.b92] @@ -569,10 +573,10 @@ fn F() { // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1: %.9d9 = impl_witness_access constants.%impl_witness.081, element1 [concrete = constants.%F.405] +// CHECK:STDOUT: %impl.elem1: %.011 = impl_witness_access constants.%J.impl_witness.98f, element1 [concrete = constants.%F.405] // CHECK:STDOUT: %bound_method.loc13_11: = bound_method %x.ref, %impl.elem1 // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40.f80] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_18.1: = bound_method %int_40, %impl.elem0 [concrete = constants.%Convert.bound.e52] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_18.2: = bound_method %int_40, %specific_fn [concrete = constants.%bound_method.7b8] @@ -604,17 +608,17 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J.facet.ed1) { -// CHECK:STDOUT: %Self => constants.%J.facet.ed1 +// CHECK:STDOUT: specific @F.1(constants.%J.facet.9f4) { +// CHECK:STDOUT: %Self => constants.%J.facet.9f4 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%impl_witness.081 +// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%J.impl_witness.98f // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J.facet.444) { -// CHECK:STDOUT: %Self => constants.%J.facet.444 +// CHECK:STDOUT: specific @F.1(constants.%J.facet.54f) { +// CHECK:STDOUT: %Self => constants.%J.facet.54f // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%C -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%impl_witness.282 +// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%J.impl_witness.a6b // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: @@ -643,33 +647,35 @@ fn F() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.53a = %i32> [concrete] -// CHECK:STDOUT: %impl_witness.eff: = impl_witness (file.%impl_witness_assoc_constant, @impl.847.%F.decl) [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.d45: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.fdb: %F.type.d45 = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.6d9: %J.type = facet_value %D, (%impl_witness.eff) [concrete] +// CHECK:STDOUT: %J.facet.8a4: %J.type = facet_value %D, (%J.impl_witness) [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %impl_witness.01d: = impl_witness (imports.%Core.import_ref.344), @impl.2c2(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (imports.%Core.import_ref.344), @impl.2c2 [concrete] +// CHECK:STDOUT: %Add.impl_witness.dbc: = impl_witness %Add.impl_witness_table, @impl.2c2(%int_32) [concrete] // CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete] // CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%impl_witness.01d) [concrete] -// CHECK:STDOUT: %.f1a: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete] +// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c82, @Op.2(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %CallFunction.type: type = fn_type @CallFunction [concrete] // CHECK:STDOUT: %CallFunction: %CallFunction.type = struct_value () [concrete] -// CHECK:STDOUT: %.32d: type = fn_type_with_self_type %F.type.c14, %J.facet.6d9 [concrete] +// CHECK:STDOUT: %.c1e: type = fn_type_with_self_type %F.type.c14, %J.facet.8a4 [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Convert.bound.ac3: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.1da: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] @@ -712,7 +718,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant, @impl.847.%F.decl) [concrete = constants.%impl_witness.eff] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.847.%F.decl), @impl.847 [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %CallFunction.decl: %CallFunction.type = fn_decl @CallFunction [concrete = constants.%CallFunction] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern @@ -783,7 +790,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -807,11 +814,11 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc11_34: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0.loc11_34: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method.loc11_34.1: = bound_method %u.ref, %impl.elem0.loc11_34 // CHECK:STDOUT: %specific_fn.loc11_34: = specific_function %impl.elem0.loc11_34, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc11_34.2: = bound_method %u.ref, %specific_fn.loc11_34 -// CHECK:STDOUT: %impl.elem0.loc11_36: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_36: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_36.1: = bound_method %int_3, %impl.elem0.loc11_36 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc11_36: = specific_function %impl.elem0.loc11_36, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_36.2: = bound_method %int_3, %specific_fn.loc11_36 [concrete = constants.%bound_method.047] @@ -829,12 +836,12 @@ fn F() { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %J.facet: %J.type = facet_value constants.%D, (constants.%impl_witness.eff) [concrete = constants.%J.facet.6d9] -// CHECK:STDOUT: %.loc15_11: %J.type = converted %D.ref, %J.facet [concrete = constants.%J.facet.6d9] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc15_11, element0 [concrete = constants.%impl_witness.eff] -// CHECK:STDOUT: %impl.elem1: %.32d = impl_witness_access %as_wit.iface0, element1 [concrete = constants.%F.fdb] +// CHECK:STDOUT: %J.facet: %J.type = facet_value constants.%D, (constants.%J.impl_witness) [concrete = constants.%J.facet.8a4] +// CHECK:STDOUT: %.loc15_11: %J.type = converted %D.ref, %J.facet [concrete = constants.%J.facet.8a4] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc15_11, element0 [concrete = constants.%J.impl_witness] +// CHECK:STDOUT: %impl.elem1: %.c1e = impl_witness_access %as_wit.iface0, element1 [concrete = constants.%F.fdb] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_18.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_18.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method.1da] @@ -859,9 +866,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J.facet.6d9) { -// CHECK:STDOUT: %Self => constants.%J.facet.6d9 -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%impl_witness.eff +// CHECK:STDOUT: specific @F.1(constants.%J.facet.8a4) { +// CHECK:STDOUT: %Self => constants.%J.facet.8a4 +// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%J.impl_witness // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -891,12 +898,12 @@ fn F() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.53a = %i32> [concrete] -// CHECK:STDOUT: %impl_witness.d67: = impl_witness (@E.%impl_witness_assoc_constant, @impl.2dd.%F.decl, @impl.2dd.%G.decl) [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness @E.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.e5e: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.c81: %F.type.e5e = struct_value () [concrete] // CHECK:STDOUT: %G.type.89e: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.105: %G.type.89e = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.0c8: %J.type = facet_value %E, (%impl_witness.d67) [concrete] +// CHECK:STDOUT: %J.facet.557: %J.type = facet_value %E, (%J.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] @@ -904,19 +911,21 @@ fn F() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %impl_witness.01d: = impl_witness (imports.%Core.import_ref.344), @impl.2c2(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (imports.%Core.import_ref.344), @impl.2c2 [concrete] +// CHECK:STDOUT: %Add.impl_witness.dbc: = impl_witness %Add.impl_witness_table, @impl.2c2(%int_32) [concrete] // CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete] // CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%impl_witness.01d) [concrete] -// CHECK:STDOUT: %.f1a: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete] +// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c82, @Op.2(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -927,8 +936,8 @@ fn F() { // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %CallBoth.type: type = fn_type @CallBoth [concrete] // CHECK:STDOUT: %CallBoth: %CallBoth.type = struct_value () [concrete] -// CHECK:STDOUT: %.7da: type = fn_type_with_self_type %F.type.c14, %J.facet.0c8 [concrete] -// CHECK:STDOUT: %.baf: type = fn_type_with_self_type %G.type.285, %J.facet.0c8 [concrete] +// CHECK:STDOUT: %.171: type = fn_type_with_self_type %F.type.c14, %J.facet.557 [concrete] +// CHECK:STDOUT: %.928: type = fn_type_with_self_type %G.type.285, %J.facet.557 [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] @@ -960,7 +969,7 @@ fn F() { // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @F.1(%J.facet.085e97.2) [symbolic] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] -// CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF, @GenericCallF(%J.facet.0c8) [concrete] +// CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF, @GenericCallF(%J.facet.557) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1163,7 +1172,7 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = @E.%impl_witness +// CHECK:STDOUT: witness = @E.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { @@ -1183,7 +1192,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant, @impl.2dd.%F.decl, @impl.2dd.%G.decl) [concrete = constants.%impl_witness.d67] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.2dd.%F.decl, @impl.2dd.%G.decl), @impl.2dd [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1218,11 +1228,11 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc12_16: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0.loc12_16: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method.loc12_16.1: = bound_method %u.ref, %impl.elem0.loc12_16 // CHECK:STDOUT: %specific_fn.loc12_16: = specific_function %impl.elem0.loc12_16, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc12_16.2: = bound_method %u.ref, %specific_fn.loc12_16 -// CHECK:STDOUT: %impl.elem0.loc12_18: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_18.1: = bound_method %int_1, %impl.elem0.loc12_18 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc12_18: = specific_function %impl.elem0.loc12_18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_18.2: = bound_method %int_1, %specific_fn.loc12_18 [concrete = constants.%bound_method.9a1] @@ -1239,11 +1249,11 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.ref: %i32 = name_ref v, %v // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc15_16: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0.loc15_16: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method.loc15_16.1: = bound_method %v.ref, %impl.elem0.loc15_16 // CHECK:STDOUT: %specific_fn.loc15_16: = specific_function %impl.elem0.loc15_16, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_16.2: = bound_method %v.ref, %specific_fn.loc15_16 -// CHECK:STDOUT: %impl.elem0.loc15_18: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15_18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_18.1: = bound_method %int_2, %impl.elem0.loc15_18 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc15_18: = specific_function %impl.elem0.loc15_18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_18.2: = bound_method %int_2, %specific_fn.loc15_18 [concrete = constants.%bound_method.b92] @@ -1260,9 +1270,9 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %e.ref.loc21_10: %E = name_ref e, %e // CHECK:STDOUT: %F.ref.loc21_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc21_11: %.7da = impl_witness_access constants.%impl_witness.d67, element1 [concrete = constants.%F.c81] +// CHECK:STDOUT: %impl.elem1.loc21_11: %.171 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.c81] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc21_14: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_14.1: = bound_method %int_2, %impl.elem0.loc21_14 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc21_14: = specific_function %impl.elem0.loc21_14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_14.2: = bound_method %int_2, %specific_fn.loc21_14 [concrete = constants.%bound_method.b92] @@ -1272,10 +1282,10 @@ fn F() { // CHECK:STDOUT: %F.call.loc21_15: init %i32 = call %impl.elem1.loc21_11(%.loc21_14.2) // CHECK:STDOUT: %e.ref.loc21_19: %E = name_ref e, %e // CHECK:STDOUT: %G.ref.loc21_20: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc21_20: %.baf = impl_witness_access constants.%impl_witness.d67, element2 [concrete = constants.%G.105] +// CHECK:STDOUT: %impl.elem2.loc21_20: %.928 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.105] // CHECK:STDOUT: %bound_method.loc21_20: = bound_method %e.ref.loc21_19, %impl.elem2.loc21_20 // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc21_23: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_23.1: = bound_method %int_3, %impl.elem0.loc21_23 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc21_23: = specific_function %impl.elem0.loc21_23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_23.2: = bound_method %int_3, %specific_fn.loc21_23 [concrete = constants.%bound_method.047] @@ -1283,7 +1293,7 @@ fn F() { // CHECK:STDOUT: %.loc21_23.1: %i32 = value_of_initializer %int.convert_checked.loc21_23 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc21_23.2: %i32 = converted %int_3, %.loc21_23.1 [concrete = constants.%int_3.822] // CHECK:STDOUT: %G.call.loc21_24: init %i32 = call %bound_method.loc21_20(%e.ref.loc21_19, %.loc21_23.2) -// CHECK:STDOUT: %impl.elem0.loc21_17: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0.loc21_17: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method.loc21_17.1: = bound_method %F.call.loc21_15, %impl.elem0.loc21_17 // CHECK:STDOUT: %specific_fn.loc21_17: = specific_function %impl.elem0.loc21_17, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_17.2: = bound_method %F.call.loc21_15, %specific_fn.loc21_17 @@ -1294,9 +1304,9 @@ fn F() { // CHECK:STDOUT: %int.sadd.loc21_17: init %i32 = call %bound_method.loc21_17.2(%.loc21_15.2, %.loc21_24.2) // CHECK:STDOUT: %E.ref.loc21_28: type = name_ref E, file.%E.decl [concrete = constants.%E] // CHECK:STDOUT: %F.ref.loc21_29: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc21_29: %.7da = impl_witness_access constants.%impl_witness.d67, element1 [concrete = constants.%F.c81] +// CHECK:STDOUT: %impl.elem1.loc21_29: %.171 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.c81] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc21_32: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_32.1: = bound_method %int_4, %impl.elem0.loc21_32 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc21_32: = specific_function %impl.elem0.loc21_32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_32.2: = bound_method %int_4, %specific_fn.loc21_32 [concrete = constants.%bound_method.1da] @@ -1304,7 +1314,7 @@ fn F() { // CHECK:STDOUT: %.loc21_32.1: %i32 = value_of_initializer %int.convert_checked.loc21_32 [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc21_32.2: %i32 = converted %int_4, %.loc21_32.1 [concrete = constants.%int_4.940] // CHECK:STDOUT: %F.call.loc21_33: init %i32 = call %impl.elem1.loc21_29(%.loc21_32.2) -// CHECK:STDOUT: %impl.elem0.loc21_26: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0.loc21_26: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method.loc21_26.1: = bound_method %int.sadd.loc21_17, %impl.elem0.loc21_26 // CHECK:STDOUT: %specific_fn.loc21_26: = specific_function %impl.elem0.loc21_26, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_26.2: = bound_method %int.sadd.loc21_17, %specific_fn.loc21_26 @@ -1316,10 +1326,10 @@ fn F() { // CHECK:STDOUT: %e.ref.loc21_37: %E = name_ref e, %e // CHECK:STDOUT: %E.ref.loc21_40: type = name_ref E, file.%E.decl [concrete = constants.%E] // CHECK:STDOUT: %G.ref.loc21_41: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc21_41: %.baf = impl_witness_access constants.%impl_witness.d67, element2 [concrete = constants.%G.105] +// CHECK:STDOUT: %impl.elem2.loc21_41: %.928 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.105] // CHECK:STDOUT: %bound_method.loc21_38: = bound_method %e.ref.loc21_37, %impl.elem2.loc21_41 // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc21_45: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_45: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_45.1: = bound_method %int_5, %impl.elem0.loc21_45 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn.loc21_45: = specific_function %impl.elem0.loc21_45, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_45.2: = bound_method %int_5, %specific_fn.loc21_45 [concrete = constants.%bound_method.a25] @@ -1327,7 +1337,7 @@ fn F() { // CHECK:STDOUT: %.loc21_45.1: %i32 = value_of_initializer %int.convert_checked.loc21_45 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc21_45.2: %i32 = converted %int_5, %.loc21_45.1 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %G.call.loc21_46: init %i32 = call %bound_method.loc21_38(%e.ref.loc21_37, %.loc21_45.2) -// CHECK:STDOUT: %impl.elem0.loc21_35: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0.loc21_35: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method.loc21_35.1: = bound_method %int.sadd.loc21_26, %impl.elem0.loc21_35 // CHECK:STDOUT: %specific_fn.loc21_35: = specific_function %impl.elem0.loc21_35, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_35.2: = bound_method %int.sadd.loc21_26, %specific_fn.loc21_35 @@ -1339,10 +1349,10 @@ fn F() { // CHECK:STDOUT: %e.ref.loc21_50: %E = name_ref e, %e // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %G.ref.loc21_54: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc21_51: %.baf = impl_witness_access constants.%impl_witness.d67, element2 [concrete = constants.%G.105] +// CHECK:STDOUT: %impl.elem2.loc21_51: %.928 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.105] // CHECK:STDOUT: %bound_method.loc21_51: = bound_method %e.ref.loc21_50, %impl.elem2.loc21_51 // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] -// CHECK:STDOUT: %impl.elem0.loc21_58: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21_58: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_58.1: = bound_method %int_6, %impl.elem0.loc21_58 [concrete = constants.%Convert.bound.ce9] // CHECK:STDOUT: %specific_fn.loc21_58: = specific_function %impl.elem0.loc21_58, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_58.2: = bound_method %int_6, %specific_fn.loc21_58 [concrete = constants.%bound_method.efa] @@ -1350,7 +1360,7 @@ fn F() { // CHECK:STDOUT: %.loc21_58.1: %i32 = value_of_initializer %int.convert_checked.loc21_58 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %.loc21_58.2: %i32 = converted %int_6, %.loc21_58.1 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %G.call.loc21_59: init %i32 = call %bound_method.loc21_51(%e.ref.loc21_50, %.loc21_58.2) -// CHECK:STDOUT: %impl.elem0.loc21_48: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0.loc21_48: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method.loc21_48.1: = bound_method %int.sadd.loc21_35, %impl.elem0.loc21_48 // CHECK:STDOUT: %specific_fn.loc21_48: = specific_function %impl.elem0.loc21_48, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_48.2: = bound_method %int.sadd.loc21_35, %specific_fn.loc21_48 @@ -1401,12 +1411,12 @@ fn F() { // CHECK:STDOUT: %GenericCallF.ref: %GenericCallF.type = name_ref GenericCallF, file.%GenericCallF.decl [concrete = constants.%GenericCallF] // CHECK:STDOUT: %e.ref: %E = name_ref e, %e // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %J.facet.loc29_27.1: %J.type = facet_value constants.%E, (constants.%impl_witness.d67) [concrete = constants.%J.facet.0c8] -// CHECK:STDOUT: %.loc29_27.1: %J.type = converted constants.%E, %J.facet.loc29_27.1 [concrete = constants.%J.facet.0c8] -// CHECK:STDOUT: %J.facet.loc29_27.2: %J.type = facet_value constants.%E, (constants.%impl_witness.d67) [concrete = constants.%J.facet.0c8] -// CHECK:STDOUT: %.loc29_27.2: %J.type = converted constants.%E, %J.facet.loc29_27.2 [concrete = constants.%J.facet.0c8] -// CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF.ref, @GenericCallF(constants.%J.facet.0c8) [concrete = constants.%GenericCallF.specific_fn] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %J.facet.loc29_27.1: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet.557] +// CHECK:STDOUT: %.loc29_27.1: %J.type = converted constants.%E, %J.facet.loc29_27.1 [concrete = constants.%J.facet.557] +// CHECK:STDOUT: %J.facet.loc29_27.2: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet.557] +// CHECK:STDOUT: %.loc29_27.2: %J.type = converted constants.%E, %J.facet.loc29_27.2 [concrete = constants.%J.facet.557] +// CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF.ref, @GenericCallF(constants.%J.facet.557) [concrete = constants.%GenericCallF.specific_fn] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_26.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_26.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] @@ -1438,16 +1448,16 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J.facet.0c8) { -// CHECK:STDOUT: %Self => constants.%J.facet.0c8 -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%impl_witness.d67 +// CHECK:STDOUT: specific @F.1(constants.%J.facet.557) { +// CHECK:STDOUT: %Self => constants.%J.facet.557 +// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%J.impl_witness // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%J.facet.0c8) { -// CHECK:STDOUT: %Self => constants.%J.facet.0c8 +// CHECK:STDOUT: specific @G.1(constants.%J.facet.557) { +// CHECK:STDOUT: %Self => constants.%J.facet.557 // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%E -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_23.1 => constants.%impl_witness.d67 +// CHECK:STDOUT: %Self.as_wit.iface0.loc6_23.1 => constants.%J.impl_witness // CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1469,18 +1479,18 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(@GenericCallF.%J.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericCallF(constants.%J.facet.0c8) { -// CHECK:STDOUT: %T.loc24_17.2 => constants.%J.facet.0c8 +// CHECK:STDOUT: specific @GenericCallF(constants.%J.facet.557) { +// CHECK:STDOUT: %T.loc24_17.2 => constants.%J.facet.557 // CHECK:STDOUT: %T.patt.loc24_17.2 => constants.%T.patt // CHECK:STDOUT: %T.as_type.loc24_27.2 => constants.%E -// CHECK:STDOUT: %T.as_wit.iface0.loc24_34.2 => constants.%impl_witness.d67 +// CHECK:STDOUT: %T.as_wit.iface0.loc24_34.2 => constants.%J.impl_witness // CHECK:STDOUT: %impl.elem0.loc24_34.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc24_38 => constants.%complete_type.f8a // CHECK:STDOUT: %require_complete.loc24_25 => constants.%complete_type.357 -// CHECK:STDOUT: %J.facet => constants.%J.facet.0c8 -// CHECK:STDOUT: %.loc25_11.2 => constants.%.7da +// CHECK:STDOUT: %J.facet => constants.%J.facet.557 +// CHECK:STDOUT: %.loc25_11.2 => constants.%.171 // CHECK:STDOUT: %impl.elem1.loc25_11.2 => constants.%F.c81 // CHECK:STDOUT: %specific_impl_fn.loc25_11.2 => constants.%F.c81 // CHECK:STDOUT: } @@ -2149,10 +2159,10 @@ fn F() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.53a = %i32> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@E.%impl_witness_assoc_constant, ) [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness @E.%J.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.e5e: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.c81: %F.type.e5e = struct_value () [concrete] -// CHECK:STDOUT: %J.facet.49f: %J.type = facet_value %E, (%impl_witness) [concrete] +// CHECK:STDOUT: %J.facet.067: %J.type = facet_value %E, (%J.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] @@ -2238,7 +2248,7 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .U = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @E.%impl_witness +// CHECK:STDOUT: witness = @E.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { @@ -2258,7 +2268,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant, ) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, ), @impl [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -2299,9 +2310,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J.facet.49f) { -// CHECK:STDOUT: %Self => constants.%J.facet.49f -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%impl_witness +// CHECK:STDOUT: specific @F.1(constants.%J.facet.067) { +// CHECK:STDOUT: %Self => constants.%J.facet.067 +// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%J.impl_witness // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2324,17 +2335,17 @@ fn F() { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %J2_where.type.a84: type = facet_type <@J2 where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %impl_witness.550: = impl_witness (file.%impl_witness_assoc_constant.loc22, ) [concrete] +// CHECK:STDOUT: %J2.impl_witness.245: = impl_witness file.%J2.impl_witness_table.loc22 [concrete] // CHECK:STDOUT: %F.type.aee: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.243: %F.type.aee = struct_value () [concrete] -// CHECK:STDOUT: %J2.facet.8ad: %J2.type = facet_value %empty_tuple.type, (%impl_witness.550) [concrete] +// CHECK:STDOUT: %J2.facet.3a7: %J2.type = facet_value %empty_tuple.type, (%J2.impl_witness.245) [concrete] // CHECK:STDOUT: %C2: type = class_type @C2 [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %J2_where.type.4f1: type = facet_type <@J2 where %impl.elem0 = %C2> [concrete] -// CHECK:STDOUT: %impl_witness.780: = impl_witness (file.%impl_witness_assoc_constant.loc31, ) [concrete] +// CHECK:STDOUT: %J2.impl_witness.5a2: = impl_witness file.%J2.impl_witness_table.loc31 [concrete] // CHECK:STDOUT: %F.type.ea3: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.81f: %F.type.ea3 = struct_value () [concrete] -// CHECK:STDOUT: %J2.facet.677: %J2.type = facet_value %C2, (%impl_witness.780) [concrete] +// CHECK:STDOUT: %J2.facet.0d3: %J2.type = facet_value %C2, (%J2.impl_witness.5a2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2369,7 +2380,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc22_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (%impl_witness_assoc_constant.loc22, ) [concrete = constants.%impl_witness.550] +// CHECK:STDOUT: %J2.impl_witness_table.loc22 = impl_witness_table (%impl_witness_assoc_constant.loc22, ), @impl.8b6 [concrete] +// CHECK:STDOUT: %J2.impl_witness.loc22: = impl_witness %J2.impl_witness_table.loc22 [concrete = constants.%J2.impl_witness.245] // CHECK:STDOUT: %impl_witness_assoc_constant.loc22: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {} // CHECK:STDOUT: impl_decl @impl.3df [concrete] {} { @@ -2387,7 +2399,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C2.ref.loc31_27 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc31: = impl_witness (%impl_witness_assoc_constant.loc31, ) [concrete = constants.%impl_witness.780] +// CHECK:STDOUT: %J2.impl_witness_table.loc31 = impl_witness_table (%impl_witness_assoc_constant.loc31, ), @impl.3df [concrete] +// CHECK:STDOUT: %J2.impl_witness.loc31: = impl_witness %J2.impl_witness_table.loc31 [concrete = constants.%J2.impl_witness.5a2] // CHECK:STDOUT: %impl_witness_assoc_constant.loc31: type = impl_witness_assoc_constant constants.%C2 [concrete = constants.%C2] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2457,7 +2470,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%J2.impl_witness.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3df: %C2.ref.loc31_6 as %.loc31_15 { @@ -2483,7 +2496,7 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C2 = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc31 +// CHECK:STDOUT: witness = file.%J2.impl_witness.loc31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C2 { @@ -2525,13 +2538,13 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U2(constants.%J2.facet.afd) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J2.facet.8ad) { -// CHECK:STDOUT: %Self => constants.%J2.facet.8ad +// CHECK:STDOUT: specific @F.1(constants.%J2.facet.3a7) { +// CHECK:STDOUT: %Self => constants.%J2.facet.3a7 // CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J2.facet.677) { -// CHECK:STDOUT: %Self => constants.%J2.facet.677 +// CHECK:STDOUT: specific @F.1(constants.%J2.facet.0d3) { +// CHECK:STDOUT: %Self => constants.%J2.facet.0d3 // CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%C2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2557,11 +2570,11 @@ fn F() { // CHECK:STDOUT: %impl.elem0.e09: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete] // CHECK:STDOUT: %K_where.type: type = facet_type <@K where %impl.elem0.e09 = %struct_type.a> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant, ) [concrete] +// CHECK:STDOUT: %K.impl_witness: = impl_witness file.%K.impl_witness_table [concrete] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [concrete] // CHECK:STDOUT: %F.type.894: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.62c: %F.type.894 = struct_value () [concrete] -// CHECK:STDOUT: %K.facet.296: %K.type = facet_value %empty_tuple.type, (%impl_witness) [concrete] +// CHECK:STDOUT: %K.facet.a40: %K.type = facet_value %empty_tuple.type, (%K.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2596,7 +2609,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %struct_type.a // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant, ) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %K.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, ), @impl [concrete] +// CHECK:STDOUT: %K.impl_witness: = impl_witness %K.impl_witness_table [concrete = constants.%K.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%struct_type.a [concrete = constants.%struct_type.a] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2674,7 +2688,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%K.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@K.%Self: %K.type) { @@ -2705,10 +2719,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @V(constants.%K.facet.c18) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%K.facet.296) { -// CHECK:STDOUT: %Self => constants.%K.facet.296 +// CHECK:STDOUT: specific @F.1(constants.%K.facet.a40) { +// CHECK:STDOUT: %Self => constants.%K.facet.a40 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%impl_witness +// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%K.impl_witness // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%struct_type.a // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2733,10 +2747,10 @@ fn F() { // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%empty_struct) [concrete] // CHECK:STDOUT: %M_where.type: type = facet_type <@M where %impl.elem0 = %struct> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant, @impl.%G.decl) [concrete] +// CHECK:STDOUT: %M.impl_witness: = impl_witness file.%M.impl_witness_table [concrete] // CHECK:STDOUT: %G.type.bf5: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.44e: %G.type.bf5 = struct_value () [concrete] -// CHECK:STDOUT: %M.facet.d78: %M.type = facet_value %empty_tuple.type, (%impl_witness) [concrete] +// CHECK:STDOUT: %M.facet.713: %M.type = facet_value %empty_tuple.type, (%M.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2774,7 +2788,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_33.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant, @impl.%G.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %M.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.%G.decl), @impl [concrete] +// CHECK:STDOUT: %M.impl_witness: = impl_witness %M.impl_witness_table [concrete = constants.%M.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.b.347 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2819,7 +2834,7 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .M = -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%M.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@M.%Self: %M.type) { @@ -2830,12 +2845,12 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%empty_tuple.type, (constants.%impl_witness) [concrete = constants.%M.facet.d78] -// CHECK:STDOUT: %.loc10_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.d78] +// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%empty_tuple.type, (constants.%M.impl_witness) [concrete = constants.%M.facet.713] +// CHECK:STDOUT: %.loc10_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.713] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_18 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc10_23: type = converted %.loc10_18, %as_type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc10_18, element0 [concrete = constants.%impl_witness] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc10_18, element0 [concrete = constants.%M.impl_witness] // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%struct] // CHECK:STDOUT: %.loc10_25: %empty_struct_type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct] // CHECK:STDOUT: return %.loc10_25 @@ -2847,9 +2862,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%M.facet.407) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%M.facet.d78) {} +// CHECK:STDOUT: specific @G.1(constants.%M.facet.713) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%M.facet.d78) {} +// CHECK:STDOUT: specific @Z(constants.%M.facet.713) {} // CHECK:STDOUT: // CHECK:STDOUT: --- self_as_uses_correct_rewrite_constraint.carbon // CHECK:STDOUT: @@ -2879,18 +2894,18 @@ fn F() { // CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete] // CHECK:STDOUT: %struct.0f3: %struct_type.b.86f = struct_value (%empty_struct_type) [concrete] // CHECK:STDOUT: %M_where.type.132: type = facet_type <@M where %impl.elem0 = %struct.0f3> [concrete] -// CHECK:STDOUT: %impl_witness.d1c: = impl_witness (file.%impl_witness_assoc_constant.loc10, @impl.9c5.%G.decl) [concrete] +// CHECK:STDOUT: %M.impl_witness.e1e: = impl_witness file.%M.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: %G.type.160: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.fc4: %G.type.160 = struct_value () [concrete] -// CHECK:STDOUT: %M.facet.5b4: %M.type = facet_value %C.7a7, (%impl_witness.d1c) [concrete] +// CHECK:STDOUT: %M.facet.601: %M.type = facet_value %C.7a7, (%M.impl_witness.e1e) [concrete] // CHECK:STDOUT: %C.3a0: type = class_type @C, @C(%empty_tuple.type) [concrete] // CHECK:STDOUT: %struct_type.b.161: type = struct_type {.b: %empty_tuple.type} [concrete] // CHECK:STDOUT: %struct.c94: %struct_type.b.86f = struct_value (%empty_tuple.type) [concrete] // CHECK:STDOUT: %M_where.type.363: type = facet_type <@M where %impl.elem0 = %struct.c94> [concrete] -// CHECK:STDOUT: %impl_witness.953: = impl_witness (file.%impl_witness_assoc_constant.loc16, @impl.f46.%G.decl) [concrete] +// CHECK:STDOUT: %M.impl_witness.902: = impl_witness file.%M.impl_witness_table.loc16 [concrete] // CHECK:STDOUT: %G.type.18e: type = fn_type @G.3 [concrete] // CHECK:STDOUT: %G.066: %G.type.18e = struct_value () [concrete] -// CHECK:STDOUT: %M.facet.3e5: %M.type = facet_value %C.3a0, (%impl_witness.953) [concrete] +// CHECK:STDOUT: %M.facet.887: %M.type = facet_value %C.3a0, (%M.impl_witness.902) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2935,7 +2950,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_36.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (%impl_witness_assoc_constant.loc10, @impl.9c5.%G.decl) [concrete = constants.%impl_witness.d1c] +// CHECK:STDOUT: %M.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10, @impl.9c5.%G.decl), @impl.9c5 [concrete] +// CHECK:STDOUT: %M.impl_witness.loc10: = impl_witness %M.impl_witness_table.loc10 [concrete = constants.%M.impl_witness.e1e] // CHECK:STDOUT: %impl_witness_assoc_constant.loc10: %struct_type.b.86f = impl_witness_assoc_constant constants.%struct.0f3 [concrete = constants.%struct.0f3] // CHECK:STDOUT: impl_decl @impl.f46 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] @@ -2959,7 +2975,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc16_36.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc16: = impl_witness (%impl_witness_assoc_constant.loc16, @impl.f46.%G.decl) [concrete = constants.%impl_witness.953] +// CHECK:STDOUT: %M.impl_witness_table.loc16 = impl_witness_table (%impl_witness_assoc_constant.loc16, @impl.f46.%G.decl), @impl.f46 [concrete] +// CHECK:STDOUT: %M.impl_witness.loc16: = impl_witness %M.impl_witness_table.loc16 [concrete = constants.%M.impl_witness.902] // CHECK:STDOUT: %impl_witness_assoc_constant.loc16: %struct_type.b.86f = impl_witness_assoc_constant constants.%struct.c94 [concrete = constants.%struct.c94] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3000,7 +3017,7 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .M = -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%M.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.f46: %C as %.loc16_17 { @@ -3015,7 +3032,7 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .M = -// CHECK:STDOUT: witness = file.%impl_witness.loc16 +// CHECK:STDOUT: witness = file.%M.impl_witness.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc3_9.1: type) { @@ -3042,12 +3059,12 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9c5.%C [concrete = constants.%C.7a7] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%C.7a7, (constants.%impl_witness.d1c) [concrete = constants.%M.facet.5b4] -// CHECK:STDOUT: %.loc12_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.5b4] +// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%C.7a7, (constants.%M.impl_witness.e1e) [concrete = constants.%M.facet.601] +// CHECK:STDOUT: %.loc12_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.601] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc12_18 [concrete = constants.%C.7a7] // CHECK:STDOUT: %.loc12_23: type = converted %.loc12_18, %as_type [concrete = constants.%C.7a7] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc12_18, element0 [concrete = constants.%impl_witness.d1c] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc12_18, element0 [concrete = constants.%M.impl_witness.e1e] // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%struct.0f3] // CHECK:STDOUT: %.loc12_25: type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct_type] // CHECK:STDOUT: return %.loc12_25 @@ -3057,12 +3074,12 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.f46.%C [concrete = constants.%C.3a0] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%C.3a0, (constants.%impl_witness.953) [concrete = constants.%M.facet.3e5] -// CHECK:STDOUT: %.loc18_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.3e5] +// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%C.3a0, (constants.%M.impl_witness.902) [concrete = constants.%M.facet.887] +// CHECK:STDOUT: %.loc18_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.887] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc18_18 [concrete = constants.%C.3a0] // CHECK:STDOUT: %.loc18_23: type = converted %.loc18_18, %as_type [concrete = constants.%C.3a0] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc18_18, element0 [concrete = constants.%impl_witness.953] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc18_18, element0 [concrete = constants.%M.impl_witness.902] // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%struct.c94] // CHECK:STDOUT: %.loc18_25: type = struct_access %impl.elem0, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: return %.loc18_25 @@ -3084,18 +3101,18 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%M.facet.407) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%M.facet.5b4) {} +// CHECK:STDOUT: specific @G.1(constants.%M.facet.601) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%M.facet.5b4) {} +// CHECK:STDOUT: specific @Z(constants.%M.facet.601) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%empty_tuple.type) { // CHECK:STDOUT: %T.loc3_9.2 => constants.%empty_tuple.type // CHECK:STDOUT: %T.patt.loc3_9.2 => constants.%T.patt // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%M.facet.3e5) {} +// CHECK:STDOUT: specific @G.1(constants.%M.facet.887) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%M.facet.3e5) {} +// CHECK:STDOUT: specific @Z(constants.%M.facet.887) {} // CHECK:STDOUT: // CHECK:STDOUT: --- associated_int_in_array.carbon // CHECK:STDOUT: @@ -3115,11 +3132,13 @@ fn F() { // CHECK:STDOUT: %impl.elem0.ace: %i32 = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.ffe: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.ffe [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.69c: = bound_method %impl.elem0.ace, %Convert.960 [symbolic] // CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.37e: = bound_method %impl.elem0.ace, %Convert.specific_fn.8a8 [symbolic] @@ -3136,21 +3155,21 @@ fn F() { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.2b8: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.2b8 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.0ad = %int_2.ef8> [concrete] -// CHECK:STDOUT: %impl_witness.675: = impl_witness (file.%impl_witness_assoc_constant, @impl.dd2.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %array_type.c9b: type = array_type %int_2.ecc, bool [concrete] // CHECK:STDOUT: %F.type.925: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.2a6: %F.type.925 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet.45c: %I.type = facet_value %empty_tuple.type, (%impl_witness.675) [concrete] +// CHECK:STDOUT: %I.facet.194: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: %Convert.bound.fbf: = bound_method %int_2.ef8, %Convert.960 [concrete] // CHECK:STDOUT: %bound_method.992: = bound_method %int_2.ef8, %Convert.specific_fn.8a8 [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] @@ -3190,7 +3209,7 @@ fn F() { // CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] // CHECK:STDOUT: %impl.elem0.loc8_20: %i32 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.0ad] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc8_25: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc8_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_2, %impl.elem0.loc8_25 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc8_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc8_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] @@ -3201,7 +3220,8 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8_20, %.loc8_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant, @impl.dd2.%F.decl) [concrete = constants.%impl_witness.675] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.dd2.%F.decl), @impl.dd2 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: %i32 = impl_witness_assoc_constant constants.%int_2.ef8 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3222,7 +3242,7 @@ fn F() { // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %impl.elem0.loc5_37.2 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.ace)] // CHECK:STDOUT: %.loc5_31.1: type = value_of_initializer %bool.make_type [concrete = bool] // CHECK:STDOUT: %.loc5_31.2: type = converted %bool.make_type, %.loc5_31.1 [concrete = bool] -// CHECK:STDOUT: %impl.elem0.loc5_37.3: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0.loc5_37.3: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc5_37.2: = bound_method %N.ref, %impl.elem0.loc5_37.3 [symbolic = %Convert.bound (constants.%Convert.bound.69c)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc5_37.3, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc5_37.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.37e)] @@ -3274,7 +3294,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { @@ -3323,10 +3343,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%I.facet.d87) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%I.facet.45c) { -// CHECK:STDOUT: %Self => constants.%I.facet.45c +// CHECK:STDOUT: specific @F.1(constants.%I.facet.194) { +// CHECK:STDOUT: %Self => constants.%I.facet.194 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_37.1 => constants.%impl_witness.675 +// CHECK:STDOUT: %Self.as_wit.iface0.loc5_37.1 => constants.%I.impl_witness // CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%int_2.ef8 // CHECK:STDOUT: %Convert.bound => constants.%Convert.bound.fbf // CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.992 @@ -3356,14 +3376,14 @@ fn F() { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %Z_where.type.b30: type = facet_type <@Z where %impl.elem0 = %C.f2e> [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type.b30 [symbolic] -// CHECK:STDOUT: %impl_witness.017: = impl_witness (file.%impl_witness_assoc_constant), @impl(%T) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.07f: = impl_witness file.%Z.impl_witness_table, @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.116: type = facet_type <@Z where %impl.elem0 = %C.131> [concrete] // CHECK:STDOUT: %complete_type.fc8: = complete_type_witness %Z_where.type.116 [concrete] -// CHECK:STDOUT: %impl_witness.cba: = impl_witness (file.%impl_witness_assoc_constant), @impl(%D) [concrete] -// CHECK:STDOUT: %Z.facet.517: %Z.type = facet_value %D, (%impl_witness.cba) [concrete] +// CHECK:STDOUT: %Z.impl_witness.f74: = impl_witness file.%Z.impl_witness_table, @impl(%D) [concrete] +// CHECK:STDOUT: %Z.facet.6fe: %Z.type = facet_value %D, (%Z.impl_witness.f74) [concrete] // CHECK:STDOUT: %C.val: %C.131 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3410,7 +3430,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness.017)] +// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%Z.impl_witness (constants.%Z.impl_witness.07f)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C.f2e [symbolic = @impl.%C.loc9_45.2 (constants.%C.f2e)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } @@ -3437,13 +3458,13 @@ fn F() { // 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.b30)] // CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant), @impl(%T.loc9_14.2) [symbolic = %impl_witness (constants.%impl_witness.017)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table, @impl(%T.loc9_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.07f)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref.loc9_24 as %.loc9_31 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3489,9 +3510,9 @@ fn F() { // CHECK:STDOUT: %D.ref.loc12_10: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%D, (constants.%impl_witness.cba) [concrete = constants.%Z.facet.517] -// CHECK:STDOUT: %.loc12_11.2: %Z.type = converted %D.ref.loc12_10, %Z.facet [concrete = constants.%Z.facet.517] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc12_11.2, element0 [concrete = constants.%impl_witness.cba] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%D, (constants.%Z.impl_witness.f74) [concrete = constants.%Z.facet.6fe] +// CHECK:STDOUT: %.loc12_11.2: %Z.type = converted %D.ref.loc12_10, %Z.facet [concrete = constants.%Z.facet.6fe] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc12_11.2, element0 [concrete = constants.%Z.impl_witness.f74] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%C.131] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %C.131 = bind_name a, %.loc12_23 @@ -3513,7 +3534,7 @@ fn F() { // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.f2e // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.b30 // CHECK:STDOUT: %require_complete => constants.%require_complete -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.017 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.07f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(@impl.%T.loc9_14.2) {} @@ -3526,7 +3547,7 @@ fn F() { // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.131 // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.116 // CHECK:STDOUT: %require_complete => constants.%complete_type.fc8 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.cba +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.f74 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -3538,5 +3559,5 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Z.facet.517) {} +// CHECK:STDOUT: specific @X(constants.%Z.facet.6fe) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index 43a83eb1af29..98f6e0491ab3 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -26,11 +26,12 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -115,7 +116,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [concrete = constants.%int_24.e3c] // CHECK:STDOUT: %.loc11_31.1: %tuple.type = tuple_literal (%int_12, %int_24) -// CHECK:STDOUT: %impl.elem0.loc11_31.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_31.1: = bound_method %int_12, %impl.elem0.loc11_31.1 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11_31.1: = specific_function %impl.elem0.loc11_31.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_31.2: = bound_method %int_12, %specific_fn.loc11_31.1 [concrete = constants.%bound_method.dae] @@ -124,7 +125,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc11_31.3: ref %i32 = array_index file.%a.var, %int_0.loc11 // CHECK:STDOUT: %.loc11_31.4: init %i32 = initialize_from %.loc11_31.2 to %.loc11_31.3 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc11_31.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_31.3: = bound_method %int_24, %impl.elem0.loc11_31.2 [concrete = constants.%Convert.bound.ef4] // CHECK:STDOUT: %specific_fn.loc11_31.2: = specific_function %impl.elem0.loc11_31.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_31.4: = bound_method %int_24, %specific_fn.loc11_31.2 [concrete = constants.%bound_method.477] @@ -137,7 +138,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc11_1: init %array_type = converted %.loc11_31.1, %.loc11_31.8 [concrete = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_1 // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_1.1: = bound_method %int_1.loc12, %impl.elem0.loc12 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_1.2: = bound_method %int_1.loc12, %specific_fn.loc12 [concrete = constants.%bound_method.9a1] @@ -148,7 +149,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc13: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_16.1: = bound_method %int_0.loc13, %impl.elem0.loc13 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_16.2: = bound_method %int_0.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 6fae8681887c..5d1dabfabd5b 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -45,11 +45,12 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -142,7 +143,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_2.loc14_30: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc14_33: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc14_34.1: %tuple.type = tuple_literal (%int_1.loc14_27, %int_2.loc14_30, %int_3.loc14_33) -// CHECK:STDOUT: %impl.elem0.loc14_34.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_34.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_34.1: = bound_method %int_1.loc14_27, %impl.elem0.loc14_34.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14_34.1: = specific_function %impl.elem0.loc14_34.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_34.2: = bound_method %int_1.loc14_27, %specific_fn.loc14_34.1 [concrete = constants.%bound_method.9a1] @@ -151,7 +152,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc14: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc14_34.3: ref %i32 = array_index %a.var, %int_0.loc14 // CHECK:STDOUT: %.loc14_34.4: init %i32 = initialize_from %.loc14_34.2 to %.loc14_34.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_34.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_34.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_34.3: = bound_method %int_2.loc14_30, %impl.elem0.loc14_34.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc14_34.2: = specific_function %impl.elem0.loc14_34.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_34.4: = bound_method %int_2.loc14_30, %specific_fn.loc14_34.2 [concrete = constants.%bound_method.b92] @@ -160,7 +161,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_1.loc14_34: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc14_34.6: ref %i32 = array_index %a.var, %int_1.loc14_34 // CHECK:STDOUT: %.loc14_34.7: init %i32 = initialize_from %.loc14_34.5 to %.loc14_34.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc14_34.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_34.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_34.5: = bound_method %int_3.loc14_33, %impl.elem0.loc14_34.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc14_34.3: = specific_function %impl.elem0.loc14_34.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_34.6: = bound_method %int_3.loc14_33, %specific_fn.loc14_34.3 [concrete = constants.%bound_method.047] @@ -188,7 +189,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc17_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc17_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_21.1: = bound_method %int_0.loc17, %impl.elem0.loc17 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_21.2: = bound_method %int_0.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.b6e] @@ -208,7 +209,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc18_5: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18_5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %int_0.loc18, %impl.elem0.loc18_5 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc18_5: = specific_function %impl.elem0.loc18_5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_5.2: = bound_method %int_0.loc18, %specific_fn.loc18_5 [concrete = constants.%bound_method.b6e] @@ -217,7 +218,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc18_5.2: %i32 = converted %int_0.loc18, %.loc18_5.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc18_6: ref %i32 = array_index %a.ref.loc18, %.loc18_5.2 // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc18_8: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18_8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_8.1: = bound_method %int_4, %impl.elem0.loc18_8 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc18_8: = specific_function %impl.elem0.loc18_8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_8.2: = bound_method %int_4, %specific_fn.loc18_8 [concrete = constants.%bound_method.1da] @@ -238,7 +239,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_2.loc22_30: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc22_33: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc22_34.1: %tuple.type = tuple_literal (%int_1.loc22_27, %int_2.loc22_30, %int_3.loc22_33) -// CHECK:STDOUT: %impl.elem0.loc22_34.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc22_34.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_34.1: = bound_method %int_1.loc22_27, %impl.elem0.loc22_34.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc22_34.1: = specific_function %impl.elem0.loc22_34.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_34.2: = bound_method %int_1.loc22_27, %specific_fn.loc22_34.1 [concrete = constants.%bound_method.9a1] @@ -247,7 +248,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc22_34.3: ref %i32 = array_index %a.var, %int_0.loc22 // CHECK:STDOUT: %.loc22_34.4: init %i32 = initialize_from %.loc22_34.2 to %.loc22_34.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc22_34.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc22_34.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_34.3: = bound_method %int_2.loc22_30, %impl.elem0.loc22_34.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc22_34.2: = specific_function %impl.elem0.loc22_34.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_34.4: = bound_method %int_2.loc22_30, %specific_fn.loc22_34.2 [concrete = constants.%bound_method.b92] @@ -256,7 +257,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_1.loc22_34: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc22_34.6: ref %i32 = array_index %a.var, %int_1.loc22_34 // CHECK:STDOUT: %.loc22_34.7: init %i32 = initialize_from %.loc22_34.5 to %.loc22_34.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc22_34.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc22_34.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_34.5: = bound_method %int_3.loc22_33, %impl.elem0.loc22_34.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc22_34.3: = specific_function %impl.elem0.loc22_34.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_34.6: = bound_method %int_3.loc22_33, %specific_fn.loc22_34.3 [concrete = constants.%bound_method.047] @@ -279,7 +280,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc26: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // 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] -// CHECK:STDOUT: %impl.elem0.loc26: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_5.1: = bound_method %int_0.loc26, %impl.elem0.loc26 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_5.2: = bound_method %int_0.loc26, %specific_fn.loc26 [concrete = constants.%bound_method.b6e] @@ -291,7 +292,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc27: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc27_5.1: = bound_method %int_0.loc27, %impl.elem0.loc27 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_5.2: = bound_method %int_0.loc27, %specific_fn.loc27 [concrete = constants.%bound_method.b6e] @@ -308,7 +309,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc28_5.2: ref %array_type = temporary %.loc28_5.1, %F.call // CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc28: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc28: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc28_7.1: = bound_method %int_0.loc28, %impl.elem0.loc28 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc28: = specific_function %impl.elem0.loc28, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc28_7.2: = bound_method %int_0.loc28, %specific_fn.loc28 [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index 54d4a8799f23..f71d21bb344e 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -34,11 +34,12 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -108,7 +109,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %.loc11_28.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0.loc11: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_28.1: = bound_method %int_12, %impl.elem0.loc11 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_28.2: = bound_method %int_12, %specific_fn.loc11 [concrete = constants.%bound_method.dae] @@ -124,7 +125,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_16.1: = bound_method %int_1, %impl.elem0.loc17 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_16.2: = bound_method %int_1, %specific_fn.loc17 [concrete = constants.%bound_method.9a1] @@ -138,7 +139,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89] // CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc23: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc23_16.1: = bound_method %int_2147483647, %impl.elem0.loc23 [concrete = constants.%Convert.bound.f38] // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_16.2: = bound_method %int_2147483647, %specific_fn.loc23 [concrete = constants.%bound_method.8e1] diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index f1f8655c2b7e..1c1bf4bcef54 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -30,11 +30,12 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -87,7 +88,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %.loc11_28.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_28.1: = bound_method %int_12, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_28.2: = bound_method %int_12, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index 0325aa65d017..ea5cb88a8fd6 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -27,11 +27,12 @@ var b: i32 = a[1]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -86,7 +87,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %.loc11_28.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0.loc11: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_28.1: = bound_method %int_12, %impl.elem0.loc11 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_28.2: = bound_method %int_12, %specific_fn.loc11 [concrete = constants.%bound_method.dae] @@ -102,7 +103,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_16.1: = bound_method %int_1, %impl.elem0.loc16 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_16.2: = bound_method %int_1, %specific_fn.loc16 [concrete = constants.%bound_method.9a1] diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index c492432f9cf4..b824935bd284 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -52,11 +52,12 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -122,7 +123,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc19: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc19_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc19_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_21.1: = bound_method %int_0.loc19, %impl.elem0.loc19 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_21.2: = bound_method %int_0.loc19, %specific_fn.loc19 [concrete = constants.%bound_method.b6e] @@ -144,7 +145,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc24: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc24_5: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc24_5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc24_5.1: = bound_method %int_0.loc24, %impl.elem0.loc24_5 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc24_5: = specific_function %impl.elem0.loc24_5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_5.2: = bound_method %int_0.loc24, %specific_fn.loc24_5 [concrete = constants.%bound_method.b6e] @@ -155,7 +156,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc24_6.2: ref %i32 = array_index %.loc24_6.1, %.loc24_5.2 // CHECK:STDOUT: %.loc24_6.3: %i32 = bind_value %.loc24_6.2 // CHECK:STDOUT: %int_4.loc24: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc24_8: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc24_8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc24_8.1: = bound_method %int_4.loc24, %impl.elem0.loc24_8 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc24_8: = specific_function %impl.elem0.loc24_8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_8.2: = bound_method %int_4.loc24, %specific_fn.loc24_8 [concrete = constants.%bound_method.1da] @@ -174,7 +175,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc32_21.2: ref %array_type = temporary %.loc32_21.1, %F.call.loc32 // CHECK:STDOUT: %int_32.loc32_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc32_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc32: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc32_23.1: = bound_method %int_0.loc32, %impl.elem0.loc32 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_23.2: = bound_method %int_0.loc32, %specific_fn.loc32 [concrete = constants.%bound_method.b6e] @@ -198,7 +199,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc37_5.2: ref %array_type = temporary %.loc37_5.1, %F.call.loc37 // CHECK:STDOUT: %int_32.loc37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc37_7: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc37_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc37_7.1: = bound_method %int_0.loc37, %impl.elem0.loc37_7 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc37_7: = specific_function %impl.elem0.loc37_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc37_7.2: = bound_method %int_0.loc37, %specific_fn.loc37_7 [concrete = constants.%bound_method.b6e] @@ -208,7 +209,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc37_8.1: ref %i32 = array_index %.loc37_5.2, %.loc37_7.2 // CHECK:STDOUT: %.loc37_8.2: %i32 = bind_value %.loc37_8.1 // CHECK:STDOUT: %int_4.loc37: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc37_10: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc37_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc37_10.1: = bound_method %int_4.loc37, %impl.elem0.loc37_10 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc37_10: = specific_function %impl.elem0.loc37_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc37_10.2: = bound_method %int_4.loc37, %specific_fn.loc37_10 [concrete = constants.%bound_method.1da] diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index e96d03e3ee86..18c90c1065b9 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -28,12 +28,13 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.132: = bound_method %int_42.20e, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.8c1: = bound_method %int_42.20e, %Convert.specific_fn [concrete] @@ -42,9 +43,10 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %array: %array_type = tuple_value (%int_42.c68, %int_42.c68) [concrete] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete] // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.13 [concrete] -// CHECK:STDOUT: %impl_witness.0f6: = impl_witness (imports.%Core.import_ref.c15) [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%impl_witness.0f6) [concrete] -// CHECK:STDOUT: %.690: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.impl_witness_table.e09 = impl_witness_table (imports.%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Negate.impl_witness.561: = impl_witness %Negate.impl_witness_table.e09 [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.561) [concrete] +// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] // CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.14 [concrete] // CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %int_10, %Op.bba [concrete] @@ -100,7 +102,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_42.loc11_25: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %int_42.loc11_29: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %.loc11_31.1: %tuple.type = tuple_literal (%int_42.loc11_25, %int_42.loc11_29) -// CHECK:STDOUT: %impl.elem0.loc11_31.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_31.1: = bound_method %int_42.loc11_25, %impl.elem0.loc11_31.1 [concrete = constants.%Convert.bound.132] // CHECK:STDOUT: %specific_fn.loc11_31.1: = specific_function %impl.elem0.loc11_31.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_31.2: = bound_method %int_42.loc11_25, %specific_fn.loc11_31.1 [concrete = constants.%bound_method.8c1] @@ -109,7 +111,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_31.3: ref %i32 = array_index file.%c.var, %int_0 // CHECK:STDOUT: %.loc11_31.4: init %i32 = initialize_from %.loc11_31.2 to %.loc11_31.3 [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %impl.elem0.loc11_31.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_31.3: = bound_method %int_42.loc11_29, %impl.elem0.loc11_31.2 [concrete = constants.%Convert.bound.132] // CHECK:STDOUT: %specific_fn.loc11_31.2: = specific_function %impl.elem0.loc11_31.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_31.4: = bound_method %int_42.loc11_29, %specific_fn.loc11_31.2 [concrete = constants.%bound_method.8c1] @@ -123,12 +125,12 @@ var d: i32 = c[-10]; // CHECK:STDOUT: assign file.%c.var, %.loc11_1 // CHECK:STDOUT: %c.ref: ref %array_type = name_ref c, file.%c // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] -// CHECK:STDOUT: %impl.elem0.loc16_16.1: %.690 = impl_witness_access constants.%impl_witness.0f6, element0 [concrete = constants.%Op.bba] +// CHECK:STDOUT: %impl.elem0.loc16_16.1: %.63a = impl_witness_access constants.%Negate.impl_witness.561, element0 [concrete = constants.%Op.bba] // CHECK:STDOUT: %bound_method.loc16_16.1: = bound_method %int_10, %impl.elem0.loc16_16.1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc16_16.1(%int_10) [concrete = constants.%int_-10.06d] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16_16.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16_16.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_16.2: = bound_method %int.snegate, %impl.elem0.loc16_16.2 [concrete = constants.%Convert.bound.1ca] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16_16.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_16.3: = bound_method %int.snegate, %specific_fn.loc16 [concrete = constants.%bound_method.af0] diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 9dfa46262b40..e4e7e3f6f205 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -36,11 +36,12 @@ interface I { // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] @@ -79,7 +80,7 @@ interface I { // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%N [concrete = constants.%assoc1] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_27.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_27.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interface/min_prelude/compound_member_access.carbon b/toolchain/check/testdata/interface/min_prelude/compound_member_access.carbon index 221bc8b8b5e6..6b484b0131e0 100644 --- a/toolchain/check/testdata/interface/min_prelude/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/min_prelude/compound_member_access.carbon @@ -534,7 +534,8 @@ fn Works() { // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.bd4), @impl(%T.8b3) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.bd4), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl(%T.8b3) [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op, @impl(%T.8b3) [symbolic] // CHECK:STDOUT: %Op: %Op.type = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] @@ -555,11 +556,10 @@ fn Works() { // CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst102 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.02e = import_ref Core//prelude, loc18_41, unloaded // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded -// CHECK:STDOUT: %Core.import_ref.f80 = import_ref Core//prelude, loc21_36, unloaded +// CHECK:STDOUT: %Core.import_ref.287 = import_ref Core//prelude, loc21_36, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.bd4 = import_ref Core//prelude, loc22_42, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -645,7 +645,7 @@ fn Works() { // CHECK:STDOUT: generic impl @impl(imports.%Core.import_ref.5ab3ec.3: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.e01)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.bd4), @impl(%T) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op, @impl(%T) [symbolic = %Op.type (constants.%Op.type)] @@ -654,7 +654,7 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.f80 +// CHECK:STDOUT: witness = imports.%Core.import_ref.287 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -774,7 +774,7 @@ fn Works() { // CHECK:STDOUT: specific @impl(constants.%T.8b3) { // CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %T.patt => constants.%T.patt.e01 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T) {} @@ -1320,10 +1320,10 @@ fn Works() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.a7a: = impl_witness (@impl.77d.%G.decl) [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness file.%A.impl_witness_table [concrete] // CHECK:STDOUT: %G.type.486: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.001: %G.type.486 = struct_value () [concrete] -// CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%impl_witness.a7a) [concrete] +// CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete] // CHECK:STDOUT: %Fails.type: type = fn_type @Fails [concrete] // CHECK:STDOUT: %Fails: %Fails.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] @@ -1335,17 +1335,17 @@ fn Works() { // CHECK:STDOUT: %Self.as_type.19f: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl.f92 [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type.473: = complete_type_witness type [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.3ea) [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete] +// CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %A.type, %Op.444 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.444, @Op.2(type) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %A.type, %Op.specific_fn [concrete] @@ -1377,11 +1377,10 @@ fn Works() { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0.d45] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.f92.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.f92.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] // CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//prelude, inst67 [no loc], unloaded @@ -1406,7 +1405,8 @@ fn Works() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.77d.%G.decl) [concrete = constants.%impl_witness.a7a] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@impl.77d.%G.decl), @impl.77d [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: %Fails.decl: %Fails.type = fn_decl @Fails [concrete = constants.%Fails] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1453,13 +1453,13 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -1468,7 +1468,7 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1500,7 +1500,7 @@ fn Works() { // CHECK:STDOUT: %.loc22_7: ref %C = converted %.loc22_5.1, %.loc22_5.4 // CHECK:STDOUT: %A.ref.loc22_15: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc22_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc22: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc22: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc22_17.1: = bound_method %A.ref.loc22_15, %impl.elem0.loc22 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc22_17.2: = bound_method %A.ref.loc22_15, %specific_fn.loc22 [concrete = constants.%bound_method] @@ -1516,20 +1516,20 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc30_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc30_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc30_26: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc30_26: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc30_26.1: = bound_method %A.ref.loc30_24, %impl.elem0.loc30_26 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc30_26: = specific_function %impl.elem0.loc30_26, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc30_26.2: = bound_method %A.ref.loc30_24, %specific_fn.loc30_26 [concrete = constants.%bound_method] // CHECK:STDOUT: %type.and.loc30_26: init type = call %bound_method.loc30_26.2(%A.ref.loc30_24, %A.ref.loc30_28) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc30_29.1: type = value_of_initializer %type.and.loc30_26 [concrete = constants.%A.type] // CHECK:STDOUT: %.loc30_29.2: type = converted %type.and.loc30_26, %.loc30_29.1 [concrete = constants.%A.type] -// CHECK:STDOUT: %A.facet.loc30: %A.type = facet_value constants.%C, (constants.%impl_witness.a7a) [concrete = constants.%A.facet] +// CHECK:STDOUT: %A.facet.loc30: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet] // CHECK:STDOUT: %.loc30_20: %A.type = converted %C.ref.loc30_18, %A.facet.loc30 [concrete = constants.%A.facet] // CHECK:STDOUT: %as_type.loc30: type = facet_access_type %.loc30_20 [concrete = constants.%C] // CHECK:STDOUT: %.loc30_30: type = converted %.loc30_20, %as_type.loc30 [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc30_35: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc30_39: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc30_37: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc30_37: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc30_37.1: = bound_method %A.ref.loc30_35, %impl.elem0.loc30_37 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc30_37: = specific_function %impl.elem0.loc30_37, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc30_37.2: = bound_method %A.ref.loc30_35, %specific_fn.loc30_37 [concrete = constants.%bound_method] @@ -1545,14 +1545,14 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc38_18: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc38_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc38_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc38: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc38: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc38_26.1: = bound_method %A.ref.loc38_24, %impl.elem0.loc38 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc38: = specific_function %impl.elem0.loc38, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc38_26.2: = bound_method %A.ref.loc38_24, %specific_fn.loc38 [concrete = constants.%bound_method] // CHECK:STDOUT: %type.and.loc38: init type = call %bound_method.loc38_26.2(%A.ref.loc38_24, %A.ref.loc38_28) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc38_29.1: type = value_of_initializer %type.and.loc38 [concrete = constants.%A.type] // CHECK:STDOUT: %.loc38_29.2: type = converted %type.and.loc38, %.loc38_29.1 [concrete = constants.%A.type] -// CHECK:STDOUT: %A.facet.loc38: %A.type = facet_value constants.%C, (constants.%impl_witness.a7a) [concrete = constants.%A.facet] +// CHECK:STDOUT: %A.facet.loc38: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet] // CHECK:STDOUT: %.loc38_20: %A.type = converted %C.ref.loc38_18, %A.facet.loc38 [concrete = constants.%A.facet] // CHECK:STDOUT: %as_type.loc38: type = facet_access_type %.loc38_20 [concrete = constants.%C] // CHECK:STDOUT: %.loc38_30: type = converted %.loc38_20, %as_type.loc38 [concrete = constants.%C] @@ -1598,7 +1598,7 @@ fn Works() { // CHECK:STDOUT: specific @impl.f92(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(%T) {} @@ -1610,7 +1610,7 @@ fn Works() { // CHECK:STDOUT: specific @impl.f92(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -1666,10 +1666,10 @@ fn Works() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness.a7a: = impl_witness (@impl.77d.%G.decl) [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness file.%A.impl_witness_table [concrete] // CHECK:STDOUT: %G.type.486: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.001: %G.type.486 = struct_value () [concrete] -// CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%impl_witness.a7a) [concrete] +// CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete] // CHECK:STDOUT: %Works.type: type = fn_type @Works [concrete] // CHECK:STDOUT: %Works: %Works.type = struct_value () [concrete] // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] @@ -1680,21 +1680,21 @@ fn Works() { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness.db8: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl.f92 [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness.b7b: = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl.f92(%T) [symbolic] // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %impl_witness.3ea: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(type) [concrete] -// CHECK:STDOUT: %impl_witness.b81: = impl_witness (imports.%Core.import_ref.bd4), @impl.f92(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness.0e5: = impl_witness %BitAnd.impl_witness_table, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl.f92(type) [concrete] // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete] // CHECK:STDOUT: %complete_type.473: = complete_type_witness type [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%impl_witness.3ea) [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete] +// CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %A.type, %Op.444 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.444, @Op.2(type) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %A.type, %Op.specific_fn [concrete] -// CHECK:STDOUT: %.db5: type = fn_type_with_self_type %G.type.c3a, %A.facet [concrete] +// CHECK:STDOUT: %.e63: type = fn_type_with_self_type %G.type.c3a, %A.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1706,11 +1706,10 @@ fn Works() { // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0.d45] // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f] -// CHECK:STDOUT: %Core.import_ref.51c: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)] +// CHECK:STDOUT: %Core.import_ref.140: = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.1e6: @impl.f92.%Op.type (%Op.type.f99) = import_ref Core//prelude, loc22_42, loaded [symbolic = @impl.f92.%Op (constants.%Op.05a)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1728,7 +1727,8 @@ fn Works() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.77d.%G.decl) [concrete = constants.%impl_witness.a7a] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@impl.77d.%G.decl), @impl.77d [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: %Works.decl: %Works.type = fn_decl @Works [concrete = constants.%Works] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1755,13 +1755,13 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (imports.%Core.import_ref.1e6), @impl.f92(%T) [symbolic = %impl_witness (constants.%impl_witness.db8)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type.f99)] @@ -1770,7 +1770,7 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.51c +// CHECK:STDOUT: witness = imports.%Core.import_ref.140 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1797,56 +1797,56 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc13_7: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc13_11: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc13_9: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc13_9: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc13_9.1: = bound_method %A.ref.loc13_7, %impl.elem0.loc13_9 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13_9, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc13_9.2: = bound_method %A.ref.loc13_7, %specific_fn.loc13 [concrete = constants.%bound_method] // CHECK:STDOUT: %type.and.loc13: init type = call %bound_method.loc13_9.2(%A.ref.loc13_7, %A.ref.loc13_11) [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc13: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] -// CHECK:STDOUT: %A.facet.loc13: %A.type = facet_value constants.%C, (constants.%impl_witness.a7a) [concrete = constants.%A.facet] +// CHECK:STDOUT: %A.facet.loc13: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet] // CHECK:STDOUT: %.loc13: %A.type = converted %C.ref.loc13, %A.facet.loc13 [concrete = constants.%A.facet] -// CHECK:STDOUT: %as_wit.iface0.loc13: = facet_access_witness %.loc13, element0 [concrete = constants.%impl_witness.a7a] -// CHECK:STDOUT: %impl.elem0.loc13_4: %.db5 = impl_witness_access %as_wit.iface0.loc13, element0 [concrete = constants.%G.001] +// CHECK:STDOUT: %as_wit.iface0.loc13: = facet_access_witness %.loc13, element0 [concrete = constants.%A.impl_witness] +// CHECK:STDOUT: %impl.elem0.loc13_4: %.e63 = impl_witness_access %as_wit.iface0.loc13, element0 [concrete = constants.%G.001] // CHECK:STDOUT: %G.call.loc13: init %empty_tuple.type = call %impl.elem0.loc13_4() // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc14_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc14_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc14_12: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc14_12: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc14_12.1: = bound_method %A.ref.loc14_10, %impl.elem0.loc14_12 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc14_12: = specific_function %impl.elem0.loc14_12, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_12.2: = bound_method %A.ref.loc14_10, %specific_fn.loc14_12 [concrete = constants.%bound_method] // CHECK:STDOUT: %type.and.loc14_12: init type = call %bound_method.loc14_12.2(%A.ref.loc14_10, %A.ref.loc14_14) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %type.and.loc14_12 [concrete = constants.%A.type] // CHECK:STDOUT: %.loc14_15.2: type = converted %type.and.loc14_12, %.loc14_15.1 [concrete = constants.%A.type] -// CHECK:STDOUT: %A.facet.loc14: %A.type = facet_value constants.%C, (constants.%impl_witness.a7a) [concrete = constants.%A.facet] +// CHECK:STDOUT: %A.facet.loc14: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet] // CHECK:STDOUT: %.loc14_6: %A.type = converted %C.ref.loc14, %A.facet.loc14 [concrete = constants.%A.facet] // CHECK:STDOUT: %A.ref.loc14_20: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc14_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc14_22: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc14_22: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc14_22.1: = bound_method %A.ref.loc14_20, %impl.elem0.loc14_22 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc14_22: = specific_function %impl.elem0.loc14_22, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_22.2: = bound_method %A.ref.loc14_20, %specific_fn.loc14_22 [concrete = constants.%bound_method] // CHECK:STDOUT: %type.and.loc14_22: init type = call %bound_method.loc14_22.2(%A.ref.loc14_20, %A.ref.loc14_24) [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc14: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] -// CHECK:STDOUT: %as_wit.iface0.loc14: = facet_access_witness %.loc14_6, element0 [concrete = constants.%impl_witness.a7a] -// CHECK:STDOUT: %impl.elem0.loc14_17: %.db5 = impl_witness_access %as_wit.iface0.loc14, element0 [concrete = constants.%G.001] +// CHECK:STDOUT: %as_wit.iface0.loc14: = facet_access_witness %.loc14_6, element0 [concrete = constants.%A.impl_witness] +// CHECK:STDOUT: %impl.elem0.loc14_17: %.e63 = impl_witness_access %as_wit.iface0.loc14, element0 [concrete = constants.%G.001] // CHECK:STDOUT: %G.call.loc14: init %empty_tuple.type = call %impl.elem0.loc14_17() // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc15_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc15_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc15_12: %.2ac = impl_witness_access constants.%impl_witness.3ea, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %impl.elem0.loc15_12: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] // CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %A.ref.loc15_10, %impl.elem0.loc15_12 [concrete = constants.%Op.bound] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15_12, @Op.2(type) [concrete = constants.%Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_12.2: = bound_method %A.ref.loc15_10, %specific_fn.loc15 [concrete = constants.%bound_method] // CHECK:STDOUT: %type.and.loc15: init type = call %bound_method.loc15_12.2(%A.ref.loc15_10, %A.ref.loc15_14) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %type.and.loc15 [concrete = constants.%A.type] // CHECK:STDOUT: %.loc15_15.2: type = converted %type.and.loc15, %.loc15_15.1 [concrete = constants.%A.type] -// CHECK:STDOUT: %A.facet.loc15: %A.type = facet_value constants.%C, (constants.%impl_witness.a7a) [concrete = constants.%A.facet] +// CHECK:STDOUT: %A.facet.loc15: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet] // CHECK:STDOUT: %.loc15_6: %A.type = converted %C.ref.loc15, %A.facet.loc15 [concrete = constants.%A.facet] // CHECK:STDOUT: %A.ref.loc15_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc15: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] -// CHECK:STDOUT: %as_wit.iface0.loc15: = facet_access_witness %.loc15_6, element0 [concrete = constants.%impl_witness.a7a] -// CHECK:STDOUT: %impl.elem0.loc15_17: %.db5 = impl_witness_access %as_wit.iface0.loc15, element0 [concrete = constants.%G.001] +// CHECK:STDOUT: %as_wit.iface0.loc15: = facet_access_witness %.loc15_6, element0 [concrete = constants.%A.impl_witness] +// CHECK:STDOUT: %impl.elem0.loc15_17: %.e63 = impl_witness_access %as_wit.iface0.loc15, element0 [concrete = constants.%G.001] // CHECK:STDOUT: %G.call.loc15: init %empty_tuple.type = call %impl.elem0.loc15_17() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1878,7 +1878,7 @@ fn Works() { // CHECK:STDOUT: specific @impl.f92(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.db8 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(%T) {} @@ -1890,7 +1890,7 @@ fn Works() { // CHECK:STDOUT: specific @impl.f92(type) { // CHECK:STDOUT: %T => type // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.3ea +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 @@ -1936,11 +1936,11 @@ fn Works() { // CHECK:STDOUT: %assoc0.220: %BitAnd.assoc_type = assoc_entity element0, @BitAnd.%Op.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(%T) [symbolic] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.type.28d: type = fn_type @Op.2, @impl(%T) [symbolic] // CHECK:STDOUT: %Op.902: %Op.type.28d = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%impl_witness) [symbolic] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%BitAnd.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1967,7 +1967,8 @@ fn Works() { // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, file.%BitAnd.decl [concrete = constants.%BitAnd.type] // CHECK:STDOUT: %T.loc21_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Op.decl), @impl(constants.%T) [symbolic = @impl.%impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(%Dest.loc9_14.1: type) { @@ -2095,7 +2096,7 @@ fn Works() { // CHECK:STDOUT: generic impl @impl(%T.loc21_14.1: type) { // CHECK:STDOUT: %T.loc21_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc21_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%Op.decl), @impl(%T.loc21_14.2) [symbolic = %impl_witness (constants.%impl_witness)] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table, @impl(%T.loc21_14.2) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T.loc21_14.2) [symbolic = %Op.type (constants.%Op.type.28d)] @@ -2124,7 +2125,7 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2201,7 +2202,7 @@ fn Works() { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.patt -// CHECK:STDOUT: %impl_witness => constants.%impl_witness +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc21_14.2) {} diff --git a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon index 574e76aa17c6..ace2a945468e 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -35,15 +35,15 @@ class C { // CHECK:STDOUT: %F.20c: %F.type.0b5 = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.4a2: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.eb2: %F.type.4a2 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.56c: type = fn_type_with_self_type %F.type.0b5, %I.facet [concrete] +// CHECK:STDOUT: %.e5b: type = fn_type_with_self_type %F.type.0b5, %I.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -89,7 +89,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @C.%impl_witness +// CHECK:STDOUT: witness = @C.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -98,7 +98,8 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -132,7 +133,7 @@ class C { // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.56c = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%F.eb2] +// CHECK:STDOUT: %impl.elem0: %.e5b = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.eb2] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %.loc17: %C = bind_value %c.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method(%.loc17) diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_alias.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_alias.carbon index 7128b7c551b9..64ced56d32db 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_alias.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_alias.carbon @@ -273,10 +273,10 @@ interface C { // CHECK:STDOUT: %impl.elem0.71d: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I2_where.type: type = facet_type <@I2 where %impl.elem0.71d = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %impl_witness.6f03c8.1: = impl_witness (file.%impl_witness_assoc_constant), @impl(%V) [symbolic] +// CHECK:STDOUT: %I2.impl_witness.24366f.1: = impl_witness file.%I2.impl_witness_table, @impl(%V) [symbolic] // CHECK:STDOUT: %Self.541: %J2.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.541 [symbolic] -// CHECK:STDOUT: %impl_witness.6f03c8.2: = impl_witness (file.%impl_witness_assoc_constant), @impl(%Self.541) [symbolic] +// CHECK:STDOUT: %I2.impl_witness.24366f.2: = impl_witness file.%I2.impl_witness_table, @impl(%Self.541) [symbolic] // CHECK:STDOUT: %I2.lookup_impl_witness: = lookup_impl_witness %Self.541, @I2 [symbolic] // CHECK:STDOUT: %I2.facet.758: %I2.type = facet_value %Self.as_type, (%I2.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %impl.elem0.7c7: type = impl_witness_access %I2.lookup_impl_witness, element0 [symbolic] @@ -323,7 +323,8 @@ interface C { // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl.loc9 [concrete = constants.%J2.type] // CHECK:STDOUT: %V.loc11_14.1: %J2.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (%impl_witness_assoc_constant), @impl(constants.%V) [symbolic = @impl.%impl_witness (constants.%impl_witness.6f03c8.1)] +// CHECK:STDOUT: %I2.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I2.impl_witness: = impl_witness %I2.impl_witness_table, @impl(constants.%V) [symbolic = @impl.%I2.impl_witness (constants.%I2.impl_witness.24366f.1)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %J2.decl.loc13: type = interface_decl @J2 [concrete = constants.%J2.type] {} {} // CHECK:STDOUT: } @@ -382,13 +383,13 @@ interface C { // CHECK:STDOUT: %V.loc11_14.2: %J2.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)] // CHECK:STDOUT: %V.patt.loc11_14.2: %J2.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_14.2 (constants.%V.patt)] // CHECK:STDOUT: %V.as_type.loc11_22.2: type = facet_access_type %V.loc11_14.2 [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)] -// CHECK:STDOUT: %impl_witness: = impl_witness (file.%impl_witness_assoc_constant), @impl(%V.loc11_14.2) [symbolic = %impl_witness (constants.%impl_witness.6f03c8.1)] +// CHECK:STDOUT: %I2.impl_witness: = impl_witness file.%I2.impl_witness_table, @impl(%V.loc11_14.2) [symbolic = %I2.impl_witness (constants.%I2.impl_witness.24366f.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc11_22 as %.loc11_30 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%I2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -410,7 +411,7 @@ interface C { // CHECK:STDOUT: %V.loc11_14.2 => constants.%V // CHECK:STDOUT: %V.patt.loc11_14.2 => constants.%V.patt // CHECK:STDOUT: %V.as_type.loc11_22.2 => constants.%V.as_type -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.6f03c8.1 +// CHECK:STDOUT: %I2.impl_witness => constants.%I2.impl_witness.24366f.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%V.loc11_14.2) {} @@ -419,7 +420,7 @@ interface C { // CHECK:STDOUT: %V.loc11_14.2 => constants.%Self.541 // CHECK:STDOUT: %V.patt.loc11_14.2 => constants.%V.patt // CHECK:STDOUT: %V.as_type.loc11_22.2 => constants.%Self.as_type -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.6f03c8.2 +// CHECK:STDOUT: %I2.impl_witness => constants.%I2.impl_witness.24366f.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index b24172fa6d20..863413187c19 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -82,17 +82,17 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %Simple.type.51f: type = facet_type <@Simple, @Simple(%C)> [concrete] // CHECK:STDOUT: %Self.21f: %Simple.type.51f = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness @C.%Simple.impl_witness_table [concrete] // CHECK:STDOUT: %WithAssocFn.type.683: type = facet_type <@WithAssocFn, @WithAssocFn(%C)> [concrete] // CHECK:STDOUT: %Self.7ae: %WithAssocFn.type.683 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.18c: type = fn_type @F.1, @WithAssocFn(%C) [concrete] // CHECK:STDOUT: %F.e46: %F.type.18c = struct_value () [concrete] // CHECK:STDOUT: %WithAssocFn.assoc_type.9ea: type = assoc_entity_type @WithAssocFn, @WithAssocFn(%C) [concrete] // CHECK:STDOUT: %assoc0.cad: %WithAssocFn.assoc_type.9ea = assoc_entity element0, @WithAssocFn.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness.49b: = impl_witness (@impl.90b.%F.decl) [concrete] +// CHECK:STDOUT: %WithAssocFn.impl_witness: = impl_witness @C.%WithAssocFn.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.005: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.317: %F.type.005 = struct_value () [concrete] -// CHECK:STDOUT: %WithAssocFn.facet: %WithAssocFn.type.683 = facet_value %C, (%impl_witness.49b) [concrete] +// CHECK:STDOUT: %WithAssocFn.facet: %WithAssocFn.type.683 = facet_value %C, (%WithAssocFn.impl_witness) [concrete] // CHECK:STDOUT: %X.val: %X = struct_value () [concrete] // CHECK:STDOUT: %N: %T.8b3 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %T.8b3 = symbolic_binding_pattern N, 1 [symbolic] @@ -219,7 +219,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.763: %Self.ref as %Simple.type { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = @C.%impl_witness.loc14 +// CHECK:STDOUT: witness = @C.%Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.90b: %Self.ref as %WithAssocFn.type { @@ -235,7 +235,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .X = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = @C.%impl_witness.loc15 +// CHECK:STDOUT: witness = @C.%WithAssocFn.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -254,14 +254,16 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [concrete = constants.%Simple.type.51f] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc14: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (), @impl.763 [concrete] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness %Simple.impl_witness_table [concrete = constants.%Simple.impl_witness] // CHECK:STDOUT: impl_decl @impl.90b [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %WithAssocFn.ref: %WithAssocFn.type.509 = name_ref WithAssocFn, file.%WithAssocFn.decl [concrete = constants.%WithAssocFn.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %WithAssocFn.type: type = facet_type <@WithAssocFn, @WithAssocFn(constants.%C)> [concrete = constants.%WithAssocFn.type.683] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness (@impl.90b.%F.decl) [concrete = constants.%impl_witness.49b] +// CHECK:STDOUT: %WithAssocFn.impl_witness_table = impl_witness_table (@impl.90b.%F.decl), @impl.90b [concrete] +// CHECK:STDOUT: %WithAssocFn.impl_witness: = impl_witness %WithAssocFn.impl_witness_table [concrete = constants.%WithAssocFn.impl_witness] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon index 2ceef0302e48..8b0e0b6e48bc 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon @@ -112,10 +112,10 @@ impl C as AddWith(C) { // CHECK:STDOUT: %F.b58: %F.type.cd2 = struct_value () [concrete] // CHECK:STDOUT: %AddWith.assoc_type.3f0: type = assoc_entity_type @AddWith, @AddWith(%C) [concrete] // CHECK:STDOUT: %assoc0.730: %AddWith.assoc_type.3f0 = assoc_entity element0, imports.%Main.import_ref.0c5 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %AddWith.impl_witness: = impl_witness file.%AddWith.impl_witness_table [concrete] // CHECK:STDOUT: %F.type.c09: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.e62: %F.type.c09 = struct_value () [concrete] -// CHECK:STDOUT: %AddWith.facet: %AddWith.type.e8e = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %AddWith.facet: %AddWith.type.e8e = facet_value %C, (%AddWith.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -142,7 +142,8 @@ impl C as AddWith(C) { // CHECK:STDOUT: %C.ref.loc7_19: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(constants.%C)> [concrete = constants.%AddWith.type.e8e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %AddWith.impl_witness: = impl_witness %AddWith.impl_witness_table [concrete = constants.%AddWith.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @AddWith(imports.%Main.import_ref.5ab3ec.1: type) [from "a.carbon"] { @@ -170,7 +171,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%AddWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/interface/no_prelude/generic_method.carbon b/toolchain/check/testdata/interface/no_prelude/generic_method.carbon index 178bf2b58d0d..68e425a905bb 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_method.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_method.carbon @@ -107,14 +107,14 @@ fn CallIndirect() { // CHECK:STDOUT: %F.d83: %F.type.13d = struct_value () [concrete] // CHECK:STDOUT: %A.assoc_type.296: type = assoc_entity_type @A, @A(%X) [concrete] // CHECK:STDOUT: %assoc0.5f6: %A.assoc_type.296 = assoc_entity element0, @A.%F.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness file.%A.impl_witness_table [concrete] // CHECK:STDOUT: %U.8b3: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt.e01: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %tuple.type.ff9: type = tuple_type (type, type, type) [concrete] // CHECK:STDOUT: %tuple.type.765: type = tuple_type (%X, %Y, %U.8b3) [symbolic] // CHECK:STDOUT: %F.type.436: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.ce9: %F.type.436 = struct_value () [concrete] -// CHECK:STDOUT: %A.facet.166: %A.type.91f = facet_value %Y, (%impl_witness) [concrete] +// CHECK:STDOUT: %A.facet.552: %A.type.91f = facet_value %Y, (%A.impl_witness) [concrete] // CHECK:STDOUT: %tuple.type.a0c: type = tuple_type (type, %A.type.91f, type) [concrete] // CHECK:STDOUT: %require_complete.816: = require_complete_type %tuple.type.765 [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %U.8b3 [symbolic] @@ -123,7 +123,7 @@ fn CallIndirect() { // CHECK:STDOUT: %Y.val: %Y = struct_value () [concrete] // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete] // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete] -// CHECK:STDOUT: %.6fe: type = fn_type_with_self_type %F.type.13d, %A.facet.166 [concrete] +// CHECK:STDOUT: %.a60: type = fn_type_with_self_type %F.type.13d, %A.facet.552 [concrete] // CHECK:STDOUT: %tuple.type.f6b: type = tuple_type (%X, %Y, %Z) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ce9, @F.2(%Z) [concrete] // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete] @@ -141,7 +141,7 @@ fn CallIndirect() { // CHECK:STDOUT: %require_complete.500: = require_complete_type %tuple.type.e28 [symbolic] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] -// CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%A.facet.166) [concrete] +// CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%A.facet.552) [concrete] // CHECK:STDOUT: %complete_type.a64: = complete_type_witness %tuple.type.f6b [concrete] // CHECK:STDOUT: %tuple.type.9c8: type = tuple_type (%empty_struct_type, %empty_struct_type, %Z) [concrete] // CHECK:STDOUT: } @@ -170,7 +170,8 @@ fn CallIndirect() { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.91f] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {} // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] { // CHECK:STDOUT: %T.patt.loc25_16.1: %A.type.91f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_16.2 (constants.%T.patt.e81)] @@ -256,7 +257,7 @@ fn CallIndirect() { // CHECK:STDOUT: .X = // CHECK:STDOUT: .Y = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -335,14 +336,14 @@ fn CallIndirect() { // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.91f] -// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value constants.%Y, (constants.%impl_witness) [concrete = constants.%A.facet.166] -// CHECK:STDOUT: %.loc22_6: %A.type.91f = converted %Y.ref, %A.facet [concrete = constants.%A.facet.166] +// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value constants.%Y, (constants.%A.impl_witness) [concrete = constants.%A.facet.552] +// CHECK:STDOUT: %.loc22_6: %A.type.91f = converted %Y.ref, %A.facet [concrete = constants.%A.facet.552] // CHECK:STDOUT: %.loc22_14.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X) [concrete = constants.%assoc0.5f6] // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc22_14.1 [concrete = constants.%assoc0.5f6] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc22_6 [concrete = constants.%Y] // CHECK:STDOUT: %.loc22_14.2: type = converted %.loc22_6, %as_type [concrete = constants.%Y] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc22_6, element0 [concrete = constants.%impl_witness] -// CHECK:STDOUT: %impl.elem0: %.6fe = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.ce9] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc22_6, element0 [concrete = constants.%A.impl_witness] +// CHECK:STDOUT: %impl.elem0: %.a60 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.ce9] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc22_21.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%Z) [concrete = constants.%F.specific_fn] @@ -399,9 +400,9 @@ fn CallIndirect() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y] -// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value constants.%Y, (constants.%impl_witness) [concrete = constants.%A.facet.166] -// CHECK:STDOUT: %.loc30: %A.type.91f = converted %Y.ref, %A.facet [concrete = constants.%A.facet.166] -// CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet.166) [concrete = constants.%CallGeneric.specific_fn] +// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value constants.%Y, (constants.%A.impl_witness) [concrete = constants.%A.facet.552] +// CHECK:STDOUT: %.loc30: %A.type.91f = converted %Y.ref, %A.facet [concrete = constants.%A.facet.552] +// CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet.552) [concrete = constants.%CallGeneric.specific_fn] // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -445,12 +446,12 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.765 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.166, constants.%U.8b3) { +// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.552, constants.%U.8b3) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.8b3 // CHECK:STDOUT: %U.patt.loc6_8.2 => constants.%U.patt.b3a // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.91f -// CHECK:STDOUT: %Self => constants.%A.facet.166 +// CHECK:STDOUT: %Self => constants.%A.facet.552 // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.a0c // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%Y // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.765 @@ -485,27 +486,27 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%X, @CallGeneric.%A.facet, constants.%Z) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.166) { -// CHECK:STDOUT: %T.loc25_16.2 => constants.%A.facet.166 +// CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.552) { +// CHECK:STDOUT: %T.loc25_16.2 => constants.%A.facet.552 // CHECK:STDOUT: %T.patt.loc25_16.2 => constants.%T.patt.e81 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc26_4.2 => constants.%Y -// CHECK:STDOUT: %T.as_wit.iface0.loc26_4.2 => constants.%impl_witness -// CHECK:STDOUT: %A.facet => constants.%A.facet.166 -// CHECK:STDOUT: %.loc26_4.3 => constants.%.6fe +// CHECK:STDOUT: %T.as_wit.iface0.loc26_4.2 => constants.%A.impl_witness +// CHECK:STDOUT: %A.facet => constants.%A.facet.552 +// CHECK:STDOUT: %.loc26_4.3 => constants.%.a60 // CHECK:STDOUT: %impl.elem0.loc26_4.2 => constants.%F.ce9 // CHECK:STDOUT: %specific_impl_fn.loc26_4.2 => constants.%F.specific_fn // CHECK:STDOUT: %tuple.type => constants.%tuple.type.f6b // CHECK:STDOUT: %require_complete => constants.%complete_type.a64 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.166, constants.%Z) { +// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.552, constants.%Z) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z // CHECK:STDOUT: %U.patt.loc6_8.2 => constants.%U.patt.b3a // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.91f -// CHECK:STDOUT: %Self => constants.%A.facet.166 +// CHECK:STDOUT: %Self => constants.%A.facet.552 // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.a0c // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%Y // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.f6b @@ -551,14 +552,14 @@ fn CallIndirect() { // CHECK:STDOUT: %A.assoc_type.b05: type = assoc_entity_type @A, @A(%W) [symbolic] // CHECK:STDOUT: %assoc0.c82: %A.assoc_type.b05 = assoc_entity element0, @A.%F.decl [symbolic] // CHECK:STDOUT: %require_complete.796: = require_complete_type %A.type.f21 [symbolic] -// CHECK:STDOUT: %impl_witness.0d8: = impl_witness (@impl.%F.decl), @impl(%V1, %V2, %W) [symbolic] +// CHECK:STDOUT: %A.impl_witness.f15: = impl_witness file.%A.impl_witness_table, @impl(%V1, %V2, %W) [symbolic] // CHECK:STDOUT: %U.753: type = bind_symbolic_name U, 3 [symbolic] // CHECK:STDOUT: %U.patt.cfd: type = symbolic_binding_pattern U, 3 [symbolic] // CHECK:STDOUT: %tuple.type.11f: type = tuple_type (type, %tuple.type.24b, type) [concrete] // CHECK:STDOUT: %tuple.type.8ae: type = tuple_type (%W, %tuple.type.30b, %U.753) [symbolic] // CHECK:STDOUT: %F.type.b3e: type = fn_type @F.2, @impl(%V1, %V2, %W) [symbolic] // CHECK:STDOUT: %F.d79: %F.type.b3e = struct_value () [symbolic] -// CHECK:STDOUT: %A.facet.412: %A.type.f21 = facet_value %tuple.type.30b, (%impl_witness.0d8) [symbolic] +// CHECK:STDOUT: %A.facet.461: %A.type.f21 = facet_value %tuple.type.30b, (%A.impl_witness.f15) [symbolic] // CHECK:STDOUT: %tuple.type.136: type = tuple_type (type, %A.type.f21, type) [symbolic] // CHECK:STDOUT: %require_complete.d4d: = require_complete_type %tuple.type.8ae [symbolic] // CHECK:STDOUT: %require_complete.ed4: = require_complete_type %U.753 [symbolic] @@ -577,11 +578,11 @@ fn CallIndirect() { // CHECK:STDOUT: %A.assoc_type.296: type = assoc_entity_type @A, @A(%X) [concrete] // CHECK:STDOUT: %assoc0.5f6: %A.assoc_type.296 = assoc_entity element0, @A.%F.decl [concrete] // CHECK:STDOUT: %complete_type.d76: = complete_type_witness %A.type.91f [concrete] -// CHECK:STDOUT: %impl_witness.14a: = impl_witness (@impl.%F.decl), @impl(%Y1, %Y2, %X) [concrete] +// CHECK:STDOUT: %A.impl_witness.8ac: = impl_witness file.%A.impl_witness_table, @impl(%Y1, %Y2, %X) [concrete] // CHECK:STDOUT: %F.type.bf7: type = fn_type @F.2, @impl(%Y1, %Y2, %X) [concrete] // CHECK:STDOUT: %F.93b: %F.type.bf7 = struct_value () [concrete] -// CHECK:STDOUT: %A.facet.058: %A.type.91f = facet_value %tuple.type.a46, (%impl_witness.14a) [concrete] -// CHECK:STDOUT: %.0b0: type = fn_type_with_self_type %F.type.13d, %A.facet.058 [concrete] +// CHECK:STDOUT: %A.facet.414: %A.type.91f = facet_value %tuple.type.a46, (%A.impl_witness.8ac) [concrete] +// CHECK:STDOUT: %.406: type = fn_type_with_self_type %F.type.13d, %A.facet.414 [concrete] // CHECK:STDOUT: %tuple.type.415: type = tuple_type (%X, %tuple.type.a46, %Z) [concrete] // CHECK:STDOUT: %F.specific_fn.79b: = specific_function %F.93b, @F.2(%Y1, %Y2, %X, %Z) [concrete] // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete] @@ -600,7 +601,7 @@ fn CallIndirect() { // CHECK:STDOUT: %require_complete.500: = require_complete_type %tuple.type.e28 [symbolic] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] -// CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%A.facet.058) [concrete] +// CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%A.facet.414) [concrete] // CHECK:STDOUT: %complete_type.aa8: = complete_type_witness %tuple.type.415 [concrete] // CHECK:STDOUT: %complete_type.4d1: = complete_type_witness %tuple.type.a46 [concrete] // CHECK:STDOUT: } @@ -641,7 +642,8 @@ fn CallIndirect() { // CHECK:STDOUT: %V2.loc14_25.1: type = bind_symbolic_name V2, 1 [symbolic = %V2.loc14_25.2 (constants.%V2)] // CHECK:STDOUT: %W.loc14_36.1: type = bind_symbolic_name W, 2 [symbolic = %W.loc14_36.2 (constants.%W)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%F.decl), @impl(constants.%V1, constants.%V2, constants.%W) [symbolic = @impl.%impl_witness (constants.%impl_witness.0d8)] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table, @impl(constants.%V1, constants.%V2, constants.%W) [symbolic = @impl.%A.impl_witness (constants.%A.impl_witness.f15)] // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {} // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] { // CHECK:STDOUT: %T.patt.loc27_16.1: %A.type.91f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_16.2 (constants.%T.patt.e81)] @@ -712,7 +714,7 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type: type = tuple_type (%V1.loc14_14.2, %V2.loc14_25.2) [symbolic = %tuple.type (constants.%tuple.type.30b)] // CHECK:STDOUT: %A.type.loc14_61.2: type = facet_type <@A, @A(%W.loc14_36.2)> [symbolic = %A.type.loc14_61.2 (constants.%A.type.f21)] // CHECK:STDOUT: %require_complete: = require_complete_type %A.type.loc14_61.2 [symbolic = %require_complete (constants.%require_complete.796)] -// CHECK:STDOUT: %impl_witness: = impl_witness (%F.decl), @impl(%V1.loc14_14.2, %V2.loc14_25.2, %W.loc14_36.2) [symbolic = %impl_witness (constants.%impl_witness.0d8)] +// CHECK:STDOUT: %A.impl_witness: = impl_witness file.%A.impl_witness_table, @impl(%V1.loc14_14.2, %V2.loc14_25.2, %W.loc14_36.2) [symbolic = %A.impl_witness (constants.%A.impl_witness.f15)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%V1.loc14_14.2, %V2.loc14_25.2, %W.loc14_36.2) [symbolic = %F.type (constants.%F.type.b3e)] @@ -747,7 +749,7 @@ fn CallIndirect() { // CHECK:STDOUT: .V1 = // CHECK:STDOUT: .V2 = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -865,14 +867,14 @@ fn CallIndirect() { // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.91f] -// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value constants.%tuple.type.a46, (constants.%impl_witness.14a) [concrete = constants.%A.facet.058] -// CHECK:STDOUT: %.loc24_23: %A.type.91f = converted %.loc24_14, %A.facet [concrete = constants.%A.facet.058] +// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value constants.%tuple.type.a46, (constants.%A.impl_witness.8ac) [concrete = constants.%A.facet.414] +// CHECK:STDOUT: %.loc24_23: %A.type.91f = converted %.loc24_14, %A.facet [concrete = constants.%A.facet.414] // CHECK:STDOUT: %.loc24_31.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X) [concrete = constants.%assoc0.5f6] // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc24_31.1 [concrete = constants.%assoc0.5f6] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc24_23 [concrete = constants.%tuple.type.a46] // CHECK:STDOUT: %.loc24_31.2: type = converted %.loc24_23, %as_type [concrete = constants.%tuple.type.a46] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc24_23, element0 [concrete = constants.%impl_witness.14a] -// CHECK:STDOUT: %impl.elem0: %.0b0 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.93b] +// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc24_23, element0 [concrete = constants.%A.impl_witness.8ac] +// CHECK:STDOUT: %impl.elem0: %.406 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.93b] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc24_38.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) [concrete = constants.%F.specific_fn.79b] @@ -932,9 +934,9 @@ fn CallIndirect() { // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2] // CHECK:STDOUT: %.loc33_22: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref) // CHECK:STDOUT: %.loc33_24: type = converted %.loc33_22, constants.%tuple.type.a46 [concrete = constants.%tuple.type.a46] -// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value constants.%tuple.type.a46, (constants.%impl_witness.14a) [concrete = constants.%A.facet.058] -// CHECK:STDOUT: %.loc33_31: %A.type.91f = converted %.loc33_24, %A.facet [concrete = constants.%A.facet.058] -// CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet.058) [concrete = constants.%CallGeneric.specific_fn] +// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value constants.%tuple.type.a46, (constants.%A.impl_witness.8ac) [concrete = constants.%A.facet.414] +// CHECK:STDOUT: %.loc33_31: %A.type.91f = converted %.loc33_24, %A.facet [concrete = constants.%A.facet.414] +// CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet.414) [concrete = constants.%CallGeneric.specific_fn] // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -982,7 +984,7 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type => constants.%tuple.type.30b // CHECK:STDOUT: %A.type.loc14_61.2 => constants.%A.type.f21 // CHECK:STDOUT: %require_complete => constants.%require_complete.796 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.0d8 +// CHECK:STDOUT: %A.impl_witness => constants.%A.impl_witness.f15 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.b3e @@ -1014,12 +1016,12 @@ fn CallIndirect() { // CHECK:STDOUT: %require_complete.loc18_18.4 => constants.%require_complete.b54 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%W, constants.%A.facet.412, constants.%U.753) { +// CHECK:STDOUT: specific @F.1(constants.%W, constants.%A.facet.461, constants.%U.753) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.753 // CHECK:STDOUT: %U.patt.loc6_8.2 => constants.%U.patt.b3a // CHECK:STDOUT: %T => constants.%W // CHECK:STDOUT: %A.type => constants.%A.type.f21 -// CHECK:STDOUT: %Self => constants.%A.facet.412 +// CHECK:STDOUT: %Self => constants.%A.facet.461 // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.136 // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%tuple.type.30b // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.8ae @@ -1052,7 +1054,7 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a46 // CHECK:STDOUT: %A.type.loc14_61.2 => constants.%A.type.91f // CHECK:STDOUT: %require_complete => constants.%complete_type.d76 -// CHECK:STDOUT: %impl_witness => constants.%impl_witness.14a +// CHECK:STDOUT: %A.impl_witness => constants.%A.impl_witness.8ac // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.bf7 @@ -1098,27 +1100,27 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%X, @CallGeneric.%A.facet, constants.%Z) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.058) { -// CHECK:STDOUT: %T.loc27_16.2 => constants.%A.facet.058 +// CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.414) { +// CHECK:STDOUT: %T.loc27_16.2 => constants.%A.facet.414 // CHECK:STDOUT: %T.patt.loc27_16.2 => constants.%T.patt.e81 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc28_4.2 => constants.%tuple.type.a46 -// CHECK:STDOUT: %T.as_wit.iface0.loc28_4.2 => constants.%impl_witness.14a -// CHECK:STDOUT: %A.facet => constants.%A.facet.058 -// CHECK:STDOUT: %.loc28_4.3 => constants.%.0b0 +// CHECK:STDOUT: %T.as_wit.iface0.loc28_4.2 => constants.%A.impl_witness.8ac +// CHECK:STDOUT: %A.facet => constants.%A.facet.414 +// CHECK:STDOUT: %.loc28_4.3 => constants.%.406 // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%F.93b // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%F.specific_fn.79b // CHECK:STDOUT: %tuple.type => constants.%tuple.type.415 // CHECK:STDOUT: %require_complete => constants.%complete_type.aa8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.058, constants.%Z) { +// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.414, constants.%Z) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z // CHECK:STDOUT: %U.patt.loc6_8.2 => constants.%U.patt.b3a // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.91f -// CHECK:STDOUT: %Self => constants.%A.facet.058 +// CHECK:STDOUT: %Self => constants.%A.facet.414 // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.a0c // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%tuple.type.a46 // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.415 diff --git a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon index 4acfd5bceed3..cb40309a0c3a 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon @@ -98,14 +98,18 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %NotGenericNoParams.impl_witness: = impl_witness file.%NotGenericNoParams.impl_witness_table [concrete] +// CHECK:STDOUT: %NotGenericButParams.impl_witness: = impl_witness file.%NotGenericButParams.impl_witness_table [concrete] // CHECK:STDOUT: %GenericAndParams.type.4b6: type = facet_type <@GenericAndParams.1, @GenericAndParams.1(%X)> [concrete] // CHECK:STDOUT: %Self.2f7: %GenericAndParams.type.4b6 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %GenericAndParams.impl_witness.c06: = impl_witness file.%GenericAndParams.impl_witness_table.loc16 [concrete] // CHECK:STDOUT: %C.fac: type = class_type @C, @C(%X) [concrete] // CHECK:STDOUT: %GenericAndParams.type.425: type = generic_interface_type @GenericAndParams.2, @C(%X) [concrete] // CHECK:STDOUT: %GenericAndParams.generic.b50: %GenericAndParams.type.425 = struct_value () [concrete] +// CHECK:STDOUT: %GenericNoParams.impl_witness: = impl_witness file.%GenericNoParams.impl_witness_table [concrete] // CHECK:STDOUT: %GenericAndParams.type.79c: type = facet_type <@GenericAndParams.2, @GenericAndParams.2(%X, %X)> [concrete] // CHECK:STDOUT: %Self.f51: %GenericAndParams.type.79c = bind_symbolic_name Self, 2 [symbolic] +// CHECK:STDOUT: %GenericAndParams.impl_witness.c9b: = impl_witness file.%GenericAndParams.impl_witness_table.loc18 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -133,20 +137,23 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %NotGenericNoParams.ref: type = name_ref NotGenericNoParams, file.%NotGenericNoParams.decl [concrete = constants.%NotGenericNoParams.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc14: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %NotGenericNoParams.impl_witness_table = impl_witness_table (), @impl.c96 [concrete] +// CHECK:STDOUT: %NotGenericNoParams.impl_witness: = impl_witness %NotGenericNoParams.impl_witness_table [concrete = constants.%NotGenericNoParams.impl_witness] // CHECK:STDOUT: impl_decl @impl.f59 [concrete] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type.f26 = name_ref NotGenericButParams, file.%NotGenericButParams.decl [concrete = constants.%NotGenericButParams.generic] // CHECK:STDOUT: %NotGenericButParams.type: type = facet_type <@NotGenericButParams> [concrete = constants.%NotGenericButParams.type.014] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %NotGenericButParams.impl_witness_table = impl_witness_table (), @impl.f59 [concrete] +// CHECK:STDOUT: %NotGenericButParams.impl_witness: = impl_witness %NotGenericButParams.impl_witness_table [concrete = constants.%NotGenericButParams.impl_witness] // CHECK:STDOUT: impl_decl @impl.87f [concrete] {} { // CHECK:STDOUT: %X.ref.loc16_6: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %GenericAndParams.ref: %GenericAndParams.type.cde = name_ref GenericAndParams, file.%GenericAndParams.decl [concrete = constants.%GenericAndParams.generic.827] // CHECK:STDOUT: %X.ref.loc16_28: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %GenericAndParams.type: type = facet_type <@GenericAndParams.1, @GenericAndParams.1(constants.%X)> [concrete = constants.%GenericAndParams.type.4b6] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc16: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %GenericAndParams.impl_witness_table.loc16 = impl_witness_table (), @impl.87f [concrete] +// CHECK:STDOUT: %GenericAndParams.impl_witness.loc16: = impl_witness %GenericAndParams.impl_witness_table.loc16 [concrete = constants.%GenericAndParams.impl_witness.c06] // CHECK:STDOUT: impl_decl @impl.3f8 [concrete] {} { // CHECK:STDOUT: %X.ref.loc17_6: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] @@ -154,7 +161,8 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%X) [concrete = constants.%C.fac] // CHECK:STDOUT: %GenericNoParams.ref: type = name_ref GenericNoParams, @C.%GenericNoParams.decl [concrete = constants.%GenericNoParams.type.f90] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %GenericNoParams.impl_witness_table = impl_witness_table (), @impl.3f8 [concrete] +// CHECK:STDOUT: %GenericNoParams.impl_witness: = impl_witness %GenericNoParams.impl_witness_table [concrete = constants.%GenericNoParams.impl_witness] // CHECK:STDOUT: impl_decl @impl.15f [concrete] {} { // CHECK:STDOUT: %X.ref.loc18_6: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] @@ -165,7 +173,8 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %X.ref.loc18_33: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %GenericAndParams.type: type = facet_type <@GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X)> [concrete = constants.%GenericAndParams.type.79c] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc18: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %GenericAndParams.impl_witness_table.loc18 = impl_witness_table (), @impl.15f [concrete] +// CHECK:STDOUT: %GenericAndParams.impl_witness.loc18: = impl_witness %GenericAndParams.impl_witness_table.loc18 [concrete = constants.%GenericAndParams.impl_witness.c9b] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NotGenericNoParams { @@ -236,27 +245,27 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c96: %X.ref as %NotGenericNoParams.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc14 +// CHECK:STDOUT: witness = file.%NotGenericNoParams.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.f59: %X.ref as %NotGenericButParams.type { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc15 +// CHECK:STDOUT: witness = file.%NotGenericButParams.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.87f: %X.ref.loc16_6 as %GenericAndParams.type { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc16 +// CHECK:STDOUT: witness = file.%GenericAndParams.impl_witness.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3f8: %X.ref.loc17_6 as %GenericNoParams.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%GenericNoParams.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.15f: %X.ref.loc18_6 as %GenericAndParams.type { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness.loc18 +// CHECK:STDOUT: witness = file.%GenericAndParams.impl_witness.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc8_9.1: type) { diff --git a/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon b/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon index d3e27c6e6838..3e8106fe9bd5 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon @@ -62,7 +62,7 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] // CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %B.impl_witness: = impl_witness file.%B.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,7 +75,8 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: %.loc7_7.2: type = converted %.loc7_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %B.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %B.impl_witness: = impl_witness %B.impl_witness_table [concrete = constants.%B.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @B { diff --git a/toolchain/check/testdata/interface/no_prelude/local.carbon b/toolchain/check/testdata/interface/no_prelude/local.carbon index cc21f45d9d79..46fde2248f99 100644 --- a/toolchain/check/testdata/interface/no_prelude/local.carbon +++ b/toolchain/check/testdata/interface/no_prelude/local.carbon @@ -31,11 +31,11 @@ fn F() { // CHECK:STDOUT: %G.f0a: %G.type.bff = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%G.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%G.decl) [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @F.%I.impl_witness_table [concrete] // CHECK:STDOUT: %G.type.c84: type = fn_type @G.2 [concrete] // CHECK:STDOUT: %G.5a2: %G.type.c84 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%impl_witness) [concrete] -// CHECK:STDOUT: %.7e3: type = fn_type_with_self_type %G.type.bff, %I.facet [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %.ba5: type = fn_type_with_self_type %G.type.bff, %I.facet [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,7 +80,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = @F.%impl_witness +// CHECK:STDOUT: witness = @F.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -91,11 +91,12 @@ fn F() { // CHECK:STDOUT: %.loc15_9.2: type = converted %.loc15_9.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.ref: type = name_ref I, @F.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%G.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%G.decl), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %.loc18_4.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %G.ref: %I.assoc_type = name_ref G, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.7e3 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%G.5a2] +// CHECK:STDOUT: %impl.elem0: %.ba5 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%G.5a2] // CHECK:STDOUT: %bound_method: = bound_method %.loc18_4.1, %impl.elem0 // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_4.2: %empty_tuple.type = converted %.loc18_4.1, %empty_tuple [concrete = constants.%empty_tuple] diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index 8c715ede6cc5..270502959a05 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -40,11 +40,12 @@ interface I { // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] @@ -111,7 +112,7 @@ interface I { // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { // CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.%N [concrete = constants.%assoc3] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_19.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_19.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/function_decl.carbon b/toolchain/check/testdata/interop/cpp/function_decl.carbon index d8a025cd377a..01d1660115d6 100644 --- a/toolchain/check/testdata/interop/cpp/function_decl.carbon +++ b/toolchain/check/testdata/interop/cpp/function_decl.carbon @@ -341,11 +341,12 @@ fn F() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -386,7 +387,7 @@ fn F() { // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {} {} // CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, %foo.decl [concrete = constants.%foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -413,11 +414,12 @@ fn F() { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -464,14 +466,14 @@ fn F() { // CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, %foo.decl [concrete = constants.%foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc7_11: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc7_11: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0.loc7_11 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc7_11: = specific_function %impl.elem0.loc7_11, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn.loc7_11 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc7_11: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked.loc7_11 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.2: %i32 = converted %int_1, %.loc7_11.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc7_14: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc7_14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_14.1: = bound_method %int_2, %impl.elem0.loc7_14 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc7_14: = specific_function %impl.elem0.loc7_14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_14.2: = bound_method %int_2, %specific_fn.loc7_14 [concrete = constants.%bound_method.b92] @@ -498,11 +500,12 @@ fn F() { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -560,14 +563,14 @@ fn F() { // CHECK:STDOUT: %foo1.ref: %foo1.type = name_ref foo1, %foo1.decl [concrete = constants.%foo1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc7_12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc7_12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_12.1: = bound_method %int_1, %impl.elem0.loc7_12 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc7_12: = specific_function %impl.elem0.loc7_12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_12.2: = bound_method %int_1, %specific_fn.loc7_12 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc7_12: init %i32 = call %bound_method.loc7_12.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_12.1: %i32 = value_of_initializer %int.convert_checked.loc7_12 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_12.2: %i32 = converted %int_1, %.loc7_12.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc7_15: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc7_15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_15.1: = bound_method %int_2, %impl.elem0.loc7_15 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc7_15: = specific_function %impl.elem0.loc7_15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_15.2: = bound_method %int_2, %specific_fn.loc7_15 [concrete = constants.%bound_method.b92] @@ -584,14 +587,14 @@ fn F() { // CHECK:STDOUT: %foo2.ref: %foo2.type = name_ref foo2, %foo2.decl [concrete = constants.%foo2] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc8_12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc8_12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %int_3, %impl.elem0.loc8_12 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc8_12: = specific_function %impl.elem0.loc8_12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %int_3, %specific_fn.loc8_12 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc8_12: init %i32 = call %bound_method.loc8_12.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc8_12.1: %i32 = value_of_initializer %int.convert_checked.loc8_12 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc8_12.2: %i32 = converted %int_3, %.loc8_12.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc8_15: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc8_15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %int_4, %impl.elem0.loc8_15 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc8_15: = specific_function %impl.elem0.loc8_15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %int_4, %specific_fn.loc8_15 [concrete = constants.%bound_method.1da] @@ -619,11 +622,12 @@ fn F() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -664,7 +668,7 @@ fn F() { // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {} {} // CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, %foo.decl [concrete = constants.%foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -738,11 +742,12 @@ fn F() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -783,7 +788,7 @@ fn F() { // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {} {} // CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, %foo.decl [concrete = constants.%foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -806,11 +811,12 @@ fn F() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -851,7 +857,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -879,11 +885,12 @@ fn F() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -925,7 +932,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon index ce0154ec67f8..87087718b20e 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -21,11 +21,12 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -66,7 +67,7 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: } // CHECK:STDOUT: %n.var.loc11_22: ref %i32 = var n // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc11_22: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_22: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_22.1: = bound_method %int_1, %impl.elem0.loc11_22 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11_22: = specific_function %impl.elem0.loc11_22, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_22.2: = bound_method %int_1, %specific_fn.loc11_22 [concrete = constants.%bound_method.9a1] @@ -91,7 +92,7 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: } // CHECK:STDOUT: %n.var.loc11_52: ref %i32 = var n // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc11_52: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_52: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_52.1: = bound_method %int_2, %impl.elem0.loc11_52 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_52: = specific_function %impl.elem0.loc11_52, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_52.2: = bound_method %int_2, %specific_fn.loc11_52 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 0d5e65561393..4cb3dc8229e3 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -590,11 +590,12 @@ impl i32 as Empty { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -637,7 +638,7 @@ impl i32 as Empty { // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -662,11 +663,12 @@ impl i32 as Empty { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -717,7 +719,7 @@ impl i32 as Empty { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc6: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_22.1: = bound_method %int_0, %impl.elem0.loc6 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_22.2: = bound_method %int_0, %specific_fn.loc6 [concrete = constants.%bound_method.b6e] @@ -730,7 +732,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc9: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_11.1: = bound_method %int_1, %impl.elem0.loc9 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_11.2: = bound_method %int_1, %specific_fn.loc9 [concrete = constants.%bound_method.9a1] @@ -935,15 +937,16 @@ impl i32 as Empty { // CHECK:STDOUT: %Self.193: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %impl_witness.1bc: = impl_witness () [concrete] +// CHECK:STDOUT: %Empty.impl_witness: = impl_witness file.%Empty.impl_witness_table [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -971,7 +974,8 @@ impl i32 as Empty { // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness.1bc] +// CHECK:STDOUT: %Empty.impl_witness_table = impl_witness_table (), @impl.cfd [concrete] +// CHECK:STDOUT: %Empty.impl_witness: = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { @@ -991,7 +995,7 @@ impl i32 as Empty { // CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -1002,6 +1006,6 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Zero -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index db07ff4e6a38..d0a271842af9 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -30,11 +30,12 @@ fn F() -> i32 { // CHECK:STDOUT: %tuple.type.37f: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -85,7 +86,7 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc12_36.1: %tuple.type.37f = tuple_literal (%int_1.loc12, %int_2, %int_3) -// CHECK:STDOUT: %impl.elem0.loc12_36.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_36.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_36.1: = bound_method %int_1.loc12, %impl.elem0.loc12_36.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc12_36.1: = specific_function %impl.elem0.loc12_36.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_36.2: = bound_method %int_1.loc12, %specific_fn.loc12_36.1 [concrete = constants.%bound_method.9a1] @@ -93,7 +94,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_36.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_36.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %v.var, element0 // CHECK:STDOUT: %.loc12_36.3: init %i32 = initialize_from %.loc12_36.2 to %tuple.elem0 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc12_36.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_36.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_36.3: = bound_method %int_2, %impl.elem0.loc12_36.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc12_36.2: = specific_function %impl.elem0.loc12_36.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_36.4: = bound_method %int_2, %specific_fn.loc12_36.2 [concrete = constants.%bound_method.b92] @@ -101,7 +102,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_36.4: init %i32 = converted %int_2, %int.convert_checked.loc12_36.2 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %tuple.elem1.loc12: ref %i32 = tuple_access %v.var, element1 // CHECK:STDOUT: %.loc12_36.5: init %i32 = initialize_from %.loc12_36.4 to %tuple.elem1.loc12 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc12_36.3: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_36.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_36.5: = bound_method %int_3, %impl.elem0.loc12_36.3 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc12_36.3: = specific_function %impl.elem0.loc12_36.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_36.6: = bound_method %int_3, %specific_fn.loc12_36.3 [concrete = constants.%bound_method.047] diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 2339727ded19..427129eea6e8 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -30,11 +30,12 @@ fn F() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -73,7 +74,7 @@ fn F() { // CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_16.1: = bound_method %int_1, %impl.elem0.loc12 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_16.2: = bound_method %int_1, %specific_fn.loc12 [concrete = constants.%bound_method.9a1] @@ -89,7 +90,7 @@ fn F() { // CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc20: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_16.1: = bound_method %int_2, %impl.elem0.loc20 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_16.2: = bound_method %int_2, %specific_fn.loc20 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index e19357216f3d..ef55fe770316 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -92,11 +92,12 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -132,7 +133,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc15: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_24.1: = bound_method @__global_init.%int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_24.2: = bound_method @__global_init.%int_1.loc15, %specific_fn.loc15 [concrete = constants.%bound_method] @@ -147,7 +148,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc21: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_22.1: = bound_method @__global_init.%int_1.loc21, %impl.elem0.loc21 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_22.2: = bound_method @__global_init.%int_1.loc21, %specific_fn.loc21 [concrete = constants.%bound_method] @@ -162,7 +163,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc27: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc27_20.1: = bound_method @__global_init.%int_1.loc27, %impl.elem0.loc27 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_20.2: = bound_method @__global_init.%int_1.loc27, %specific_fn.loc27 [concrete = constants.%bound_method] @@ -177,7 +178,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc33: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc33: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc33_22.1: = bound_method @__global_init.%int_1.loc33, %impl.elem0.loc33 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc33_22.2: = bound_method @__global_init.%int_1.loc33, %specific_fn.loc33 [concrete = constants.%bound_method] @@ -192,7 +193,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc46: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc46: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc46: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc46: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc46_28.1: = bound_method @__global_init.%int_1.loc46, %impl.elem0.loc46 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc46: = specific_function %impl.elem0.loc46, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc46_28.2: = bound_method @__global_init.%int_1.loc46, %specific_fn.loc46 [concrete = constants.%bound_method] @@ -207,7 +208,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc59: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc59: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc59: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc59: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc59_30.1: = bound_method @__global_init.%int_1.loc59, %impl.elem0.loc59 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc59: = specific_function %impl.elem0.loc59, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc59_30.2: = bound_method @__global_init.%int_1.loc59, %specific_fn.loc59 [concrete = constants.%bound_method] @@ -222,7 +223,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc72: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc72: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc72: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc72: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc72_32.1: = bound_method @__global_init.%int_1.loc72, %impl.elem0.loc72 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc72: = specific_function %impl.elem0.loc72, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc72_32.2: = bound_method @__global_init.%int_1.loc72, %specific_fn.loc72 [concrete = constants.%bound_method] @@ -237,7 +238,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc85: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc85: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc85: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc85: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc85_34.1: = bound_method @__global_init.%int_1.loc85, %impl.elem0.loc85 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc85: = specific_function %impl.elem0.loc85, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc85_34.2: = bound_method @__global_init.%int_1.loc85, %specific_fn.loc85 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index eda338997aa4..d2162a55cef4 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -20,11 +20,12 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -56,7 +57,7 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_14.1: = bound_method @__global_init.%int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_14.2: = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 1ba370e4b1b3..4d951f37c105 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -24,11 +24,12 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -79,7 +80,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_16.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_16.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index 9b909061a1a7..e3736a4c07d5 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -50,11 +50,12 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -107,7 +108,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index 18680d97b3b6..c3d2700dda32 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -30,11 +30,12 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -104,7 +105,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index a14fdfa83d78..4605db7dd116 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -32,11 +32,12 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -76,7 +77,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc23_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index 49f56f6840f6..5a1fd53c8592 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -43,11 +43,12 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -109,7 +110,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %A.var: ref %i32 = var A // CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc22: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc22: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %int_0.loc22, %impl.elem0.loc22 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_5.2: = bound_method %int_0.loc22, %specific_fn.loc22 [concrete = constants.%bound_method] @@ -127,7 +128,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc27: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc27_11.1: = bound_method %int_0.loc27, %impl.elem0.loc27 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_11.2: = bound_method %int_0.loc27, %specific_fn.loc27 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index 1b25fe72dca0..1d525f008227 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -36,11 +36,12 @@ fn Main() { // CHECK:STDOUT: %int_12.6a3: Core.IntLiteral = int_value 12 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -111,7 +112,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] -// CHECK:STDOUT: %impl.elem0.loc12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_12, %impl.elem0.loc12 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_12, %specific_fn.loc12 [concrete = constants.%bound_method.dae] @@ -125,7 +126,7 @@ fn Main() { // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %a.ref.loc13: ref %i32 = name_ref a, %a // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988] -// CHECK:STDOUT: %impl.elem0.loc13: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %int_9, %impl.elem0.loc13 [concrete = constants.%Convert.bound.9e2] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_5.2: = bound_method %int_9, %specific_fn.loc13 [concrete = constants.%bound_method.cd3] @@ -140,7 +141,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc15_28.1: %tuple.type.f94 = tuple_literal (%int_1.loc15, %int_2.loc15) -// CHECK:STDOUT: %impl.elem0.loc15_28.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_28.1: = bound_method %int_1.loc15, %impl.elem0.loc15_28.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc15_28.1: = specific_function %impl.elem0.loc15_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_28.2: = bound_method %int_1.loc15, %specific_fn.loc15_28.1 [concrete = constants.%bound_method.9a1] @@ -148,7 +149,7 @@ fn Main() { // CHECK:STDOUT: %.loc15_28.2: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15_28.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0.loc15: ref %i32 = tuple_access %b.var, element0 // CHECK:STDOUT: %.loc15_28.3: init %i32 = initialize_from %.loc15_28.2 to %tuple.elem0.loc15 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc15_28.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc15_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_28.3: = bound_method %int_2.loc15, %impl.elem0.loc15_28.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc15_28.2: = specific_function %impl.elem0.loc15_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_28.4: = bound_method %int_2.loc15, %specific_fn.loc15_28.2 [concrete = constants.%bound_method.b92] @@ -172,7 +173,7 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc16: ref %i32 = tuple_access %b.ref.loc16, element0 // CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc16: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_7.1: = bound_method %int_3.loc16, %impl.elem0.loc16 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_7.2: = bound_method %int_3.loc16, %specific_fn.loc16 [concrete = constants.%bound_method.047] @@ -183,7 +184,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1.loc17: ref %i32 = tuple_access %b.ref.loc17, element1 // CHECK:STDOUT: %int_4.loc17: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc17: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_4.loc17, %impl.elem0.loc17 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_4.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.1da] @@ -198,7 +199,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc19: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc19_46.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc19, %int_2.loc19) -// CHECK:STDOUT: %impl.elem0.loc19_46.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc19_46.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_46.1: = bound_method %int_1.loc19, %impl.elem0.loc19_46.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc19_46.1: = specific_function %impl.elem0.loc19_46.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_46.2: = bound_method %int_1.loc19, %specific_fn.loc19_46.1 [concrete = constants.%bound_method.9a1] @@ -206,7 +207,7 @@ fn Main() { // CHECK:STDOUT: %.loc19_46.2: init %i32 = converted %int_1.loc19, %int.convert_checked.loc19_46.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc19_46.3: ref %i32 = struct_access %c.var, element0 // CHECK:STDOUT: %.loc19_46.4: init %i32 = initialize_from %.loc19_46.2 to %.loc19_46.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc19_46.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc19_46.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_46.3: = bound_method %int_2.loc19, %impl.elem0.loc19_46.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc19_46.2: = specific_function %impl.elem0.loc19_46.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_46.4: = bound_method %int_2.loc19, %specific_fn.loc19_46.2 [concrete = constants.%bound_method.b92] @@ -228,7 +229,7 @@ fn Main() { // CHECK:STDOUT: %c.ref.loc20: ref %struct_type.a.b.501 = name_ref c, %c // CHECK:STDOUT: %.loc20_4: ref %i32 = struct_access %c.ref.loc20, element0 // CHECK:STDOUT: %int_3.loc20: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc20: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_7.1: = bound_method %int_3.loc20, %impl.elem0.loc20 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_7.2: = bound_method %int_3.loc20, %specific_fn.loc20 [concrete = constants.%bound_method.047] @@ -238,7 +239,7 @@ fn Main() { // CHECK:STDOUT: %c.ref.loc21: ref %struct_type.a.b.501 = name_ref c, %c // CHECK:STDOUT: %.loc21_4: ref %i32 = struct_access %c.ref.loc21, element1 // CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc21: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_7.1: = bound_method %int_4.loc21, %impl.elem0.loc21 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_7.2: = bound_method %int_4.loc21, %specific_fn.loc21 [concrete = constants.%bound_method.1da] @@ -263,7 +264,7 @@ fn Main() { // CHECK:STDOUT: %.loc24_4: %ptr.235 = bind_value %p.ref.loc24 // CHECK:STDOUT: %.loc24_3: ref %i32 = deref %.loc24_4 // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc24: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc24: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc24_6.1: = bound_method %int_5, %impl.elem0.loc24 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_6.2: = bound_method %int_5, %specific_fn.loc24 [concrete = constants.%bound_method.a25] @@ -287,7 +288,7 @@ fn Main() { // CHECK:STDOUT: %.loc26_5: %ptr.235 = block_arg !if.expr.result // CHECK:STDOUT: %.loc26_3: ref %i32 = deref %.loc26_5 // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10.64f] -// CHECK:STDOUT: %impl.elem0.loc26: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_29.1: = bound_method %int_10, %impl.elem0.loc26 [concrete = constants.%Convert.bound.491] // CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_29.2: = bound_method %int_10, %specific_fn.loc26 [concrete = constants.%bound_method.5ba] diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index 4991c7b27681..9e5708467a21 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -70,11 +70,12 @@ fn Main() { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -145,7 +146,7 @@ fn Main() { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref() // CHECK:STDOUT: %int_1.loc23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc23: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc23_7.1: = bound_method %int_1.loc23, %impl.elem0.loc23 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_7.2: = bound_method %int_1.loc23, %specific_fn.loc23 [concrete = constants.%bound_method.9a1] @@ -173,7 +174,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc29: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_3.1: = bound_method %int_0, %impl.elem0.loc29 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_3.2: = bound_method %int_0, %specific_fn.loc29 [concrete = constants.%bound_method.b6e] @@ -191,7 +192,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc34: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc34: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc34_17.1: %tuple.type.f94 = tuple_literal (%int_1.loc34, %int_2.loc34) -// CHECK:STDOUT: %impl.elem0.loc34_17.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc34_17.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc34_17.1: = bound_method %int_1.loc34, %impl.elem0.loc34_17.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc34_17.1: = specific_function %impl.elem0.loc34_17.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc34_17.2: = bound_method %int_1.loc34, %specific_fn.loc34_17.1 [concrete = constants.%bound_method.9a1] @@ -199,7 +200,7 @@ fn Main() { // CHECK:STDOUT: %.loc34_17.2: init %i32 = converted %int_1.loc34, %int.convert_checked.loc34_17.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0.loc34: %i32 = tuple_access %.loc34_8.1, element0 // CHECK:STDOUT: %.loc34_17.3: init %i32 = initialize_from %.loc34_17.2 to %tuple.elem0.loc34 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc34_17.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc34_17.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc34_17.3: = bound_method %int_2.loc34, %impl.elem0.loc34_17.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc34_17.2: = specific_function %impl.elem0.loc34_17.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc34_17.4: = bound_method %int_2.loc34, %specific_fn.loc34_17.2 [concrete = constants.%bound_method.b92] @@ -242,7 +243,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc49: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc49_12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc49_12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc49_12.1: = bound_method %int_1.loc49, %impl.elem0.loc49_12 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc49_12: = specific_function %impl.elem0.loc49_12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc49_12.2: = bound_method %int_1.loc49, %specific_fn.loc49_12 [concrete = constants.%bound_method.9a1] @@ -253,7 +254,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc49: // CHECK:STDOUT: %int_2.loc49: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc49_19: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc49_19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc49_19.1: = bound_method %int_2.loc49, %impl.elem0.loc49_19 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc49_19: = specific_function %impl.elem0.loc49_19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc49_19.2: = bound_method %int_2.loc49, %specific_fn.loc49_19 [concrete = constants.%bound_method.b92] @@ -265,7 +266,7 @@ fn Main() { // CHECK:STDOUT: !if.expr.result.loc49: // CHECK:STDOUT: %.loc49_4: %i32 = block_arg !if.expr.result.loc49 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %int_3.loc49: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc49_27: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc49_27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc49_27.1: = bound_method %int_3.loc49, %impl.elem0.loc49_27 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc49_27: = specific_function %impl.elem0.loc49_27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc49_27.2: = bound_method %int_3.loc49, %specific_fn.loc49_27 [concrete = constants.%bound_method.047] @@ -298,7 +299,7 @@ fn Main() { // CHECK:STDOUT: !if.expr.result.loc57: // CHECK:STDOUT: %.loc57_4: %i32 = block_arg !if.expr.result.loc57 // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10.64f] -// CHECK:STDOUT: %impl.elem0.loc57: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc57: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc57_27.1: = bound_method %int_10, %impl.elem0.loc57 [concrete = constants.%Convert.bound.491] // CHECK:STDOUT: %specific_fn.loc57: = specific_function %impl.elem0.loc57, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc57_27.2: = bound_method %int_10, %specific_fn.loc57 [concrete = constants.%bound_method.5ba] diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 2d49731592e4..bfefb2537a3c 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -34,11 +34,12 @@ fn Main() { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -82,7 +83,7 @@ fn Main() { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_25.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_25.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] @@ -100,7 +101,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method.047] diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 51d8570ad653..313dd0c386e9 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -30,11 +30,12 @@ fn Main() { // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1ba, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] @@ -68,7 +69,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index f972df87d59f..65d20d0c878c 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.796: = impl_witness (@impl.b32.%Op.decl) [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.7a3: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.c84: %Op.type.7a3 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, (%impl_witness.796) [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, (%Add.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [concrete] // CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.95d: = impl_witness (@impl.14c.%Op.decl) [concrete] +// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness file.%AddAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%impl_witness.95d) [concrete] +// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%AddAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.c2e: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] +// CHECK:STDOUT: %.de4: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.22d: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] +// CHECK:STDOUT: %.6d3: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Core.Add [concrete = constants.%Add.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.b32.%Op.decl) [concrete = constants.%impl_witness.796] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (@impl.b32.%Op.decl), @impl.b32 [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table [concrete = constants.%Add.impl_witness] // CHECK:STDOUT: impl_decl @impl.14c [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%Core.AddAssign [concrete = constants.%AddAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.14c.%Op.decl) [concrete = constants.%impl_witness.95d] +// CHECK:STDOUT: %AddAssign.impl_witness_table = impl_witness_table (@impl.14c.%Op.decl), @impl.14c [concrete] +// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness %AddAssign.impl_witness_table [concrete = constants.%AddAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%Add.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.14c: %C.ref as %AddAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%AddAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.c2e = impl_witness_access constants.%impl_witness.796, element0 [concrete = constants.%Op.c84] +// CHECK:STDOUT: %impl.elem0: %.de4 = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.c84] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.22d = impl_witness_access constants.%impl_witness.95d, element0 [concrete = constants.%Op.d8e] +// CHECK:STDOUT: %impl.elem0: %.6d3 = impl_witness_access constants.%AddAssign.impl_witness, element0 [concrete = constants.%Op.d8e] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index f1bd2af320b1..df12a657b665 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] // CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.5af: = impl_witness (@impl.c1a.%Op.decl) [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.45e: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.c43: %Op.type.45e = struct_value () [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %C, (%impl_witness.5af) [concrete] +// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %C, (%BitAnd.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %BitAndAssign.type: type = facet_type <@BitAndAssign> [concrete] // CHECK:STDOUT: %Op.type.93f: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.762: = impl_witness (@impl.4ac.%Op.decl) [concrete] +// CHECK:STDOUT: %BitAndAssign.impl_witness: = impl_witness file.%BitAndAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.969: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.747: %Op.type.969 = struct_value () [concrete] -// CHECK:STDOUT: %BitAndAssign.facet: %BitAndAssign.type = facet_value %C, (%impl_witness.762) [concrete] +// CHECK:STDOUT: %BitAndAssign.facet: %BitAndAssign.type = facet_value %C, (%BitAndAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.93d: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] +// CHECK:STDOUT: %.670: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.ab0: type = fn_type_with_self_type %Op.type.93f, %BitAndAssign.facet [concrete] +// CHECK:STDOUT: %.c09: type = fn_type_with_self_type %Op.type.93f, %BitAndAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, imports.%Core.BitAnd [concrete = constants.%BitAnd.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.c1a.%Op.decl) [concrete = constants.%impl_witness.5af] +// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.c1a.%Op.decl), @impl.c1a [concrete] +// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table [concrete = constants.%BitAnd.impl_witness] // CHECK:STDOUT: impl_decl @impl.4ac [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %BitAndAssign.ref: type = name_ref BitAndAssign, imports.%Core.BitAndAssign [concrete = constants.%BitAndAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.4ac.%Op.decl) [concrete = constants.%impl_witness.762] +// CHECK:STDOUT: %BitAndAssign.impl_witness_table = impl_witness_table (@impl.4ac.%Op.decl), @impl.4ac [concrete] +// CHECK:STDOUT: %BitAndAssign.impl_witness: = impl_witness %BitAndAssign.impl_witness_table [concrete = constants.%BitAndAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4ac: %C.ref as %BitAndAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%BitAndAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.93d = impl_witness_access constants.%impl_witness.5af, element0 [concrete = constants.%Op.c43] +// CHECK:STDOUT: %impl.elem0: %.670 = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.c43] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.ab0 = impl_witness_access constants.%impl_witness.762, element0 [concrete = constants.%Op.747] +// CHECK:STDOUT: %impl.elem0: %.c09 = impl_witness_access constants.%BitAndAssign.impl_witness, element0 [concrete = constants.%Op.747] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index c79f5718706c..72e24d64bee5 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -32,14 +32,14 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %BitComplement.type: type = facet_type <@BitComplement> [concrete] // CHECK:STDOUT: %Op.type.f25: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.5a3.%Op.decl) [concrete] +// CHECK:STDOUT: %BitComplement.impl_witness: = impl_witness file.%BitComplement.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.544: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.bf2: %Op.type.544 = struct_value () [concrete] -// CHECK:STDOUT: %BitComplement.facet: %BitComplement.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %BitComplement.facet: %BitComplement.type = facet_value %C, (%BitComplement.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.f35: type = fn_type_with_self_type %Op.type.f25, %BitComplement.facet [concrete] +// CHECK:STDOUT: %.669: type = fn_type_with_self_type %Op.type.f25, %BitComplement.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,7 +64,8 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %BitComplement.ref: type = name_ref BitComplement, imports.%Core.BitComplement [concrete = constants.%BitComplement.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.5a3.%Op.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %BitComplement.impl_witness_table = impl_witness_table (@impl.5a3.%Op.decl), @impl.5a3 [concrete] +// CHECK:STDOUT: %BitComplement.impl_witness: = impl_witness %BitComplement.impl_witness_table [concrete = constants.%BitComplement.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -98,7 +99,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%BitComplement.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -121,7 +122,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return.param_patt: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.f35 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Op.bf2] +// CHECK:STDOUT: %impl.elem0: %.669 = impl_witness_access constants.%BitComplement.impl_witness, element0 [concrete = constants.%Op.bf2] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref) to %.loc23 diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index f504ad2b5c2b..d9690d166723 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %BitOr.type: type = facet_type <@BitOr> [concrete] // CHECK:STDOUT: %Op.type.9bb: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.e68: = impl_witness (@impl.8f6.%Op.decl) [concrete] +// CHECK:STDOUT: %BitOr.impl_witness: = impl_witness file.%BitOr.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.951: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.59a: %Op.type.951 = struct_value () [concrete] -// CHECK:STDOUT: %BitOr.facet: %BitOr.type = facet_value %C, (%impl_witness.e68) [concrete] +// CHECK:STDOUT: %BitOr.facet: %BitOr.type = facet_value %C, (%BitOr.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %BitOrAssign.type: type = facet_type <@BitOrAssign> [concrete] // CHECK:STDOUT: %Op.type.099: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.85b: = impl_witness (@impl.04f.%Op.decl) [concrete] +// CHECK:STDOUT: %BitOrAssign.impl_witness: = impl_witness file.%BitOrAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.8ba: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.b27: %Op.type.8ba = struct_value () [concrete] -// CHECK:STDOUT: %BitOrAssign.facet: %BitOrAssign.type = facet_value %C, (%impl_witness.85b) [concrete] +// CHECK:STDOUT: %BitOrAssign.facet: %BitOrAssign.type = facet_value %C, (%BitOrAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.bd4: type = fn_type_with_self_type %Op.type.9bb, %BitOr.facet [concrete] +// CHECK:STDOUT: %.421: type = fn_type_with_self_type %Op.type.9bb, %BitOr.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.2fb: type = fn_type_with_self_type %Op.type.099, %BitOrAssign.facet [concrete] +// CHECK:STDOUT: %.8bd: type = fn_type_with_self_type %Op.type.099, %BitOrAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %BitOr.ref: type = name_ref BitOr, imports.%Core.BitOr [concrete = constants.%BitOr.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.8f6.%Op.decl) [concrete = constants.%impl_witness.e68] +// CHECK:STDOUT: %BitOr.impl_witness_table = impl_witness_table (@impl.8f6.%Op.decl), @impl.8f6 [concrete] +// CHECK:STDOUT: %BitOr.impl_witness: = impl_witness %BitOr.impl_witness_table [concrete = constants.%BitOr.impl_witness] // CHECK:STDOUT: impl_decl @impl.04f [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %BitOrAssign.ref: type = name_ref BitOrAssign, imports.%Core.BitOrAssign [concrete = constants.%BitOrAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.04f.%Op.decl) [concrete = constants.%impl_witness.85b] +// CHECK:STDOUT: %BitOrAssign.impl_witness_table = impl_witness_table (@impl.04f.%Op.decl), @impl.04f [concrete] +// CHECK:STDOUT: %BitOrAssign.impl_witness: = impl_witness %BitOrAssign.impl_witness_table [concrete = constants.%BitOrAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%BitOr.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.04f: %C.ref as %BitOrAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%BitOrAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.bd4 = impl_witness_access constants.%impl_witness.e68, element0 [concrete = constants.%Op.59a] +// CHECK:STDOUT: %impl.elem0: %.421 = impl_witness_access constants.%BitOr.impl_witness, element0 [concrete = constants.%Op.59a] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.2fb = impl_witness_access constants.%impl_witness.85b, element0 [concrete = constants.%Op.b27] +// CHECK:STDOUT: %impl.elem0: %.8bd = impl_witness_access constants.%BitOrAssign.impl_witness, element0 [concrete = constants.%Op.b27] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index 01258a9ba05b..fb656609d2b3 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %BitXor.type: type = facet_type <@BitXor> [concrete] // CHECK:STDOUT: %Op.type.e96: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.01d: = impl_witness (@impl.2e5.%Op.decl) [concrete] +// CHECK:STDOUT: %BitXor.impl_witness: = impl_witness file.%BitXor.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.672: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.442: %Op.type.672 = struct_value () [concrete] -// CHECK:STDOUT: %BitXor.facet: %BitXor.type = facet_value %C, (%impl_witness.01d) [concrete] +// CHECK:STDOUT: %BitXor.facet: %BitXor.type = facet_value %C, (%BitXor.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %BitXorAssign.type: type = facet_type <@BitXorAssign> [concrete] // CHECK:STDOUT: %Op.type.58d: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.8dc: = impl_witness (@impl.9ba.%Op.decl) [concrete] +// CHECK:STDOUT: %BitXorAssign.impl_witness: = impl_witness file.%BitXorAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.8ab: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.67d: %Op.type.8ab = struct_value () [concrete] -// CHECK:STDOUT: %BitXorAssign.facet: %BitXorAssign.type = facet_value %C, (%impl_witness.8dc) [concrete] +// CHECK:STDOUT: %BitXorAssign.facet: %BitXorAssign.type = facet_value %C, (%BitXorAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.0d1: type = fn_type_with_self_type %Op.type.e96, %BitXor.facet [concrete] +// CHECK:STDOUT: %.f3f: type = fn_type_with_self_type %Op.type.e96, %BitXor.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.502: type = fn_type_with_self_type %Op.type.58d, %BitXorAssign.facet [concrete] +// CHECK:STDOUT: %.100: type = fn_type_with_self_type %Op.type.58d, %BitXorAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %BitXor.ref: type = name_ref BitXor, imports.%Core.BitXor [concrete = constants.%BitXor.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.2e5.%Op.decl) [concrete = constants.%impl_witness.01d] +// CHECK:STDOUT: %BitXor.impl_witness_table = impl_witness_table (@impl.2e5.%Op.decl), @impl.2e5 [concrete] +// CHECK:STDOUT: %BitXor.impl_witness: = impl_witness %BitXor.impl_witness_table [concrete = constants.%BitXor.impl_witness] // CHECK:STDOUT: impl_decl @impl.9ba [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %BitXorAssign.ref: type = name_ref BitXorAssign, imports.%Core.BitXorAssign [concrete = constants.%BitXorAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.9ba.%Op.decl) [concrete = constants.%impl_witness.8dc] +// CHECK:STDOUT: %BitXorAssign.impl_witness_table = impl_witness_table (@impl.9ba.%Op.decl), @impl.9ba [concrete] +// CHECK:STDOUT: %BitXorAssign.impl_witness: = impl_witness %BitXorAssign.impl_witness_table [concrete = constants.%BitXorAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%BitXor.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.9ba: %C.ref as %BitXorAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%BitXorAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.0d1 = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.442] +// CHECK:STDOUT: %impl.elem0: %.f3f = impl_witness_access constants.%BitXor.impl_witness, element0 [concrete = constants.%Op.442] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.502 = impl_witness_access constants.%impl_witness.8dc, element0 [concrete = constants.%Op.67d] +// CHECK:STDOUT: %impl.elem0: %.100 = impl_witness_access constants.%BitXorAssign.impl_witness, element0 [concrete = constants.%Op.67d] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 36349c7e379c..26de88c35f93 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -32,15 +32,15 @@ fn TestOp() { // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete] // CHECK:STDOUT: %Op.type.633: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.7f9.%Op.decl) [concrete] +// CHECK:STDOUT: %Dec.impl_witness: = impl_witness file.%Dec.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.9e0: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.cf9: %Op.type.9e0 = struct_value () [concrete] -// CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %C, (%Dec.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.369: type = fn_type_with_self_type %Op.type.633, %Dec.facet [concrete] +// CHECK:STDOUT: %.859: type = fn_type_with_self_type %Op.type.633, %Dec.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,7 +65,8 @@ fn TestOp() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Dec.ref: type = name_ref Dec, imports.%Core.Dec [concrete = constants.%Dec.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.7f9.%Op.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Dec.impl_witness_table = impl_witness_table (@impl.7f9.%Op.decl), @impl.7f9 [concrete] +// CHECK:STDOUT: %Dec.impl_witness: = impl_witness %Dec.impl_witness_table [concrete = constants.%Dec.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -86,7 +87,7 @@ fn TestOp() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Dec.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -114,7 +115,7 @@ fn TestOp() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %impl.elem0: %.369 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Op.cf9] +// CHECK:STDOUT: %impl.elem0: %.859 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Op.cf9] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.ref // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr) diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index fbd6aca5f0d1..5c3b06144de9 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Div.type: type = facet_type <@Div> [concrete] // CHECK:STDOUT: %Op.type.784: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.745: = impl_witness (@impl.534.%Op.decl) [concrete] +// CHECK:STDOUT: %Div.impl_witness: = impl_witness file.%Div.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.750: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.21e: %Op.type.750 = struct_value () [concrete] -// CHECK:STDOUT: %Div.facet: %Div.type = facet_value %C, (%impl_witness.745) [concrete] +// CHECK:STDOUT: %Div.facet: %Div.type = facet_value %C, (%Div.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %DivAssign.type: type = facet_type <@DivAssign> [concrete] // CHECK:STDOUT: %Op.type.b95: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.d13: = impl_witness (@impl.73d.%Op.decl) [concrete] +// CHECK:STDOUT: %DivAssign.impl_witness: = impl_witness file.%DivAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.b04: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.27c: %Op.type.b04 = struct_value () [concrete] -// CHECK:STDOUT: %DivAssign.facet: %DivAssign.type = facet_value %C, (%impl_witness.d13) [concrete] +// CHECK:STDOUT: %DivAssign.facet: %DivAssign.type = facet_value %C, (%DivAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.277: type = fn_type_with_self_type %Op.type.784, %Div.facet [concrete] +// CHECK:STDOUT: %.b77: type = fn_type_with_self_type %Op.type.784, %Div.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.65b: type = fn_type_with_self_type %Op.type.b95, %DivAssign.facet [concrete] +// CHECK:STDOUT: %.20f: type = fn_type_with_self_type %Op.type.b95, %DivAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Div.ref: type = name_ref Div, imports.%Core.Div [concrete = constants.%Div.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.534.%Op.decl) [concrete = constants.%impl_witness.745] +// CHECK:STDOUT: %Div.impl_witness_table = impl_witness_table (@impl.534.%Op.decl), @impl.534 [concrete] +// CHECK:STDOUT: %Div.impl_witness: = impl_witness %Div.impl_witness_table [concrete = constants.%Div.impl_witness] // CHECK:STDOUT: impl_decl @impl.73d [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %DivAssign.ref: type = name_ref DivAssign, imports.%Core.DivAssign [concrete = constants.%DivAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.73d.%Op.decl) [concrete = constants.%impl_witness.d13] +// CHECK:STDOUT: %DivAssign.impl_witness_table = impl_witness_table (@impl.73d.%Op.decl), @impl.73d [concrete] +// CHECK:STDOUT: %DivAssign.impl_witness: = impl_witness %DivAssign.impl_witness_table [concrete = constants.%DivAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%Div.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.73d: %C.ref as %DivAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%DivAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.277 = impl_witness_access constants.%impl_witness.745, element0 [concrete = constants.%Op.21e] +// CHECK:STDOUT: %impl.elem0: %.b77 = impl_witness_access constants.%Div.impl_witness, element0 [concrete = constants.%Op.21e] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.65b = impl_witness_access constants.%impl_witness.d13, element0 [concrete = constants.%Op.27c] +// CHECK:STDOUT: %impl.elem0: %.20f = impl_witness_access constants.%DivAssign.impl_witness, element0 [concrete = constants.%Op.27c] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 30e0977574c7..9fe265afbc6e 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -92,20 +92,20 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] // CHECK:STDOUT: %Equal.type.79c: type = fn_type @Equal.1 [concrete] // CHECK:STDOUT: %NotEqual.type.e6c: type = fn_type @NotEqual.1 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.100.%Equal.decl, @impl.100.%NotEqual.decl) [concrete] +// CHECK:STDOUT: %Eq.impl_witness: = impl_witness file.%Eq.impl_witness_table [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] // CHECK:STDOUT: %Equal.type.b4a: type = fn_type @Equal.2 [concrete] // CHECK:STDOUT: %Equal.f96: %Equal.type.b4a = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.a7d: type = fn_type @NotEqual.2 [concrete] // CHECK:STDOUT: %NotEqual.c3f: %NotEqual.type.a7d = struct_value () [concrete] -// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value %C, (%Eq.impl_witness) [concrete] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [concrete] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.cc5: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] +// CHECK:STDOUT: %.b8f: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [concrete] // CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.ee3: type = fn_type_with_self_type %NotEqual.type.e6c, %Eq.facet [concrete] +// CHECK:STDOUT: %.9a6: type = fn_type_with_self_type %NotEqual.type.e6c, %Eq.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -132,7 +132,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%Core.Eq [concrete = constants.%Eq.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.100.%Equal.decl, @impl.100.%NotEqual.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Eq.impl_witness_table = impl_witness_table (@impl.100.%Equal.decl, @impl.100.%NotEqual.decl), @impl.100 [concrete] +// CHECK:STDOUT: %Eq.impl_witness: = impl_witness %Eq.impl_witness_table [concrete = constants.%Eq.impl_witness] // CHECK:STDOUT: %TestEqual.decl: %TestEqual.type = fn_decl @TestEqual [concrete = constants.%TestEqual] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -221,7 +222,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: .C = // CHECK:STDOUT: .Equal = %Equal.decl // CHECK:STDOUT: .NotEqual = %NotEqual.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Eq.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -241,7 +242,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.cc5 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Equal.f96] +// CHECK:STDOUT: %impl.elem0: %.b8f = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.f96] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %Equal.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call @@ -253,7 +254,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.ee3 = impl_witness_access constants.%impl_witness, element1 [concrete = constants.%NotEqual.c3f] +// CHECK:STDOUT: %impl.elem1: %.9a6 = impl_witness_access constants.%Eq.impl_witness, element1 [concrete = constants.%NotEqual.c3f] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %NotEqual.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call @@ -367,17 +368,17 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] // CHECK:STDOUT: %Equal.type.79c: type = fn_type @Equal.1 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.100.%Equal.decl, @impl.100.%NotEqual.decl) [concrete] +// CHECK:STDOUT: %Eq.impl_witness: = impl_witness file.%Eq.impl_witness_table [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] // CHECK:STDOUT: %Equal.type.b4a: type = fn_type @Equal.2 [concrete] // CHECK:STDOUT: %Equal.f96: %Equal.type.b4a = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.a7d: type = fn_type @NotEqual.2 [concrete] // CHECK:STDOUT: %NotEqual.c3f: %NotEqual.type.a7d = struct_value () [concrete] -// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value %C, (%Eq.impl_witness) [concrete] // CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [concrete] // CHECK:STDOUT: %TestRhsBad: %TestRhsBad.type = struct_value () [concrete] -// CHECK:STDOUT: %.cc5: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] +// CHECK:STDOUT: %.b8f: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] // CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [concrete] // CHECK:STDOUT: %TestLhsBad: %TestLhsBad.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -409,7 +410,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%Core.Eq [concrete = constants.%Eq.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.100.%Equal.decl, @impl.100.%NotEqual.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Eq.impl_witness_table = impl_witness_table (@impl.100.%Equal.decl, @impl.100.%NotEqual.decl), @impl.100 [concrete] +// CHECK:STDOUT: %Eq.impl_witness: = impl_witness %Eq.impl_witness_table [concrete = constants.%Eq.impl_witness] // CHECK:STDOUT: %TestRhsBad.decl: %TestRhsBad.type = fn_decl @TestRhsBad [concrete = constants.%TestRhsBad] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -498,7 +500,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: .C = // CHECK:STDOUT: .Equal = %Equal.decl // CHECK:STDOUT: .NotEqual = %NotEqual.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Eq.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -527,7 +529,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.cc5 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Equal.f96] +// CHECK:STDOUT: %impl.elem0: %.b8f = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.f96] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23_15: %C = converted %b.ref, [concrete = ] // CHECK:STDOUT: %Equal.call: init bool = call %bound_method(%a.ref, ) diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index 33e22ad04213..22e85154b4bb 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -50,23 +50,23 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: %Op.type.e3a: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.ec3: = impl_witness (@impl.c51.%Op.decl) [concrete] +// CHECK:STDOUT: %Inc.impl_witness: = impl_witness file.%Inc.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.73a: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.0c9: %Op.type.73a = struct_value () [concrete] -// CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, (%impl_witness.ec3) [concrete] +// CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, (%Inc.impl_witness) [concrete] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [concrete] // CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.95d: = impl_witness (@impl.14c.%Op.decl) [concrete] +// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness file.%AddAssign.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%impl_witness.95d) [concrete] +// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%AddAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [concrete] // CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [concrete] -// CHECK:STDOUT: %.295: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [concrete] +// CHECK:STDOUT: %.bc7: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [concrete] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [concrete] // CHECK:STDOUT: %TestAddAssignNonRef: %TestAddAssignNonRef.type = struct_value () [concrete] -// CHECK:STDOUT: %.22d: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] +// CHECK:STDOUT: %.6d3: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -94,13 +94,15 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Inc.ref: type = name_ref Inc, imports.%Core.Inc [concrete = constants.%Inc.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness (@impl.c51.%Op.decl) [concrete = constants.%impl_witness.ec3] +// CHECK:STDOUT: %Inc.impl_witness_table = impl_witness_table (@impl.c51.%Op.decl), @impl.c51 [concrete] +// CHECK:STDOUT: %Inc.impl_witness: = impl_witness %Inc.impl_witness_table [concrete = constants.%Inc.impl_witness] // CHECK:STDOUT: impl_decl @impl.14c [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%Core.AddAssign [concrete = constants.%AddAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc18: = impl_witness (@impl.14c.%Op.decl) [concrete = constants.%impl_witness.95d] +// CHECK:STDOUT: %AddAssign.impl_witness_table = impl_witness_table (@impl.14c.%Op.decl), @impl.14c [concrete] +// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness %AddAssign.impl_witness_table [concrete = constants.%AddAssign.impl_witness] // CHECK:STDOUT: %TestIncNonRef.decl: %TestIncNonRef.type = fn_decl @TestIncNonRef [concrete = constants.%TestIncNonRef] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -141,7 +143,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc15 +// CHECK:STDOUT: witness = file.%Inc.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.14c: %C.ref as %AddAssign.ref { @@ -166,7 +168,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc18 +// CHECK:STDOUT: witness = file.%AddAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -185,7 +187,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: fn @TestIncNonRef(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.295 = impl_witness_access constants.%impl_witness.ec3, element0 [concrete = constants.%Op.0c9] +// CHECK:STDOUT: %impl.elem0: %.bc7 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Op.0c9] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc30: ref %C = temporary_storage // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc30 @@ -197,7 +199,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.22d = impl_witness_access constants.%impl_witness.95d, element0 [concrete = constants.%Op.d8e] +// CHECK:STDOUT: %impl.elem0: %.6d3 = impl_witness_access constants.%AddAssign.impl_witness, element0 [concrete = constants.%Op.d8e] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc41: ref %C = temporary_storage // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc41 diff --git a/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon b/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon index d973668836ef..b397df575bb5 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon @@ -39,11 +39,12 @@ fn G(n: i32) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.01d: = impl_witness (imports.%Core.import_ref.344), @impl.2c2(%int_32) [concrete] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (imports.%Core.import_ref.344), @impl.2c2 [concrete] +// CHECK:STDOUT: %Add.impl_witness.dbc: = impl_witness %Add.impl_witness_table, @impl.2c2(%int_32) [concrete] // CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete] // CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%impl_witness.01d) [concrete] -// CHECK:STDOUT: %.f1a: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete] +// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,7 +90,7 @@ fn G(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %undeclared.ref: = name_ref undeclared, [concrete = ] -// CHECK:STDOUT: %impl.elem0: %.f1a = impl_witness_access constants.%impl_witness.01d, element0 [concrete = constants.%Op.c82] +// CHECK:STDOUT: %impl.elem0: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] // CHECK:STDOUT: %bound_method: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index ebe11d3a781d..c877df4c0bfc 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -59,24 +59,24 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.796: = impl_witness (@impl.b32.%Op.decl) [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.7a3: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.c84: %Op.type.7a3 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, (%impl_witness.796) [concrete] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, (%Add.impl_witness) [concrete] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [concrete] // CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.95d: = impl_witness (@impl.14c.%Op.decl) [concrete] +// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness file.%AddAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%impl_witness.95d) [concrete] +// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%AddAssign.impl_witness) [concrete] // CHECK:STDOUT: %Test.type: type = fn_type @Test [concrete] // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] -// CHECK:STDOUT: %.c2e: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] +// CHECK:STDOUT: %.de4: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.22d: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] +// CHECK:STDOUT: %.6d3: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -107,13 +107,15 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Core.Add [concrete = constants.%Add.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc16: = impl_witness (@impl.b32.%Op.decl) [concrete = constants.%impl_witness.796] +// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (@impl.b32.%Op.decl), @impl.b32 [concrete] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table [concrete = constants.%Add.impl_witness] // CHECK:STDOUT: impl_decl @impl.14c [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%Core.AddAssign [concrete = constants.%AddAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc19: = impl_witness (@impl.14c.%Op.decl) [concrete = constants.%impl_witness.95d] +// CHECK:STDOUT: %AddAssign.impl_witness_table = impl_witness_table (@impl.14c.%Op.decl), @impl.14c [concrete] +// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness %AddAssign.impl_witness_table [concrete = constants.%AddAssign.impl_witness] // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -165,7 +167,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc16 +// CHECK:STDOUT: witness = file.%Add.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.14c: %C.ref as %AddAssign.ref { @@ -190,7 +192,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc19 +// CHECK:STDOUT: witness = file.%AddAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -219,7 +221,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.c2e = impl_witness_access constants.%impl_witness.796, element0 [concrete = constants.%Op.c84] +// CHECK:STDOUT: %impl.elem0: %.de4 = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.c84] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} // CHECK:STDOUT: %.loc34: %C = converted %b.ref, [concrete = ] @@ -242,7 +244,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %a: ref %C = bind_name a, %a.var // CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.22d = impl_witness_access constants.%impl_witness.95d, element0 [concrete = constants.%Op.d8e] +// CHECK:STDOUT: %impl.elem0: %.6d3 = impl_witness_access constants.%AddAssign.impl_witness, element0 [concrete = constants.%Op.d8e] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %a.ref // CHECK:STDOUT: %.loc49: %C = converted %b.ref, [concrete = ] diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 254b4946fe3e..300e8d6d6323 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -47,16 +47,16 @@ fn Test() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.ac8: type = facet_type <@ImplicitAs, @ImplicitAs(%X)> [concrete] // CHECK:STDOUT: %Convert.type.665: type = fn_type @Convert.1, @ImplicitAs(%X) [concrete] -// CHECK:STDOUT: %impl_witness.226: = impl_witness (@impl.8f9.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.aa3: = impl_witness file.%ImplicitAs.impl_witness_table.loc15 [concrete] // CHECK:STDOUT: %Convert.type.853: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.08a: %Convert.type.853 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.034: %ImplicitAs.type.ac8 = facet_value %i32, (%impl_witness.226) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.d80: %ImplicitAs.type.ac8 = facet_value %i32, (%ImplicitAs.impl_witness.aa3) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.c53: = impl_witness (@impl.c94.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.b30: = impl_witness file.%ImplicitAs.impl_witness_table.loc19 [concrete] // CHECK:STDOUT: %Convert.type.8a1: type = fn_type @Convert.3 [concrete] // CHECK:STDOUT: %Convert.c7a: %Convert.type.8a1 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.601: %ImplicitAs.type.205 = facet_value %X, (%impl_witness.c53) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.bf9: %ImplicitAs.type.205 = facet_value %X, (%ImplicitAs.impl_witness.b30) [concrete] // CHECK:STDOUT: %Sink_i32.type: type = fn_type @Sink_i32 [concrete] // CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [concrete] // CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [concrete] @@ -70,9 +70,9 @@ fn Test() { // CHECK:STDOUT: %Test.type: type = fn_type @Test [concrete] // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] // CHECK:STDOUT: %Source.specific_fn.363: = specific_function %Source, @Source(%X) [concrete] -// CHECK:STDOUT: %.28a: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.601 [concrete] +// CHECK:STDOUT: %.2ea: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.bf9 [concrete] // CHECK:STDOUT: %Source.specific_fn.cc7: = specific_function %Source, @Source(%i32) [concrete] -// CHECK:STDOUT: %.b06: type = fn_type_with_self_type %Convert.type.665, %ImplicitAs.facet.034 [concrete] +// CHECK:STDOUT: %.9b4: type = fn_type_with_self_type %Convert.type.665, %ImplicitAs.facet.d80 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -104,7 +104,8 @@ fn Test() { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%X)> [concrete = constants.%ImplicitAs.type.ac8] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness (@impl.8f9.%Convert.decl) [concrete = constants.%impl_witness.226] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc15 = impl_witness_table (@impl.8f9.%Convert.decl), @impl.8f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc15: = impl_witness %ImplicitAs.impl_witness_table.loc15 [concrete = constants.%ImplicitAs.impl_witness.aa3] // CHECK:STDOUT: impl_decl @impl.c94 [concrete] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -113,7 +114,8 @@ fn Test() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [concrete = constants.%ImplicitAs.type.205] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc19: = impl_witness (@impl.c94.%Convert.decl) [concrete = constants.%impl_witness.c53] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc19 = impl_witness_table (@impl.c94.%Convert.decl), @impl.c94 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc19: = impl_witness %ImplicitAs.impl_witness_table.loc19 [concrete = constants.%ImplicitAs.impl_witness.b30] // CHECK:STDOUT: %Sink_i32.decl: %Sink_i32.type = fn_decl @Sink_i32 [concrete = constants.%Sink_i32] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, call_param0 @@ -167,7 +169,7 @@ fn Test() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .X = // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc15 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.c94: %X.ref as %ImplicitAs.type { @@ -189,7 +191,7 @@ fn Test() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .X = // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc19 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -259,7 +261,7 @@ fn Test() { // CHECK:STDOUT: %Source.specific_fn.loc30: = specific_function %Source.ref.loc30, @Source(constants.%X) [concrete = constants.%Source.specific_fn.363] // CHECK:STDOUT: %.loc30_20.1: ref %X = temporary_storage // CHECK:STDOUT: %Source.call.loc30: init %X = call %Source.specific_fn.loc30() to %.loc30_20.1 -// CHECK:STDOUT: %impl.elem0.loc30: %.28a = impl_witness_access constants.%impl_witness.c53, element0 [concrete = constants.%Convert.c7a] +// CHECK:STDOUT: %impl.elem0.loc30: %.2ea = impl_witness_access constants.%ImplicitAs.impl_witness.b30, element0 [concrete = constants.%Convert.c7a] // CHECK:STDOUT: %bound_method.loc30: = bound_method %Source.call.loc30, %impl.elem0.loc30 // CHECK:STDOUT: %.loc30_20.2: ref %X = temporary %.loc30_20.1, %Source.call.loc30 // CHECK:STDOUT: %.loc30_20.3: %X = bind_value %.loc30_20.2 @@ -273,7 +275,7 @@ fn Test() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Source.specific_fn.loc31: = specific_function %Source.ref.loc31, @Source(constants.%i32) [concrete = constants.%Source.specific_fn.cc7] // CHECK:STDOUT: %Source.call.loc31: init %i32 = call %Source.specific_fn.loc31() -// CHECK:STDOUT: %impl.elem0.loc31: %.b06 = impl_witness_access constants.%impl_witness.226, element0 [concrete = constants.%Convert.08a] +// CHECK:STDOUT: %impl.elem0.loc31: %.9b4 = impl_witness_access constants.%ImplicitAs.impl_witness.aa3, element0 [concrete = constants.%Convert.08a] // CHECK:STDOUT: %bound_method.loc31: = bound_method %Source.call.loc31, %impl.elem0.loc31 // CHECK:STDOUT: %.loc31_20.1: ref %X = temporary_storage // CHECK:STDOUT: %.loc31_20.2: %i32 = value_of_initializer %Source.call.loc31 diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index 6f873e1ab361..cb73bc3a707c 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -32,15 +32,15 @@ fn TestOp() { // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: %Op.type.e3a: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.c51.%Op.decl) [concrete] +// CHECK:STDOUT: %Inc.impl_witness: = impl_witness file.%Inc.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.73a: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.0c9: %Op.type.73a = struct_value () [concrete] -// CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, (%Inc.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.295: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [concrete] +// CHECK:STDOUT: %.bc7: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,7 +65,8 @@ fn TestOp() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Inc.ref: type = name_ref Inc, imports.%Core.Inc [concrete = constants.%Inc.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.c51.%Op.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Inc.impl_witness_table = impl_witness_table (@impl.c51.%Op.decl), @impl.c51 [concrete] +// CHECK:STDOUT: %Inc.impl_witness: = impl_witness %Inc.impl_witness_table [concrete = constants.%Inc.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -86,7 +87,7 @@ fn TestOp() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Inc.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -114,7 +115,7 @@ fn TestOp() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %impl.elem0: %.295 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Op.0c9] +// CHECK:STDOUT: %impl.elem0: %.bc7 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Op.0c9] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.ref // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr) diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 8d554fe3b2cc..c3afe931b0d1 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -89,14 +89,14 @@ let x: i32 = c[0]; // CHECK:STDOUT: %IndexWith.generic: %IndexWith.type.504 = struct_value () [concrete] // CHECK:STDOUT: %IndexWith.type.e80: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.8ee, %ElementType.e6b)> [concrete] // CHECK:STDOUT: %At.type.b3f: type = fn_type @At.1, @IndexWith(%SubscriptType.8ee, %ElementType.e6b) [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%At.decl) [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness file.%IndexWith.impl_witness_table [concrete] // CHECK:STDOUT: %At.type.178: type = fn_type @At.2 [concrete] // CHECK:STDOUT: %At.d43: %At.type.178 = struct_value () [concrete] -// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.e80 = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.e80 = facet_value %C, (%IndexWith.impl_witness) [concrete] // CHECK:STDOUT: %ElementType.val: %ElementType.e6b = struct_value () [concrete] // CHECK:STDOUT: %SubscriptType.val: %SubscriptType.8ee = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.9e4: type = fn_type_with_self_type %At.type.b3f, %IndexWith.facet [concrete] +// CHECK:STDOUT: %.d94: type = fn_type_with_self_type %At.type.b3f, %IndexWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -130,7 +130,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [concrete = constants.%ElementType.e6b] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%SubscriptType.8ee, constants.%ElementType.e6b)> [concrete = constants.%IndexWith.type.e80] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%At.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %IndexWith.impl_witness_table = impl_witness_table (@impl.%At.decl), @impl [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness %IndexWith.impl_witness_table [concrete = constants.%IndexWith.impl_witness] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %s.patt: %SubscriptType.8ee = binding_pattern s // CHECK:STDOUT: } @@ -181,7 +182,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: .SubscriptType = // CHECK:STDOUT: .ElementType = // CHECK:STDOUT: .At = %At.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%IndexWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -226,7 +227,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %c.ref: ref %C = name_ref c, file.%c // CHECK:STDOUT: %s.ref: ref %SubscriptType.8ee = name_ref s, file.%s // CHECK:STDOUT: %.loc16_24: %SubscriptType.8ee = bind_value %s.ref -// CHECK:STDOUT: %impl.elem0: %.9e4 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%At.d43] +// CHECK:STDOUT: %impl.elem0: %.d94 = impl_witness_access constants.%IndexWith.impl_witness, element0 [concrete = constants.%At.d43] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %.loc16_25: ref %ElementType.e6b = temporary_storage // CHECK:STDOUT: %.loc16_22: %C = bind_value %c.ref @@ -245,21 +246,22 @@ let x: i32 = c[0]; // CHECK:STDOUT: %IndexWith.generic: %IndexWith.type.504 = struct_value () [concrete] // CHECK:STDOUT: %IndexWith.type.917: type = facet_type <@IndexWith, @IndexWith(%i32, %i32)> [concrete] // CHECK:STDOUT: %At.type.d77: type = fn_type @At.1, @IndexWith(%i32, %i32) [concrete] -// CHECK:STDOUT: %impl_witness.123: = impl_witness (@impl.18b.%At.decl) [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness file.%IndexWith.impl_witness_table [concrete] // CHECK:STDOUT: %At.type.9ac: type = fn_type @At.2 [concrete] // CHECK:STDOUT: %At.642: %At.type.9ac = struct_value () [concrete] -// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.917 = facet_value %tuple.type.d07, (%impl_witness.123) [concrete] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.917 = facet_value %tuple.type.d07, (%IndexWith.impl_witness) [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -271,7 +273,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %.1a5: type = fn_type_with_self_type %At.type.d77, %IndexWith.facet [concrete] +// CHECK:STDOUT: %.2dc: type = fn_type_with_self_type %At.type.d77, %IndexWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -307,7 +309,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %i32.loc4_40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%i32, constants.%i32)> [concrete = constants.%IndexWith.type.917] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.18b.%At.decl) [concrete = constants.%impl_witness.123] +// CHECK:STDOUT: %IndexWith.impl_witness_table = impl_witness_table (@impl.18b.%At.decl), @impl.18b [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness %IndexWith.impl_witness_table [concrete = constants.%IndexWith.impl_witness] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %s.patt: %tuple.type.d07 = binding_pattern s // CHECK:STDOUT: } @@ -319,14 +322,14 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.loc10_17.2: %tuple.type.24b = tuple_literal (%i32.loc10_9, %i32.loc10_14) // CHECK:STDOUT: %.loc10_17.3: type = converted %.loc10_17.2, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc10_26.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc10_26.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_26.1: = bound_method @__global_init.%int_1, %impl.elem0.loc10_26.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc10_26.1: = specific_function %impl.elem0.loc10_26.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_26.2: = bound_method @__global_init.%int_1, %specific_fn.loc10_26.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %bound_method.loc10_26.2(@__global_init.%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_26.2: %i32 = converted @__global_init.%int_1, %.loc10_26.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_26.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc10_26.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_26.3: = bound_method @__global_init.%int_5, %impl.elem0.loc10_26.2 [concrete = constants.%Convert.bound.4e6] // CHECK:STDOUT: %specific_fn.loc10_26.2: = specific_function %impl.elem0.loc10_26.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_26.4: = bound_method @__global_init.%int_5, %specific_fn.loc10_26.2 [concrete = constants.%bound_method.a25] @@ -374,7 +377,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%IndexWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @At.2[%self.param_patt: %tuple.type.d07](%subscript.param_patt: %i32) -> %i32 { @@ -392,14 +395,14 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.loc10: %tuple.type.f94 = tuple_literal (%int_1, %int_5) // CHECK:STDOUT: %s.ref: %tuple.type.d07 = name_ref s, file.%s // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc11_17.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_17.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_17.1: = bound_method %int_0, %impl.elem0.loc11_17.1 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc11_17.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_17.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc11_17.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc11_17.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc11_17.2: %i32 = converted %int_0, %.loc11_17.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc11_17.2: %.1a5 = impl_witness_access constants.%impl_witness.123, element0 [concrete = constants.%At.642] +// CHECK:STDOUT: %impl.elem0.loc11_17.2: %.2dc = impl_witness_access constants.%IndexWith.impl_witness, element0 [concrete = constants.%At.642] // CHECK:STDOUT: %bound_method.loc11_17.3: = bound_method %s.ref, %impl.elem0.loc11_17.2 // CHECK:STDOUT: %At.call: init %i32 = call %bound_method.loc11_17.3(%s.ref, %.loc11_17.2) // CHECK:STDOUT: return @@ -417,14 +420,14 @@ let x: i32 = c[0]; // CHECK:STDOUT: %IndexWith.generic: %IndexWith.type.504 = struct_value () [concrete] // CHECK:STDOUT: %IndexWith.type.e80: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.8ee, %ElementType.e6b)> [concrete] // CHECK:STDOUT: %At.type.b3f: type = fn_type @At.1, @IndexWith(%SubscriptType.8ee, %ElementType.e6b) [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%At.decl) [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness file.%IndexWith.impl_witness_table [concrete] // CHECK:STDOUT: %At.type.178: type = fn_type @At.2 [concrete] // CHECK:STDOUT: %At.d43: %At.type.178 = struct_value () [concrete] -// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.e80 = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.e80 = facet_value %C, (%IndexWith.impl_witness) [concrete] // CHECK:STDOUT: %ElementType.val: %ElementType.e6b = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %.9e4: type = fn_type_with_self_type %At.type.b3f, %IndexWith.facet [concrete] +// CHECK:STDOUT: %.d94: type = fn_type_with_self_type %At.type.b3f, %IndexWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -458,7 +461,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [concrete = constants.%ElementType.e6b] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%SubscriptType.8ee, constants.%ElementType.e6b)> [concrete = constants.%IndexWith.type.e80] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%At.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %IndexWith.impl_witness_table = impl_witness_table (@impl.%At.decl), @impl [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness %IndexWith.impl_witness_table [concrete = constants.%IndexWith.impl_witness] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: } @@ -500,7 +504,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: .SubscriptType = // CHECK:STDOUT: .ElementType = // CHECK:STDOUT: .At = %At.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%IndexWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -544,7 +548,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %c.ref: ref %C = name_ref c, file.%c // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc22_25.1: %SubscriptType.8ee = converted %int_0, [concrete = ] -// CHECK:STDOUT: %impl.elem0: %.9e4 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%At.d43] +// CHECK:STDOUT: %impl.elem0: %.d94 = impl_witness_access constants.%IndexWith.impl_witness, element0 [concrete = constants.%At.d43] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %.loc22_25.2: ref %ElementType.e6b = temporary_storage // CHECK:STDOUT: %.loc22_22: %C = bind_value %c.ref diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index a68667b08db8..220fca0f96e2 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %LeftShift.type: type = facet_type <@LeftShift> [concrete] // CHECK:STDOUT: %Op.type.789: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.df4: = impl_witness (@impl.c6e.%Op.decl) [concrete] +// CHECK:STDOUT: %LeftShift.impl_witness: = impl_witness file.%LeftShift.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.de2: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.df9: %Op.type.de2 = struct_value () [concrete] -// CHECK:STDOUT: %LeftShift.facet: %LeftShift.type = facet_value %C, (%impl_witness.df4) [concrete] +// CHECK:STDOUT: %LeftShift.facet: %LeftShift.type = facet_value %C, (%LeftShift.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %LeftShiftAssign.type: type = facet_type <@LeftShiftAssign> [concrete] // CHECK:STDOUT: %Op.type.1de: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.842: = impl_witness (@impl.29d.%Op.decl) [concrete] +// CHECK:STDOUT: %LeftShiftAssign.impl_witness: = impl_witness file.%LeftShiftAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.386: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.8fc: %Op.type.386 = struct_value () [concrete] -// CHECK:STDOUT: %LeftShiftAssign.facet: %LeftShiftAssign.type = facet_value %C, (%impl_witness.842) [concrete] +// CHECK:STDOUT: %LeftShiftAssign.facet: %LeftShiftAssign.type = facet_value %C, (%LeftShiftAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.949: type = fn_type_with_self_type %Op.type.789, %LeftShift.facet [concrete] +// CHECK:STDOUT: %.8a4: type = fn_type_with_self_type %Op.type.789, %LeftShift.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.243: type = fn_type_with_self_type %Op.type.1de, %LeftShiftAssign.facet [concrete] +// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.1de, %LeftShiftAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %LeftShift.ref: type = name_ref LeftShift, imports.%Core.LeftShift [concrete = constants.%LeftShift.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.c6e.%Op.decl) [concrete = constants.%impl_witness.df4] +// CHECK:STDOUT: %LeftShift.impl_witness_table = impl_witness_table (@impl.c6e.%Op.decl), @impl.c6e [concrete] +// CHECK:STDOUT: %LeftShift.impl_witness: = impl_witness %LeftShift.impl_witness_table [concrete = constants.%LeftShift.impl_witness] // CHECK:STDOUT: impl_decl @impl.29d [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %LeftShiftAssign.ref: type = name_ref LeftShiftAssign, imports.%Core.LeftShiftAssign [concrete = constants.%LeftShiftAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.29d.%Op.decl) [concrete = constants.%impl_witness.842] +// CHECK:STDOUT: %LeftShiftAssign.impl_witness_table = impl_witness_table (@impl.29d.%Op.decl), @impl.29d [concrete] +// CHECK:STDOUT: %LeftShiftAssign.impl_witness: = impl_witness %LeftShiftAssign.impl_witness_table [concrete = constants.%LeftShiftAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%LeftShift.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.29d: %C.ref as %LeftShiftAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%LeftShiftAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.949 = impl_witness_access constants.%impl_witness.df4, element0 [concrete = constants.%Op.df9] +// CHECK:STDOUT: %impl.elem0: %.8a4 = impl_witness_access constants.%LeftShift.impl_witness, element0 [concrete = constants.%Op.df9] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.243 = impl_witness_access constants.%impl_witness.842, element0 [concrete = constants.%Op.8fc] +// CHECK:STDOUT: %impl.elem0: %.ac9 = impl_witness_access constants.%LeftShiftAssign.impl_witness, element0 [concrete = constants.%Op.8fc] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index 1660f8df2e66..8ad7f7529ed9 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Mod.type: type = facet_type <@Mod> [concrete] // CHECK:STDOUT: %Op.type.860: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.5d5: = impl_witness (@impl.f96.%Op.decl) [concrete] +// CHECK:STDOUT: %Mod.impl_witness: = impl_witness file.%Mod.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.fd2: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.777: %Op.type.fd2 = struct_value () [concrete] -// CHECK:STDOUT: %Mod.facet: %Mod.type = facet_value %C, (%impl_witness.5d5) [concrete] +// CHECK:STDOUT: %Mod.facet: %Mod.type = facet_value %C, (%Mod.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %ModAssign.type: type = facet_type <@ModAssign> [concrete] // CHECK:STDOUT: %Op.type.fae: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.5ee: = impl_witness (@impl.587.%Op.decl) [concrete] +// CHECK:STDOUT: %ModAssign.impl_witness: = impl_witness file.%ModAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.fa2: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.d6c: %Op.type.fa2 = struct_value () [concrete] -// CHECK:STDOUT: %ModAssign.facet: %ModAssign.type = facet_value %C, (%impl_witness.5ee) [concrete] +// CHECK:STDOUT: %ModAssign.facet: %ModAssign.type = facet_value %C, (%ModAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.b64: type = fn_type_with_self_type %Op.type.860, %Mod.facet [concrete] +// CHECK:STDOUT: %.0c1: type = fn_type_with_self_type %Op.type.860, %Mod.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.018: type = fn_type_with_self_type %Op.type.fae, %ModAssign.facet [concrete] +// CHECK:STDOUT: %.1f2: type = fn_type_with_self_type %Op.type.fae, %ModAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Mod.ref: type = name_ref Mod, imports.%Core.Mod [concrete = constants.%Mod.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.f96.%Op.decl) [concrete = constants.%impl_witness.5d5] +// CHECK:STDOUT: %Mod.impl_witness_table = impl_witness_table (@impl.f96.%Op.decl), @impl.f96 [concrete] +// CHECK:STDOUT: %Mod.impl_witness: = impl_witness %Mod.impl_witness_table [concrete = constants.%Mod.impl_witness] // CHECK:STDOUT: impl_decl @impl.587 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %ModAssign.ref: type = name_ref ModAssign, imports.%Core.ModAssign [concrete = constants.%ModAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.587.%Op.decl) [concrete = constants.%impl_witness.5ee] +// CHECK:STDOUT: %ModAssign.impl_witness_table = impl_witness_table (@impl.587.%Op.decl), @impl.587 [concrete] +// CHECK:STDOUT: %ModAssign.impl_witness: = impl_witness %ModAssign.impl_witness_table [concrete = constants.%ModAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%Mod.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.587: %C.ref as %ModAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%ModAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.b64 = impl_witness_access constants.%impl_witness.5d5, element0 [concrete = constants.%Op.777] +// CHECK:STDOUT: %impl.elem0: %.0c1 = impl_witness_access constants.%Mod.impl_witness, element0 [concrete = constants.%Op.777] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.018 = impl_witness_access constants.%impl_witness.5ee, element0 [concrete = constants.%Op.d6c] +// CHECK:STDOUT: %impl.elem0: %.1f2 = impl_witness_access constants.%ModAssign.impl_witness, element0 [concrete = constants.%Op.d6c] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index b7ec4f70e8e5..5f26119e18af 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Mul.type: type = facet_type <@Mul> [concrete] // CHECK:STDOUT: %Op.type.3ae: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.289: = impl_witness (@impl.4f2.%Op.decl) [concrete] +// CHECK:STDOUT: %Mul.impl_witness: = impl_witness file.%Mul.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.fa5: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.550: %Op.type.fa5 = struct_value () [concrete] -// CHECK:STDOUT: %Mul.facet: %Mul.type = facet_value %C, (%impl_witness.289) [concrete] +// CHECK:STDOUT: %Mul.facet: %Mul.type = facet_value %C, (%Mul.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %MulAssign.type: type = facet_type <@MulAssign> [concrete] // CHECK:STDOUT: %Op.type.340: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.de9: = impl_witness (@impl.009.%Op.decl) [concrete] +// CHECK:STDOUT: %MulAssign.impl_witness: = impl_witness file.%MulAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.c02: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.a8c: %Op.type.c02 = struct_value () [concrete] -// CHECK:STDOUT: %MulAssign.facet: %MulAssign.type = facet_value %C, (%impl_witness.de9) [concrete] +// CHECK:STDOUT: %MulAssign.facet: %MulAssign.type = facet_value %C, (%MulAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.c1a: type = fn_type_with_self_type %Op.type.3ae, %Mul.facet [concrete] +// CHECK:STDOUT: %.ccd: type = fn_type_with_self_type %Op.type.3ae, %Mul.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.5e2: type = fn_type_with_self_type %Op.type.340, %MulAssign.facet [concrete] +// CHECK:STDOUT: %.de8: type = fn_type_with_self_type %Op.type.340, %MulAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Mul.ref: type = name_ref Mul, imports.%Core.Mul [concrete = constants.%Mul.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.4f2.%Op.decl) [concrete = constants.%impl_witness.289] +// CHECK:STDOUT: %Mul.impl_witness_table = impl_witness_table (@impl.4f2.%Op.decl), @impl.4f2 [concrete] +// CHECK:STDOUT: %Mul.impl_witness: = impl_witness %Mul.impl_witness_table [concrete = constants.%Mul.impl_witness] // CHECK:STDOUT: impl_decl @impl.009 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %MulAssign.ref: type = name_ref MulAssign, imports.%Core.MulAssign [concrete = constants.%MulAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.009.%Op.decl) [concrete = constants.%impl_witness.de9] +// CHECK:STDOUT: %MulAssign.impl_witness_table = impl_witness_table (@impl.009.%Op.decl), @impl.009 [concrete] +// CHECK:STDOUT: %MulAssign.impl_witness: = impl_witness %MulAssign.impl_witness_table [concrete = constants.%MulAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%Mul.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.009: %C.ref as %MulAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%MulAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.c1a = impl_witness_access constants.%impl_witness.289, element0 [concrete = constants.%Op.550] +// CHECK:STDOUT: %impl.elem0: %.ccd = impl_witness_access constants.%Mul.impl_witness, element0 [concrete = constants.%Op.550] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.5e2 = impl_witness_access constants.%impl_witness.de9, element0 [concrete = constants.%Op.a8c] +// CHECK:STDOUT: %impl.elem0: %.de8 = impl_witness_access constants.%MulAssign.impl_witness, element0 [concrete = constants.%Op.a8c] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index 288bb3ffedb9..6cfec476dff5 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -32,14 +32,14 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.c34.%Op.decl) [concrete] +// CHECK:STDOUT: %Negate.impl_witness: = impl_witness file.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.67d: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.64c: %Op.type.67d = struct_value () [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %C, (%Negate.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.f7e: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %.365: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,7 +64,8 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Negate.ref: type = name_ref Negate, imports.%Core.Negate [concrete = constants.%Negate.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.c34.%Op.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (@impl.c34.%Op.decl), @impl.c34 [concrete] +// CHECK:STDOUT: %Negate.impl_witness: = impl_witness %Negate.impl_witness_table [concrete = constants.%Negate.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -98,7 +99,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Negate.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -121,7 +122,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return.param_patt: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.f7e = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Op.64c] +// CHECK:STDOUT: %impl.elem0: %.365 = impl_witness_access constants.%Negate.impl_witness, element0 [concrete = constants.%Op.64c] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref) to %.loc23 diff --git a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon index 6d1d3ac886ed..9764da5c6046 100644 --- a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon @@ -274,15 +274,15 @@ fn F() { ()[()]; } // CHECK:STDOUT: %At.9b9: %At.type.969 = struct_value () [concrete] // CHECK:STDOUT: %IndexWith.assoc_type.3d4: type = assoc_entity_type @IndexWith, @IndexWith(%empty_tuple.type) [concrete] // CHECK:STDOUT: %assoc0.21b: %IndexWith.assoc_type.3d4 = assoc_entity element0, imports.%Core.import_ref.e99 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%At.decl) [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness file.%IndexWith.impl_witness_table [concrete] // CHECK:STDOUT: %At.type.486: type = fn_type @At.2 [concrete] // CHECK:STDOUT: %At.7c4: %At.type.486 = struct_value () [concrete] -// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.a51 = facet_value %empty_tuple.type, (%impl_witness) [concrete] +// CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.a51 = facet_value %empty_tuple.type, (%IndexWith.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc0.e1e: %IndexWith.assoc_type.290 = assoc_entity element0, imports.%Core.import_ref.981 [symbolic] -// CHECK:STDOUT: %.851: type = fn_type_with_self_type %At.type.969, %IndexWith.facet [concrete] +// CHECK:STDOUT: %.ffc: type = fn_type_with_self_type %At.type.969, %IndexWith.facet [concrete] // CHECK:STDOUT: %At.bound: = bound_method %empty_tuple, %At.7c4 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -316,7 +316,8 @@ fn F() { ()[()]; } // CHECK:STDOUT: %.loc6_29: type = converted %.loc6_28, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%empty_tuple.type)> [concrete = constants.%IndexWith.type.a51] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%At.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %IndexWith.impl_witness_table = impl_witness_table (@impl.%At.decl), @impl [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness %IndexWith.impl_witness_table [concrete = constants.%IndexWith.impl_witness] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -366,7 +367,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%IndexWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @At.1(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.fb5: @IndexWith.%IndexWith.type (%IndexWith.type.bd2)) [from "core_wrong_arg_count.carbon"] { @@ -394,7 +395,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: %.loc12_11.2: %empty_tuple.type = converted %.loc12_11.1, %empty_tuple.loc12_11 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %empty_tuple.loc12_14: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc12_15: %empty_tuple.type = converted %.loc12_14, %empty_tuple.loc12_14 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %impl.elem0: %.851 = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%At.7c4] +// CHECK:STDOUT: %impl.elem0: %.ffc = impl_witness_access constants.%IndexWith.impl_witness, element0 [concrete = constants.%At.7c4] // CHECK:STDOUT: %bound_method: = bound_method %.loc12_11.2, %impl.elem0 [concrete = constants.%At.bound] // CHECK:STDOUT: %At.call: init %empty_tuple.type = call %bound_method(%.loc12_11.2, %.loc12_15) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index f52a0a36c0fc..9c9ac51e1742 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -86,7 +86,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %LessOrEquivalent.type.859: type = fn_type @LessOrEquivalent.1 [concrete] // CHECK:STDOUT: %Greater.type.270: type = fn_type @Greater.1 [concrete] // CHECK:STDOUT: %GreaterOrEquivalent.type.8af: type = fn_type @GreaterOrEquivalent.1 [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.d54.%Less.decl, @impl.d54.%LessOrEquivalent.decl, @impl.d54.%Greater.decl, @impl.d54.%GreaterOrEquivalent.decl) [concrete] +// CHECK:STDOUT: %Ordered.impl_witness: = impl_witness file.%Ordered.impl_witness_table [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] // CHECK:STDOUT: %Less.type.25a: type = fn_type @Less.2 [concrete] @@ -97,19 +97,19 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %Greater.afe: %Greater.type.0a1 = struct_value () [concrete] // CHECK:STDOUT: %GreaterOrEquivalent.type.caf: type = fn_type @GreaterOrEquivalent.2 [concrete] // CHECK:STDOUT: %GreaterOrEquivalent.03b: %GreaterOrEquivalent.type.caf = struct_value () [concrete] -// CHECK:STDOUT: %Ordered.facet: %Ordered.type = facet_value %C, (%impl_witness) [concrete] +// CHECK:STDOUT: %Ordered.facet: %Ordered.type = facet_value %C, (%Ordered.impl_witness) [concrete] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [concrete] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [concrete] -// CHECK:STDOUT: %.a6a: type = fn_type_with_self_type %Less.type.341, %Ordered.facet [concrete] +// CHECK:STDOUT: %.d60: type = fn_type_with_self_type %Less.type.341, %Ordered.facet [concrete] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [concrete] // CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.e16: type = fn_type_with_self_type %LessOrEquivalent.type.859, %Ordered.facet [concrete] +// CHECK:STDOUT: %.6b1: type = fn_type_with_self_type %LessOrEquivalent.type.859, %Ordered.facet [concrete] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [concrete] // CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [concrete] -// CHECK:STDOUT: %.0c7: type = fn_type_with_self_type %Greater.type.270, %Ordered.facet [concrete] +// CHECK:STDOUT: %.5ae: type = fn_type_with_self_type %Greater.type.270, %Ordered.facet [concrete] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [concrete] // CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.a45: type = fn_type_with_self_type %GreaterOrEquivalent.type.8af, %Ordered.facet [concrete] +// CHECK:STDOUT: %.0c4: type = fn_type_with_self_type %GreaterOrEquivalent.type.8af, %Ordered.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -138,7 +138,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Ordered.ref: type = name_ref Ordered, imports.%Core.Ordered [concrete = constants.%Ordered.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.d54.%Less.decl, @impl.d54.%LessOrEquivalent.decl, @impl.d54.%Greater.decl, @impl.d54.%GreaterOrEquivalent.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %Ordered.impl_witness_table = impl_witness_table (@impl.d54.%Less.decl, @impl.d54.%LessOrEquivalent.decl, @impl.d54.%Greater.decl, @impl.d54.%GreaterOrEquivalent.decl), @impl.d54 [concrete] +// CHECK:STDOUT: %Ordered.impl_witness: = impl_witness %Ordered.impl_witness_table [concrete = constants.%Ordered.impl_witness] // CHECK:STDOUT: %TestLess.decl: %TestLess.type = fn_decl @TestLess [concrete = constants.%TestLess] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -309,7 +310,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: .LessOrEquivalent = %LessOrEquivalent.decl // CHECK:STDOUT: .Greater = %Greater.decl // CHECK:STDOUT: .GreaterOrEquivalent = %GreaterOrEquivalent.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%Ordered.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -333,7 +334,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.a6a = impl_witness_access constants.%impl_witness, element0 [concrete = constants.%Less.738] +// CHECK:STDOUT: %impl.elem0: %.d60 = impl_witness_access constants.%Ordered.impl_witness, element0 [concrete = constants.%Less.738] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %Less.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call @@ -345,7 +346,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.e16 = impl_witness_access constants.%impl_witness, element1 [concrete = constants.%LessOrEquivalent.010] +// CHECK:STDOUT: %impl.elem1: %.6b1 = impl_witness_access constants.%Ordered.impl_witness, element1 [concrete = constants.%LessOrEquivalent.010] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call @@ -357,7 +358,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem2: %.0c7 = impl_witness_access constants.%impl_witness, element2 [concrete = constants.%Greater.afe] +// CHECK:STDOUT: %impl.elem2: %.5ae = impl_witness_access constants.%Ordered.impl_witness, element2 [concrete = constants.%Greater.afe] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem2 // CHECK:STDOUT: %Greater.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call @@ -369,7 +370,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem3: %.a45 = impl_witness_access constants.%impl_witness, element3 [concrete = constants.%GreaterOrEquivalent.03b] +// CHECK:STDOUT: %impl.elem3: %.0c4 = impl_witness_access constants.%Ordered.impl_witness, element3 [concrete = constants.%GreaterOrEquivalent.03b] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem3 // CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index dd47814cdfa8..e6dc052a35c8 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %RightShift.type: type = facet_type <@RightShift> [concrete] // CHECK:STDOUT: %Op.type.4f4: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.404: = impl_witness (@impl.3c1.%Op.decl) [concrete] +// CHECK:STDOUT: %RightShift.impl_witness: = impl_witness file.%RightShift.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.092: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.79a: %Op.type.092 = struct_value () [concrete] -// CHECK:STDOUT: %RightShift.facet: %RightShift.type = facet_value %C, (%impl_witness.404) [concrete] +// CHECK:STDOUT: %RightShift.facet: %RightShift.type = facet_value %C, (%RightShift.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %RightShiftAssign.type: type = facet_type <@RightShiftAssign> [concrete] // CHECK:STDOUT: %Op.type.6f6: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.686: = impl_witness (@impl.4f0.%Op.decl) [concrete] +// CHECK:STDOUT: %RightShiftAssign.impl_witness: = impl_witness file.%RightShiftAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.aab: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.7b2: %Op.type.aab = struct_value () [concrete] -// CHECK:STDOUT: %RightShiftAssign.facet: %RightShiftAssign.type = facet_value %C, (%impl_witness.686) [concrete] +// CHECK:STDOUT: %RightShiftAssign.facet: %RightShiftAssign.type = facet_value %C, (%RightShiftAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.a28: type = fn_type_with_self_type %Op.type.4f4, %RightShift.facet [concrete] +// CHECK:STDOUT: %.17b: type = fn_type_with_self_type %Op.type.4f4, %RightShift.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.0b2: type = fn_type_with_self_type %Op.type.6f6, %RightShiftAssign.facet [concrete] +// CHECK:STDOUT: %.285: type = fn_type_with_self_type %Op.type.6f6, %RightShiftAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %RightShift.ref: type = name_ref RightShift, imports.%Core.RightShift [concrete = constants.%RightShift.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.3c1.%Op.decl) [concrete = constants.%impl_witness.404] +// CHECK:STDOUT: %RightShift.impl_witness_table = impl_witness_table (@impl.3c1.%Op.decl), @impl.3c1 [concrete] +// CHECK:STDOUT: %RightShift.impl_witness: = impl_witness %RightShift.impl_witness_table [concrete = constants.%RightShift.impl_witness] // CHECK:STDOUT: impl_decl @impl.4f0 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %RightShiftAssign.ref: type = name_ref RightShiftAssign, imports.%Core.RightShiftAssign [concrete = constants.%RightShiftAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.4f0.%Op.decl) [concrete = constants.%impl_witness.686] +// CHECK:STDOUT: %RightShiftAssign.impl_witness_table = impl_witness_table (@impl.4f0.%Op.decl), @impl.4f0 [concrete] +// CHECK:STDOUT: %RightShiftAssign.impl_witness: = impl_witness %RightShiftAssign.impl_witness_table [concrete = constants.%RightShiftAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%RightShift.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4f0: %C.ref as %RightShiftAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%RightShiftAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.a28 = impl_witness_access constants.%impl_witness.404, element0 [concrete = constants.%Op.79a] +// CHECK:STDOUT: %impl.elem0: %.17b = impl_witness_access constants.%RightShift.impl_witness, element0 [concrete = constants.%Op.79a] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.0b2 = impl_witness_access constants.%impl_witness.686, element0 [concrete = constants.%Op.7b2] +// CHECK:STDOUT: %impl.elem0: %.285 = impl_witness_access constants.%RightShiftAssign.impl_witness, element0 [concrete = constants.%Op.7b2] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 0da06de15952..1e9128a7370e 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -40,24 +40,24 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Sub.type: type = facet_type <@Sub> [concrete] // CHECK:STDOUT: %Op.type.111: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl_witness.3b8: = impl_witness (@impl.3f9.%Op.decl) [concrete] +// CHECK:STDOUT: %Sub.impl_witness: = impl_witness file.%Sub.impl_witness_table [concrete] // CHECK:STDOUT: %Op.type.c74: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.151: %Op.type.c74 = struct_value () [concrete] -// CHECK:STDOUT: %Sub.facet: %Sub.type = facet_value %C, (%impl_witness.3b8) [concrete] +// CHECK:STDOUT: %Sub.facet: %Sub.type = facet_value %C, (%Sub.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %SubAssign.type: type = facet_type <@SubAssign> [concrete] // CHECK:STDOUT: %Op.type.f0d: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %impl_witness.91c: = impl_witness (@impl.588.%Op.decl) [concrete] +// CHECK:STDOUT: %SubAssign.impl_witness: = impl_witness file.%SubAssign.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %Op.type.966: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.a55: %Op.type.966 = struct_value () [concrete] -// CHECK:STDOUT: %SubAssign.facet: %SubAssign.type = facet_value %C, (%impl_witness.91c) [concrete] +// CHECK:STDOUT: %SubAssign.facet: %SubAssign.type = facet_value %C, (%SubAssign.impl_witness) [concrete] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.bcf: type = fn_type_with_self_type %Op.type.111, %Sub.facet [concrete] +// CHECK:STDOUT: %.ee4: type = fn_type_with_self_type %Op.type.111, %Sub.facet [concrete] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.dcb: type = fn_type_with_self_type %Op.type.f0d, %SubAssign.facet [concrete] +// CHECK:STDOUT: %.dac: type = fn_type_with_self_type %Op.type.f0d, %SubAssign.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,13 +85,15 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Sub.ref: type = name_ref Sub, imports.%Core.Sub [concrete = constants.%Sub.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.3f9.%Op.decl) [concrete = constants.%impl_witness.3b8] +// CHECK:STDOUT: %Sub.impl_witness_table = impl_witness_table (@impl.3f9.%Op.decl), @impl.3f9 [concrete] +// CHECK:STDOUT: %Sub.impl_witness: = impl_witness %Sub.impl_witness_table [concrete = constants.%Sub.impl_witness] // CHECK:STDOUT: impl_decl @impl.588 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %SubAssign.ref: type = name_ref SubAssign, imports.%Core.SubAssign [concrete = constants.%SubAssign.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc22: = impl_witness (@impl.588.%Op.decl) [concrete = constants.%impl_witness.91c] +// CHECK:STDOUT: %SubAssign.impl_witness_table = impl_witness_table (@impl.588.%Op.decl), @impl.588 [concrete] +// CHECK:STDOUT: %SubAssign.impl_witness: = impl_witness %SubAssign.impl_witness_table [concrete = constants.%SubAssign.impl_witness] // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, call_param0 @@ -151,7 +153,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%Sub.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.588: %C.ref as %SubAssign.ref { @@ -176,7 +178,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%impl_witness.loc22 +// CHECK:STDOUT: witness = file.%SubAssign.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +207,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.bcf = impl_witness_access constants.%impl_witness.3b8, element0 [concrete = constants.%Op.151] +// CHECK:STDOUT: %impl.elem0: %.ee4 = impl_witness_access constants.%Sub.impl_witness, element0 [concrete = constants.%Op.151] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc26 @@ -217,7 +219,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a // CHECK:STDOUT: %.loc31: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.dcb = impl_witness_access constants.%impl_witness.91c, element0 [concrete = constants.%Op.a55] +// CHECK:STDOUT: %impl.elem0: %.dac = impl_witness_access constants.%SubAssign.impl_witness, element0 [concrete = constants.%Op.a55] // CHECK:STDOUT: %bound_method: = bound_method %.loc31, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc31 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 47229889f31f..bbf66951720c 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -49,11 +49,12 @@ fn Main() { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -101,7 +102,7 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -123,11 +124,12 @@ fn Main() { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -177,7 +179,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] @@ -209,7 +211,7 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index f917df26b37a..a5fda1c2dd5a 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -30,11 +30,12 @@ var b: i32 = a; // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -71,7 +72,7 @@ var b: i32 = a; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/packages/raw_core.carbon b/toolchain/check/testdata/packages/raw_core.carbon index fe112a2a9095..0804b5d69856 100644 --- a/toolchain/check/testdata/packages/raw_core.carbon +++ b/toolchain/check/testdata/packages/raw_core.carbon @@ -201,11 +201,12 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -262,7 +263,7 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc6_25.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_25.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index 514a434c0a9e..8a841343266d 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -23,11 +23,12 @@ fn F() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -69,7 +70,7 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 2064961cb292..9fd82637d16e 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -34,11 +34,12 @@ fn F() { // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -83,7 +84,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc12_46.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc12, %int_2.loc12) -// CHECK:STDOUT: %impl.elem0.loc12_46.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_46.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_46.1: = bound_method %int_1.loc12, %impl.elem0.loc12_46.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc12_46.1: = specific_function %impl.elem0.loc12_46.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_46.2: = bound_method %int_1.loc12, %specific_fn.loc12_46.1 [concrete = constants.%bound_method.9a1] @@ -91,7 +92,7 @@ fn F() { // CHECK:STDOUT: %.loc12_46.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_46.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc12_46.3: ref %i32 = struct_access %s.var, element0 // CHECK:STDOUT: %.loc12_46.4: init %i32 = initialize_from %.loc12_46.2 to %.loc12_46.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc12_46.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_46.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_46.3: = bound_method %int_2.loc12, %impl.elem0.loc12_46.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc12_46.2: = specific_function %impl.elem0.loc12_46.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_46.4: = bound_method %int_2.loc12, %specific_fn.loc12_46.2 [concrete = constants.%bound_method.b92] @@ -165,7 +166,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc18_28.1: %tuple.type.f94 = tuple_literal (%int_1.loc18, %int_2.loc18) -// CHECK:STDOUT: %impl.elem0.loc18_28.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_28.1: = bound_method %int_1.loc18, %impl.elem0.loc18_28.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc18_28.1: = specific_function %impl.elem0.loc18_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_28.2: = bound_method %int_1.loc18, %specific_fn.loc18_28.1 [concrete = constants.%bound_method.9a1] @@ -173,7 +174,7 @@ fn F() { // CHECK:STDOUT: %.loc18_28.2: init %i32 = converted %int_1.loc18, %int.convert_checked.loc18_28.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0.loc18: ref %i32 = tuple_access %t.var, element0 // CHECK:STDOUT: %.loc18_28.3: init %i32 = initialize_from %.loc18_28.2 to %tuple.elem0.loc18 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc18_28.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_28.3: = bound_method %int_2.loc18, %impl.elem0.loc18_28.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc18_28.2: = specific_function %impl.elem0.loc18_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_28.4: = bound_method %int_2.loc18, %specific_fn.loc18_28.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 053b15dc0543..fcc3ba67032e 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -25,11 +25,12 @@ fn F() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -71,7 +72,7 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 19945b5ccdac..8bdd512bfe66 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -29,11 +29,12 @@ var a: i32* = a_ref; // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -83,7 +84,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index 940aa2bd786c..ae511ce165fe 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -32,11 +32,12 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -82,7 +83,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @F(%b.param_patt: bool) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index f5d4365f2d50..b680bbfba6c3 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -43,11 +43,12 @@ fn G() -> C { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -136,7 +137,7 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] @@ -161,7 +162,7 @@ fn G() -> C { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc25_38.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc25_38.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc25_38.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_38.1: = bound_method %int_1, %impl.elem0.loc25_38.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc25_38.1: = specific_function %impl.elem0.loc25_38.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_38.2: = bound_method %int_1, %specific_fn.loc25_38.1 [concrete = constants.%bound_method.9a1] @@ -169,7 +170,7 @@ fn G() -> C { // CHECK:STDOUT: %.loc25_38.2: init %i32 = converted %int_1, %int.convert_checked.loc25_38.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc25_38.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc25_38.4: init %i32 = initialize_from %.loc25_38.2 to %.loc25_38.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc25_38.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc25_38.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_38.3: = bound_method %int_2, %impl.elem0.loc25_38.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc25_38.2: = specific_function %impl.elem0.loc25_38.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_38.4: = bound_method %int_2, %specific_fn.loc25_38.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index 19e8291b36d1..3e7672ee1157 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -51,11 +51,12 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -116,7 +117,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc13: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_14.1: = bound_method %int_0.loc13, %impl.elem0.loc13 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_14.2: = bound_method %int_0.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.b6e] @@ -134,7 +135,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc21: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_14.1: = bound_method %int_1, %impl.elem0.loc21 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_14.2: = bound_method %int_1, %specific_fn.loc21 [concrete = constants.%bound_method.9a1] @@ -150,7 +151,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_0.loc23: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc23: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc23_11.1: = bound_method %int_0.loc23, %impl.elem0.loc23 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_11.2: = bound_method %int_0.loc23, %specific_fn.loc23 [concrete = constants.%bound_method.b6e] @@ -172,7 +173,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc28: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc28: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc28_14.1: = bound_method %int_0.loc28, %impl.elem0.loc28 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc28: = specific_function %impl.elem0.loc28, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc28_14.2: = bound_method %int_0.loc28, %specific_fn.loc28 [concrete = constants.%bound_method.b6e] @@ -194,7 +195,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc37: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc37: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc37_16.1: = bound_method %int_1, %impl.elem0.loc37 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc37: = specific_function %impl.elem0.loc37, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc37_16.2: = bound_method %int_1, %specific_fn.loc37 [concrete = constants.%bound_method.9a1] @@ -213,7 +214,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc27: // CHECK:STDOUT: %int_0.loc40: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc40: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc40: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc40_11.1: = bound_method %int_0.loc40, %impl.elem0.loc40 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc40: = specific_function %impl.elem0.loc40, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc40_11.2: = bound_method %int_0.loc40, %specific_fn.loc40 [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon index 61b2cb03ef4c..67b4d4cb7d80 100644 --- a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon +++ b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon @@ -88,10 +88,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Convert.fcc: %Convert.type.752 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.assoc_type.1cf: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete] // CHECK:STDOUT: %assoc0.3ce: %ImplicitAs.assoc_type.1cf = assoc_entity element0, @ImplicitAs.%Convert.decl [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness file.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %Convert.type.c2a: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.40d: %Convert.type.c2a = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.11a = facet_value Core.IntLiteral, (%impl_witness) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.11a = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -141,7 +141,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc12_36.2: type = converted %int.make_type_signed, %.loc12_36.1 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32.builtin)> [concrete = constants.%ImplicitAs.type.11a] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness (@impl.%Convert.decl) [concrete = constants.%impl_witness] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (@impl.%Convert.decl), @impl [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(%T.loc8_22.1: type) { @@ -206,7 +207,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type"; @@ -300,9 +301,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %ImplicitAs.assoc_type.398: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete] // CHECK:STDOUT: %assoc0.6fd: %ImplicitAs.assoc_type.398 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete] // CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] -// CHECK:STDOUT: %impl_witness.39c7: = impl_witness (imports.%Core.import_ref.f35) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.673: %ImplicitAs.type.61e = facet_value Core.IntLiteral, (%impl_witness.39c7) [concrete] -// CHECK:STDOUT: %.5e0: type = fn_type_with_self_type %Convert.type.059, %ImplicitAs.facet.673 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (imports.%Core.import_ref.f35), @impl.68b [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.07a: = impl_witness %ImplicitAs.impl_witness_table [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.a3d: %ImplicitAs.type.61e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.07a) [concrete] +// CHECK:STDOUT: %.ec1: type = fn_type_with_self_type %Convert.type.059, %ImplicitAs.facet.a3d [concrete] // CHECK:STDOUT: %Convert.type.49f: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.cb5: %Convert.type.49f = struct_value () [concrete] // CHECK:STDOUT: %Convert.bound.04a: = bound_method %int_0.5c6, %Convert.cb5 [concrete] @@ -315,66 +317,66 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Convert.d38: %Convert.type.010 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.assoc_type.75e: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%D) [concrete] // CHECK:STDOUT: %assoc0.579: %ImplicitAs.assoc_type.75e = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete] -// CHECK:STDOUT: %impl_witness.39cb: = impl_witness (@impl.837.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.4af: = impl_witness file.%ImplicitAs.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: %Convert.type.fff: type = fn_type @Convert.3 [concrete] // CHECK:STDOUT: %Convert.606: %Convert.type.fff = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.44d: %ImplicitAs.type.94e = facet_value %C.808, (%impl_witness.39cb) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.a19: %ImplicitAs.type.94e = facet_value %C.808, (%ImplicitAs.impl_witness.4af) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.92d: = bound_method %int_1.5b8, %Convert.cb5 [concrete] // CHECK:STDOUT: %int_1.f38: %i32.builtin = int_value 1 [concrete] // CHECK:STDOUT: %C.8be: type = class_type @C, @C(%int_1.f38) [concrete] -// CHECK:STDOUT: %impl_witness.ecb: = impl_witness (@impl.511.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.fcc: = impl_witness file.%ImplicitAs.impl_witness_table.loc11 [concrete] // CHECK:STDOUT: %Convert.type.89f: type = fn_type @Convert.4 [concrete] // CHECK:STDOUT: %Convert.689: %Convert.type.89f = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.018: %ImplicitAs.type.94e = facet_value %C.8be, (%impl_witness.ecb) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.340: %ImplicitAs.type.94e = facet_value %C.8be, (%ImplicitAs.impl_witness.fcc) [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %Convert.bound.1b9: = bound_method %int_2.ecc, %Convert.cb5 [concrete] // CHECK:STDOUT: %int_2.5a1: %i32.builtin = int_value 2 [concrete] // CHECK:STDOUT: %C.c17: type = class_type @C, @C(%int_2.5a1) [concrete] -// CHECK:STDOUT: %impl_witness.8b8: = impl_witness (@impl.141.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.03e: = impl_witness file.%ImplicitAs.impl_witness_table.loc12 [concrete] // CHECK:STDOUT: %Convert.type.e90: type = fn_type @Convert.5 [concrete] // CHECK:STDOUT: %Convert.ec9: %Convert.type.e90 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.e66: %ImplicitAs.type.94e = facet_value %C.c17, (%impl_witness.8b8) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.ec0: %ImplicitAs.type.94e = facet_value %C.c17, (%ImplicitAs.impl_witness.03e) [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Convert.bound.b6b: = bound_method %int_3.1ba, %Convert.cb5 [concrete] // CHECK:STDOUT: %int_3.a0f: %i32.builtin = int_value 3 [concrete] // CHECK:STDOUT: %C.414: type = class_type @C, @C(%int_3.a0f) [concrete] -// CHECK:STDOUT: %impl_witness.1c0: = impl_witness (@impl.e6b.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.dec: = impl_witness file.%ImplicitAs.impl_witness_table.loc13 [concrete] // CHECK:STDOUT: %Convert.type.5db: type = fn_type @Convert.6 [concrete] // CHECK:STDOUT: %Convert.193: %Convert.type.5db = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.480: %ImplicitAs.type.94e = facet_value %C.414, (%impl_witness.1c0) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.999: %ImplicitAs.type.94e = facet_value %C.414, (%ImplicitAs.impl_witness.dec) [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Convert.bound.626: = bound_method %int_4.0c1, %Convert.cb5 [concrete] // CHECK:STDOUT: %int_4.4f1: %i32.builtin = int_value 4 [concrete] // CHECK:STDOUT: %C.488: type = class_type @C, @C(%int_4.4f1) [concrete] -// CHECK:STDOUT: %impl_witness.7c9: = impl_witness (@impl.056.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.842: = impl_witness file.%ImplicitAs.impl_witness_table.loc14 [concrete] // CHECK:STDOUT: %Convert.type.4e7: type = fn_type @Convert.7 [concrete] // CHECK:STDOUT: %Convert.52a: %Convert.type.4e7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.28d: %ImplicitAs.type.94e = facet_value %C.488, (%impl_witness.7c9) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.527: %ImplicitAs.type.94e = facet_value %C.488, (%ImplicitAs.impl_witness.842) [concrete] // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %Convert.bound.910: = bound_method %int_5.64b, %Convert.cb5 [concrete] // CHECK:STDOUT: %int_5.967: %i32.builtin = int_value 5 [concrete] // CHECK:STDOUT: %C.3e2: type = class_type @C, @C(%int_5.967) [concrete] -// CHECK:STDOUT: %impl_witness.4b9: = impl_witness (@impl.154.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.eb5: = impl_witness file.%ImplicitAs.impl_witness_table.loc15 [concrete] // CHECK:STDOUT: %Convert.type.658: type = fn_type @Convert.8 [concrete] // CHECK:STDOUT: %Convert.9b6: %Convert.type.658 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.d5c: %ImplicitAs.type.94e = facet_value %C.3e2, (%impl_witness.4b9) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.79a: %ImplicitAs.type.94e = facet_value %C.3e2, (%ImplicitAs.impl_witness.eb5) [concrete] // CHECK:STDOUT: %int_6.462: Core.IntLiteral = int_value 6 [concrete] // CHECK:STDOUT: %Convert.bound.e3a: = bound_method %int_6.462, %Convert.cb5 [concrete] // CHECK:STDOUT: %int_6.ec5: %i32.builtin = int_value 6 [concrete] // CHECK:STDOUT: %C.78c: type = class_type @C, @C(%int_6.ec5) [concrete] -// CHECK:STDOUT: %impl_witness.4bf: = impl_witness (@impl.a6d.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.377: = impl_witness file.%ImplicitAs.impl_witness_table.loc16 [concrete] // CHECK:STDOUT: %Convert.type.623: type = fn_type @Convert.9 [concrete] // CHECK:STDOUT: %Convert.8c9: %Convert.type.623 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.941: %ImplicitAs.type.94e = facet_value %C.78c, (%impl_witness.4bf) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.5ba: %ImplicitAs.type.94e = facet_value %C.78c, (%ImplicitAs.impl_witness.377) [concrete] // CHECK:STDOUT: %int_7.29f: Core.IntLiteral = int_value 7 [concrete] // CHECK:STDOUT: %Convert.bound.06a: = bound_method %int_7.29f, %Convert.cb5 [concrete] // CHECK:STDOUT: %int_7.6ae: %i32.builtin = int_value 7 [concrete] // CHECK:STDOUT: %C.6aa: type = class_type @C, @C(%int_7.6ae) [concrete] -// CHECK:STDOUT: %impl_witness.74c: = impl_witness (@impl.ebc.%Convert.decl) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.308: = impl_witness file.%ImplicitAs.impl_witness_table.loc17 [concrete] // CHECK:STDOUT: %Convert.type.3f8: type = fn_type @Convert.10 [concrete] // CHECK:STDOUT: %Convert.71a: %Convert.type.3f8 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.afc: %ImplicitAs.type.94e = facet_value %C.6aa, (%impl_witness.74c) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.b5c: %ImplicitAs.type.94e = facet_value %C.6aa, (%ImplicitAs.impl_witness.308) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -391,7 +393,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc8_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst49 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc9_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %Core.import_ref.de9: = import_ref Core//default, loc12_38, loaded [concrete = constants.%impl_witness.39c7] +// CHECK:STDOUT: %Core.import_ref.c62: = import_ref Core//default, loc12_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a] // CHECK:STDOUT: %Core.import_ref.872: type = import_ref Core//default, loc12_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc12_36, loaded [concrete = constants.%ImplicitAs.type.61e] // CHECK:STDOUT: } @@ -427,7 +429,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.837 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.04a] // CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %bound_method(%int_0) [concrete = constants.%int_0.a54] // CHECK:STDOUT: %.loc10_9.1: %i32.builtin = value_of_initializer %int.convert_checked [concrete = constants.%int_0.a54] @@ -438,11 +440,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [concrete = constants.%ImplicitAs.type.94e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc10: = impl_witness (@impl.837.%Convert.decl) [concrete = constants.%impl_witness.39cb] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc10 = impl_witness_table (@impl.837.%Convert.decl), @impl.837 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc10: = impl_witness %ImplicitAs.impl_witness_table.loc10 [concrete = constants.%ImplicitAs.impl_witness.4af] // CHECK:STDOUT: impl_decl @impl.511 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.92d] // CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %bound_method(%int_1) [concrete = constants.%int_1.f38] // CHECK:STDOUT: %.loc11_9.1: %i32.builtin = value_of_initializer %int.convert_checked [concrete = constants.%int_1.f38] @@ -453,11 +456,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [concrete = constants.%ImplicitAs.type.94e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc11: = impl_witness (@impl.511.%Convert.decl) [concrete = constants.%impl_witness.ecb] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc11 = impl_witness_table (@impl.511.%Convert.decl), @impl.511 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc11: = impl_witness %ImplicitAs.impl_witness_table.loc11 [concrete = constants.%ImplicitAs.impl_witness.fcc] // CHECK:STDOUT: impl_decl @impl.141 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.1b9] // CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %bound_method(%int_2) [concrete = constants.%int_2.5a1] // CHECK:STDOUT: %.loc12_9.1: %i32.builtin = value_of_initializer %int.convert_checked [concrete = constants.%int_2.5a1] @@ -468,11 +472,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [concrete = constants.%ImplicitAs.type.94e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc12: = impl_witness (@impl.141.%Convert.decl) [concrete = constants.%impl_witness.8b8] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc12 = impl_witness_table (@impl.141.%Convert.decl), @impl.141 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc12: = impl_witness %ImplicitAs.impl_witness_table.loc12 [concrete = constants.%ImplicitAs.impl_witness.03e] // CHECK:STDOUT: impl_decl @impl.e6b [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound.b6b] // CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %bound_method(%int_3) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc13_9.1: %i32.builtin = value_of_initializer %int.convert_checked [concrete = constants.%int_3.a0f] @@ -483,11 +488,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [concrete = constants.%ImplicitAs.type.94e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc13: = impl_witness (@impl.e6b.%Convert.decl) [concrete = constants.%impl_witness.1c0] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc13 = impl_witness_table (@impl.e6b.%Convert.decl), @impl.e6b [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc13: = impl_witness %ImplicitAs.impl_witness_table.loc13 [concrete = constants.%ImplicitAs.impl_witness.dec] // CHECK:STDOUT: impl_decl @impl.056 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound.626] // CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %bound_method(%int_4) [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc14_9.1: %i32.builtin = value_of_initializer %int.convert_checked [concrete = constants.%int_4.4f1] @@ -498,11 +504,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [concrete = constants.%ImplicitAs.type.94e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc14: = impl_witness (@impl.056.%Convert.decl) [concrete = constants.%impl_witness.7c9] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc14 = impl_witness_table (@impl.056.%Convert.decl), @impl.056 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc14: = impl_witness %ImplicitAs.impl_witness_table.loc14 [concrete = constants.%ImplicitAs.impl_witness.842] // CHECK:STDOUT: impl_decl @impl.154 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound.910] // CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %bound_method(%int_5) [concrete = constants.%int_5.967] // CHECK:STDOUT: %.loc15_9.1: %i32.builtin = value_of_initializer %int.convert_checked [concrete = constants.%int_5.967] @@ -513,11 +520,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [concrete = constants.%ImplicitAs.type.94e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc15: = impl_witness (@impl.154.%Convert.decl) [concrete = constants.%impl_witness.4b9] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc15 = impl_witness_table (@impl.154.%Convert.decl), @impl.154 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc15: = impl_witness %ImplicitAs.impl_witness_table.loc15 [concrete = constants.%ImplicitAs.impl_witness.eb5] // CHECK:STDOUT: impl_decl @impl.a6d [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] -// CHECK:STDOUT: %impl.elem0: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method: = bound_method %int_6, %impl.elem0 [concrete = constants.%Convert.bound.e3a] // CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %bound_method(%int_6) [concrete = constants.%int_6.ec5] // CHECK:STDOUT: %.loc16_9.1: %i32.builtin = value_of_initializer %int.convert_checked [concrete = constants.%int_6.ec5] @@ -528,11 +536,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [concrete = constants.%ImplicitAs.type.94e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc16: = impl_witness (@impl.a6d.%Convert.decl) [concrete = constants.%impl_witness.4bf] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc16 = impl_witness_table (@impl.a6d.%Convert.decl), @impl.a6d [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc16: = impl_witness %ImplicitAs.impl_witness_table.loc16 [concrete = constants.%ImplicitAs.impl_witness.377] // CHECK:STDOUT: impl_decl @impl.ebc [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] -// CHECK:STDOUT: %impl.elem0: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method: = bound_method %int_7, %impl.elem0 [concrete = constants.%Convert.bound.06a] // CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %bound_method(%int_7) [concrete = constants.%int_7.6ae] // CHECK:STDOUT: %.loc17_9.1: %i32.builtin = value_of_initializer %int.convert_checked [concrete = constants.%int_7.6ae] @@ -543,7 +552,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%D)> [concrete = constants.%ImplicitAs.type.94e] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness.loc17: = impl_witness (@impl.ebc.%Convert.decl) [concrete = constants.%impl_witness.74c] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc17 = impl_witness_table (@impl.ebc.%Convert.decl), @impl.ebc [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.loc17: = impl_witness %ImplicitAs.impl_witness_table.loc17 [concrete = constants.%ImplicitAs.impl_witness.308] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] { @@ -568,7 +578,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.68b: imports.%Core.import_ref.872 as imports.%Core.import_ref.4d9 [from "core.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.de9 +// CHECK:STDOUT: witness = imports.%Core.import_ref.c62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.837: %C as %ImplicitAs.type { @@ -590,7 +600,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: .Make = -// CHECK:STDOUT: witness = file.%impl_witness.loc10 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.511: %C as %ImplicitAs.type { @@ -612,7 +622,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: .Make = -// CHECK:STDOUT: witness = file.%impl_witness.loc11 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.141: %C as %ImplicitAs.type { @@ -634,7 +644,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: .Make = -// CHECK:STDOUT: witness = file.%impl_witness.loc12 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.e6b: %C as %ImplicitAs.type { @@ -656,7 +666,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: .Make = -// CHECK:STDOUT: witness = file.%impl_witness.loc13 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.056: %C as %ImplicitAs.type { @@ -678,7 +688,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: .Make = -// CHECK:STDOUT: witness = file.%impl_witness.loc14 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.154: %C as %ImplicitAs.type { @@ -700,7 +710,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: .Make = -// CHECK:STDOUT: witness = file.%impl_witness.loc15 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a6d: %C as %ImplicitAs.type { @@ -722,7 +732,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: .Make = -// CHECK:STDOUT: witness = file.%impl_witness.loc16 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.ebc: %C as %ImplicitAs.type { @@ -744,7 +754,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: .D = // CHECK:STDOUT: .Convert = %Convert.decl // CHECK:STDOUT: .Make = -// CHECK:STDOUT: witness = file.%impl_witness.loc17 +// CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%N.loc6_9.1: %i32.builtin) { @@ -791,13 +801,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_0.loc8_31: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_0.loc8_39: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc8_40.1: %struct_type.n.m.819 = struct_literal (%int_0.loc8_31, %int_0.loc8_39) -// CHECK:STDOUT: %impl.elem0.loc8_40.1: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc8_40.1: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc8_40.1: = bound_method %int_0.loc8_31, %impl.elem0.loc8_40.1 [concrete = constants.%Convert.bound.04a] // CHECK:STDOUT: %int.convert_checked.loc8_40.1: init %i32.builtin = call %bound_method.loc8_40.1(%int_0.loc8_31) [concrete = constants.%int_0.a54] // CHECK:STDOUT: %.loc8_40.2: init %i32.builtin = converted %int_0.loc8_31, %int.convert_checked.loc8_40.1 [concrete = constants.%int_0.a54] // CHECK:STDOUT: %.loc8_40.3: ref %i32.builtin = class_element_access %return, element0 // CHECK:STDOUT: %.loc8_40.4: init %i32.builtin = initialize_from %.loc8_40.2 to %.loc8_40.3 [concrete = constants.%int_0.a54] -// CHECK:STDOUT: %impl.elem0.loc8_40.2: %.5e0 = impl_witness_access constants.%impl_witness.39c7, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc8_40.2: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc8_40.2: = bound_method %int_0.loc8_39, %impl.elem0.loc8_40.2 [concrete = constants.%Convert.bound.04a] // CHECK:STDOUT: %int.convert_checked.loc8_40.2: init %i32.builtin = call %bound_method.loc8_40.2(%int_0.loc8_39) [concrete = constants.%int_0.a54] // CHECK:STDOUT: %.loc8_40.5: init %i32.builtin = converted %int_0.loc8_39, %int.convert_checked.loc8_40.2 [concrete = constants.%int_0.a54] @@ -937,10 +947,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %assoc0 => constants.%assoc0.579 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.44d) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.a19) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.94e -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.44d +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.a19 // CHECK:STDOUT: %Self.as_type => constants.%C.808 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -951,10 +961,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.018) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.340) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.94e -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.018 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.340 // CHECK:STDOUT: %Self.as_type => constants.%C.8be // CHECK:STDOUT: } // CHECK:STDOUT: @@ -965,10 +975,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.e66) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.ec0) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.94e -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.e66 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.ec0 // CHECK:STDOUT: %Self.as_type => constants.%C.c17 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -979,10 +989,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.480) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.999) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.94e -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.480 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.999 // CHECK:STDOUT: %Self.as_type => constants.%C.414 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -993,10 +1003,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.28d) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.527) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.94e -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.28d +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.527 // CHECK:STDOUT: %Self.as_type => constants.%C.488 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1007,10 +1017,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.d5c) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.79a) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.94e -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.d5c +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.79a // CHECK:STDOUT: %Self.as_type => constants.%C.3e2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1021,10 +1031,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.941) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.5ba) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.94e -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.941 +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.5ba // CHECK:STDOUT: %Self.as_type => constants.%C.78c // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1035,10 +1045,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.afc) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%ImplicitAs.facet.b5c) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.94e -// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.afc +// CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.b5c // CHECK:STDOUT: %Self.as_type => constants.%C.6aa // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1078,9 +1088,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %ImplicitAs.assoc_type.398: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete] // CHECK:STDOUT: %assoc0.6fd: %ImplicitAs.assoc_type.398 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete] // CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] -// CHECK:STDOUT: %impl_witness.39c: = impl_witness (imports.%Core.import_ref.f35) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.673: %ImplicitAs.type.61e = facet_value Core.IntLiteral, (%impl_witness.39c) [concrete] -// CHECK:STDOUT: %.5e0: type = fn_type_with_self_type %Convert.type.059, %ImplicitAs.facet.673 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.78e = impl_witness_table (imports.%Core.import_ref.f35), @impl.68b [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.07a: = impl_witness %ImplicitAs.impl_witness_table.78e [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.a3d: %ImplicitAs.type.61e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.07a) [concrete] +// CHECK:STDOUT: %.ec1e: type = fn_type_with_self_type %Convert.type.059, %ImplicitAs.facet.a3d [concrete] // CHECK:STDOUT: %Convert.type.49f: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.cb5: %Convert.type.49f = struct_value () [concrete] // CHECK:STDOUT: %Convert.bound.04a: = bound_method %int_0.5c6, %Convert.cb5 [concrete] @@ -1107,65 +1118,73 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.898: type = class_type @C, @C(%int_6.ec5) [concrete] // CHECK:STDOUT: %int_7.6ae: %i32.builtin = int_value 7 [concrete] // CHECK:STDOUT: %C.f0a: type = class_type @C, @C(%int_7.6ae) [concrete] -// CHECK:STDOUT: %impl_witness.368: = impl_witness (imports.%P.import_ref.5f3) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.13a: %ImplicitAs.type.5f9 = facet_value %C.76d, (%impl_witness.368) [concrete] -// CHECK:STDOUT: %.3f5: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.13a [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.497 = impl_witness_table (imports.%P.import_ref.5f3), @impl.b24 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.6e5: = impl_witness %ImplicitAs.impl_witness_table.497 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.5c5: %ImplicitAs.type.5f9 = facet_value %C.76d, (%ImplicitAs.impl_witness.6e5) [concrete] +// CHECK:STDOUT: %.18d: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.5c5 [concrete] // CHECK:STDOUT: %Convert.type.c72: type = fn_type @Convert.3 [concrete] // CHECK:STDOUT: %Convert.4f5: %Convert.type.c72 = struct_value () [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.92d: = bound_method %int_1.5b8, %Convert.cb5 [concrete] // CHECK:STDOUT: %C.val.172: %C.012 = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.29f: = impl_witness (imports.%P.import_ref.4da) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.cf4: %ImplicitAs.type.5f9 = facet_value %C.012, (%impl_witness.29f) [concrete] -// CHECK:STDOUT: %.a31: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.cf4 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.b5d = impl_witness_table (imports.%P.import_ref.4da), @impl.277 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.70d: = impl_witness %ImplicitAs.impl_witness_table.b5d [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.930: %ImplicitAs.type.5f9 = facet_value %C.012, (%ImplicitAs.impl_witness.70d) [concrete] +// CHECK:STDOUT: %.d7a: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.930 [concrete] // CHECK:STDOUT: %Convert.type.d88: type = fn_type @Convert.4 [concrete] // CHECK:STDOUT: %Convert.ecc: %Convert.type.d88 = struct_value () [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %Convert.bound.1b9: = bound_method %int_2.ecc, %Convert.cb5 [concrete] // CHECK:STDOUT: %C.val.418: %C.3e6 = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.3ac: = impl_witness (imports.%P.import_ref.ebf) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.0c7: %ImplicitAs.type.5f9 = facet_value %C.3e6, (%impl_witness.3ac) [concrete] -// CHECK:STDOUT: %.fa2: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.0c7 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.ec0 = impl_witness_table (imports.%P.import_ref.ebf), @impl.b5f [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.f8e: = impl_witness %ImplicitAs.impl_witness_table.ec0 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.05e: %ImplicitAs.type.5f9 = facet_value %C.3e6, (%ImplicitAs.impl_witness.f8e) [concrete] +// CHECK:STDOUT: %.e6a: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.05e [concrete] // CHECK:STDOUT: %Convert.type.c17: type = fn_type @Convert.5 [concrete] // CHECK:STDOUT: %Convert.c2b: %Convert.type.c17 = struct_value () [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Convert.bound.b6b: = bound_method %int_3.1ba, %Convert.cb5 [concrete] // CHECK:STDOUT: %C.val.bba: %C.4d9 = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.b40: = impl_witness (imports.%P.import_ref.f13) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.64d: %ImplicitAs.type.5f9 = facet_value %C.4d9, (%impl_witness.b40) [concrete] -// CHECK:STDOUT: %.f5d: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.64d [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.129 = impl_witness_table (imports.%P.import_ref.f13), @impl.90b [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.bb8: = impl_witness %ImplicitAs.impl_witness_table.129 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.eb1: %ImplicitAs.type.5f9 = facet_value %C.4d9, (%ImplicitAs.impl_witness.bb8) [concrete] +// CHECK:STDOUT: %.40b: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.eb1 [concrete] // CHECK:STDOUT: %Convert.type.70f: type = fn_type @Convert.6 [concrete] // CHECK:STDOUT: %Convert.2b5: %Convert.type.70f = struct_value () [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Convert.bound.626: = bound_method %int_4.0c1, %Convert.cb5 [concrete] // CHECK:STDOUT: %C.val.4b6: %C.a67 = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.20f: = impl_witness (imports.%P.import_ref.97a) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.da2: %ImplicitAs.type.5f9 = facet_value %C.a67, (%impl_witness.20f) [concrete] -// CHECK:STDOUT: %.519: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.da2 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.fb0 = impl_witness_table (imports.%P.import_ref.97a), @impl.161 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.087: = impl_witness %ImplicitAs.impl_witness_table.fb0 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.53f: %ImplicitAs.type.5f9 = facet_value %C.a67, (%ImplicitAs.impl_witness.087) [concrete] +// CHECK:STDOUT: %.ec10: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.53f [concrete] // CHECK:STDOUT: %Convert.type.782: type = fn_type @Convert.7 [concrete] // CHECK:STDOUT: %Convert.625: %Convert.type.782 = struct_value () [concrete] // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %Convert.bound.910: = bound_method %int_5.64b, %Convert.cb5 [concrete] // CHECK:STDOUT: %C.val.75e: %C.65c = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.9b3: = impl_witness (imports.%P.import_ref.e04) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.b1d: %ImplicitAs.type.5f9 = facet_value %C.65c, (%impl_witness.9b3) [concrete] -// CHECK:STDOUT: %.359: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.b1d [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.fd6 = impl_witness_table (imports.%P.import_ref.e04), @impl.54a [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.f50: = impl_witness %ImplicitAs.impl_witness_table.fd6 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.3ed: %ImplicitAs.type.5f9 = facet_value %C.65c, (%ImplicitAs.impl_witness.f50) [concrete] +// CHECK:STDOUT: %.c25: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.3ed [concrete] // CHECK:STDOUT: %Convert.type.0e6: type = fn_type @Convert.8 [concrete] // CHECK:STDOUT: %Convert.73d: %Convert.type.0e6 = struct_value () [concrete] // CHECK:STDOUT: %int_6.462: Core.IntLiteral = int_value 6 [concrete] // CHECK:STDOUT: %Convert.bound.e3a: = bound_method %int_6.462, %Convert.cb5 [concrete] // CHECK:STDOUT: %C.val.02a: %C.898 = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.b5b: = impl_witness (imports.%P.import_ref.6aa) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.377: %ImplicitAs.type.5f9 = facet_value %C.898, (%impl_witness.b5b) [concrete] -// CHECK:STDOUT: %.ddb: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.377 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.732 = impl_witness_table (imports.%P.import_ref.6aa), @impl.d71 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.eaa: = impl_witness %ImplicitAs.impl_witness_table.732 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.67f: %ImplicitAs.type.5f9 = facet_value %C.898, (%ImplicitAs.impl_witness.eaa) [concrete] +// CHECK:STDOUT: %.c5c: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.67f [concrete] // CHECK:STDOUT: %Convert.type.9e9: type = fn_type @Convert.9 [concrete] // CHECK:STDOUT: %Convert.e8e: %Convert.type.9e9 = struct_value () [concrete] // CHECK:STDOUT: %int_7.29f: Core.IntLiteral = int_value 7 [concrete] // CHECK:STDOUT: %Convert.bound.06a: = bound_method %int_7.29f, %Convert.cb5 [concrete] // CHECK:STDOUT: %C.val.654: %C.f0a = struct_value () [concrete] -// CHECK:STDOUT: %impl_witness.dfb: = impl_witness (imports.%P.import_ref.243) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.9f4: %ImplicitAs.type.5f9 = facet_value %C.f0a, (%impl_witness.dfb) [concrete] -// CHECK:STDOUT: %.97d: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.9f4 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.c20 = impl_witness_table (imports.%P.import_ref.243), @impl.16b [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.e1e: = impl_witness %ImplicitAs.impl_witness_table.c20 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.ce9: %ImplicitAs.type.5f9 = facet_value %C.f0a, (%ImplicitAs.impl_witness.e1e) [concrete] +// CHECK:STDOUT: %.909: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.ce9 [concrete] // CHECK:STDOUT: %Convert.type.fc1: type = fn_type @Convert.10 [concrete] // CHECK:STDOUT: %Convert.430: %Convert.type.fc1 = struct_value () [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] @@ -1200,31 +1219,31 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc8_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst49 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc9_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %Core.import_ref.de9: = import_ref Core//default, loc12_38, loaded [concrete = constants.%impl_witness.39c] +// CHECK:STDOUT: %Core.import_ref.c62: = import_ref Core//default, loc12_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a] // CHECK:STDOUT: %Core.import_ref.872: type = import_ref Core//default, loc12_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc12_36, loaded [concrete = constants.%ImplicitAs.type.61e] -// CHECK:STDOUT: %P.import_ref.316: = import_ref P//library, loc10_33, loaded [concrete = constants.%impl_witness.368] +// CHECK:STDOUT: %P.import_ref.503: = import_ref P//library, loc10_33, loaded [concrete = constants.%ImplicitAs.impl_witness.6e5] // CHECK:STDOUT: %P.import_ref.624: type = import_ref P//library, loc10_9, loaded [concrete = constants.%C.76d] // CHECK:STDOUT: %P.import_ref.b769fa.1: type = import_ref P//library, loc10_31, loaded [concrete = constants.%ImplicitAs.type.5f9] -// CHECK:STDOUT: %P.import_ref.776: = import_ref P//library, loc11_33, loaded [concrete = constants.%impl_witness.29f] +// CHECK:STDOUT: %P.import_ref.7ac: = import_ref P//library, loc11_33, loaded [concrete = constants.%ImplicitAs.impl_witness.70d] // CHECK:STDOUT: %P.import_ref.8ff: type = import_ref P//library, loc11_9, loaded [concrete = constants.%C.012] // CHECK:STDOUT: %P.import_ref.b769fa.2: type = import_ref P//library, loc11_31, loaded [concrete = constants.%ImplicitAs.type.5f9] -// CHECK:STDOUT: %P.import_ref.848: = import_ref P//library, loc12_33, loaded [concrete = constants.%impl_witness.3ac] +// CHECK:STDOUT: %P.import_ref.255: = import_ref P//library, loc12_33, loaded [concrete = constants.%ImplicitAs.impl_witness.f8e] // CHECK:STDOUT: %P.import_ref.f4d: type = import_ref P//library, loc12_9, loaded [concrete = constants.%C.3e6] // CHECK:STDOUT: %P.import_ref.b769fa.3: type = import_ref P//library, loc12_31, loaded [concrete = constants.%ImplicitAs.type.5f9] -// CHECK:STDOUT: %P.import_ref.036: = import_ref P//library, loc13_33, loaded [concrete = constants.%impl_witness.b40] +// CHECK:STDOUT: %P.import_ref.51a: = import_ref P//library, loc13_33, loaded [concrete = constants.%ImplicitAs.impl_witness.bb8] // CHECK:STDOUT: %P.import_ref.dd2: type = import_ref P//library, loc13_9, loaded [concrete = constants.%C.4d9] // CHECK:STDOUT: %P.import_ref.b769fa.4: type = import_ref P//library, loc13_31, loaded [concrete = constants.%ImplicitAs.type.5f9] -// CHECK:STDOUT: %P.import_ref.e33: = import_ref P//library, loc14_33, loaded [concrete = constants.%impl_witness.20f] +// CHECK:STDOUT: %P.import_ref.7c4: = import_ref P//library, loc14_33, loaded [concrete = constants.%ImplicitAs.impl_witness.087] // CHECK:STDOUT: %P.import_ref.2c7: type = import_ref P//library, loc14_9, loaded [concrete = constants.%C.a67] // CHECK:STDOUT: %P.import_ref.b769fa.5: type = import_ref P//library, loc14_31, loaded [concrete = constants.%ImplicitAs.type.5f9] -// CHECK:STDOUT: %P.import_ref.1aa: = import_ref P//library, loc15_33, loaded [concrete = constants.%impl_witness.9b3] +// CHECK:STDOUT: %P.import_ref.30f: = import_ref P//library, loc15_33, loaded [concrete = constants.%ImplicitAs.impl_witness.f50] // CHECK:STDOUT: %P.import_ref.759: type = import_ref P//library, loc15_9, loaded [concrete = constants.%C.65c] // CHECK:STDOUT: %P.import_ref.b769fa.6: type = import_ref P//library, loc15_31, loaded [concrete = constants.%ImplicitAs.type.5f9] -// CHECK:STDOUT: %P.import_ref.058: = import_ref P//library, loc16_33, loaded [concrete = constants.%impl_witness.b5b] +// CHECK:STDOUT: %P.import_ref.664: = import_ref P//library, loc16_33, loaded [concrete = constants.%ImplicitAs.impl_witness.eaa] // CHECK:STDOUT: %P.import_ref.56e: type = import_ref P//library, loc16_9, loaded [concrete = constants.%C.898] // CHECK:STDOUT: %P.import_ref.b769fa.7: type = import_ref P//library, loc16_31, loaded [concrete = constants.%ImplicitAs.type.5f9] -// CHECK:STDOUT: %P.import_ref.d6f: = import_ref P//library, loc17_33, loaded [concrete = constants.%impl_witness.dfb] +// CHECK:STDOUT: %P.import_ref.322: = import_ref P//library, loc17_33, loaded [concrete = constants.%ImplicitAs.impl_witness.e1e] // CHECK:STDOUT: %P.import_ref.8ba: type = import_ref P//library, loc17_9, loaded [concrete = constants.%C.f0a] // CHECK:STDOUT: %P.import_ref.b769fa.8: type = import_ref P//library, loc17_31, loaded [concrete = constants.%ImplicitAs.type.5f9] // CHECK:STDOUT: %P.Make: %Make.type = import_ref P//library, Make, loaded [concrete = constants.%Make] @@ -1281,47 +1300,47 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.68b: imports.%Core.import_ref.872 as imports.%Core.import_ref.4d9 [from "core.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.de9 +// CHECK:STDOUT: witness = imports.%Core.import_ref.c62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.b24: imports.%P.import_ref.624 as imports.%P.import_ref.b769fa.1 [from "library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%P.import_ref.316 +// CHECK:STDOUT: witness = imports.%P.import_ref.503 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.277: imports.%P.import_ref.8ff as imports.%P.import_ref.b769fa.2 [from "library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%P.import_ref.776 +// CHECK:STDOUT: witness = imports.%P.import_ref.7ac // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.b5f: imports.%P.import_ref.f4d as imports.%P.import_ref.b769fa.3 [from "library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%P.import_ref.848 +// CHECK:STDOUT: witness = imports.%P.import_ref.255 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.90b: imports.%P.import_ref.dd2 as imports.%P.import_ref.b769fa.4 [from "library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%P.import_ref.036 +// CHECK:STDOUT: witness = imports.%P.import_ref.51a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.161: imports.%P.import_ref.2c7 as imports.%P.import_ref.b769fa.5 [from "library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%P.import_ref.e33 +// CHECK:STDOUT: witness = imports.%P.import_ref.7c4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.54a: imports.%P.import_ref.759 as imports.%P.import_ref.b769fa.6 [from "library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%P.import_ref.1aa +// CHECK:STDOUT: witness = imports.%P.import_ref.30f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.d71: imports.%P.import_ref.56e as imports.%P.import_ref.b769fa.7 [from "library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%P.import_ref.058 +// CHECK:STDOUT: witness = imports.%P.import_ref.664 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.16b: imports.%P.import_ref.8ba as imports.%P.import_ref.b769fa.8 [from "library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%P.import_ref.d6f +// CHECK:STDOUT: witness = imports.%P.import_ref.322 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D [from "library.carbon"] { @@ -1359,7 +1378,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc8: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc8_34: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc8_34: %.ec1e = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc8_34: = bound_method %int_0, %impl.elem0.loc8_34 [concrete = constants.%Convert.bound.04a] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32.builtin = call %bound_method.loc8_34(%int_0) [concrete = constants.%int_0.a54] // CHECK:STDOUT: %.loc8_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc8 [concrete = constants.%int_0.a54] @@ -1369,7 +1388,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc8_24.3: init %C.76d = class_init (), %.loc8_24.2 [concrete = constants.%C.val.3c3] // CHECK:STDOUT: %.loc8_24.4: ref %C.76d = temporary %.loc8_24.2, %.loc8_24.3 // CHECK:STDOUT: %.loc8_26.1: ref %C.76d = converted %.loc8_24.1, %.loc8_24.4 -// CHECK:STDOUT: %impl.elem0.loc8_35: %.3f5 = impl_witness_access constants.%impl_witness.368, element0 [concrete = constants.%Convert.4f5] +// CHECK:STDOUT: %impl.elem0.loc8_35: %.18d = impl_witness_access constants.%ImplicitAs.impl_witness.6e5, element0 [concrete = constants.%Convert.4f5] // CHECK:STDOUT: %bound_method.loc8_35: = bound_method %.loc8_26.1, %impl.elem0.loc8_35 // CHECK:STDOUT: %.loc8_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc8_26.2: %C.76d = bind_value %.loc8_26.1 @@ -1386,7 +1405,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc9: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc9_34: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc9_34: %.ec1e = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc9_34: = bound_method %int_1, %impl.elem0.loc9_34 [concrete = constants.%Convert.bound.92d] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32.builtin = call %bound_method.loc9_34(%int_1) [concrete = constants.%int_1.f38] // CHECK:STDOUT: %.loc9_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc9 [concrete = constants.%int_1.f38] @@ -1396,7 +1415,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc9_24.3: init %C.012 = class_init (), %.loc9_24.2 [concrete = constants.%C.val.172] // CHECK:STDOUT: %.loc9_24.4: ref %C.012 = temporary %.loc9_24.2, %.loc9_24.3 // CHECK:STDOUT: %.loc9_26.1: ref %C.012 = converted %.loc9_24.1, %.loc9_24.4 -// CHECK:STDOUT: %impl.elem0.loc9_35: %.a31 = impl_witness_access constants.%impl_witness.29f, element0 [concrete = constants.%Convert.ecc] +// CHECK:STDOUT: %impl.elem0.loc9_35: %.d7a = impl_witness_access constants.%ImplicitAs.impl_witness.70d, element0 [concrete = constants.%Convert.ecc] // CHECK:STDOUT: %bound_method.loc9_35: = bound_method %.loc9_26.1, %impl.elem0.loc9_35 // CHECK:STDOUT: %.loc9_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc9_26.2: %C.012 = bind_value %.loc9_26.1 @@ -1413,7 +1432,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc10: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc10_34: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc10_34: %.ec1e = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc10_34: = bound_method %int_2, %impl.elem0.loc10_34 [concrete = constants.%Convert.bound.1b9] // CHECK:STDOUT: %int.convert_checked.loc10: init %i32.builtin = call %bound_method.loc10_34(%int_2) [concrete = constants.%int_2.5a1] // CHECK:STDOUT: %.loc10_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc10 [concrete = constants.%int_2.5a1] @@ -1423,7 +1442,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc10_24.3: init %C.3e6 = class_init (), %.loc10_24.2 [concrete = constants.%C.val.418] // CHECK:STDOUT: %.loc10_24.4: ref %C.3e6 = temporary %.loc10_24.2, %.loc10_24.3 // CHECK:STDOUT: %.loc10_26.1: ref %C.3e6 = converted %.loc10_24.1, %.loc10_24.4 -// CHECK:STDOUT: %impl.elem0.loc10_35: %.fa2 = impl_witness_access constants.%impl_witness.3ac, element0 [concrete = constants.%Convert.c2b] +// CHECK:STDOUT: %impl.elem0.loc10_35: %.e6a = impl_witness_access constants.%ImplicitAs.impl_witness.f8e, element0 [concrete = constants.%Convert.c2b] // CHECK:STDOUT: %bound_method.loc10_35: = bound_method %.loc10_26.1, %impl.elem0.loc10_35 // CHECK:STDOUT: %.loc10_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc10_26.2: %C.3e6 = bind_value %.loc10_26.1 @@ -1440,7 +1459,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc11: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc11_34: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc11_34: %.ec1e = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc11_34: = bound_method %int_3, %impl.elem0.loc11_34 [concrete = constants.%Convert.bound.b6b] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32.builtin = call %bound_method.loc11_34(%int_3) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc11_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc11 [concrete = constants.%int_3.a0f] @@ -1450,7 +1469,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc11_24.3: init %C.4d9 = class_init (), %.loc11_24.2 [concrete = constants.%C.val.bba] // CHECK:STDOUT: %.loc11_24.4: ref %C.4d9 = temporary %.loc11_24.2, %.loc11_24.3 // CHECK:STDOUT: %.loc11_26.1: ref %C.4d9 = converted %.loc11_24.1, %.loc11_24.4 -// CHECK:STDOUT: %impl.elem0.loc11_35: %.f5d = impl_witness_access constants.%impl_witness.b40, element0 [concrete = constants.%Convert.2b5] +// CHECK:STDOUT: %impl.elem0.loc11_35: %.40b = impl_witness_access constants.%ImplicitAs.impl_witness.bb8, element0 [concrete = constants.%Convert.2b5] // CHECK:STDOUT: %bound_method.loc11_35: = bound_method %.loc11_26.1, %impl.elem0.loc11_35 // CHECK:STDOUT: %.loc11_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc11_26.2: %C.4d9 = bind_value %.loc11_26.1 @@ -1467,7 +1486,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc12: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc12_34: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc12_34: %.ec1e = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc12_34: = bound_method %int_4, %impl.elem0.loc12_34 [concrete = constants.%Convert.bound.626] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32.builtin = call %bound_method.loc12_34(%int_4) [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc12_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc12 [concrete = constants.%int_4.4f1] @@ -1477,7 +1496,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc12_24.3: init %C.a67 = class_init (), %.loc12_24.2 [concrete = constants.%C.val.4b6] // CHECK:STDOUT: %.loc12_24.4: ref %C.a67 = temporary %.loc12_24.2, %.loc12_24.3 // CHECK:STDOUT: %.loc12_26.1: ref %C.a67 = converted %.loc12_24.1, %.loc12_24.4 -// CHECK:STDOUT: %impl.elem0.loc12_35: %.519 = impl_witness_access constants.%impl_witness.20f, element0 [concrete = constants.%Convert.625] +// CHECK:STDOUT: %impl.elem0.loc12_35: %.ec10 = impl_witness_access constants.%ImplicitAs.impl_witness.087, element0 [concrete = constants.%Convert.625] // CHECK:STDOUT: %bound_method.loc12_35: = bound_method %.loc12_26.1, %impl.elem0.loc12_35 // CHECK:STDOUT: %.loc12_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc12_26.2: %C.a67 = bind_value %.loc12_26.1 @@ -1494,7 +1513,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc13: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc13_34: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc13_34: %.ec1e = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc13_34: = bound_method %int_5, %impl.elem0.loc13_34 [concrete = constants.%Convert.bound.910] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32.builtin = call %bound_method.loc13_34(%int_5) [concrete = constants.%int_5.967] // CHECK:STDOUT: %.loc13_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc13 [concrete = constants.%int_5.967] @@ -1504,7 +1523,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc13_24.3: init %C.65c = class_init (), %.loc13_24.2 [concrete = constants.%C.val.75e] // CHECK:STDOUT: %.loc13_24.4: ref %C.65c = temporary %.loc13_24.2, %.loc13_24.3 // CHECK:STDOUT: %.loc13_26.1: ref %C.65c = converted %.loc13_24.1, %.loc13_24.4 -// CHECK:STDOUT: %impl.elem0.loc13_35: %.359 = impl_witness_access constants.%impl_witness.9b3, element0 [concrete = constants.%Convert.73d] +// CHECK:STDOUT: %impl.elem0.loc13_35: %.c25 = impl_witness_access constants.%ImplicitAs.impl_witness.f50, element0 [concrete = constants.%Convert.73d] // CHECK:STDOUT: %bound_method.loc13_35: = bound_method %.loc13_26.1, %impl.elem0.loc13_35 // CHECK:STDOUT: %.loc13_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc13_26.2: %C.65c = bind_value %.loc13_26.1 @@ -1521,7 +1540,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc14: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] -// CHECK:STDOUT: %impl.elem0.loc14_34: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc14_34: %.ec1e = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc14_34: = bound_method %int_6, %impl.elem0.loc14_34 [concrete = constants.%Convert.bound.e3a] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32.builtin = call %bound_method.loc14_34(%int_6) [concrete = constants.%int_6.ec5] // CHECK:STDOUT: %.loc14_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc14 [concrete = constants.%int_6.ec5] @@ -1531,7 +1550,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc14_24.3: init %C.898 = class_init (), %.loc14_24.2 [concrete = constants.%C.val.02a] // CHECK:STDOUT: %.loc14_24.4: ref %C.898 = temporary %.loc14_24.2, %.loc14_24.3 // CHECK:STDOUT: %.loc14_26.1: ref %C.898 = converted %.loc14_24.1, %.loc14_24.4 -// CHECK:STDOUT: %impl.elem0.loc14_35: %.ddb = impl_witness_access constants.%impl_witness.b5b, element0 [concrete = constants.%Convert.e8e] +// CHECK:STDOUT: %impl.elem0.loc14_35: %.c5c = impl_witness_access constants.%ImplicitAs.impl_witness.eaa, element0 [concrete = constants.%Convert.e8e] // CHECK:STDOUT: %bound_method.loc14_35: = bound_method %.loc14_26.1, %impl.elem0.loc14_35 // CHECK:STDOUT: %.loc14_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc14_26.2: %C.898 = bind_value %.loc14_26.1 @@ -1548,7 +1567,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc15: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc15: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] -// CHECK:STDOUT: %impl.elem0.loc15_34: %.5e0 = impl_witness_access constants.%impl_witness.39c, element0 [concrete = constants.%Convert.cb5] +// CHECK:STDOUT: %impl.elem0.loc15_34: %.ec1e = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] // CHECK:STDOUT: %bound_method.loc15_34: = bound_method %int_7, %impl.elem0.loc15_34 [concrete = constants.%Convert.bound.06a] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32.builtin = call %bound_method.loc15_34(%int_7) [concrete = constants.%int_7.6ae] // CHECK:STDOUT: %.loc15_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc15 [concrete = constants.%int_7.6ae] @@ -1558,7 +1577,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc15_24.3: init %C.f0a = class_init (), %.loc15_24.2 [concrete = constants.%C.val.654] // CHECK:STDOUT: %.loc15_24.4: ref %C.f0a = temporary %.loc15_24.2, %.loc15_24.3 // CHECK:STDOUT: %.loc15_26.1: ref %C.f0a = converted %.loc15_24.1, %.loc15_24.4 -// CHECK:STDOUT: %impl.elem0.loc15_35: %.97d = impl_witness_access constants.%impl_witness.dfb, element0 [concrete = constants.%Convert.430] +// CHECK:STDOUT: %impl.elem0.loc15_35: %.909 = impl_witness_access constants.%ImplicitAs.impl_witness.e1e, element0 [concrete = constants.%Convert.430] // CHECK:STDOUT: %bound_method.loc15_35: = bound_method %.loc15_26.1, %impl.elem0.loc15_35 // CHECK:STDOUT: %.loc15_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc15_26.2: %C.f0a = bind_value %.loc15_26.1 diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 37d16f2220c7..f1c677734b4a 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -39,11 +39,12 @@ fn G() -> i32 { // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -127,7 +128,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc17_43.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc17_43.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_43.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_43.1: = bound_method %int_1, %impl.elem0.loc17_43.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc17_43.1: = specific_function %impl.elem0.loc17_43.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_43.2: = bound_method %int_1, %specific_fn.loc17_43.1 [concrete = constants.%bound_method.9a1] @@ -135,7 +136,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc17_43.2: init %i32 = converted %int_1, %int.convert_checked.loc17_43.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_43.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc17_43.4: init %i32 = initialize_from %.loc17_43.2 to %.loc17_43.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_43.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc17_43.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_43.3: = bound_method %int_2, %impl.elem0.loc17_43.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc17_43.2: = specific_function %impl.elem0.loc17_43.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_43.4: = bound_method %int_2, %specific_fn.loc17_43.2 [concrete = constants.%bound_method.b92] @@ -159,7 +160,7 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %result.var: ref %i32 = var result // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 3fd04727cecc..615b013fc9ea 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -38,11 +38,12 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -115,7 +116,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc13: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_14.1: = bound_method %int_0.loc13, %impl.elem0.loc13 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_14.2: = bound_method %int_0.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.b6e] @@ -140,7 +141,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc16: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_14.1: = bound_method %int_1, %impl.elem0.loc16 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_14.2: = bound_method %int_1, %specific_fn.loc16 [concrete = constants.%bound_method.9a1] @@ -156,7 +157,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc15: // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc18: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_11.1: = bound_method %int_0.loc18, %impl.elem0.loc18 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_11.2: = bound_method %int_0.loc18, %specific_fn.loc18 [concrete = constants.%bound_method.b6e] @@ -178,7 +179,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc23: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc23_14.1: = bound_method %int_0, %impl.elem0.loc23 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_14.2: = bound_method %int_0, %specific_fn.loc23 [concrete = constants.%bound_method.b6e] @@ -200,7 +201,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc26: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_12.1: = bound_method %int_1, %impl.elem0.loc26 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_12.2: = bound_method %int_1, %specific_fn.loc26 [concrete = constants.%bound_method.9a1] diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index dd515177872a..2d7f0ac5375d 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -24,11 +24,12 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: %struct_type.a.a6c: type = struct_type {.a: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1ba, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] @@ -67,7 +68,7 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc12_17.1: %struct_type.a.a6c = struct_literal (%int_3) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_17.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_17.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index 9a026d34525c..b9fe3468cf95 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -27,11 +27,12 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.75f: = bound_method %int_15.447, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.984: = bound_method %int_15.447, %Convert.specific_fn [concrete] @@ -77,7 +78,7 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [concrete = constants.%int_15.447] // CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [concrete = constants.%int_35.c79] // CHECK:STDOUT: %.loc13_17.1: %tuple.type.f94 = tuple_literal (%int_15, %int_35) -// CHECK:STDOUT: %impl.elem0.loc13_17.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_17.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_17.1: = bound_method %int_15, %impl.elem0.loc13_17.1 [concrete = constants.%Convert.bound.75f] // CHECK:STDOUT: %specific_fn.loc13_17.1: = specific_function %impl.elem0.loc13_17.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_17.2: = bound_method %int_15, %specific_fn.loc13_17.1 [concrete = constants.%bound_method.984] @@ -85,7 +86,7 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %.loc13_17.2: init %i32 = converted %int_15, %int.convert_checked.loc13_17.1 [concrete = constants.%int_15.7f7] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return, element0 // CHECK:STDOUT: %.loc13_17.3: init %i32 = initialize_from %.loc13_17.2 to %tuple.elem0 [concrete = constants.%int_15.7f7] -// CHECK:STDOUT: %impl.elem0.loc13_17.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc13_17.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_17.3: = bound_method %int_35, %impl.elem0.loc13_17.2 [concrete = constants.%Convert.bound.76a] // CHECK:STDOUT: %specific_fn.loc13_17.2: = specific_function %impl.elem0.loc13_17.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_17.4: = bound_method %int_35, %specific_fn.loc13_17.2 [concrete = constants.%bound_method.231] diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index 0ce34aea8cef..a04091259eb8 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -22,11 +22,12 @@ fn Main() -> i32 { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -62,7 +63,7 @@ fn Main() -> i32 { // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index 27957c9d2efa..62c822370559 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -25,11 +25,12 @@ var y: i32 = x.b; // CHECK:STDOUT: %struct_type.a.a6c: type = struct_type {.a: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] @@ -80,7 +81,7 @@ var y: i32 = x.b; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc11_27.1: %struct_type.a.a6c = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 528a63c3c213..ea53e83c3f83 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -62,11 +62,12 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %struct_type.a.a6c: type = struct_type {.a: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -172,14 +173,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc9_28.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_28.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_28.1: = bound_method %int_1, %impl.elem0.loc9_28.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc9_28.1: = specific_function %impl.elem0.loc9_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_28.2: = bound_method %int_1, %specific_fn.loc9_28.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %bound_method.loc9_28.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_28.2: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_28.3: %i32 = converted %int_1, %.loc9_28.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc9_28.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_28.3: = bound_method %int_2, %impl.elem0.loc9_28.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc9_28.2: = specific_function %impl.elem0.loc9_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_28.4: = bound_method %int_2, %specific_fn.loc9_28.2 [concrete = constants.%bound_method.b92] @@ -216,7 +217,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc4_31.1: %struct_type.a.a6c = struct_literal (%int_0.loc4) -// CHECK:STDOUT: %impl.elem0.loc4: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc4: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_31.1: = bound_method %int_0.loc4, %impl.elem0.loc4 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_31.2: = bound_method %int_0.loc4, %specific_fn.loc4 [concrete = constants.%bound_method.b6e] @@ -231,7 +232,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_29.1: %struct_type.b.c.9af = struct_literal (%int_0.loc6_17, %.loc6_28.1) // CHECK:STDOUT: %int_0.loc6_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc6_38.1: %struct_type.a.d.b82 = struct_literal (%.loc6_29.1, %int_0.loc6_37) -// CHECK:STDOUT: %impl.elem0.loc6_29: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6_29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_29.1: = bound_method %int_0.loc6_17, %impl.elem0.loc6_29 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc6_29: = specific_function %impl.elem0.loc6_29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_29.2: = bound_method %int_0.loc6_17, %specific_fn.loc6_29 [concrete = constants.%bound_method.b6e] @@ -240,7 +241,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_38.2: ref %struct_type.b.c.929 = struct_access file.%b_ref.var, element0 // CHECK:STDOUT: %.loc6_29.3: ref %i32 = struct_access %.loc6_38.2, element0 // CHECK:STDOUT: %.loc6_29.4: init %i32 = initialize_from %.loc6_29.2 to %.loc6_29.3 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc6_28: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6_28: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_28.1: = bound_method %int_0.loc6_26, %impl.elem0.loc6_28 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc6_28: = specific_function %impl.elem0.loc6_28, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_28.2: = bound_method %int_0.loc6_26, %specific_fn.loc6_28 [concrete = constants.%bound_method.b6e] @@ -252,7 +253,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_29.7: init %tuple.type.a1c = initialize_from %.loc6_29.6 to %.loc6_29.5 [concrete = constants.%tuple] // CHECK:STDOUT: %.loc6_29.8: init %struct_type.b.c.929 = struct_init (%.loc6_29.4, %.loc6_29.7) to %.loc6_38.2 [concrete = constants.%struct.381] // CHECK:STDOUT: %.loc6_38.3: init %struct_type.b.c.929 = converted %.loc6_29.1, %.loc6_29.8 [concrete = constants.%struct.381] -// CHECK:STDOUT: %impl.elem0.loc6_38: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc6_38: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_38.1: = bound_method %int_0.loc6_37, %impl.elem0.loc6_38 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc6_38: = specific_function %impl.elem0.loc6_38, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_38.2: = bound_method %int_0.loc6_37, %specific_fn.loc6_38 [concrete = constants.%bound_method.b6e] @@ -279,6 +280,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (imports.%Implicit.import_ref.773), @impl.a8d [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [concrete] @@ -298,11 +300,11 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.b9e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.ea0: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.847: = impl_witness (imports.%Implicit.import_ref.773), @impl.a8d(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness %ImplicitAs.impl_witness_table.1ad, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.2, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.4cb: %Convert.type.e14 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%impl_witness.847) [concrete] -// CHECK:STDOUT: %.419: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] +// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.dc5: = bound_method %int_1.5b8, %Convert.4cb [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c37: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -329,7 +331,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import_ref.c81: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1143 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1160 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -385,14 +387,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc6_25.1: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0.loc6_25.1: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc6_25.1: = bound_method %int_1, %impl.elem0.loc6_25.1 [concrete = constants.%Convert.bound.dc5] // CHECK:STDOUT: %specific_fn.loc6_25.1: = specific_function %impl.elem0.loc6_25.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_25.2: = bound_method %int_1, %specific_fn.loc6_25.1 [concrete = constants.%bound_method.c37] // CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %bound_method.loc6_25.2(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc6_25.2: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc6_25.3: %i32 = converted %int_1, %.loc6_25.2 [concrete = constants.%int_1.47b] -// CHECK:STDOUT: %impl.elem0.loc6_25.2: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0.loc6_25.2: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc6_25.3: = bound_method %int_2, %impl.elem0.loc6_25.2 [concrete = constants.%Convert.bound.30f] // CHECK:STDOUT: %specific_fn.loc6_25.2: = specific_function %impl.elem0.loc6_25.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_25.4: = bound_method %int_2, %specific_fn.loc6_25.2 [concrete = constants.%bound_method.62b] @@ -506,7 +508,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import_ref.c81: %struct_type.a.b = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1143 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1160 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -575,6 +577,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: --- fail_bad_value.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (imports.%Implicit.import_ref.773), @impl.a8d [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] @@ -589,11 +592,11 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.b9e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.ea0: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.847: = impl_witness (imports.%Implicit.import_ref.773), @impl.a8d(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness %ImplicitAs.impl_witness_table.1ad, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.2, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.4cb: %Convert.type.e14 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%impl_witness.847) [concrete] -// CHECK:STDOUT: %.419: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] +// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.a00: = bound_method %int_3.1ba, %Convert.4cb [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.fc5: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] @@ -623,7 +626,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import_ref.c81: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1143 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1160 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -648,14 +651,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc10_29.1: %struct_type.a.b.cfd = struct_literal (%int_3, %int_4) -// CHECK:STDOUT: %impl.elem0.loc10_29.1: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0.loc10_29.1: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc10_29.1: = bound_method %int_3, %impl.elem0.loc10_29.1 [concrete = constants.%Convert.bound.a00] // CHECK:STDOUT: %specific_fn.loc10_29.1: = specific_function %impl.elem0.loc10_29.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_29.2: = bound_method %int_3, %specific_fn.loc10_29.1 [concrete = constants.%bound_method.fc5] // CHECK:STDOUT: %int.convert_checked.loc10_29.1: init %i32 = call %bound_method.loc10_29.2(%int_3) [concrete = constants.%int_3.d47] // CHECK:STDOUT: %.loc10_29.2: %i32 = value_of_initializer %int.convert_checked.loc10_29.1 [concrete = constants.%int_3.d47] // CHECK:STDOUT: %.loc10_29.3: %i32 = converted %int_3, %.loc10_29.2 [concrete = constants.%int_3.d47] -// CHECK:STDOUT: %impl.elem0.loc10_29.2: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0.loc10_29.2: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc10_29.3: = bound_method %int_4, %impl.elem0.loc10_29.2 [concrete = constants.%Convert.bound.694] // CHECK:STDOUT: %specific_fn.loc10_29.2: = specific_function %impl.elem0.loc10_29.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_29.4: = bound_method %int_4, %specific_fn.loc10_29.2 [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index fd7b2bc97e49..55f0534df545 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -26,11 +26,12 @@ var z: i32 = y; // CHECK:STDOUT: %struct_type.a.b.fbb: type = struct_type {.a: f64, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -100,7 +101,7 @@ var z: i32 = y; // CHECK:STDOUT: %.loc11_46.1: %struct_type.a.b.fbb = struct_literal (%float, %int_1) // CHECK:STDOUT: %.loc11_46.2: ref f64 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_46.3: init f64 = initialize_from %float to %.loc11_46.2 [concrete = constants.%float] -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_46.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_46.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 1648e10e99fa..dd185d2f1c75 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -21,11 +21,12 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %struct_type.a.a6c: type = struct_type {.a: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] @@ -77,7 +78,7 @@ var y: {.a: i32} = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc11_27.1: %struct_type.a.a6c = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/partially_const.carbon b/toolchain/check/testdata/struct/partially_const.carbon index f159f0daa5fb..a7f090870d25 100644 --- a/toolchain/check/testdata/struct/partially_const.carbon +++ b/toolchain/check/testdata/struct/partially_const.carbon @@ -24,11 +24,12 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %struct_type.a.b.c.1ee: type = struct_type {.a: Core.IntLiteral, .b: %i32, .c: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -80,7 +81,7 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %int_0.loc12_32: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc12_33.1: %struct_type.a.b.c.1ee = struct_literal (%int_0.loc12_16, %n.ref, %int_0.loc12_32) -// CHECK:STDOUT: %impl.elem0.loc12_33.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_33.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_33.1: = bound_method %int_0.loc12_16, %impl.elem0.loc12_33.1 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc12_33.1: = specific_function %impl.elem0.loc12_33.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_33.2: = bound_method %int_0.loc12_16, %specific_fn.loc12_33.1 [concrete = constants.%bound_method] @@ -90,7 +91,7 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %.loc12_33.4: init %i32 = initialize_from %.loc12_33.2 to %.loc12_33.3 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc12_33.5: ref %i32 = struct_access %return, element1 // CHECK:STDOUT: %.loc12_33.6: init %i32 = initialize_from %n.ref to %.loc12_33.5 -// CHECK:STDOUT: %impl.elem0.loc12_33.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12_33.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_33.3: = bound_method %int_0.loc12_32, %impl.elem0.loc12_33.2 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc12_33.2: = specific_function %impl.elem0.loc12_33.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_33.4: = bound_method %int_0.loc12_32, %specific_fn.loc12_33.2 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index a75b43714fcd..7f7e3a8195b7 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -25,11 +25,12 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %struct_type.a.b.057: type = struct_type {.a: Core.IntLiteral, .b: %tuple.type.985} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -95,7 +96,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc11_49.1: %tuple.type.985 = tuple_literal (%int_2) // CHECK:STDOUT: %.loc11_50.1: %struct_type.a.b.057 = struct_literal (%int_1, %.loc11_49.1) -// CHECK:STDOUT: %impl.elem0.loc11_50: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_50: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_50.1: = bound_method %int_1, %impl.elem0.loc11_50 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11_50: = specific_function %impl.elem0.loc11_50, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_50.2: = bound_method %int_1, %specific_fn.loc11_50 [concrete = constants.%bound_method.9a1] @@ -103,7 +104,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc11_50.2: init %i32 = converted %int_1, %int.convert_checked.loc11_50 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc11_50.3: ref %i32 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_50.4: init %i32 = initialize_from %.loc11_50.2 to %.loc11_50.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_49: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_49: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_49.1: = bound_method %int_2, %impl.elem0.loc11_49 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_49: = specific_function %impl.elem0.loc11_49, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_49.2: = bound_method %int_2, %specific_fn.loc11_49 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index 7d2176bab58c..2629fe442c49 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -25,11 +25,12 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -68,14 +69,14 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.501] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc11_44.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_44.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_44.1: = bound_method @__global_init.%int_1.loc11, %impl.elem0.loc11_44.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc11_44.1: = specific_function %impl.elem0.loc11_44.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_44.2: = bound_method @__global_init.%int_1.loc11, %specific_fn.loc11_44.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc11_44.1: init %i32 = call %bound_method.loc11_44.2(@__global_init.%int_1.loc11) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc11_44.1: %i32 = value_of_initializer %int.convert_checked.loc11_44.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc11_44.2: %i32 = converted @__global_init.%int_1.loc11, %.loc11_44.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_44.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_44.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_44.3: = bound_method @__global_init.%int_2.loc11, %impl.elem0.loc11_44.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_44.2: = specific_function %impl.elem0.loc11_44.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_44.4: = bound_method @__global_init.%int_2.loc11, %specific_fn.loc11_44.2 [concrete = constants.%bound_method.b92] @@ -133,7 +134,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc14_44.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc14, %int_2.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_44.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_44.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_44.1: = bound_method %int_1.loc14, %impl.elem0.loc14_44.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc14_44.1: = specific_function %impl.elem0.loc14_44.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_44.2: = bound_method %int_1.loc14, %specific_fn.loc14_44.1 [concrete = constants.%bound_method.9a1] @@ -141,7 +142,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc14_44.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_44.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_44.3: ref %i32 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc14_44.4: init %i32 = initialize_from %.loc14_44.2 to %.loc14_44.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_44.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_44.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_44.3: = bound_method %int_2.loc14, %impl.elem0.loc14_44.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc14_44.2: = specific_function %impl.elem0.loc14_44.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_44.4: = bound_method %int_2.loc14, %specific_fn.loc14_44.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/tuple/access/element_access.carbon b/toolchain/check/testdata/tuple/access/element_access.carbon index 204cf9d22c20..02a65f137b25 100644 --- a/toolchain/check/testdata/tuple/access/element_access.carbon +++ b/toolchain/check/testdata/tuple/access/element_access.carbon @@ -23,11 +23,12 @@ var c: i32 = b.0; // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -93,7 +94,7 @@ var c: i32 = b.0; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %.loc11_21.1: %tuple.type.985 = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_21.1: = bound_method %int_12, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_21.2: = bound_method %int_12, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/tuple/access/fail_access_error.carbon b/toolchain/check/testdata/tuple/access/fail_access_error.carbon index 034ae27e266f..9aa3f82112fa 100644 --- a/toolchain/check/testdata/tuple/access/fail_access_error.carbon +++ b/toolchain/check/testdata/tuple/access/fail_access_error.carbon @@ -27,11 +27,12 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -90,7 +91,7 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.f94 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11_27.1: = specific_function %impl.elem0.loc11_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_12, %specific_fn.loc11_27.1 [concrete = constants.%bound_method.dae] @@ -98,7 +99,7 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.3: = bound_method %int_6, %impl.elem0.loc11_27.2 [concrete = constants.%Convert.bound.ce9] // CHECK:STDOUT: %specific_fn.loc11_27.2: = specific_function %impl.elem0.loc11_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.4: = bound_method %int_6, %specific_fn.loc11_27.2 [concrete = constants.%bound_method.efa] diff --git a/toolchain/check/testdata/tuple/access/fail_large_index.carbon b/toolchain/check/testdata/tuple/access/fail_large_index.carbon index ecf8e359b68d..e78f821d44e1 100644 --- a/toolchain/check/testdata/tuple/access/fail_large_index.carbon +++ b/toolchain/check/testdata/tuple/access/fail_large_index.carbon @@ -32,11 +32,12 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -114,7 +115,7 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %.loc11_21.1: %tuple.type.985 = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_21.1: = bound_method %int_12, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_21.2: = bound_method %int_12, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index d1d33cb153b8..ad33f0e2547c 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -27,12 +27,13 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -43,9 +44,10 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %tuple: %tuple.type.d07 = tuple_value (%int_12.1e1, %int_6.e56) [concrete] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete] // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.13 [concrete] -// CHECK:STDOUT: %impl_witness.0f6: = impl_witness (imports.%Core.import_ref.c15) [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%impl_witness.0f6) [concrete] -// CHECK:STDOUT: %.690: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.impl_witness_table.e09 = impl_witness_table (imports.%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Negate.impl_witness.561: = impl_witness %Negate.impl_witness_table.e09 [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.561) [concrete] +// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] // CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.14 [concrete] // CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %int_10, %Op.bba [concrete] @@ -100,7 +102,7 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.f94 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11_27.1: = specific_function %impl.elem0.loc11_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_12, %specific_fn.loc11_27.1 [concrete = constants.%bound_method.dae] @@ -108,7 +110,7 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.3: = bound_method %int_6, %impl.elem0.loc11_27.2 [concrete = constants.%Convert.bound.ce9] // CHECK:STDOUT: %specific_fn.loc11_27.2: = specific_function %impl.elem0.loc11_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.4: = bound_method %int_6, %specific_fn.loc11_27.2 [concrete = constants.%bound_method.efa] @@ -121,7 +123,7 @@ var b: i32 = a.(-10); // CHECK:STDOUT: assign file.%a.var, %.loc11_1 // CHECK:STDOUT: %a.ref: ref %tuple.type.d07 = name_ref a, file.%a // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] -// CHECK:STDOUT: %impl.elem0.loc16: %.690 = impl_witness_access constants.%impl_witness.0f6, element0 [concrete = constants.%Op.bba] +// CHECK:STDOUT: %impl.elem0.loc16: %.63a = impl_witness_access constants.%Negate.impl_witness.561, element0 [concrete = constants.%Op.bba] // CHECK:STDOUT: %bound_method.loc16: = bound_method %int_10, %impl.elem0.loc16 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc16(%int_10) [concrete = constants.%int_-10] // CHECK:STDOUT: %.loc16_17.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-10] diff --git a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon index f90c17541268..9b0db45166c7 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon @@ -28,11 +28,12 @@ var c: i32 = a.(b); // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] @@ -105,7 +106,7 @@ var c: i32 = a.(b); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc11_26.1: %tuple.type.f94 = tuple_literal (%int_2, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_26.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_26.1: = bound_method %int_2, %impl.elem0.loc11_26.1 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc11_26.1: = specific_function %impl.elem0.loc11_26.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_26.2: = bound_method %int_2, %specific_fn.loc11_26.1 [concrete = constants.%bound_method.b92] @@ -113,7 +114,7 @@ var c: i32 = a.(b); // CHECK:STDOUT: %.loc11_26.2: init %i32 = converted %int_2, %int.convert_checked.loc11_26.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_26.3: init %i32 = initialize_from %.loc11_26.2 to %tuple.elem0 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc11_26.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_26.3: = bound_method %int_3, %impl.elem0.loc11_26.2 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc11_26.2: = specific_function %impl.elem0.loc11_26.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_26.4: = bound_method %int_3, %specific_fn.loc11_26.2 [concrete = constants.%bound_method.047] @@ -125,7 +126,7 @@ var c: i32 = a.(b); // CHECK:STDOUT: %.loc11_1: init %tuple.type.d07 = converted %.loc11_26.1, %.loc11_26.6 [concrete = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_1 // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc12: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_1.1: = bound_method %int_0, %impl.elem0.loc12 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_1.2: = bound_method %int_0, %specific_fn.loc12 [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon index 2540ebabc616..fe9498f7de37 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -30,11 +30,12 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -93,7 +94,7 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.f94 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11_27.1: = specific_function %impl.elem0.loc11_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_12, %specific_fn.loc11_27.1 [concrete = constants.%bound_method.dae] @@ -101,7 +102,7 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.3: = bound_method %int_6, %impl.elem0.loc11_27.2 [concrete = constants.%Convert.bound.ce9] // CHECK:STDOUT: %specific_fn.loc11_27.2: = specific_function %impl.elem0.loc11_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.4: = bound_method %int_6, %specific_fn.loc11_27.2 [concrete = constants.%bound_method.efa] diff --git a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon index eec7430175f3..1889786206a4 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon @@ -38,11 +38,12 @@ fn Main() { // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] @@ -81,7 +82,7 @@ fn Main() { // CHECK:STDOUT: %int_5.loc18_35: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %int_5.loc18_38: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %.loc18_39.1: %tuple.type = tuple_literal (%int_5.loc18_35, %int_5.loc18_38) -// CHECK:STDOUT: %impl.elem0.loc18_39.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18_39.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_39.1: = bound_method %int_5.loc18_35, %impl.elem0.loc18_39.1 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc18_39.1: = specific_function %impl.elem0.loc18_39.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_39.2: = bound_method %int_5.loc18_35, %specific_fn.loc18_39.1 [concrete = constants.%bound_method] @@ -90,7 +91,7 @@ fn Main() { // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc18_39.3: ref %i32 = array_index %non_tuple.var, %int_0.loc18 // CHECK:STDOUT: %.loc18_39.4: init %i32 = initialize_from %.loc18_39.2 to %.loc18_39.3 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %impl.elem0.loc18_39.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18_39.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_39.3: = bound_method %int_5.loc18_38, %impl.elem0.loc18_39.2 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn.loc18_39.2: = specific_function %impl.elem0.loc18_39.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_39.4: = bound_method %int_5.loc18_38, %specific_fn.loc18_39.2 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon index 161db0e52617..8c0a77ba0ec0 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon @@ -27,11 +27,12 @@ var b: i32 = a.2; // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -90,7 +91,7 @@ var b: i32 = a.2; // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.f94 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11_27.1: = specific_function %impl.elem0.loc11_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_12, %specific_fn.loc11_27.1 [concrete = constants.%bound_method.dae] @@ -98,7 +99,7 @@ var b: i32 = a.2; // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_27.3: = bound_method %int_6, %impl.elem0.loc11_27.2 [concrete = constants.%Convert.bound.ce9] // CHECK:STDOUT: %specific_fn.loc11_27.2: = specific_function %impl.elem0.loc11_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_27.4: = bound_method %int_6, %specific_fn.loc11_27.2 [concrete = constants.%bound_method.efa] diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon index e779ba8eb255..0c14e4d9f9c6 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon @@ -27,11 +27,12 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -92,7 +93,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [concrete = constants.%int_34.3f9] // CHECK:STDOUT: %.loc11_28.1: %tuple.type.f94 = tuple_literal (%int_12, %int_34) -// CHECK:STDOUT: %impl.elem0.loc11_28.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_28.1: = bound_method %int_12, %impl.elem0.loc11_28.1 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11_28.1: = specific_function %impl.elem0.loc11_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_28.2: = bound_method %int_12, %specific_fn.loc11_28.1 [concrete = constants.%bound_method.dae] @@ -100,7 +101,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %.loc11_28.2: init %i32 = converted %int_12, %int.convert_checked.loc11_28.1 [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_28.3: init %i32 = initialize_from %.loc11_28.2 to %tuple.elem0 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc11_28.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_28.3: = bound_method %int_34, %impl.elem0.loc11_28.2 [concrete = constants.%Convert.bound.82c] // CHECK:STDOUT: %specific_fn.loc11_28.2: = specific_function %impl.elem0.loc11_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_28.4: = bound_method %int_34, %specific_fn.loc11_28.2 [concrete = constants.%bound_method.34d] diff --git a/toolchain/check/testdata/tuple/access/index_not_literal.carbon b/toolchain/check/testdata/tuple/access/index_not_literal.carbon index f06c45b12fb3..5302d42ccb57 100644 --- a/toolchain/check/testdata/tuple/access/index_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/index_not_literal.carbon @@ -27,13 +27,16 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %tuple.type.3c2: type = tuple_type (bool, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (imports.%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness_table.eb4 = impl_witness_table (imports.%Core.import_ref.78a), @impl.686 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.2b8: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.2b8 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.82c: = bound_method %int_34.3f9, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.34d: = bound_method %int_34.3f9, %Convert.specific_fn.b6f [concrete] @@ -45,20 +48,20 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.4, @As(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.882: = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness %As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] -// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%impl_witness.882) [concrete] -// CHECK:STDOUT: %.249: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound.129: = bound_method %int_0.5c6, %Convert.197 [concrete] // CHECK:STDOUT: %Convert.specific_fn.aad: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method.46b: = bound_method %int_0.5c6, %Convert.specific_fn.aad [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %impl_witness.023: = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness %ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.ffe: %ImplicitAs.type.2fd = facet_value %i32, (%impl_witness.023) [concrete] -// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.ffe [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.0fd: = bound_method %int_0.6a9, %Convert.960 [concrete] // CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.4b5: = bound_method %int_0.6a9, %Convert.specific_fn.8a8 [concrete] @@ -146,7 +149,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %.loc11_31.1: %tuple.type.3c2 = tuple_literal (%true, %int_34) // CHECK:STDOUT: %tuple.elem0.loc11: ref bool = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_31.2: init bool = initialize_from %true to %tuple.elem0.loc11 [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc11: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_31.1: = bound_method %int_34, %impl.elem0.loc11 [concrete = constants.%Convert.bound.82c] // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc11_31.2: = bound_method %int_34, %specific_fn.loc11 [concrete = constants.%bound_method.34d] @@ -170,14 +173,14 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc13_20.1: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0.loc13_20.1: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc13_20.1: = bound_method %int_0, %impl.elem0.loc13_20.1 [concrete = constants.%Convert.bound.129] // CHECK:STDOUT: %specific_fn.loc13_20.1: = specific_function %impl.elem0.loc13_20.1, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.aad] // CHECK:STDOUT: %bound_method.loc13_20.2: = bound_method %int_0, %specific_fn.loc13_20.1 [concrete = constants.%bound_method.46b] // CHECK:STDOUT: %int.convert_checked.loc13_20.1: init %i32 = call %bound_method.loc13_20.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc13_20.1: %i32 = value_of_initializer %int.convert_checked.loc13_20.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc13_20.2: %i32 = converted %int_0, %.loc13_20.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc13_20.2: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0.loc13_20.2: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc13_20.3: = bound_method %.loc13_20.2, %impl.elem0.loc13_20.2 [concrete = constants.%Convert.bound.0fd] // CHECK:STDOUT: %specific_fn.loc13_20.2: = specific_function %impl.elem0.loc13_20.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc13_20.4: = bound_method %.loc13_20.2, %specific_fn.loc13_20.2 [concrete = constants.%bound_method.4b5] @@ -191,7 +194,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc14_29: %.249 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197] +// CHECK:STDOUT: %impl.elem0.loc14_29: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc14_29.1: = bound_method %int_1.loc14, %impl.elem0.loc14_29 [concrete = constants.%Convert.bound.c1b] // CHECK:STDOUT: %specific_fn.loc14_29: = specific_function %impl.elem0.loc14_29, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.aad] // CHECK:STDOUT: %bound_method.loc14_29.2: = bound_method %int_1.loc14, %specific_fn.loc14_29 [concrete = constants.%bound_method.082] @@ -202,7 +205,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %struct.loc14: %struct_type.index.6ea = struct_value (%.loc14_29.2) [concrete = constants.%struct.63a] // CHECK:STDOUT: %.loc14_35.2: %struct_type.index.6ea = converted %.loc14_35.1, %struct.loc14 [concrete = constants.%struct.63a] // CHECK:STDOUT: %.loc14_36.1: %i32 = struct_access %.loc14_35.2, element0 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_36: %.4d8 = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960] +// CHECK:STDOUT: %impl.elem0.loc14_36: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc14_36.1: = bound_method %.loc14_36.1, %impl.elem0.loc14_36 [concrete = constants.%Convert.bound.faf] // CHECK:STDOUT: %specific_fn.loc14_36: = specific_function %impl.elem0.loc14_36, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc14_36.2: = bound_method %.loc14_36.1, %specific_fn.loc14_36 [concrete = constants.%bound_method.711] diff --git a/toolchain/check/testdata/tuple/access/return_value_access.carbon b/toolchain/check/testdata/tuple/access/return_value_access.carbon index e768479e1a16..4094afb3c382 100644 --- a/toolchain/check/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/check/testdata/tuple/access/return_value_access.carbon @@ -27,11 +27,12 @@ fn Run() -> i32 { // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -85,7 +86,7 @@ fn Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc11_30.1: %tuple.type.985 = tuple_literal (%int_0) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_30.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_30.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index 9c1a61803337..0034ddcee656 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -29,11 +29,12 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %tuple.type.2c1: type = tuple_type (Core.IntLiteral, f64) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] @@ -76,7 +77,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %float: f64 = float_literal 65.890000000000001 [concrete = constants.%float] // CHECK:STDOUT: %.loc18_30.1: %tuple.type.2c1 = tuple_literal (%int_2, %float) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_30.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_30.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index db5951110c1c..9a713eae51f2 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -65,11 +65,12 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] @@ -187,14 +188,14 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc9_18.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_18.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9_18.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_18.1: = bound_method %int_1, %impl.elem0.loc9_18.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc9_18.1: = specific_function %impl.elem0.loc9_18.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_18.2: = bound_method %int_1, %specific_fn.loc9_18.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc9_18.1: init %i32 = call %bound_method.loc9_18.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_18.2: %i32 = value_of_initializer %int.convert_checked.loc9_18.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_18.3: %i32 = converted %int_1, %.loc9_18.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc9_18.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc9_18.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_18.3: = bound_method %int_2, %impl.elem0.loc9_18.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc9_18.2: = specific_function %impl.elem0.loc9_18.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_18.4: = bound_method %int_2, %specific_fn.loc9_18.2 [concrete = constants.%bound_method.b92] @@ -231,7 +232,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc4_24.1: %tuple.type.985 = tuple_literal (%int_0.loc4) -// CHECK:STDOUT: %impl.elem0.loc4: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc4: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_24.1: = bound_method %int_0.loc4, %impl.elem0.loc4 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_24.2: = bound_method %int_0.loc4, %specific_fn.loc4 [concrete = constants.%bound_method.b6e] @@ -248,7 +249,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc5_59.1: %tuple.type.f94 = tuple_literal (%int_2, %int_3) // CHECK:STDOUT: %.loc5_60.1: %tuple.type.d47 = tuple_literal (%.loc5_51.1, %.loc5_59.1) -// CHECK:STDOUT: %impl.elem0.loc5_47: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc5_47: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_47.1: = bound_method %int_0.loc5, %impl.elem0.loc5_47 [concrete = constants.%Convert.bound.d04] // CHECK:STDOUT: %specific_fn.loc5_47: = specific_function %impl.elem0.loc5_47, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_47.2: = bound_method %int_0.loc5, %specific_fn.loc5_47 [concrete = constants.%bound_method.b6e] @@ -259,7 +260,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc5_47.3: init %tuple.type.a1c = tuple_init (%.loc5_47.2) to %tuple.elem0.loc5_51 [concrete = constants.%tuple.592] // CHECK:STDOUT: %.loc5_51.2: init %tuple.type.a1c = converted %.loc5_47.1, %.loc5_47.3 [concrete = constants.%tuple.592] // CHECK:STDOUT: %.loc5_51.3: init %tuple.type.a1c = initialize_from %.loc5_51.2 to %tuple.elem0.loc5_51 [concrete = constants.%tuple.592] -// CHECK:STDOUT: %impl.elem0.loc5_51: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc5_51: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_51.1: = bound_method %int_1, %impl.elem0.loc5_51 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc5_51: = specific_function %impl.elem0.loc5_51, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_51.2: = bound_method %int_1, %specific_fn.loc5_51 [concrete = constants.%bound_method.9a1] @@ -269,7 +270,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc5_51.5: init %i32 = initialize_from %.loc5_51.4 to %tuple.elem1.loc5_51 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc5_51.6: init %tuple.type.fe6 = tuple_init (%.loc5_51.3, %.loc5_51.5) to %tuple.elem0.loc5_60 [concrete = constants.%tuple.236] // CHECK:STDOUT: %.loc5_60.2: init %tuple.type.fe6 = converted %.loc5_51.1, %.loc5_51.6 [concrete = constants.%tuple.236] -// CHECK:STDOUT: %impl.elem0.loc5_59.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc5_59.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_59.1: = bound_method %int_2, %impl.elem0.loc5_59.1 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc5_59.1: = specific_function %impl.elem0.loc5_59.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_59.2: = bound_method %int_2, %specific_fn.loc5_59.1 [concrete = constants.%bound_method.b92] @@ -278,7 +279,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.elem1.loc5_60: ref %tuple.type.d07 = tuple_access file.%b_ref.var, element1 // CHECK:STDOUT: %tuple.elem0.loc5_59: ref %i32 = tuple_access %tuple.elem1.loc5_60, element0 // CHECK:STDOUT: %.loc5_59.3: init %i32 = initialize_from %.loc5_59.2 to %tuple.elem0.loc5_59 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc5_59.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc5_59.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_59.3: = bound_method %int_3, %impl.elem0.loc5_59.2 [concrete = constants.%Convert.bound.b30] // CHECK:STDOUT: %specific_fn.loc5_59.2: = specific_function %impl.elem0.loc5_59.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_59.4: = bound_method %int_3, %specific_fn.loc5_59.2 [concrete = constants.%bound_method.047] @@ -307,6 +308,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (imports.%Implicit.import_ref.773), @impl.a8d [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.85c: type = tuple_type (type) [concrete] @@ -328,11 +330,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.b9e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.ea0: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.847: = impl_witness (imports.%Implicit.import_ref.773), @impl.a8d(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness %ImplicitAs.impl_witness_table.1ad, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.2, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.4cb: %Convert.type.e14 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%impl_witness.847) [concrete] -// CHECK:STDOUT: %.419: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] +// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.dc5: = bound_method %int_1.5b8, %Convert.4cb [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c37: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -359,7 +361,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import_ref.48d: %tuple.type.c2c = import_ref Implicit//default, loc7_9, loaded [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc7_26, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.964 = import_ref Implicit//default, inst1180 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.964 = import_ref Implicit//default, inst1197 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -422,14 +424,14 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_15.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc6_15.1: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0.loc6_15.1: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc6_15.1: = bound_method %int_1, %impl.elem0.loc6_15.1 [concrete = constants.%Convert.bound.dc5] // CHECK:STDOUT: %specific_fn.loc6_15.1: = specific_function %impl.elem0.loc6_15.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_15.2: = bound_method %int_1, %specific_fn.loc6_15.1 [concrete = constants.%bound_method.c37] // CHECK:STDOUT: %int.convert_checked.loc6_15.1: init %i32 = call %bound_method.loc6_15.2(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc6_15.2: %i32 = value_of_initializer %int.convert_checked.loc6_15.1 [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc6_15.3: %i32 = converted %int_1, %.loc6_15.2 [concrete = constants.%int_1.47b] -// CHECK:STDOUT: %impl.elem0.loc6_15.2: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0.loc6_15.2: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc6_15.3: = bound_method %int_2, %impl.elem0.loc6_15.2 [concrete = constants.%Convert.bound.30f] // CHECK:STDOUT: %specific_fn.loc6_15.2: = specific_function %impl.elem0.loc6_15.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_15.4: = bound_method %int_2, %specific_fn.loc6_15.2 [concrete = constants.%bound_method.62b] @@ -552,7 +554,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import_ref.48d: %tuple.type.c2c = import_ref Implicit//default, loc7_9, loaded [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc7_26, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.964 = import_ref Implicit//default, inst1180 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.964 = import_ref Implicit//default, inst1197 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -622,6 +624,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: --- fail_bad_value.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (imports.%Implicit.import_ref.773), @impl.a8d [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] @@ -636,11 +639,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.b9e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.ea0: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.847: = impl_witness (imports.%Implicit.import_ref.773), @impl.a8d(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness %ImplicitAs.impl_witness_table.1ad, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.2, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.4cb: %Convert.type.e14 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%impl_witness.847) [concrete] -// CHECK:STDOUT: %.419: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] +// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.a00: = bound_method %int_3.1ba, %Convert.4cb [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.fc5: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] @@ -670,7 +673,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import_ref.48d: %tuple.type.c2c = import_ref Implicit//default, loc7_9, loaded [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc7_26, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.964 = import_ref Implicit//default, inst1180 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.964 = import_ref Implicit//default, inst1197 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -695,14 +698,14 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc11_19.1: %tuple.type.f94 = tuple_literal (%int_3, %int_4) -// CHECK:STDOUT: %impl.elem0.loc11_19.1: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0.loc11_19.1: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc11_19.1: = bound_method %int_3, %impl.elem0.loc11_19.1 [concrete = constants.%Convert.bound.a00] // CHECK:STDOUT: %specific_fn.loc11_19.1: = specific_function %impl.elem0.loc11_19.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_19.2: = bound_method %int_3, %specific_fn.loc11_19.1 [concrete = constants.%bound_method.fc5] // CHECK:STDOUT: %int.convert_checked.loc11_19.1: init %i32 = call %bound_method.loc11_19.2(%int_3) [concrete = constants.%int_3.d47] // CHECK:STDOUT: %.loc11_19.2: %i32 = value_of_initializer %int.convert_checked.loc11_19.1 [concrete = constants.%int_3.d47] // CHECK:STDOUT: %.loc11_19.3: %i32 = converted %int_3, %.loc11_19.2 [concrete = constants.%int_3.d47] -// CHECK:STDOUT: %impl.elem0.loc11_19.2: %.419 = impl_witness_access constants.%impl_witness.847, element0 [concrete = constants.%Convert.4cb] +// CHECK:STDOUT: %impl.elem0.loc11_19.2: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc11_19.3: = bound_method %int_4, %impl.elem0.loc11_19.2 [concrete = constants.%Convert.bound.694] // CHECK:STDOUT: %specific_fn.loc11_19.2: = specific_function %impl.elem0.loc11_19.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_19.4: = bound_method %int_4, %specific_fn.loc11_19.2 [concrete = constants.%bound_method.b6e] diff --git a/toolchain/check/testdata/tuple/nested_tuple.carbon b/toolchain/check/testdata/tuple/nested_tuple.carbon index 5cc9c12f96c1..8f3c0b5a9b04 100644 --- a/toolchain/check/testdata/tuple/nested_tuple.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple.carbon @@ -26,11 +26,12 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %tuple.type.acf: type = tuple_type (%tuple.type.f94, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] @@ -87,7 +88,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc11_36.1: %tuple.type.f94 = tuple_literal (%int_12, %int_76) // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %.loc11_40.1: %tuple.type.acf = tuple_literal (%.loc11_36.1, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_36.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_36.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_36.1: = bound_method %int_12, %impl.elem0.loc11_36.1 [concrete = constants.%Convert.bound.221] // CHECK:STDOUT: %specific_fn.loc11_36.1: = specific_function %impl.elem0.loc11_36.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_36.2: = bound_method %int_12, %specific_fn.loc11_36.1 [concrete = constants.%bound_method.dae] @@ -96,7 +97,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %tuple.elem0.loc11_40: ref %tuple.type.d07 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %tuple.elem0.loc11_36: ref %i32 = tuple_access %tuple.elem0.loc11_40, element0 // CHECK:STDOUT: %.loc11_36.3: init %i32 = initialize_from %.loc11_36.2 to %tuple.elem0.loc11_36 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc11_36.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_36.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_36.3: = bound_method %int_76, %impl.elem0.loc11_36.2 [concrete = constants.%Convert.bound.033] // CHECK:STDOUT: %specific_fn.loc11_36.2: = specific_function %impl.elem0.loc11_36.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_36.4: = bound_method %int_76, %specific_fn.loc11_36.2 [concrete = constants.%bound_method.ce4] @@ -106,7 +107,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc11_36.5: init %i32 = initialize_from %.loc11_36.4 to %tuple.elem1.loc11_36 [concrete = constants.%int_76.8dd] // CHECK:STDOUT: %.loc11_36.6: init %tuple.type.d07 = tuple_init (%.loc11_36.3, %.loc11_36.5) to %tuple.elem0.loc11_40 [concrete = constants.%tuple.737] // CHECK:STDOUT: %.loc11_40.2: init %tuple.type.d07 = converted %.loc11_36.1, %.loc11_36.6 [concrete = constants.%tuple.737] -// CHECK:STDOUT: %impl.elem0.loc11_40: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_40: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_40.1: = bound_method %int_6, %impl.elem0.loc11_40 [concrete = constants.%Convert.bound.ce9] // CHECK:STDOUT: %specific_fn.loc11_40: = specific_function %impl.elem0.loc11_40, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_40.2: = bound_method %int_6, %specific_fn.loc11_40 [concrete = constants.%bound_method.efa] diff --git a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon index 9d6a97a0e96f..34c9c289ed52 100644 --- a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon @@ -40,11 +40,12 @@ fn H() { // CHECK:STDOUT: %tuple.type.667: type = tuple_type (Core.IntLiteral, %tuple.type.189, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -146,7 +147,7 @@ fn H() { // CHECK:STDOUT: %F.call: init %tuple.type.189 = call %F.ref() to %tuple.elem1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc18_50.1: %tuple.type.667 = tuple_literal (%int_1, %F.call, %int_2) -// CHECK:STDOUT: %impl.elem0.loc18_50.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18_50.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_50.1: = bound_method %int_1, %impl.elem0.loc18_50.1 [concrete = constants.%Convert.bound.ab5] // CHECK:STDOUT: %specific_fn.loc18_50.1: = specific_function %impl.elem0.loc18_50.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_50.2: = bound_method %int_1, %specific_fn.loc18_50.1 [concrete = constants.%bound_method.9a1] @@ -154,7 +155,7 @@ fn H() { // CHECK:STDOUT: %.loc18_50.2: init %i32 = converted %int_1, %int.convert_checked.loc18_50.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %v.var, element0 // CHECK:STDOUT: %.loc18_50.3: init %i32 = initialize_from %.loc18_50.2 to %tuple.elem0 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc18_50.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc18_50.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_50.3: = bound_method %int_2, %impl.elem0.loc18_50.2 [concrete = constants.%Convert.bound.ef9] // CHECK:STDOUT: %specific_fn.loc18_50.2: = specific_function %impl.elem0.loc18_50.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_50.4: = bound_method %int_2, %specific_fn.loc18_50.2 [concrete = constants.%bound_method.b92] diff --git a/toolchain/check/testdata/tuple/one_element.carbon b/toolchain/check/testdata/tuple/one_element.carbon index 0a2cd5c00c8b..c34d97a8d82f 100644 --- a/toolchain/check/testdata/tuple/one_element.carbon +++ b/toolchain/check/testdata/tuple/one_element.carbon @@ -22,11 +22,12 @@ var y: (i32,) = x; // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] @@ -80,7 +81,7 @@ var y: (i32,) = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc11_20.1: %tuple.type.985 = tuple_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_20.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_20.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/tuple/two_elements.carbon b/toolchain/check/testdata/tuple/two_elements.carbon index 4cae31ba498b..daf886ea89db 100644 --- a/toolchain/check/testdata/tuple/two_elements.carbon +++ b/toolchain/check/testdata/tuple/two_elements.carbon @@ -26,11 +26,12 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %impl_witness.d39: = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness %ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete] -// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ac3: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.1da: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] @@ -70,14 +71,14 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc11_17.2: %tuple.type.24b = tuple_literal (%i32.loc11_9, %i32.loc11_14) // CHECK:STDOUT: %.loc11_17.3: type = converted %.loc11_17.2, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc11_28.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_28.1: = bound_method @__global_init.%int_4.loc11, %impl.elem0.loc11_28.1 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc11_28.1: = specific_function %impl.elem0.loc11_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_28.2: = bound_method @__global_init.%int_4.loc11, %specific_fn.loc11_28.1 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %bound_method.loc11_28.2(@__global_init.%int_4.loc11) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc11_28.1: %i32 = value_of_initializer %int.convert_checked.loc11_28.1 [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc11_28.2: %i32 = converted @__global_init.%int_4.loc11, %.loc11_28.1 [concrete = constants.%int_4.940] -// CHECK:STDOUT: %impl.elem0.loc11_28.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_28.3: = bound_method @__global_init.%int_102.loc11, %impl.elem0.loc11_28.2 [concrete = constants.%Convert.bound.063] // CHECK:STDOUT: %specific_fn.loc11_28.2: = specific_function %impl.elem0.loc11_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_28.4: = bound_method @__global_init.%int_102.loc11, %specific_fn.loc11_28.2 [concrete = constants.%bound_method.c20] @@ -138,7 +139,7 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %int_4.loc14: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %int_102.loc14: Core.IntLiteral = int_value 102 [concrete = constants.%int_102.b54] // CHECK:STDOUT: %.loc14_28.1: %tuple.type.f94 = tuple_literal (%int_4.loc14, %int_102.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_28.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_28.1: = bound_method %int_4.loc14, %impl.elem0.loc14_28.1 [concrete = constants.%Convert.bound.ac3] // CHECK:STDOUT: %specific_fn.loc14_28.1: = specific_function %impl.elem0.loc14_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_28.2: = bound_method %int_4.loc14, %specific_fn.loc14_28.1 [concrete = constants.%bound_method.1da] @@ -146,7 +147,7 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_4.loc14, %int.convert_checked.loc14_28.1 [concrete = constants.%int_4.940] // CHECK:STDOUT: %tuple.elem0.loc14: ref %i32 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %.loc14_28.3: init %i32 = initialize_from %.loc14_28.2 to %tuple.elem0.loc14 [concrete = constants.%int_4.940] -// CHECK:STDOUT: %impl.elem0.loc14_28.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %impl.elem0.loc14_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_28.3: = bound_method %int_102.loc14, %impl.elem0.loc14_28.2 [concrete = constants.%Convert.bound.063] // CHECK:STDOUT: %specific_fn.loc14_28.2: = specific_function %impl.elem0.loc14_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_28.4: = bound_method %int_102.loc14, %specific_fn.loc14_28.2 [concrete = constants.%bound_method.c20] diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 8426f562bc81..95c4908137b3 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -590,7 +590,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table [concrete] // CHECK:STDOUT: %DoesNotImplI.type: type = fn_type @DoesNotImplI [concrete] // CHECK:STDOUT: %DoesNotImplI: %DoesNotImplI.type = struct_value () [concrete] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [concrete] @@ -637,7 +637,8 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %J.ref: type = name_ref J, imports.%Main.J [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: %DoesNotImplI.decl: %DoesNotImplI.type = fn_decl @DoesNotImplI [concrete = constants.%DoesNotImplI] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -657,7 +658,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %J.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -695,7 +696,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table [concrete] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where TODO> [concrete] // CHECK:STDOUT: %Y: %J_where.type = bind_symbolic_name Y, 0 [symbolic] @@ -738,7 +739,8 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %J.ref: type = name_ref J, imports.%Main.J [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: %EmptyStruct.decl: %EmptyStruct.type = fn_decl @EmptyStruct [concrete = constants.%EmptyStruct] { // CHECK:STDOUT: %Y.patt.loc9_16.1: %J_where.type = symbolic_binding_pattern Y, 0 [symbolic = %Y.patt.loc9_16.2 (constants.%Y.patt)] // CHECK:STDOUT: } { @@ -764,7 +766,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %J.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/where_expr/equal_rewrite.carbon b/toolchain/check/testdata/where_expr/equal_rewrite.carbon index 137db62f9d4c..fd8319d92ba1 100644 --- a/toolchain/check/testdata/where_expr/equal_rewrite.carbon +++ b/toolchain/check/testdata/where_expr/equal_rewrite.carbon @@ -1382,10 +1382,10 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness file.%A.impl_witness_table [concrete] // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %type_where: type = facet_type [concrete] -// CHECK:STDOUT: %facet_value: %type_where = facet_value %D, (%impl_witness) [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %D, (%A.impl_witness) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %E: %type_where = bind_symbolic_name E, 0 [symbolic] @@ -1414,7 +1414,8 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %B.patt: %type_where = binding_pattern B // CHECK:STDOUT: } @@ -1426,7 +1427,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: requirement_impls %.Self.ref, %A.ref // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%A.impl_witness) [concrete = constants.%facet_value] // CHECK:STDOUT: %.loc8_35: %type_where = converted @__global_init.%D.ref, %facet_value [concrete = constants.%facet_value] // CHECK:STDOUT: %B: %type_where = bind_name B, %.loc8_35 // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} @@ -1442,7 +1443,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %D.ref as %A.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -1468,7 +1469,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: requirement_impls %.Self.ref, %A.ref // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%A.impl_witness) [concrete = constants.%facet_value] // CHECK:STDOUT: %.loc11_38: %type_where = converted %D.ref, %facet_value [concrete = constants.%facet_value] // CHECK:STDOUT: %E: %type_where = bind_symbolic_name E, 0, %.loc11_38 [symbolic = constants.%E] // CHECK:STDOUT: return @@ -1488,10 +1489,10 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness file.%A.impl_witness_table [concrete] // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %type_where: type = facet_type [concrete] -// CHECK:STDOUT: %facet_value: %type_where = facet_value %D, (%impl_witness) [concrete] +// CHECK:STDOUT: %facet_value: %type_where = facet_value %D, (%A.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1515,7 +1516,8 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl_witness: = impl_witness () [concrete = constants.%impl_witness] +// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (), @impl [concrete] +// CHECK:STDOUT: %A.impl_witness: = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %B.patt: %type_where = binding_pattern B // CHECK:STDOUT: } @@ -1527,7 +1529,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: requirement_impls %.Self.ref, %A.ref // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%A.impl_witness) [concrete = constants.%facet_value] // CHECK:STDOUT: %.loc12_36: %type_where = converted @__global_init.%D.ref, %facet_value [concrete = constants.%facet_value] // CHECK:STDOUT: %B: %type_where = bind_name B, %.loc12_36 // CHECK:STDOUT: } @@ -1542,7 +1544,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %D.ref as %A.ref { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = file.%impl_witness +// CHECK:STDOUT: witness = file.%A.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { diff --git a/toolchain/lower/testdata/function/generic/call_different_impls.carbon b/toolchain/lower/testdata/function/generic/call_different_impls.carbon index de8e0a3a38b8..d4756f220a25 100644 --- a/toolchain/lower/testdata/function/generic/call_different_impls.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_impls.carbon @@ -50,20 +50,20 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.562d5cdd5cdbd5c5(), !dbg !13 -// CHECK:STDOUT: call void @_CG.Main.386ac59331346fc4(), !dbg !14 +// CHECK:STDOUT: call void @_CG.Main.2c436a64dfc3fd29(), !dbg !13 +// CHECK:STDOUT: call void @_CG.Main.c124d41ebc08c32b(), !dbg !14 // CHECK:STDOUT: ret void, !dbg !15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @printf(ptr, ...) // CHECK:STDOUT: -// CHECK:STDOUT: define void @_CG.Main.562d5cdd5cdbd5c5() !dbg !16 { +// CHECK:STDOUT: define void @_CG.Main.2c436a64dfc3fd29() !dbg !16 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(), !dbg !17 // CHECK:STDOUT: ret void, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define void @_CG.Main.386ac59331346fc4() !dbg !19 { +// CHECK:STDOUT: define void @_CG.Main.c124d41ebc08c32b() !dbg !19 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @"_CF.Y.Main:I.Main"(), !dbg !20 // CHECK:STDOUT: ret void, !dbg !21 @@ -91,9 +91,9 @@ fn Run() { // CHECK:STDOUT: !13 = !DILocation(line: 30, column: 3, scope: !12) // CHECK:STDOUT: !14 = !DILocation(line: 31, column: 3, scope: !12) // CHECK:STDOUT: !15 = !DILocation(line: 29, column: 1, scope: !12) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.562d5cdd5cdbd5c5", scope: null, file: !3, line: 27, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2c436a64dfc3fd29", scope: null, file: !3, line: 27, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !17 = !DILocation(line: 27, column: 15, scope: !16) // CHECK:STDOUT: !18 = !DILocation(line: 27, column: 1, scope: !16) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.386ac59331346fc4", scope: null, file: !3, line: 27, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c124d41ebc08c32b", scope: null, file: !3, line: 27, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !20 = !DILocation(line: 27, column: 15, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 27, column: 1, scope: !19) diff --git a/toolchain/lower/testdata/function/generic/call_impl_function.carbon b/toolchain/lower/testdata/function/generic/call_impl_function.carbon index 274928c933a9..3814d90f5193 100644 --- a/toolchain/lower/testdata/function/generic/call_impl_function.carbon +++ b/toolchain/lower/testdata/function/generic/call_impl_function.carbon @@ -59,7 +59,7 @@ fn G() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %out.var = alloca i32, align 4, !dbg !10 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 4, ptr %out.var), !dbg !10 -// CHECK:STDOUT: %CallGenericMethod.call = call i32 @_CCallGenericMethod.Main.2b28d1a7fa793cbc(i32 10), !dbg !11 +// CHECK:STDOUT: %CallGenericMethod.call = call i32 @_CCallGenericMethod.Main.b330a91dfda257ee(i32 10), !dbg !11 // CHECK:STDOUT: store i32 %CallGenericMethod.call, ptr %out.var, align 4, !dbg !10 // CHECK:STDOUT: %.loc40 = load i32, ptr %out.var, align 4, !dbg !12 // CHECK:STDOUT: %print.int = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %.loc40), !dbg !13 @@ -69,7 +69,7 @@ fn G() { // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #0 // CHECK:STDOUT: -// CHECK:STDOUT: define i32 @_CCallGenericMethod.Main.2b28d1a7fa793cbc(i32 %x) !dbg !15 { +// CHECK:STDOUT: define i32 @_CCallGenericMethod.Main.b330a91dfda257ee(i32 %x) !dbg !15 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc35_15 = call i32 @"_CF.ImplsSomeInterface.Main:SomeInterface.Main"(i32 %x), !dbg !16 // CHECK:STDOUT: ret i32 %.loc35_15, !dbg !17 @@ -97,6 +97,6 @@ fn G() { // CHECK:STDOUT: !12 = !DILocation(line: 40, column: 14, scope: !9) // CHECK:STDOUT: !13 = !DILocation(line: 40, column: 3, scope: !9) // CHECK:STDOUT: !14 = !DILocation(line: 38, column: 1, scope: !9) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "CallGenericMethod", linkageName: "_CCallGenericMethod.Main.2b28d1a7fa793cbc", scope: null, file: !3, line: 34, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "CallGenericMethod", linkageName: "_CCallGenericMethod.Main.b330a91dfda257ee", scope: null, file: !3, line: 34, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !16 = !DILocation(line: 35, column: 10, scope: !15) // CHECK:STDOUT: !17 = !DILocation(line: 35, column: 3, scope: !15) diff --git a/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon b/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon index 7a584307eb22..adb2df3a048d 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon @@ -58,14 +58,14 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call.loc38 = call i32 @_CG.Main.562d5cdd5cdbd5c5(i32 0), !dbg !13 -// CHECK:STDOUT: %G.call.loc39 = call i32 @_CG.Main.386ac59331346fc4(i32 0), !dbg !14 +// CHECK:STDOUT: %G.call.loc38 = call i32 @_CG.Main.2c436a64dfc3fd29(i32 0), !dbg !13 +// CHECK:STDOUT: %G.call.loc39 = call i32 @_CG.Main.c124d41ebc08c32b(i32 0), !dbg !14 // CHECK:STDOUT: ret void, !dbg !15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @printf(ptr, ...) // CHECK:STDOUT: -// CHECK:STDOUT: define i32 @_CG.Main.562d5cdd5cdbd5c5(i32 %count) !dbg !16 { +// CHECK:STDOUT: define i32 @_CG.Main.2c436a64dfc3fd29(i32 %count) !dbg !16 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(), !dbg !17 // CHECK:STDOUT: %int.greater = icmp sgt i32 %count, 0, !dbg !18 @@ -76,11 +76,11 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry // CHECK:STDOUT: %int.sadd = add i32 %count, 1, !dbg !21 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.562d5cdd5cdbd5c5(i32 %int.sadd), !dbg !22 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2c436a64dfc3fd29(i32 %int.sadd), !dbg !22 // CHECK:STDOUT: ret i32 %G.call, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define i32 @_CG.Main.386ac59331346fc4(i32 %count) !dbg !24 { +// CHECK:STDOUT: define i32 @_CG.Main.c124d41ebc08c32b(i32 %count) !dbg !24 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @"_CF.Y.Main:I.Main"(), !dbg !25 // CHECK:STDOUT: %int.greater = icmp sgt i32 %count, 0, !dbg !26 @@ -91,7 +91,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry // CHECK:STDOUT: %int.sadd = add i32 %count, 1, !dbg !29 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.386ac59331346fc4(i32 %int.sadd), !dbg !30 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.c124d41ebc08c32b(i32 %int.sadd), !dbg !30 // CHECK:STDOUT: ret i32 %G.call, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -117,7 +117,7 @@ fn Run() { // CHECK:STDOUT: !13 = !DILocation(line: 38, column: 3, scope: !12) // CHECK:STDOUT: !14 = !DILocation(line: 39, column: 3, scope: !12) // CHECK:STDOUT: !15 = !DILocation(line: 37, column: 1, scope: !12) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.562d5cdd5cdbd5c5", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2c436a64dfc3fd29", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !17 = !DILocation(line: 29, column: 3, scope: !16) // CHECK:STDOUT: !18 = !DILocation(line: 31, column: 7, scope: !16) // CHECK:STDOUT: !19 = !DILocation(line: 31, column: 6, scope: !16) @@ -125,7 +125,7 @@ fn Run() { // CHECK:STDOUT: !21 = !DILocation(line: 34, column: 15, scope: !16) // CHECK:STDOUT: !22 = !DILocation(line: 34, column: 10, scope: !16) // CHECK:STDOUT: !23 = !DILocation(line: 34, column: 3, scope: !16) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.386ac59331346fc4", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c124d41ebc08c32b", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !25 = !DILocation(line: 29, column: 3, scope: !24) // CHECK:STDOUT: !26 = !DILocation(line: 31, column: 7, scope: !24) // CHECK:STDOUT: !27 = !DILocation(line: 31, column: 6, scope: !24) diff --git a/toolchain/sem_ir/expr_info.cpp b/toolchain/sem_ir/expr_info.cpp index e535b01caf56..50ba37ada2b4 100644 --- a/toolchain/sem_ir/expr_info.cpp +++ b/toolchain/sem_ir/expr_info.cpp @@ -121,6 +121,7 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory { case LookupImplWitness::Kind: case ImplWitness::Kind: case ImplWitnessAccess::Kind: + case ImplWitnessTable::Kind: case ImplWitnessTablePlaceholder::Kind: case ImportCppDecl::Kind: case ImportDecl::Kind: diff --git a/toolchain/sem_ir/formatter.cpp b/toolchain/sem_ir/formatter.cpp index 5e17c8933de6..be85b29ccdb4 100644 --- a/toolchain/sem_ir/formatter.cpp +++ b/toolchain/sem_ir/formatter.cpp @@ -888,6 +888,12 @@ class FormatterImpl { out_ << " = "; } + // Format ImplWitnessTable with its name even though it lacks a type_id. + auto FormatInstLhs(InstId inst_id, ImplWitnessTable /*inst*/) -> void { + FormatName(inst_id); + out_ << " = "; + } + template auto FormatInstRhs(InstT inst) -> void { // By default, an instruction has a comma-separated argument list. diff --git a/toolchain/sem_ir/inst_kind.def b/toolchain/sem_ir/inst_kind.def index 65305f09ff59..0cb6cd342f4c 100644 --- a/toolchain/sem_ir/inst_kind.def +++ b/toolchain/sem_ir/inst_kind.def @@ -75,6 +75,7 @@ CARBON_SEM_IR_INST_KIND(LookupImplWitness) CARBON_SEM_IR_INST_KIND(ImplWitness) CARBON_SEM_IR_INST_KIND(ImplWitnessAccess) CARBON_SEM_IR_INST_KIND(ImplWitnessAssociatedConstant) +CARBON_SEM_IR_INST_KIND(ImplWitnessTable) CARBON_SEM_IR_INST_KIND(ImplWitnessTablePlaceholder) CARBON_SEM_IR_INST_KIND(ImportCppDecl) CARBON_SEM_IR_INST_KIND(ImportDecl) diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index e68c2add9d02..d2d3516d328e 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -462,6 +462,24 @@ auto InstNamer::CollectNamesInBlock(ScopeId top_scope_id, out << suffix; add_inst_name(out.TakeStr()); }; + auto add_witness_table_name = [&](InstId witness_table_inst_id, + std::string name) { + auto witness_table = sem_ir_->insts().GetAs( + witness_table_inst_id); + if (!witness_table.impl_id.has_value()) { + // TODO: The witness comes from a facet value. Can we get the + // interface names from it? Store the facet value instruction in the + // table? + add_inst_name(name); + return; + } + const auto& impl = sem_ir_->impls().Get(witness_table.impl_id); + auto name_id = + sem_ir_->interfaces().Get(impl.interface.interface_id).name_id; + + std::string suffix = llvm::formatv(".{}", name); + add_inst_name_id(name_id, suffix); + }; auto facet_access_name_id = [&](InstId facet_value_inst_id) -> NameId { if (auto name = sem_ir_->insts().TryGetAs(facet_value_inst_id)) { return name->name_id; @@ -688,10 +706,8 @@ auto InstNamer::CollectNamesInBlock(ScopeId top_scope_id, ".lookup_impl_witness"); continue; } - case ImplWitness::Kind: { - // TODO: Include name of interface (is this available from the - // specific?). - add_inst_name("impl_witness"); + case CARBON_KIND(ImplWitness inst): { + add_witness_table_name(inst.witness_table_id, "impl_witness"); continue; } case CARBON_KIND(ImplWitnessAccess inst): { @@ -705,6 +721,10 @@ auto InstNamer::CollectNamesInBlock(ScopeId top_scope_id, add_inst_name("impl_witness_assoc_constant"); continue; } + case ImplWitnessTable::Kind: { + add_witness_table_name(inst_id, "impl_witness_table"); + continue; + } case ImportCppDecl::Kind: { add_inst_name("Cpp.import_cpp"); continue; diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index ea5127337edc..7cc69cf710dc 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -903,19 +903,10 @@ struct ImplWitness { // Always the type of the builtin `WitnessType` singleton instruction. TypeId type_id; - // The witness table with an instruction for each associated constant and - // function in the impl declaration (and definition, if seen). The specific_id - // should be applied to those instructions. Instructions will be - // `ImplWitnessTablePlaceholder` until a value is seen for them. - // - // TODO: To avoid importing the table with every `ImplWitness`, split this - // table out to a separate `ImplWitnessTable` instruction. It can still remain - // as an AbsoluteInstBlockId there. The `ImplWitnessTable's constant_kind - // should be `Unique` to avoid it being evaluated or substituted. The - // `ImplWitnessTable` can also hold a reference back to the impl that the - // witness is for via an `ImplId` which allows diagnostics to show the impl - // from a given witness or witness access. - AbsoluteInstBlockId elements_id; + // An `ImplWitnessTable` instruction. + InstId witness_table_id; + // The specific to be applied to instructions from the witness table to get + // their constant values. SpecificId specific_id; }; @@ -955,6 +946,51 @@ struct ImplWitnessAssociatedConstant { InstId inst_id; }; +// The witness table contains an instruction for each associated constant and +// function in the impl declaration (and definition, if seen). The `specific_id` +// from the `ImplWitness` should be applied to those instructions. Instructions +// will be `ImplWitnessTablePlaceholder` until a value is seen for them. +// +// An `ImplWitnessTable` can be shared by multiple `ImplWitness` instructions, +// to avoid the work of importing the full table with each witness. +// +// The instruction uses `constant_kind` of `Unique` to ensure the table is not +// substituted or re-evaluated in a generic context. The table is built up +// across multiple check steps (checking an impl declaration and definition), so +// we need there to be only a single table per `ImplId`. The constant values of +// instructions in the table are found lazily by explicitly applying the +// `specific_id` from an `ImplWitness` to them. +// +// Since the table itself is unique and not re-evaluated into the generic eval +// block, it is imperative that any symbolic instructions found in the table, +// for a generic impl, have an instruction in the generic's eval block. See +// `ImplWitnessAssociatedConstant` which serves this purpose for associated +// constant values. +struct ImplWitnessTable { + static constexpr auto Kind = InstKind::ImplWitnessTable.Define( + {.ir_name = "impl_witness_table", + .constant_kind = InstConstantKind::Unique, + // TODO: For dynamic dispatch, we might want to lower witness tables as + // constants. + .is_lowered = false}); + + // The witness table of instructions. + // + // We use AbsoluteInstBlockId since this block on import will contain + // ImportRefLoaded instructions, and they can not be evaluated. We store + // ImportRefLoaded instructions so that we can lazily load only the witness + // table entries that are used. + AbsoluteInstBlockId elements_id; + + // The `Impl` which this table is constructed for. This may be `None` in the + // future if the witness was constructed from a facet value directly. + // + // TODO: When constructing from a facet value, should we store the facet value + // instruction (and the `ImplDecl` instruction) in here, as that lets us get + // the FacetType and its interface names? + ImplId impl_id; +}; + // A singleton placeholder instruction used in the `ImplWitness` table of // instructions for members of the impl. These are replaced as values are seen // for the witness table in the impl declaration or definition. @@ -1344,7 +1380,7 @@ struct RequireCompleteType { .constant_needs_inst_id = InstConstantNeedsInstIdKind::DuringEvaluation, .is_lowered = false}); - // Always the builtin witness type. + // Always the builtin `WitnessType` type. TypeId type_id; // The type that is required to be complete. TypeInstId complete_type_inst_id; @@ -1887,7 +1923,7 @@ struct WhereExpr { InstBlockId requirements_id; }; -// The type of `ImplWitness` and `ImplSymbolicType` instructions. The latter +// The type of `ImplWitness` and `LookupImplWitness` instructions. The latter // will evaluate at some point during specific computation into the former, and // their types should not change in the process. //