From 51498547c94b1eb1e2a4ab69be58529862408e79 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 23 Apr 2025 12:39:09 -0400 Subject: [PATCH] Always use `LookupImplWitness` instructions for symbolic witnesses (#5321) We eliminate the `FacetAccessWitness` instruction, which would sometimes immediately evaluate to a concrete `ImplWitness`, and sometimes remain symbolic. This instruction is now replaced by `LookupImplWitness` in all cases. To support the same use cases, when it is evaluated, `LookupImplWitness` will look in the self value if it's a facet value, and attempt to return a concrete `ImplWitness` from it before looking for an `impl` statement. The `LookupImplWitness` instruction's value is now canonical, even when it evaluates to a symbolic `LookupImplWitness` instruction, by canonicalizing the self value of the lookup query. This canonicalization unwraps `FacetAccessType` and `FacetValue` instructions to get to an underlying canonical facet value. However we must preserve and use the non-canonical query while evaluating the instruction in order to look for a concrete `ImplWitness` if the query self value was a concrete `FacetValue`. The canonicalization ensures that symbolic witnesses obtained from a facet value are compatible with those obtained from an impl statement, as long as the self types originate from the same canonical facet value though they may have been narrowed. Member access now unconditionally does a `LookupImplWitness()` operation, instead of only sometimes doing the lookup for a final impl declaration. `EvalImplLookupResult` is marked `[[nodiscard]]` so that we don't construct it and forget to return it. This was a mistake made at one point during the creation of this PR. And the `has_concrete_value()` method no longer has a precondition that `has_value()` is true, since we want to look for a concrete result only in the new use of `EvalImplLookupResult` returned from lookup into the query self facet value. The TODO from `FacetAccessWitness` evaluation is addressed by ensuring the index of the witness in the `FacetValue` comes from the required interfaces of the `FacetValue`'s type, and that the type (a `FacetType`) is the same facet type used in the query to construct the `FacetValue`'s witness block. This is made possible by eliminating the `FacetAccessWitness` indirection. The lookup into a `FacetValue` happens while evaluating `LookupImplWitness` and it does so directly on the self value. This gives a consistent view of the witness set and the facet type, as they both come from the same instruction. All of this with 400 less lines of code. :) --------- Co-authored-by: josh11b <15258583+josh11b@users.noreply.github.com> Co-authored-by: Richard Smith --- toolchain/check/convert.cpp | 13 +- toolchain/check/eval_inst.cpp | 29 +- toolchain/check/facet_type.cpp | 20 +- toolchain/check/impl_lookup.cpp | 243 ++- toolchain/check/impl_lookup.h | 20 +- toolchain/check/import_ref.cpp | 19 - toolchain/check/member_access.cpp | 90 +- .../testdata/facet/min_prelude/access.carbon | 119 +- .../call_combined_impl_witness.carbon | 88 +- ..._value_to_generic_facet_value_value.carbon | 27 +- ..._facet_value_to_narrowed_facet_type.carbon | 66 +- .../facet/min_prelude/runtime_value.carbon | 9 +- .../call_method_on_generic_facet.carbon | 27 +- .../testdata/function/generic/deduce.carbon | 61 +- .../testdata/impl/assoc_const_self.carbon | 116 +- .../testdata/impl/impl_assoc_const.carbon | 36 +- .../min_prelude/canonical_query_self.carbon | 841 ++++++++++ .../lookup/min_prelude/find_in_final.carbon | 77 +- .../lookup/min_prelude/specialization.carbon | 60 +- ...pecialization_with_symbolic_rewrite.carbon | 731 ++++----- .../lookup/min_prelude/symbolic_lookup.carbon | 18 + .../impl/min_prelude/forward_decls.carbon | 101 +- .../testdata/impl/no_prelude/compound.carbon | 3 +- .../impl/no_prelude/fail_impl_as_scope.carbon | 3 +- .../fail_undefined_interface.carbon | 9 +- .../impl/no_prelude/impl_assoc_const.carbon | 217 ++- .../impl/no_prelude/import_compound.carbon | 3 +- .../import_interface_assoc_const.carbon | 217 ++- .../impl/no_prelude/import_use_generic.carbon | 3 +- .../impl/no_prelude/interface_args.carbon | 3 +- .../testdata/impl/use_assoc_const.carbon | 1402 ++++++++--------- .../testdata/interface/member_lookup.carbon | 30 +- .../min_prelude/compound_member_access.carbon | 294 ++-- .../no_prelude/fail_assoc_const_alias.carbon | 64 +- .../fail_assoc_fn_invalid_use.carbon | 21 +- .../no_prelude/generic_method.carbon | 64 +- .../testdata/let/compile_time_bindings.carbon | 15 +- .../testdata/where_expr/constraints.carbon | 18 +- .../testdata/where_expr/designator.carbon | 9 +- .../testdata/where_expr/dot_self_index.carbon | 82 +- .../testdata/where_expr/equal_rewrite.carbon | 380 +++-- .../testdata/where_expr/non_generic.carbon | 9 +- toolchain/check/type.cpp | 29 + toolchain/check/type.h | 14 + .../call_different_associated_const.carbon | 12 +- toolchain/sem_ir/expr_info.cpp | 1 - toolchain/sem_ir/inst_kind.def | 1 - toolchain/sem_ir/inst_namer.cpp | 12 - toolchain/sem_ir/stringify.cpp | 30 +- toolchain/sem_ir/typed_insts.h | 18 - 50 files changed, 3078 insertions(+), 2696 deletions(-) create mode 100644 toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon diff --git a/toolchain/check/convert.cpp b/toolchain/check/convert.cpp index d2bd3ace7639..def5e9314ab3 100644 --- a/toolchain/check/convert.cpp +++ b/toolchain/check/convert.cpp @@ -1094,14 +1094,17 @@ static auto PerformBuiltinConversion( // `FacetAccessType` instruction. auto type_inst_id = SemIR::TypeInstId::None; if (sem_ir.types().Is(value_type_id)) { - type_inst_id = AddTypeInst(context, loc_id, - SemIR::FacetAccessType{ - .type_id = SemIR::TypeType::TypeId, - .facet_value_inst_id = const_value_id, - }); + type_inst_id = AddTypeInst( + context, loc_id, + {.type_id = SemIR::TypeType::TypeId, + .facet_value_inst_id = const_value_id}); } else { type_inst_id = context.types().GetAsTypeInstId(const_value_id); } + // Note that `FacetValue`'s type is the same `FacetType` that was used + // to construct the set of witnesses, ie. the query to + // `LookupImplWitness()`. This ensures that the witnesses are in the + // same order as the `required_interfaces()` in the `FacetValue`'s type. return AddInst( context, loc_id, {.type_id = target.type_id, diff --git a/toolchain/check/eval_inst.cpp b/toolchain/check/eval_inst.cpp index 2e8d7dcb2c8e..0b9dd5ea1230 100644 --- a/toolchain/check/eval_inst.cpp +++ b/toolchain/check/eval_inst.cpp @@ -181,23 +181,6 @@ auto EvalConstantInst(Context& context, SemIR::FacetAccessType inst) return ConstantEvalResult::NewSamePhase(inst); } -auto EvalConstantInst(Context& context, SemIR::FacetAccessWitness inst) - -> ConstantEvalResult { - // TODO: The `index` we are given is an index into the required_interfaces of - // the original facet type, but we're using it to index into the witnesses of - // the substituted facet type. There is no reason to expect those witnesses to - // be in the same order, or even for there to be the same number of witnesses. - - if (auto facet_value = context.insts().TryGetAs( - inst.facet_value_inst_id)) { - auto impl_witness_inst_id = context.inst_blocks().Get( - facet_value->witnesses_block_id)[inst.index.index]; - return ConstantEvalResult::Existing( - context.constant_values().Get(impl_witness_inst_id)); - } - return ConstantEvalResult::NewSamePhase(inst); -} - auto EvalConstantInst(Context& context, SemIR::InstId inst_id, SemIR::FloatType inst) -> ConstantEvalResult { return ValidateFloatType(context, inst_id, inst) @@ -216,8 +199,16 @@ auto EvalConstantInst(Context& /*context*/, SemIR::FunctionDecl inst) auto EvalConstantInst(Context& context, SemIR::InstId inst_id, SemIR::LookupImplWitness inst) -> ConstantEvalResult { - auto result = EvalLookupSingleImplWitness( - context, context.insts().GetLocId(inst_id), inst); + // The self value is canonicalized in order to produce a canonical + // LookupImplWitness instruction. We save the non-canonical instruction as it + // may be a concrete `FacetValue` that contains a concrete witness. + auto non_canonical_query_self_inst_id = inst.query_self_inst_id; + inst.query_self_inst_id = + GetCanonicalizedFacetOrTypeValue(context, inst.query_self_inst_id); + + auto result = + EvalLookupSingleImplWitness(context, context.insts().GetLocId(inst_id), + inst, non_canonical_query_self_inst_id); if (!result.has_value()) { // We use NotConstant to communicate back to impl lookup that the lookup // failed. This can not happen for a deferred symbolic lookup in a generic diff --git a/toolchain/check/facet_type.cpp b/toolchain/check/facet_type.cpp index 502dc3c1220b..26d8ea64b118 100644 --- a/toolchain/check/facet_type.cpp +++ b/toolchain/check/facet_type.cpp @@ -22,19 +22,13 @@ auto FacetTypeFromInterface(Context& context, SemIR::InterfaceId interface_id, return {.type_id = SemIR::TypeType::TypeId, .facet_type_id = facet_type_id}; } -// Returns `true` if the `FacetAccessWitness` of `witness_id` matches -// `interface`. -static auto WitnessAccessMatchesInterface( +// Returns whether the `LookupImplWitness` of `witness_id` matches `interface`. +static auto WitnessQueryMatchesInterface( Context& context, SemIR::InstId witness_id, const SemIR::SpecificInterface& interface) -> bool { - auto access = context.insts().GetAs(witness_id); - auto type_id = context.insts().Get(access.facet_value_inst_id).type_id(); - auto facet_type = context.types().GetAs(type_id); - // The order of witnesses is from the identified facet type. - auto identified_id = RequireIdentifiedFacetType(context, facet_type); - const auto& identified = context.identified_facet_types().Get(identified_id); - const auto& impls = identified.required_interfaces()[access.index.index]; - return impls == interface; + auto lookup = context.insts().GetAs(witness_id); + return interface == + context.specific_interfaces().Get(lookup.query_specific_interface_id); } static auto IncompleteFacetTypeDiagnosticBuilder( @@ -130,8 +124,8 @@ auto InitialFacetTypeImplWitness( for (auto rewrite : facet_type_info.rewrite_constraints) { auto access = context.insts().GetAs(rewrite.lhs_id); - if (!WitnessAccessMatchesInterface(context, access.witness_id, - interface_to_witness)) { + if (!WitnessQueryMatchesInterface(context, access.witness_id, + interface_to_witness)) { continue; } auto& table_entry = table[access.index.index]; diff --git a/toolchain/check/impl_lookup.cpp b/toolchain/check/impl_lookup.cpp index 23e9183157b4..f6deba75807e 100644 --- a/toolchain/check/impl_lookup.cpp +++ b/toolchain/check/impl_lookup.cpp @@ -5,6 +5,7 @@ #include "toolchain/check/impl_lookup.h" #include +#include #include #include @@ -179,21 +180,6 @@ static auto FindAndDiagnoseImplLookupCycle( return false; } -// If the constant value is a FacetAccessType instruction, this returns the -// value of the facet value it points to instead. -static auto UnwrapFacetAccessType(Context& context, SemIR::ConstantId id) - -> SemIR::ConstantId { - // If the self type is a FacetAccessType, work with the facet value directly, - // which gives us the potential witnesses to avoid looking for impl - // declarations. We will do the same for the impl declarations we try to match - // so that we can compare the self constant values. - if (auto access = context.insts().TryGetAs( - context.constant_values().GetInstId(id))) { - return context.constant_values().Get(access->facet_value_inst_id); - } - return id; -} - // Gets the set of `SpecificInterface`s that are required by a facet type // (as a constant value). static auto GetInterfacesFromConstantId( @@ -253,7 +239,8 @@ static auto GetWitnessIdForImpl(Context& context, SemIR::LocId loc_id, // will not be the same constant value as a query facet value. We move through // to the facet value here, and if the query was a FacetAccessType we did the // same there so they still match. - deduced_self_const_id = UnwrapFacetAccessType(context, deduced_self_const_id); + deduced_self_const_id = + GetCanonicalizedFacetOrTypeValue(context, deduced_self_const_id); if (query_self_const_id != deduced_self_const_id) { return EvalImplLookupResult::MakeNone(); } @@ -313,35 +300,62 @@ static auto GetWitnessIdForImpl(Context& context, SemIR::LocId loc_id, } } -// In the case where `facet_const_id` is a facet, see if its facet type requires -// that `specific_interface` is implemented. If so, return the witness from the -// facet. -static auto FindWitnessInFacet( - Context& context, SemIR::LocId loc_id, SemIR::ConstantId facet_const_id, - const SemIR::SpecificInterface& specific_interface) -> SemIR::InstId { - SemIR::InstId facet_inst_id = - context.constant_values().GetInstId(facet_const_id); - SemIR::TypeId facet_type_id = context.insts().Get(facet_inst_id).type_id(); - if (auto facet_type_inst = - context.types().TryGetAs(facet_type_id)) { - auto identified_id = RequireIdentifiedFacetType(context, *facet_type_inst); - const auto& identified = - context.identified_facet_types().Get(identified_id); - for (auto [index, interface] : - llvm::enumerate(identified.required_interfaces())) { - if (interface == specific_interface) { - auto witness_id = - GetOrAddInst(context, loc_id, - SemIR::FacetAccessWitness{ - .type_id = GetSingletonType( - context, SemIR::WitnessType::TypeInstId), - .facet_value_inst_id = facet_inst_id, - .index = SemIR::ElementIndex(index)}); - return witness_id; - } +// Unwraps a FacetAccessType to move from a value of type `TypeType` to a facet +// value of type `FacetType` if possible. +// +// Generally `GetCanonicalizedFacetOrTypeValue()` is what you want to call +// instead, as this only does part of that operation, potentially returning a +// non-canonical facet value. +static auto UnwrapFacetAccessType(Context& context, SemIR::InstId inst_id) + -> SemIR::InstId { + if (auto access = context.insts().TryGetAs(inst_id)) { + return access->facet_value_inst_id; + } + return inst_id; +} + +// Finds a lookup result from `query_self_inst_id` if it is a facet value that +// names the query interface in its facet type. Note that `query_self_inst_id` +// is allowed to be a non-canonical facet value in order to find a concrete +// witness, so it's not referenced as a constant value. +static auto LookupImplWitnessInSelfFacetValue( + Context& context, SemIR::InstId query_self_inst_id, + SemIR::SpecificInterface query_specific_interface) -> EvalImplLookupResult { + // Unwrap FacetAccessType without getting the canonical facet value from the + // self value, as we want to preserve the non-canonical `FacetValue` + // instruction which can contain the concrete witness. + query_self_inst_id = UnwrapFacetAccessType(context, query_self_inst_id); + + auto facet_type = context.types().TryGetAs( + context.insts().Get(query_self_inst_id).type_id()); + if (!facet_type) { + return EvalImplLookupResult::MakeNone(); + } + + // The position of the interface in `required_interfaces()` is also the + // position of the witness for that interface in `FacetValue`. + auto identified_id = RequireIdentifiedFacetType(context, *facet_type); + auto facet_type_required_interfaces = + llvm::enumerate(context.identified_facet_types() + .Get(identified_id) + .required_interfaces()); + auto it = llvm::find_if(facet_type_required_interfaces, [=](auto e) { + return e.value() == query_specific_interface; + }); + if (it == facet_type_required_interfaces.end()) { + return EvalImplLookupResult::MakeNone(); + } + auto index = (*it).index(); + + if (auto facet_value = + context.insts().TryGetAs(query_self_inst_id)) { + auto witness_id = + context.inst_blocks().Get(facet_value->witnesses_block_id)[index]; + if (context.insts().Is(witness_id)) { + return EvalImplLookupResult::MakeFinal(witness_id); } } - return SemIR::InstId::None; + return EvalImplLookupResult::MakeNonFinal(); } // Begin a search for an impl declaration matching the query. We do this by @@ -406,12 +420,6 @@ auto LookupImplWitness(Context& context, SemIR::LocId loc_id, } } - // If the self type is a FacetAccessType, work with the facet value directly, - // which gives us the potential witnesses to avoid looking for impl - // declarations. We will do the same for the impl declarations we try to match - // so that we can compare the self constant values. - query_self_const_id = UnwrapFacetAccessType(context, query_self_const_id); - if (FindAndDiagnoseImplLookupCycle(context, context.impl_lookup_stack(), loc_id, query_self_const_id, query_facet_type_const_id)) { @@ -441,23 +449,8 @@ auto LookupImplWitness(Context& context, SemIR::LocId loc_id, for (const auto& interface : interfaces) { // TODO: Since both `interfaces` and `query_self_const_id` are sorted lists, // do an O(N+M) merge instead of O(N*M) nested loops. - auto result_witness_id = GetOrAddLookupImplWitness( context, loc_id, query_self_const_id, interface); - - if (!result_witness_id.has_value() || - !context.insts().Is(result_witness_id)) { - // If the witness is not concrete (the result is not final), then we - // prefer the witness from the query's facet value (if it is one), which - // may include rewrite rules of associated constants that can be relied - // on. - auto facet_value_witness_id = - FindWitnessInFacet(context, loc_id, query_self_const_id, interface); - if (facet_value_witness_id.has_value()) { - result_witness_id = facet_value_witness_id; - } - } - if (result_witness_id.has_value()) { result_witness_ids.push_back(result_witness_id); } else { @@ -577,48 +570,68 @@ static auto CollectCandidateImplsForQuery( } auto EvalLookupSingleImplWitness(Context& context, SemIR::LocId loc_id, - SemIR::LookupImplWitness eval_query) + SemIR::LookupImplWitness eval_query, + SemIR::InstId non_canonical_query_self_inst_id) -> EvalImplLookupResult { - SemIR::ConstantId query_self_const_id = - context.constant_values().Get(eval_query.query_self_inst_id); - SemIR::SpecificInterfaceId query_specific_interface_id = - eval_query.query_specific_interface_id; - // NOTE: Do not retain this reference to the SpecificInterface obtained from a // value store by SpecificInterfaceId. Doing impl lookup does deduce which can // do more impl lookups, and impl lookup can add a new SpecificInterface to // the store which can reallocate and invalidate any references held here into // the store. auto query_specific_interface = - context.specific_interfaces().Get(query_specific_interface_id); + context.specific_interfaces().Get(eval_query.query_specific_interface_id); - // When the query is a concrete FacetValue, we want to look through it at the - // underlying type to find all interfaces it implements. This supports - // conversion from a FacetValue to any other possible FacetValue, since - // conversion depends on impl lookup to verify it is a valid type change. See - // https://github.com/carbon-language/carbon-lang/issues/5137. We can't do - // this step earlier than inside impl lookup since: - // - We want the converted facet value to be preserved in - // `FindWitnessInFacet()` to avoid looking for impl declarations. - // - The constant self value may be modified during constant evaluation as a - // more specific value is found. - if (auto facet_value = context.insts().TryGetAs( - context.constant_values().GetInstId(query_self_const_id))) { - query_self_const_id = - context.constant_values().Get(facet_value->type_inst_id); - // If the FacetValue points to a FacetAccessType, we need to unwrap that for - // comparison with the impl's self type. - query_self_const_id = UnwrapFacetAccessType(context, query_self_const_id); + auto facet_lookup_result = LookupImplWitnessInSelfFacetValue( + context, non_canonical_query_self_inst_id, query_specific_interface); + if (facet_lookup_result.has_concrete_value()) { + return facet_lookup_result; } + // If the self type is a facet that provides a witness, then we are in an + // `interface` or an `impl`. In both cases, we don't want to do any impl + // lookups. The query will eventually resolve to a concrete witness when it + // can get it from the self facet value, when it has a specific applied in the + // future. + // + // In particular, this avoids a LookupImplWitness instruction in the eval + // block of an impl declaration from doing impl lookup. Specifically the + // lookup of the implicit .Self in `impl ... where .X`. If it does impl lookup + // when the eval block is run, it finds the same `impl`, tries to build a + // specific from it, which runs the eval block, creating a recursive loop that + // crashes. + bool self_facet_provides_witness = facet_lookup_result.has_value(); + if (self_facet_provides_witness) { + if (auto bind = context.insts().TryGetAs( + eval_query.query_self_inst_id)) { + const auto& entity = context.entity_names().Get(bind->entity_name_id); + if (entity.name_id == SemIR::NameId::PeriodSelf || + entity.name_id == SemIR::NameId::SelfType) { + return EvalImplLookupResult::MakeNonFinal(); + } + } + } + + SemIR::ConstantId query_self_const_id = + context.constant_values().Get(eval_query.query_self_inst_id); + auto query_type_structure = BuildTypeStructure( context, context.constant_values().GetInstId(query_self_const_id), query_specific_interface); bool query_is_concrete = QueryIsConcrete(context, query_self_const_id, query_specific_interface); + // If we have a symbolic witness in the self query, then the query can not be + // concrete: the query includes a symbolic self value. + CARBON_CHECK(!self_facet_provides_witness || !query_is_concrete); + + // If the self value is a (symbolic) facet value that has a symbolic witness, + // then we don't need to do impl lookup, except that we want to find any final + // impls to return a concrete witness if possible. So we limit the query to + // final impls only in that case. Note as in the CHECK above, the query can + // not be concrete in this case, so only final impls can produce a concrete + // witness for this query. auto candidate_impls = CollectCandidateImplsForQuery( - context, /*final_only=*/false, query_type_structure, + context, self_facet_provides_witness, query_type_structure, query_specific_interface); for (const auto& candidate : candidate_impls) { @@ -642,51 +655,15 @@ auto EvalLookupSingleImplWitness(Context& context, SemIR::LocId loc_id, return result; } } + + if (self_facet_provides_witness) { + // If we did not find a final impl, but the self value is a facet that + // provides a symbolic witness, when we record that an impl will exist for + // the specific, but is yet unknown. + return EvalImplLookupResult::MakeNonFinal(); + } + return EvalImplLookupResult::MakeNone(); } -auto LookupFinalImplWitnessForSpecificInterface( - Context& context, SemIR::LocId loc_id, - SemIR::ConstantId query_self_const_id, - SemIR::SpecificInterface query_specific_interface) -> SemIR::InstId { - // This would mean we need to UnwrapFacetAccessType(query_self_const_id), but - // it's already done by member access, which is the one use of this function. - CARBON_DCHECK(!context.insts().Is( - context.constant_values().GetInstId(query_self_const_id))); - - auto query_type_structure = BuildTypeStructure( - context, context.constant_values().GetInstId(query_self_const_id), - query_specific_interface); - bool query_is_concrete = - QueryIsConcrete(context, query_self_const_id, query_specific_interface); - - auto candidate_impls = CollectCandidateImplsForQuery( - context, /*final_only=*/true, query_type_structure, - query_specific_interface); - - for (const auto& candidate : candidate_impls) { - // In deferred lookup for a symbolic impl witness, while building a - // specific, there may be no stack yet as this may be the first lookup. If - // further lookups are started as a result in deduce, they will build the - // stack. - // - // NOTE: Don't retain a reference into the stack, it may be invalidated if - // we do further impl lookups when GetWitnessIdForImpl() does deduction. - if (!context.impl_lookup_stack().empty()) { - context.impl_lookup_stack().back().impl_loc = candidate.loc_inst_id; - } - - // NOTE: GetWitnessIdForImpl() does deduction, which can cause new impls - // to be imported, invalidating any pointer into `context.impls()`. - auto result = GetWitnessIdForImpl( - context, loc_id, query_is_concrete, query_self_const_id, - query_specific_interface, candidate.impl_id); - if (result.has_value()) { - CARBON_CHECK(result.has_concrete_value()); - return result.concrete_witness(); - } - } - return SemIR::InstId::None; -} - } // namespace Carbon::Check diff --git a/toolchain/check/impl_lookup.h b/toolchain/check/impl_lookup.h index b9237b7e4324..c33b170576c5 100644 --- a/toolchain/check/impl_lookup.h +++ b/toolchain/check/impl_lookup.h @@ -46,7 +46,7 @@ auto LookupImplWitness(Context& context, SemIR::LocId loc_id, // - A symbolic value. Lookup found an impl but it is not returned since lookup // will need to be done again with a more specific query to look for // specializations. -class EvalImplLookupResult { +class [[nodiscard]] EvalImplLookupResult { public: static auto MakeNone() -> EvalImplLookupResult { return EvalImplLookupResult(SemIR::InstId::None); @@ -70,7 +70,8 @@ class EvalImplLookupResult { // `has_value()` is true, it means a non-final impl was found and a further // more specific query will need to be done. auto has_concrete_value() const -> bool { - return std::holds_alternative(result_); + const auto* inst_id = std::get_if(&result_); + return inst_id && inst_id->has_value(); } // Only valid if `has_concrete_value()` is true. Returns the witness id for @@ -94,21 +95,10 @@ class EvalImplLookupResult { // the self facet value for finding a witness, since LookupImplWitness() would // have found that and not caused us to defer lookup to here. auto EvalLookupSingleImplWitness(Context& context, SemIR::LocId loc_id, - SemIR::LookupImplWitness eval_query) + SemIR::LookupImplWitness eval_query, + SemIR::InstId non_canonical_query_self_inst_id) -> EvalImplLookupResult; -// Looks for a witness of a _final_ impl declaration. Since only final impls are -// returned, it always returns a concrete ImplWitness or None, it will never -// return a symbolic LookupImplWitness instruction. -// -// Generally prefer to call LookupImplWitness(). This method is used to look for -// a final specialization in order to get concrete associated constants in -// generic contexts. -auto LookupFinalImplWitnessForSpecificInterface( - Context& context, SemIR::LocId loc_id, - SemIR::ConstantId query_self_const_id, - SemIR::SpecificInterface query_specific_interface) -> SemIR::InstId; - } // namespace Carbon::Check #endif // CARBON_TOOLCHAIN_CHECK_IMPL_LOOKUP_H_ diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index a1febeb162dd..7870db7b2a36 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -2452,22 +2452,6 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, .facet_value_inst_id = facet_value_inst_id}); } -static auto TryResolveTypedInst(ImportRefResolver& resolver, - SemIR::FacetAccessWitness inst) - -> ResolveResult { - auto facet_value_inst_id = - GetLocalConstantInstId(resolver, inst.facet_value_inst_id); - if (resolver.HasNewWork()) { - return ResolveResult::Retry(); - } - - return ResolveAs( - resolver, {.type_id = GetSingletonType(resolver.local_context(), - SemIR::WitnessType::TypeInstId), - .facet_value_inst_id = facet_value_inst_id, - .index = inst.index}); -} - static auto TryResolveTypedInst(ImportRefResolver& resolver, SemIR::FacetType inst) -> ResolveResult { CARBON_CHECK(inst.type_id == SemIR::TypeType::TypeId); @@ -2942,9 +2926,6 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver, case CARBON_KIND(SemIR::FacetAccessType inst): { return TryResolveTypedInst(resolver, inst); } - case CARBON_KIND(SemIR::FacetAccessWitness inst): { - return TryResolveTypedInst(resolver, inst); - } case CARBON_KIND(SemIR::FacetType inst): { return TryResolveTypedInst(resolver, inst); } diff --git a/toolchain/check/member_access.cpp b/toolchain/check/member_access.cpp index 1ce3e5d7191a..40505aa47231 100644 --- a/toolchain/check/member_access.cpp +++ b/toolchain/check/member_access.cpp @@ -12,8 +12,10 @@ #include "toolchain/check/context.h" #include "toolchain/check/convert.h" #include "toolchain/check/eval.h" +#include "toolchain/check/facet_type.h" #include "toolchain/check/impl_lookup.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" @@ -315,68 +317,15 @@ static auto LookupMemberNameInScope(Context& context, SemIR::LocId loc_id, auto assoc_interface = assoc_type->GetSpecificInterface(); // Witness that `T` implements the `assoc_interface`. - SemIR::InstId witness_inst_id = SemIR::InstId::None; - - bool is_lookup_in_period_self = false; - if (auto name = context.insts().TryGetAs(base_id)) { - if (name->name_id == SemIR::NameId::PeriodSelf) { - is_lookup_in_period_self = true; - } - } - - // TODO: In `.Self` we want to find the witness through its FacetType, - // which is the code below this block. Instead of special-casing that - // here, we could have the impl lookup also include witnesses - // (FacetAccessWitness) from the FacetType? And even non-final results. - // Then we just call into lookup once here, for `.Self` or otherwise, - // and can drop the construction of FacetAccessWitness from this - // function, and resolve TODO below that for "associated entity not - // found in facet type". - if (!is_lookup_in_period_self) { - // For an associated constant value, we need to do impl lookup to try - // find a final impl declaration. If we find one, we can use the value - // assigned to the constant there, instead of its symbolic value. - auto assoc_entity = context.insts().GetAs( - context.constant_values().GetConstantInstId( - result.scope_result.target_inst_id())); - if (context.insts().Is( - assoc_entity.decl_id)) { - witness_inst_id = LookupFinalImplWitnessForSpecificInterface( - context, loc_id, context.constant_values().Get(base_id), - assoc_interface); - } - } - - if (!witness_inst_id.has_value()) { - // First look for `assoc_interface` in the type of the base. If it is - // found, get the witness that the interface is implemented from - // `base_id`. - auto identified_id = RequireIdentifiedFacetType(context, *facet_type); - const auto& identified = - context.identified_facet_types().Get(identified_id); - for (auto [index, base_interface] : - llvm::enumerate(identified.required_interfaces())) { - // Get the witness that `T` implements `base_type_id`. - if (base_interface == assoc_interface) { - witness_inst_id = - GetOrAddInst(context, loc_id, - SemIR::FacetAccessWitness{ - .type_id = GetSingletonType( - context, SemIR::WitnessType::TypeInstId), - .facet_value_inst_id = base_id, - .index = SemIR::ElementIndex(index)}); - break; - } - } - } - // TODO: If that fails, would need to do impl lookup to see if the facet - // value implements the interface of `*assoc_type`. - if (!witness_inst_id.has_value()) { - context.TODO(member_id, - "associated entity not found in facet type, need to do " - "impl lookup"); - return SemIR::ErrorInst::InstId; - } + auto lookup_result = LookupImplWitness( + context, loc_id, context.constant_values().Get(base_id), + EvalOrAddInst( + context, loc_id, + FacetTypeFromInterface(context, assoc_interface.interface_id, + assoc_interface.specific_id))); + CARBON_CHECK(lookup_result.has_value()); + auto witness_inst_id = + GetWitnessFromSingleImplLookupResult(context, lookup_result); member_id = AccessMemberOfImplWitness( context, loc_id, base_as_type.type_id, witness_inst_id, @@ -642,13 +591,16 @@ static auto GetAssociatedValueImpl(Context& context, SemIR::LocId loc_id, } auto self_type_id = context.types().GetTypeIdForTypeConstantId(self_type_const_id); - auto witness_id = GetOrAddInst( - context, loc_id, - SemIR::FacetAccessWitness{ - .type_id = GetSingletonType(context, SemIR::WitnessType::TypeInstId), - .facet_value_inst_id = facet_inst_id, - // There's only one interface in this facet type. - .index = SemIR::ElementIndex(0)}); + + auto lookup_result = LookupImplWitness( + context, loc_id, context.constant_values().Get(facet_inst_id), + EvalOrAddInst(context, loc_id, + FacetTypeFromInterface(context, interface.interface_id, + interface.specific_id))); + CARBON_CHECK(lookup_result.has_value()); + auto witness_id = + GetWitnessFromSingleImplLookupResult(context, lookup_result); + // Before we can access the element of the witness, we need to figure out // the type of that element. It depends on the self type and the specific // interface. diff --git a/toolchain/check/testdata/facet/min_prelude/access.carbon b/toolchain/check/testdata/facet/min_prelude/access.carbon index fcf6a9d51add..5ae2f48ddb33 100644 --- a/toolchain/check/testdata/facet/min_prelude/access.carbon +++ b/toolchain/check/testdata/facet/min_prelude/access.carbon @@ -158,10 +158,10 @@ interface J { // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.4a9: type = fn_type_with_self_type %DoIt.type, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.4a9 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.ded: type = fn_type_with_self_type %DoIt.type, %I.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.ded = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @DoIt(%I.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -208,10 +208,10 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc9_4.2: type = facet_access_type %T.loc8_8.2 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_4.2: = facet_access_witness %T.loc8_8.2, element0 [symbolic = %T.as_wit.iface0.loc9_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc9_4.2, (%T.as_wit.iface0.loc9_4.2) [symbolic = %I.facet (constants.%I.facet)] -// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%DoIt.type, %I.facet [symbolic = %.loc9_4.2 (constants.%.4a9)] -// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Use.%.loc9_4.2 (%.4a9) = impl_witness_access %T.as_wit.iface0.loc9_4.2, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.2, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc9_4.2, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet)] +// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%DoIt.type, %I.facet [symbolic = %.loc9_4.2 (constants.%.ded)] +// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Use.%.loc9_4.2 (%.ded) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @DoIt(%I.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -220,8 +220,7 @@ interface J { // CHECK:STDOUT: %DoIt.ref: %I.assoc_type = name_ref DoIt, @I.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc9_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_4.1: type = converted %T.ref, %T.as_type.loc9_4.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_4.1: = facet_access_witness %T.ref, element0 [symbolic = %T.as_wit.iface0.loc9_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Use.%.loc9_4.2 (%.4a9) = impl_witness_access %T.as_wit.iface0.loc9_4.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Use.%.loc9_4.2 (%.ded) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @DoIt(constants.%I.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc9_10: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() // CHECK:STDOUT: return @@ -255,10 +254,10 @@ interface J { // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.878: type = fn_type_with_self_type %Make.type, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.878 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.44c: type = fn_type_with_self_type %Make.type, %I.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.44c = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Make(%I.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -325,10 +324,10 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_18.2 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_11.2: = facet_access_witness %T.loc8_8.2, element0 [symbolic = %T.as_wit.iface0.loc9_11.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc8_18.2, (%T.as_wit.iface0.loc9_11.2) [symbolic = %I.facet (constants.%I.facet)] -// CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%Make.type, %I.facet [symbolic = %.loc9_11.2 (constants.%.878)] -// CHECK:STDOUT: %impl.elem0.loc9_11.2: @Use.%.loc9_11.2 (%.878) = impl_witness_access %T.as_wit.iface0.loc9_11.2, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.2, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc8_18.2, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet)] +// CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%Make.type, %I.facet [symbolic = %.loc9_11.2 (constants.%.44c)] +// CHECK:STDOUT: %impl.elem0.loc9_11.2: @Use.%.loc9_11.2 (%.44c) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem0.loc9_11.2, @Make(%I.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @Use.%T.as_type.loc8_18.2 (%T.as_type) { @@ -337,8 +336,7 @@ interface J { // CHECK:STDOUT: %Make.ref: %I.assoc_type = name_ref Make, @I.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_18.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_11.1: type = converted %T.ref.loc9, %T.as_type.loc9 [symbolic = %T.as_type.loc8_18.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_11.1: = facet_access_witness %T.ref.loc9, element0 [symbolic = %T.as_wit.iface0.loc9_11.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_11.1: @Use.%.loc9_11.2 (%.878) = impl_witness_access %T.as_wit.iface0.loc9_11.1, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_11.1: @Use.%.loc9_11.2 (%.44c) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem0.loc9_11.1, @Make(constants.%I.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc9_17: init @Use.%T.as_type.loc8_18.2 (%T.as_type) = call %specific_impl_fn.loc9_11.1() // CHECK:STDOUT: %.loc9_18.1: @Use.%T.as_type.loc8_18.2 (%T.as_type) = value_of_initializer %.loc9_17 @@ -381,10 +379,10 @@ interface J { // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.f63: type = fn_type_with_self_type %Copy.type, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.f63 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.e3b: type = fn_type_with_self_type %Copy.type, %I.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.e3b = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Copy(%I.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -469,10 +467,10 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_18.2 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_11.2: = facet_access_witness %T.loc8_8.2, element0 [symbolic = %T.as_wit.iface0.loc9_11.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc8_18.2, (%T.as_wit.iface0.loc9_11.2) [symbolic = %I.facet (constants.%I.facet)] -// CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%Copy.type, %I.facet [symbolic = %.loc9_11.2 (constants.%.f63)] -// CHECK:STDOUT: %impl.elem0.loc9_11.2: @Use.%.loc9_11.2 (%.f63) = impl_witness_access %T.as_wit.iface0.loc9_11.2, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.2, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc8_18.2, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet)] +// CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%Copy.type, %I.facet [symbolic = %.loc9_11.2 (constants.%.e3b)] +// CHECK:STDOUT: %impl.elem0.loc9_11.2: @Use.%.loc9_11.2 (%.e3b) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem0.loc9_11.2, @Copy(%I.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Use.%T.as_type.loc8_18.2 (%T.as_type)) -> @Use.%T.as_type.loc8_18.2 (%T.as_type) { @@ -481,8 +479,7 @@ interface J { // CHECK:STDOUT: %Copy.ref: %I.assoc_type = name_ref Copy, @I.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_18.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_11.1: type = converted constants.%T, %T.as_type.loc9 [symbolic = %T.as_type.loc8_18.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_11.1: = facet_access_witness constants.%T, element0 [symbolic = %T.as_wit.iface0.loc9_11.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_11.1: @Use.%.loc9_11.2 (%.f63) = impl_witness_access %T.as_wit.iface0.loc9_11.1, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_11.1: @Use.%.loc9_11.2 (%.e3b) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc9_11: = bound_method %x.ref, %impl.elem0.loc9_11.1 // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem0.loc9_11.1, @Copy(constants.%I.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc9_17: = bound_method %x.ref, %specific_impl_fn.loc9_11.1 @@ -527,10 +524,10 @@ interface J { // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.d6b: type = fn_type_with_self_type %Hello.type, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.d6b = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.e1d: type = fn_type_with_self_type %Hello.type, %I.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.e1d = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Hello(%I.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -587,10 +584,10 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_18.2 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_4.2: = facet_access_witness %T.loc8_8.2, element0 [symbolic = %T.as_wit.iface0.loc9_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc8_18.2, (%T.as_wit.iface0.loc9_4.2) [symbolic = %I.facet (constants.%I.facet)] -// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%Hello.type, %I.facet [symbolic = %.loc9_4.2 (constants.%.d6b)] -// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Use.%.loc9_4.2 (%.d6b) = impl_witness_access %T.as_wit.iface0.loc9_4.2, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.2, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc8_18.2, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet)] +// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%Hello.type, %I.facet [symbolic = %.loc9_4.2 (constants.%.e1d)] +// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Use.%.loc9_4.2 (%.e1d) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @Hello(%I.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Use.%T.as_type.loc8_18.2 (%T.as_type)) { @@ -599,8 +596,7 @@ interface J { // CHECK:STDOUT: %Hello.ref: %I.assoc_type = name_ref Hello, @I.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_18.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_4.1: type = converted constants.%T, %T.as_type.loc9 [symbolic = %T.as_type.loc8_18.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_4.1: = facet_access_witness constants.%T, element0 [symbolic = %T.as_wit.iface0.loc9_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Use.%.loc9_4.2 (%.d6b) = impl_witness_access %T.as_wit.iface0.loc9_4.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Use.%.loc9_4.2 (%.e1d) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @Hello(constants.%I.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc9_11: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() // CHECK:STDOUT: return @@ -635,10 +631,10 @@ interface J { // CHECK:STDOUT: %UseIndirect.type: type = fn_type @UseIndirect [concrete] // CHECK:STDOUT: %UseIndirect: %UseIndirect.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.f63: type = fn_type_with_self_type %Copy.type, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.f63 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.e3b: type = fn_type_with_self_type %Copy.type, %I.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.e3b = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Copy(%I.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -723,10 +719,10 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_26.2 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_14.2: = facet_access_witness %T.loc8_16.2, element0 [symbolic = %T.as_wit.iface0.loc9_14.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc8_26.2, (%T.as_wit.iface0.loc9_14.2) [symbolic = %I.facet (constants.%I.facet)] -// CHECK:STDOUT: %.loc9_14.2: type = fn_type_with_self_type constants.%Copy.type, %I.facet [symbolic = %.loc9_14.2 (constants.%.f63)] -// CHECK:STDOUT: %impl.elem0.loc9_14.2: @UseIndirect.%.loc9_14.2 (%.f63) = impl_witness_access %T.as_wit.iface0.loc9_14.2, element0 [symbolic = %impl.elem0.loc9_14.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_16.2, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc8_26.2, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet)] +// CHECK:STDOUT: %.loc9_14.2: type = fn_type_with_self_type constants.%Copy.type, %I.facet [symbolic = %.loc9_14.2 (constants.%.e3b)] +// CHECK:STDOUT: %impl.elem0.loc9_14.2: @UseIndirect.%.loc9_14.2 (%.e3b) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_14.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_14.2: = specific_impl_function %impl.elem0.loc9_14.2, @Copy(%I.facet) [symbolic = %specific_impl_fn.loc9_14.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @UseIndirect.%T.as_type.loc8_26.2 (%T.as_type)) -> @UseIndirect.%T.as_type.loc8_26.2 (%T.as_type) { @@ -736,8 +732,7 @@ interface J { // CHECK:STDOUT: %Copy.ref: %I.assoc_type = name_ref Copy, @I.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_26.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_14.1: type = converted %T.ref.loc9, %T.as_type.loc9 [symbolic = %T.as_type.loc8_26.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_14.1: = facet_access_witness %T.ref.loc9, element0 [symbolic = %T.as_wit.iface0.loc9_14.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_14.1: @UseIndirect.%.loc9_14.2 (%.f63) = impl_witness_access %T.as_wit.iface0.loc9_14.1, element0 [symbolic = %impl.elem0.loc9_14.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_14.1: @UseIndirect.%.loc9_14.2 (%.e3b) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_14.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc9_11: = bound_method %x.ref, %impl.elem0.loc9_14.1 // CHECK:STDOUT: %specific_impl_fn.loc9_14.1: = specific_impl_function %impl.elem0.loc9_14.1, @Copy(constants.%I.facet) [symbolic = %specific_impl_fn.loc9_14.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc9_21: = bound_method %x.ref, %specific_impl_fn.loc9_14.1 @@ -781,9 +776,9 @@ interface J { // CHECK:STDOUT: %require_complete: = require_complete_type %U [symbolic] // CHECK:STDOUT: %.Self: %I.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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [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] @@ -829,8 +824,7 @@ interface J { // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self [concrete = constants.%I_where.type] { @@ -921,9 +915,9 @@ interface J { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%T [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self, element0 [symbolic] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %Self.as_type, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %Self.as_type, (%J.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %Id.specific_fn: = specific_function %Id, @Id(type) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -972,8 +966,7 @@ interface J { // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, call_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Id.ref: %Id.type = name_ref Id, file.%Id.decl [concrete = constants.%Id] -// CHECK:STDOUT: %Self.as_wit.iface0.loc11_16.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc11_16.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc11_16.2: type = impl_witness_access %Self.as_wit.iface0.loc11_16.2, element0 [symbolic = %impl.elem0.loc11_16.1 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc11_16.2: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.1 (constants.%impl.elem0)] // CHECK:STDOUT: %T.ref: type = name_ref T, %impl.elem0.loc11_16.2 [symbolic = %impl.elem0.loc11_16.1 (constants.%impl.elem0)] // CHECK:STDOUT: %Id.specific_fn: = specific_function %Id.ref, @Id(type) [concrete = constants.%Id.specific_fn] // CHECK:STDOUT: %Id.call: init type = call %Id.specific_fn(%T.ref) @@ -1012,8 +1005,8 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc11_16.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc11_16.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc11_16.1: type = impl_witness_access %Self.as_wit.iface0.loc11_16.1, element0 [symbolic = %impl.elem0.loc11_16.1 (constants.%impl.elem0)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)] +// CHECK:STDOUT: %impl.elem0.loc11_16.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.1 (constants.%impl.elem0)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } @@ -1037,7 +1030,7 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_wit.iface0.loc11_16.1 => constants.%Self.as_wit.iface0 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness // CHECK:STDOUT: %impl.elem0.loc11_16.1 => constants.%impl.elem0 // CHECK:STDOUT: } // CHECK:STDOUT: 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 0a5589aed3d8..93d67656027d 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 @@ -106,16 +106,16 @@ fn F() { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.383: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface1: = facet_access_witness %T.2df, element1 [symbolic] -// CHECK:STDOUT: %A.facet.5b4: %A.type = facet_value %T.as_type, (%T.as_wit.iface1) [symbolic] -// CHECK:STDOUT: %.860: type = fn_type_with_self_type %AA.type.b97, %A.facet.5b4 [symbolic] -// CHECK:STDOUT: %impl.elem0.656: %.860 = impl_witness_access %T.as_wit.iface1, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.d89: = specific_impl_function %impl.elem0.656, @AA.1(%A.facet.5b4) [symbolic] -// CHECK:STDOUT: %T.as_wit.iface2: = facet_access_witness %T.2df, element2 [symbolic] -// CHECK:STDOUT: %B.facet.abf: %B.type = facet_value %T.as_type, (%T.as_wit.iface2) [symbolic] -// CHECK:STDOUT: %.a5b: type = fn_type_with_self_type %BB.type.64d, %B.facet.abf [symbolic] -// CHECK:STDOUT: %impl.elem0.097: %.a5b = impl_witness_access %T.as_wit.iface2, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.94f: = specific_impl_function %impl.elem0.097, @BB.1(%B.facet.abf) [symbolic] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.2df, @A [symbolic] +// CHECK:STDOUT: %A.facet.487: %A.type = facet_value %T.as_type, (%A.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.fde: type = fn_type_with_self_type %AA.type.b97, %A.facet.487 [symbolic] +// CHECK:STDOUT: %impl.elem0.de2: %.fde = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.086: = specific_impl_function %impl.elem0.de2, @AA.1(%A.facet.487) [symbolic] +// CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.2df, @B [symbolic] +// CHECK:STDOUT: %B.facet.8d1: %B.type = facet_value %T.as_type, (%B.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.368: type = fn_type_with_self_type %BB.type.64d, %B.facet.8d1 [symbolic] +// CHECK:STDOUT: %impl.elem0.43b: %.368 = impl_witness_access %B.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.573: = specific_impl_function %impl.elem0.43b, @BB.1(%B.facet.8d1) [symbolic] // 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] @@ -337,16 +337,16 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc32_28.2 [symbolic = %require_complete (constants.%require_complete.383)] -// CHECK:STDOUT: %T.as_wit.iface1.loc33_4.2: = facet_access_witness %T.loc32_6.2, element1 [symbolic = %T.as_wit.iface1.loc33_4.2 (constants.%T.as_wit.iface1)] -// CHECK:STDOUT: %A.facet.loc33: %A.type = facet_value %T.as_type.loc32_28.2, (%T.as_wit.iface1.loc33_4.2) [symbolic = %A.facet.loc33 (constants.%A.facet.5b4)] -// CHECK:STDOUT: %.loc33_4.2: type = fn_type_with_self_type constants.%AA.type.b97, %A.facet.loc33 [symbolic = %.loc33_4.2 (constants.%.860)] -// CHECK:STDOUT: %impl.elem0.loc33_4.2: @G.%.loc33_4.2 (%.860) = impl_witness_access %T.as_wit.iface1.loc33_4.2, element0 [symbolic = %impl.elem0.loc33_4.2 (constants.%impl.elem0.656)] -// CHECK:STDOUT: %specific_impl_fn.loc33_4.2: = specific_impl_function %impl.elem0.loc33_4.2, @AA.1(%A.facet.loc33) [symbolic = %specific_impl_fn.loc33_4.2 (constants.%specific_impl_fn.d89)] -// CHECK:STDOUT: %T.as_wit.iface2.loc34_4.2: = facet_access_witness %T.loc32_6.2, element2 [symbolic = %T.as_wit.iface2.loc34_4.2 (constants.%T.as_wit.iface2)] -// CHECK:STDOUT: %B.facet.loc34: %B.type = facet_value %T.as_type.loc32_28.2, (%T.as_wit.iface2.loc34_4.2) [symbolic = %B.facet.loc34 (constants.%B.facet.abf)] -// CHECK:STDOUT: %.loc34_4.2: type = fn_type_with_self_type constants.%BB.type.64d, %B.facet.loc34 [symbolic = %.loc34_4.2 (constants.%.a5b)] -// CHECK:STDOUT: %impl.elem0.loc34_4.2: @G.%.loc34_4.2 (%.a5b) = impl_witness_access %T.as_wit.iface2.loc34_4.2, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.097)] -// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @BB.1(%B.facet.loc34) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.94f)] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc32_6.2, @A [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] +// CHECK:STDOUT: %A.facet.loc33: %A.type = facet_value %T.as_type.loc32_28.2, (%A.lookup_impl_witness) [symbolic = %A.facet.loc33 (constants.%A.facet.487)] +// CHECK:STDOUT: %.loc33_4.2: type = fn_type_with_self_type constants.%AA.type.b97, %A.facet.loc33 [symbolic = %.loc33_4.2 (constants.%.fde)] +// CHECK:STDOUT: %impl.elem0.loc33_4.2: @G.%.loc33_4.2 (%.fde) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc33_4.2 (constants.%impl.elem0.de2)] +// CHECK:STDOUT: %specific_impl_fn.loc33_4.2: = specific_impl_function %impl.elem0.loc33_4.2, @AA.1(%A.facet.loc33) [symbolic = %specific_impl_fn.loc33_4.2 (constants.%specific_impl_fn.086)] +// CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.loc32_6.2, @B [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness)] +// CHECK:STDOUT: %B.facet.loc34: %B.type = facet_value %T.as_type.loc32_28.2, (%B.lookup_impl_witness) [symbolic = %B.facet.loc34 (constants.%B.facet.8d1)] +// CHECK:STDOUT: %.loc34_4.2: type = fn_type_with_self_type constants.%BB.type.64d, %B.facet.loc34 [symbolic = %.loc34_4.2 (constants.%.368)] +// CHECK:STDOUT: %impl.elem0.loc34_4.2: @G.%.loc34_4.2 (%.368) = impl_witness_access %B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.43b)] +// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @BB.1(%B.facet.loc34) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.573)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc32_28.2 (%T.as_type)) { // CHECK:STDOUT: !entry: @@ -354,55 +354,47 @@ fn F() { // CHECK:STDOUT: %AA.ref.loc33: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] // CHECK:STDOUT: %T.as_type.loc33: type = facet_access_type constants.%T.2df [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc33_4.1: type = converted constants.%T.2df, %T.as_type.loc33 [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface1.loc33_4.1: = facet_access_witness constants.%T.2df, element1 [symbolic = %T.as_wit.iface1.loc33_4.2 (constants.%T.as_wit.iface1)] -// CHECK:STDOUT: %impl.elem0.loc33_4.1: @G.%.loc33_4.2 (%.860) = impl_witness_access %T.as_wit.iface1.loc33_4.1, element0 [symbolic = %impl.elem0.loc33_4.2 (constants.%impl.elem0.656)] -// CHECK:STDOUT: %specific_impl_fn.loc33_4.1: = specific_impl_function %impl.elem0.loc33_4.1, @AA.1(constants.%A.facet.5b4) [symbolic = %specific_impl_fn.loc33_4.2 (constants.%specific_impl_fn.d89)] +// CHECK:STDOUT: %impl.elem0.loc33_4.1: @G.%.loc33_4.2 (%.fde) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc33_4.2 (constants.%impl.elem0.de2)] +// CHECK:STDOUT: %specific_impl_fn.loc33_4.1: = specific_impl_function %impl.elem0.loc33_4.1, @AA.1(constants.%A.facet.487) [symbolic = %specific_impl_fn.loc33_4.2 (constants.%specific_impl_fn.086)] // CHECK:STDOUT: %.loc33_8: init %empty_tuple.type = call %specific_impl_fn.loc33_4.1() // CHECK:STDOUT: %t.ref.loc34: @G.%T.as_type.loc32_28.2 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %BB.ref.loc34: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] // CHECK:STDOUT: %T.as_type.loc34: type = facet_access_type constants.%T.2df [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc34_4.1: type = converted constants.%T.2df, %T.as_type.loc34 [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface2.loc34_4.1: = facet_access_witness constants.%T.2df, element2 [symbolic = %T.as_wit.iface2.loc34_4.2 (constants.%T.as_wit.iface2)] -// CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34_4.2 (%.a5b) = impl_witness_access %T.as_wit.iface2.loc34_4.1, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.097)] -// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @BB.1(constants.%B.facet.abf) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.94f)] +// CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34_4.2 (%.368) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.43b)] +// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @BB.1(constants.%B.facet.8d1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.573)] // CHECK:STDOUT: %.loc34_8: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() // CHECK:STDOUT: %T.ref.loc36: %facet_type.242 = name_ref T, %T.loc32_6.1 [symbolic = %T.loc32_6.2 (constants.%T.2df)] // CHECK:STDOUT: %AA.ref.loc36: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] // CHECK:STDOUT: %T.as_type.loc36: type = facet_access_type %T.ref.loc36 [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc36_4: type = converted %T.ref.loc36, %T.as_type.loc36 [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface1.loc36: = facet_access_witness %T.ref.loc36, element1 [symbolic = %T.as_wit.iface1.loc33_4.2 (constants.%T.as_wit.iface1)] -// CHECK:STDOUT: %impl.elem0.loc36: @G.%.loc33_4.2 (%.860) = impl_witness_access %T.as_wit.iface1.loc36, element0 [symbolic = %impl.elem0.loc33_4.2 (constants.%impl.elem0.656)] -// CHECK:STDOUT: %specific_impl_fn.loc36: = specific_impl_function %impl.elem0.loc36, @AA.1(constants.%A.facet.5b4) [symbolic = %specific_impl_fn.loc33_4.2 (constants.%specific_impl_fn.d89)] +// CHECK:STDOUT: %impl.elem0.loc36: @G.%.loc33_4.2 (%.fde) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc33_4.2 (constants.%impl.elem0.de2)] +// CHECK:STDOUT: %specific_impl_fn.loc36: = specific_impl_function %impl.elem0.loc36, @AA.1(constants.%A.facet.487) [symbolic = %specific_impl_fn.loc33_4.2 (constants.%specific_impl_fn.086)] // CHECK:STDOUT: %.loc36_8: init %empty_tuple.type = call %specific_impl_fn.loc36() // CHECK:STDOUT: %T.ref.loc37: %facet_type.242 = name_ref T, %T.loc32_6.1 [symbolic = %T.loc32_6.2 (constants.%T.2df)] // CHECK:STDOUT: %BB.ref.loc37: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] // CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc37_4: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface2.loc37: = facet_access_witness %T.ref.loc37, element2 [symbolic = %T.as_wit.iface2.loc34_4.2 (constants.%T.as_wit.iface2)] -// CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34_4.2 (%.a5b) = impl_witness_access %T.as_wit.iface2.loc37, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.097)] -// CHECK:STDOUT: %specific_impl_fn.loc37: = specific_impl_function %impl.elem0.loc37, @BB.1(constants.%B.facet.abf) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.94f)] +// CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34_4.2 (%.368) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.43b)] +// CHECK:STDOUT: %specific_impl_fn.loc37: = specific_impl_function %impl.elem0.loc37, @BB.1(constants.%B.facet.8d1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.573)] // CHECK:STDOUT: %.loc37_8: init %empty_tuple.type = call %specific_impl_fn.loc37() // CHECK:STDOUT: %T.ref.loc39: %facet_type.242 = name_ref T, %T.loc32_6.1 [symbolic = %T.loc32_6.2 (constants.%T.2df)] // CHECK:STDOUT: %A.ref.loc39: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %AA.ref.loc39: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] -// CHECK:STDOUT: %T.as_wit.iface1.loc39: = facet_access_witness constants.%T.2df, element1 [symbolic = %T.as_wit.iface1.loc33_4.2 (constants.%T.as_wit.iface1)] // CHECK:STDOUT: %T.as_type.loc39: type = facet_access_type constants.%T.2df [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] -// CHECK:STDOUT: %A.facet.loc39: %A.type = facet_value %T.as_type.loc39, (%T.as_wit.iface1.loc39) [symbolic = %A.facet.loc33 (constants.%A.facet.5b4)] -// CHECK:STDOUT: %.loc39_4: %A.type = converted %T.ref.loc39, %A.facet.loc39 [symbolic = %A.facet.loc33 (constants.%A.facet.5b4)] -// CHECK:STDOUT: %as_wit.iface0.loc39: = facet_access_witness %.loc39_4, element0 [symbolic = %T.as_wit.iface1.loc33_4.2 (constants.%T.as_wit.iface1)] -// CHECK:STDOUT: %impl.elem0.loc39: @G.%.loc33_4.2 (%.860) = impl_witness_access %as_wit.iface0.loc39, element0 [symbolic = %impl.elem0.loc33_4.2 (constants.%impl.elem0.656)] -// CHECK:STDOUT: %specific_impl_fn.loc39: = specific_impl_function %impl.elem0.loc39, @AA.1(constants.%A.facet.5b4) [symbolic = %specific_impl_fn.loc33_4.2 (constants.%specific_impl_fn.d89)] +// CHECK:STDOUT: %A.facet.loc39: %A.type = facet_value %T.as_type.loc39, (constants.%A.lookup_impl_witness) [symbolic = %A.facet.loc33 (constants.%A.facet.487)] +// CHECK:STDOUT: %.loc39_4: %A.type = converted %T.ref.loc39, %A.facet.loc39 [symbolic = %A.facet.loc33 (constants.%A.facet.487)] +// CHECK:STDOUT: %impl.elem0.loc39: @G.%.loc33_4.2 (%.fde) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc33_4.2 (constants.%impl.elem0.de2)] +// CHECK:STDOUT: %specific_impl_fn.loc39: = specific_impl_function %impl.elem0.loc39, @AA.1(constants.%A.facet.487) [symbolic = %specific_impl_fn.loc33_4.2 (constants.%specific_impl_fn.086)] // CHECK:STDOUT: %.loc39_12: init %empty_tuple.type = call %specific_impl_fn.loc39() // CHECK:STDOUT: %T.ref.loc40: %facet_type.242 = name_ref T, %T.loc32_6.1 [symbolic = %T.loc32_6.2 (constants.%T.2df)] // CHECK:STDOUT: %B.ref.loc40: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: %BB.ref.loc40: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] -// CHECK:STDOUT: %T.as_wit.iface2.loc40: = facet_access_witness constants.%T.2df, element2 [symbolic = %T.as_wit.iface2.loc34_4.2 (constants.%T.as_wit.iface2)] // CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type constants.%T.2df [symbolic = %T.as_type.loc32_28.2 (constants.%T.as_type)] -// CHECK:STDOUT: %B.facet.loc40: %B.type = facet_value %T.as_type.loc40, (%T.as_wit.iface2.loc40) [symbolic = %B.facet.loc34 (constants.%B.facet.abf)] -// CHECK:STDOUT: %.loc40_4: %B.type = converted %T.ref.loc40, %B.facet.loc40 [symbolic = %B.facet.loc34 (constants.%B.facet.abf)] -// CHECK:STDOUT: %as_wit.iface0.loc40: = facet_access_witness %.loc40_4, element0 [symbolic = %T.as_wit.iface2.loc34_4.2 (constants.%T.as_wit.iface2)] -// CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34_4.2 (%.a5b) = impl_witness_access %as_wit.iface0.loc40, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.097)] -// CHECK:STDOUT: %specific_impl_fn.loc40: = specific_impl_function %impl.elem0.loc40, @BB.1(constants.%B.facet.abf) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.94f)] +// CHECK:STDOUT: %B.facet.loc40: %B.type = facet_value %T.as_type.loc40, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc34 (constants.%B.facet.8d1)] +// CHECK:STDOUT: %.loc40_4: %B.type = converted %T.ref.loc40, %B.facet.loc40 [symbolic = %B.facet.loc34 (constants.%B.facet.8d1)] +// CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34_4.2 (%.368) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.43b)] +// CHECK:STDOUT: %specific_impl_fn.loc40: = specific_impl_function %impl.elem0.loc40, @BB.1(constants.%B.facet.8d1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.573)] // CHECK:STDOUT: %.loc40_12: init %empty_tuple.type = call %specific_impl_fn.loc40() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -475,9 +467,9 @@ fn F() { // CHECK:STDOUT: %T.as_type.loc32_28.2 => constants.%T.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AA.1(constants.%A.facet.5b4) {} +// CHECK:STDOUT: specific @AA.1(constants.%A.facet.487) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @BB.1(constants.%B.facet.abf) {} +// CHECK:STDOUT: specific @BB.1(constants.%B.facet.8d1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @AA.1(@G.%A.facet.loc33) {} // CHECK:STDOUT: @@ -490,12 +482,12 @@ 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.%A.impl_witness +// CHECK:STDOUT: %A.lookup_impl_witness => 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.%B.impl_witness +// CHECK:STDOUT: %B.lookup_impl_witness => 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 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 44d7697bcc19..912a3a44c5ca 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 @@ -137,11 +137,11 @@ fn B() { // CHECK:STDOUT: %Generic.assoc_type.0fd877.2: type = assoc_entity_type @Generic, @Generic(%T) [symbolic] // CHECK:STDOUT: %assoc0.2966cb.2: %Generic.assoc_type.0fd877.2 = assoc_entity element0, @Generic.%F.decl [symbolic] // CHECK:STDOUT: %require_complete.02a: = require_complete_type %Generic.type.91ccba.2 [symbolic] -// CHECK:STDOUT: %U.as_wit.iface0: = facet_access_witness %U, element0 [symbolic] -// CHECK:STDOUT: %Generic.facet.0aa: %Generic.type.91ccba.2 = facet_value %U.as_type, (%U.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.10b: type = fn_type_with_self_type %F.type.f439a9.2, %Generic.facet.0aa [symbolic] -// CHECK:STDOUT: %impl.elem0: %.10b = impl_witness_access %U.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%T, %Generic.facet.0aa) [symbolic] +// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U, @Generic, @Generic(%T) [symbolic] +// CHECK:STDOUT: %Generic.facet.680: %Generic.type.91ccba.2 = facet_value %U.as_type, (%Generic.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.177: type = fn_type_with_self_type %F.type.f439a9.2, %Generic.facet.680 [symbolic] +// CHECK:STDOUT: %impl.elem0: %.177 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%T, %Generic.facet.680) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %ImplsGeneric.val: %ImplsGeneric = struct_value () [concrete] @@ -285,11 +285,11 @@ fn B() { // CHECK:STDOUT: %require_complete.loc16: = require_complete_type %Generic.type.loc15_45.2 [symbolic = %require_complete.loc16 (constants.%require_complete.02a)] // CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc15_22.2) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.0fd877.2)] // CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.0fd877.2) = assoc_entity element0, @Generic.%F.decl [symbolic = %assoc0 (constants.%assoc0.2966cb.2)] -// CHECK:STDOUT: %U.as_wit.iface0.loc16_4.2: = facet_access_witness %U.loc15_32.2, element0 [symbolic = %U.as_wit.iface0.loc16_4.2 (constants.%U.as_wit.iface0)] +// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U.loc15_32.2, @Generic, @Generic(%T.loc15_22.2) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @Generic(%T.loc15_22.2) [symbolic = %F.type (constants.%F.type.f439a9.2)] -// CHECK:STDOUT: %Generic.facet: @CallGenericMethod.%Generic.type.loc15_45.2 (%Generic.type.91ccba.2) = facet_value %U.as_type.loc15_51.2, (%U.as_wit.iface0.loc16_4.2) [symbolic = %Generic.facet (constants.%Generic.facet.0aa)] -// CHECK:STDOUT: %.loc16_4.3: type = fn_type_with_self_type %F.type, %Generic.facet [symbolic = %.loc16_4.3 (constants.%.10b)] -// CHECK:STDOUT: %impl.elem0.loc16_4.2: @CallGenericMethod.%.loc16_4.3 (%.10b) = impl_witness_access %U.as_wit.iface0.loc16_4.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %Generic.facet: @CallGenericMethod.%Generic.type.loc15_45.2 (%Generic.type.91ccba.2) = facet_value %U.as_type.loc15_51.2, (%Generic.lookup_impl_witness) [symbolic = %Generic.facet (constants.%Generic.facet.680)] +// CHECK:STDOUT: %.loc16_4.3: type = fn_type_with_self_type %F.type, %Generic.facet [symbolic = %.loc16_4.3 (constants.%.177)] +// CHECK:STDOUT: %impl.elem0.loc16_4.2: @CallGenericMethod.%.loc16_4.3 (%.177) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @F.1(%T.loc15_22.2, %Generic.facet) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @CallGenericMethod.%U.as_type.loc15_51.2 (%U.as_type), %s.param: @CallGenericMethod.%T.loc15_22.2 (%T)) { @@ -299,9 +299,8 @@ fn B() { // CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.0fd877.2) = name_ref F, %.loc16_4.1 [symbolic = %assoc0 (constants.%assoc0.2966cb.2)] // CHECK:STDOUT: %U.as_type.loc16: type = facet_access_type %U.ref.loc16 [symbolic = %U.as_type.loc15_51.2 (constants.%U.as_type)] // CHECK:STDOUT: %.loc16_4.2: type = converted %U.ref.loc16, %U.as_type.loc16 [symbolic = %U.as_type.loc15_51.2 (constants.%U.as_type)] -// CHECK:STDOUT: %U.as_wit.iface0.loc16_4.1: = facet_access_witness %U.ref.loc16, element0 [symbolic = %U.as_wit.iface0.loc16_4.2 (constants.%U.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.10b) = impl_witness_access %U.as_wit.iface0.loc16_4.1, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @F.1(constants.%T, constants.%Generic.facet.0aa) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.177) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @F.1(constants.%T, constants.%Generic.facet.680) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc16_7: init %empty_tuple.type = call %specific_impl_fn.loc16_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -379,7 +378,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc15_22.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Generic.facet.0aa) {} +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Generic.facet.680) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(@CallGenericMethod.%T.loc15_22.2, @CallGenericMethod.%Generic.facet) {} // CHECK:STDOUT: @@ -397,7 +396,7 @@ 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.%Generic.impl_witness +// CHECK:STDOUT: %Generic.lookup_impl_witness => constants.%Generic.impl_witness // CHECK:STDOUT: %F.type => constants.%F.type.4cf // CHECK:STDOUT: %Generic.facet => constants.%Generic.facet.8ff // CHECK:STDOUT: %.loc16_4.3 => constants.%.3e6 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 bafdd6a9dd1c..9b9bff1f2bea 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 @@ -131,8 +131,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %HandleAnimal.type: type = fn_type @HandleAnimal [concrete] // CHECK:STDOUT: %HandleAnimal: %HandleAnimal.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.680: = require_complete_type %U.as_type [symbolic] -// CHECK:STDOUT: %U.as_wit.iface0: = facet_access_witness %U, element0 [symbolic] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %U.as_type, (%U.as_wit.iface0) [symbolic] +// CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %U, @Eats [symbolic] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %U.as_type, (%Eats.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %Feed.specific_fn: = specific_function %Feed, @Feed(%Eats.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -280,19 +280,17 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc8_39.2 [symbolic = %require_complete (constants.%require_complete.680)] -// CHECK:STDOUT: %U.as_wit.iface0.loc8_50.3: = facet_access_witness %U.loc8_17.2, element0 [symbolic = %U.as_wit.iface0.loc8_50.3 (constants.%U.as_wit.iface0)] -// CHECK:STDOUT: %Eats.facet.loc8_50.3: %Eats.type = facet_value %U.as_type.loc8_39.2, (%U.as_wit.iface0.loc8_50.3) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %U.loc8_17.2, @Eats [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] +// CHECK:STDOUT: %Eats.facet.loc8_50.3: %Eats.type = facet_value %U.as_type.loc8_39.2, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] // CHECK:STDOUT: %Feed.specific_fn.loc8_44.2: = specific_function constants.%Feed, @Feed(%Eats.facet.loc8_50.3) [symbolic = %Feed.specific_fn.loc8_44.2 (constants.%Feed.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @HandleAnimal.%U.as_type.loc8_39.2 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Feed.ref: %Feed.type = name_ref Feed, file.%Feed.decl [concrete = constants.%Feed] // CHECK:STDOUT: %a.ref: @HandleAnimal.%U.as_type.loc8_39.2 (%U.as_type) = name_ref a, %a -// CHECK:STDOUT: %U.as_wit.iface0.loc8_50.1: = facet_access_witness constants.%U, element0 [symbolic = %U.as_wit.iface0.loc8_50.3 (constants.%U.as_wit.iface0)] -// CHECK:STDOUT: %Eats.facet.loc8_50.1: %Eats.type = facet_value constants.%U.as_type, (%U.as_wit.iface0.loc8_50.1) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %Eats.facet.loc8_50.1: %Eats.type = facet_value constants.%U.as_type, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] // CHECK:STDOUT: %.loc8_50.1: %Eats.type = converted constants.%U.as_type, %Eats.facet.loc8_50.1 [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %U.as_wit.iface0.loc8_50.2: = facet_access_witness constants.%U, element0 [symbolic = %U.as_wit.iface0.loc8_50.3 (constants.%U.as_wit.iface0)] -// CHECK:STDOUT: %Eats.facet.loc8_50.2: %Eats.type = facet_value constants.%U.as_type, (%U.as_wit.iface0.loc8_50.2) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %Eats.facet.loc8_50.2: %Eats.type = facet_value constants.%U.as_type, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] // CHECK:STDOUT: %.loc8_50.2: %Eats.type = converted constants.%U.as_type, %Eats.facet.loc8_50.2 [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] // CHECK:STDOUT: %Feed.specific_fn.loc8_44.1: = specific_function %Feed.ref, @Feed(constants.%Eats.facet) [symbolic = %Feed.specific_fn.loc8_44.2 (constants.%Feed.specific_fn)] // CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn.loc8_44.1(%a.ref) @@ -408,9 +406,9 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %HandleTameAnimal.type: type = fn_type @HandleTameAnimal [concrete] // CHECK:STDOUT: %HandleTameAnimal: %HandleTameAnimal.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.40f: = require_complete_type %W.as_type [symbolic] -// CHECK:STDOUT: %W.as_wit.iface0: = facet_access_witness %W, element0 [symbolic] -// CHECK:STDOUT: %W.as_wit.iface2: = facet_access_witness %W, element2 [symbolic] -// CHECK:STDOUT: %facet_value: %facet_type.6ff = facet_value %W.as_type, (%W.as_wit.iface0, %W.as_wit.iface2) [symbolic] +// CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %W, @Eats [symbolic] +// CHECK:STDOUT: %Tame.lookup_impl_witness: = lookup_impl_witness %W, @Tame [symbolic] +// CHECK:STDOUT: %facet_value: %facet_type.6ff = facet_value %W.as_type, (%Eats.lookup_impl_witness, %Tame.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %FeedTame.specific_fn: = specific_function %FeedTame, @FeedTame(%facet_value) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -586,22 +584,18 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %W.as_type.loc9_50.2 [symbolic = %require_complete (constants.%require_complete.40f)] -// CHECK:STDOUT: %W.as_wit.iface0.loc10_13.3: = facet_access_witness %W.loc9_21.2, element0 [symbolic = %W.as_wit.iface0.loc10_13.3 (constants.%W.as_wit.iface0)] -// CHECK:STDOUT: %W.as_wit.iface2.loc10_13.3: = facet_access_witness %W.loc9_21.2, element2 [symbolic = %W.as_wit.iface2.loc10_13.3 (constants.%W.as_wit.iface2)] -// CHECK:STDOUT: %facet_value.loc10_13.3: %facet_type.6ff = facet_value %W.as_type.loc9_50.2, (%W.as_wit.iface0.loc10_13.3, %W.as_wit.iface2.loc10_13.3) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] +// CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %W.loc9_21.2, @Eats [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] +// CHECK:STDOUT: %Tame.lookup_impl_witness: = lookup_impl_witness %W.loc9_21.2, @Tame [symbolic = %Tame.lookup_impl_witness (constants.%Tame.lookup_impl_witness)] +// CHECK:STDOUT: %facet_value.loc10_13.3: %facet_type.6ff = facet_value %W.as_type.loc9_50.2, (%Eats.lookup_impl_witness, %Tame.lookup_impl_witness) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] // CHECK:STDOUT: %FeedTame.specific_fn.loc10_3.2: = specific_function constants.%FeedTame, @FeedTame(%facet_value.loc10_13.3) [symbolic = %FeedTame.specific_fn.loc10_3.2 (constants.%FeedTame.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%w.param: @HandleTameAnimal.%W.as_type.loc9_50.2 (%W.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %FeedTame.ref: %FeedTame.type = name_ref FeedTame, file.%FeedTame.decl [concrete = constants.%FeedTame] // CHECK:STDOUT: %w.ref: @HandleTameAnimal.%W.as_type.loc9_50.2 (%W.as_type) = name_ref w, %w -// CHECK:STDOUT: %W.as_wit.iface0.loc10_13.1: = facet_access_witness constants.%W, element0 [symbolic = %W.as_wit.iface0.loc10_13.3 (constants.%W.as_wit.iface0)] -// CHECK:STDOUT: %W.as_wit.iface2.loc10_13.1: = facet_access_witness constants.%W, element2 [symbolic = %W.as_wit.iface2.loc10_13.3 (constants.%W.as_wit.iface2)] -// CHECK:STDOUT: %facet_value.loc10_13.1: %facet_type.6ff = facet_value constants.%W.as_type, (%W.as_wit.iface0.loc10_13.1, %W.as_wit.iface2.loc10_13.1) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc10_13.1: %facet_type.6ff = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, constants.%Tame.lookup_impl_witness) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] // CHECK:STDOUT: %.loc10_13.1: %facet_type.6ff = converted constants.%W.as_type, %facet_value.loc10_13.1 [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] -// CHECK:STDOUT: %W.as_wit.iface0.loc10_13.2: = facet_access_witness constants.%W, element0 [symbolic = %W.as_wit.iface0.loc10_13.3 (constants.%W.as_wit.iface0)] -// CHECK:STDOUT: %W.as_wit.iface2.loc10_13.2: = facet_access_witness constants.%W, element2 [symbolic = %W.as_wit.iface2.loc10_13.3 (constants.%W.as_wit.iface2)] -// CHECK:STDOUT: %facet_value.loc10_13.2: %facet_type.6ff = facet_value constants.%W.as_type, (%W.as_wit.iface0.loc10_13.2, %W.as_wit.iface2.loc10_13.2) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc10_13.2: %facet_type.6ff = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, constants.%Tame.lookup_impl_witness) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] // CHECK:STDOUT: %.loc10_13.2: %facet_type.6ff = converted constants.%W.as_type, %facet_value.loc10_13.2 [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] // CHECK:STDOUT: %FeedTame.specific_fn.loc10_3.1: = specific_function %FeedTame.ref, @FeedTame(constants.%facet_value) [symbolic = %FeedTame.specific_fn.loc10_3.2 (constants.%FeedTame.specific_fn)] // CHECK:STDOUT: %FeedTame.call: init %empty_tuple.type = call %FeedTame.specific_fn.loc10_3.1(%w.ref) @@ -718,12 +712,12 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %HandleTameAnimal2.type: type = fn_type @HandleTameAnimal2 [concrete] // CHECK:STDOUT: %HandleTameAnimal2: %HandleTameAnimal2.type = struct_value () [concrete] // 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: %Eats.impl_witness.498: = impl_witness file.%Eats.impl_witness_table, @impl.e7b(%Animal.facet) [symbolic] +// CHECK:STDOUT: %Animal.lookup_impl_witness: = lookup_impl_witness %W, @Animal [symbolic] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %W.as_type, (%Animal.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %Eats.impl_witness.e5d: = 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] +// CHECK:STDOUT: %Tame.lookup_impl_witness: = lookup_impl_witness %W, @Tame [symbolic] +// CHECK:STDOUT: %facet_value: %facet_type.6ff = facet_value %W.as_type, (%Eats.lookup_impl_witness, %Tame.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %FeedTame2.specific_fn: = specific_function %FeedTame2, @FeedTame2(%facet_value) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -917,11 +911,11 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %W.as_type.loc11_44.2 [symbolic = %require_complete (constants.%require_complete.ba9)] -// CHECK:STDOUT: %W.as_wit.iface0.loc12_14.3: = facet_access_witness %W.loc11_22.2, element0 [symbolic = %W.as_wit.iface0.loc12_14.3 (constants.%W.as_wit.iface0)] -// CHECK:STDOUT: %Animal.facet.loc12_14.3: %Animal.type = facet_value %W.as_type.loc11_44.2, (%W.as_wit.iface0.loc12_14.3) [symbolic = %Animal.facet.loc12_14.3 (constants.%Animal.facet)] +// CHECK:STDOUT: %Animal.lookup_impl_witness: = lookup_impl_witness %W.loc11_22.2, @Animal [symbolic = %Animal.lookup_impl_witness (constants.%Animal.lookup_impl_witness)] +// CHECK:STDOUT: %Animal.facet.loc12_14.3: %Animal.type = facet_value %W.as_type.loc11_44.2, (%Animal.lookup_impl_witness) [symbolic = %Animal.facet.loc12_14.3 (constants.%Animal.facet)] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %W.loc11_22.2, @Eats [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] -// CHECK:STDOUT: %W.as_wit.iface1.loc12_14.3: = facet_access_witness %W.loc11_22.2, element1 [symbolic = %W.as_wit.iface1.loc12_14.3 (constants.%W.as_wit.iface1)] -// CHECK:STDOUT: %facet_value.loc12_14.3: %facet_type.6ff = facet_value %W.as_type.loc11_44.2, (%Eats.lookup_impl_witness, %W.as_wit.iface1.loc12_14.3) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] +// CHECK:STDOUT: %Tame.lookup_impl_witness: = lookup_impl_witness %W.loc11_22.2, @Tame [symbolic = %Tame.lookup_impl_witness (constants.%Tame.lookup_impl_witness)] +// CHECK:STDOUT: %facet_value.loc12_14.3: %facet_type.6ff = facet_value %W.as_type.loc11_44.2, (%Eats.lookup_impl_witness, %Tame.lookup_impl_witness) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] // CHECK:STDOUT: %FeedTame2.specific_fn.loc12_3.2: = specific_function constants.%FeedTame2, @FeedTame2(%facet_value.loc12_14.3) [symbolic = %FeedTame2.specific_fn.loc12_3.2 (constants.%FeedTame2.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%w.param: @HandleTameAnimal2.%W.as_type.loc11_44.2 (%W.as_type)) { @@ -930,19 +924,15 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %w.ref: @HandleTameAnimal2.%W.as_type.loc11_44.2 (%W.as_type) = name_ref w, %w // CHECK:STDOUT: %W.as_type.loc12_14.1: type = facet_access_type constants.%W [symbolic = %W.as_type.loc11_44.2 (constants.%W.as_type)] // CHECK:STDOUT: %.loc12_14.1: type = converted constants.%W, %W.as_type.loc12_14.1 [symbolic = %W.as_type.loc11_44.2 (constants.%W.as_type)] -// CHECK:STDOUT: %W.as_wit.iface0.loc12_14.1: = facet_access_witness constants.%W, element0 [symbolic = %W.as_wit.iface0.loc12_14.3 (constants.%W.as_wit.iface0)] -// CHECK:STDOUT: %Animal.facet.loc12_14.1: %Animal.type = facet_value constants.%W.as_type, (%W.as_wit.iface0.loc12_14.1) [symbolic = %Animal.facet.loc12_14.3 (constants.%Animal.facet)] +// CHECK:STDOUT: %Animal.facet.loc12_14.1: %Animal.type = facet_value constants.%W.as_type, (constants.%Animal.lookup_impl_witness) [symbolic = %Animal.facet.loc12_14.3 (constants.%Animal.facet)] // CHECK:STDOUT: %.loc12_14.2: %Animal.type = converted %.loc12_14.1, %Animal.facet.loc12_14.1 [symbolic = %Animal.facet.loc12_14.3 (constants.%Animal.facet)] -// CHECK:STDOUT: %W.as_wit.iface1.loc12_14.1: = facet_access_witness constants.%W, element1 [symbolic = %W.as_wit.iface1.loc12_14.3 (constants.%W.as_wit.iface1)] -// CHECK:STDOUT: %facet_value.loc12_14.1: %facet_type.6ff = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, %W.as_wit.iface1.loc12_14.1) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc12_14.1: %facet_type.6ff = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, constants.%Tame.lookup_impl_witness) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] // CHECK:STDOUT: %.loc12_14.3: %facet_type.6ff = converted constants.%W.as_type, %facet_value.loc12_14.1 [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] // CHECK:STDOUT: %W.as_type.loc12_14.2: type = facet_access_type constants.%W [symbolic = %W.as_type.loc11_44.2 (constants.%W.as_type)] // CHECK:STDOUT: %.loc12_14.4: type = converted constants.%W, %W.as_type.loc12_14.2 [symbolic = %W.as_type.loc11_44.2 (constants.%W.as_type)] -// CHECK:STDOUT: %W.as_wit.iface0.loc12_14.2: = facet_access_witness constants.%W, element0 [symbolic = %W.as_wit.iface0.loc12_14.3 (constants.%W.as_wit.iface0)] -// CHECK:STDOUT: %Animal.facet.loc12_14.2: %Animal.type = facet_value constants.%W.as_type, (%W.as_wit.iface0.loc12_14.2) [symbolic = %Animal.facet.loc12_14.3 (constants.%Animal.facet)] +// CHECK:STDOUT: %Animal.facet.loc12_14.2: %Animal.type = facet_value constants.%W.as_type, (constants.%Animal.lookup_impl_witness) [symbolic = %Animal.facet.loc12_14.3 (constants.%Animal.facet)] // CHECK:STDOUT: %.loc12_14.5: %Animal.type = converted %.loc12_14.4, %Animal.facet.loc12_14.2 [symbolic = %Animal.facet.loc12_14.3 (constants.%Animal.facet)] -// CHECK:STDOUT: %W.as_wit.iface1.loc12_14.2: = facet_access_witness constants.%W, element1 [symbolic = %W.as_wit.iface1.loc12_14.3 (constants.%W.as_wit.iface1)] -// CHECK:STDOUT: %facet_value.loc12_14.2: %facet_type.6ff = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, %W.as_wit.iface1.loc12_14.2) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc12_14.2: %facet_type.6ff = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, constants.%Tame.lookup_impl_witness) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] // CHECK:STDOUT: %.loc12_14.6: %facet_type.6ff = converted constants.%W.as_type, %facet_value.loc12_14.2 [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] // CHECK:STDOUT: %FeedTame2.specific_fn.loc12_3.1: = specific_function %FeedTame2.ref, @FeedTame2(constants.%facet_value) [symbolic = %FeedTame2.specific_fn.loc12_3.2 (constants.%FeedTame2.specific_fn)] // CHECK:STDOUT: %FeedTame2.call: init %empty_tuple.type = call %FeedTame2.specific_fn.loc12_3.1(%w.ref) @@ -1009,7 +999,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: %Eats.impl_witness => constants.%Eats.impl_witness.498 +// CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.e5d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon b/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon index a0046b967af2..f2106231ff0b 100644 --- a/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon @@ -359,9 +359,9 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %Z.assoc_type.252: type = assoc_entity_type @Z, @Z(%C) [concrete] // CHECK:STDOUT: %assoc0.ea4: %Z.assoc_type.252 = assoc_entity element0, @Z.%X [concrete] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @Z, @Z(%C) [symbolic_self] +// CHECK:STDOUT: %Z.facet: %Z.type.049 = facet_value %.Self.as_type, (%Z.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%C) where %impl.elem0 = %empty_tuple.type> [concrete] // CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table, @impl(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -401,8 +401,7 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %X.ref: %Z.assoc_type.252 = name_ref X, %.loc8_46.1 [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_46.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc8_52.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_52.2: type = converted %.loc8_52.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc8_40: type = where_expr %.Self [concrete = constants.%Z_where.type] { 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 3269de8a9bf0..675a9b1ed43e 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 @@ -86,11 +86,11 @@ fn G() { // CHECK:STDOUT: %assoc0.2966cb.2: %Generic.assoc_type.0fd877.2 = assoc_entity element0, @Generic.%F.decl [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Generic.type.91ccba.2 [symbolic] // CHECK:STDOUT: %U.as_type: type = facet_access_type %U [symbolic] -// CHECK:STDOUT: %U.as_wit.iface0: = facet_access_witness %U, element0 [symbolic] -// CHECK:STDOUT: %Generic.facet.0aa: %Generic.type.91ccba.2 = facet_value %U.as_type, (%U.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.10b: type = fn_type_with_self_type %F.type.f439a9.2, %Generic.facet.0aa [symbolic] -// CHECK:STDOUT: %impl.elem0: %.10b = impl_witness_access %U.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%T, %Generic.facet.0aa) [symbolic] +// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U, @Generic, @Generic(%T) [symbolic] +// CHECK:STDOUT: %Generic.facet.680: %Generic.type.91ccba.2 = facet_value %U.as_type, (%Generic.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.177: type = fn_type_with_self_type %F.type.f439a9.2, %Generic.facet.680 [symbolic] +// CHECK:STDOUT: %impl.elem0: %.177 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%T, %Generic.facet.680) [symbolic] // 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] @@ -250,11 +250,11 @@ fn G() { // CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc29_22.2) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.0fd877.2)] // CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.0fd877.2) = assoc_entity element0, @Generic.%F.decl [symbolic = %assoc0 (constants.%assoc0.2966cb.2)] // CHECK:STDOUT: %U.as_type.loc30_4.2: type = facet_access_type %U.loc29_32.2 [symbolic = %U.as_type.loc30_4.2 (constants.%U.as_type)] -// CHECK:STDOUT: %U.as_wit.iface0.loc30_4.2: = facet_access_witness %U.loc29_32.2, element0 [symbolic = %U.as_wit.iface0.loc30_4.2 (constants.%U.as_wit.iface0)] +// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U.loc29_32.2, @Generic, @Generic(%T.loc29_22.2) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @Generic(%T.loc29_22.2) [symbolic = %F.type (constants.%F.type.f439a9.2)] -// CHECK:STDOUT: %Generic.facet: @CallGenericMethod.%Generic.type.loc29_45.2 (%Generic.type.91ccba.2) = facet_value %U.as_type.loc30_4.2, (%U.as_wit.iface0.loc30_4.2) [symbolic = %Generic.facet (constants.%Generic.facet.0aa)] -// CHECK:STDOUT: %.loc30_4.3: type = fn_type_with_self_type %F.type, %Generic.facet [symbolic = %.loc30_4.3 (constants.%.10b)] -// CHECK:STDOUT: %impl.elem0.loc30_4.2: @CallGenericMethod.%.loc30_4.3 (%.10b) = impl_witness_access %U.as_wit.iface0.loc30_4.2, element0 [symbolic = %impl.elem0.loc30_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %Generic.facet: @CallGenericMethod.%Generic.type.loc29_45.2 (%Generic.type.91ccba.2) = facet_value %U.as_type.loc30_4.2, (%Generic.lookup_impl_witness) [symbolic = %Generic.facet (constants.%Generic.facet.680)] +// CHECK:STDOUT: %.loc30_4.3: type = fn_type_with_self_type %F.type, %Generic.facet [symbolic = %.loc30_4.3 (constants.%.177)] +// CHECK:STDOUT: %impl.elem0.loc30_4.2: @CallGenericMethod.%.loc30_4.3 (%.177) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc30_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc30_4.2: = specific_impl_function %impl.elem0.loc30_4.2, @F.1(%T.loc29_22.2, %Generic.facet) [symbolic = %specific_impl_fn.loc30_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -264,9 +264,8 @@ fn G() { // CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.0fd877.2) = name_ref F, %.loc30_4.1 [symbolic = %assoc0 (constants.%assoc0.2966cb.2)] // CHECK:STDOUT: %U.as_type.loc30_4.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc30_4.2 (constants.%U.as_type)] // CHECK:STDOUT: %.loc30_4.2: type = converted %U.ref, %U.as_type.loc30_4.1 [symbolic = %U.as_type.loc30_4.2 (constants.%U.as_type)] -// CHECK:STDOUT: %U.as_wit.iface0.loc30_4.1: = facet_access_witness %U.ref, element0 [symbolic = %U.as_wit.iface0.loc30_4.2 (constants.%U.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc30_4.1: @CallGenericMethod.%.loc30_4.3 (%.10b) = impl_witness_access %U.as_wit.iface0.loc30_4.1, element0 [symbolic = %impl.elem0.loc30_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc30_4.1: = specific_impl_function %impl.elem0.loc30_4.1, @F.1(constants.%T, constants.%Generic.facet.0aa) [symbolic = %specific_impl_fn.loc30_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %impl.elem0.loc30_4.1: @CallGenericMethod.%.loc30_4.3 (%.177) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc30_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc30_4.1: = specific_impl_function %impl.elem0.loc30_4.1, @F.1(constants.%T, constants.%Generic.facet.680) [symbolic = %specific_impl_fn.loc30_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc30_7: init %empty_tuple.type = call %specific_impl_fn.loc30_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -335,7 +334,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc29_22.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Generic.facet.0aa) {} +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Generic.facet.680) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(@CallGenericMethod.%T.loc29_22.2, @CallGenericMethod.%Generic.facet) {} // CHECK:STDOUT: @@ -351,7 +350,7 @@ 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.%Generic.impl_witness +// CHECK:STDOUT: %Generic.lookup_impl_witness => constants.%Generic.impl_witness // CHECK:STDOUT: %F.type => constants.%F.type.4cf // CHECK:STDOUT: %Generic.facet => constants.%Generic.facet.8ff // CHECK:STDOUT: %.loc30_4.3 => constants.%.3e6 diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index f79b951c31b6..8ba3277ff713 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -1807,18 +1807,18 @@ fn F() { // CHECK:STDOUT: %facet_type: type = facet_type <@Y & @W> [concrete] // CHECK:STDOUT: %E: %facet_type = bind_symbolic_name E, 0 [symbolic] // CHECK:STDOUT: %E.patt: %facet_type = symbolic_binding_pattern E, 0 [symbolic] -// CHECK:STDOUT: %E.as_wit.iface0: = facet_access_witness %E, element0 [symbolic] +// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %E, @Y [symbolic] // 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: %Z.impl_witness.6bf: = impl_witness file.%Z.impl_witness_table, @impl.0ce(%E) [symbolic] +// CHECK:STDOUT: %Y.facet.7ec: %Y.type = facet_value %E.as_type, (%Y.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %CC.d02: type = class_type @CC, @CC(%Y.facet.7ec) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.741: = impl_witness file.%Z.impl_witness_table, @impl.562(%E) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [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: %Z.impl_witness.3b0: = impl_witness file.%Z.impl_witness_table, @impl.562(%facet_value) [concrete] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC.7bf, (%Z.impl_witness.3b0) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1862,16 +1862,15 @@ fn F() { // CHECK:STDOUT: %D.loc12_10.1: %Y.type = bind_symbolic_name D, 0 [symbolic = %D.loc12_10.2 (constants.%D)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.decl: type = interface_decl @Z [concrete = constants.%Z.type] {} {} -// CHECK:STDOUT: impl_decl @impl.0ce [concrete] { +// CHECK:STDOUT: impl_decl @impl.562 [concrete] { // CHECK:STDOUT: %E.patt.loc19_14.1: %facet_type = symbolic_binding_pattern E, 0 [symbolic = %E.patt.loc19_14.2 (constants.%E.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %CC.ref: %CC.type = name_ref CC, file.%CC.decl [concrete = constants.%CC.generic] // CHECK:STDOUT: %E.ref: %facet_type = name_ref E, %E.loc19_14.1 [symbolic = %E.loc19_14.2 (constants.%E)] -// CHECK:STDOUT: %E.as_wit.iface0.loc19_29.1: = facet_access_witness constants.%E, element0 [symbolic = %E.as_wit.iface0.loc19_29.2 (constants.%E.as_wit.iface0)] // CHECK:STDOUT: %E.as_type.loc19_29.1: type = facet_access_type constants.%E [symbolic = %E.as_type.loc19_29.2 (constants.%E.as_type)] -// CHECK:STDOUT: %Y.facet.loc19_29.1: %Y.type = facet_value %E.as_type.loc19_29.1, (%E.as_wit.iface0.loc19_29.1) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.15a)] -// CHECK:STDOUT: %.loc19_29: %Y.type = converted %E.ref, %Y.facet.loc19_29.1 [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.15a)] -// CHECK:STDOUT: %CC.loc19_29.1: type = class_type @CC, @CC(constants.%Y.facet.15a) [symbolic = %CC.loc19_29.2 (constants.%CC.ed1)] +// CHECK:STDOUT: %Y.facet.loc19_29.1: %Y.type = facet_value %E.as_type.loc19_29.1, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.7ec)] +// CHECK:STDOUT: %.loc19_29: %Y.type = converted %E.ref, %Y.facet.loc19_29.1 [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.7ec)] +// CHECK:STDOUT: %CC.loc19_29.1: type = class_type @CC, @CC(constants.%Y.facet.7ec) [symbolic = %CC.loc19_29.2 (constants.%CC.d02)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // 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] @@ -1884,8 +1883,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: %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: %Z.impl_witness_table = impl_witness_table (), @impl.562 [concrete] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness %Z.impl_witness_table, @impl.562(constants.%E) [symbolic = @impl.562.%Z.impl_witness (constants.%Z.impl_witness.741)] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1923,14 +1922,14 @@ fn F() { // CHECK:STDOUT: witness = file.%W.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.0ce(%E.loc19_14.1: %facet_type) { +// CHECK:STDOUT: generic impl @impl.562(%E.loc19_14.1: %facet_type) { // CHECK:STDOUT: %E.loc19_14.2: %facet_type = bind_symbolic_name E, 0 [symbolic = %E.loc19_14.2 (constants.%E)] // CHECK:STDOUT: %E.patt.loc19_14.2: %facet_type = symbolic_binding_pattern E, 0 [symbolic = %E.patt.loc19_14.2 (constants.%E.patt)] -// CHECK:STDOUT: %E.as_wit.iface0.loc19_29.2: = facet_access_witness %E.loc19_14.2, element0 [symbolic = %E.as_wit.iface0.loc19_29.2 (constants.%E.as_wit.iface0)] +// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %E.loc19_14.2, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] // 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: %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: %Y.facet.loc19_29.2: %Y.type = facet_value %E.as_type.loc19_29.2, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.7ec)] +// CHECK:STDOUT: %CC.loc19_29.2: type = class_type @CC, @CC(%Y.facet.loc19_29.2) [symbolic = %CC.loc19_29.2 (constants.%CC.d02)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table, @impl.562(%E.loc19_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.741)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1975,7 +1974,7 @@ fn F() { // 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.%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.7bf, (constants.%Z.impl_witness.1d4) [concrete = constants.%Z.facet] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%CC.7bf, (constants.%Z.impl_witness.3b0) [concrete = constants.%Z.facet] // CHECK:STDOUT: %.loc22_12.2: %Z.type = converted %CC, %Z.facet [concrete = constants.%Z.facet] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1985,38 +1984,38 @@ fn F() { // CHECK:STDOUT: %D.patt.loc12_10.2 => constants.%D.patt // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CC(constants.%Y.facet.15a) { -// CHECK:STDOUT: %D.loc12_10.2 => constants.%Y.facet.15a +// CHECK:STDOUT: specific @CC(constants.%Y.facet.7ec) { +// CHECK:STDOUT: %D.loc12_10.2 => constants.%Y.facet.7ec // CHECK:STDOUT: %D.patt.loc12_10.2 => constants.%D.patt // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.0ce(constants.%E) { +// CHECK:STDOUT: specific @impl.562(constants.%E) { // CHECK:STDOUT: %E.loc19_14.2 => constants.%E // CHECK:STDOUT: %E.patt.loc19_14.2 => constants.%E.patt -// CHECK:STDOUT: %E.as_wit.iface0.loc19_29.2 => constants.%E.as_wit.iface0 +// CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness // 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: %Z.impl_witness => constants.%Z.impl_witness.6bf +// CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.7ec +// CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.d02 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.741 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CC(@impl.0ce.%Y.facet.loc19_29.2) {} +// CHECK:STDOUT: specific @CC(@impl.562.%Y.facet.loc19_29.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.0ce(%E.loc19_14.2) {} +// CHECK:STDOUT: specific @impl.562(%E.loc19_14.2) {} // CHECK:STDOUT: // 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: specific @impl.562(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.%Y.impl_witness +// CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.impl_witness // CHECK:STDOUT: %E.as_type.loc19_29.2 => constants.%DD // 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: %Z.impl_witness => constants.%Z.impl_witness.3b0 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index f84e5189517e..193198c7e29f 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -108,21 +108,21 @@ fn CallF() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %.Self: %I.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] -// CHECK:STDOUT: %I.facet.d87: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, 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: %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: %I_where.type.6ef: type = facet_type <@I where %impl.elem0 = %empty_struct> [concrete] +// CHECK:STDOUT: %I.impl_witness.3d1: = impl_witness file.%I.impl_witness_table.loc8 [concrete] +// CHECK:STDOUT: %I.facet.b01: %I.type = facet_value %empty_struct_type, (%I.impl_witness.3d1) [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: %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: %I_where.type.3d4: type = facet_type <@I where %impl.elem0 = %int_0.5c6> [concrete] +// CHECK:STDOUT: %I.impl_witness.5ef: = impl_witness file.%I.impl_witness_table.loc10 [concrete] +// CHECK:STDOUT: %I.facet.4b7: %I.type = facet_value %i32, (%I.impl_witness.5ef) [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] @@ -155,7 +155,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @impl.77e [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.983 [concrete] {} { // CHECK:STDOUT: %.loc8_7.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] @@ -164,19 +164,18 @@ fn CallF() { // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_26.2: %empty_struct_type = converted %.loc8_26.1, %empty_struct [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%I_where.type.9d4] { +// CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%I_where.type.6ef] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %I.impl_witness_table.loc8 = impl_witness_table (%impl_witness_assoc_constant.loc8), @impl.983 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc8: = impl_witness %I.impl_witness_table.loc8 [concrete = constants.%I.impl_witness.3d1] // 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: impl_decl @impl.728 [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] @@ -185,15 +184,14 @@ fn CallF() { // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [concrete = constants.%I_where.type.b5a] { +// CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [concrete = constants.%I_where.type.3d4] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %I.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @impl.728 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc10: = impl_witness %I.impl_witness_table.loc10 [concrete = constants.%I.impl_witness.5ef] // 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] @@ -224,12 +222,12 @@ fn CallF() { // CHECK:STDOUT: assoc_const V:! @V.%Self.as_type (%Self.as_type.b70); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.77e: %.loc8_7.2 as %.loc8_14 { +// CHECK:STDOUT: impl @impl.983: %.loc8_7.2 as %.loc8_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.a12: %i32 as %.loc10_15 { +// CHECK:STDOUT: impl @impl.728: %i32 as %.loc10_15 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness.loc10 // CHECK:STDOUT: } @@ -240,20 +238,20 @@ fn CallF() { // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.d87) { -// CHECK:STDOUT: %Self => constants.%I.facet.d87 +// CHECK:STDOUT: specific @V(constants.%I.facet.74c) { +// CHECK:STDOUT: %Self => constants.%I.facet.74c // CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.892) { -// CHECK:STDOUT: %Self => constants.%I.facet.892 +// CHECK:STDOUT: specific @V(constants.%I.facet.b01) { +// CHECK:STDOUT: %Self => constants.%I.facet.b01 // 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.7c1) { -// CHECK:STDOUT: %Self => constants.%I.facet.7c1 +// CHECK:STDOUT: specific @V(constants.%I.facet.4b7) { +// CHECK:STDOUT: %Self => constants.%I.facet.4b7 // CHECK:STDOUT: %Self.as_type => constants.%i32 // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: } @@ -270,14 +268,14 @@ fn CallF() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %.Self: %I.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] -// CHECK:STDOUT: %I.facet.d87: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, 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: %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: %I.facet.7ee: %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: @@ -305,8 +303,7 @@ fn CallF() { // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc15_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc15_14: type = where_expr %.Self [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 @@ -349,14 +346,14 @@ fn CallF() { // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.d87) { -// CHECK:STDOUT: %Self => constants.%I.facet.d87 +// CHECK:STDOUT: specific @V(constants.%I.facet.74c) { +// CHECK:STDOUT: %Self => constants.%I.facet.74c // CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.d0c) { -// CHECK:STDOUT: %Self => constants.%I.facet.d0c +// CHECK:STDOUT: specific @V(constants.%I.facet.7ee) { +// CHECK:STDOUT: %Self => constants.%I.facet.7ee // CHECK:STDOUT: %Self.as_type => constants.%empty_struct_type // CHECK:STDOUT: %require_complete => constants.%complete_type // CHECK:STDOUT: } @@ -385,14 +382,14 @@ fn CallF() { // 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] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self, element0 [symbolic_self] -// CHECK:STDOUT: %I.facet.d87: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, 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: %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: %I.facet.5dc: %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: } @@ -425,7 +422,7 @@ fn CallF() { // CHECK:STDOUT: } // 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: impl_decl @impl.cbe [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] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -433,8 +430,7 @@ fn CallF() { // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc18_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc18_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_25.2: %empty_tuple.type = converted %.loc18_25.1, %empty_tuple [concrete = constants.%empty_tuple] @@ -442,7 +438,7 @@ fn CallF() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc18_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.bb1 [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.cbe [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] @@ -498,7 +494,7 @@ fn CallF() { // CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.bb1: %C.ref as %.loc18_13 { +// CHECK:STDOUT: impl @impl.cbe: %C.ref as %.loc18_13 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } @@ -526,14 +522,14 @@ fn CallF() { // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.d87) { -// CHECK:STDOUT: %Self => constants.%I.facet.d87 +// CHECK:STDOUT: specific @V(constants.%I.facet.74c) { +// CHECK:STDOUT: %Self => constants.%I.facet.74c // CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.662) { -// CHECK:STDOUT: %Self => constants.%I.facet.662 +// CHECK:STDOUT: specific @V(constants.%I.facet.5dc) { +// CHECK:STDOUT: %Self => constants.%I.facet.5dc // CHECK:STDOUT: %Self.as_type => constants.%C // CHECK:STDOUT: %require_complete => constants.%complete_type // CHECK:STDOUT: } @@ -573,8 +569,8 @@ fn CallF() { // CHECK:STDOUT: %I.assoc_type.247: type = assoc_entity_type @I, @I(%int_-1) [concrete] // CHECK:STDOUT: %assoc0.350: %I.assoc_type.247 = assoc_entity element0, @I.%V [concrete] // 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] -// CHECK:STDOUT: %I.facet: %I.type.057 = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I, @I(%int_-1) [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type.057 = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -622,8 +618,7 @@ fn CallF() { // CHECK:STDOUT: %V.ref: %I.assoc_type.247 = name_ref V, %.loc15_24.1 [concrete = constants.%assoc0.350] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc15_24.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc15_24: = impl_witness_access %.Self.as_wit.iface0, element0 [concrete = ] +// CHECK:STDOUT: %impl.elem0.loc15_24: = impl_witness_access constants.%I.lookup_impl_witness, element0 [concrete = ] // CHECK:STDOUT: %.loc15_30: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_18: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc15_24, @@ -724,10 +719,10 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] // CHECK:STDOUT: %ImplicitAs.type.2a8: type = facet_type <@ImplicitAs, @ImplicitAs(%.Self.as_type)> [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self, element0 [symbolic_self] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct and TODO> [concrete] // CHECK:STDOUT: %T: %I_where.type = bind_symbolic_name T, 0 [symbolic] @@ -774,8 +769,7 @@ fn CallF() { // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] // CHECK:STDOUT: %.Self.as_type.loc8_54: type = facet_access_type %.Self.ref.loc8_54 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_54: type = converted %.Self.ref.loc8_54, %.Self.as_type.loc8_54 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref.loc8_54, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc8_60.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_60.2: %empty_struct_type = converted %.loc8_60.1, %empty_struct [concrete = constants.%empty_struct] diff --git a/toolchain/check/testdata/impl/impl_assoc_const.carbon b/toolchain/check/testdata/impl/impl_assoc_const.carbon index 193d7232c94e..dd7d56576e54 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const.carbon @@ -42,9 +42,9 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %assoc0.e7f: %I.assoc_type = assoc_entity element0, @I.%X [concrete] // CHECK:STDOUT: %.Self: %I.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] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.a.b.fe2 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %struct_type.a.b.fe2 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -111,7 +111,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @impl.540 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.9be [concrete] {} { // CHECK:STDOUT: %.loc6_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_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] @@ -120,8 +120,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %X.ref.loc6_20: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.e7f] // CHECK:STDOUT: %.Self.as_type.loc6_20: type = facet_access_type %.Self.ref.loc6_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6_20, %.Self.as_type.loc6_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc6_20: = facet_access_witness %.Self.ref.loc6_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc6_20: %struct_type.a.b.fe2 = impl_witness_access %.Self.as_wit.iface0.loc6_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc6_20: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc6_46: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] @@ -149,8 +148,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %X.ref.loc6_54: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.e7f] // CHECK:STDOUT: %.Self.as_type.loc6_54: type = facet_access_type %.Self.ref.loc6_54 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_54: type = converted %.Self.ref.loc6_54, %.Self.as_type.loc6_54 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc6_54: = facet_access_witness %.Self.ref.loc6_54, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc6_54: %struct_type.a.b.fe2 = impl_witness_access %.Self.as_wit.iface0.loc6_54, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc6_54: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %.loc6_65: bool = not %false [concrete = constants.%true] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -192,7 +190,7 @@ 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: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.540 [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.9be [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: } @@ -213,7 +211,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: assoc_const X:! %struct_type.a.b.fe2; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.540: %.loc6_7.2 as %.loc6_14 { +// CHECK:STDOUT: impl @impl.9be: %.loc6_7.2 as %.loc6_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } @@ -236,9 +234,9 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %assoc0.e7f: %I.assoc_type = assoc_entity element0, @I.%X [concrete] // CHECK:STDOUT: %.Self: %I.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] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.a.b.fe2 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %struct_type.a.b.fe2 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -293,7 +291,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @impl.347 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.dd8 [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] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] @@ -302,8 +300,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %X.ref.loc10_20: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.e7f] // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_20: = facet_access_witness %.Self.ref.loc10_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_20: %struct_type.a.b.fe2 = impl_witness_access %.Self.as_wit.iface0.loc10_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_20: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // 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] @@ -331,8 +328,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %X.ref.loc10_54: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.e7f] // CHECK:STDOUT: %.Self.as_type.loc10_54: type = facet_access_type %.Self.ref.loc10_54 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_54: type = converted %.Self.ref.loc10_54, %.Self.as_type.loc10_54 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_54: = facet_access_witness %.Self.ref.loc10_54, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_54: %struct_type.a.b.fe2 = impl_witness_access %.Self.as_wit.iface0.loc10_54, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_54: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // 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] @@ -361,7 +357,7 @@ 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: %I.impl_witness_table = impl_witness_table (), @impl.347 [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.dd8 [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: } @@ -382,7 +378,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: assoc_const X:! %struct_type.a.b.fe2; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.347: %.loc10_7.2 as %.loc10_14 { +// CHECK:STDOUT: impl @impl.dd8: %.loc10_7.2 as %.loc10_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon new file mode 100644 index 000000000000..7a8ce67acc00 --- /dev/null +++ b/toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon @@ -0,0 +1,841 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// INCLUDE-FILE: toolchain/testing/min_prelude/facet_types.carbon +// EXTRA-ARGS: --custom-core +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon + +interface I { + fn II[self: Self](); +} +interface J { + fn JJ[self: Self](); +} + +fn F(T:! I & J, t: T) { + // Nesting FacetValue and FacetAccessTypes, the `lookup_impl_witness` + // instructions should remain canonical, pointing symbolically to `T`, and not + // include these conversions. + (t as (((((((T as I) as type) as J) as type) as I) as type) as J)).JJ(); +} + +fn G() { + class C { + extend impl as I { + fn II[self: Self]() {} + } + extend impl as J { + fn JJ[self: Self]() {} + } + } + // Nesting FacetValue and FacetAccessTypes, the impl lookup for `JJ` resolves + // to a canonical `impl_witness` for the `impl C as J`. + (({} as C) as (((((((C as I) as type) as J) as type) as I) as type) as J)).JJ(); + + // Produces a specific for `F` with a `FacetValue` to replace the + // `BindSymbolicName` parameter `T` when evaluated. The `lookup_impl_witness` + // instructions should be replaced in the specific with concrete + // `impl_witness` instructions for `impl C as I` and `impl C as J`. + F(C, {} as C); +} + +// CHECK:STDOUT: --- canonical_query_self.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] +// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic] +// CHECK:STDOUT: %II.type.465: type = fn_type @II.1 [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %II.a07: %II.type.465 = struct_value () [concrete] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] +// CHECK:STDOUT: %assoc0.82e: %I.assoc_type = assoc_entity element0, @I.%II.decl [concrete] +// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] +// CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] +// CHECK:STDOUT: %JJ.type.622: type = fn_type @JJ.1 [concrete] +// CHECK:STDOUT: %JJ.5f5: %JJ.type.622 = struct_value () [concrete] +// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] +// CHECK:STDOUT: %assoc0.78c: %J.assoc_type = assoc_entity element0, @J.%JJ.decl [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] +// CHECK:STDOUT: %assoc0.d45: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete] +// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %Self.as_type.19f: 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: %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: %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, (%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: %facet_type: type = facet_type <@I & @J> [concrete] +// CHECK:STDOUT: %T.527: %facet_type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.6c2: %facet_type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.527 [symbolic] +// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] +// CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %require_complete.df2: = require_complete_type %T.as_type [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.527, @I [symbolic] +// CHECK:STDOUT: %I.facet.e75: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.527, @J [symbolic] +// CHECK:STDOUT: %J.facet.fa4: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.935: type = fn_type_with_self_type %JJ.type.622, %J.facet.fa4 [symbolic] +// CHECK:STDOUT: %impl.elem0: %.935 = impl_witness_access %J.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @JJ.1(%J.facet.fa4) [symbolic] +// CHECK:STDOUT: %G.type: type = fn_type @G [concrete] +// CHECK:STDOUT: %G: %G.type = struct_value () [concrete] +// CHECK:STDOUT: %C: type = class_type @C [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %II.type.f11: type = fn_type @II.2 [concrete] +// CHECK:STDOUT: %II.b71: %II.type.f11 = struct_value () [concrete] +// CHECK:STDOUT: %I.facet.98f: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness @C.%J.impl_witness_table [concrete] +// CHECK:STDOUT: %JJ.type.811: type = fn_type @JJ.2 [concrete] +// CHECK:STDOUT: %JJ.9c9: %JJ.type.811 = struct_value () [concrete] +// CHECK:STDOUT: %J.facet.5df: %J.type = facet_value %C, (%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: %C.val: %C = struct_value () [concrete] +// CHECK:STDOUT: %.638: type = fn_type_with_self_type %JJ.type.622, %J.facet.5df [concrete] +// CHECK:STDOUT: %facet_value: %facet_type = facet_value %C, (%I.impl_witness, %J.impl_witness) [concrete] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%facet_value) [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst102 [no loc], unloaded +// 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.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.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [concrete] { +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .I = %I.decl +// CHECK:STDOUT: .J = %J.decl +// CHECK:STDOUT: .F = %F.decl +// CHECK:STDOUT: .G = %G.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} +// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { +// CHECK:STDOUT: %T.patt.loc21_6.1: %facet_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_6.2 (constants.%T.patt.6c2)] +// CHECK:STDOUT: %t.patt: @F.%T.as_type.loc21_20.2 (%T.as_type) = binding_pattern t +// CHECK:STDOUT: %t.param_patt: @F.%T.as_type.loc21_20.2 (%T.as_type) = value_param_pattern %t.patt, call_param0 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %.loc21_12.1: type = splice_block %.loc21_12.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %J.ref.loc21: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %impl.elem0.loc21: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444] +// CHECK:STDOUT: %bound_method.loc21_12.1: = bound_method %I.ref.loc21, %impl.elem0.loc21 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc21, @Op.2(type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc21_12.2: = bound_method %I.ref.loc21, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %type.and: init type = call %bound_method.loc21_12.2(%I.ref.loc21, %J.ref.loc21) [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc21_12.2: type = value_of_initializer %type.and [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc21_12.3: type = converted %type.and, %.loc21_12.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: } +// CHECK:STDOUT: %T.loc21_6.1: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.2 (constants.%T.527)] +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc21_20.2 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc21_20.1: type = splice_block %.loc21_20.2 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc21: %facet_type = name_ref T, %T.loc21_6.1 [symbolic = %T.loc21_6.2 (constants.%T.527)] +// CHECK:STDOUT: %T.as_type.loc21_20.1: type = facet_access_type %T.ref.loc21 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc21_20.2: type = converted %T.ref.loc21, %T.as_type.loc21_20.1 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %t: @F.%T.as_type.loc21_20.2 (%T.as_type) = bind_name t, %t.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: interface @I { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %II.decl: %II.type.465 = fn_decl @II.1 [concrete = constants.%II.a07] { +// CHECK:STDOUT: %self.patt: @II.1.%Self.as_type.loc15_15.1 (%Self.as_type.b70) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @II.1.%Self.as_type.loc15_15.1 (%Self.as_type.b70) = value_param_pattern %self.patt, call_param0 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %self.param: @II.1.%Self.as_type.loc15_15.1 (%Self.as_type.b70) = value_param call_param0 +// CHECK:STDOUT: %.loc15_15.1: type = splice_block %.loc15_15.2 [symbolic = %Self.as_type.loc15_15.1 (constants.%Self.as_type.b70)] { +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc15_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc15_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %.loc15_15.2: type = converted %Self.ref, %Self.as_type.loc15_15.2 [symbolic = %Self.as_type.loc15_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %self: @II.1.%Self.as_type.loc15_15.1 (%Self.as_type.b70) = bind_name self, %self.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %II.decl [concrete = constants.%assoc0.82e] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .II = %assoc0 +// CHECK:STDOUT: .JJ = +// CHECK:STDOUT: .J = +// CHECK:STDOUT: witness = (%II.decl) +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: interface @J { +// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd] +// CHECK:STDOUT: %JJ.decl: %JJ.type.622 = fn_decl @JJ.1 [concrete = constants.%JJ.5f5] { +// CHECK:STDOUT: %self.patt: @JJ.1.%Self.as_type.loc18_15.1 (%Self.as_type.3df) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @JJ.1.%Self.as_type.loc18_15.1 (%Self.as_type.3df) = value_param_pattern %self.patt, call_param0 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %self.param: @JJ.1.%Self.as_type.loc18_15.1 (%Self.as_type.3df) = value_param call_param0 +// CHECK:STDOUT: %.loc18_15.1: type = splice_block %.loc18_15.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.3df)] { +// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.ccd)] +// CHECK:STDOUT: %Self.as_type.loc18_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.3df)] +// CHECK:STDOUT: %.loc18_15.2: type = converted %Self.ref, %Self.as_type.loc18_15.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.3df)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %self: @JJ.1.%Self.as_type.loc18_15.1 (%Self.as_type.3df) = bind_name self, %self.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %JJ.decl [concrete = constants.%assoc0.78c] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .JJ = %assoc0 +// CHECK:STDOUT: witness = (%JJ.decl) +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: interface @BitAnd [from "include_files/facet_types.carbon"] { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = imports.%Core.import_ref.ad0 +// CHECK:STDOUT: .Op = imports.%Core.import_ref.a46 +// CHECK:STDOUT: witness = (imports.%Core.Op) +// 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: %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)] +// CHECK:STDOUT: %Op: @impl.f92.%Op.type (%Op.type.f99) = struct_value () [symbolic = %Op (constants.%Op.05a)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4ae)] +// 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.140 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: impl @impl.093: %Self.ref as %I.ref { +// CHECK:STDOUT: %II.decl: %II.type.f11 = fn_decl @II.2 [concrete = constants.%II.b71] { +// CHECK:STDOUT: %self.patt: %C = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, call_param0 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %self.param: %C = value_param call_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] +// CHECK:STDOUT: %self: %C = bind_name self, %self.param +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .II = %II.decl +// CHECK:STDOUT: witness = @C.%I.impl_witness +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: impl @impl.023: %Self.ref as %J.ref { +// CHECK:STDOUT: %JJ.decl: %JJ.type.811 = fn_decl @JJ.2 [concrete = constants.%JJ.9c9] { +// CHECK:STDOUT: %self.patt: %C = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, call_param0 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %self.param: %C = value_param call_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] +// CHECK:STDOUT: %self: %C = bind_name self, %self.param +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .JJ = %JJ.decl +// CHECK:STDOUT: witness = @C.%J.impl_witness +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @C { +// CHECK:STDOUT: impl_decl @impl.093 [concrete] {} { +// 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: %I.impl_witness_table = impl_witness_table (@impl.093.%II.decl), @impl.093 [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] +// CHECK:STDOUT: impl_decl @impl.023 [concrete] {} { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: } +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.023.%JJ.decl), @impl.023 [concrete] +// CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.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 +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: .I = +// CHECK:STDOUT: .J = +// CHECK:STDOUT: .JJ = +// CHECK:STDOUT: extend @impl.093.%I.ref +// CHECK:STDOUT: extend @impl.023.%J.ref +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @II.1(@I.%Self: %I.type) { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc15_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%self.param: @II.1.%Self.as_type.loc15_15.1 (%Self.as_type.b70)); +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @JJ.1(@J.%Self: %J.type) { +// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] +// CHECK:STDOUT: %Self.as_type.loc18_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.3df)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%self.param: @JJ.1.%Self.as_type.loc18_15.1 (%Self.as_type.3df)); +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.040: %BitAnd.type) [from "include_files/facet_types.carbon"] { +// CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.25f)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.19f)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn; +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Op.2(imports.%Core.import_ref.5ab3ec.2: type) [from "include_files/facet_types.carbon"] { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn = "type.and"; +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @F(%T.loc21_6.1: %facet_type) { +// CHECK:STDOUT: %T.loc21_6.2: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.2 (constants.%T.527)] +// CHECK:STDOUT: %T.patt.loc21_6.2: %facet_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_6.2 (constants.%T.patt.6c2)] +// CHECK:STDOUT: %T.as_type.loc21_20.2: type = facet_access_type %T.loc21_6.2 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc21_20.2 [symbolic = %require_complete (constants.%require_complete.df2)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc21_6.2, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet.loc25_18.2: %I.type = facet_value %T.as_type.loc21_20.2, (%I.lookup_impl_witness) [symbolic = %I.facet.loc25_18.2 (constants.%I.facet.e75)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc21_6.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)] +// CHECK:STDOUT: %J.facet.loc25_33.2: %J.type = facet_value %T.as_type.loc21_20.2, (%J.lookup_impl_witness) [symbolic = %J.facet.loc25_33.2 (constants.%J.facet.fa4)] +// CHECK:STDOUT: %.loc25_69.2: type = fn_type_with_self_type constants.%JJ.type.622, %J.facet.loc25_33.2 [symbolic = %.loc25_69.2 (constants.%.935)] +// CHECK:STDOUT: %impl.elem0.loc25_69.2: @F.%.loc25_69.2 (%.935) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc25_69.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc25_69.2: = specific_impl_function %impl.elem0.loc25_69.2, @JJ.1(%J.facet.loc25_33.2) [symbolic = %specific_impl_fn.loc25_69.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc21_20.2 (%T.as_type)) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc21_20.2 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %T.ref.loc25: %facet_type = name_ref T, %T.loc21_6.1 [symbolic = %T.loc21_6.2 (constants.%T.527)] +// CHECK:STDOUT: %I.ref.loc25_21: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %T.as_type.loc25_18: type = facet_access_type constants.%T.527 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %I.facet.loc25_18.1: %I.type = facet_value %T.as_type.loc25_18, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc25_18.2 (constants.%I.facet.e75)] +// CHECK:STDOUT: %.loc25_18: %I.type = converted %T.ref.loc25, %I.facet.loc25_18.1 [symbolic = %I.facet.loc25_18.2 (constants.%I.facet.e75)] +// CHECK:STDOUT: %as_type.loc25_24: type = facet_access_type %.loc25_18 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc25_24: type = converted %.loc25_18, %as_type.loc25_24 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %J.ref.loc25_36: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %J.facet.loc25_33.1: %J.type = facet_value constants.%T.as_type, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc25_33.2 (constants.%J.facet.fa4)] +// CHECK:STDOUT: %.loc25_33: %J.type = converted %.loc25_24, %J.facet.loc25_33.1 [symbolic = %J.facet.loc25_33.2 (constants.%J.facet.fa4)] +// CHECK:STDOUT: %as_type.loc25_39: type = facet_access_type %.loc25_33 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc25_39: type = converted %.loc25_33, %as_type.loc25_39 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %I.ref.loc25_51: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %I.facet.loc25_48: %I.type = facet_value constants.%T.as_type, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc25_18.2 (constants.%I.facet.e75)] +// CHECK:STDOUT: %.loc25_48: %I.type = converted %.loc25_39, %I.facet.loc25_48 [symbolic = %I.facet.loc25_18.2 (constants.%I.facet.e75)] +// CHECK:STDOUT: %as_type.loc25_54: type = facet_access_type %.loc25_48 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc25_54: type = converted %.loc25_48, %as_type.loc25_54 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %J.ref.loc25_66: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %J.facet.loc25_63: %J.type = facet_value constants.%T.as_type, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc25_33.2 (constants.%J.facet.fa4)] +// CHECK:STDOUT: %.loc25_63: %J.type = converted %.loc25_54, %J.facet.loc25_63 [symbolic = %J.facet.loc25_33.2 (constants.%J.facet.fa4)] +// CHECK:STDOUT: %as_type.loc25_67: type = facet_access_type %.loc25_63 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc25_67: type = converted %.loc25_63, %as_type.loc25_67 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c] +// CHECK:STDOUT: %T.as_type.loc25_69: type = facet_access_type constants.%T.527 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc25_69.1: type = converted constants.%T.527, %T.as_type.loc25_69 [symbolic = %T.as_type.loc21_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0.loc25_69.1: @F.%.loc25_69.2 (%.935) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc25_69.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %bound_method.loc25_69: = bound_method %t.ref, %impl.elem0.loc25_69.1 +// CHECK:STDOUT: %specific_impl_fn.loc25_69.1: = specific_impl_function %impl.elem0.loc25_69.1, @JJ.1(constants.%J.facet.fa4) [symbolic = %specific_impl_fn.loc25_69.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %bound_method.loc25_73: = bound_method %t.ref, %specific_impl_fn.loc25_69.1 +// CHECK:STDOUT: %.loc25_73: init %empty_tuple.type = call %bound_method.loc25_73(%t.ref) +// CHECK:STDOUT: return +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @G() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} +// CHECK:STDOUT: %.loc39_6.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %C.ref.loc39_11: type = name_ref C, %C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc39_6.2: ref %C = temporary_storage +// CHECK:STDOUT: %.loc39_6.3: init %C = class_init (), %.loc39_6.2 [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc39_6.4: ref %C = temporary %.loc39_6.2, %.loc39_6.3 +// CHECK:STDOUT: %.loc39_8.1: ref %C = converted %.loc39_6.1, %.loc39_6.4 +// CHECK:STDOUT: %C.ref.loc39_24: type = name_ref C, %C.decl [concrete = constants.%C] +// CHECK:STDOUT: %I.ref.loc39_29: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %I.facet.loc39_26: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.98f] +// CHECK:STDOUT: %.loc39_26: %I.type = converted %C.ref.loc39_24, %I.facet.loc39_26 [concrete = constants.%I.facet.98f] +// CHECK:STDOUT: %as_type.loc39_32: type = facet_access_type %.loc39_26 [concrete = constants.%C] +// CHECK:STDOUT: %.loc39_32: type = converted %.loc39_26, %as_type.loc39_32 [concrete = constants.%C] +// CHECK:STDOUT: %J.ref.loc39_44: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %J.facet.loc39_41: %J.type = facet_value constants.%C, (constants.%J.impl_witness) [concrete = constants.%J.facet.5df] +// CHECK:STDOUT: %.loc39_41: %J.type = converted %.loc39_32, %J.facet.loc39_41 [concrete = constants.%J.facet.5df] +// CHECK:STDOUT: %as_type.loc39_47: type = facet_access_type %.loc39_41 [concrete = constants.%C] +// CHECK:STDOUT: %.loc39_47: type = converted %.loc39_41, %as_type.loc39_47 [concrete = constants.%C] +// CHECK:STDOUT: %I.ref.loc39_59: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %I.facet.loc39_56: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.98f] +// CHECK:STDOUT: %.loc39_56: %I.type = converted %.loc39_47, %I.facet.loc39_56 [concrete = constants.%I.facet.98f] +// CHECK:STDOUT: %as_type.loc39_62: type = facet_access_type %.loc39_56 [concrete = constants.%C] +// CHECK:STDOUT: %.loc39_62: type = converted %.loc39_56, %as_type.loc39_62 [concrete = constants.%C] +// CHECK:STDOUT: %J.ref.loc39_74: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %J.facet.loc39_71: %J.type = facet_value constants.%C, (constants.%J.impl_witness) [concrete = constants.%J.facet.5df] +// CHECK:STDOUT: %.loc39_71: %J.type = converted %.loc39_62, %J.facet.loc39_71 [concrete = constants.%J.facet.5df] +// CHECK:STDOUT: %as_type.loc39_75: type = facet_access_type %.loc39_71 [concrete = constants.%C] +// CHECK:STDOUT: %.loc39_75: type = converted %.loc39_71, %as_type.loc39_75 [concrete = constants.%C] +// CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c] +// CHECK:STDOUT: %impl.elem0: %.638 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%JJ.9c9] +// CHECK:STDOUT: %bound_method: = bound_method %.loc39_8.1, %impl.elem0 +// CHECK:STDOUT: %.loc39_8.2: %C = bind_value %.loc39_8.1 +// CHECK:STDOUT: %JJ.call: init %empty_tuple.type = call %bound_method(%.loc39_8.2) +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] +// CHECK:STDOUT: %C.ref.loc45_5: type = name_ref C, %C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc45_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %C.ref.loc45_14: type = name_ref C, %C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc45_9.2: ref %C = temporary_storage +// CHECK:STDOUT: %.loc45_9.3: init %C = class_init (), %.loc45_9.2 [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc45_9.4: ref %C = temporary %.loc45_9.2, %.loc45_9.3 +// CHECK:STDOUT: %.loc45_11.1: ref %C = converted %.loc45_9.1, %.loc45_9.4 +// CHECK:STDOUT: %facet_value.loc45_15.1: %facet_type = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc45_15.1: %facet_type = converted %C.ref.loc45_5, %facet_value.loc45_15.1 [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value.loc45_15.2: %facet_type = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc45_15.2: %facet_type = converted constants.%C, %facet_value.loc45_15.2 [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value.loc45_15.3: %facet_type = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc45_15.3: %facet_type = converted constants.%C, %facet_value.loc45_15.3 [concrete = constants.%facet_value] +// CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%facet_value) [concrete = constants.%F.specific_fn] +// CHECK:STDOUT: %.loc45_11.2: %C = bind_value %.loc45_11.1 +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc45_11.2) +// CHECK:STDOUT: return +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @II.2(%self.param: %C) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: return +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @JJ.2(%self.param: %C) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: return +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @II.1(constants.%Self.826) { +// CHECK:STDOUT: %Self => constants.%Self.826 +// CHECK:STDOUT: %Self.as_type.loc15_15.1 => constants.%Self.as_type.b70 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @JJ.1(constants.%Self.ccd) { +// CHECK:STDOUT: %Self => constants.%Self.ccd +// CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%Self.as_type.3df +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.1(constants.%Self.25f) { +// CHECK:STDOUT: %Self => constants.%Self.25f +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.19f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @impl.f92(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 +// CHECK:STDOUT: %T.patt => constants.%T.patt.e01 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @impl.f92(%T) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.2(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @impl.f92(type) { +// CHECK:STDOUT: %T => type +// CHECK:STDOUT: %T.patt => constants.%T.patt.e01 +// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Op.type => constants.%Op.type.eb8 +// CHECK:STDOUT: %Op => constants.%Op.444 +// CHECK:STDOUT: %require_complete => constants.%complete_type.473 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.2(type) { +// CHECK:STDOUT: %T => type +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(constants.%T.527) { +// CHECK:STDOUT: %T.loc21_6.2 => constants.%T.527 +// CHECK:STDOUT: %T.patt.loc21_6.2 => constants.%T.patt.6c2 +// CHECK:STDOUT: %T.as_type.loc21_20.2 => constants.%T.as_type +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @JJ.1(constants.%J.facet.fa4) { +// CHECK:STDOUT: %Self => constants.%J.facet.fa4 +// CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%T.as_type +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @JJ.1(@F.%J.facet.loc25_33.2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @II.1(constants.%I.facet.98f) { +// CHECK:STDOUT: %Self => constants.%I.facet.98f +// CHECK:STDOUT: %Self.as_type.loc15_15.1 => constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @JJ.1(constants.%J.facet.5df) { +// CHECK:STDOUT: %Self => constants.%J.facet.5df +// CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(constants.%facet_value) { +// CHECK:STDOUT: %T.loc21_6.2 => constants.%facet_value +// CHECK:STDOUT: %T.patt.loc21_6.2 => constants.%T.patt.6c2 +// CHECK:STDOUT: %T.as_type.loc21_20.2 => constants.%C +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %require_complete => constants.%complete_type.357 +// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness +// CHECK:STDOUT: %I.facet.loc25_18.2 => constants.%I.facet.98f +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness +// CHECK:STDOUT: %J.facet.loc25_33.2 => constants.%J.facet.5df +// CHECK:STDOUT: %.loc25_69.2 => constants.%.638 +// CHECK:STDOUT: %impl.elem0.loc25_69.2 => constants.%JJ.9c9 +// CHECK:STDOUT: %specific_impl_fn.loc25_69.2 => constants.%JJ.9c9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- include_files/facet_types.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] +// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic] +// CHECK:STDOUT: %As.type.b51: type = generic_interface_type @As [concrete] +// CHECK:STDOUT: %As.generic: %As.type.b51 = struct_value () [concrete] +// CHECK:STDOUT: %As.type.8ba: type = facet_type <@As, @As(%Dest)> [symbolic] +// CHECK:STDOUT: %Self.b4e: %As.type.8ba = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.as_type.7f0: type = facet_access_type %Self.b4e [symbolic] +// CHECK:STDOUT: %Convert.type.ad1: type = fn_type @Convert.1, @As(%Dest) [symbolic] +// CHECK:STDOUT: %Convert.0ed: %Convert.type.ad1 = struct_value () [symbolic] +// CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%Dest) [symbolic] +// CHECK:STDOUT: %assoc0.1d5: %As.assoc_type = assoc_entity element0, @As.%Convert.decl [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete] +// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] +// CHECK:STDOUT: %Self.0f3: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.as_type.419: type = facet_access_type %Self.0f3 [symbolic] +// CHECK:STDOUT: %Convert.type.4cf: type = fn_type @Convert.2, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Convert.147: %Convert.type.4cf = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %assoc0.8f8: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] +// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] +// CHECK:STDOUT: %Self.e44: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.560: type = facet_access_type %Self.e44 [symbolic] +// CHECK:STDOUT: %Op.type.613: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %Op.d98: %Op.type.613 = struct_value () [concrete] +// CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type @BitAnd [concrete] +// 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: %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, (%BitAnd.impl_witness) [symbolic] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [concrete] { +// CHECK:STDOUT: .As = %As.decl +// CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl +// CHECK:STDOUT: .BitAnd = %BitAnd.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %As.decl: %As.type.b51 = interface_decl @As [concrete = constants.%As.generic] { +// CHECK:STDOUT: %Dest.patt.loc9_14.1: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc9_14.2 (constants.%Dest.patt)] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Dest.loc9_14.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc9_14.2 (constants.%Dest)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { +// CHECK:STDOUT: %Dest.patt.loc13_22.1: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc13_22.2 (constants.%Dest.patt)] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Dest.loc13_22.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc13_22.2 (constants.%Dest)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %BitAnd.decl: type = interface_decl @BitAnd [concrete = constants.%BitAnd.type] {} {} +// CHECK:STDOUT: impl_decl @impl [concrete] { +// CHECK:STDOUT: %T.patt.loc21_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T)] +// 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: %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) { +// CHECK:STDOUT: %Dest.loc9_14.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc9_14.2 (constants.%Dest)] +// CHECK:STDOUT: %Dest.patt.loc9_14.2: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc9_14.2 (constants.%Dest.patt)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest.loc9_14.2)> [symbolic = %As.type (constants.%As.type.8ba)] +// CHECK:STDOUT: %Self.2: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)] +// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%Dest.loc9_14.2) [symbolic = %Convert.type (constants.%Convert.type.ad1)] +// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.ad1) = struct_value () [symbolic = %Convert (constants.%Convert.0ed)] +// CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%Dest.loc9_14.2) [symbolic = %As.assoc_type (constants.%As.assoc_type)] +// CHECK:STDOUT: %assoc0.loc10_35.2: @As.%As.assoc_type (%As.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc10_35.2 (constants.%assoc0.1d5)] +// CHECK:STDOUT: +// CHECK:STDOUT: interface { +// CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)] +// CHECK:STDOUT: %Convert.decl: @As.%Convert.type (%Convert.type.ad1) = fn_decl @Convert.1 [symbolic = @As.%Convert (constants.%Convert.0ed)] { +// CHECK:STDOUT: %self.patt: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = value_param_pattern %self.patt, call_param0 +// CHECK:STDOUT: %return.patt: @Convert.1.%Dest (%Dest) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Convert.1.%Dest (%Dest) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @As.%Dest.loc9_14.1 [symbolic = %Dest (constants.%Dest)] +// CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = value_param call_param0 +// CHECK:STDOUT: %.loc10_20.1: type = splice_block %.loc10_20.3 [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)] { +// CHECK:STDOUT: %.loc10_20.2: @Convert.1.%As.type (%As.type.8ba) = specific_constant @As.%Self.1, @As(constants.%Dest) [symbolic = %Self (constants.%Self.b4e)] +// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.8ba) = name_ref Self, %.loc10_20.2 [symbolic = %Self (constants.%Self.b4e)] +// CHECK:STDOUT: %Self.as_type.loc10_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)] +// CHECK:STDOUT: %.loc10_20.3: type = converted %Self.ref, %Self.as_type.loc10_20.2 [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @Convert.1.%Dest (%Dest) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Convert.1.%Dest (%Dest) = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %assoc0.loc10_35.1: @As.%As.assoc_type (%As.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc10_35.2 (constants.%assoc0.1d5)] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self.1 +// CHECK:STDOUT: .Dest = +// CHECK:STDOUT: .Convert = %assoc0.loc10_35.1 +// CHECK:STDOUT: witness = (%Convert.decl) +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic interface @ImplicitAs(%Dest.loc13_22.1: type) { +// CHECK:STDOUT: %Dest.loc13_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc13_22.2 (constants.%Dest)] +// CHECK:STDOUT: %Dest.patt.loc13_22.2: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc13_22.2 (constants.%Dest.patt)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc13_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)] +// CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)] +// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%Dest.loc13_22.2) [symbolic = %Convert.type (constants.%Convert.type.4cf)] +// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.4cf) = struct_value () [symbolic = %Convert (constants.%Convert.147)] +// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest.loc13_22.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)] +// CHECK:STDOUT: %assoc0.loc14_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc14_35.2 (constants.%assoc0.8f8)] +// CHECK:STDOUT: +// CHECK:STDOUT: interface { +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)] +// CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.4cf) = fn_decl @Convert.2 [symbolic = @ImplicitAs.%Convert (constants.%Convert.147)] { +// CHECK:STDOUT: %self.patt: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = value_param_pattern %self.patt, call_param0 +// CHECK:STDOUT: %return.patt: @Convert.2.%Dest (%Dest) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Convert.2.%Dest (%Dest) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc13_22.1 [symbolic = %Dest (constants.%Dest)] +// CHECK:STDOUT: %self.param: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = value_param call_param0 +// CHECK:STDOUT: %.loc14_20.1: type = splice_block %.loc14_20.3 [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)] { +// CHECK:STDOUT: %.loc14_20.2: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self.0f3)] +// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc14_20.2 [symbolic = %Self (constants.%Self.0f3)] +// CHECK:STDOUT: %Self.as_type.loc14_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)] +// CHECK:STDOUT: %.loc14_20.3: type = converted %Self.ref, %Self.as_type.loc14_20.2 [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %self: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @Convert.2.%Dest (%Dest) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Convert.2.%Dest (%Dest) = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %assoc0.loc14_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc14_35.2 (constants.%assoc0.8f8)] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self.1 +// CHECK:STDOUT: .Dest = +// CHECK:STDOUT: .Convert = %assoc0.loc14_35.1 +// CHECK:STDOUT: witness = (%Convert.decl) +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: interface @BitAnd { +// CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.e44] +// CHECK:STDOUT: %Op.decl: %Op.type.613 = fn_decl @Op.1 [concrete = constants.%Op.d98] { +// CHECK:STDOUT: %self.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param_pattern %self.patt, call_param0 +// CHECK:STDOUT: %other.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = binding_pattern other +// CHECK:STDOUT: %other.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param_pattern %other.patt, call_param1 +// CHECK:STDOUT: %return.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Self.ref.loc18_37: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)] +// CHECK:STDOUT: %Self.as_type.loc18_37: type = facet_access_type %Self.ref.loc18_37 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] +// CHECK:STDOUT: %.loc18_37: type = converted %Self.ref.loc18_37, %Self.as_type.loc18_37 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] +// CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param call_param0 +// CHECK:STDOUT: %.loc18_15.1: type = splice_block %.loc18_15.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] { +// CHECK:STDOUT: %Self.ref.loc18_15: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)] +// CHECK:STDOUT: %Self.as_type.loc18_15.2: type = facet_access_type %Self.ref.loc18_15 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] +// CHECK:STDOUT: %.loc18_15.2: type = converted %Self.ref.loc18_15, %Self.as_type.loc18_15.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param call_param1 +// CHECK:STDOUT: %.loc18_28.1: type = splice_block %.loc18_28.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] { +// CHECK:STDOUT: %Self.ref.loc18_28: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)] +// CHECK:STDOUT: %Self.as_type.loc18_28: type = facet_access_type %Self.ref.loc18_28 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] +// CHECK:STDOUT: %.loc18_28.2: type = converted %Self.ref.loc18_28, %Self.as_type.loc18_28 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = out_param call_param2 +// CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %assoc0: %BitAnd.assoc_type = assoc_entity element0, %Op.decl [concrete = constants.%assoc0.220] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Op = %assoc0 +// CHECK:STDOUT: witness = (%Op.decl) +// CHECK:STDOUT: } +// CHECK:STDOUT: +// 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: %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)] +// CHECK:STDOUT: %Op: @impl.%Op.type (%Op.type.28d) = struct_value () [symbolic = %Op (constants.%Op.902)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc21_14.2 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: +// CHECK:STDOUT: impl: %T.ref as %BitAnd.ref { +// CHECK:STDOUT: %Op.decl: @impl.%Op.type (%Op.type.28d) = fn_decl @Op.2 [symbolic = @impl.%Op (constants.%Op.902)] { +// CHECK:STDOUT: %self.patt: @Op.2.%T (%T) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Op.2.%T (%T) = value_param_pattern %self.patt, call_param0 +// CHECK:STDOUT: %other.patt: @Op.2.%T (%T) = binding_pattern other +// CHECK:STDOUT: %other.param_patt: @Op.2.%T (%T) = value_param_pattern %other.patt, call_param1 +// CHECK:STDOUT: %return.patt: @Op.2.%T (%T) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Op.2.%T (%T) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Self.ref.loc22_37: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %self.param: @Op.2.%T (%T) = value_param call_param0 +// CHECK:STDOUT: %Self.ref.loc22_15: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %self: @Op.2.%T (%T) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @Op.2.%T (%T) = value_param call_param1 +// CHECK:STDOUT: %Self.ref.loc22_28: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %other: @Op.2.%T (%T) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @Op.2.%T (%T) = out_param call_param2 +// CHECK:STDOUT: %return: ref @Op.2.%T (%T) = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Op = %Op.decl +// CHECK:STDOUT: witness = file.%BitAnd.impl_witness +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Convert.1(@As.%Dest.loc9_14.1: type, @As.%Self.1: @As.%As.type (%As.type.8ba)) { +// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] +// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.8ba)] +// CHECK:STDOUT: %Self: @Convert.1.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.b4e)] +// CHECK:STDOUT: %Self.as_type.loc10_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%self.param: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0)) -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Convert.2(@ImplicitAs.%Dest.loc13_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) { +// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] +// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)] +// CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.0f3)] +// CHECK:STDOUT: %Self.as_type.loc14_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%self.param: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419)) -> @Convert.2.%Dest (%Dest); +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Op.1(@BitAnd.%Self: %BitAnd.type) { +// CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.e44)] +// CHECK:STDOUT: %Self.as_type.loc18_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%self.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560), %other.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560)) -> @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560); +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Op.2(@impl.%T.loc21_14.1: type) { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%self.param: @Op.2.%T (%T), %other.param: @Op.2.%T (%T)) -> @Op.2.%T (%T) = "type.and"; +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As(constants.%Dest) { +// CHECK:STDOUT: %Dest.loc9_14.2 => constants.%Dest +// CHECK:STDOUT: %Dest.patt.loc9_14.2 => constants.%Dest.patt +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.b4e) { +// CHECK:STDOUT: %Dest => constants.%Dest +// CHECK:STDOUT: %As.type => constants.%As.type.8ba +// CHECK:STDOUT: %Self => constants.%Self.b4e +// CHECK:STDOUT: %Self.as_type.loc10_20.1 => constants.%Self.as_type.7f0 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { +// CHECK:STDOUT: %Dest.loc13_22.2 => constants.%Dest +// CHECK:STDOUT: %Dest.patt.loc13_22.2 => constants.%Dest.patt +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Convert.2(constants.%Dest, constants.%Self.0f3) { +// CHECK:STDOUT: %Dest => constants.%Dest +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f +// CHECK:STDOUT: %Self => constants.%Self.0f3 +// CHECK:STDOUT: %Self.as_type.loc14_20.1 => constants.%Self.as_type.419 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.1(constants.%Self.e44) { +// CHECK:STDOUT: %Self => constants.%Self.e44 +// CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%Self.as_type.560 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// 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: %BitAnd.impl_witness => constants.%BitAnd.impl_witness +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @impl(%T.loc21_14.2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.2(constants.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.1(constants.%BitAnd.facet) { +// CHECK:STDOUT: %Self => constants.%BitAnd.facet +// CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/min_prelude/find_in_final.carbon b/toolchain/check/testdata/impl/lookup/min_prelude/find_in_final.carbon index 94281b0a4fac..352642b30ccc 100644 --- a/toolchain/check/testdata/impl/lookup/min_prelude/find_in_final.carbon +++ b/toolchain/check/testdata/impl/lookup/min_prelude/find_in_final.carbon @@ -65,31 +65,30 @@ fn F[T:! Z where .X = ()](z: T) { // --- final_impl_makes_compatible_facet_values.carbon library "[[@TEST_NAME]]"; -interface I {} +interface I { let X:! type; } interface J {} -final impl forall [T:! J] T as I {} +final impl forall [T:! J] T as I where .X = () {} -class C(T:! I) {} +class C(T:! I) { + var b: T.X; +} class D(T:! J) { - // Finds the final impl decl; The facet value of `T` in `C(T)` holds an - // `ImplWitness`. var c: C(T)*; } -fn F(T:! I & J) { - // `I` found in the facet type; The facet value of `T` in `C(T)` holds a `FacetAccessWitness`. +fn F(T:! I & J) -> () { + // The witness for `I` found here directly, and inside `D` from a FacetValue + // come from the same facet, the `T` binding in the params of F, so they + // should be compatible. var x: C(T); - // `D.c` used the final impl decl to make a facet value with an `ImplWitness` - // for its `T` in `C(T)`. var y: D(T); - // This converts a pointer to a type with with facet value (an `ImplWitness`) - // to a pointer to a type with a facet value (the same `ImplWitness`). y.c = &x; + return (*y.c).b; } -// --- fail_todo_convert_facet_value_of_facet_access_witness_to_facet_value_of_lookup_impl_witness.carbon +// --- non_final_impl_makes_compatible_facet_values.carbon library "[[@TEST_NAME]]"; interface I { let X:! type; } @@ -102,67 +101,19 @@ class C(T:! I) { } class D(T:! J) { - // Finds the impl decl; The facet value of `T` in `C(T)` holds a - // `LookupImplWitness`. var c: C(T)*; } fn F(T:! I & J) -> T.(I.X) { - // `I` found in the facet type; The facet value of `T` in `C(T)` holds a - // `FacetAccessWitness`. var x: C(T); - // `D.c` used the final impl decl to make a facet value with a - // `LookupImplWitness` for its `T` in `C(T)`. var y: D(T); - // This converts a pointer to a facet value (with `FacetAccessWitness`) to a - // pointer to a facet value (with `LookupImplWitness`). - // - // TODO: It should type check as a `LookupImplWitness` will find the same - // witness that `FacetAccessWitness` is accessing from the caller. - // - // CHECK:STDERR: fail_todo_convert_facet_value_of_facet_access_witness_to_facet_value_of_lookup_impl_witness.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `C(T as I)*` to `C(T as I)*` [ConversionFailure] - // CHECK:STDERR: y.c = &x; - // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_todo_convert_facet_value_of_facet_access_witness_to_facet_value_of_lookup_impl_witness.carbon:[[@LINE+4]]:3: note: type `C(T as I)*` does not implement interface `Core.ImplicitAs(C(T as I)*)` [MissingImplInMemberAccessNote] - // CHECK:STDERR: y.c = &x; - // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: + // The witness for `I` found here directly, and inside `D` from a FacetValue + // come from the same facet, the `T` binding in the params of F, so they + // should be compatible. y.c = &x; - // CHECK:STDERR: fail_todo_convert_facet_value_of_facet_access_witness_to_facet_value_of_lookup_impl_witness.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `(T as J as I).(I.X)` to `T.(TODO: element 0 in )` [ConversionFailure] - // CHECK:STDERR: return (*y.c).b; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_convert_facet_value_of_facet_access_witness_to_facet_value_of_lookup_impl_witness.carbon:[[@LINE+4]]:3: note: type `(T as J as I).(I.X)` does not implement interface `Core.ImplicitAs(T.(TODO: element 0 in ))` [MissingImplInMemberAccessNote] - // CHECK:STDERR: return (*y.c).b; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~ - // CHECK:STDERR: return (*y.c).b; } -class E1 {} -impl E1 as J {} - -fn G1() { - // Doesn't see the `final impl` below. `E1.(I.X)` is `()`. - let a1: () = F(E1); -} - -final impl forall [T:! J] T as I where .X = {} {} - -class E2 {} -impl E2 as J {} - -fn G2() { - // TODO: Does see the `final impl` above. `E2.(I.X)` is `{}`. - // CHECK:STDERR: fail_todo_convert_facet_value_of_facet_access_witness_to_facet_value_of_lookup_impl_witness.carbon:[[@LINE+7]]:16: error: cannot implicitly convert expression of type `()` to `{}` [ConversionFailure] - // CHECK:STDERR: let a2: {} = F(E2); - // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_todo_convert_facet_value_of_facet_access_witness_to_facet_value_of_lookup_impl_witness.carbon:[[@LINE+4]]:16: note: type `()` does not implement interface `Core.ImplicitAs({})` [MissingImplInMemberAccessNote] - // CHECK:STDERR: let a2: {} = F(E2); - // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: - let a2: {} = F(E2); -} - // --- todo_fail_facet_value_rewrite_incompatible_with_final_impl.carbon library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/impl/lookup/min_prelude/specialization.carbon b/toolchain/check/testdata/impl/lookup/min_prelude/specialization.carbon index 9860682e8660..f17d7edc7b8a 100644 --- a/toolchain/check/testdata/impl/lookup/min_prelude/specialization.carbon +++ b/toolchain/check/testdata/impl/lookup/min_prelude/specialization.carbon @@ -238,10 +238,10 @@ fn F[D:! Y](d: D) { // because we are in a generic where `D` is an unknown type, which will cause // the query and impl self type to be C(FacetValue) for a symbolic FacetValue. // - // CHECK:STDERR: fail_specialized_class_with_symbolic_facet_value_param.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `()` to `(C(D) as Z).(Z.X)` [ConversionFailure] + // CHECK:STDERR: fail_specialized_class_with_symbolic_facet_value_param.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `()` to `C(D).(Z.X)` [ConversionFailure] // CHECK:STDERR: let a: C(D).(Z.X) = (); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_specialized_class_with_symbolic_facet_value_param.carbon:[[@LINE+4]]:23: note: type `()` does not implement interface `Core.ImplicitAs((C(D) as Z).(Z.X))` [MissingImplInMemberAccessNote] + // CHECK:STDERR: fail_specialized_class_with_symbolic_facet_value_param.carbon:[[@LINE+4]]:23: note: type `()` does not implement interface `Core.ImplicitAs(C(D).(Z.X))` [MissingImplInMemberAccessNote] // CHECK:STDERR: let a: C(D).(Z.X) = (); // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -446,3 +446,59 @@ fn G() { // This won't typecheck if the first impl is selected. let a: () = F(C); } + +// --- extend_impl_as_specialization.carbon +library "[[@TEST_NAME]]"; + +interface Z(T:! type) { + let X:! type; +} + +impl forall [T:! type, S:! type] T as Z(S) where .X = {} {} + +class C(S:! type) { + extend impl as Z(S) where .X = () {} + fn CC(a: Self.(Z(S).X)) -> Self.(Z(S).X) { return a; } +} + +fn F() { + let a: () = C(()).CC(()); + let b: C(()).X = a; +} + +// --- final_impl_as_specialization.carbon +library "[[@TEST_NAME]]"; + +interface Z(T:! type) { + let X:! type; +} + +impl forall [T:! type, S:! type] T as Z(S) where .X = {} {} + +class C(S:! type) { + final impl as Z(S) where .X = () {} + fn CC() -> Self.(Z(S).X) { return (); } +} + +fn F() { + let a: () = C(()).CC(); +} + +// --- final_extend_impl_as_specialization.carbon +library "[[@TEST_NAME]]"; + +interface Z(T:! type) { + let X:! type; +} + +impl forall [T:! type, S:! type] T as Z(S) where .X = {} {} + +class C(S:! type) { + extend final impl as Z(S) where .X = () {} + fn CC() -> Self.(Z(S).X) { return (); } +} + +fn F() { + let a: () = C(()).CC(); + let b: C(()).X = a; +} 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 782b271b302f..d89550b5cf80 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 @@ -54,7 +54,7 @@ fn F(T:! Z(C), t: T) { let a: T.X = t; } -// --- final_impl_rewrite_of_symbolic_through_impl_witness.carbon +// --- final_impl_rewrite_of_symbolic_through_impl_lookup.carbon library "[[@TEST_NAME]]"; interface Ptr { @@ -80,7 +80,7 @@ fn F[T:! Ptr](var t: T) -> T.Type { return &t; } -// --- fail_todo_final_impl_rewrite_of_symbolic_through_facet_access_witness.carbon +// --- final_impl_rewrite_of_symbolic_through_facet_value.carbon library "[[@TEST_NAME]]"; interface Ptr { @@ -90,13 +90,6 @@ interface Ptr { final impl forall [U:! type] U as Ptr where .Type = U* {} fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { - // CHECK:STDERR: fail_todo_final_impl_rewrite_of_symbolic_through_facet_access_witness.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `T*` to `T.(Ptr.Type)` [ConversionFailure] - // CHECK:STDERR: return &t; - // CHECK:STDERR: ^~~~~~~~~~ - // CHECK:STDERR: fail_todo_final_impl_rewrite_of_symbolic_through_facet_access_witness.carbon:[[@LINE+4]]:3: note: type `T*` does not implement interface `Core.ImplicitAs(T.(Ptr.Type))` [MissingImplInMemberAccessNote] - // CHECK:STDERR: return &t; - // CHECK:STDERR: ^~~~~~~~~~ - // CHECK:STDERR: return &t; } @@ -124,34 +117,34 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %assoc0.abb: %Z.assoc_type.0e7 = assoc_entity element0, @Z.%X [symbolic] // CHECK:STDOUT: %require_complete.b87: = require_complete_type %Z.type.8e9 [symbolic] // CHECK:STDOUT: %.Self.as_type.ffd: type = facet_access_type %.Self.eb1 [symbolic] -// CHECK:STDOUT: %.Self.as_wit.iface0.178: = facet_access_witness %.Self.eb1, element0 [symbolic] -// CHECK:STDOUT: %Z.facet.868: %Z.type.8e9 = facet_value %.Self.as_type.ffd, (%.Self.as_wit.iface0.178) [symbolic] -// 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: %Z.impl_witness.7f6: = impl_witness file.%Z.impl_witness_table.loc9, @impl.76d(%T.8b3, %S) [symbolic] +// CHECK:STDOUT: %Z.lookup_impl_witness.597: = lookup_impl_witness %.Self.eb1, @Z, @Z(%S) [symbolic] +// CHECK:STDOUT: %Z.facet.4f7: %Z.type.8e9 = facet_value %.Self.as_type.ffd, (%Z.lookup_impl_witness.597) [symbolic] +// CHECK:STDOUT: %impl.elem0.240: type = impl_witness_access %Z.lookup_impl_witness.597, element0 [symbolic] +// CHECK:STDOUT: %Z_where.type.80d: type = facet_type <@Z, @Z(%S) where %impl.elem0.240 = %empty_tuple.type> [symbolic] +// CHECK:STDOUT: %require_complete.9ea: = require_complete_type %Z_where.type.80d [symbolic] +// CHECK:STDOUT: %Z.impl_witness.d59: = impl_witness file.%Z.impl_witness_table.loc9, @impl.119(%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] // CHECK:STDOUT: %Z.assoc_type.252: type = assoc_entity_type @Z, @Z(%C) [concrete] // CHECK:STDOUT: %assoc0.ea4: %Z.assoc_type.252 = assoc_entity element0, @Z.%X [concrete] // CHECK:STDOUT: %.Self.as_type.c3c: type = facet_access_type %.Self.3c5 [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.72c: = facet_access_witness %.Self.3c5, element0 [symbolic_self] -// CHECK:STDOUT: %Z.facet.375: %Z.type.049 = facet_value %.Self.as_type.c3c, (%.Self.as_wit.iface0.72c) [symbolic_self] -// 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: %Z.impl_witness.fae: = impl_witness file.%Z.impl_witness_table.loc11, @impl.44b(%T.8b3) [symbolic] +// CHECK:STDOUT: %Z.lookup_impl_witness.9cc: = lookup_impl_witness %.Self.3c5, @Z, @Z(%C) [symbolic_self] +// CHECK:STDOUT: %Z.facet.eb4: %Z.type.049 = facet_value %.Self.as_type.c3c, (%Z.lookup_impl_witness.9cc) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.e29: type = impl_witness_access %Z.lookup_impl_witness.9cc, element0 [symbolic_self] +// CHECK:STDOUT: %Z_where.type.692: type = facet_type <@Z, @Z(%C) where %impl.elem0.e29 = %T.8b3> [symbolic] +// CHECK:STDOUT: %require_complete.202: = require_complete_type %Z_where.type.692 [symbolic] +// CHECK:STDOUT: %Z.impl_witness.093: = impl_witness file.%Z.impl_witness_table.loc11, @impl.62c(%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] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // 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: %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: %Z_where.type.272: type = facet_type <@Z, @Z(%C) where %impl.elem0.e29 = %T.as_type> [symbolic] +// CHECK:STDOUT: %require_complete.915: = require_complete_type %Z_where.type.272 [symbolic] +// CHECK:STDOUT: %Z.impl_witness.7c2: = impl_witness file.%Z.impl_witness_table.loc11, @impl.62c(%T.as_type) [symbolic] +// CHECK:STDOUT: %Z.facet.2aa: %Z.type.049 = facet_value %T.as_type, (%Z.impl_witness.7c2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -174,7 +167,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc3_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_13.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.76d [concrete] { +// CHECK:STDOUT: impl_decl @impl.119 [concrete] { // CHECK:STDOUT: %T.patt.loc9_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %S.patt.loc9_24.1: type = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc9_24.2 (constants.%S.patt)] // CHECK:STDOUT: } { @@ -182,26 +175,25 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc9_24.1 [symbolic = %S.loc9_24.2 (constants.%S)] // CHECK:STDOUT: %Z.type.loc9_42.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc9_42.2 (constants.%Z.type.8e9)] -// CHECK:STDOUT: %.Self.1: @impl.76d.%Z.type.loc9_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] -// CHECK:STDOUT: %.Self.ref: @impl.76d.%Z.type.loc9_42.2 (%Z.type.8e9) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.eb1)] -// CHECK:STDOUT: %.loc9_50.1: @impl.76d.%Z.assoc_type (%Z.assoc_type.0e7) = specific_constant @X.%assoc0, @Z(constants.%S) [symbolic = %assoc0 (constants.%assoc0.abb)] -// CHECK:STDOUT: %X.ref: @impl.76d.%Z.assoc_type (%Z.assoc_type.0e7) = name_ref X, %.loc9_50.1 [symbolic = %assoc0 (constants.%assoc0.abb)] +// CHECK:STDOUT: %.Self.1: @impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.ref: @impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.loc9_50.1: @impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = specific_constant @X.%assoc0, @Z(constants.%S) [symbolic = %assoc0 (constants.%assoc0.abb)] +// CHECK:STDOUT: %X.ref: @impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = name_ref X, %.loc9_50.1 [symbolic = %assoc0 (constants.%assoc0.abb)] // CHECK:STDOUT: %.Self.as_type.loc9_50.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.ffd)] // CHECK:STDOUT: %.loc9_50.2: type = converted %.Self.ref, %.Self.as_type.loc9_50.1 [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.ffd)] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_50.1: = facet_access_witness %.Self.ref, element0 [symbolic = %.Self.as_wit.iface0.loc9_50.2 (constants.%.Self.as_wit.iface0.178)] -// CHECK:STDOUT: %impl.elem0.loc9_50.1: type = impl_witness_access %.Self.as_wit.iface0.loc9_50.1, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.a53)] +// CHECK:STDOUT: %impl.elem0.loc9_50.1: type = impl_witness_access constants.%Z.lookup_impl_witness.597, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.240)] // CHECK:STDOUT: %.loc9_56.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_56.2: type = converted %.loc9_56.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_44: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.93a)] { +// CHECK:STDOUT: %.loc9_44: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.80d)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc9_50.1, %.loc9_56.2 // CHECK:STDOUT: } // 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: %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: %Z.impl_witness_table.loc9 = impl_witness_table (%impl_witness_assoc_constant.loc9), @impl.119 [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc9: = impl_witness %Z.impl_witness_table.loc9, @impl.119(constants.%T.8b3, constants.%S) [symbolic = @impl.119.%Z.impl_witness (constants.%Z.impl_witness.d59)] // 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: impl_decl @impl.62c [concrete] { // CHECK:STDOUT: %T.patt.loc11_20.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_20.2 (constants.%T.patt.e01)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc11_30: type = name_ref T, %T.loc11_20.1 [symbolic = %T.loc11_20.2 (constants.%T.8b3)] @@ -214,17 +206,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %X.ref: %Z.assoc_type.252 = name_ref X, %.loc11_46.1 [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.c3c] // CHECK:STDOUT: %.loc11_46.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.c3c] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0.72c] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.802] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness.9cc, element0 [symbolic_self = constants.%impl.elem0.e29] // CHECK:STDOUT: %T.ref.loc11_51: type = name_ref T, %T.loc11_20.1 [symbolic = %T.loc11_20.2 (constants.%T.8b3)] -// CHECK:STDOUT: %.loc11_40: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.bee)] { +// CHECK:STDOUT: %.loc11_40: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.692)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %T.ref.loc11_51 // 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: %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: %Z.impl_witness_table.loc11 = impl_witness_table (%impl_witness_assoc_constant.loc11), @impl.62c [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc11: = impl_witness %Z.impl_witness_table.loc11, @impl.62c(constants.%T.8b3) [symbolic = @impl.62c.%Z.impl_witness (constants.%Z.impl_witness.093)] +// CHECK:STDOUT: %impl_witness_assoc_constant.loc11: type = impl_witness_assoc_constant constants.%T.8b3 [symbolic = @impl.62c.%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)] // CHECK:STDOUT: %t.patt: @F.%T.as_type.loc13_19.2 (%T.as_type) = binding_pattern t @@ -273,22 +264,22 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: assoc_const X:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.76d(%T.loc9_14.1: type, %S.loc9_24.1: type) { +// CHECK:STDOUT: generic impl @impl.119(%T.loc9_14.1: type, %S.loc9_24.1: type) { // CHECK:STDOUT: %T.loc9_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %T.patt.loc9_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %S.loc9_24.2: type = bind_symbolic_name S, 1 [symbolic = %S.loc9_24.2 (constants.%S)] // CHECK:STDOUT: %S.patt.loc9_24.2: type = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc9_24.2 (constants.%S.patt)] // CHECK:STDOUT: %Z.type.loc9_42.2: type = facet_type <@Z, @Z(%S.loc9_24.2)> [symbolic = %Z.type.loc9_42.2 (constants.%Z.type.8e9)] -// CHECK:STDOUT: %.Self.2: @impl.76d.%Z.type.loc9_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.2: @impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] // CHECK:STDOUT: %require_complete.loc9_50: = require_complete_type %Z.type.loc9_42.2 [symbolic = %require_complete.loc9_50 (constants.%require_complete.b87)] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc9_24.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.0e7)] -// CHECK:STDOUT: %assoc0: @impl.76d.%Z.assoc_type (%Z.assoc_type.0e7) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.abb)] +// CHECK:STDOUT: %assoc0: @impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.abb)] // CHECK:STDOUT: %.Self.as_type.loc9_50.2: type = facet_access_type %.Self.2 [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.ffd)] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_50.2: = facet_access_witness %.Self.2, element0 [symbolic = %.Self.as_wit.iface0.loc9_50.2 (constants.%.Self.as_wit.iface0.178)] -// 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: %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: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.2, @Z, @Z(%S.loc9_24.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.597)] +// CHECK:STDOUT: %impl.elem0.loc9_50.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.240)] +// 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.80d)] +// CHECK:STDOUT: %require_complete.loc9_44: = require_complete_type %Z_where.type [symbolic = %require_complete.loc9_44 (constants.%require_complete.9ea)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc9, @impl.119(%T.loc9_14.2, %S.loc9_24.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.d59)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -298,12 +289,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.44b(%T.loc11_20.1: type) { +// CHECK:STDOUT: generic impl @impl.62c(%T.loc11_20.1: type) { // CHECK:STDOUT: %T.loc11_20.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_20.2 (constants.%T.8b3)] // 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: %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: %Z_where.type: type = facet_type <@Z, @Z(constants.%C) where constants.%impl.elem0.e29 = %T.loc11_20.2> [symbolic = %Z_where.type (constants.%Z_where.type.692)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.202)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc11, @impl.62c(%T.loc11_20.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.093)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -329,6 +320,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc13_19.2 [symbolic = %require_complete (constants.%require_complete.2b1)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc11, @impl.62c(%T.as_type.loc13_19.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.7c2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_19.2 (%T.as_type)) { // CHECK:STDOUT: !entry: @@ -344,7 +336,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.%Z.impl_witness.731, element0 [symbolic = %T.as_type.loc13_19.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.7c2, 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 @@ -371,9 +363,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %assoc0 => constants.%assoc0.abb // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%S, constants.%Z.facet.868) {} +// CHECK:STDOUT: specific @X(constants.%S, constants.%Z.facet.4f7) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.76d(constants.%T.8b3, constants.%S) { +// CHECK:STDOUT: specific @impl.119(constants.%T.8b3, constants.%S) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%T.8b3 // CHECK:STDOUT: %T.patt.loc9_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %S.loc9_24.2 => constants.%S @@ -384,16 +376,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.0e7 // CHECK:STDOUT: %assoc0 => constants.%assoc0.abb // CHECK:STDOUT: %.Self.as_type.loc9_50.2 => constants.%.Self.as_type.ffd -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_50.2 => constants.%.Self.as_wit.iface0.178 -// 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: %Z.impl_witness => constants.%Z.impl_witness.7f6 +// CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness.597 +// CHECK:STDOUT: %impl.elem0.loc9_50.2 => constants.%impl.elem0.240 +// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.80d +// CHECK:STDOUT: %require_complete.loc9_44 => constants.%require_complete.9ea +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.d59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(@impl.76d.%S.loc9_24.2) {} +// CHECK:STDOUT: specific @Z(@impl.119.%S.loc9_24.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.76d(%T.loc9_14.2, %S.loc9_24.2) {} +// CHECK:STDOUT: specific @impl.119(%T.loc9_14.2, %S.loc9_24.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%C) { // CHECK:STDOUT: %T.loc3_13.2 => constants.%C @@ -406,17 +398,17 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %assoc0 => constants.%assoc0.ea4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.375) {} +// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.eb4) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.44b(constants.%T.8b3) { +// CHECK:STDOUT: specific @impl.62c(constants.%T.8b3) { // CHECK:STDOUT: %T.loc11_20.2 => constants.%T.8b3 // 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: %Z.impl_witness => constants.%Z.impl_witness.fae +// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.692 +// CHECK:STDOUT: %require_complete => constants.%require_complete.202 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.093 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.44b(%T.loc11_20.2) {} +// CHECK:STDOUT: specific @impl.62c(%T.loc11_20.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.62d) { // CHECK:STDOUT: %T.loc13_6.2 => constants.%T.62d @@ -424,17 +416,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.as_type.loc13_19.2 => constants.%T.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.44b(constants.%T.as_type) { +// CHECK:STDOUT: specific @impl.62c(constants.%T.as_type) { // CHECK:STDOUT: %T.loc11_20.2 => constants.%T.as_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: %Z.impl_witness => constants.%Z.impl_witness.731 +// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.272 +// CHECK:STDOUT: %require_complete => constants.%require_complete.915 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.7c2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.e47) {} +// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.2aa) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @impl.62c(@F.%T.as_type.loc13_19.2) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_nonfinal_specialized_symbolic_rewrite.carbon // CHECK:STDOUT: @@ -462,34 +456,34 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %assoc0.abb: %Z.assoc_type.0e7 = assoc_entity element0, @Z.%X [symbolic] // CHECK:STDOUT: %require_complete.b87: = require_complete_type %Z.type.8e9 [symbolic] // CHECK:STDOUT: %.Self.as_type.ffd: type = facet_access_type %.Self.eb1 [symbolic] -// CHECK:STDOUT: %.Self.as_wit.iface0.178: = facet_access_witness %.Self.eb1, element0 [symbolic] -// CHECK:STDOUT: %Z.facet.868: %Z.type.8e9 = facet_value %.Self.as_type.ffd, (%.Self.as_wit.iface0.178) [symbolic] -// 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: %Z.impl_witness.7f6: = impl_witness file.%Z.impl_witness_table.loc10, @impl.76d(%T.8b3, %S) [symbolic] +// CHECK:STDOUT: %Z.lookup_impl_witness.597: = lookup_impl_witness %.Self.eb1, @Z, @Z(%S) [symbolic] +// CHECK:STDOUT: %Z.facet.4f7: %Z.type.8e9 = facet_value %.Self.as_type.ffd, (%Z.lookup_impl_witness.597) [symbolic] +// CHECK:STDOUT: %impl.elem0.240: type = impl_witness_access %Z.lookup_impl_witness.597, element0 [symbolic] +// CHECK:STDOUT: %Z_where.type.80d: type = facet_type <@Z, @Z(%S) where %impl.elem0.240 = %empty_tuple.type> [symbolic] +// CHECK:STDOUT: %require_complete.9ea: = require_complete_type %Z_where.type.80d [symbolic] +// CHECK:STDOUT: %Z.impl_witness.d59: = impl_witness file.%Z.impl_witness_table.loc10, @impl.119(%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] // CHECK:STDOUT: %Z.assoc_type.252: type = assoc_entity_type @Z, @Z(%C) [concrete] // CHECK:STDOUT: %assoc0.ea4: %Z.assoc_type.252 = assoc_entity element0, @Z.%X [concrete] // CHECK:STDOUT: %.Self.as_type.c3c: type = facet_access_type %.Self.3c5 [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.72c: = facet_access_witness %.Self.3c5, element0 [symbolic_self] -// CHECK:STDOUT: %Z.facet.375: %Z.type.049 = facet_value %.Self.as_type.c3c, (%.Self.as_wit.iface0.72c) [symbolic_self] -// 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: %Z.impl_witness.fae: = impl_witness file.%Z.impl_witness_table.loc12, @impl.44b(%T.8b3) [symbolic] +// CHECK:STDOUT: %Z.lookup_impl_witness.9cc: = lookup_impl_witness %.Self.3c5, @Z, @Z(%C) [symbolic_self] +// CHECK:STDOUT: %Z.facet.eb4: %Z.type.049 = facet_value %.Self.as_type.c3c, (%Z.lookup_impl_witness.9cc) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.e29: type = impl_witness_access %Z.lookup_impl_witness.9cc, element0 [symbolic_self] +// CHECK:STDOUT: %Z_where.type.692: type = facet_type <@Z, @Z(%C) where %impl.elem0.e29 = %T.8b3> [symbolic] +// CHECK:STDOUT: %require_complete.202: = require_complete_type %Z_where.type.692 [symbolic] +// CHECK:STDOUT: %Z.impl_witness.093: = impl_witness file.%Z.impl_witness_table.loc12, @impl.62c(%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] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.2b1: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T.62d, element0 [symbolic] -// CHECK:STDOUT: %Z.facet.c2f: %Z.type.049 = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.44a: type = impl_witness_access %T.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %require_complete.b00: = require_complete_type %impl.elem0.44a [symbolic] +// CHECK:STDOUT: %Z.lookup_impl_witness.103: = lookup_impl_witness %T.62d, @Z, @Z(%C) [symbolic] +// CHECK:STDOUT: %Z.facet.5a7: %Z.type.049 = facet_value %T.as_type, (%Z.lookup_impl_witness.103) [symbolic] +// CHECK:STDOUT: %impl.elem0.284: type = impl_witness_access %Z.lookup_impl_witness.103, element0 [symbolic] +// CHECK:STDOUT: %require_complete.3ef: = require_complete_type %impl.elem0.284 [symbolic] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] // CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic] @@ -499,13 +493,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %assoc0.9f5: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.fb2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.44a)> [symbolic] -// CHECK:STDOUT: %Self.643: %ImplicitAs.type.fb2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Convert.type.6ea: type = fn_type @Convert, @ImplicitAs(%impl.elem0.44a) [symbolic] -// CHECK:STDOUT: %Convert.d0b: %Convert.type.6ea = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.40d: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.44a) [symbolic] -// CHECK:STDOUT: %assoc0.763: %ImplicitAs.assoc_type.40d = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %require_complete.462: = require_complete_type %ImplicitAs.type.fb2 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.199: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.284)> [symbolic] +// CHECK:STDOUT: %Self.b97: %ImplicitAs.type.199 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Convert.type.6a2: type = fn_type @Convert, @ImplicitAs(%impl.elem0.284) [symbolic] +// CHECK:STDOUT: %Convert.946: %Convert.type.6a2 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.assoc_type.bd9: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.284) [symbolic] +// CHECK:STDOUT: %assoc0.428: %ImplicitAs.assoc_type.bd9 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] +// CHECK:STDOUT: %require_complete.3ca: = require_complete_type %ImplicitAs.type.199 [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: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.bd4), @impl.f92 [concrete] @@ -553,7 +547,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [concrete = constants.%Y.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.76d [concrete] { +// CHECK:STDOUT: impl_decl @impl.119 [concrete] { // CHECK:STDOUT: %T.patt.loc10_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %S.patt.loc10_24.1: type = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc10_24.2 (constants.%S.patt)] // CHECK:STDOUT: } { @@ -561,26 +555,25 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc10_24.1 [symbolic = %S.loc10_24.2 (constants.%S)] // CHECK:STDOUT: %Z.type.loc10_42.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc10_42.2 (constants.%Z.type.8e9)] -// CHECK:STDOUT: %.Self.1: @impl.76d.%Z.type.loc10_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] -// CHECK:STDOUT: %.Self.ref: @impl.76d.%Z.type.loc10_42.2 (%Z.type.8e9) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.eb1)] -// CHECK:STDOUT: %.loc10_50.1: @impl.76d.%Z.assoc_type (%Z.assoc_type.0e7) = specific_constant @X.%assoc0, @Z(constants.%S) [symbolic = %assoc0 (constants.%assoc0.abb)] -// CHECK:STDOUT: %X.ref: @impl.76d.%Z.assoc_type (%Z.assoc_type.0e7) = name_ref X, %.loc10_50.1 [symbolic = %assoc0 (constants.%assoc0.abb)] +// CHECK:STDOUT: %.Self.1: @impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.ref: @impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.loc10_50.1: @impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = specific_constant @X.%assoc0, @Z(constants.%S) [symbolic = %assoc0 (constants.%assoc0.abb)] +// CHECK:STDOUT: %X.ref: @impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = name_ref X, %.loc10_50.1 [symbolic = %assoc0 (constants.%assoc0.abb)] // CHECK:STDOUT: %.Self.as_type.loc10_50.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.ffd)] // CHECK:STDOUT: %.loc10_50.2: type = converted %.Self.ref, %.Self.as_type.loc10_50.1 [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.ffd)] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_50.1: = facet_access_witness %.Self.ref, element0 [symbolic = %.Self.as_wit.iface0.loc10_50.2 (constants.%.Self.as_wit.iface0.178)] -// CHECK:STDOUT: %impl.elem0.loc10_50.1: type = impl_witness_access %.Self.as_wit.iface0.loc10_50.1, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.a53)] +// CHECK:STDOUT: %impl.elem0.loc10_50.1: type = impl_witness_access constants.%Z.lookup_impl_witness.597, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.240)] // CHECK:STDOUT: %.loc10_56.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_56.2: type = converted %.loc10_56.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_44: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.93a)] { +// CHECK:STDOUT: %.loc10_44: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.80d)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_50.1, %.loc10_56.2 // CHECK:STDOUT: } // 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: %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: %Z.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @impl.119 [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc10: = impl_witness %Z.impl_witness_table.loc10, @impl.119(constants.%T.8b3, constants.%S) [symbolic = @impl.119.%Z.impl_witness (constants.%Z.impl_witness.d59)] // 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: impl_decl @impl.62c [concrete] { // CHECK:STDOUT: %T.patt.loc12_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12_24: type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.8b3)] @@ -593,17 +586,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %X.ref: %Z.assoc_type.252 = name_ref X, %.loc12_40.1 [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.c3c] // CHECK:STDOUT: %.loc12_40.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.c3c] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0.72c] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.802] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness.9cc, element0 [symbolic_self = constants.%impl.elem0.e29] // CHECK:STDOUT: %T.ref.loc12_45: type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.8b3)] -// CHECK:STDOUT: %.loc12_34: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.bee)] { +// CHECK:STDOUT: %.loc12_34: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.692)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %T.ref.loc12_45 // 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: %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: %Z.impl_witness_table.loc12 = impl_witness_table (%impl_witness_assoc_constant.loc12), @impl.62c [concrete] +// CHECK:STDOUT: %Z.impl_witness.loc12: = impl_witness %Z.impl_witness_table.loc12, @impl.62c(constants.%T.8b3) [symbolic = @impl.62c.%Z.impl_witness (constants.%Z.impl_witness.093)] +// CHECK:STDOUT: %impl_witness_assoc_constant.loc12: type = impl_witness_assoc_constant constants.%T.8b3 [symbolic = @impl.62c.%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)] // CHECK:STDOUT: %t.patt: @F.%T.as_type.loc14_19.2 (%T.as_type) = binding_pattern t @@ -687,22 +679,22 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: assoc_const X:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.76d(%T.loc10_14.1: type, %S.loc10_24.1: type) { +// CHECK:STDOUT: generic impl @impl.119(%T.loc10_14.1: type, %S.loc10_24.1: type) { // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %T.patt.loc10_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt.e01)] // CHECK:STDOUT: %S.loc10_24.2: type = bind_symbolic_name S, 1 [symbolic = %S.loc10_24.2 (constants.%S)] // CHECK:STDOUT: %S.patt.loc10_24.2: type = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc10_24.2 (constants.%S.patt)] // CHECK:STDOUT: %Z.type.loc10_42.2: type = facet_type <@Z, @Z(%S.loc10_24.2)> [symbolic = %Z.type.loc10_42.2 (constants.%Z.type.8e9)] -// CHECK:STDOUT: %.Self.2: @impl.76d.%Z.type.loc10_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.2: @impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] // CHECK:STDOUT: %require_complete.loc10_50: = require_complete_type %Z.type.loc10_42.2 [symbolic = %require_complete.loc10_50 (constants.%require_complete.b87)] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc10_24.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.0e7)] -// CHECK:STDOUT: %assoc0: @impl.76d.%Z.assoc_type (%Z.assoc_type.0e7) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.abb)] +// CHECK:STDOUT: %assoc0: @impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.abb)] // CHECK:STDOUT: %.Self.as_type.loc10_50.2: type = facet_access_type %.Self.2 [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.ffd)] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_50.2: = facet_access_witness %.Self.2, element0 [symbolic = %.Self.as_wit.iface0.loc10_50.2 (constants.%.Self.as_wit.iface0.178)] -// 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: %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: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.2, @Z, @Z(%S.loc10_24.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.597)] +// CHECK:STDOUT: %impl.elem0.loc10_50.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.240)] +// 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.80d)] +// CHECK:STDOUT: %require_complete.loc10_44: = require_complete_type %Z_where.type [symbolic = %require_complete.loc10_44 (constants.%require_complete.9ea)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc10, @impl.119(%T.loc10_14.2, %S.loc10_24.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.d59)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -712,12 +704,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.44b(%T.loc12_14.1: type) { +// CHECK:STDOUT: generic impl @impl.62c(%T.loc12_14.1: type) { // CHECK:STDOUT: %T.loc12_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.8b3)] // 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: %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: %Z_where.type: type = facet_type <@Z, @Z(constants.%C) where constants.%impl.elem0.e29 = %T.loc12_14.2> [symbolic = %Z_where.type (constants.%Z_where.type.692)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.202)] +// CHECK:STDOUT: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table.loc12, @impl.62c(%T.loc12_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.093)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -759,34 +751,33 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc14: = require_complete_type %T.as_type.loc14_19.2 [symbolic = %require_complete.loc14 (constants.%require_complete.2b1)] -// CHECK:STDOUT: %T.as_wit.iface0.loc22_11.2: = facet_access_witness %T.loc14_6.2, element0 [symbolic = %T.as_wit.iface0.loc22_11.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc22_11.2: type = impl_witness_access %T.as_wit.iface0.loc22_11.2, element0 [symbolic = %impl.elem0.loc22_11.2 (constants.%impl.elem0.44a)] -// CHECK:STDOUT: %require_complete.loc22_11: = require_complete_type %impl.elem0.loc22_11.2 [symbolic = %require_complete.loc22_11 (constants.%require_complete.b00)] -// CHECK:STDOUT: %ImplicitAs.type.loc22_16.2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.loc22_11.2)> [symbolic = %ImplicitAs.type.loc22_16.2 (constants.%ImplicitAs.type.fb2)] -// CHECK:STDOUT: %require_complete.loc22_16: = require_complete_type %ImplicitAs.type.loc22_16.2 [symbolic = %require_complete.loc22_16 (constants.%require_complete.462)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.loc22_11.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.40d)] -// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.40d) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.763)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc14_6.2, @Z, @Z(constants.%C) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.103)] +// CHECK:STDOUT: %impl.elem0.loc22_11.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_11.2 (constants.%impl.elem0.284)] +// CHECK:STDOUT: %require_complete.loc22_11: = require_complete_type %impl.elem0.loc22_11.2 [symbolic = %require_complete.loc22_11 (constants.%require_complete.3ef)] +// CHECK:STDOUT: %ImplicitAs.type.loc22_16.2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.loc22_11.2)> [symbolic = %ImplicitAs.type.loc22_16.2 (constants.%ImplicitAs.type.199)] +// CHECK:STDOUT: %require_complete.loc22_16: = require_complete_type %ImplicitAs.type.loc22_16.2 [symbolic = %require_complete.loc22_16 (constants.%require_complete.3ca)] +// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.loc22_11.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.bd9)] +// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.bd9) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.428)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc14_19.2 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: @F.%impl.elem0.loc22_11.2 (%impl.elem0.44a) = binding_pattern a +// CHECK:STDOUT: %a.patt: @F.%impl.elem0.loc22_11.2 (%impl.elem0.284) = binding_pattern a // CHECK:STDOUT: } // CHECK:STDOUT: %t.ref: @F.%T.as_type.loc14_19.2 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %.loc22_11.1: type = splice_block %impl.elem0.loc22_11.1 [symbolic = %impl.elem0.loc22_11.2 (constants.%impl.elem0.44a)] { +// CHECK:STDOUT: %.loc22_11.1: type = splice_block %impl.elem0.loc22_11.1 [symbolic = %impl.elem0.loc22_11.2 (constants.%impl.elem0.284)] { // CHECK:STDOUT: %T.ref.loc22: %Z.type.049 = name_ref T, %T.loc14_6.1 [symbolic = %T.loc14_6.2 (constants.%T.62d)] // CHECK:STDOUT: %.loc22_11.2: %Z.assoc_type.252 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %X.ref: %Z.assoc_type.252 = name_ref X, %.loc22_11.2 [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc14_19.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc22_11.3: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.as_type.loc14_19.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc22_11.1: = facet_access_witness %T.ref.loc22, element0 [symbolic = %T.as_wit.iface0.loc22_11.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc22_11.1: type = impl_witness_access %T.as_wit.iface0.loc22_11.1, element0 [symbolic = %impl.elem0.loc22_11.2 (constants.%impl.elem0.44a)] +// CHECK:STDOUT: %impl.elem0.loc22_11.1: type = impl_witness_access constants.%Z.lookup_impl_witness.103, element0 [symbolic = %impl.elem0.loc22_11.2 (constants.%impl.elem0.284)] // CHECK:STDOUT: } -// CHECK:STDOUT: %ImplicitAs.type.loc22_16.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.44a)> [symbolic = %ImplicitAs.type.loc22_16.2 (constants.%ImplicitAs.type.fb2)] -// CHECK:STDOUT: %.loc22_16.1: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.40d) = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%impl.elem0.44a) [symbolic = %assoc0 (constants.%assoc0.763)] -// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.40d) = name_ref Convert, %.loc22_16.1 [symbolic = %assoc0 (constants.%assoc0.763)] -// CHECK:STDOUT: %.loc22_16.2: @F.%impl.elem0.loc22_11.2 (%impl.elem0.44a) = converted %t.ref, [concrete = ] -// CHECK:STDOUT: %a: @F.%impl.elem0.loc22_11.2 (%impl.elem0.44a) = bind_name a, +// CHECK:STDOUT: %ImplicitAs.type.loc22_16.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.284)> [symbolic = %ImplicitAs.type.loc22_16.2 (constants.%ImplicitAs.type.199)] +// CHECK:STDOUT: %.loc22_16.1: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.bd9) = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%impl.elem0.284) [symbolic = %assoc0 (constants.%assoc0.428)] +// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.bd9) = name_ref Convert, %.loc22_16.1 [symbolic = %assoc0 (constants.%assoc0.428)] +// CHECK:STDOUT: %.loc22_16.2: @F.%impl.elem0.loc22_11.2 (%impl.elem0.284) = converted %t.ref, [concrete = ] +// CHECK:STDOUT: %a: @F.%impl.elem0.loc22_11.2 (%impl.elem0.284) = bind_name a, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -828,9 +819,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %assoc0 => constants.%assoc0.abb // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%S, constants.%Z.facet.868) {} +// CHECK:STDOUT: specific @X(constants.%S, constants.%Z.facet.4f7) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.76d(constants.%T.8b3, constants.%S) { +// CHECK:STDOUT: specific @impl.119(constants.%T.8b3, constants.%S) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T.8b3 // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T.patt.e01 // CHECK:STDOUT: %S.loc10_24.2 => constants.%S @@ -841,16 +832,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.0e7 // CHECK:STDOUT: %assoc0 => constants.%assoc0.abb // CHECK:STDOUT: %.Self.as_type.loc10_50.2 => constants.%.Self.as_type.ffd -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_50.2 => constants.%.Self.as_wit.iface0.178 -// 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: %Z.impl_witness => constants.%Z.impl_witness.7f6 +// CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness.597 +// CHECK:STDOUT: %impl.elem0.loc10_50.2 => constants.%impl.elem0.240 +// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.80d +// CHECK:STDOUT: %require_complete.loc10_44 => constants.%require_complete.9ea +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.d59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(@impl.76d.%S.loc10_24.2) {} +// CHECK:STDOUT: specific @Z(@impl.119.%S.loc10_24.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.76d(%T.loc10_14.2, %S.loc10_24.2) {} +// CHECK:STDOUT: specific @impl.119(%T.loc10_14.2, %S.loc10_24.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%C) { // CHECK:STDOUT: %T.loc3_13.2 => constants.%C @@ -863,17 +854,17 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %assoc0 => constants.%assoc0.ea4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.375) {} +// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.eb4) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.44b(constants.%T.8b3) { +// CHECK:STDOUT: specific @impl.62c(constants.%T.8b3) { // CHECK:STDOUT: %T.loc12_14.2 => constants.%T.8b3 // 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: %Z.impl_witness => constants.%Z.impl_witness.fae +// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.692 +// CHECK:STDOUT: %require_complete => constants.%require_complete.202 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.093 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.44b(%T.loc12_14.2) {} +// CHECK:STDOUT: specific @impl.62c(%T.loc12_14.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.62d) { // CHECK:STDOUT: %T.loc14_6.2 => constants.%T.62d @@ -881,7 +872,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.as_type.loc14_19.2 => constants.%T.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.c2f) {} +// CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.5a7) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest => constants.%Dest @@ -899,17 +890,17 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%impl.elem0.44a) { -// CHECK:STDOUT: %Dest => constants.%impl.elem0.44a +// CHECK:STDOUT: specific @ImplicitAs(constants.%impl.elem0.284) { +// CHECK:STDOUT: %Dest => constants.%impl.elem0.284 // CHECK:STDOUT: %Dest.patt => constants.%Dest.patt // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.fb2 -// CHECK:STDOUT: %Self => constants.%Self.643 -// CHECK:STDOUT: %Convert.type => constants.%Convert.type.6ea -// CHECK:STDOUT: %Convert => constants.%Convert.d0b -// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.40d -// CHECK:STDOUT: %assoc0 => constants.%assoc0.763 +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.199 +// CHECK:STDOUT: %Self => constants.%Self.b97 +// CHECK:STDOUT: %Convert.type => constants.%Convert.type.6a2 +// CHECK:STDOUT: %Convert => constants.%Convert.946 +// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.bd9 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.428 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.f92(constants.%T.8b3) { @@ -926,7 +917,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(@F.%impl.elem0.loc22_11.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_impl_witness.carbon +// CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_impl_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete] @@ -937,20 +928,20 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %.Self: %Ptr.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] -// CHECK:STDOUT: %Ptr.facet.879: %Ptr.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: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self, @Ptr [symbolic_self] +// CHECK:STDOUT: %Ptr.facet.b6e: %Ptr.type = facet_value %.Self.as_type, (%Ptr.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self] // 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: %Ptr.impl_witness.bda667.1: = impl_witness file.%Ptr.impl_witness_table, @impl(%U) [symbolic] +// CHECK:STDOUT: %Ptr_where.type.bd48cc.1: type = facet_type <@Ptr where %impl.elem0 = %ptr.79f131.1> [symbolic] +// CHECK:STDOUT: %require_complete.465bad.1: = require_complete_type %Ptr_where.type.bd48cc.1 [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.e8ce81.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: %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: %Ptr_where.type.bd48cc.2: type = facet_type <@Ptr where %impl.elem0 = %ptr.79f131.2> [symbolic] +// CHECK:STDOUT: %require_complete.465bad.2: = require_complete_type %Ptr_where.type.bd48cc.2 [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.e8ce81.2: = impl_witness file.%Ptr.impl_witness_table, @impl(%T) [symbolic] +// CHECK:STDOUT: %Ptr.facet.bbf: %Ptr.type = facet_value %T, (%Ptr.impl_witness.e8ce81.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,17 +972,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f131.1)] -// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type.d906c9.1)] { +// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd48cc.1)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1 // 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: %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: %Ptr.impl_witness: = impl_witness %Ptr.impl_witness_table, @impl(constants.%U) [symbolic = @impl.%Ptr.impl_witness (constants.%Ptr.impl_witness.e8ce81.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)] @@ -1004,10 +994,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.%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: %Ptr.facet.loc9_30.1: %Ptr.type = facet_value constants.%T, (constants.%Ptr.impl_witness.e8ce81.2) [symbolic = %Ptr.facet.loc9_30.2 (constants.%Ptr.facet.bbf)] +// 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.bbf)] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.impl_witness.e8ce81.2, 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 // CHECK:STDOUT: %T.ref.loc9_23: type = name_ref T, %T.loc9_6.1 [symbolic = %T.loc9_6.2 (constants.%T)] @@ -1037,9 +1026,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %U.loc7_20.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc7_20.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_20.2 (constants.%U.patt)] // 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: %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: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0 = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd48cc.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.465bad.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.e8ce81.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1052,8 +1041,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // 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: %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.impl_witness: = impl_witness file.%Ptr.impl_witness_table, @impl(%T.loc9_6.2) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.e8ce81.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.bbf)] // CHECK:STDOUT: %ptr: type = ptr_type %T.loc9_6.2 [symbolic = %ptr (constants.%ptr.79f131.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1070,15 +1059,15 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Type(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.879) {} +// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.b6e) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%U) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%U // CHECK:STDOUT: %U.patt.loc7_20.2 => constants.%U.patt // 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: %Ptr.impl_witness => constants.%Ptr.impl_witness.bda667.1 +// CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.bd48cc.1 +// CHECK:STDOUT: %require_complete => constants.%require_complete.465bad.1 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.e8ce81.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%U.loc7_20.2) {} @@ -1087,20 +1076,20 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%T // CHECK:STDOUT: %U.patt.loc7_20.2 => constants.%U.patt // 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: %Ptr.impl_witness => constants.%Ptr.impl_witness.bda667.2 +// CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.bd48cc.2 +// CHECK:STDOUT: %require_complete => constants.%require_complete.465bad.2 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.e8ce81.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.c57) {} +// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.bbf) {} // 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: %Ptr.impl_witness => constants.%Ptr.impl_witness.bda667.2 -// CHECK:STDOUT: %Ptr.facet.loc9_30.2 => constants.%Ptr.facet.c57 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.e8ce81.2 +// CHECK:STDOUT: %Ptr.facet.loc9_30.2 => constants.%Ptr.facet.bbf // CHECK:STDOUT: %ptr => constants.%ptr.79f131.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1117,21 +1106,21 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %.Self: %Ptr.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] -// CHECK:STDOUT: %Ptr.facet.879: %Ptr.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: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self, @Ptr [symbolic_self] +// CHECK:STDOUT: %Ptr.facet.b6e: %Ptr.type = facet_value %.Self.as_type, (%Ptr.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self] // 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: %Ptr.impl_witness.bda: = impl_witness file.%Ptr.impl_witness_table, @impl(%U) [symbolic] +// CHECK:STDOUT: %Ptr_where.type.bd4: type = facet_type <@Ptr where %impl.elem0 = %ptr.79f> [symbolic] +// CHECK:STDOUT: %require_complete.465: = require_complete_type %Ptr_where.type.bd4 [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.e8c: = 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: %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: %Ptr_where.type.0d6: type = facet_type <@Ptr where %impl.elem0 = %ptr.900> [symbolic] +// CHECK:STDOUT: %require_complete.d01: = require_complete_type %Ptr_where.type.0d6 [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.5aa: = impl_witness file.%Ptr.impl_witness_table, @impl(%T.as_type) [symbolic] +// CHECK:STDOUT: %Ptr.facet.db8: %Ptr.type = facet_value %T.as_type, (%Ptr.impl_witness.5aa) [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] @@ -1162,17 +1151,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type.d90)] { +// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd4)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1 // 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: %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: %Ptr.impl_witness: = impl_witness %Ptr.impl_witness_table, @impl(constants.%U) [symbolic = @impl.%Ptr.impl_witness (constants.%Ptr.impl_witness.e8c)] // 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)] @@ -1188,7 +1176,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.%Ptr.impl_witness.b0e, element0 [symbolic = %ptr (constants.%ptr.900)] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.impl_witness.5aa, 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 @@ -1223,9 +1211,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %U.loc7_20.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc7_20.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_20.2 (constants.%U.patt)] // 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: %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: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0 = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd4)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.465)] +// 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.e8c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1239,6 +1227,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc9_6.2: %Ptr.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc9_6.2: %Ptr.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.as_type.loc9_22.2: type = facet_access_type %T.loc9_6.2 [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness file.%Ptr.impl_witness_table, @impl(%T.as_type.loc9_22.2) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.5aa)] // CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_22.2 [symbolic = %ptr (constants.%ptr.900)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1255,15 +1244,15 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Type(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.879) {} +// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.b6e) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%U) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%U // CHECK:STDOUT: %U.patt.loc7_20.2 => constants.%U.patt // 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: %Ptr.impl_witness => constants.%Ptr.impl_witness.bda +// CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.bd4 +// CHECK:STDOUT: %require_complete => constants.%require_complete.465 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.e8c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%U.loc7_20.2) {} @@ -1272,98 +1261,61 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%T.as_type // CHECK:STDOUT: %U.patt.loc7_20.2 => constants.%U.patt // 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: %Ptr.impl_witness => constants.%Ptr.impl_witness.b0e +// CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.0d6 +// CHECK:STDOUT: %require_complete => constants.%require_complete.d01 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.5aa // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.517) {} +// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.db8) {} // 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: %T.as_type.loc9_22.2 => constants.%T.as_type +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.5aa // CHECK:STDOUT: %ptr => constants.%ptr.900 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_final_impl_rewrite_of_symbolic_through_facet_access_witness.carbon +// CHECK:STDOUT: specific @impl(@F.%T.as_type.loc9_22.2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_facet_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete] -// CHECK:STDOUT: %Self.972: %Ptr.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self: %Ptr.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete] -// CHECK:STDOUT: %assoc0.d28: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] +// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %.Self: %Ptr.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] -// CHECK:STDOUT: %Ptr.facet.879: %Ptr.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.dff: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self, @Ptr [symbolic_self] +// CHECK:STDOUT: %Ptr.facet.b6e: %Ptr.type = facet_value %.Self.as_type, (%Ptr.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self] // 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: %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] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T.972, element0 [symbolic] -// CHECK:STDOUT: %Ptr.facet.7ad: %Ptr.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.9f2: type = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %Ptr_where.type.bd4: type = facet_type <@Ptr where %impl.elem0 = %ptr.79f> [symbolic] +// CHECK:STDOUT: %require_complete.465: = require_complete_type %Ptr_where.type.bd4 [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.e8c: = 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.0d6: type = facet_type <@Ptr where %impl.elem0 = %ptr.900> [symbolic] +// CHECK:STDOUT: %require_complete.d01: = require_complete_type %Ptr_where.type.0d6 [symbolic] +// CHECK:STDOUT: %Ptr.impl_witness.5aa: = impl_witness file.%Ptr.impl_witness_table, @impl(%T.as_type) [symbolic] +// CHECK:STDOUT: %Ptr.facet.db8: %Ptr.type = facet_value %T.as_type, (%Ptr.impl_witness.5aa) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.357: = require_complete_type %impl.elem0.9f2 [symbolic] +// CHECK:STDOUT: %require_complete.df6: = require_complete_type %ptr.900 [symbolic] // CHECK:STDOUT: %require_complete.020: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %ptr.900: type = ptr_type %T.as_type [symbolic] -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] -// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0.9f5: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.73f: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.9f2)> [symbolic] -// CHECK:STDOUT: %Self.20d: %ImplicitAs.type.73f = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Convert.type.c52: type = fn_type @Convert, @ImplicitAs(%impl.elem0.9f2) [symbolic] -// CHECK:STDOUT: %Convert.c34: %Convert.type.c52 = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.3d1: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.9f2) [symbolic] -// CHECK:STDOUT: %assoc0.802: %ImplicitAs.assoc_type.3d1 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %require_complete.5f0: = require_complete_type %ImplicitAs.type.73f [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: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [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] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: 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 -// CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)] -// CHECK:STDOUT: %Core.Convert = import_ref Core//prelude, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//prelude, inst67 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] -// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// 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.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.5ab3ec.4: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1374,59 +1326,59 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Ptr.decl: type = interface_decl @Ptr [concrete = constants.%Ptr.type] {} {} -// CHECK:STDOUT: impl_decl @impl.a8e [concrete] { +// CHECK:STDOUT: impl_decl @impl [concrete] { // CHECK:STDOUT: %U.patt.loc7_20.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_20.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] // CHECK:STDOUT: %.Self: %Ptr.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.d28] +// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.dff] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type)] { +// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd4)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1 // 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: %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: %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.e8c)] +// 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.0a1)] +// CHECK:STDOUT: %T.patt.loc9_6.1: %Ptr.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt)] // CHECK:STDOUT: %t.patt: @F.%T.as_type.loc9_22.2 (%T.as_type) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @F.%T.as_type.loc9_22.2 (%T.as_type) = ref_param_pattern %t.patt, call_param0 // CHECK:STDOUT: %.loc9_15: @F.%T.as_type.loc9_22.2 (%T.as_type) = var_pattern %t.param_patt -// CHECK:STDOUT: %return.patt: @F.%impl.elem0.loc9_29.2 (%impl.elem0.9f2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%impl.elem0.loc9_29.2 (%impl.elem0.9f2) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: %return.patt: @F.%ptr (%ptr.900) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%ptr (%ptr.900) = out_param_pattern %return.patt, call_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc9_28: %Ptr.type = name_ref T, %T.loc9_6.1 [symbolic = %T.loc9_6.2 (constants.%T.972)] +// CHECK:STDOUT: %T.ref.loc9_28: %Ptr.type = name_ref T, %T.loc9_6.1 [symbolic = %T.loc9_6.2 (constants.%T)] // CHECK:STDOUT: %Ptr.ref.loc9_31: 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.d28] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_29.1: = facet_access_witness %T.ref.loc9_28, element0 [symbolic = %T.as_wit.iface0.loc9_29.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_29.1: type = impl_witness_access %T.as_wit.iface0.loc9_29.1, element0 [symbolic = %impl.elem0.loc9_29.2 (constants.%impl.elem0.9f2)] +// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.as_type.loc9_29: type = facet_access_type constants.%T [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_29: type = converted constants.%T, %T.as_type.loc9_29 [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.impl_witness.5aa, element0 [symbolic = %ptr (constants.%ptr.900)] // CHECK:STDOUT: %Ptr.ref.loc9_10: 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.972)] +// 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 // CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc9_22: %Ptr.type = name_ref T, %T.loc9_6.1 [symbolic = %T.loc9_6.2 (constants.%T.972)] +// CHECK:STDOUT: %T.ref.loc9_22: %Ptr.type = name_ref T, %T.loc9_6.1 [symbolic = %T.loc9_6.2 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc9_22.1: type = facet_access_type %T.ref.loc9_22 [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_22.2: type = converted %T.ref.loc9_22, %T.as_type.loc9_22.1 [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %t: ref @F.%T.as_type.loc9_22.2 (%T.as_type) = bind_name t, %t.param -// CHECK:STDOUT: %return.param: ref @F.%impl.elem0.loc9_29.2 (%impl.elem0.9f2) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%impl.elem0.loc9_29.2 (%impl.elem0.9f2) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%ptr (%ptr.900) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%ptr (%ptr.900) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Ptr { -// CHECK:STDOUT: %Self: %Ptr.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.972] +// CHECK:STDOUT: %Self: %Ptr.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Type: type = assoc_const_decl @Type [concrete] { -// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete = constants.%assoc0.d28] +// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete = constants.%assoc0] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -1435,44 +1387,17 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: witness = (%Type) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] -// CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)] -// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ca0)] -// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.9f5)] -// CHECK:STDOUT: -// CHECK:STDOUT: interface { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5 -// CHECK:STDOUT: .Convert = imports.%Core.import_ref.492 -// CHECK:STDOUT: witness = (imports.%Core.Convert) -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: interface @BitAnd [from "include_files/facet_types.carbon"] { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Core.import_ref.ad0 -// CHECK:STDOUT: .Op = imports.%Core.import_ref.02e -// CHECK:STDOUT: witness = (imports.%Core.Op) -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @Type(@Ptr.%Self: %Ptr.type) { // CHECK:STDOUT: assoc_const Type:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl.a8e(%U.loc7_20.1: type) { +// CHECK:STDOUT: generic impl @impl(%U.loc7_20.1: type) { // CHECK:STDOUT: %U.loc7_20.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc7_20.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_20.2 (constants.%U.patt)] // 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: %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: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0 = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd4)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.465)] +// 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.e8c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1482,134 +1407,62 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // 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: %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)] -// CHECK:STDOUT: %Op: @impl.f92.%Op.type (%Op.type) = struct_value () [symbolic = %Op (constants.%Op)] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4ae)] -// 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.287 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc9_6.1: %Ptr.type) { -// CHECK:STDOUT: %T.loc9_6.2: %Ptr.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.2 (constants.%T.972)] -// CHECK:STDOUT: %T.patt.loc9_6.2: %Ptr.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.0a1)] +// CHECK:STDOUT: %T.loc9_6.2: %Ptr.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.2 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc9_6.2: %Ptr.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.as_type.loc9_22.2: type = facet_access_type %T.loc9_6.2 [symbolic = %T.as_type.loc9_22.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_29.2: = facet_access_witness %T.loc9_6.2, element0 [symbolic = %T.as_wit.iface0.loc9_29.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_29.2: type = impl_witness_access %T.as_wit.iface0.loc9_29.2, element0 [symbolic = %impl.elem0.loc9_29.2 (constants.%impl.elem0.9f2)] +// CHECK:STDOUT: %Ptr.impl_witness: = impl_witness file.%Ptr.impl_witness_table, @impl(%T.as_type.loc9_22.2) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.5aa)] +// CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_22.2 [symbolic = %ptr (constants.%ptr.900)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9_25: = require_complete_type %impl.elem0.loc9_29.2 [symbolic = %require_complete.loc9_25 (constants.%require_complete.357)] +// CHECK:STDOUT: %require_complete.loc9_25: = require_complete_type %ptr [symbolic = %require_complete.loc9_25 (constants.%require_complete.df6)] // CHECK:STDOUT: %require_complete.loc9_15: = require_complete_type %T.as_type.loc9_22.2 [symbolic = %require_complete.loc9_15 (constants.%require_complete.020)] -// CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_22.2 [symbolic = %ptr (constants.%ptr.900)] -// CHECK:STDOUT: %ImplicitAs.type.loc17_12.2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.loc9_29.2)> [symbolic = %ImplicitAs.type.loc17_12.2 (constants.%ImplicitAs.type.73f)] -// CHECK:STDOUT: %require_complete.loc17: = require_complete_type %ImplicitAs.type.loc17_12.2 [symbolic = %require_complete.loc17 (constants.%require_complete.5f0)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.loc9_29.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.3d1)] -// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.3d1) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.802)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc9_22.2 (%T.as_type)) -> @F.%impl.elem0.loc9_29.2 (%impl.elem0.9f2) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc9_22.2 (%T.as_type)) -> @F.%ptr (%ptr.900) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref @F.%T.as_type.loc9_22.2 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.900) = addr_of %t.ref -// CHECK:STDOUT: %ImplicitAs.type.loc17_12.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.9f2)> [symbolic = %ImplicitAs.type.loc17_12.2 (constants.%ImplicitAs.type.73f)] -// CHECK:STDOUT: %.loc17_12.1: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.3d1) = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%impl.elem0.9f2) [symbolic = %assoc0 (constants.%assoc0.802)] -// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.3d1) = name_ref Convert, %.loc17_12.1 [symbolic = %assoc0 (constants.%assoc0.802)] -// CHECK:STDOUT: %.loc17_12.2: @F.%impl.elem0.loc9_29.2 (%impl.elem0.9f2) = converted %addr, [concrete = ] -// CHECK:STDOUT: return +// CHECK:STDOUT: return %addr // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "include_files/facet_types.carbon"] { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] -// CHECK:STDOUT: %Self: @Convert.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)] +// CHECK:STDOUT: specific @Type(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: fn; -// CHECK:STDOUT: } +// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.b6e) {} // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op(imports.%Core.import_ref.5ab3ec.4: type) [from "include_files/facet_types.carbon"] { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: fn = "type.and"; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Self.972) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.879) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.a8e(constants.%U) { +// CHECK:STDOUT: specific @impl(constants.%U) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%U // CHECK:STDOUT: %U.patt.loc7_20.2 => constants.%U.patt // 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: %Ptr.impl_witness => constants.%Ptr.impl_witness +// CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.bd4 +// CHECK:STDOUT: %require_complete => constants.%require_complete.465 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.e8c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.a8e(%U.loc7_20.2) {} +// CHECK:STDOUT: specific @impl(%U.loc7_20.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.7ad) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.972) { -// CHECK:STDOUT: %T.loc9_6.2 => constants.%T.972 -// CHECK:STDOUT: %T.patt.loc9_6.2 => constants.%T.patt.0a1 -// CHECK:STDOUT: %T.as_type.loc9_22.2 => constants.%T.as_type -// CHECK:STDOUT: %T.as_wit.iface0.loc9_29.2 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc9_29.2 => constants.%impl.elem0.9f2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %Dest.patt => constants.%Dest.patt -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62 -// CHECK:STDOUT: %Self => constants.%Self.519 -// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%impl.elem0.9f2) { -// CHECK:STDOUT: %Dest => constants.%impl.elem0.9f2 -// CHECK:STDOUT: %Dest.patt => constants.%Dest.patt +// CHECK:STDOUT: specific @impl(constants.%T.as_type) { +// CHECK:STDOUT: %U.loc7_20.2 => constants.%T.as_type +// CHECK:STDOUT: %U.patt.loc7_20.2 => constants.%U.patt +// CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.900 +// CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.0d6 +// CHECK:STDOUT: %require_complete => constants.%require_complete.d01 +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.5aa // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.73f -// CHECK:STDOUT: %Self => constants.%Self.20d -// CHECK:STDOUT: %Convert.type => constants.%Convert.type.c52 -// CHECK:STDOUT: %Convert => constants.%Convert.c34 -// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.3d1 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.802 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.f92(constants.%T.8b3) { -// CHECK:STDOUT: %T => constants.%T.8b3 -// CHECK:STDOUT: %T.patt => constants.%T.patt.e01 -// CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness +// CHECK:STDOUT: specific @Type(constants.%Ptr.facet.db8) {} +// 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: %T.as_type.loc9_22.2 => constants.%T.as_type +// CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.5aa +// CHECK:STDOUT: %ptr => constants.%ptr.900 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.f92(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Op(constants.%T.8b3) { -// CHECK:STDOUT: %T => constants.%T.8b3 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@F.%impl.elem0.loc9_29.2) {} +// CHECK:STDOUT: specific @impl(@F.%T.as_type.loc9_22.2) {} // CHECK:STDOUT: // CHECK:STDOUT: --- include_files/facet_types.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/min_prelude/symbolic_lookup.carbon b/toolchain/check/testdata/impl/lookup/min_prelude/symbolic_lookup.carbon index d727165f7cbc..2e926ee47145 100644 --- a/toolchain/check/testdata/impl/lookup/min_prelude/symbolic_lookup.carbon +++ b/toolchain/check/testdata/impl/lookup/min_prelude/symbolic_lookup.carbon @@ -53,3 +53,21 @@ class C(T:! X) {} class D(T:! Y) { adapt C(T); } fn Test(T:! Y & Z, d: D(T)) {} + +// --- final_symbolic_rewrite.carbon +library "[[@TEST_NAME]]"; + +interface Z(T:! type) { + let X:! type; +} + +// This impl has a rewrite to a symbolic value, and the `.Self` type has a +// dependency on a generic parameter. +final impl forall [T:! type, S:! type] T as Z(S) where .X = T {} + +class C {} + +fn F(T:! Z(C), t: T) { + // This should typecheck, the `final impl` should give the same `T`. + let a: T.X = t; +} diff --git a/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon b/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon index 25afb5be64d0..c553997774cc 100644 --- a/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon +++ b/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon @@ -584,9 +584,9 @@ interface I { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %.Self: %I.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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, 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: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] @@ -614,8 +614,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc6: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc6: type = facet_access_type %.Self.ref.loc6 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6, %.Self.as_type.loc6 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc6: = facet_access_witness %.Self.ref.loc6, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access %.Self.as_wit.iface0.loc6, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_26.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc6_14: type = where_expr %.Self.1 [concrete = constants.%I_where.type] { @@ -634,8 +633,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc8: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc8: type = facet_access_type %.Self.ref.loc8 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref.loc8, %.Self.as_type.loc8 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc8: = facet_access_witness %.Self.ref.loc8, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access %.Self.as_wit.iface0.loc8, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc8_26.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_26.2: type = converted %.loc8_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { @@ -681,13 +679,13 @@ interface I { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self: %I.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] -// CHECK:STDOUT: %I.facet.d87: %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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, 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: %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: %I.facet.880: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -715,8 +713,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc7: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc7: type = facet_access_type %.Self.ref.loc7 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_19: type = converted %.Self.ref.loc7, %.Self.as_type.loc7 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc7: = facet_access_witness %.Self.ref.loc7, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc7: type = impl_witness_access %.Self.as_wit.iface0.loc7, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc7: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc7_25.2: type = converted %.loc7_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc7_13: type = where_expr %.Self.1 [concrete = constants.%I_where.type] { @@ -733,10 +730,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.%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: %I.facet: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.880] +// CHECK:STDOUT: %.loc9_9.2: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.880] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_19: %empty_tuple.type = converted @__global_init.%.loc9, %empty_tuple [concrete = constants.%empty_tuple] @@ -749,8 +745,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_19: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc11: = facet_access_witness %.Self.ref.loc11, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access %.Self.as_wit.iface0.loc11, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc11_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_25.2: type = converted %.loc11_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc11_13: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { @@ -797,9 +792,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet.d87) {} +// CHECK:STDOUT: specific @T(constants.%I.facet.74c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet.62e) {} +// CHECK:STDOUT: specific @T(constants.%I.facet.880) {} // CHECK:STDOUT: // CHECK:STDOUT: --- associated_const_of_facet.carbon // CHECK:STDOUT: @@ -813,13 +808,13 @@ interface I { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self: %I.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] -// CHECK:STDOUT: %I.facet.d87: %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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, 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: %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: %I.facet.880: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -847,8 +842,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc7: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc7: type = facet_access_type %.Self.ref.loc7 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_19: type = converted %.Self.ref.loc7, %.Self.as_type.loc7 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc7: = facet_access_witness %.Self.ref.loc7, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc7: type = impl_witness_access %.Self.as_wit.iface0.loc7, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc7: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc7_25.2: type = converted %.loc7_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc7_13: type = where_expr %.Self.1 [concrete = constants.%I_where.type] { @@ -864,13 +858,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.%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: %I.facet: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.880] +// CHECK:STDOUT: %.loc9_11: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.880] // 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.%I.impl_witness] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_22: %empty_tuple.type = converted @__global_init.%.loc9, %empty_tuple [concrete = constants.%empty_tuple] @@ -883,8 +876,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_19: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc11: = facet_access_witness %.Self.ref.loc11, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access %.Self.as_wit.iface0.loc11, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc11_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_25.2: type = converted %.loc11_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc11_13: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { @@ -931,9 +923,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet.d87) {} +// CHECK:STDOUT: specific @T(constants.%I.facet.74c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet.62e) {} +// CHECK:STDOUT: specific @T(constants.%I.facet.880) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_unset_associated_const.carbon // CHECK:STDOUT: @@ -983,8 +975,7 @@ interface I { // 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.%I.impl_witness] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %as_wit.iface0, element0 [concrete = ] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: %x: = bind_name x, // CHECK:STDOUT: impl_decl @impl [concrete] {} { @@ -1140,9 +1131,9 @@ interface I { // CHECK:STDOUT: %I.assoc_type.b3c: type = assoc_entity_type @I, @I(%C) [concrete] // CHECK:STDOUT: %assoc0.3e4: %I.assoc_type.b3c = assoc_entity element0, @I.%T [concrete] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I, @I(%C) [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type.e7a = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I, @I(%C) where %impl.elem0 = %C> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } @@ -1179,8 +1170,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc8: %I.assoc_type.b3c = name_ref T, %.loc8_22.1 [concrete = constants.%assoc0.3e4] // CHECK:STDOUT: %.Self.as_type.loc8: type = facet_access_type %.Self.ref.loc8 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_22.2: type = converted %.Self.ref.loc8, %.Self.as_type.loc8 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc8: = facet_access_witness %.Self.ref.loc8, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access %.Self.as_wit.iface0.loc8, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %C.ref.loc8_27: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C] // CHECK:STDOUT: %.loc8_16: type = where_expr %.Self.1 [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %C.ref.loc8_27 @@ -1201,8 +1191,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type.b3c = name_ref T, %.loc11_22.1 [concrete = constants.%assoc0.3e4] // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_22.2: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc11: = facet_access_witness %.Self.ref.loc11, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access %.Self.as_wit.iface0.loc11, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %C.ref.loc11_27: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C] // CHECK:STDOUT: %.loc11_16: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11, %C.ref.loc11_27 @@ -1605,9 +1594,9 @@ interface I { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self: %I.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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, 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: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] @@ -1636,8 +1625,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc9: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9: type = facet_access_type %.Self.ref.loc9 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_19: type = converted %.Self.ref.loc9, %.Self.as_type.loc9 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9: = facet_access_witness %.Self.ref.loc9, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access %.Self.as_wit.iface0.loc9, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_25.2: type = converted %.loc9_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc9_13: type = where_expr %.Self.1 [concrete = constants.%I_where.type] { @@ -1655,8 +1643,7 @@ interface I { // CHECK:STDOUT: %T.ref.loc18: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc18: type = facet_access_type %.Self.ref.loc18 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc18_19: type = converted %.Self.ref.loc18, %.Self.as_type.loc18 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc18: = facet_access_witness %.Self.ref.loc18, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc18: type = impl_witness_access %.Self.as_wit.iface0.loc18, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc18: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc18_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc18_25.2: type = converted %.loc18_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc18_13: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { @@ -2061,9 +2048,9 @@ interface I { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self: %I.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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %C> [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %I_where.type [symbolic] // CHECK:STDOUT: %I.impl_witness: = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic] @@ -2149,8 +2136,7 @@ interface I { // CHECK:STDOUT: %U.ref.loc12: %I.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc12: type = facet_access_type %.Self.ref.loc12 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc12_23: type = converted %.Self.ref.loc12, %.Self.as_type.loc12 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc12: = facet_access_witness %.Self.ref.loc12, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc12: type = impl_witness_access %.Self.as_wit.iface0.loc12, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc12: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %C.ref.loc12_28: type = name_ref C, @F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %.loc12_17: type = where_expr %.Self.1 [symbolic = %I_where.type (constants.%I_where.type)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc12, %C.ref.loc12_28 @@ -2167,8 +2153,7 @@ interface I { // CHECK:STDOUT: %U.ref.loc21: %I.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc21: type = facet_access_type %.Self.ref.loc21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc21_23: type = converted %.Self.ref.loc21, %.Self.as_type.loc21 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc21: = facet_access_witness %.Self.ref.loc21, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc21: type = impl_witness_access %.Self.as_wit.iface0.loc21, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc21: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %C.ref.loc21_28: type = name_ref C, @F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %.loc21_17: type = where_expr %.Self.2 [symbolic = %I_where.type (constants.%I_where.type)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc21, %C.ref.loc21_28 diff --git a/toolchain/check/testdata/impl/no_prelude/compound.carbon b/toolchain/check/testdata/impl/no_prelude/compound.carbon index 7bab133b7e75..a026c21b27b0 100644 --- a/toolchain/check/testdata/impl/no_prelude/compound.carbon +++ b/toolchain/check/testdata/impl/no_prelude/compound.carbon @@ -284,8 +284,7 @@ fn InstanceCallFail() { // 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.%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.%NonInstance1.impl_witness] -// CHECK:STDOUT: %impl.elem0: %.a2c = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F1.c75] +// CHECK:STDOUT: %impl.elem0: %.a2c = impl_witness_access constants.%NonInstance1.impl_witness, element0 [concrete = constants.%F1.c75] // CHECK:STDOUT: %F1.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 6561e0d15123..852ae9041b69 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 @@ -388,8 +388,7 @@ class X { // 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.%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.%Z.impl_witness] -// CHECK:STDOUT: %impl.elem0: %.d52 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%Zero.dec] +// CHECK:STDOUT: %impl.elem0: %.d52 = 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: %.loc29_5.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %Point.ref.loc29: type = name_ref Point, file.%Point.decl [concrete = constants.%Point] diff --git a/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon b/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon index f2ceb96d89e6..7eef310d0069 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon @@ -209,9 +209,9 @@ impl C as J where .Self impls Incomplete and .T = (); // CHECK:STDOUT: %Incomplete.type: type = facet_type <@Incomplete> [concrete] // CHECK:STDOUT: %.Self: %J.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] -// CHECK:STDOUT: %J.facet: %J.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: %J.lookup_impl_witness: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where .Self impls @Incomplete and %impl.elem0 = %empty_tuple.type> [concrete] // CHECK:STDOUT: } @@ -237,8 +237,7 @@ impl C as J where .Self impls Incomplete and .T = (); // CHECK:STDOUT: %T.ref: %J.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc15_46: type = facet_access_type %.Self.ref.loc15_46 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc15_46: type = converted %.Self.ref.loc15_46, %.Self.as_type.loc15_46 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref.loc15_46, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc15_52.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_52.2: type = converted %.loc15_52.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc15_13: type = where_expr %.Self [concrete = constants.%J_where.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 b76379994e94..56afaa929228 100644 --- a/toolchain/check/testdata/impl/no_prelude/impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/no_prelude/impl_assoc_const.carbon @@ -184,9 +184,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %I.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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, 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: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] @@ -206,8 +206,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self [concrete = constants.%I_where.type] { @@ -254,9 +253,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %I2.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] -// CHECK:STDOUT: %I2.facet: %I2.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: %I2.lookup_impl_witness: = lookup_impl_witness %.Self, @I2 [symbolic_self] +// CHECK:STDOUT: %I2.facet: %I2.type = facet_value %.Self.as_type, (%I2.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I2.lookup_impl_witness, 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: %I2.impl_witness: = impl_witness file.%I2.impl_witness_table [concrete] @@ -276,8 +275,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T2.ref.loc5: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc5: type = facet_access_type %.Self.ref.loc5 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_21: type = converted %.Self.ref.loc5, %.Self.as_type.loc5 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc5: = facet_access_witness %.Self.ref.loc5, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc5: type = impl_witness_access %.Self.as_wit.iface0.loc5, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc5: type = impl_witness_access constants.%I2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc5_28.2: type = converted %.loc5_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc5_15: type = where_expr %.Self.1 [concrete = constants.%I2_where.type] { @@ -296,8 +294,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T2.ref.loc6: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc6: type = facet_access_type %.Self.ref.loc6 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_21: type = converted %.Self.ref.loc6, %.Self.as_type.loc6 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc6: = facet_access_witness %.Self.ref.loc6, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access %.Self.as_wit.iface0.loc6, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access constants.%I2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_28.2: type = converted %.loc6_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc6_15: type = where_expr %.Self.2 [concrete = constants.%I2_where.type] { @@ -342,12 +339,12 @@ impl CD as IF where .F = 0 { // 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] -// CHECK:STDOUT: %I3.facet: %I3.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: %I3.lookup_impl_witness: = lookup_impl_witness %.Self, @I3 [symbolic_self] +// CHECK:STDOUT: %I3.facet: %I3.type = facet_value %.Self.as_type, (%I3.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I3.lookup_impl_witness, 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: %I3.impl_witness.8b6: = impl_witness file.%I3.impl_witness_table.loc10 [concrete] +// CHECK:STDOUT: %I3.impl_witness.ea7: = impl_witness file.%I3.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -362,7 +359,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: } // 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: impl_decl @impl.4b6 [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] // CHECK:STDOUT: %I3.ref: type = name_ref I3, file.%I3.decl [concrete = constants.%I3.type] @@ -371,16 +368,15 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, @T3.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc10_28.2: type = converted %.loc10_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [concrete = constants.%I3_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %I3.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant), @impl.4b6 [concrete] +// CHECK:STDOUT: %I3.impl_witness.loc10: = impl_witness %I3.impl_witness_table.loc10 [concrete = constants.%I3.impl_witness.ea7] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -402,7 +398,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.b46: %.loc9_7.2 as %I3.ref; // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2b6: %.loc10_7.2 as %.loc10_15 { +// CHECK:STDOUT: impl @impl.4b6: %.loc10_7.2 as %.loc10_15 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I3.impl_witness.loc10 // CHECK:STDOUT: } @@ -421,14 +417,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %J.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] -// CHECK:STDOUT: %J.facet: %J.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: %J.lookup_impl_witness: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, 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: %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: %J.impl_witness.4f1: = impl_witness file.%J.impl_witness_table.loc10 [concrete] +// CHECK:STDOUT: %J_where.type.49a: type = facet_type <@J where %impl.elem0 = %empty_struct_type> [concrete] +// CHECK:STDOUT: %J.impl_witness.2a1: = impl_witness file.%J.impl_witness_table.loc9 [concrete] +// CHECK:STDOUT: %J_where.type.344: type = facet_type <@J where %impl.elem0 = %empty_tuple.type> [concrete] +// CHECK:STDOUT: %J.impl_witness.006: = impl_witness file.%J.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -436,7 +432,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .J = %J.decl // CHECK:STDOUT: } // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: impl_decl @impl.8c7 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.3df [concrete] {} { // CHECK:STDOUT: %.loc9_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] @@ -445,18 +441,17 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_26.2: type = converted %.loc9_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc9_14: type = where_expr %.Self [concrete = constants.%J_where.type.5f6] { +// CHECK:STDOUT: %.loc9_14: type = where_expr %.Self [concrete = constants.%J_where.type.49a] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %J.impl_witness_table.loc9 = impl_witness_table (%impl_witness_assoc_constant.loc9), @impl.3df [concrete] +// CHECK:STDOUT: %J.impl_witness.loc9: = impl_witness %J.impl_witness_table.loc9 [concrete = constants.%J.impl_witness.2a1] // 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: impl_decl @impl.153 [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] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] @@ -465,16 +460,15 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = constants.%J_where.type.143] { +// CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = constants.%J_where.type.344] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %J.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @impl.153 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc10: = impl_witness %J.impl_witness_table.loc10 [concrete = constants.%J.impl_witness.006] // 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: @@ -494,9 +488,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: assoc_const U:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.8c7: %.loc9_7.2 as %.loc9_14; +// CHECK:STDOUT: impl @impl.3df: %.loc9_7.2 as %.loc9_14; // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.6a8: %.loc10_7.2 as %.loc10_14 { +// CHECK:STDOUT: impl @impl.153: %.loc10_7.2 as %.loc10_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%J.impl_witness.loc10 // CHECK:STDOUT: } @@ -517,13 +511,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %I4.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] -// CHECK:STDOUT: %I4.facet: %I4.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: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0, element1 [symbolic_self] +// CHECK:STDOUT: %I4.lookup_impl_witness: = lookup_impl_witness %.Self, @I4 [symbolic_self] +// CHECK:STDOUT: %I4.facet: %I4.type = facet_value %.Self.as_type, (%I4.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I4.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %I4.lookup_impl_witness, element1 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete] -// CHECK:STDOUT: %impl.elem2: type = impl_witness_access %.Self.as_wit.iface0, element2 [symbolic_self] +// CHECK:STDOUT: %impl.elem2: type = impl_witness_access %I4.lookup_impl_witness, element2 [symbolic_self] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_struct_type} [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -545,15 +539,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T4.ref: %I4.assoc_type = name_ref T4, @T4.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc17_21: type = facet_access_type %.Self.ref.loc17_21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc17_21: type = converted %.Self.ref.loc17_21, %.Self.as_type.loc17_21 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc17_21: = facet_access_witness %.Self.ref.loc17_21, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.loc17_21, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I4.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD1.ref: = name_ref BAD1, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc17_36: %I4.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T5.ref: %I4.assoc_type = name_ref T5, @T5.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc17_36: type = facet_access_type %.Self.ref.loc17_36 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc17_36: type = converted %.Self.ref.loc17_36, %.Self.as_type.loc17_36 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc17_36: = facet_access_witness %.Self.ref.loc17_36, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.loc17_36, element1 [symbolic_self = constants.%impl.elem1] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%I4.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %.loc17_48.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc17_48.2: type = converted %.loc17_48.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete = constants.%struct_type.a] @@ -561,8 +553,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T6.ref: %I4.assoc_type = name_ref T6, @T6.%assoc2 [concrete = constants.%assoc2] // CHECK:STDOUT: %.Self.as_type.loc17_55: type = facet_access_type %.Self.ref.loc17_55 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc17_55: type = converted %.Self.ref.loc17_55, %.Self.as_type.loc17_55 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc17_55: = facet_access_witness %.Self.ref.loc17_55, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem2: type = impl_witness_access %.Self.as_wit.iface0.loc17_55, element2 [symbolic_self = constants.%impl.elem2] +// CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%I4.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2] // CHECK:STDOUT: %BAD2.ref: = name_ref BAD2, [concrete = ] // CHECK:STDOUT: %.loc17_15: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, @@ -579,8 +570,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T4.ref: %I4.assoc_type = name_ref T4, @T4.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc27_21: type = facet_access_type %.Self.ref.loc27_21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc27_21: type = converted %.Self.ref.loc27_21, %.Self.as_type.loc27_21 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc27_21: = facet_access_witness %.Self.ref.loc27_21, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.loc27_21, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I4.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc27_33.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc27_33.2: type = converted %.loc27_33.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_struct_type} [concrete = constants.%struct_type.b] @@ -588,15 +578,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T5.ref: %I4.assoc_type = name_ref T5, @T5.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc27_40: type = facet_access_type %.Self.ref.loc27_40 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc27_40: type = converted %.Self.ref.loc27_40, %.Self.as_type.loc27_40 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc27_40: = facet_access_witness %.Self.ref.loc27_40, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.loc27_40, element1 [symbolic_self = constants.%impl.elem1] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%I4.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %BAD3.ref: = name_ref BAD3, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc27_55: %I4.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T6.ref: %I4.assoc_type = name_ref T6, @T6.%assoc2 [concrete = constants.%assoc2] // CHECK:STDOUT: %.Self.as_type.loc27_55: type = facet_access_type %.Self.ref.loc27_55 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc27_55: type = converted %.Self.ref.loc27_55, %.Self.as_type.loc27_55 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc27_55: = facet_access_witness %.Self.ref.loc27_55, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem2: type = impl_witness_access %.Self.as_wit.iface0.loc27_55, element2 [symbolic_self = constants.%impl.elem2] +// CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%I4.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2] // CHECK:STDOUT: %BAD4.ref: = name_ref BAD4, [concrete = ] // CHECK:STDOUT: %.loc27_15: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %struct_type.b @@ -667,12 +655,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %K.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] -// CHECK:STDOUT: %K.facet: %K.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: %K.lookup_impl_witness: = lookup_impl_witness %.Self, @K [symbolic_self] +// CHECK:STDOUT: %K.facet: %K.type = facet_value %.Self.as_type, (%K.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %K.lookup_impl_witness, 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: %K.impl_witness.812: = impl_witness file.%K.impl_witness_table.loc5 [concrete] +// CHECK:STDOUT: %K.impl_witness.3ea: = 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: @@ -681,7 +669,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .K = %K.decl // CHECK:STDOUT: } // CHECK:STDOUT: %K.decl: type = interface_decl @K [concrete = constants.%K.type] {} {} -// CHECK:STDOUT: impl_decl @impl.a6a [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.16d [concrete] {} { // CHECK:STDOUT: %.loc5_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_7.2: type = converted %.loc5_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] @@ -690,16 +678,15 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %V.ref: %K.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%K.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self [concrete = constants.%K_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %K.impl_witness_table.loc5 = impl_witness_table (%impl_witness_assoc_constant), @impl.16d [concrete] +// CHECK:STDOUT: %K.impl_witness.loc5: = impl_witness %K.impl_witness_table.loc5 [concrete = constants.%K.impl_witness.3ea] // 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 () @@ -726,7 +713,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: assoc_const V:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.a6a: %.loc5_7.2 as %.loc5_14; +// CHECK:STDOUT: impl @impl.16d: %.loc5_7.2 as %.loc5_14; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4b0: %.loc17_7.2 as %K.ref { // CHECK:STDOUT: !members: @@ -747,9 +734,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %L.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] -// CHECK:STDOUT: %L.facet: %L.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: %L.lookup_impl_witness: = lookup_impl_witness %.Self, @L [symbolic_self] +// CHECK:STDOUT: %L.facet: %L.type = facet_value %.Self.as_type, (%L.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %L.lookup_impl_witness, 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: %L.impl_witness: = impl_witness file.%L.impl_witness_table [concrete] @@ -769,16 +756,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %W.ref.loc9_20: %L.assoc_type = name_ref W, @W.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9_20: type = facet_access_type %.Self.ref.loc9_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_20: type = converted %.Self.ref.loc9_20, %.Self.as_type.loc9_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_20: = facet_access_witness %.Self.ref.loc9_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc9_20: type = impl_witness_access %.Self.as_wit.iface0.loc9_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc9_20: type = impl_witness_access constants.%L.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_26.2: type = converted %.loc9_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc9_32: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W.ref.loc9_32: %L.assoc_type = name_ref W, @W.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9_32: type = facet_access_type %.Self.ref.loc9_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_32: type = converted %.Self.ref.loc9_32, %.Self.as_type.loc9_32 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_32: = facet_access_witness %.Self.ref.loc9_32, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc9_32: type = impl_witness_access %.Self.as_wit.iface0.loc9_32, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc9_32: type = impl_witness_access constants.%L.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_38.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_38.2: type = converted %.loc9_38.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc9_14: type = where_expr %.Self [concrete = constants.%L_where.type] { @@ -826,9 +811,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %L2.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] -// CHECK:STDOUT: %L2.facet: %L2.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: %L2.lookup_impl_witness: = lookup_impl_witness %.Self, @L2 [symbolic_self] +// CHECK:STDOUT: %L2.facet: %L2.type = facet_value %.Self.as_type, (%L2.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -846,15 +831,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %W2.ref.loc9_21: %L2.assoc_type = name_ref W2, @W2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9_21: type = facet_access_type %.Self.ref.loc9_21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_21: type = converted %.Self.ref.loc9_21, %.Self.as_type.loc9_21 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_21: = facet_access_witness %.Self.ref.loc9_21, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc9_21: type = impl_witness_access %.Self.as_wit.iface0.loc9_21, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc9_21: type = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD5.ref: = name_ref BAD5, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc9_36: %L2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W2.ref.loc9_36: %L2.assoc_type = name_ref W2, @W2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9_36: type = facet_access_type %.Self.ref.loc9_36 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_36: type = converted %.Self.ref.loc9_36, %.Self.as_type.loc9_36 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_36: = facet_access_witness %.Self.ref.loc9_36, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc9_36: type = impl_witness_access %.Self.as_wit.iface0.loc9_36, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc9_36: type = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_43.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_43.2: type = converted %.loc9_43.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc9_15: type = where_expr %.Self [concrete = ] { @@ -899,9 +882,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %L3.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] -// CHECK:STDOUT: %L3.facet: %L3.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: %L3.lookup_impl_witness: = lookup_impl_witness %.Self, @L3 [symbolic_self] +// CHECK:STDOUT: %L3.facet: %L3.type = facet_value %.Self.as_type, (%L3.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %L3.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -920,16 +903,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %W3.ref.loc9_21: %L3.assoc_type = name_ref W3, @W3.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9_21: type = facet_access_type %.Self.ref.loc9_21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_21: type = converted %.Self.ref.loc9_21, %.Self.as_type.loc9_21 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_21: = facet_access_witness %.Self.ref.loc9_21, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc9_21: type = impl_witness_access %.Self.as_wit.iface0.loc9_21, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc9_21: type = impl_witness_access constants.%L3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_28.2: type = converted %.loc9_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc9_34: %L3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W3.ref.loc9_34: %L3.assoc_type = name_ref W3, @W3.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9_34: type = facet_access_type %.Self.ref.loc9_34 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_34: type = converted %.Self.ref.loc9_34, %.Self.as_type.loc9_34 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_34: = facet_access_witness %.Self.ref.loc9_34, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc9_34: type = impl_witness_access %.Self.as_wit.iface0.loc9_34, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc9_34: type = impl_witness_access constants.%L3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD6.ref: = name_ref BAD6, [concrete = ] // CHECK:STDOUT: %.loc9_15: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc9_21, %.loc9_28.2 @@ -973,9 +954,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %L4.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] -// CHECK:STDOUT: %L4.facet: %L4.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: %L4.lookup_impl_witness: = lookup_impl_witness %.Self, @L4 [symbolic_self] +// CHECK:STDOUT: %L4.facet: %L4.type = facet_value %.Self.as_type, (%L4.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %L4.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -994,15 +975,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %W4.ref.loc13_21: %L4.assoc_type = name_ref W4, @W4.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_21: type = facet_access_type %.Self.ref.loc13_21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_21: type = converted %.Self.ref.loc13_21, %.Self.as_type.loc13_21 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc13_21: = facet_access_witness %.Self.ref.loc13_21, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc13_21: type = impl_witness_access %.Self.as_wit.iface0.loc13_21, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc13_21: type = impl_witness_access constants.%L4.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD7.ref: = name_ref BAD7, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc13_36: %L4.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W4.ref.loc13_36: %L4.assoc_type = name_ref W4, @W4.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_36: type = facet_access_type %.Self.ref.loc13_36 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_36: type = converted %.Self.ref.loc13_36, %.Self.as_type.loc13_36 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc13_36: = facet_access_witness %.Self.ref.loc13_36, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc13_36: type = impl_witness_access %.Self.as_wit.iface0.loc13_36, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc13_36: type = impl_witness_access constants.%L4.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD8.ref: = name_ref BAD8, [concrete = ] // CHECK:STDOUT: %.loc13_15: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc13_21, @@ -1046,9 +1025,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self: %M.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] -// CHECK:STDOUT: %M.facet: %M.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: %M.lookup_impl_witness: = lookup_impl_witness %.Self, @M [symbolic_self] +// CHECK:STDOUT: %M.facet: %M.type = facet_value %.Self.as_type, (%M.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %M.lookup_impl_witness, 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: %M.impl_witness: = impl_witness file.%M.impl_witness_table [concrete] @@ -1068,16 +1047,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %X.ref.loc5_20: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc5_20: type = facet_access_type %.Self.ref.loc5_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref.loc5_20, %.Self.as_type.loc5_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc5_20: = facet_access_witness %.Self.ref.loc5_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc5_20: type = impl_witness_access %.Self.as_wit.iface0.loc5_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc5_20: type = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc5_32: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %X.ref.loc5_32: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc5_32: type = facet_access_type %.Self.ref.loc5_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_32: type = converted %.Self.ref.loc5_32, %.Self.as_type.loc5_32 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc5_32: = facet_access_witness %.Self.ref.loc5_32, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc5_32: type = impl_witness_access %.Self.as_wit.iface0.loc5_32, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc5_32: type = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_38.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc5_38.2: type = converted %.loc5_38.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self [concrete = constants.%M_where.type] { @@ -1127,9 +1104,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %assoc0: %N.assoc_type = assoc_entity element0, @N.%Y [concrete] // CHECK:STDOUT: %.Self: %N.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] -// CHECK:STDOUT: %N.facet: %N.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %N.lookup_impl_witness: = lookup_impl_witness %.Self, @N [symbolic_self] +// CHECK:STDOUT: %N.facet: %N.type = facet_value %.Self.as_type, (%N.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access %N.lookup_impl_witness, element0 [symbolic_self] // 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] @@ -1150,8 +1127,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Y.ref: %N.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access constants.%N.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc7_32: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc7_33.1: %struct_type.a.225 = struct_literal (%.loc7_32) // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] @@ -1206,16 +1182,16 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self: %IF.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] -// CHECK:STDOUT: %IF.facet.94f: %IF.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %.bf5: type = fn_type_with_self_type %F.type.496, %IF.facet.94f [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %.bf5 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %IF.lookup_impl_witness: = lookup_impl_witness %.Self, @IF [symbolic_self] +// CHECK:STDOUT: %IF.facet.01b: %IF.type = facet_value %.Self.as_type, (%IF.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %.c5b: type = fn_type_with_self_type %F.type.496, %IF.facet.01b [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %.c5b = impl_witness_access %IF.lookup_impl_witness, 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: %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.c94: %IF.type = facet_value %CD, (%IF.impl_witness) [concrete] +// CHECK:STDOUT: %F.type.f56: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.fae: %F.type.f56 = struct_value () [concrete] +// CHECK:STDOUT: %IF.facet.60c: %IF.type = facet_value %CD, (%IF.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1233,8 +1209,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %F.ref: %IF.assoc_type = name_ref F, @IF.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %.bf5 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %.c5b = impl_witness_access constants.%IF.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_15: type = where_expr %.Self [concrete = constants.%IF_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 @@ -1256,7 +1231,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %CD.ref as %.loc11_15 { -// CHECK:STDOUT: %F.decl: %F.type.2b5 = fn_decl @F.2 [concrete = constants.%F.479] {} {} +// CHECK:STDOUT: %F.decl: %F.type.f56 = fn_decl @F.2 [concrete = constants.%F.fae] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -1283,5 +1258,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.c94) {} +// CHECK:STDOUT: specific @F.1(constants.%IF.facet.60c) {} // 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 dde4e27ed22e..0e2684046bce 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_compound.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_compound.carbon @@ -424,8 +424,7 @@ fn InstanceCallImportFail() { // 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.%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.%NonInstance.impl_witness] -// CHECK:STDOUT: %impl.elem0: %.923 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.db4] +// CHECK:STDOUT: %impl.elem0: %.923 = impl_witness_access constants.%NonInstance.impl_witness, element0 [concrete = constants.%F.db4] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } 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 9ecc964f73c2..b33dee3c660a 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 @@ -316,9 +316,9 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } @@ -350,8 +350,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self [concrete = constants.%I_where.type] { @@ -404,9 +403,9 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } @@ -438,8 +437,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref.loc5: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc5: type = facet_access_type %.Self.ref.loc5 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref.loc5, %.Self.as_type.loc5 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc5: = facet_access_witness %.Self.ref.loc5, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc5: type = impl_witness_access %.Self.as_wit.iface0.loc5, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc5: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self.1 [concrete = constants.%I_where.type] { @@ -457,8 +455,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref.loc6: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc6: type = facet_access_type %.Self.ref.loc6 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6, %.Self.as_type.loc6 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc6: = facet_access_witness %.Self.ref.loc6, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access %.Self.as_wit.iface0.loc6, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc6_14: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { @@ -509,11 +506,11 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %I.impl_witness.c1a: = impl_witness file.%I.impl_witness_table.loc10 [concrete] +// CHECK:STDOUT: %I.impl_witness.f84: = impl_witness file.%I.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -541,7 +538,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: } // 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: impl_decl @impl.625 [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] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -549,16 +546,15 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %I.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant), @impl.625 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc10: = impl_witness %I.impl_witness_table.loc10 [concrete = constants.%I.impl_witness.f84] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -575,7 +571,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.16e: %C3.ref as %I.ref; // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.5ad: %C3.ref as %.loc10_14 { +// CHECK:STDOUT: impl @impl.625: %C3.ref as %.loc10_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness.loc10 // CHECK:STDOUT: } @@ -605,14 +601,14 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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: %I.impl_witness.21c: = impl_witness file.%I.impl_witness_table.loc9 [concrete] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %I_where.type.8c8: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] +// CHECK:STDOUT: %I.impl_witness.b54: = 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: %I.impl_witness.94c: = impl_witness file.%I.impl_witness_table.loc10 [concrete] +// CHECK:STDOUT: %I_where.type.cba: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] +// CHECK:STDOUT: %I.impl_witness.ac6: = impl_witness file.%I.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -634,7 +630,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C4.decl: type = class_decl @C4 [concrete = constants.%C4] {} {} -// CHECK:STDOUT: impl_decl @impl.4d8 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.62b [concrete] {} { // CHECK:STDOUT: %C4.ref: type = name_ref C4, file.%C4.decl [concrete = constants.%C4] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -642,18 +638,17 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_26.2: type = converted %.loc9_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc9_14: type = where_expr %.Self [concrete = constants.%I_where.type.872] { +// CHECK:STDOUT: %.loc9_14: type = where_expr %.Self [concrete = constants.%I_where.type.8c8] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %I.impl_witness_table.loc9 = impl_witness_table (%impl_witness_assoc_constant.loc9), @impl.62b [concrete] +// CHECK:STDOUT: %I.impl_witness.loc9: = impl_witness %I.impl_witness_table.loc9 [concrete = constants.%I.impl_witness.b54] // 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: impl_decl @impl.384 [concrete] {} { // CHECK:STDOUT: %C4.ref: type = name_ref C4, file.%C4.decl [concrete = constants.%C4] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -661,16 +656,15 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = constants.%I_where.type.4fe] { +// CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = constants.%I_where.type.cba] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %I.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @impl.384 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc10: = impl_witness %I.impl_witness_table.loc10 [concrete = constants.%I.impl_witness.ac6] // 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: @@ -685,9 +679,9 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: assoc_const T:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.4d8: %C4.ref as %.loc9_14; +// CHECK:STDOUT: impl @impl.62b: %C4.ref as %.loc9_14; // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2de: %C4.ref as %.loc10_14 { +// CHECK:STDOUT: impl @impl.384: %C4.ref as %.loc10_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness.loc10 // CHECK:STDOUT: } @@ -717,14 +711,14 @@ 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, imports.%Main.import_ref.5fb [concrete] // 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] -// CHECK:STDOUT: %I3.facet: %I3.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: %I3.lookup_impl_witness: = lookup_impl_witness %.Self, @I3 [symbolic_self] +// CHECK:STDOUT: %I3.facet: %I3.type = facet_value %.Self.as_type, (%I3.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I3.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %assoc1: %I3.assoc_type = assoc_entity element1, imports.%Main.import_ref.e26 [concrete] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0, element1 [symbolic_self] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %I3.lookup_impl_witness, element1 [symbolic_self] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete] // CHECK:STDOUT: %assoc2: %I3.assoc_type = assoc_entity element2, imports.%Main.import_ref.e32 [concrete] -// CHECK:STDOUT: %impl.elem2: type = impl_witness_access %.Self.as_wit.iface0, element2 [symbolic_self] +// CHECK:STDOUT: %impl.elem2: type = impl_witness_access %I3.lookup_impl_witness, element2 [symbolic_self] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_struct_type} [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -765,15 +759,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T1.ref: %I3.assoc_type = name_ref T1, imports.%Main.import_ref.f5f [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc17_21: type = facet_access_type %.Self.ref.loc17_21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc17_21: type = converted %.Self.ref.loc17_21, %.Self.as_type.loc17_21 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc17_21: = facet_access_witness %.Self.ref.loc17_21, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.loc17_21, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD1.ref: = name_ref BAD1, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc17_36: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T2.ref: %I3.assoc_type = name_ref T2, imports.%Main.import_ref.680 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc17_36: type = facet_access_type %.Self.ref.loc17_36 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc17_36: type = converted %.Self.ref.loc17_36, %.Self.as_type.loc17_36 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc17_36: = facet_access_witness %.Self.ref.loc17_36, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.loc17_36, element1 [symbolic_self = constants.%impl.elem1] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%I3.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %.loc17_48.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc17_48.2: type = converted %.loc17_48.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete = constants.%struct_type.a] @@ -781,8 +773,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, imports.%Main.import_ref.181 [concrete = constants.%assoc2] // CHECK:STDOUT: %.Self.as_type.loc17_55: type = facet_access_type %.Self.ref.loc17_55 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc17_55: type = converted %.Self.ref.loc17_55, %.Self.as_type.loc17_55 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc17_55: = facet_access_witness %.Self.ref.loc17_55, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem2: type = impl_witness_access %.Self.as_wit.iface0.loc17_55, element2 [symbolic_self = constants.%impl.elem2] +// CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%I3.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2] // CHECK:STDOUT: %BAD2.ref: = name_ref BAD2, [concrete = ] // CHECK:STDOUT: %.loc17_15: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, @@ -798,8 +789,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T1.ref: %I3.assoc_type = name_ref T1, imports.%Main.import_ref.f5f [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc27_21: type = facet_access_type %.Self.ref.loc27_21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc27_21: type = converted %.Self.ref.loc27_21, %.Self.as_type.loc27_21 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc27_21: = facet_access_witness %.Self.ref.loc27_21, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.loc27_21, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc27_33.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc27_33.2: type = converted %.loc27_33.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_struct_type} [concrete = constants.%struct_type.b] @@ -807,15 +797,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T2.ref: %I3.assoc_type = name_ref T2, imports.%Main.import_ref.680 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc27_40: type = facet_access_type %.Self.ref.loc27_40 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc27_40: type = converted %.Self.ref.loc27_40, %.Self.as_type.loc27_40 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc27_40: = facet_access_witness %.Self.ref.loc27_40, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.loc27_40, element1 [symbolic_self = constants.%impl.elem1] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%I3.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %BAD3.ref: = name_ref BAD3, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc27_55: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, imports.%Main.import_ref.181 [concrete = constants.%assoc2] // CHECK:STDOUT: %.Self.as_type.loc27_55: type = facet_access_type %.Self.ref.loc27_55 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc27_55: type = converted %.Self.ref.loc27_55, %.Self.as_type.loc27_55 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc27_55: = facet_access_witness %.Self.ref.loc27_55, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem2: type = impl_witness_access %.Self.as_wit.iface0.loc27_55, element2 [symbolic_self = constants.%impl.elem2] +// CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%I3.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2] // CHECK:STDOUT: %BAD4.ref: = name_ref BAD4, [concrete = ] // CHECK:STDOUT: %.loc27_15: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %struct_type.b @@ -886,11 +874,11 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %I.impl_witness.ddd: = impl_witness file.%I.impl_witness_table.loc5 [concrete] +// CHECK:STDOUT: %I.impl_witness.9b2: = 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: @@ -913,7 +901,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C6.decl: type = class_decl @C6 [concrete = constants.%C6] {} {} -// CHECK:STDOUT: impl_decl @impl.e9b [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.98d [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: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -921,16 +909,15 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %I.impl_witness_table.loc5 = impl_witness_table (%impl_witness_assoc_constant), @impl.98d [concrete] +// CHECK:STDOUT: %I.impl_witness.loc5: = impl_witness %I.impl_witness_table.loc5 [concrete = constants.%I.impl_witness.9b2] // 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] @@ -951,7 +938,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: assoc_const T:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.e9b: %C6.ref as %.loc5_14; +// CHECK:STDOUT: impl @impl.98d: %C6.ref as %.loc5_14; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.482: %C6.ref as %I.ref { // CHECK:STDOUT: !members: @@ -983,9 +970,9 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, 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: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] @@ -1018,16 +1005,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_20: = facet_access_witness %.Self.ref.loc10_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access %.Self.as_wit.iface0.loc10_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc10_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.ref.loc10_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_32, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_32: = facet_access_witness %.Self.ref.loc10_32, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access %.Self.as_wit.iface0.loc10_32, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_38.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_38.2: type = converted %.loc10_38.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = constants.%I_where.type] { @@ -1081,9 +1066,9 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1115,15 +1100,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_20: = facet_access_witness %.Self.ref.loc10_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access %.Self.as_wit.iface0.loc10_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD5.ref: = name_ref BAD5, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc10_34: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.ref.loc10_34: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_34: type = facet_access_type %.Self.ref.loc10_34 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_34: type = converted %.Self.ref.loc10_34, %.Self.as_type.loc10_34 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_34: = facet_access_witness %.Self.ref.loc10_34, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_34: type = impl_witness_access %.Self.as_wit.iface0.loc10_34, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_34: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_40.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_40.2: type = converted %.loc10_40.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = ] { @@ -1174,9 +1157,9 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1207,16 +1190,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_20: = facet_access_witness %.Self.ref.loc10_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access %.Self.as_wit.iface0.loc10_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc10_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.ref.loc10_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_32, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_32: = facet_access_witness %.Self.ref.loc10_32, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access %.Self.as_wit.iface0.loc10_32, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD6.ref: = name_ref BAD6, [concrete = ] // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_20, %.loc10_26.2 @@ -1266,9 +1247,9 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1300,15 +1281,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref.loc14_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc14_20: type = facet_access_type %.Self.ref.loc14_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc14_20: type = converted %.Self.ref.loc14_20, %.Self.as_type.loc14_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc14_20: = facet_access_witness %.Self.ref.loc14_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc14_20: type = impl_witness_access %.Self.as_wit.iface0.loc14_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc14_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD7.ref: = name_ref BAD7, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc14_34: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.ref.loc14_34: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc14_34: type = facet_access_type %.Self.ref.loc14_34 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc14_34: type = converted %.Self.ref.loc14_34, %.Self.as_type.loc14_34 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc14_34: = facet_access_witness %.Self.ref.loc14_34, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc14_34: type = impl_witness_access %.Self.as_wit.iface0.loc14_34, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc14_34: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD8.ref: = name_ref BAD8, [concrete = ] // CHECK:STDOUT: %.loc14_14: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc14_20, @@ -1358,9 +1337,9 @@ impl CD as IF where .F = 0 { // 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] // 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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } @@ -1392,16 +1371,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %T.ref.loc6_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc6_20: type = facet_access_type %.Self.ref.loc6_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6_20, %.Self.as_type.loc6_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc6_20: = facet_access_witness %.Self.ref.loc6_20, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc6_20: type = impl_witness_access %.Self.as_wit.iface0.loc6_20, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc6_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc6_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.ref.loc6_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.4fb [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc6_32: type = facet_access_type %.Self.ref.loc6_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_32: type = converted %.Self.ref.loc6_32, %.Self.as_type.loc6_32 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc6_32: = facet_access_witness %.Self.ref.loc6_32, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc6_32: type = impl_witness_access %.Self.as_wit.iface0.loc6_32, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc6_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_38.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_38.2: type = converted %.loc6_38.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc6_14: type = where_expr %.Self [concrete = constants.%I_where.type] { @@ -1455,10 +1432,10 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %NonType.assoc_type: type = assoc_entity_type @NonType [concrete] // CHECK:STDOUT: %assoc0: %NonType.assoc_type = assoc_entity element0, imports.%Main.import_ref.f3d [concrete] // 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] +// CHECK:STDOUT: %NonType.lookup_impl_witness: = lookup_impl_witness %.Self, @NonType [symbolic_self] // CHECK:STDOUT: %struct_type.a.225: type = struct_type {.a: %empty_struct_type} [concrete] -// CHECK:STDOUT: %NonType.facet: %NonType.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %NonType.facet: %NonType.type = facet_value %.Self.as_type, (%NonType.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access %NonType.lookup_impl_witness, element0 [symbolic_self] // 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] @@ -1492,8 +1469,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Y.ref: %NonType.assoc_type = name_ref Y, imports.%Main.import_ref.9fa [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access constants.%NonType.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_38: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_39.1: %struct_type.a.225 = struct_literal (%.loc6_38) // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] @@ -1585,18 +1561,18 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %IF.assoc_type: type = assoc_entity_type @IF [concrete] // CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, imports.%Main.import_ref.4b7 [concrete] // 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] +// CHECK:STDOUT: %IF.lookup_impl_witness: = lookup_impl_witness %.Self, @IF [symbolic_self] // CHECK:STDOUT: %F.type.496: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.1de: %F.type.496 = struct_value () [concrete] -// CHECK:STDOUT: %IF.facet.94f: %IF.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %.bf5: type = fn_type_with_self_type %F.type.496, %IF.facet.94f [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %.bf5 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %IF.facet.01b: %IF.type = facet_value %.Self.as_type, (%IF.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %.c5b: type = fn_type_with_self_type %F.type.496, %IF.facet.01b [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %.c5b = impl_witness_access %IF.lookup_impl_witness, 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: %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.c94: %IF.type = facet_value %CD, (%IF.impl_witness) [concrete] +// CHECK:STDOUT: %F.type.f56: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.fae: %F.type.f56 = struct_value () [concrete] +// CHECK:STDOUT: %IF.facet.60c: %IF.type = facet_value %CD, (%IF.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1622,8 +1598,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %F.ref: %IF.assoc_type = name_ref F, imports.%Main.import_ref.f22 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %.bf5 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %.c5b = impl_witness_access constants.%IF.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [concrete = constants.%IF_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 @@ -1641,7 +1616,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %CD.ref as %.loc10_15 { -// CHECK:STDOUT: %F.decl: %F.type.2b5 = fn_decl @F.2 [concrete = constants.%F.479] {} {} +// CHECK:STDOUT: %F.decl: %F.type.f56 = fn_decl @F.2 [concrete = constants.%F.fae] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -1668,5 +1643,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.c94) {} +// CHECK:STDOUT: specific @F.1(constants.%IF.facet.60c) {} // CHECK:STDOUT: 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 53c98d32c2b1..6fd4a9a90070 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon @@ -275,8 +275,7 @@ fn H() -> C({}).(I.F)() {} // 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.%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.%I.impl_witness.6bb] -// CHECK:STDOUT: %impl.elem0: %.81d = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.9e6] +// CHECK:STDOUT: %impl.elem0: %.81d = impl_witness_access constants.%I.impl_witness.6bb, 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 diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 731bc3c4d090..6fd517fd16c0 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -1180,8 +1180,7 @@ fn InstanceC(a: A) -> C { // 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.%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.%Factory.impl_witness] -// CHECK:STDOUT: %impl.elem0: %.711 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%Make.377] +// CHECK:STDOUT: %impl.elem0: %.711 = impl_witness_access constants.%Factory.impl_witness, 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 diff --git a/toolchain/check/testdata/impl/use_assoc_const.carbon b/toolchain/check/testdata/impl/use_assoc_const.carbon index 068e74486f9c..7276f2267c5b 100644 --- a/toolchain/check/testdata/impl/use_assoc_const.carbon +++ b/toolchain/check/testdata/impl/use_assoc_const.carbon @@ -291,25 +291,25 @@ fn F() { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self.ccd, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085: %J.type = facet_value %Self.as_type.3df, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.646: = lookup_impl_witness %Self.ccd, @J [symbolic] +// CHECK:STDOUT: %J.facet.521: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.646) [symbolic] +// CHECK:STDOUT: %impl.elem0.11f: type = impl_witness_access %J.lookup_impl_witness.646, element0 [symbolic] // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] // CHECK:STDOUT: %.Self: %J.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] -// CHECK:STDOUT: %J.facet.28c: %J.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.53a: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // 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: %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.9f4: %J.type = facet_value %empty_tuple.type, (%J.impl_witness.98f) [concrete] +// CHECK:STDOUT: %J_where.type.b64: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete] +// CHECK:STDOUT: %J.impl_witness.e42: = impl_witness file.%J.impl_witness_table.loc8 [concrete] +// CHECK:STDOUT: %F.type.7d4: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.46e: %F.type.7d4 = struct_value () [concrete] +// CHECK:STDOUT: %J.facet.ecc: %J.type = facet_value %empty_tuple.type, (%J.impl_witness.e42) [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] @@ -334,7 +334,7 @@ fn F() { // 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: %.011: type = fn_type_with_self_type %F.type.c14, %J.facet.9f4 [concrete] +// CHECK:STDOUT: %.597: type = fn_type_with_self_type %F.type.c14, %J.facet.ecc [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] @@ -342,11 +342,11 @@ 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: %J_where.type.6f2: type = facet_type <@J where %impl.elem0.53a = %C> [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.54f: %J.type = facet_value %C, (%J.impl_witness.a6b) [concrete] +// CHECK:STDOUT: %J_where.type.0bc: type = facet_type <@J where %impl.elem0.83f = %C> [concrete] +// CHECK:STDOUT: %J.impl_witness.12d: = impl_witness file.%J.impl_witness_table.loc21 [concrete] +// CHECK:STDOUT: %F.type.2a7: type = fn_type @F.3 [concrete] +// CHECK:STDOUT: %F.fb5: %F.type.2a7 = struct_value () [concrete] +// CHECK:STDOUT: %J.facet.30e: %J.type = facet_value %C, (%J.impl_witness.12d) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -368,7 +368,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: impl_decl @impl.05c [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.32a [concrete] {} { // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] @@ -377,16 +377,15 @@ fn F() { // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.53a] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // 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: %.loc8_14: type = where_expr %.Self [concrete = constants.%J_where.type.b78] { +// CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%J_where.type.b64] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %J.impl_witness_table.loc8 = impl_witness_table (%impl_witness_assoc_constant.loc8, @impl.32a.%F.decl), @impl.32a [concrete] +// CHECK:STDOUT: %J.impl_witness.loc8: = impl_witness %J.impl_witness_table.loc8 [concrete = constants.%J.impl_witness.e42] // 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 @@ -406,7 +405,7 @@ fn F() { // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.f57 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.043 [concrete] {} { // CHECK:STDOUT: %C.ref.loc21_6: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -414,15 +413,14 @@ fn F() { // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc21_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.53a] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // CHECK:STDOUT: %C.ref.loc21_24: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %.loc21_13: type = where_expr %.Self [concrete = constants.%J_where.type.6f2] { +// CHECK:STDOUT: %.loc21_13: type = where_expr %.Self [concrete = constants.%J_where.type.0bc] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.ref.loc21_24 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %J.impl_witness_table.loc21 = impl_witness_table (%impl_witness_assoc_constant.loc21, @impl.043.%F.decl), @impl.043 [concrete] +// CHECK:STDOUT: %J.impl_witness.loc21: = impl_witness %J.impl_witness_table.loc21 [concrete = constants.%J.impl_witness.12d] // CHECK:STDOUT: %impl_witness_assoc_constant.loc21: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -434,14 +432,13 @@ fn F() { // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] { // CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df) = value_param_pattern %self.patt, call_param0 -// CHECK:STDOUT: %u.patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c) = value_param_pattern %u.patt, call_param1 -// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: %u.patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = value_param_pattern %u.patt, call_param1 +// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = out_param_pattern %return.patt, call_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_29: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access %Self.as_wit.iface0.loc5_29, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.3df)] { // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.ccd)] @@ -449,15 +446,14 @@ fn F() { // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.3df)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df) = bind_name self, %self.param -// CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c) = value_param call_param1 -// CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access %Self.as_wit.iface0.loc5_23.2, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = value_param call_param1 +// CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)] { +// CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c) = out_param call_param2 -// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c) = return_slot %return.param +// CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = out_param call_param2 +// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -472,8 +468,8 @@ fn F() { // CHECK:STDOUT: assoc_const U:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.05c: %.loc8_7.2 as %.loc8_14 { -// CHECK:STDOUT: %F.decl: %F.type.ea9 = fn_decl @F.2 [concrete = constants.%F.405] { +// CHECK:STDOUT: impl @impl.32a: %.loc8_7.2 as %.loc8_14 { +// CHECK:STDOUT: %F.decl: %F.type.7d4 = fn_decl @F.2 [concrete = constants.%F.46e] { // CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self // CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, call_param0 // CHECK:STDOUT: %u.patt: %i32 = binding_pattern u @@ -484,7 +480,7 @@ fn F() { // CHECK:STDOUT: %int_32.loc9_31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc9_31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.05c.%.loc8_7.2 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.32a.%.loc8_7.2 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: %u.param: %i32 = value_param call_param1 // CHECK:STDOUT: %.loc9_23: type = splice_block %i32.loc9_23 [concrete = constants.%i32] { @@ -501,8 +497,8 @@ fn F() { // CHECK:STDOUT: witness = file.%J.impl_witness.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.f57: %C.ref.loc21_6 as %.loc21_13 { -// CHECK:STDOUT: %F.decl: %F.type.69d = fn_decl @F.3 [concrete = constants.%F.451] { +// CHECK:STDOUT: impl @impl.043: %C.ref.loc21_6 as %.loc21_13 { +// CHECK:STDOUT: %F.decl: %F.type.2a7 = fn_decl @F.3 [concrete = constants.%F.fb5] { // CHECK:STDOUT: %self.patt: %C = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, call_param0 // CHECK:STDOUT: %u.patt: %C = binding_pattern u @@ -512,7 +508,7 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc22_29: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.f57.%C.ref.loc21_6 [concrete = constants.%C] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.043.%C.ref.loc21_6 [concrete = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %u.param: %C = value_param call_param1 // CHECK:STDOUT: %C.ref.loc22_23: type = name_ref C, file.%C.decl [concrete = constants.%C] @@ -541,10 +537,10 @@ fn F() { // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.3df)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %Self.as_wit.iface0.loc5_23.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.646)] +// CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df), %u.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c)) -> @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.d9c); +// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df), %u.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f)) -> @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%self.param: %empty_tuple.type, %u.param: %i32) -> %i32 { @@ -573,7 +569,7 @@ 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: %.011 = impl_witness_access constants.%J.impl_witness.98f, element1 [concrete = constants.%F.405] +// CHECK:STDOUT: %impl.elem1: %.597 = impl_witness_access constants.%J.impl_witness.e42, element1 [concrete = constants.%F.46e] // 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: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] @@ -597,28 +593,28 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self.ccd) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.521) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.ccd) { // CHECK:STDOUT: %Self => constants.%Self.ccd // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.3df -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.d9c +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.646 +// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.11f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.330) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J.facet.9f4) { -// CHECK:STDOUT: %Self => constants.%J.facet.9f4 +// CHECK:STDOUT: specific @F.1(constants.%J.facet.ecc) { +// CHECK:STDOUT: %Self => constants.%J.facet.ecc // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%J.impl_witness.98f +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness.e42 // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J.facet.54f) { -// CHECK:STDOUT: %Self => constants.%J.facet.54f +// CHECK:STDOUT: specific @F.1(constants.%J.facet.30e) { +// CHECK:STDOUT: %Self => constants.%J.facet.30e // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%C -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%J.impl_witness.a6b +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness.12d // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: @@ -630,9 +626,9 @@ fn F() { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self.ccd, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085: %J.type = facet_value %Self.as_type.3df, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.646: = lookup_impl_witness %Self.ccd, @J [symbolic] +// CHECK:STDOUT: %J.facet.521: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.646) [symbolic] +// CHECK:STDOUT: %impl.elem0.11f: type = impl_witness_access %J.lookup_impl_witness.646, element0 [symbolic] // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] @@ -641,16 +637,16 @@ fn F() { // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self: %J.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] -// CHECK:STDOUT: %J.facet.28c: %J.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.53a: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // 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: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [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.8a4: %J.type = facet_value %D, (%J.impl_witness) [concrete] +// CHECK:STDOUT: %F.type.5d3: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.b9c: %F.type.5d3 = struct_value () [concrete] +// CHECK:STDOUT: %J.facet.183: %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] @@ -675,7 +671,7 @@ fn F() { // 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: %.c1e: type = fn_type_with_self_type %F.type.c14, %J.facet.8a4 [concrete] +// CHECK:STDOUT: %.490: type = fn_type_with_self_type %F.type.c14, %J.facet.183 [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] @@ -702,7 +698,7 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} -// CHECK:STDOUT: impl_decl @impl.847 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.fc1 [concrete] {} { // 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: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -710,15 +706,14 @@ fn F() { // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.53a] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // 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: %.loc10_13: type = where_expr %.Self [concrete = constants.%J_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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_table = impl_witness_table (%impl_witness_assoc_constant, @impl.fc1.%F.decl), @impl.fc1 [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] { @@ -738,23 +733,21 @@ fn F() { // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] { -// CHECK:STDOUT: %u.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = value_param_pattern %u.patt, call_param0 -// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: %u.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param_pattern %u.patt, call_param0 +// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param_pattern %return.patt, call_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_17: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access %Self.as_wit.iface0.loc5_17, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = value_param call_param0 -// CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access %Self.as_wit.iface0.loc5_11.2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param call_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] { +// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = return_slot %return.param +// CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -769,8 +762,8 @@ fn F() { // CHECK:STDOUT: assoc_const U:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.847: %D.ref as %.loc10_13 { -// CHECK:STDOUT: %F.decl: %F.type.d45 = fn_decl @F.2 [concrete = constants.%F.fdb] { +// CHECK:STDOUT: impl @impl.fc1: %D.ref as %.loc10_13 { +// CHECK:STDOUT: %F.decl: %F.type.5d3 = fn_decl @F.2 [concrete = constants.%F.b9c] { // CHECK:STDOUT: %u.patt: %i32 = binding_pattern u // CHECK:STDOUT: %u.param_patt: %i32 = value_param_pattern %u.patt, call_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern @@ -804,10 +797,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %Self.as_wit.iface0.loc5_11.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.646)] +// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c); +// CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%u.param: %i32) -> %i32 { @@ -836,10 +829,9 @@ 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.%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: %J.facet: %J.type = facet_value constants.%D, (constants.%J.impl_witness) [concrete = constants.%J.facet.183] +// CHECK:STDOUT: %.loc15_11: %J.type = converted %D.ref, %J.facet [concrete = constants.%J.facet.183] +// CHECK:STDOUT: %impl.elem1: %.490 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b9c] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // 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] @@ -856,19 +848,19 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self.ccd) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.521) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.ccd) { // CHECK:STDOUT: %Self => constants.%Self.ccd -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.d9c +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.646 +// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.330) {} // CHECK:STDOUT: -// 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: specific @F.1(constants.%J.facet.183) { +// CHECK:STDOUT: %Self => constants.%J.facet.183 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -880,9 +872,9 @@ fn F() { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self.ccd, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085e97.1: %J.type = facet_value %Self.as_type.3df, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c3a6.1: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.1: = lookup_impl_witness %Self.ccd, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.1: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.64628e.1) [symbolic] +// CHECK:STDOUT: %impl.elem0.11fef0.1: type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic] // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] @@ -892,18 +884,18 @@ fn F() { // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %.Self: %J.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] -// CHECK:STDOUT: %J.facet.28c: %J.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.53a: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // 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: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [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.557: %J.type = facet_value %E, (%J.impl_witness) [concrete] +// CHECK:STDOUT: %F.type.b84: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.b07: %F.type.b84 = struct_value () [concrete] +// CHECK:STDOUT: %G.type.4b6: type = fn_type @G.2 [concrete] +// CHECK:STDOUT: %G.553: %G.type.4b6 = struct_value () [concrete] +// CHECK:STDOUT: %J.facet.ee5: %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] @@ -936,8 +928,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: %.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: %.29b: type = fn_type_with_self_type %F.type.c14, %J.facet.ee5 [concrete] +// CHECK:STDOUT: %.ff5: type = fn_type_with_self_type %G.type.285, %J.facet.ee5 [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] @@ -957,19 +949,19 @@ fn F() { // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %J.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085e97.2: %J.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c3a6.2: type = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: = lookup_impl_witness %T, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic] +// CHECK:STDOUT: %impl.elem0.11fef0.2: type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic] // CHECK:STDOUT: %GenericCallF.type: type = fn_type @GenericCallF [concrete] // CHECK:STDOUT: %GenericCallF: %GenericCallF.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.d9a: = require_complete_type %impl.elem0.d9c3a6.2 [symbolic] +// CHECK:STDOUT: %require_complete.58f: = require_complete_type %impl.elem0.11fef0.2 [symbolic] // CHECK:STDOUT: %require_complete.2a5: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %.4d2: type = fn_type_with_self_type %F.type.c14, %J.facet.085e97.2 [symbolic] -// CHECK:STDOUT: %impl.elem1: %.4d2 = impl_witness_access %T.as_wit.iface0, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @F.1(%J.facet.085e97.2) [symbolic] +// CHECK:STDOUT: %.d43: type = fn_type_with_self_type %F.type.c14, %J.facet.5210a7.2 [symbolic] +// CHECK:STDOUT: %impl.elem1: %.d43 = impl_witness_access %J.lookup_impl_witness.64628e.2, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @F.1(%J.facet.5210a7.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.557) [concrete] +// CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF, @GenericCallF(%J.facet.ee5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1012,17 +1004,16 @@ fn F() { // CHECK:STDOUT: %T.patt.loc24_17.1: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_17.2 (constants.%T.patt)] // CHECK:STDOUT: %t.patt: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = value_param_pattern %t.patt, call_param0 -// CHECK:STDOUT: %u.patt: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = value_param_pattern %u.patt, call_param1 -// CHECK:STDOUT: %return.patt: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: %u.patt: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = value_param_pattern %u.patt, call_param1 +// CHECK:STDOUT: %return.patt: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = out_param_pattern %return.patt, call_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc24_41: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc24_42: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %T.as_type.loc24_42: type = facet_access_type %T.ref.loc24_41 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc24_42: type = converted %T.ref.loc24_41, %T.as_type.loc24_42 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc24_42: = facet_access_witness %T.ref.loc24_41, element0 [symbolic = %T.as_wit.iface0.loc24_34.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc24_42: type = impl_witness_access %T.as_wit.iface0.loc24_42, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.d9c3a6.2)] +// CHECK:STDOUT: %impl.elem0.loc24_42: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %T.loc24_17.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc24_17.2 (constants.%T)] // CHECK:STDOUT: %t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = value_param call_param0 @@ -1032,18 +1023,17 @@ fn F() { // CHECK:STDOUT: %.loc24_27.2: type = converted %T.ref.loc24_27, %T.as_type.loc24_27.1 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %t: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = bind_name t, %t.param -// CHECK:STDOUT: %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = value_param call_param1 -// CHECK:STDOUT: %.loc24_34.1: type = splice_block %impl.elem0.loc24_34.1 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.d9c3a6.2)] { +// CHECK:STDOUT: %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = value_param call_param1 +// CHECK:STDOUT: %.loc24_34.1: type = splice_block %impl.elem0.loc24_34.1 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] { // CHECK:STDOUT: %T.ref.loc24_33: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc24_34: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %T.as_type.loc24_34: type = facet_access_type %T.ref.loc24_33 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc24_34.2: type = converted %T.ref.loc24_33, %T.as_type.loc24_34 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc24_34.1: = facet_access_witness %T.ref.loc24_33, element0 [symbolic = %T.as_wit.iface0.loc24_34.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc24_34.1: type = impl_witness_access %T.as_wit.iface0.loc24_34.1, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.d9c3a6.2)] +// CHECK:STDOUT: %impl.elem0.loc24_34.1: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = out_param call_param2 -// CHECK:STDOUT: %return: ref @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = return_slot %return.param +// CHECK:STDOUT: %u: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = out_param call_param2 +// CHECK:STDOUT: %return: ref @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] { // CHECK:STDOUT: %e.patt: %E = binding_pattern e @@ -1067,36 +1057,33 @@ fn F() { // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] { -// CHECK:STDOUT: %u.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1) = value_param_pattern %u.patt, call_param0 -// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: %u.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = value_param_pattern %u.patt, call_param0 +// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = out_param_pattern %return.patt, call_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_17: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access %Self.as_wit.iface0.loc5_17, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c3a6.1)] -// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c3a6.1)] -// CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1) = value_param call_param0 -// CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c3a6.1)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access %Self.as_wit.iface0.loc5_11.2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c3a6.1)] -// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)] +// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)] +// CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = value_param call_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)] { +// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)] +// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1) = return_slot %return.param +// CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: %G.decl: %G.type.285 = fn_decl @G.1 [concrete = constants.%G.e4b] { // CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df) = value_param_pattern %self.patt, call_param0 -// CHECK:STDOUT: %v.patt: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1) = binding_pattern v -// CHECK:STDOUT: %v.param_patt: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1) = value_param_pattern %v.patt, call_param1 -// CHECK:STDOUT: %return.patt: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: %v.patt: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = binding_pattern v +// CHECK:STDOUT: %v.param_patt: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = value_param_pattern %v.patt, call_param1 +// CHECK:STDOUT: %return.patt: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = out_param_pattern %return.patt, call_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_29: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc6_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc6_29: type = impl_witness_access %Self.as_wit.iface0.loc6_29, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.d9c3a6.1)] -// CHECK:STDOUT: %U.ref.loc6_29: type = name_ref U, %impl.elem0.loc6_29 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %impl.elem0.loc6_29: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)] +// CHECK:STDOUT: %U.ref.loc6_29: type = name_ref U, %impl.elem0.loc6_29 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df) = value_param call_param0 // CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.3df)] { // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.ccd)] @@ -1104,15 +1091,14 @@ fn F() { // CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.3df)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df) = bind_name self, %self.param -// CHECK:STDOUT: %v.param: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1) = value_param call_param1 -// CHECK:STDOUT: %.loc6_23: type = splice_block %U.ref.loc6_23 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.d9c3a6.1)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_23.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc6_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc6_23.2: type = impl_witness_access %Self.as_wit.iface0.loc6_23.2, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.d9c3a6.1)] -// CHECK:STDOUT: %U.ref.loc6_23: type = name_ref U, %impl.elem0.loc6_23.2 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %v.param: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = value_param call_param1 +// CHECK:STDOUT: %.loc6_23: type = splice_block %U.ref.loc6_23 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)] { +// CHECK:STDOUT: %impl.elem0.loc6_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)] +// CHECK:STDOUT: %U.ref.loc6_23: type = name_ref U, %impl.elem0.loc6_23.2 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1) = bind_name v, %v.param -// CHECK:STDOUT: %return.param: ref @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1) = out_param call_param2 -// CHECK:STDOUT: %return: ref @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1) = return_slot %return.param +// CHECK:STDOUT: %v: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = bind_name v, %v.param +// CHECK:STDOUT: %return.param: ref @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = out_param call_param2 +// CHECK:STDOUT: %return: ref @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, %G.decl [concrete = constants.%assoc2] // CHECK:STDOUT: @@ -1128,8 +1114,8 @@ fn F() { // CHECK:STDOUT: assoc_const U:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2dd: %Self.ref as %.loc10_20 { -// CHECK:STDOUT: %F.decl: %F.type.e5e = fn_decl @F.2 [concrete = constants.%F.c81] { +// CHECK:STDOUT: impl @impl.939: %Self.ref as %.loc10_20 { +// CHECK:STDOUT: %F.decl: %F.type.b84 = fn_decl @F.2 [concrete = constants.%F.b07] { // CHECK:STDOUT: %u.patt: %i32 = binding_pattern u // CHECK:STDOUT: %u.param_patt: %i32 = value_param_pattern %u.patt, call_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern @@ -1146,7 +1132,7 @@ fn F() { // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: %G.type.89e = fn_decl @G.2 [concrete = constants.%G.105] { +// CHECK:STDOUT: %G.decl: %G.type.4b6 = fn_decl @G.2 [concrete = constants.%G.553] { // CHECK:STDOUT: %self.patt: %E = binding_pattern self // CHECK:STDOUT: %self.param_patt: %E = value_param_pattern %self.patt, call_param0 // CHECK:STDOUT: %v.patt: %i32 = binding_pattern v @@ -1176,7 +1162,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { -// CHECK:STDOUT: impl_decl @impl.2dd [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.939 [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -1184,15 +1170,14 @@ fn F() { // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.53a] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // 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: %.loc10_20: type = where_expr %.Self [concrete = constants.%J_where.type] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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_table = impl_witness_table (%impl_witness_assoc_constant, @impl.939.%F.decl, @impl.939.%G.decl), @impl.939 [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] @@ -1204,24 +1189,24 @@ fn F() { // CHECK:STDOUT: .J = // CHECK:STDOUT: .F = // CHECK:STDOUT: .G = -// CHECK:STDOUT: extend @impl.2dd.%.loc10_20 +// CHECK:STDOUT: extend @impl.939.%.loc10_20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %Self.as_wit.iface0.loc5_11.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)] +// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c3a6.1); +// CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] // CHECK:STDOUT: %Self.as_type.loc6_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.3df)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_23.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc6_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc6_23.1: type = impl_witness_access %Self.as_wit.iface0.loc6_23.1, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)] +// CHECK:STDOUT: %impl.elem0.loc6_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df), %v.param: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1)) -> @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.d9c3a6.1); +// CHECK:STDOUT: fn(%self.param: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df), %v.param: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1)) -> @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%u.param: %i32) -> %i32 { @@ -1270,7 +1255,7 @@ 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: %.171 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.c81] +// CHECK:STDOUT: %impl.elem1.loc21_11: %.29b = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b07] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // 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] @@ -1282,7 +1267,7 @@ 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: %.928 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.105] +// CHECK:STDOUT: %impl.elem2.loc21_20: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553] // 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: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] @@ -1304,7 +1289,7 @@ 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: %.171 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.c81] +// CHECK:STDOUT: %impl.elem1.loc21_29: %.29b = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b07] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // 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] @@ -1326,7 +1311,7 @@ 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: %.928 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.105] +// CHECK:STDOUT: %impl.elem2.loc21_41: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553] // 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: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] @@ -1349,7 +1334,7 @@ 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: %.928 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.105] +// CHECK:STDOUT: %impl.elem2.loc21_51: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553] // 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: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] @@ -1378,30 +1363,29 @@ fn F() { // CHECK:STDOUT: %T.loc24_17.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc24_17.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc24_17.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_17.2 (constants.%T.patt)] // CHECK:STDOUT: %T.as_type.loc24_27.2: type = facet_access_type %T.loc24_17.2 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc24_34.2: = facet_access_witness %T.loc24_17.2, element0 [symbolic = %T.as_wit.iface0.loc24_34.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc24_34.2: type = impl_witness_access %T.as_wit.iface0.loc24_34.2, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.d9c3a6.2)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc24_17.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)] +// CHECK:STDOUT: %impl.elem0.loc24_34.2: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc24_38: = require_complete_type %impl.elem0.loc24_34.2 [symbolic = %require_complete.loc24_38 (constants.%require_complete.d9a)] +// CHECK:STDOUT: %require_complete.loc24_38: = require_complete_type %impl.elem0.loc24_34.2 [symbolic = %require_complete.loc24_38 (constants.%require_complete.58f)] // CHECK:STDOUT: %require_complete.loc24_25: = require_complete_type %T.as_type.loc24_27.2 [symbolic = %require_complete.loc24_25 (constants.%require_complete.2a5)] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc24_27.2, (%T.as_wit.iface0.loc24_34.2) [symbolic = %J.facet (constants.%J.facet.085e97.2)] -// CHECK:STDOUT: %.loc25_11.2: type = fn_type_with_self_type constants.%F.type.c14, %J.facet [symbolic = %.loc25_11.2 (constants.%.4d2)] -// CHECK:STDOUT: %impl.elem1.loc25_11.2: @GenericCallF.%.loc25_11.2 (%.4d2) = impl_witness_access %T.as_wit.iface0.loc24_34.2, element1 [symbolic = %impl.elem1.loc25_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc24_27.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)] +// CHECK:STDOUT: %.loc25_11.2: type = fn_type_with_self_type constants.%F.type.c14, %J.facet [symbolic = %.loc25_11.2 (constants.%.d43)] +// CHECK:STDOUT: %impl.elem1.loc25_11.2: @GenericCallF.%.loc25_11.2 (%.d43) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc25_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %specific_impl_fn.loc25_11.2: = specific_impl_function %impl.elem1.loc25_11.2, @F.1(%J.facet) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type), %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2)) -> @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) { +// CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type), %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2)) -> @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc25: type = facet_access_type constants.%T [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc25_11.1: type = converted constants.%T, %T.as_type.loc25 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc25: = facet_access_witness constants.%T, element0 [symbolic = %T.as_wit.iface0.loc24_34.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem1.loc25_11.1: @GenericCallF.%.loc25_11.2 (%.4d2) = impl_witness_access %T.as_wit.iface0.loc25, element1 [symbolic = %impl.elem1.loc25_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = name_ref u, %u -// CHECK:STDOUT: %specific_impl_fn.loc25_11.1: = specific_impl_function %impl.elem1.loc25_11.1, @F.1(constants.%J.facet.085e97.2) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %.loc25_15: init @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = call %specific_impl_fn.loc25_11.1(%u.ref) -// CHECK:STDOUT: %.loc25_16.1: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = value_of_initializer %.loc25_15 -// CHECK:STDOUT: %.loc25_16.2: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.d9c3a6.2) = converted %.loc25_15, %.loc25_16.1 +// CHECK:STDOUT: %impl.elem1.loc25_11.1: @GenericCallF.%.loc25_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc25_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %u.ref: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = name_ref u, %u +// CHECK:STDOUT: %specific_impl_fn.loc25_11.1: = specific_impl_function %impl.elem1.loc25_11.1, @F.1(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %.loc25_15: init @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = call %specific_impl_fn.loc25_11.1(%u.ref) +// CHECK:STDOUT: %.loc25_16.1: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = value_of_initializer %.loc25_15 +// CHECK:STDOUT: %.loc25_16.2: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = converted %.loc25_15, %.loc25_16.1 // CHECK:STDOUT: return %.loc25_16.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1411,11 +1395,11 @@ 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.%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: %J.facet.loc29_27.1: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet.ee5] +// CHECK:STDOUT: %.loc29_27.1: %J.type = converted constants.%E, %J.facet.loc29_27.1 [concrete = constants.%J.facet.ee5] +// CHECK:STDOUT: %J.facet.loc29_27.2: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet.ee5] +// CHECK:STDOUT: %.loc29_27.2: %J.type = converted constants.%E, %J.facet.loc29_27.2 [concrete = constants.%J.facet.ee5] +// CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF.ref, @GenericCallF(constants.%J.facet.ee5) [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] @@ -1431,68 +1415,68 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self.ccd) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085e97.1) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.ccd) { // CHECK:STDOUT: %Self => constants.%Self.ccd -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.d9c3a6.1 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1 +// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11fef0.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self.ccd) { // CHECK:STDOUT: %Self => constants.%Self.ccd // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type.3df -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_23.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%impl.elem0.d9c3a6.1 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1 +// CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%impl.elem0.11fef0.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.330) {} // CHECK:STDOUT: -// 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: specific @F.1(constants.%J.facet.ee5) { +// CHECK:STDOUT: %Self => constants.%J.facet.ee5 +// CHECK:STDOUT: %J.lookup_impl_witness => 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.557) { -// CHECK:STDOUT: %Self => constants.%J.facet.557 +// CHECK:STDOUT: specific @G.1(constants.%J.facet.ee5) { +// CHECK:STDOUT: %Self => constants.%J.facet.ee5 // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%E -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_23.1 => constants.%J.impl_witness +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness // CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085e97.2) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericCallF(constants.%T) { // CHECK:STDOUT: %T.loc24_17.2 => constants.%T // CHECK:STDOUT: %T.patt.loc24_17.2 => constants.%T.patt // CHECK:STDOUT: %T.as_type.loc24_27.2 => constants.%T.as_type -// CHECK:STDOUT: %T.as_wit.iface0.loc24_34.2 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc24_34.2 => constants.%impl.elem0.d9c3a6.2 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 +// CHECK:STDOUT: %impl.elem0.loc24_34.2 => constants.%impl.elem0.11fef0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J.facet.085e97.2) { -// CHECK:STDOUT: %Self => constants.%J.facet.085e97.2 -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.d9c3a6.2 +// CHECK:STDOUT: specific @F.1(constants.%J.facet.5210a7.2) { +// CHECK:STDOUT: %Self => constants.%J.facet.5210a7.2 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 +// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11fef0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(@GenericCallF.%J.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericCallF(constants.%J.facet.557) { -// CHECK:STDOUT: %T.loc24_17.2 => constants.%J.facet.557 +// CHECK:STDOUT: specific @GenericCallF(constants.%J.facet.ee5) { +// CHECK:STDOUT: %T.loc24_17.2 => constants.%J.facet.ee5 // 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.%J.impl_witness +// CHECK:STDOUT: %J.lookup_impl_witness => 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.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: %J.facet => constants.%J.facet.ee5 +// CHECK:STDOUT: %.loc25_11.2 => constants.%.29b +// CHECK:STDOUT: %impl.elem1.loc25_11.2 => constants.%F.b07 +// CHECK:STDOUT: %specific_impl_fn.loc25_11.2 => constants.%F.b07 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- use_constraint_on_associated_type.carbon @@ -1504,33 +1488,33 @@ fn F() { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.304: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self.ccd, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085e97.1: %J.type = facet_value %Self.as_type.3df, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.c57618.1: %Add.type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %as_type.6b96b1.1: type = facet_access_type %impl.elem0.c57618.1 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.1: = lookup_impl_witness %Self.ccd, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.1: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.64628e.1) [symbolic] +// CHECK:STDOUT: %impl.elem0.9980b1.1: %Add.type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic] +// CHECK:STDOUT: %as_type.1a19b2.1: type = facet_access_type %impl.elem0.9980b1.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %J.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085e97.2: %J.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.c57618.2: %Add.type = impl_witness_access %T.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %as_type.6b96b1.2: type = facet_access_type %impl.elem0.c57618.2 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: = lookup_impl_witness %T, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic] +// CHECK:STDOUT: %impl.elem0.9980b1.2: %Add.type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic] +// CHECK:STDOUT: %as_type.1a19b2.2: type = facet_access_type %impl.elem0.9980b1.2 [symbolic] // CHECK:STDOUT: %GenericAddResult.type: type = fn_type @GenericAddResult [concrete] // CHECK:STDOUT: %GenericAddResult: %GenericAddResult.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.ec7: = require_complete_type %as_type.6b96b1.2 [symbolic] +// CHECK:STDOUT: %require_complete.9b6: = require_complete_type %as_type.1a19b2.2 [symbolic] // CHECK:STDOUT: %require_complete.2a5: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %.4d2: type = fn_type_with_self_type %F.type, %J.facet.085e97.2 [symbolic] -// CHECK:STDOUT: %impl.elem1: %.4d2 = impl_witness_access %T.as_wit.iface0, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.5d8: = specific_impl_function %impl.elem1, @F(%J.facet.085e97.2) [symbolic] +// CHECK:STDOUT: %.d43: type = fn_type_with_self_type %F.type, %J.facet.5210a7.2 [symbolic] +// CHECK:STDOUT: %impl.elem1: %.d43 = impl_witness_access %J.lookup_impl_witness.64628e.2, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.fe8: = specific_impl_function %impl.elem1, @F(%J.facet.5210a7.2) [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [concrete] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %impl.elem0.c57618.2, element0 [symbolic] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %as_type.6b96b1.2, (%as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.5a3: type = fn_type_with_self_type %Op.type, %Add.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.ab3: %.5a3 = impl_witness_access %as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.e8e: = specific_impl_function %impl.elem0.ab3, @Op(%Add.facet) [symbolic] +// CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %impl.elem0.9980b1.2, @Add [symbolic] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %as_type.1a19b2.2, (%Add.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.59f: type = fn_type_with_self_type %Op.type, %Add.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.5fb: %.59f = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.015: = specific_impl_function %impl.elem0.5fb, @Op(%Add.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1553,19 +1537,18 @@ fn F() { // CHECK:STDOUT: %T.patt.loc8_21.1: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)] // CHECK:STDOUT: %t.patt: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = value_param_pattern %t.patt, call_param0 -// CHECK:STDOUT: %u.patt: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = value_param_pattern %u.patt, call_param1 -// CHECK:STDOUT: %return.patt: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: %u.patt: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_param_pattern %u.patt, call_param1 +// CHECK:STDOUT: %return.patt: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = out_param_pattern %return.patt, call_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_45: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc8_46: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.304] // CHECK:STDOUT: %T.as_type.loc8_46: type = facet_access_type %T.ref.loc8_45 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc8_46.1: type = converted %T.ref.loc8_45, %T.as_type.loc8_46 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc8_46: = facet_access_witness %T.ref.loc8_45, element0 [symbolic = %T.as_wit.iface0.loc8_38.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc8_46: %Add.type = impl_witness_access %T.as_wit.iface0.loc8_46, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %as_type.loc8_46: type = facet_access_type %impl.elem0.loc8_46 [symbolic = %as_type.loc8_38.2 (constants.%as_type.6b96b1.2)] -// CHECK:STDOUT: %.loc8_46.2: type = converted %impl.elem0.loc8_46, %as_type.loc8_46 [symbolic = %as_type.loc8_38.2 (constants.%as_type.6b96b1.2)] +// CHECK:STDOUT: %impl.elem0.loc8_46: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %as_type.loc8_46: type = facet_access_type %impl.elem0.loc8_46 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] +// CHECK:STDOUT: %.loc8_46.2: type = converted %impl.elem0.loc8_46, %as_type.loc8_46 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %T.loc8_21.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_21.2 (constants.%T)] // CHECK:STDOUT: %t.param: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = value_param call_param0 @@ -1575,20 +1558,19 @@ fn F() { // CHECK:STDOUT: %.loc8_31.2: type = converted %T.ref.loc8_31, %T.as_type.loc8_31.1 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %t: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = bind_name t, %t.param -// CHECK:STDOUT: %u.param: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = value_param call_param1 -// CHECK:STDOUT: %.loc8_38.1: type = splice_block %.loc8_38.3 [symbolic = %as_type.loc8_38.2 (constants.%as_type.6b96b1.2)] { +// CHECK:STDOUT: %u.param: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_param call_param1 +// CHECK:STDOUT: %.loc8_38.1: type = splice_block %.loc8_38.3 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] { // CHECK:STDOUT: %T.ref.loc8_37: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc8_38: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.304] // CHECK:STDOUT: %T.as_type.loc8_38: type = facet_access_type %T.ref.loc8_37 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc8_38.2: type = converted %T.ref.loc8_37, %T.as_type.loc8_38 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc8_38.1: = facet_access_witness %T.ref.loc8_37, element0 [symbolic = %T.as_wit.iface0.loc8_38.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc8_38.1: %Add.type = impl_witness_access %T.as_wit.iface0.loc8_38.1, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %as_type.loc8_38.1: type = facet_access_type %impl.elem0.loc8_38.1 [symbolic = %as_type.loc8_38.2 (constants.%as_type.6b96b1.2)] -// CHECK:STDOUT: %.loc8_38.3: type = converted %impl.elem0.loc8_38.1, %as_type.loc8_38.1 [symbolic = %as_type.loc8_38.2 (constants.%as_type.6b96b1.2)] +// CHECK:STDOUT: %impl.elem0.loc8_38.1: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %as_type.loc8_38.1: type = facet_access_type %impl.elem0.loc8_38.1 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] +// CHECK:STDOUT: %.loc8_38.3: type = converted %impl.elem0.loc8_38.1, %as_type.loc8_38.1 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = out_param call_param2 -// CHECK:STDOUT: %return: ref @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = return_slot %return.param +// CHECK:STDOUT: %u: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = out_param call_param2 +// CHECK:STDOUT: %return: ref @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1598,27 +1580,25 @@ fn F() { // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.304] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %u.patt: @F.%as_type (%as_type.6b96b1.1) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @F.%as_type (%as_type.6b96b1.1) = value_param_pattern %u.patt, call_param0 -// CHECK:STDOUT: %return.patt: @F.%as_type (%as_type.6b96b1.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%as_type (%as_type.6b96b1.1) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: %u.patt: @F.%as_type (%as_type.1a19b2.1) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @F.%as_type (%as_type.1a19b2.1) = value_param_pattern %u.patt, call_param0 +// CHECK:STDOUT: %return.patt: @F.%as_type (%as_type.1a19b2.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%as_type (%as_type.1a19b2.1) = out_param_pattern %return.patt, call_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_17: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_17: %Add.type = impl_witness_access %Self.as_wit.iface0.loc5_17, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.c57618.1)] -// CHECK:STDOUT: %U.ref.loc5_17: %Add.type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.c57618.1)] -// CHECK:STDOUT: %U.as_type.loc5_17: type = facet_access_type %U.ref.loc5_17 [symbolic = %as_type (constants.%as_type.6b96b1.1)] -// CHECK:STDOUT: %.loc5_17: type = converted %U.ref.loc5_17, %U.as_type.loc5_17 [symbolic = %as_type (constants.%as_type.6b96b1.1)] -// CHECK:STDOUT: %u.param: @F.%as_type (%as_type.6b96b1.1) = value_param call_param0 -// CHECK:STDOUT: %.loc5_11.1: type = splice_block %.loc5_11.2 [symbolic = %as_type (constants.%as_type.6b96b1.1)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.2: %Add.type = impl_witness_access %Self.as_wit.iface0.loc5_11.2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.c57618.1)] -// CHECK:STDOUT: %U.ref.loc5_11: %Add.type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.c57618.1)] -// CHECK:STDOUT: %U.as_type.loc5_11: type = facet_access_type %U.ref.loc5_11 [symbolic = %as_type (constants.%as_type.6b96b1.1)] -// CHECK:STDOUT: %.loc5_11.2: type = converted %U.ref.loc5_11, %U.as_type.loc5_11 [symbolic = %as_type (constants.%as_type.6b96b1.1)] +// CHECK:STDOUT: %impl.elem0.loc5_17: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] +// CHECK:STDOUT: %U.ref.loc5_17: %Add.type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] +// CHECK:STDOUT: %U.as_type.loc5_17: type = facet_access_type %U.ref.loc5_17 [symbolic = %as_type (constants.%as_type.1a19b2.1)] +// CHECK:STDOUT: %.loc5_17: type = converted %U.ref.loc5_17, %U.as_type.loc5_17 [symbolic = %as_type (constants.%as_type.1a19b2.1)] +// CHECK:STDOUT: %u.param: @F.%as_type (%as_type.1a19b2.1) = value_param call_param0 +// CHECK:STDOUT: %.loc5_11.1: type = splice_block %.loc5_11.2 [symbolic = %as_type (constants.%as_type.1a19b2.1)] { +// CHECK:STDOUT: %impl.elem0.loc5_11.2: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] +// CHECK:STDOUT: %U.ref.loc5_11: %Add.type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] +// CHECK:STDOUT: %U.as_type.loc5_11: type = facet_access_type %U.ref.loc5_11 [symbolic = %as_type (constants.%as_type.1a19b2.1)] +// CHECK:STDOUT: %.loc5_11.2: type = converted %U.ref.loc5_11, %U.as_type.loc5_11 [symbolic = %as_type (constants.%as_type.1a19b2.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @F.%as_type (%as_type.6b96b1.1) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @F.%as_type (%as_type.6b96b1.1) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%as_type (%as_type.6b96b1.1) = return_slot %return.param +// CHECK:STDOUT: %u: @F.%as_type (%as_type.1a19b2.1) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @F.%as_type (%as_type.1a19b2.1) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%as_type (%as_type.1a19b2.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -1635,103 +1615,100 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: %Add.type = impl_witness_access %Self.as_wit.iface0.loc5_11.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.c57618.1)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc5_11.1 [symbolic = %as_type (constants.%as_type.6b96b1.1)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)] +// CHECK:STDOUT: %impl.elem0.loc5_11.1: %Add.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc5_11.1 [symbolic = %as_type (constants.%as_type.1a19b2.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @F.%as_type (%as_type.6b96b1.1)) -> @F.%as_type (%as_type.6b96b1.1); +// CHECK:STDOUT: fn(%u.param: @F.%as_type (%as_type.1a19b2.1)) -> @F.%as_type (%as_type.1a19b2.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GenericAddResult(%T.loc8_21.1: %J.type) { // CHECK:STDOUT: %T.loc8_21.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_21.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_21.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)] // CHECK:STDOUT: %T.as_type.loc8_31.2: type = facet_access_type %T.loc8_21.2 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc8_38.2: = facet_access_witness %T.loc8_21.2, element0 [symbolic = %T.as_wit.iface0.loc8_38.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc8_38.2: %Add.type = impl_witness_access %T.as_wit.iface0.loc8_38.2, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %as_type.loc8_38.2: type = facet_access_type %impl.elem0.loc8_38.2 [symbolic = %as_type.loc8_38.2 (constants.%as_type.6b96b1.2)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_21.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)] +// CHECK:STDOUT: %impl.elem0.loc8_38.2: %Add.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %as_type.loc8_38.2: type = facet_access_type %impl.elem0.loc8_38.2 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8_42: = require_complete_type %as_type.loc8_38.2 [symbolic = %require_complete.loc8_42 (constants.%require_complete.ec7)] +// CHECK:STDOUT: %require_complete.loc8_42: = require_complete_type %as_type.loc8_38.2 [symbolic = %require_complete.loc8_42 (constants.%require_complete.9b6)] // CHECK:STDOUT: %require_complete.loc8_29: = require_complete_type %T.as_type.loc8_31.2 [symbolic = %require_complete.loc8_29 (constants.%require_complete.2a5)] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_31.2, (%T.as_wit.iface0.loc8_38.2) [symbolic = %J.facet (constants.%J.facet.085e97.2)] -// CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc9_11.2 (constants.%.4d2)] -// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericAddResult.%.loc9_11.2 (%.4d2) = impl_witness_access %T.as_wit.iface0.loc8_38.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.5d8)] -// CHECK:STDOUT: %as_wit.iface0.loc9_17.2: = facet_access_witness %impl.elem0.loc8_38.2, element0 [symbolic = %as_wit.iface0.loc9_17.2 (constants.%as_wit.iface0)] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %as_type.loc8_38.2, (%as_wit.iface0.loc9_17.2) [symbolic = %Add.facet (constants.%Add.facet)] -// CHECK:STDOUT: %.loc9_17.4: type = fn_type_with_self_type constants.%Op.type, %Add.facet [symbolic = %.loc9_17.4 (constants.%.5a3)] -// CHECK:STDOUT: %impl.elem0.loc9_17.2: @GenericAddResult.%.loc9_17.4 (%.5a3) = impl_witness_access %as_wit.iface0.loc9_17.2, element0 [symbolic = %impl.elem0.loc9_17.2 (constants.%impl.elem0.ab3)] -// CHECK:STDOUT: %specific_impl_fn.loc9_17.2: = specific_impl_function %impl.elem0.loc9_17.2, @Op(%Add.facet) [symbolic = %specific_impl_fn.loc9_17.2 (constants.%specific_impl_fn.e8e)] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_31.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)] +// CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc9_11.2 (constants.%.d43)] +// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)] +// CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc8_38.2, @Add [symbolic = %Add.lookup_impl_witness (constants.%Add.lookup_impl_witness)] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %as_type.loc8_38.2, (%Add.lookup_impl_witness) [symbolic = %Add.facet (constants.%Add.facet)] +// CHECK:STDOUT: %.loc9_17.4: type = fn_type_with_self_type constants.%Op.type, %Add.facet [symbolic = %.loc9_17.4 (constants.%.59f)] +// CHECK:STDOUT: %impl.elem0.loc9_17.2: @GenericAddResult.%.loc9_17.4 (%.59f) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_17.2 (constants.%impl.elem0.5fb)] +// CHECK:STDOUT: %specific_impl_fn.loc9_17.2: = specific_impl_function %impl.elem0.loc9_17.2, @Op(%Add.facet) [symbolic = %specific_impl_fn.loc9_17.2 (constants.%specific_impl_fn.015)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type), %u.param: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2)) -> @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) { +// CHECK:STDOUT: fn(%t.param: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type), %u.param: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2)) -> @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %F.ref.loc9_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc9_11: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_11.1: type = converted constants.%T, %T.as_type.loc9_11 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_11: = facet_access_witness constants.%T, element0 [symbolic = %T.as_wit.iface0.loc8_38.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericAddResult.%.loc9_11.2 (%.4d2) = impl_witness_access %T.as_wit.iface0.loc9_11, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref.loc9_14: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = name_ref u, %u -// CHECK:STDOUT: %.loc9_15.1: %Add.type = converted constants.%as_type.6b96b1.2, constants.%impl.elem0.c57618.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %.loc9_15.2: %Add.type = converted constants.%as_type.6b96b1.2, constants.%impl.elem0.c57618.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @F(constants.%J.facet.085e97.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.5d8)] -// CHECK:STDOUT: %.loc9_15.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = call %specific_impl_fn.loc9_11.1(%u.ref.loc9_14) +// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %u.ref.loc9_14: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = name_ref u, %u +// CHECK:STDOUT: %.loc9_15.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %.loc9_15.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @F(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)] +// CHECK:STDOUT: %.loc9_15.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %specific_impl_fn.loc9_11.1(%u.ref.loc9_14) // CHECK:STDOUT: %T.ref.loc9: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)] // CHECK:STDOUT: %F.ref.loc9_20: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc9_20: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_20: type = converted %T.ref.loc9, %T.as_type.loc9_20 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_20: = facet_access_witness %T.ref.loc9, element0 [symbolic = %T.as_wit.iface0.loc8_38.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem1.loc9_20: @GenericAddResult.%.loc9_11.2 (%.4d2) = impl_witness_access %T.as_wit.iface0.loc9_20, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref.loc9_23: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = name_ref u, %u -// CHECK:STDOUT: %.loc9_24.1: %Add.type = converted constants.%as_type.6b96b1.2, constants.%impl.elem0.c57618.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %.loc9_24.2: %Add.type = converted constants.%as_type.6b96b1.2, constants.%impl.elem0.c57618.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %specific_impl_fn.loc9_20: = specific_impl_function %impl.elem1.loc9_20, @F(constants.%J.facet.085e97.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.5d8)] -// CHECK:STDOUT: %.loc9_24.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = call %specific_impl_fn.loc9_20(%u.ref.loc9_23) -// CHECK:STDOUT: %as_wit.iface0.loc9_17.1: = facet_access_witness constants.%impl.elem0.c57618.2, element0 [symbolic = %as_wit.iface0.loc9_17.2 (constants.%as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_17.1: @GenericAddResult.%.loc9_17.4 (%.5a3) = impl_witness_access %as_wit.iface0.loc9_17.1, element0 [symbolic = %impl.elem0.loc9_17.2 (constants.%impl.elem0.ab3)] +// CHECK:STDOUT: %impl.elem1.loc9_20: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %u.ref.loc9_23: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = name_ref u, %u +// CHECK:STDOUT: %.loc9_24.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %.loc9_24.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %specific_impl_fn.loc9_20: = specific_impl_function %impl.elem1.loc9_20, @F(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)] +// CHECK:STDOUT: %.loc9_24.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %specific_impl_fn.loc9_20(%u.ref.loc9_23) +// CHECK:STDOUT: %impl.elem0.loc9_17.1: @GenericAddResult.%.loc9_17.4 (%.59f) = impl_witness_access constants.%Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_17.2 (constants.%impl.elem0.5fb)] // CHECK:STDOUT: %bound_method.loc9_17.1: = bound_method %.loc9_15.3, %impl.elem0.loc9_17.1 -// CHECK:STDOUT: %.loc9_17.1: %Add.type = converted constants.%as_type.6b96b1.2, constants.%impl.elem0.c57618.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %.loc9_17.2: %Add.type = converted constants.%as_type.6b96b1.2, constants.%impl.elem0.c57618.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.c57618.2)] -// CHECK:STDOUT: %specific_impl_fn.loc9_17.1: = specific_impl_function %impl.elem0.loc9_17.1, @Op(constants.%Add.facet) [symbolic = %specific_impl_fn.loc9_17.2 (constants.%specific_impl_fn.e8e)] +// CHECK:STDOUT: %.loc9_17.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %.loc9_17.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] +// CHECK:STDOUT: %specific_impl_fn.loc9_17.1: = specific_impl_function %impl.elem0.loc9_17.1, @Op(constants.%Add.facet) [symbolic = %specific_impl_fn.loc9_17.2 (constants.%specific_impl_fn.015)] // CHECK:STDOUT: %bound_method.loc9_17.2: = bound_method %.loc9_15.3, %specific_impl_fn.loc9_17.1 -// CHECK:STDOUT: %.loc9_15.4: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = value_of_initializer %.loc9_15.3 -// CHECK:STDOUT: %.loc9_15.5: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = converted %.loc9_15.3, %.loc9_15.4 -// CHECK:STDOUT: %.loc9_24.4: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = value_of_initializer %.loc9_24.3 -// CHECK:STDOUT: %.loc9_24.5: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = converted %.loc9_24.3, %.loc9_24.4 -// CHECK:STDOUT: %.loc9_17.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = call %bound_method.loc9_17.2(%.loc9_15.5, %.loc9_24.5) -// CHECK:STDOUT: %.loc9_25.1: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = value_of_initializer %.loc9_17.3 -// CHECK:STDOUT: %.loc9_25.2: @GenericAddResult.%as_type.loc8_38.2 (%as_type.6b96b1.2) = converted %.loc9_17.3, %.loc9_25.1 +// CHECK:STDOUT: %.loc9_15.4: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_15.3 +// CHECK:STDOUT: %.loc9_15.5: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_15.3, %.loc9_15.4 +// CHECK:STDOUT: %.loc9_24.4: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_24.3 +// CHECK:STDOUT: %.loc9_24.5: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_24.3, %.loc9_24.4 +// CHECK:STDOUT: %.loc9_17.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %bound_method.loc9_17.2(%.loc9_15.5, %.loc9_24.5) +// CHECK:STDOUT: %.loc9_25.1: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_17.3 +// CHECK:STDOUT: %.loc9_25.2: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_17.3, %.loc9_25.1 // CHECK:STDOUT: return %.loc9_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self.ccd) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085e97.1) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self.ccd) { // CHECK:STDOUT: %Self => constants.%Self.ccd -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.c57618.1 -// CHECK:STDOUT: %as_type => constants.%as_type.6b96b1.1 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1 +// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.9980b1.1 +// CHECK:STDOUT: %as_type => constants.%as_type.1a19b2.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085e97.2) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAddResult(constants.%T) { // CHECK:STDOUT: %T.loc8_21.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_21.2 => constants.%T.patt // CHECK:STDOUT: %T.as_type.loc8_31.2 => constants.%T.as_type -// CHECK:STDOUT: %T.as_wit.iface0.loc8_38.2 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc8_38.2 => constants.%impl.elem0.c57618.2 -// CHECK:STDOUT: %as_type.loc8_38.2 => constants.%as_type.6b96b1.2 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 +// CHECK:STDOUT: %impl.elem0.loc8_38.2 => constants.%impl.elem0.9980b1.2 +// CHECK:STDOUT: %as_type.loc8_38.2 => constants.%as_type.1a19b2.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%J.facet.085e97.2) { -// CHECK:STDOUT: %Self => constants.%J.facet.085e97.2 -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.c57618.2 -// CHECK:STDOUT: %as_type => constants.%as_type.6b96b1.2 +// CHECK:STDOUT: specific @F(constants.%J.facet.5210a7.2) { +// CHECK:STDOUT: %Self => constants.%J.facet.5210a7.2 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 +// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.9980b1.2 +// CHECK:STDOUT: %as_type => constants.%as_type.1a19b2.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@GenericAddResult.%J.facet) {} @@ -1744,25 +1721,25 @@ fn F() { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085e97.1: %J.type = facet_value %Self.as_type, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c3a6.1: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.1: = lookup_impl_witness %Self, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.1: %J.type = facet_value %Self.as_type, (%J.lookup_impl_witness.64628e.1) [symbolic] +// CHECK:STDOUT: %impl.elem0.11fef0.1: type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%G.decl [concrete] // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %J.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085e97.2: %J.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c3a6.2: type = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: = lookup_impl_witness %T, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic] +// CHECK:STDOUT: %impl.elem0.11fef0.2: type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic] // CHECK:STDOUT: %GenericCallInterfaceQualified.type: type = fn_type @GenericCallInterfaceQualified [concrete] // CHECK:STDOUT: %GenericCallInterfaceQualified: %GenericCallInterfaceQualified.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.d9a: = require_complete_type %impl.elem0.d9c3a6.2 [symbolic] +// CHECK:STDOUT: %require_complete.58f: = require_complete_type %impl.elem0.11fef0.2 [symbolic] // CHECK:STDOUT: %require_complete.2a5: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %.9ac: type = fn_type_with_self_type %G.type, %J.facet.085e97.2 [symbolic] -// CHECK:STDOUT: %impl.elem1: %.9ac = impl_witness_access %T.as_wit.iface0, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @G(%J.facet.085e97.2) [symbolic] +// CHECK:STDOUT: %.442: type = fn_type_with_self_type %G.type, %J.facet.5210a7.2 [symbolic] +// CHECK:STDOUT: %impl.elem1: %.442 = impl_witness_access %J.lookup_impl_witness.64628e.2, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @G(%J.facet.5210a7.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1784,17 +1761,16 @@ fn F() { // CHECK:STDOUT: %T.patt.loc8_34.1: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_34.2 (constants.%T.patt)] // CHECK:STDOUT: %t.patt: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type) = value_param_pattern %t.patt, call_param0 -// CHECK:STDOUT: %u.patt: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = value_param_pattern %u.patt, call_param1 -// CHECK:STDOUT: %return.patt: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: %u.patt: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = value_param_pattern %u.patt, call_param1 +// CHECK:STDOUT: %return.patt: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = out_param_pattern %return.patt, call_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_58: %J.type = name_ref T, %T.loc8_34.1 [symbolic = %T.loc8_34.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc8_59: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc8_59: type = facet_access_type %T.ref.loc8_58 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc8_59: type = converted %T.ref.loc8_58, %T.as_type.loc8_59 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc8_59: = facet_access_witness %T.ref.loc8_58, element0 [symbolic = %T.as_wit.iface0.loc8_51.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc8_59: type = impl_witness_access %T.as_wit.iface0.loc8_59, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.d9c3a6.2)] +// CHECK:STDOUT: %impl.elem0.loc8_59: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: %J.ref.loc8: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %T.loc8_34.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_34.2 (constants.%T)] // CHECK:STDOUT: %t.param: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type) = value_param call_param0 @@ -1804,18 +1780,17 @@ fn F() { // CHECK:STDOUT: %.loc8_44.2: type = converted %T.ref.loc8_44, %T.as_type.loc8_44.1 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %t: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type) = bind_name t, %t.param -// CHECK:STDOUT: %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = value_param call_param1 -// CHECK:STDOUT: %.loc8_51.1: type = splice_block %impl.elem0.loc8_51.1 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.d9c3a6.2)] { +// CHECK:STDOUT: %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = value_param call_param1 +// CHECK:STDOUT: %.loc8_51.1: type = splice_block %impl.elem0.loc8_51.1 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.11fef0.2)] { // CHECK:STDOUT: %T.ref.loc8_50: %J.type = name_ref T, %T.loc8_34.1 [symbolic = %T.loc8_34.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc8_51: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc8_51: type = facet_access_type %T.ref.loc8_50 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc8_51.2: type = converted %T.ref.loc8_50, %T.as_type.loc8_51 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc8_51.1: = facet_access_witness %T.ref.loc8_50, element0 [symbolic = %T.as_wit.iface0.loc8_51.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc8_51.1: type = impl_witness_access %T.as_wit.iface0.loc8_51.1, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.d9c3a6.2)] +// CHECK:STDOUT: %impl.elem0.loc8_51.1: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = out_param call_param2 -// CHECK:STDOUT: %return: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = return_slot %return.param +// CHECK:STDOUT: %u: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = out_param call_param2 +// CHECK:STDOUT: %return: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1827,14 +1802,13 @@ fn F() { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %self.patt: @G.%Self.as_type.loc5_14.1 (%Self.as_type) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @G.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0 -// CHECK:STDOUT: %v.patt: @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1) = binding_pattern v -// CHECK:STDOUT: %v.param_patt: @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1) = value_param_pattern %v.patt, call_param1 -// CHECK:STDOUT: %return.patt: @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: %v.patt: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = binding_pattern v +// CHECK:STDOUT: %v.param_patt: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = value_param_pattern %v.patt, call_param1 +// CHECK:STDOUT: %return.patt: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = out_param_pattern %return.patt, call_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_29: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access %Self.as_wit.iface0.loc5_29, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c3a6.1)] -// CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)] +// CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: %self.param: @G.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] { // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self)] @@ -1842,15 +1816,14 @@ fn F() { // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @G.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param -// CHECK:STDOUT: %v.param: @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1) = value_param call_param1 -// CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c3a6.1)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access %Self.as_wit.iface0.loc5_23.2, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c3a6.1)] -// CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %v.param: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = value_param call_param1 +// CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)] { +// CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)] +// CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1) = bind_name v, %v.param -// CHECK:STDOUT: %return.param: ref @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1) = out_param call_param2 -// CHECK:STDOUT: %return: ref @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1) = return_slot %return.param +// CHECK:STDOUT: %v: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = bind_name v, %v.param +// CHECK:STDOUT: %return.param: ref @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = out_param call_param2 +// CHECK:STDOUT: %return: ref @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -1868,71 +1841,70 @@ fn F() { // CHECK:STDOUT: generic fn @G(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %Self.as_wit.iface0.loc5_23.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)] +// CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @G.%Self.as_type.loc5_14.1 (%Self.as_type), %v.param: @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1)) -> @G.%impl.elem0.loc5_23.1 (%impl.elem0.d9c3a6.1); +// CHECK:STDOUT: fn(%self.param: @G.%Self.as_type.loc5_14.1 (%Self.as_type), %v.param: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1)) -> @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GenericCallInterfaceQualified(%T.loc8_34.1: %J.type) { // CHECK:STDOUT: %T.loc8_34.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_34.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_34.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_34.2 (constants.%T.patt)] // CHECK:STDOUT: %T.as_type.loc8_44.2: type = facet_access_type %T.loc8_34.2 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc8_51.2: = facet_access_witness %T.loc8_34.2, element0 [symbolic = %T.as_wit.iface0.loc8_51.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc8_51.2: type = impl_witness_access %T.as_wit.iface0.loc8_51.2, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.d9c3a6.2)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_34.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)] +// CHECK:STDOUT: %impl.elem0.loc8_51.2: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8_55: = require_complete_type %impl.elem0.loc8_51.2 [symbolic = %require_complete.loc8_55 (constants.%require_complete.d9a)] +// CHECK:STDOUT: %require_complete.loc8_55: = require_complete_type %impl.elem0.loc8_51.2 [symbolic = %require_complete.loc8_55 (constants.%require_complete.58f)] // CHECK:STDOUT: %require_complete.loc8_42: = require_complete_type %T.as_type.loc8_44.2 [symbolic = %require_complete.loc8_42 (constants.%require_complete.2a5)] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_44.2, (%T.as_wit.iface0.loc8_51.2) [symbolic = %J.facet (constants.%J.facet.085e97.2)] -// CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type constants.%G.type, %J.facet [symbolic = %.loc9_11 (constants.%.9ac)] -// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallInterfaceQualified.%.loc9_11 (%.9ac) = impl_witness_access %T.as_wit.iface0.loc8_51.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_44.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)] +// CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type constants.%G.type, %J.facet [symbolic = %.loc9_11 (constants.%.442)] +// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallInterfaceQualified.%.loc9_11 (%.442) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @G(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type), %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2)) -> @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) { +// CHECK:STDOUT: fn(%t.param: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type), %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2)) -> @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %J.ref.loc9: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %G.ref: %J.assoc_type = name_ref G, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %T.as_wit.iface0.loc9: = facet_access_witness constants.%T, element0 [symbolic = %T.as_wit.iface0.loc8_51.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallInterfaceQualified.%.loc9_11 (%.9ac) = impl_witness_access %T.as_wit.iface0.loc9, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallInterfaceQualified.%.loc9_11 (%.442) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %bound_method.loc9_11: = bound_method %t.ref, %impl.elem1.loc9_11.1 -// CHECK:STDOUT: %u.ref: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = name_ref u, %u -// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @G(constants.%J.facet.085e97.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %u.ref: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = name_ref u, %u +// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @G(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc9_19: = bound_method %t.ref, %specific_impl_fn.loc9_11.1 -// CHECK:STDOUT: %.loc9_19: init @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = call %bound_method.loc9_19(%t.ref, %u.ref) -// CHECK:STDOUT: %.loc9_20.1: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = value_of_initializer %.loc9_19 -// CHECK:STDOUT: %.loc9_20.2: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.d9c3a6.2) = converted %.loc9_19, %.loc9_20.1 +// CHECK:STDOUT: %.loc9_19: init @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = call %bound_method.loc9_19(%t.ref, %u.ref) +// CHECK:STDOUT: %.loc9_20.1: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = value_of_initializer %.loc9_19 +// CHECK:STDOUT: %.loc9_20.2: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = converted %.loc9_19, %.loc9_20.1 // CHECK:STDOUT: return %.loc9_20.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085e97.1) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.d9c3a6.1 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1 +// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.11fef0.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085e97.2) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericCallInterfaceQualified(constants.%T) { // CHECK:STDOUT: %T.loc8_34.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_34.2 => constants.%T.patt // CHECK:STDOUT: %T.as_type.loc8_44.2 => constants.%T.as_type -// CHECK:STDOUT: %T.as_wit.iface0.loc8_51.2 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc8_51.2 => constants.%impl.elem0.d9c3a6.2 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 +// CHECK:STDOUT: %impl.elem0.loc8_51.2 => constants.%impl.elem0.11fef0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%J.facet.085e97.2) { -// CHECK:STDOUT: %Self => constants.%J.facet.085e97.2 +// CHECK:STDOUT: specific @G(constants.%J.facet.5210a7.2) { +// CHECK:STDOUT: %Self => constants.%J.facet.5210a7.2 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%T.as_type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.d9c3a6.2 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 +// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.11fef0.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(@GenericCallInterfaceQualified.%J.facet) {} @@ -1945,42 +1917,42 @@ fn F() { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self.ccd, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085: %J.type = facet_value %Self.as_type.3df, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.646: = lookup_impl_witness %Self.ccd, @J [symbolic] +// CHECK:STDOUT: %J.facet.521: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.646) [symbolic] +// CHECK:STDOUT: %impl.elem0.11f: type = impl_witness_access %J.lookup_impl_witness.646, element0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] // CHECK:STDOUT: %.Self: %J.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] -// CHECK:STDOUT: %J.facet.28c: %J.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.53a: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // 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: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete] // CHECK:STDOUT: %T: %J_where.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %J_where.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %GenericCallFI32.type: type = fn_type @GenericCallFI32 [concrete] // CHECK:STDOUT: %GenericCallFI32: %GenericCallFI32.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.3e7: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %J.facet.869: %J.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.861: type = fn_type_with_self_type %F.type, %J.facet.869 [symbolic] -// CHECK:STDOUT: %impl.elem1: %.861 = impl_witness_access %T.as_wit.iface0, element1 [symbolic] +// CHECK:STDOUT: %require_complete.5de: = require_complete_type %T.as_type [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.bee: = lookup_impl_witness %T, @J [symbolic] +// CHECK:STDOUT: %J.facet.487: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.bee) [symbolic] +// CHECK:STDOUT: %.9b0: type = fn_type_with_self_type %F.type, %J.facet.487 [symbolic] +// CHECK:STDOUT: %impl.elem1: %.9b0 = impl_witness_access %J.lookup_impl_witness.bee, element1 [symbolic] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %impl.elem0.37e: type = impl_witness_access %T.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @F(%J.facet.869) [symbolic] -// CHECK:STDOUT: %require_complete.8bd: = require_complete_type %impl.elem0.37e [symbolic] +// CHECK:STDOUT: %impl.elem0.db9: type = impl_witness_access %J.lookup_impl_witness.bee, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @F(%J.facet.487) [symbolic] +// CHECK:STDOUT: %require_complete.cfd: = require_complete_type %impl.elem0.db9 [symbolic] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] // CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.820: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.37e)> [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.cb0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.37e) [symbolic] -// CHECK:STDOUT: %assoc0.37d: %ImplicitAs.assoc_type.cb0 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %require_complete.1ce: = require_complete_type %ImplicitAs.type.820 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.7df: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.db9)> [symbolic] +// CHECK:STDOUT: %ImplicitAs.assoc_type.c64: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.db9) [symbolic] +// CHECK:STDOUT: %assoc0.965: %ImplicitAs.assoc_type.c64 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] +// CHECK:STDOUT: %require_complete.402: = require_complete_type %ImplicitAs.type.7df [symbolic] // CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2019,8 +1991,7 @@ fn F() { // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.53a] +// CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // CHECK:STDOUT: %int_32.loc8_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc8_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc8_26.2: type = where_expr %.Self [concrete = constants.%J_where.type] { @@ -2046,23 +2017,21 @@ fn F() { // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %u.patt: @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = value_param_pattern %u.patt, call_param0 -// CHECK:STDOUT: %return.patt: @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: %u.patt: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param_pattern %u.patt, call_param0 +// CHECK:STDOUT: %return.patt: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param_pattern %return.patt, call_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_17: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access %Self.as_wit.iface0.loc5_17, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %u.param: @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = value_param call_param0 -// CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access %Self.as_wit.iface0.loc5_11.2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %u.param: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param call_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] { +// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = return_slot %return.param +// CHECK:STDOUT: %u: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -2079,10 +2048,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %Self.as_wit.iface0.loc5_11.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.646)] +// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c)) -> @F.%impl.elem0.loc5_11.1 (%impl.elem0.d9c); +// CHECK:STDOUT: fn(%u.param: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f)) -> @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GenericCallFI32(%T.loc8_20.1: %J_where.type) { @@ -2091,18 +2060,18 @@ fn F() { // CHECK:STDOUT: %T.as_type.loc8_45.2: type = facet_access_type %T.loc8_20.2 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %T.as_type.loc8_45.2 [symbolic = %require_complete.loc8 (constants.%require_complete.3e7)] -// CHECK:STDOUT: %T.as_wit.iface0.loc26_11.2: = facet_access_witness %T.loc8_20.2, element0 [symbolic = %T.as_wit.iface0.loc26_11.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_45.2, (%T.as_wit.iface0.loc26_11.2) [symbolic = %J.facet (constants.%J.facet.869)] -// CHECK:STDOUT: %.loc26_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc26_11.2 (constants.%.861)] -// CHECK:STDOUT: %impl.elem1.loc26_11.2: @GenericCallFI32.%.loc26_11.2 (%.861) = impl_witness_access %T.as_wit.iface0.loc26_11.2, element1 [symbolic = %impl.elem1.loc26_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %impl.elem0.1: type = impl_witness_access %T.as_wit.iface0.loc26_11.2, element0 [symbolic = %impl.elem0.1 (constants.%impl.elem0.37e)] +// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %T.as_type.loc8_45.2 [symbolic = %require_complete.loc8 (constants.%require_complete.5de)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_20.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.bee)] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_45.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.487)] +// CHECK:STDOUT: %.loc26_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc26_11.2 (constants.%.9b0)] +// CHECK:STDOUT: %impl.elem1.loc26_11.2: @GenericCallFI32.%.loc26_11.2 (%.9b0) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %impl.elem0.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.1 (constants.%impl.elem0.db9)] // CHECK:STDOUT: %specific_impl_fn.loc26_11.2: = specific_impl_function %impl.elem1.loc26_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc26_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %require_complete.loc26_15: = require_complete_type %impl.elem0.1 [symbolic = %require_complete.loc26_15 (constants.%require_complete.8bd)] -// CHECK:STDOUT: %ImplicitAs.type.loc26_14.2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.1)> [symbolic = %ImplicitAs.type.loc26_14.2 (constants.%ImplicitAs.type.820)] -// CHECK:STDOUT: %require_complete.loc26_14: = require_complete_type %ImplicitAs.type.loc26_14.2 [symbolic = %require_complete.loc26_14 (constants.%require_complete.1ce)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.1) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.cb0)] -// CHECK:STDOUT: %assoc0: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.cb0) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.37d)] +// CHECK:STDOUT: %require_complete.loc26_15: = require_complete_type %impl.elem0.1 [symbolic = %require_complete.loc26_15 (constants.%require_complete.cfd)] +// CHECK:STDOUT: %ImplicitAs.type.loc26_14.2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.1)> [symbolic = %ImplicitAs.type.loc26_14.2 (constants.%ImplicitAs.type.7df)] +// CHECK:STDOUT: %require_complete.loc26_14: = require_complete_type %ImplicitAs.type.loc26_14.2 [symbolic = %require_complete.loc26_14 (constants.%require_complete.402)] +// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.1) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.c64)] +// CHECK:STDOUT: %assoc0: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.c64) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.965)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type)) -> %i32 { // CHECK:STDOUT: !entry: @@ -2110,15 +2079,14 @@ fn F() { // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc26_11.1: type = converted constants.%T, %T.as_type.loc26 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc26_11.1: = facet_access_witness constants.%T, element0 [symbolic = %T.as_wit.iface0.loc26_11.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem1.loc26_11.1: @GenericCallFI32.%.loc26_11.2 (%.861) = impl_witness_access %T.as_wit.iface0.loc26_11.1, element1 [symbolic = %impl.elem1.loc26_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %impl.elem1.loc26_11.1: @GenericCallFI32.%.loc26_11.2 (%.9b0) = impl_witness_access constants.%J.lookup_impl_witness.bee, element1 [symbolic = %impl.elem1.loc26_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %specific_impl_fn.loc26_11.1: = specific_impl_function %impl.elem1.loc26_11.1, @F(constants.%J.facet.869) [symbolic = %specific_impl_fn.loc26_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %ImplicitAs.type.loc26_14.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.37e)> [symbolic = %ImplicitAs.type.loc26_14.2 (constants.%ImplicitAs.type.820)] -// CHECK:STDOUT: %.loc26_14.1: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.cb0) = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%impl.elem0.37e) [symbolic = %assoc0 (constants.%assoc0.37d)] -// CHECK:STDOUT: %Convert.ref: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.cb0) = name_ref Convert, %.loc26_14.1 [symbolic = %assoc0 (constants.%assoc0.37d)] -// CHECK:STDOUT: %.loc26_14.2: @GenericCallFI32.%impl.elem0.1 (%impl.elem0.37e) = converted %int_2, [concrete = ] -// CHECK:STDOUT: %.loc26_15: init @GenericCallFI32.%impl.elem0.1 (%impl.elem0.37e) = call %specific_impl_fn.loc26_11.1() [concrete = ] +// CHECK:STDOUT: %specific_impl_fn.loc26_11.1: = specific_impl_function %impl.elem1.loc26_11.1, @F(constants.%J.facet.487) [symbolic = %specific_impl_fn.loc26_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %ImplicitAs.type.loc26_14.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.db9)> [symbolic = %ImplicitAs.type.loc26_14.2 (constants.%ImplicitAs.type.7df)] +// CHECK:STDOUT: %.loc26_14.1: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.c64) = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%impl.elem0.db9) [symbolic = %assoc0 (constants.%assoc0.965)] +// CHECK:STDOUT: %Convert.ref: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.c64) = name_ref Convert, %.loc26_14.1 [symbolic = %assoc0 (constants.%assoc0.965)] +// CHECK:STDOUT: %.loc26_14.2: @GenericCallFI32.%impl.elem0.1 (%impl.elem0.db9) = converted %int_2, [concrete = ] +// CHECK:STDOUT: %.loc26_15: init @GenericCallFI32.%impl.elem0.1 (%impl.elem0.db9) = call %specific_impl_fn.loc26_11.1() [concrete = ] // CHECK:STDOUT: %.loc26_16: %i32 = converted %.loc26_15, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2126,15 +2094,15 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self.ccd) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.521) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self.ccd) { // CHECK:STDOUT: %Self => constants.%Self.ccd -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.d9c +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.646 +// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.330) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericCallFI32(constants.%T) { // CHECK:STDOUT: %T.loc8_20.2 => constants.%T @@ -2142,10 +2110,10 @@ fn F() { // CHECK:STDOUT: %T.as_type.loc8_45.2 => constants.%T.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%J.facet.869) { -// CHECK:STDOUT: %Self => constants.%J.facet.869 -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.37e +// CHECK:STDOUT: specific @F(constants.%J.facet.487) { +// CHECK:STDOUT: %Self => constants.%J.facet.487 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.bee +// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.db9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@GenericCallFI32.%J.facet) {} @@ -2158,25 +2126,25 @@ fn F() { // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self.ccd, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085: %J.type = facet_value %Self.as_type.3df, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.646: = lookup_impl_witness %Self.ccd, @J [symbolic] +// CHECK:STDOUT: %J.facet.521: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.646) [symbolic] +// CHECK:STDOUT: %impl.elem0.11f: type = impl_witness_access %J.lookup_impl_witness.646, element0 [symbolic] // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %.Self: %J.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] -// CHECK:STDOUT: %J.facet.28c: %J.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.53a: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // 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: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [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.067: %J.type = facet_value %E, (%J.impl_witness) [concrete] +// CHECK:STDOUT: %F.type.b84: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.b07: %F.type.b84 = struct_value () [concrete] +// CHECK:STDOUT: %J.facet.bd9: %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] @@ -2209,23 +2177,21 @@ fn F() { // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] { -// CHECK:STDOUT: %u.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = binding_pattern u -// CHECK:STDOUT: %u.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = value_param_pattern %u.patt, call_param0 -// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: %u.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = binding_pattern u +// CHECK:STDOUT: %u.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param_pattern %u.patt, call_param0 +// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param_pattern %return.patt, call_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_17: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access %Self.as_wit.iface0.loc5_17, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = value_param call_param0 -// CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.2: = facet_access_witness @J.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access %Self.as_wit.iface0.loc5_11.2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] -// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param call_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] { +// CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] +// CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c) = return_slot %return.param +// CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -2241,7 +2207,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %.loc9_20 { -// CHECK:STDOUT: %F.decl: %F.type.e5e = fn_decl @F.2 [concrete = constants.%F.c81] { +// CHECK:STDOUT: %F.decl: %F.type.b84 = fn_decl @F.2 [concrete = constants.%F.b07] { // CHECK:STDOUT: %u.patt: = binding_pattern u // CHECK:STDOUT: %u.param_patt: = value_param_pattern %u.patt, call_param0 [concrete = ] // CHECK:STDOUT: %return.patt: = return_slot_pattern @@ -2274,8 +2240,7 @@ fn F() { // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.53a] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // 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: %.loc9_20: type = where_expr %.Self [concrete = constants.%J_where.type] { @@ -2298,10 +2263,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_11.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %Self.as_wit.iface0.loc5_11.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.d9c)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.646)] +// CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.d9c); +// CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%u.param: ) -> { @@ -2314,19 +2279,19 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self.ccd) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.521) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.ccd) { // CHECK:STDOUT: %Self => constants.%Self.ccd -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_11.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.d9c +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.646 +// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.28c) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.330) {} // CHECK:STDOUT: -// 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: specific @F.1(constants.%J.facet.bd9) { +// CHECK:STDOUT: %Self => constants.%J.facet.bd9 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2344,22 +2309,22 @@ fn F() { // CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, @J2.%F.decl [concrete] // CHECK:STDOUT: %.Self: %J2.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] -// CHECK:STDOUT: %J2.facet.afd: %J2.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: %J2.lookup_impl_witness: = lookup_impl_witness %.Self, @J2 [symbolic_self] +// CHECK:STDOUT: %J2.facet.e30: %J2.type = facet_value %.Self.as_type, (%J2.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J2.lookup_impl_witness, 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: %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.3a7: %J2.type = facet_value %empty_tuple.type, (%J2.impl_witness.245) [concrete] +// CHECK:STDOUT: %J2_where.type.9e1: type = facet_type <@J2 where %impl.elem0 = %empty_struct_type> [concrete] +// CHECK:STDOUT: %J2.impl_witness.1aa: = impl_witness file.%J2.impl_witness_table.loc22 [concrete] +// CHECK:STDOUT: %F.type.f40: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.214: %F.type.f40 = struct_value () [concrete] +// CHECK:STDOUT: %J2.facet.af8: %J2.type = facet_value %empty_tuple.type, (%J2.impl_witness.1aa) [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: %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.0d3: %J2.type = facet_value %C2, (%J2.impl_witness.5a2) [concrete] +// CHECK:STDOUT: %J2_where.type.df9: type = facet_type <@J2 where %impl.elem0 = %C2> [concrete] +// CHECK:STDOUT: %J2.impl_witness.774: = impl_witness file.%J2.impl_witness_table.loc31 [concrete] +// CHECK:STDOUT: %F.type.05d: type = fn_type @F.3 [concrete] +// CHECK:STDOUT: %F.bfa: %F.type.05d = struct_value () [concrete] +// CHECK:STDOUT: %J2.facet.eed: %J2.type = facet_value %C2, (%J2.impl_witness.774) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2377,7 +2342,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %J2.decl: type = interface_decl @J2 [concrete = constants.%J2.type] {} {} -// CHECK:STDOUT: impl_decl @impl.8b6 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.4e9 [concrete] {} { // CHECK:STDOUT: %.loc22_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc22_7.2: type = converted %.loc22_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type] @@ -2386,19 +2351,18 @@ fn F() { // CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc22_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc22_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc22_28.2: type = converted %.loc22_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc22_15: type = where_expr %.Self [concrete = constants.%J2_where.type.a84] { +// CHECK:STDOUT: %.loc22_15: type = where_expr %.Self [concrete = constants.%J2_where.type.9e1] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc22_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %J2.impl_witness_table.loc22 = impl_witness_table (%impl_witness_assoc_constant.loc22, ), @impl.4e9 [concrete] +// CHECK:STDOUT: %J2.impl_witness.loc22: = impl_witness %J2.impl_witness_table.loc22 [concrete = constants.%J2.impl_witness.1aa] // 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] {} { +// CHECK:STDOUT: impl_decl @impl.8b3 [concrete] {} { // CHECK:STDOUT: %C2.ref.loc31_6: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type] // CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -2406,15 +2370,14 @@ fn F() { // CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc31_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %C2.ref.loc31_27: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] -// CHECK:STDOUT: %.loc31_15: type = where_expr %.Self [concrete = constants.%J2_where.type.4f1] { +// CHECK:STDOUT: %.loc31_15: type = where_expr %.Self [concrete = constants.%J2_where.type.df9] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C2.ref.loc31_27 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %J2.impl_witness_table.loc31 = impl_witness_table (%impl_witness_assoc_constant.loc31, ), @impl.8b3 [concrete] +// CHECK:STDOUT: %J2.impl_witness.loc31: = impl_witness %J2.impl_witness_table.loc31 [concrete = constants.%J2.impl_witness.774] // CHECK:STDOUT: %impl_witness_assoc_constant.loc31: type = impl_witness_assoc_constant constants.%C2 [concrete = constants.%C2] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2458,8 +2421,8 @@ fn F() { // CHECK:STDOUT: assoc_const U2:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.8b6: %.loc22_7.2 as %.loc22_15 { -// CHECK:STDOUT: %F.decl: %F.type.aee = fn_decl @F.2 [concrete = constants.%F.243] { +// CHECK:STDOUT: impl @impl.4e9: %.loc22_7.2 as %.loc22_15 { +// CHECK:STDOUT: %F.decl: %F.type.f40 = fn_decl @F.2 [concrete = constants.%F.214] { // CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self // CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, call_param0 // CHECK:STDOUT: %z.patt: %empty_struct_type = binding_pattern z @@ -2470,7 +2433,7 @@ fn F() { // CHECK:STDOUT: %.loc23_31.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc23_31.2: type = converted %.loc23_31.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8b6.%.loc22_7.2 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4e9.%.loc22_7.2 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: %z.param: %empty_struct_type = value_param call_param1 // CHECK:STDOUT: %.loc23_24.1: type = splice_block %.loc23_24.3 [concrete = constants.%empty_struct_type] { @@ -2487,8 +2450,8 @@ fn F() { // CHECK:STDOUT: witness = file.%J2.impl_witness.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.3df: %C2.ref.loc31_6 as %.loc31_15 { -// CHECK:STDOUT: %F.decl: %F.type.ea3 = fn_decl @F.3 [concrete = constants.%F.81f] { +// CHECK:STDOUT: impl @impl.8b3: %C2.ref.loc31_6 as %.loc31_15 { +// CHECK:STDOUT: %F.decl: %F.type.05d = fn_decl @F.3 [concrete = constants.%F.bfa] { // CHECK:STDOUT: %self.patt: %C2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C2 = value_param_pattern %self.patt, call_param0 // CHECK:STDOUT: %z.patt: %C2 = binding_pattern z @@ -2498,7 +2461,7 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %C2.ref.loc32_30: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] // CHECK:STDOUT: %self.param: %C2 = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3df.%C2.ref.loc31_6 [concrete = constants.%C2] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8b3.%C2.ref.loc31_6 [concrete = constants.%C2] // CHECK:STDOUT: %self: %C2 = bind_name self, %self.param // CHECK:STDOUT: %z.param: %C2 = value_param call_param1 // CHECK:STDOUT: %C2.ref.loc32_23: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] @@ -2550,15 +2513,15 @@ fn F() { // CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U2(constants.%J2.facet.afd) {} +// CHECK:STDOUT: specific @U2(constants.%J2.facet.e30) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J2.facet.3a7) { -// CHECK:STDOUT: %Self => constants.%J2.facet.3a7 +// CHECK:STDOUT: specific @F.1(constants.%J2.facet.af8) { +// CHECK:STDOUT: %Self => constants.%J2.facet.af8 // CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%J2.facet.0d3) { -// CHECK:STDOUT: %Self => constants.%J2.facet.0d3 +// CHECK:STDOUT: specific @F.1(constants.%J2.facet.eed) { +// CHECK:STDOUT: %Self => constants.%J2.facet.eed // CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%C2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2570,25 +2533,25 @@ fn F() { // CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type @K [concrete] // CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.%V [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self, element0 [symbolic] -// CHECK:STDOUT: %K.facet.3e1: %K.type = facet_value %Self.as_type, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.c2f: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %K.lookup_impl_witness.da8: = lookup_impl_witness %Self, @K [symbolic] +// CHECK:STDOUT: %K.facet.589: %K.type = facet_value %Self.as_type, (%K.lookup_impl_witness.da8) [symbolic] +// CHECK:STDOUT: %impl.elem0.75d: type = impl_witness_access %K.lookup_impl_witness.da8, element0 [symbolic] // CHECK:STDOUT: %F.type.cf5: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F.06b: %F.type.cf5 = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, @K.%F.decl [concrete] // CHECK:STDOUT: %.Self: %K.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] -// CHECK:STDOUT: %K.facet.c18: %K.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.e09: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %K.lookup_impl_witness.eb2: = lookup_impl_witness %.Self, @K [symbolic_self] +// CHECK:STDOUT: %K.facet.b09: %K.type = facet_value %.Self.as_type, (%K.lookup_impl_witness.eb2) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.52c: type = impl_witness_access %K.lookup_impl_witness.eb2, 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: %K_where.type: type = facet_type <@K where %impl.elem0.52c = %struct_type.a> [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.a40: %K.type = facet_value %empty_tuple.type, (%K.impl_witness) [concrete] +// CHECK:STDOUT: %F.type.c52: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.5eb: %F.type.c52 = struct_value () [concrete] +// CHECK:STDOUT: %K.facet.77f: %K.type = facet_value %empty_tuple.type, (%K.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2614,8 +2577,7 @@ fn F() { // CHECK:STDOUT: %V.ref: %K.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.e09] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%K.lookup_impl_witness.eb2, element0 [symbolic_self = constants.%impl.elem0.52c] // CHECK:STDOUT: %.loc8_31.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_31.2: type = converted %.loc8_31.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete = constants.%struct_type.a] @@ -2636,14 +2598,13 @@ fn F() { // CHECK:STDOUT: %F.decl: %F.type.cf5 = fn_decl @F.1 [concrete = constants.%F.06b] { // CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0 -// CHECK:STDOUT: %v.patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f) = binding_pattern v -// CHECK:STDOUT: %v.param_patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f) = value_param_pattern %v.patt, call_param1 -// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f) = out_param_pattern %return.patt, call_param2 +// CHECK:STDOUT: %v.patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = binding_pattern v +// CHECK:STDOUT: %v.param_patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = value_param_pattern %v.patt, call_param1 +// CHECK:STDOUT: %return.patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = out_param_pattern %return.patt, call_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_29: = facet_access_witness @K.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access %Self.as_wit.iface0.loc5_29, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.c2f)] -// CHECK:STDOUT: %V.ref.loc5_29: type = name_ref V, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.c2f)] +// CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%K.lookup_impl_witness.da8, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)] +// CHECK:STDOUT: %V.ref.loc5_29: type = name_ref V, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] { // CHECK:STDOUT: %Self.ref: %K.type = name_ref Self, @K.%Self [symbolic = %Self (constants.%Self)] @@ -2651,15 +2612,14 @@ fn F() { // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param -// CHECK:STDOUT: %v.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f) = value_param call_param1 -// CHECK:STDOUT: %.loc5_23: type = splice_block %V.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.c2f)] { -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.2: = facet_access_witness @K.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access %Self.as_wit.iface0.loc5_23.2, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.c2f)] -// CHECK:STDOUT: %V.ref.loc5_23: type = name_ref V, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.c2f)] +// CHECK:STDOUT: %v.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = value_param call_param1 +// CHECK:STDOUT: %.loc5_23: type = splice_block %V.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)] { +// CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%K.lookup_impl_witness.da8, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)] +// CHECK:STDOUT: %V.ref.loc5_23: type = name_ref V, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f) = bind_name v, %v.param -// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f) = out_param call_param2 -// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f) = return_slot %return.param +// CHECK:STDOUT: %v: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = bind_name v, %v.param +// CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = out_param call_param2 +// CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -2675,7 +2635,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc8_7.2 as %.loc8_14 { -// CHECK:STDOUT: %F.decl: %F.type.894 = fn_decl @F.2 [concrete = constants.%F.62c] { +// CHECK:STDOUT: %F.decl: %F.type.c52 = fn_decl @F.2 [concrete = constants.%F.5eb] { // CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self // CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, call_param0 // CHECK:STDOUT: %v.patt: %struct_type.x = binding_pattern v @@ -2708,10 +2668,10 @@ fn F() { // CHECK:STDOUT: generic fn @F.1(@K.%Self: %K.type) { // CHECK:STDOUT: %Self: %K.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_23.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %Self.as_wit.iface0.loc5_23.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.c2f)] +// CHECK:STDOUT: %K.lookup_impl_witness: = lookup_impl_witness %Self, @K [symbolic = %K.lookup_impl_witness (constants.%K.lookup_impl_witness.da8)] +// CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %K.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type), %v.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f)) -> @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.c2f); +// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type), %v.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d)) -> @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%self.param: %empty_tuple.type, %v.param: %struct_type.x) -> %struct_type.x { @@ -2722,21 +2682,21 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @V(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%K.facet.3e1) {} +// CHECK:STDOUT: specific @V(constants.%K.facet.589) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.c2f +// CHECK:STDOUT: %K.lookup_impl_witness => constants.%K.lookup_impl_witness.da8 +// CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.75d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%K.facet.c18) {} +// CHECK:STDOUT: specific @V(constants.%K.facet.b09) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%K.facet.a40) { -// CHECK:STDOUT: %Self => constants.%K.facet.a40 +// CHECK:STDOUT: specific @F.1(constants.%K.facet.77f) { +// CHECK:STDOUT: %Self => constants.%K.facet.77f // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_23.1 => constants.%K.impl_witness +// CHECK:STDOUT: %K.lookup_impl_witness => constants.%K.impl_witness // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%struct_type.a // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2755,16 +2715,16 @@ fn F() { // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%G.decl [concrete] // CHECK:STDOUT: %.Self: %M.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] -// CHECK:STDOUT: %M.facet.407: %M.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self, @M [symbolic_self] +// CHECK:STDOUT: %M.facet.caa: %M.type = facet_value %.Self.as_type, (%M.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self] // 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: %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.713: %M.type = facet_value %empty_tuple.type, (%M.impl_witness) [concrete] +// CHECK:STDOUT: %G.type.8d1: type = fn_type @G.2 [concrete] +// CHECK:STDOUT: %G.bb3: %G.type.8d1 = struct_value () [concrete] +// CHECK:STDOUT: %M.facet.56b: %M.type = facet_value %empty_tuple.type, (%M.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2790,8 +2750,7 @@ fn F() { // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc8_32: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_33.1: %struct_type.b.347 = struct_literal (%.loc8_32) // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] @@ -2835,7 +2794,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc8_7.2 as %.loc8_14 { -// CHECK:STDOUT: %G.decl: %G.type.bf5 = fn_decl @G.2 [concrete = constants.%G.44e] { +// CHECK:STDOUT: %G.decl: %G.type.8d1 = fn_decl @G.2 [concrete = constants.%G.bb3] { // CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, call_param0 // CHECK:STDOUT: } { @@ -2859,13 +2818,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.%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: %M.facet: %M.type = facet_value constants.%empty_tuple.type, (constants.%M.impl_witness) [concrete = constants.%M.facet.56b] +// CHECK:STDOUT: %.loc10_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.56b] // 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.%M.impl_witness] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%struct] +// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access constants.%M.impl_witness, 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 // CHECK:STDOUT: } @@ -2874,11 +2832,11 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%M.facet.407) {} +// CHECK:STDOUT: specific @Z(constants.%M.facet.caa) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%M.facet.713) {} +// CHECK:STDOUT: specific @G.1(constants.%M.facet.56b) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%M.facet.713) {} +// CHECK:STDOUT: specific @Z(constants.%M.facet.56b) {} // CHECK:STDOUT: // CHECK:STDOUT: --- self_as_uses_correct_rewrite_constraint.carbon // CHECK:STDOUT: @@ -2902,24 +2860,24 @@ fn F() { // CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete] // CHECK:STDOUT: %.Self: %M.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] -// CHECK:STDOUT: %M.facet.407: %M.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self, @M [symbolic_self] +// CHECK:STDOUT: %M.facet.caa: %M.type = facet_value %.Self.as_type, (%M.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self] // 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: %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.601: %M.type = facet_value %C.7a7, (%M.impl_witness.e1e) [concrete] +// CHECK:STDOUT: %M_where.type.d04: type = facet_type <@M where %impl.elem0 = %struct.0f3> [concrete] +// CHECK:STDOUT: %M.impl_witness.baa: = impl_witness file.%M.impl_witness_table.loc10 [concrete] +// CHECK:STDOUT: %G.type.d92: type = fn_type @G.2 [concrete] +// CHECK:STDOUT: %G.eac: %G.type.d92 = struct_value () [concrete] +// CHECK:STDOUT: %M.facet.1dc: %M.type = facet_value %C.7a7, (%M.impl_witness.baa) [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: %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.887: %M.type = facet_value %C.3a0, (%M.impl_witness.902) [concrete] +// CHECK:STDOUT: %M_where.type.eda: type = facet_type <@M where %impl.elem0 = %struct.c94> [concrete] +// CHECK:STDOUT: %M.impl_witness.feb: = impl_witness file.%M.impl_witness_table.loc16 [concrete] +// CHECK:STDOUT: %G.type.b29: type = fn_type @G.3 [concrete] +// CHECK:STDOUT: %G.f3b: %G.type.b29 = struct_value () [concrete] +// CHECK:STDOUT: %M.facet.80d: %M.type = facet_value %C.3a0, (%M.impl_witness.feb) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2942,7 +2900,7 @@ fn F() { // CHECK:STDOUT: %T.loc3_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_9.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {} -// CHECK:STDOUT: impl_decl @impl.9c5 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.8b4 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %.loc10_9: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc10_10: type = converted %.loc10_9, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -2953,21 +2911,20 @@ fn F() { // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_35: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc10_36.1: %struct_type.b.347 = struct_literal (%.loc10_35) // CHECK:STDOUT: %.loc10_36.2: type = converted %.loc10_35, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc10_36.2) [concrete = constants.%struct.0f3] // CHECK:STDOUT: %.loc10_36.3: %struct_type.b.86f = converted %.loc10_36.1, %struct [concrete = constants.%struct.0f3] -// CHECK:STDOUT: %.loc10_17: type = where_expr %.Self [concrete = constants.%M_where.type.132] { +// CHECK:STDOUT: %.loc10_17: type = where_expr %.Self [concrete = constants.%M_where.type.d04] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_36.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %M.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10, @impl.8b4.%G.decl), @impl.8b4 [concrete] +// CHECK:STDOUT: %M.impl_witness.loc10: = impl_witness %M.impl_witness_table.loc10 [concrete = constants.%M.impl_witness.baa] // 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: impl_decl @impl.d97 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %.loc16_9: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc16_10: type = converted %.loc16_9, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -2978,19 +2935,18 @@ fn F() { // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc16_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc16_35: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc16_36.1: %struct_type.b.161 = struct_literal (%.loc16_35) // CHECK:STDOUT: %.loc16_36.2: type = converted %.loc16_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc16_36.2) [concrete = constants.%struct.c94] // CHECK:STDOUT: %.loc16_36.3: %struct_type.b.86f = converted %.loc16_36.1, %struct [concrete = constants.%struct.c94] -// CHECK:STDOUT: %.loc16_17: type = where_expr %.Self [concrete = constants.%M_where.type.363] { +// CHECK:STDOUT: %.loc16_17: type = where_expr %.Self [concrete = constants.%M_where.type.eda] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc16_36.3 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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: %M.impl_witness_table.loc16 = impl_witness_table (%impl_witness_assoc_constant.loc16, @impl.d97.%G.decl), @impl.d97 [concrete] +// CHECK:STDOUT: %M.impl_witness.loc16: = impl_witness %M.impl_witness_table.loc16 [concrete = constants.%M.impl_witness.feb] // 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: @@ -3019,8 +2975,8 @@ fn F() { // CHECK:STDOUT: assoc_const Z:! %struct_type.b.86f; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.9c5: %C as %.loc10_17 { -// CHECK:STDOUT: %G.decl: %G.type.160 = fn_decl @G.2 [concrete = constants.%G.fc4] { +// CHECK:STDOUT: impl @impl.8b4: %C as %.loc10_17 { +// CHECK:STDOUT: %G.decl: %G.type.d92 = fn_decl @G.2 [concrete = constants.%G.eac] { // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, call_param0 // CHECK:STDOUT: } { @@ -3034,8 +2990,8 @@ fn F() { // CHECK:STDOUT: witness = file.%M.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.f46: %C as %.loc16_17 { -// CHECK:STDOUT: %G.decl: %G.type.18e = fn_decl @G.3 [concrete = constants.%G.066] { +// CHECK:STDOUT: impl @impl.d97: %C as %.loc16_17 { +// CHECK:STDOUT: %G.decl: %G.type.b29 = fn_decl @G.3 [concrete = constants.%G.f3b] { // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, call_param0 // CHECK:STDOUT: } { @@ -3071,30 +3027,28 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G.2() -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9c5.%C [concrete = constants.%C.7a7] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8b4.%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.%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: %M.facet: %M.type = facet_value constants.%C.7a7, (constants.%M.impl_witness.baa) [concrete = constants.%M.facet.1dc] +// CHECK:STDOUT: %.loc12_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.1dc] // 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.%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: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.impl_witness.baa, 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 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G.3() -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.f46.%C [concrete = constants.%C.3a0] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.d97.%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.%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: %M.facet: %M.type = facet_value constants.%C.3a0, (constants.%M.impl_witness.feb) [concrete = constants.%M.facet.80d] +// CHECK:STDOUT: %.loc18_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.80d] // 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.%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: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.impl_witness.feb, 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 // CHECK:STDOUT: } @@ -3113,20 +3067,20 @@ fn F() { // CHECK:STDOUT: %T.patt.loc3_9.2 => constants.%T.patt // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%M.facet.407) {} +// CHECK:STDOUT: specific @Z(constants.%M.facet.caa) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%M.facet.601) {} +// CHECK:STDOUT: specific @G.1(constants.%M.facet.1dc) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%M.facet.601) {} +// CHECK:STDOUT: specific @Z(constants.%M.facet.1dc) {} // 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.887) {} +// CHECK:STDOUT: specific @G.1(constants.%M.facet.80d) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%M.facet.887) {} +// CHECK:STDOUT: specific @Z(constants.%M.facet.80d) {} // CHECK:STDOUT: // CHECK:STDOUT: --- associated_int_in_array.carbon // CHECK:STDOUT: @@ -3141,9 +3095,9 @@ fn F() { // CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self.826, element0 [symbolic] -// CHECK:STDOUT: %I.facet.335: %I.type = facet_value %Self.as_type.b70, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.ace: %i32 = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness.5d6: = lookup_impl_witness %Self.826, @I [symbolic] +// CHECK:STDOUT: %I.facet.93d: %I.type = facet_value %Self.as_type.b70, (%I.lookup_impl_witness.5d6) [symbolic] +// CHECK:STDOUT: %impl.elem0.fab: %i32 = impl_witness_access %I.lookup_impl_witness.5d6, 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: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (imports.%Core.import_ref.a5b), @impl.4f9 [concrete] @@ -3153,19 +3107,19 @@ fn F() { // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] -// CHECK:STDOUT: %Convert.bound.69c: = bound_method %impl.elem0.ace, %Convert.960 [symbolic] +// CHECK:STDOUT: %Convert.bound.44d: = bound_method %impl.elem0.fab, %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] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.37e(%impl.elem0.ace) [symbolic] -// CHECK:STDOUT: %array_type.a05: type = array_type %int.convert_checked, bool [symbolic] +// CHECK:STDOUT: %bound_method.81c: = bound_method %impl.elem0.fab, %Convert.specific_fn.8a8 [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.81c(%impl.elem0.fab) [symbolic] +// CHECK:STDOUT: %array_type.377: type = array_type %int.convert_checked, bool [symbolic] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%F.decl [concrete] // CHECK:STDOUT: %.Self: %I.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] -// CHECK:STDOUT: %I.facet.d87: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.0ad: %i32 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness.5f5: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness.5f5) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.d4d: %i32 = impl_witness_access %I.lookup_impl_witness.5f5, element0 [symbolic_self] // 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] @@ -3178,12 +3132,12 @@ fn F() { // 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: %I_where.type: type = facet_type <@I where %impl.elem0.d4d = %int_2.ef8> [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.194: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %F.type.2c7: type = fn_type @F.2 [concrete] +// CHECK:STDOUT: %F.0b4: %F.type.2c7 = struct_value () [concrete] +// CHECK:STDOUT: %I.facet.85d: %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] @@ -3211,7 +3165,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @impl.dd2 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.9a6 [concrete] {} { // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_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] @@ -3220,8 +3174,7 @@ fn F() { // CHECK:STDOUT: %N.ref: %I.assoc_type = name_ref N, @N.%assoc0 [concrete = constants.%assoc0.995] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// 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: %impl.elem0.loc8_20: %i32 = impl_witness_access constants.%I.lookup_impl_witness.5f5, element0 [symbolic_self = constants.%impl.elem0.d4d] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // 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] @@ -3234,7 +3187,7 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8_20, %.loc8_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// 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_table = impl_witness_table (%impl_witness_assoc_constant, @impl.9a6.%F.decl), @impl.9a6 [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: } @@ -3247,23 +3200,22 @@ fn F() { // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] { // CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70) = value_param_pattern %self.patt, call_param0 -// CHECK:STDOUT: %return.patt: @F.1.%array_type.loc5_38.1 (%array_type.a05) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%array_type.loc5_38.1 (%array_type.a05) = out_param_pattern %return.patt, call_param1 +// CHECK:STDOUT: %return.patt: @F.1.%array_type.loc5_38.1 (%array_type.377) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%array_type.loc5_38.1 (%array_type.377) = out_param_pattern %return.patt, call_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_37.2: = facet_access_witness @I.%Self, element0 [symbolic = %Self.as_wit.iface0.loc5_37.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_37.2: %i32 = impl_witness_access %Self.as_wit.iface0.loc5_37.2, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.ace)] -// 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: %impl.elem0.loc5_37.2: %i32 = impl_witness_access constants.%I.lookup_impl_witness.5d6, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.fab)] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %impl.elem0.loc5_37.2 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.fab)] // 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: %.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: %bound_method.loc5_37.2: = bound_method %N.ref, %impl.elem0.loc5_37.3 [symbolic = %Convert.bound (constants.%Convert.bound.44d)] // 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)] +// CHECK:STDOUT: %bound_method.loc5_37.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.81c)] // CHECK:STDOUT: %int.convert_checked.loc5_37.2: init Core.IntLiteral = call %bound_method.loc5_37.3(%N.ref) [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc5_37.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_37.2 [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc5_37.2: Core.IntLiteral = converted %N.ref, %.loc5_37.1 [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type.loc5_38.2: type = array_type %.loc5_37.2, %.loc5_31.2 [symbolic = %array_type.loc5_38.1 (constants.%array_type.a05)] +// CHECK:STDOUT: %array_type.loc5_38.2: type = array_type %.loc5_37.2, %.loc5_31.2 [symbolic = %array_type.loc5_38.1 (constants.%array_type.377)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)] { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] @@ -3271,8 +3223,8 @@ fn F() { // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.1.%array_type.loc5_38.1 (%array_type.a05) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.1.%array_type.loc5_38.1 (%array_type.a05) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.1.%array_type.loc5_38.1 (%array_type.377) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.1.%array_type.loc5_38.1 (%array_type.377) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: @@ -3287,8 +3239,8 @@ fn F() { // CHECK:STDOUT: assoc_const N:! %i32; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.dd2: %.loc8_7.2 as %.loc8_14 { -// CHECK:STDOUT: %F.decl: %F.type.925 = fn_decl @F.2 [concrete = constants.%F.2a6] { +// CHECK:STDOUT: impl @impl.9a6: %.loc8_7.2 as %.loc8_14 { +// CHECK:STDOUT: %F.decl: %F.type.2c7 = fn_decl @F.2 [concrete = constants.%F.0b4] { // CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self // CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, call_param0 // CHECK:STDOUT: %return.patt: %array_type.c9b = return_slot_pattern @@ -3300,7 +3252,7 @@ fn F() { // CHECK:STDOUT: %.loc9_31.2: type = converted %bool.make_type, %.loc9_31.1 [concrete = bool] // CHECK:STDOUT: %array_type: type = array_type %int_2, %.loc9_31.2 [concrete = constants.%array_type.c9b] // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.dd2.%.loc8_7.2 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9a6.%.loc8_7.2 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %array_type.c9b = out_param call_param1 // CHECK:STDOUT: %return: ref %array_type.c9b = return_slot %return.param @@ -3314,14 +3266,14 @@ fn F() { // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_37.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc5_37.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc5_37.1: %i32 = impl_witness_access %Self.as_wit.iface0.loc5_37.1, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.ace)] -// CHECK:STDOUT: %Convert.bound: = bound_method %impl.elem0.loc5_37.1, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound.69c)] -// CHECK:STDOUT: %bound_method.loc5_37.1: = bound_method %impl.elem0.loc5_37.1, constants.%Convert.specific_fn.8a8 [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.37e)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness.5d6)] +// CHECK:STDOUT: %impl.elem0.loc5_37.1: %i32 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.fab)] +// CHECK:STDOUT: %Convert.bound: = bound_method %impl.elem0.loc5_37.1, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound.44d)] +// CHECK:STDOUT: %bound_method.loc5_37.1: = bound_method %impl.elem0.loc5_37.1, constants.%Convert.specific_fn.8a8 [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.81c)] // CHECK:STDOUT: %int.convert_checked.loc5_37.1: init Core.IntLiteral = call %bound_method.loc5_37.1(%impl.elem0.loc5_37.1) [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type.loc5_38.1: type = array_type %int.convert_checked.loc5_37.1, bool [symbolic = %array_type.loc5_38.1 (constants.%array_type.a05)] +// CHECK:STDOUT: %array_type.loc5_38.1: type = array_type %int.convert_checked.loc5_37.1, bool [symbolic = %array_type.loc5_38.1 (constants.%array_type.377)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70)) -> @F.1.%array_type.loc5_38.1 (%array_type.a05); +// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70)) -> @F.1.%array_type.loc5_38.1 (%array_type.377); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%self.param: %empty_tuple.type) -> %return.param: %array_type.c9b { @@ -3342,25 +3294,25 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%Self.826) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%I.facet.335) {} +// CHECK:STDOUT: specific @N(constants.%I.facet.93d) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.826) { // CHECK:STDOUT: %Self => constants.%Self.826 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.b70 -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_37.1 => constants.%Self.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%impl.elem0.ace -// CHECK:STDOUT: %Convert.bound => constants.%Convert.bound.69c -// CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.37e +// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.5d6 +// CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%impl.elem0.fab +// CHECK:STDOUT: %Convert.bound => constants.%Convert.bound.44d +// CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.81c // CHECK:STDOUT: %int.convert_checked.loc5_37.1 => constants.%int.convert_checked -// CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.a05 +// CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.377 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%I.facet.d87) {} +// CHECK:STDOUT: specific @N(constants.%I.facet.74c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%I.facet.194) { -// CHECK:STDOUT: %Self => constants.%I.facet.194 +// CHECK:STDOUT: specific @F.1(constants.%I.facet.85d) { +// CHECK:STDOUT: %Self => constants.%I.facet.85d // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %Self.as_wit.iface0.loc5_37.1 => constants.%I.impl_witness +// CHECK:STDOUT: %I.lookup_impl_witness => 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 @@ -3385,19 +3337,19 @@ fn F() { // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %.Self: %Z.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] -// CHECK:STDOUT: %Z.facet.bf2: %Z.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: %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: %Z.impl_witness.07f: = impl_witness file.%Z.impl_witness_table, @impl(%T) [symbolic] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self, @Z [symbolic_self] +// CHECK:STDOUT: %Z.facet.2a2: %Z.type = facet_value %.Self.as_type, (%Z.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %Z_where.type.585: type = facet_type <@Z where %impl.elem0 = %C.f2e> [symbolic] +// CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type.585 [symbolic] +// CHECK:STDOUT: %Z.impl_witness.8bc: = 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: %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: %Z_where.type.1a6: type = facet_type <@Z where %impl.elem0 = %C.131> [concrete] +// CHECK:STDOUT: %complete_type.00b: = complete_type_witness %Z_where.type.1a6 [concrete] +// CHECK:STDOUT: %Z.impl_witness.19e: = impl_witness file.%Z.impl_witness_table, @impl(%D) [concrete] +// CHECK:STDOUT: %Z.facet.f2a: %Z.type = facet_value %D, (%Z.impl_witness.19e) [concrete] // CHECK:STDOUT: %C.val: %C.131 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3434,18 +3386,17 @@ fn F() { // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %T.ref.loc9_44: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: %C.loc9_45.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc9_45.2 (constants.%C.f2e)] -// CHECK:STDOUT: %.loc9_31: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.b30)] { +// CHECK:STDOUT: %.loc9_31: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.585)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.loc9_45.1 // 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: %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: %Z.impl_witness: = impl_witness %Z.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%Z.impl_witness (constants.%Z.impl_witness.8bc)] // 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: } @@ -3470,9 +3421,9 @@ fn F() { // CHECK:STDOUT: %T.loc9_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc9_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_14.2 (constants.%T.patt)] // 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: %Z_where.type: type = facet_type <@Z where constants.%impl.elem0 = %C.loc9_45.2> [symbolic = %Z_where.type (constants.%Z_where.type.585)] // CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete)] -// 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: %Z.impl_witness: = impl_witness file.%Z.impl_witness_table, @impl(%T.loc9_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.8bc)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -3524,10 +3475,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.%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: %Z.facet: %Z.type = facet_value constants.%D, (constants.%Z.impl_witness.19e) [concrete = constants.%Z.facet.f2a] +// CHECK:STDOUT: %.loc12_11.2: %Z.type = converted %D.ref.loc12_10, %Z.facet [concrete = constants.%Z.facet.f2a] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.19e, element0 [concrete = constants.%C.131] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %C.131 = bind_name a, %.loc12_23 // CHECK:STDOUT: return @@ -3540,15 +3490,15 @@ fn F() { // CHECK:STDOUT: %T.patt.loc6_9.2 => constants.%T.patt // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Z.facet.bf2) {} +// CHECK:STDOUT: specific @X(constants.%Z.facet.2a2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc9_14.2 => constants.%T.patt // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.f2e -// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.b30 +// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.585 // CHECK:STDOUT: %require_complete => constants.%require_complete -// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.07f +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.8bc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(@impl.%T.loc9_14.2) {} @@ -3559,9 +3509,9 @@ fn F() { // CHECK:STDOUT: %T.loc9_14.2 => constants.%D // CHECK:STDOUT: %T.patt.loc9_14.2 => constants.%T.patt // 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: %Z.impl_witness => constants.%Z.impl_witness.f74 +// CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.1a6 +// CHECK:STDOUT: %require_complete => constants.%complete_type.00b +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.19e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -3573,5 +3523,5 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Z.facet.6fe) {} +// CHECK:STDOUT: specific @X(constants.%Z.facet.f2a) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index 7f21e5a14588..d1a5807a12a3 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -66,9 +66,9 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %AccessGeneric: %AccessGeneric.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.6f3: = require_complete_type %Interface.type.d32 [symbolic] // CHECK:STDOUT: %I.as_type.59e: type = facet_access_type %I.a5f [symbolic] -// CHECK:STDOUT: %I.as_wit.iface0.82b: = facet_access_witness %I.a5f, element0 [symbolic] -// CHECK:STDOUT: %Interface.facet.687: %Interface.type.d32 = facet_value %I.as_type.59e, (%I.as_wit.iface0.82b) [symbolic] -// CHECK:STDOUT: %impl.elem0.94c: %T = impl_witness_access %I.as_wit.iface0.82b, element0 [symbolic] +// CHECK:STDOUT: %Interface.lookup_impl_witness.854: = lookup_impl_witness %I.a5f, @Interface, @Interface(%T) [symbolic] +// CHECK:STDOUT: %Interface.facet.e18: %Interface.type.d32 = facet_value %I.as_type.59e, (%Interface.lookup_impl_witness.854) [symbolic] +// CHECK:STDOUT: %impl.elem0.7b9: %T = impl_witness_access %Interface.lookup_impl_witness.854, element0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Interface.type.981: type = facet_type <@Interface, @Interface(%i32)> [concrete] @@ -82,9 +82,9 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.assoc_type.aaa: type = assoc_entity_type @Interface, @Interface(%i32) [concrete] // CHECK:STDOUT: %assoc0.69f: %Interface.assoc_type.aaa = assoc_entity element0, @Interface.%X [concrete] // CHECK:STDOUT: %I.as_type.ee6: type = facet_access_type %I.d08 [symbolic] -// CHECK:STDOUT: %I.as_wit.iface0.dd7: = facet_access_witness %I.d08, element0 [symbolic] -// CHECK:STDOUT: %Interface.facet.124: %Interface.type.981 = facet_value %I.as_type.ee6, (%I.as_wit.iface0.dd7) [symbolic] -// CHECK:STDOUT: %impl.elem0.e89: %i32 = impl_witness_access %I.as_wit.iface0.dd7, element0 [symbolic] +// CHECK:STDOUT: %Interface.lookup_impl_witness.a96: = lookup_impl_witness %I.d08, @Interface, @Interface(%i32) [symbolic] +// CHECK:STDOUT: %Interface.facet.06c: %Interface.type.981 = facet_value %I.as_type.ee6, (%Interface.lookup_impl_witness.a96) [symbolic] +// CHECK:STDOUT: %impl.elem0.e13: %i32 = impl_witness_access %Interface.lookup_impl_witness.a96, element0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -187,8 +187,8 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface, @Interface(%T.loc8_18.2) [symbolic = %Interface.assoc_type (constants.%Interface.assoc_type.0d9)] // CHECK:STDOUT: %assoc0: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = assoc_entity element0, @Interface.%X [symbolic = %assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: %I.as_type.loc9_11.2: type = facet_access_type %I.loc8_28.2 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] -// CHECK:STDOUT: %I.as_wit.iface0.loc9_11.2: = facet_access_witness %I.loc8_28.2, element0 [symbolic = %I.as_wit.iface0.loc9_11.2 (constants.%I.as_wit.iface0.82b)] -// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%T.loc8_18.2 (%T) = impl_witness_access %I.as_wit.iface0.loc9_11.2, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.94c)] +// CHECK:STDOUT: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc8_28.2, @Interface, @Interface(%T.loc8_18.2) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.854)] +// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%T.loc8_18.2 (%T) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] // CHECK:STDOUT: %require_complete.loc9_13: = require_complete_type %T.loc8_18.2 [symbolic = %require_complete.loc9_13 (constants.%require_complete.4ae)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @AccessGeneric.%T.loc8_18.2 (%T) { @@ -198,8 +198,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %X.ref: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = name_ref X, %.loc9_11.1 [symbolic = %assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: %I.as_type.loc9_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] // CHECK:STDOUT: %.loc9_11.2: type = converted %I.ref, %I.as_type.loc9_11.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] -// CHECK:STDOUT: %I.as_wit.iface0.loc9_11.1: = facet_access_witness %I.ref, element0 [symbolic = %I.as_wit.iface0.loc9_11.2 (constants.%I.as_wit.iface0.82b)] -// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%T.loc8_18.2 (%T) = impl_witness_access %I.as_wit.iface0.loc9_11.1, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.94c)] +// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%T.loc8_18.2 (%T) = impl_witness_access constants.%Interface.lookup_impl_witness.854, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] // CHECK:STDOUT: return %impl.elem0.loc9_11.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -210,8 +209,8 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc12_19.2 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.ee6)] -// CHECK:STDOUT: %I.as_wit.iface0.loc13_11.2: = facet_access_witness %I.loc12_19.2, element0 [symbolic = %I.as_wit.iface0.loc13_11.2 (constants.%I.as_wit.iface0.dd7)] -// CHECK:STDOUT: %impl.elem0.loc13_11.2: %i32 = impl_witness_access %I.as_wit.iface0.loc13_11.2, element0 [symbolic = %impl.elem0.loc13_11.2 (constants.%impl.elem0.e89)] +// CHECK:STDOUT: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc12_19.2, @Interface, @Interface(constants.%i32) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.a96)] +// CHECK:STDOUT: %impl.elem0.loc13_11.2: %i32 = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_11.2 (constants.%impl.elem0.e13)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: @@ -220,8 +219,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %X.ref: %Interface.assoc_type.aaa = name_ref X, %.loc13_11.1 [concrete = constants.%assoc0.69f] // CHECK:STDOUT: %I.as_type.loc13_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.ee6)] // CHECK:STDOUT: %.loc13_11.2: type = converted %I.ref, %I.as_type.loc13_11.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.ee6)] -// CHECK:STDOUT: %I.as_wit.iface0.loc13_11.1: = facet_access_witness %I.ref, element0 [symbolic = %I.as_wit.iface0.loc13_11.2 (constants.%I.as_wit.iface0.dd7)] -// CHECK:STDOUT: %impl.elem0.loc13_11.1: %i32 = impl_witness_access %I.as_wit.iface0.loc13_11.1, element0 [symbolic = %impl.elem0.loc13_11.2 (constants.%impl.elem0.e89)] +// CHECK:STDOUT: %impl.elem0.loc13_11.1: %i32 = impl_witness_access constants.%Interface.lookup_impl_witness.a96, element0 [symbolic = %impl.elem0.loc13_11.2 (constants.%impl.elem0.e13)] // CHECK:STDOUT: return %impl.elem0.loc13_11.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -254,7 +252,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface(@AccessGeneric.%T.loc8_18.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T, constants.%Interface.facet.687) { +// CHECK:STDOUT: specific @X(constants.%T, constants.%Interface.facet.e18) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } @@ -275,7 +273,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %I.patt.loc12_19.2 => constants.%I.patt.1f8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%i32, constants.%Interface.facet.124) { +// CHECK:STDOUT: specific @X(constants.%i32, constants.%Interface.facet.06c) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: } 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 5fd198a923ea..64af0f033713 100644 --- a/toolchain/check/testdata/interface/min_prelude/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/min_prelude/compound_member_access.carbon @@ -200,21 +200,21 @@ fn Works() { // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %J.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085e97.1: %J.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c3a6.1: type = impl_witness_access %T.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %S: %impl.elem0.d9c3a6.1 = bind_symbolic_name S, 1 [symbolic] -// CHECK:STDOUT: %S.patt: %impl.elem0.d9c3a6.1 = symbolic_binding_pattern S, 1 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.1: = lookup_impl_witness %T, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.1: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.1) [symbolic] +// CHECK:STDOUT: %impl.elem0.11fef0.1: type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic] +// CHECK:STDOUT: %S: %impl.elem0.11fef0.1 = bind_symbolic_name S, 1 [symbolic] +// CHECK:STDOUT: %S.patt: %impl.elem0.11fef0.1 = symbolic_binding_pattern S, 1 [symbolic] // CHECK:STDOUT: %Simple1.type: type = fn_type @Simple1 [concrete] // CHECK:STDOUT: %Simple1: %Simple1.type = struct_value () [concrete] // CHECK:STDOUT: %V: %J.type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: %J.type = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic] -// CHECK:STDOUT: %V.as_wit.iface0: = facet_access_witness %V, element0 [symbolic] -// CHECK:STDOUT: %J.facet.085e97.2: %J.type = facet_value %V.as_type, (%V.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0.d9c3a6.2: type = impl_witness_access %V.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %W: %impl.elem0.d9c3a6.2 = bind_symbolic_name W, 1 [symbolic] -// CHECK:STDOUT: %W.patt: %impl.elem0.d9c3a6.2 = symbolic_binding_pattern W, 1 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: = lookup_impl_witness %V, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %V.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic] +// CHECK:STDOUT: %impl.elem0.11fef0.2: type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic] +// CHECK:STDOUT: %W: %impl.elem0.11fef0.2 = bind_symbolic_name W, 1 [symbolic] +// CHECK:STDOUT: %W.patt: %impl.elem0.11fef0.2 = symbolic_binding_pattern W, 1 [symbolic] // CHECK:STDOUT: %Compound1.type: type = fn_type @Compound1 [concrete] // CHECK:STDOUT: %Compound1: %Compound1.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -236,34 +236,32 @@ fn Works() { // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} // CHECK:STDOUT: %Simple1.decl: %Simple1.type = fn_decl @Simple1 [concrete = constants.%Simple1] { // CHECK:STDOUT: %T.patt.loc8_12.1: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_12.2 (constants.%T.patt)] -// CHECK:STDOUT: %S.patt.loc8_19.1: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.d9c3a6.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_19.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.patt.loc8_19.1: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.11fef0.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_19.2 (constants.%S.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %T.loc8_12.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.2 (constants.%T)] -// CHECK:STDOUT: %.loc8_24.1: type = splice_block %impl.elem0.loc8_24.1 [symbolic = %impl.elem0.loc8_24.2 (constants.%impl.elem0.d9c3a6.1)] { +// CHECK:STDOUT: %.loc8_24.1: type = splice_block %impl.elem0.loc8_24.1 [symbolic = %impl.elem0.loc8_24.2 (constants.%impl.elem0.11fef0.1)] { // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc8_12.1 [symbolic = %T.loc8_12.2 (constants.%T)] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc8_24.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_24.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc8_24.2: type = converted %T.ref, %T.as_type.loc8_24.1 [symbolic = %T.as_type.loc8_24.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc8_24.1: = facet_access_witness %T.ref, element0 [symbolic = %T.as_wit.iface0.loc8_24.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc8_24.1: type = impl_witness_access %T.as_wit.iface0.loc8_24.1, element0 [symbolic = %impl.elem0.loc8_24.2 (constants.%impl.elem0.d9c3a6.1)] +// CHECK:STDOUT: %impl.elem0.loc8_24.1: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc8_24.2 (constants.%impl.elem0.11fef0.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %S.loc8_19.1: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.d9c3a6.1) = bind_symbolic_name S, 1 [symbolic = %S.loc8_19.2 (constants.%S)] +// CHECK:STDOUT: %S.loc8_19.1: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.11fef0.1) = bind_symbolic_name S, 1 [symbolic = %S.loc8_19.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %Compound1.decl: %Compound1.type = fn_decl @Compound1 [concrete = constants.%Compound1] { // CHECK:STDOUT: %V.patt.loc11_14.1: %J.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_14.2 (constants.%V.patt)] -// CHECK:STDOUT: %W.patt.loc11_21.1: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.d9c3a6.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_21.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc11_21.1: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.11fef0.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_21.2 (constants.%W.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref.loc11_18: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %V.loc11_14.1: %J.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)] -// CHECK:STDOUT: %.loc11: type = splice_block %impl.elem0.loc11_26.1 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0.d9c3a6.2)] { +// CHECK:STDOUT: %.loc11: type = splice_block %impl.elem0.loc11_26.1 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0.11fef0.2)] { // CHECK:STDOUT: %V.ref: %J.type = name_ref V, %V.loc11_14.1 [symbolic = %V.loc11_14.2 (constants.%V)] // CHECK:STDOUT: %J.ref.loc11_28: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %V.as_wit.iface0.loc11_26.1: = facet_access_witness %V.ref, element0 [symbolic = %V.as_wit.iface0.loc11_26.2 (constants.%V.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc11_26.1: type = impl_witness_access %V.as_wit.iface0.loc11_26.1, element0 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0.d9c3a6.2)] +// CHECK:STDOUT: %impl.elem0.loc11_26.1: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc11_21.1: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.d9c3a6.2) = bind_symbolic_name W, 1 [symbolic = %W.loc11_21.2 (constants.%W)] +// CHECK:STDOUT: %W.loc11_21.1: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.11fef0.2) = bind_symbolic_name W, 1 [symbolic = %W.loc11_21.2 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -283,14 +281,14 @@ fn Works() { // CHECK:STDOUT: assoc_const U:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Simple1(%T.loc8_12.1: %J.type, %S.loc8_19.1: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.d9c3a6.1)) { +// CHECK:STDOUT: generic fn @Simple1(%T.loc8_12.1: %J.type, %S.loc8_19.1: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.11fef0.1)) { // CHECK:STDOUT: %T.loc8_12.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_12.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_12.2 (constants.%T.patt)] // CHECK:STDOUT: %T.as_type.loc8_24.2: type = facet_access_type %T.loc8_12.2 [symbolic = %T.as_type.loc8_24.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc8_24.2: = facet_access_witness %T.loc8_12.2, element0 [symbolic = %T.as_wit.iface0.loc8_24.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc8_24.2: type = impl_witness_access %T.as_wit.iface0.loc8_24.2, element0 [symbolic = %impl.elem0.loc8_24.2 (constants.%impl.elem0.d9c3a6.1)] -// CHECK:STDOUT: %S.loc8_19.2: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.d9c3a6.1) = bind_symbolic_name S, 1 [symbolic = %S.loc8_19.2 (constants.%S)] -// CHECK:STDOUT: %S.patt.loc8_19.2: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.d9c3a6.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_19.2 (constants.%S.patt)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_12.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)] +// CHECK:STDOUT: %impl.elem0.loc8_24.2: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_24.2 (constants.%impl.elem0.11fef0.1)] +// CHECK:STDOUT: %S.loc8_19.2: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.11fef0.1) = bind_symbolic_name S, 1 [symbolic = %S.loc8_19.2 (constants.%S)] +// CHECK:STDOUT: %S.patt.loc8_19.2: @Simple1.%impl.elem0.loc8_24.2 (%impl.elem0.11fef0.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_19.2 (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -300,13 +298,13 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Compound1(%V.loc11_14.1: %J.type, %W.loc11_21.1: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.d9c3a6.2)) { +// CHECK:STDOUT: generic fn @Compound1(%V.loc11_14.1: %J.type, %W.loc11_21.1: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.11fef0.2)) { // CHECK:STDOUT: %V.loc11_14.2: %J.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)] // CHECK:STDOUT: %V.patt.loc11_14.2: %J.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_14.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.as_wit.iface0.loc11_26.2: = facet_access_witness %V.loc11_14.2, element0 [symbolic = %V.as_wit.iface0.loc11_26.2 (constants.%V.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc11_26.2: type = impl_witness_access %V.as_wit.iface0.loc11_26.2, element0 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0.d9c3a6.2)] -// CHECK:STDOUT: %W.loc11_21.2: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.d9c3a6.2) = bind_symbolic_name W, 1 [symbolic = %W.loc11_21.2 (constants.%W)] -// CHECK:STDOUT: %W.patt.loc11_21.2: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.d9c3a6.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_21.2 (constants.%W.patt)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %V.loc11_14.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0.11fef0.2)] +// CHECK:STDOUT: %W.loc11_21.2: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.11fef0.2) = bind_symbolic_name W, 1 [symbolic = %W.loc11_21.2 (constants.%W)] +// CHECK:STDOUT: %W.patt.loc11_21.2: @Compound1.%impl.elem0.loc11_26.2 (%impl.elem0.11fef0.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_21.2 (constants.%W.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -318,25 +316,25 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085e97.1) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple1(constants.%T, constants.%S) { // CHECK:STDOUT: %T.loc8_12.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_12.2 => constants.%T.patt // CHECK:STDOUT: %T.as_type.loc8_24.2 => constants.%T.as_type -// CHECK:STDOUT: %T.as_wit.iface0.loc8_24.2 => constants.%T.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc8_24.2 => constants.%impl.elem0.d9c3a6.1 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1 +// CHECK:STDOUT: %impl.elem0.loc8_24.2 => constants.%impl.elem0.11fef0.1 // CHECK:STDOUT: %S.loc8_19.2 => constants.%S // CHECK:STDOUT: %S.patt.loc8_19.2 => constants.%S.patt // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%J.facet.085e97.2) {} +// CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound1(constants.%V, constants.%W) { // CHECK:STDOUT: %V.loc11_14.2 => constants.%V // CHECK:STDOUT: %V.patt.loc11_14.2 => constants.%V.patt -// CHECK:STDOUT: %V.as_wit.iface0.loc11_26.2 => constants.%V.as_wit.iface0 -// CHECK:STDOUT: %impl.elem0.loc11_26.2 => constants.%impl.elem0.d9c3a6.2 +// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 +// CHECK:STDOUT: %impl.elem0.loc11_26.2 => constants.%impl.elem0.11fef0.2 // CHECK:STDOUT: %W.loc11_21.2 => constants.%W // CHECK:STDOUT: %W.patt.loc11_21.2 => constants.%W.patt // CHECK:STDOUT: } @@ -356,21 +354,21 @@ fn Works() { // CHECK:STDOUT: %Simple2.type: type = fn_type @Simple2 [concrete] // CHECK:STDOUT: %Simple2: %Simple2.type = struct_value () [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %K1.facet.07e9b4.1: %K1.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.d66c00.1: type = fn_type_with_self_type %Q1.type, %K1.facet.07e9b4.1 [symbolic] -// CHECK:STDOUT: %impl.elem0.d9a98e.1: %.d66c00.1 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.26c74d.1: = specific_impl_function %impl.elem0.d9a98e.1, @Q1(%K1.facet.07e9b4.1) [symbolic] +// CHECK:STDOUT: %K1.lookup_impl_witness.d8ae08.1: = lookup_impl_witness %T, @K1 [symbolic] +// CHECK:STDOUT: %K1.facet.9e06af.1: %K1.type = facet_value %T.as_type, (%K1.lookup_impl_witness.d8ae08.1) [symbolic] +// CHECK:STDOUT: %.484362.1: type = fn_type_with_self_type %Q1.type, %K1.facet.9e06af.1 [symbolic] +// CHECK:STDOUT: %impl.elem0.9661c0.1: %.484362.1 = impl_witness_access %K1.lookup_impl_witness.d8ae08.1, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.54474d.1: = specific_impl_function %impl.elem0.9661c0.1, @Q1(%K1.facet.9e06af.1) [symbolic] // CHECK:STDOUT: %V: %K1.type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: %K1.type = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %Compound2.type: type = fn_type @Compound2 [concrete] // CHECK:STDOUT: %Compound2: %Compound2.type = struct_value () [concrete] // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic] -// CHECK:STDOUT: %V.as_wit.iface0: = facet_access_witness %V, element0 [symbolic] -// CHECK:STDOUT: %K1.facet.07e9b4.2: %K1.type = facet_value %V.as_type, (%V.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.d66c00.2: type = fn_type_with_self_type %Q1.type, %K1.facet.07e9b4.2 [symbolic] -// CHECK:STDOUT: %impl.elem0.d9a98e.2: %.d66c00.2 = impl_witness_access %V.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.26c74d.2: = specific_impl_function %impl.elem0.d9a98e.2, @Q1(%K1.facet.07e9b4.2) [symbolic] +// CHECK:STDOUT: %K1.lookup_impl_witness.d8ae08.2: = lookup_impl_witness %V, @K1 [symbolic] +// CHECK:STDOUT: %K1.facet.9e06af.2: %K1.type = facet_value %V.as_type, (%K1.lookup_impl_witness.d8ae08.2) [symbolic] +// CHECK:STDOUT: %.484362.2: type = fn_type_with_self_type %Q1.type, %K1.facet.9e06af.2 [symbolic] +// CHECK:STDOUT: %impl.elem0.9661c0.2: %.484362.2 = impl_witness_access %K1.lookup_impl_witness.d8ae08.2, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.54474d.2: = specific_impl_function %impl.elem0.9661c0.2, @Q1(%K1.facet.9e06af.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -423,11 +421,11 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc9_4.2: type = facet_access_type %T.loc8_12.2 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_4.2: = facet_access_witness %T.loc8_12.2, element0 [symbolic = %T.as_wit.iface0.loc9_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %K1.facet: %K1.type = facet_value %T.as_type.loc9_4.2, (%T.as_wit.iface0.loc9_4.2) [symbolic = %K1.facet (constants.%K1.facet.07e9b4.1)] -// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%Q1.type, %K1.facet [symbolic = %.loc9_4.2 (constants.%.d66c00.1)] -// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple2.%.loc9_4.2 (%.d66c00.1) = impl_witness_access %T.as_wit.iface0.loc9_4.2, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.d9a98e.1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @Q1(%K1.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.26c74d.1)] +// CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %T.loc8_12.2, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.d8ae08.1)] +// CHECK:STDOUT: %K1.facet: %K1.type = facet_value %T.as_type.loc9_4.2, (%K1.lookup_impl_witness) [symbolic = %K1.facet (constants.%K1.facet.9e06af.1)] +// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%Q1.type, %K1.facet [symbolic = %.loc9_4.2 (constants.%.484362.1)] +// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple2.%.loc9_4.2 (%.484362.1) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.9661c0.1)] +// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @Q1(%K1.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.54474d.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -435,9 +433,8 @@ fn Works() { // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc9_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_4.1: type = converted %T.ref, %T.as_type.loc9_4.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_4.1: = facet_access_witness %T.ref, element0 [symbolic = %T.as_wit.iface0.loc9_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple2.%.loc9_4.2 (%.d66c00.1) = impl_witness_access %T.as_wit.iface0.loc9_4.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.d9a98e.1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @Q1(constants.%K1.facet.07e9b4.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.26c74d.1)] +// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple2.%.loc9_4.2 (%.484362.1) = impl_witness_access constants.%K1.lookup_impl_witness.d8ae08.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.9661c0.1)] +// CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @Q1(constants.%K1.facet.9e06af.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.54474d.1)] // CHECK:STDOUT: %.loc9_8: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -448,21 +445,20 @@ fn Works() { // CHECK:STDOUT: %V.patt.loc13_14.2: %K1.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_14.2 (constants.%V.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %V.as_wit.iface0.loc14_4.2: = facet_access_witness %V.loc13_14.2, element0 [symbolic = %V.as_wit.iface0.loc14_4.2 (constants.%V.as_wit.iface0)] +// CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %V.loc13_14.2, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.d8ae08.2)] // CHECK:STDOUT: %V.as_type: type = facet_access_type %V.loc13_14.2 [symbolic = %V.as_type (constants.%V.as_type)] -// CHECK:STDOUT: %K1.facet: %K1.type = facet_value %V.as_type, (%V.as_wit.iface0.loc14_4.2) [symbolic = %K1.facet (constants.%K1.facet.07e9b4.2)] -// CHECK:STDOUT: %.loc14_4: type = fn_type_with_self_type constants.%Q1.type, %K1.facet [symbolic = %.loc14_4 (constants.%.d66c00.2)] -// CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14_4 (%.d66c00.2) = impl_witness_access %V.as_wit.iface0.loc14_4.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.d9a98e.2)] -// CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @Q1(%K1.facet) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.26c74d.2)] +// CHECK:STDOUT: %K1.facet: %K1.type = facet_value %V.as_type, (%K1.lookup_impl_witness) [symbolic = %K1.facet (constants.%K1.facet.9e06af.2)] +// CHECK:STDOUT: %.loc14_4: type = fn_type_with_self_type constants.%Q1.type, %K1.facet [symbolic = %.loc14_4 (constants.%.484362.2)] +// CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14_4 (%.484362.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.9661c0.2)] +// CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @Q1(%K1.facet) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.54474d.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_14.1 [symbolic = %V.loc13_14.2 (constants.%V)] // CHECK:STDOUT: %K1.ref.loc14: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %V.as_wit.iface0.loc14_4.1: = facet_access_witness %V.ref, element0 [symbolic = %V.as_wit.iface0.loc14_4.2 (constants.%V.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14_4 (%.d66c00.2) = impl_witness_access %V.as_wit.iface0.loc14_4.1, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.d9a98e.2)] -// CHECK:STDOUT: %specific_impl_fn.loc14_4.1: = specific_impl_function %impl.elem0.loc14_4.1, @Q1(constants.%K1.facet.07e9b4.2) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.26c74d.2)] +// CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14_4 (%.484362.2) = impl_witness_access constants.%K1.lookup_impl_witness.d8ae08.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.9661c0.2)] +// CHECK:STDOUT: %specific_impl_fn.loc14_4.1: = specific_impl_function %impl.elem0.loc14_4.1, @Q1(constants.%K1.facet.9e06af.2) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.54474d.2)] // CHECK:STDOUT: %.loc14_13: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -475,7 +471,7 @@ fn Works() { // CHECK:STDOUT: %T.patt.loc8_12.2 => constants.%T.patt // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Q1(constants.%K1.facet.07e9b4.1) {} +// CHECK:STDOUT: specific @Q1(constants.%K1.facet.9e06af.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Q1(@Simple2.%K1.facet) {} // CHECK:STDOUT: @@ -484,7 +480,7 @@ fn Works() { // CHECK:STDOUT: %V.patt.loc13_14.2 => constants.%V.patt // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Q1(constants.%K1.facet.07e9b4.2) {} +// CHECK:STDOUT: specific @Q1(constants.%K1.facet.9e06af.2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Q1(@Compound2.%K1.facet) {} // CHECK:STDOUT: @@ -504,10 +500,10 @@ fn Works() { // CHECK:STDOUT: %Simple3.type: type = fn_type @Simple3 [concrete] // CHECK:STDOUT: %Simple3: %Simple3.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.022e81.1: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T.0ce, element0 [symbolic] -// CHECK:STDOUT: %K2.facet: %K2.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.75b: type = fn_type_with_self_type %Q2.type, %K2.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.75b = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %K2.lookup_impl_witness: = lookup_impl_witness %T.0ce, @K2 [symbolic] +// CHECK:STDOUT: %K2.facet: %K2.type = facet_value %T.as_type, (%K2.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.8de: type = fn_type_with_self_type %Q2.type, %K2.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.8de = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Q2(%K2.facet) [symbolic] // CHECK:STDOUT: %V: %K2.type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: %K2.type = symbolic_binding_pattern V, 0 [symbolic] @@ -669,10 +665,10 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_23.2 [symbolic = %require_complete (constants.%require_complete.022e81.1)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_4.2: = facet_access_witness %T.loc8_12.2, element0 [symbolic = %T.as_wit.iface0.loc9_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %K2.facet: %K2.type = facet_value %T.as_type.loc8_23.2, (%T.as_wit.iface0.loc9_4.2) [symbolic = %K2.facet (constants.%K2.facet)] -// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%Q2.type, %K2.facet [symbolic = %.loc9_4.2 (constants.%.75b)] -// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9_4.2 (%.75b) = impl_witness_access %T.as_wit.iface0.loc9_4.2, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %K2.lookup_impl_witness: = lookup_impl_witness %T.loc8_12.2, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)] +// CHECK:STDOUT: %K2.facet: %K2.type = facet_value %T.as_type.loc8_23.2, (%K2.lookup_impl_witness) [symbolic = %K2.facet (constants.%K2.facet)] +// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%Q2.type, %K2.facet [symbolic = %.loc9_4.2 (constants.%.8de)] +// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9_4.2 (%.8de) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @Q2(%K2.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Simple3.%T.as_type.loc8_23.2 (%T.as_type)) { @@ -681,8 +677,7 @@ fn Works() { // CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.d67] // CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type constants.%T.0ce [symbolic = %T.as_type.loc8_23.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_4.1: type = converted constants.%T.0ce, %T.as_type.loc9 [symbolic = %T.as_type.loc8_23.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc9_4.1: = facet_access_witness constants.%T.0ce, element0 [symbolic = %T.as_wit.iface0.loc9_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9_4.2 (%.75b) = impl_witness_access %T.as_wit.iface0.loc9_4.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9_4.2 (%.8de) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @Q2(constants.%K2.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc9_8: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() // CHECK:STDOUT: return @@ -804,15 +799,15 @@ fn Works() { // CHECK:STDOUT: %Simple4.type: type = fn_type @Simple4 [concrete] // CHECK:STDOUT: %Simple4: %Simple4.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.97cd40.1: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %L1.facet.4e6342.1: %L1.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.0c30d6.1: type = fn_type_with_self_type %R1.type, %L1.facet.4e6342.1 [symbolic] -// CHECK:STDOUT: %impl.elem0.b469d1.1: %.0c30d6.1 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.5798a5.1: = specific_impl_function %impl.elem0.b469d1.1, @R1(%L1.facet.4e6342.1) [symbolic] -// CHECK:STDOUT: %.e74b40.1: type = fn_type_with_self_type %S1.type, %L1.facet.4e6342.1 [symbolic] -// CHECK:STDOUT: %impl.elem1.094686.1: %.e74b40.1 = impl_witness_access %T.as_wit.iface0, element1 [symbolic] +// CHECK:STDOUT: %L1.lookup_impl_witness.0a136b.1: = lookup_impl_witness %T, @L1 [symbolic] +// CHECK:STDOUT: %L1.facet.ed78cc.1: %L1.type = facet_value %T.as_type, (%L1.lookup_impl_witness.0a136b.1) [symbolic] +// CHECK:STDOUT: %.3b7304.1: type = fn_type_with_self_type %R1.type, %L1.facet.ed78cc.1 [symbolic] +// CHECK:STDOUT: %impl.elem0.a7f881.1: %.3b7304.1 = impl_witness_access %L1.lookup_impl_witness.0a136b.1, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.f11365.1: = specific_impl_function %impl.elem0.a7f881.1, @R1(%L1.facet.ed78cc.1) [symbolic] +// CHECK:STDOUT: %.e9a411.1: type = fn_type_with_self_type %S1.type, %L1.facet.ed78cc.1 [symbolic] +// CHECK:STDOUT: %impl.elem1.a8c6e3.1: %.e9a411.1 = impl_witness_access %L1.lookup_impl_witness.0a136b.1, element1 [symbolic] // CHECK:STDOUT: %ptr.72f01d.2: type = ptr_type %T.as_type [symbolic] -// CHECK:STDOUT: %specific_impl_fn.e8e9e6.1: = specific_impl_function %impl.elem1.094686.1, @S1(%L1.facet.4e6342.1) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bbb82e.1: = specific_impl_function %impl.elem1.a8c6e3.1, @S1(%L1.facet.ed78cc.1) [symbolic] // CHECK:STDOUT: %require_complete.9326df.1: = require_complete_type %ptr.72f01d.2 [symbolic] // CHECK:STDOUT: %V: %L1.type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: %L1.type = symbolic_binding_pattern V, 0 [symbolic] @@ -820,15 +815,15 @@ fn Works() { // CHECK:STDOUT: %Compound4.type: type = fn_type @Compound4 [concrete] // CHECK:STDOUT: %Compound4: %Compound4.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.97cd40.2: = require_complete_type %V.as_type [symbolic] -// CHECK:STDOUT: %V.as_wit.iface0: = facet_access_witness %V, element0 [symbolic] -// CHECK:STDOUT: %L1.facet.4e6342.2: %L1.type = facet_value %V.as_type, (%V.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.0c30d6.2: type = fn_type_with_self_type %R1.type, %L1.facet.4e6342.2 [symbolic] -// CHECK:STDOUT: %impl.elem0.b469d1.2: %.0c30d6.2 = impl_witness_access %V.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.5798a5.2: = specific_impl_function %impl.elem0.b469d1.2, @R1(%L1.facet.4e6342.2) [symbolic] -// CHECK:STDOUT: %.e74b40.2: type = fn_type_with_self_type %S1.type, %L1.facet.4e6342.2 [symbolic] -// CHECK:STDOUT: %impl.elem1.094686.2: %.e74b40.2 = impl_witness_access %V.as_wit.iface0, element1 [symbolic] +// CHECK:STDOUT: %L1.lookup_impl_witness.0a136b.2: = lookup_impl_witness %V, @L1 [symbolic] +// CHECK:STDOUT: %L1.facet.ed78cc.2: %L1.type = facet_value %V.as_type, (%L1.lookup_impl_witness.0a136b.2) [symbolic] +// CHECK:STDOUT: %.3b7304.2: type = fn_type_with_self_type %R1.type, %L1.facet.ed78cc.2 [symbolic] +// CHECK:STDOUT: %impl.elem0.a7f881.2: %.3b7304.2 = impl_witness_access %L1.lookup_impl_witness.0a136b.2, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.f11365.2: = specific_impl_function %impl.elem0.a7f881.2, @R1(%L1.facet.ed78cc.2) [symbolic] +// CHECK:STDOUT: %.e9a411.2: type = fn_type_with_self_type %S1.type, %L1.facet.ed78cc.2 [symbolic] +// CHECK:STDOUT: %impl.elem1.a8c6e3.2: %.e9a411.2 = impl_witness_access %L1.lookup_impl_witness.0a136b.2, element1 [symbolic] // CHECK:STDOUT: %ptr.72f01d.3: type = ptr_type %V.as_type [symbolic] -// CHECK:STDOUT: %specific_impl_fn.e8e9e6.2: = specific_impl_function %impl.elem1.094686.2, @S1(%L1.facet.4e6342.2) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bbb82e.2: = specific_impl_function %impl.elem1.a8c6e3.2, @S1(%L1.facet.ed78cc.2) [symbolic] // CHECK:STDOUT: %require_complete.9326df.2: = require_complete_type %ptr.72f01d.3 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -939,14 +934,14 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.as_type.loc9_23.2 [symbolic = %require_complete.loc9 (constants.%require_complete.97cd40.1)] -// CHECK:STDOUT: %T.as_wit.iface0.loc10_4.2: = facet_access_witness %T.loc9_12.2, element0 [symbolic = %T.as_wit.iface0.loc10_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %L1.facet: %L1.type = facet_value %T.as_type.loc9_23.2, (%T.as_wit.iface0.loc10_4.2) [symbolic = %L1.facet (constants.%L1.facet.4e6342.1)] -// CHECK:STDOUT: %.loc10_4.2: type = fn_type_with_self_type constants.%R1.type, %L1.facet [symbolic = %.loc10_4.2 (constants.%.0c30d6.1)] -// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10_4.2 (%.0c30d6.1) = impl_witness_access %T.as_wit.iface0.loc10_4.2, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.b469d1.1)] -// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @R1(%L1.facet) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.5798a5.1)] -// CHECK:STDOUT: %.loc12_8.2: type = fn_type_with_self_type constants.%S1.type, %L1.facet [symbolic = %.loc12_8.2 (constants.%.e74b40.1)] -// CHECK:STDOUT: %impl.elem1.loc12_8.2: @Simple4.%.loc12_8.2 (%.e74b40.1) = impl_witness_access %T.as_wit.iface0.loc10_4.2, element1 [symbolic = %impl.elem1.loc12_8.2 (constants.%impl.elem1.094686.1)] -// CHECK:STDOUT: %specific_impl_fn.loc12_8.2: = specific_impl_function %impl.elem1.loc12_8.2, @S1(%L1.facet) [symbolic = %specific_impl_fn.loc12_8.2 (constants.%specific_impl_fn.e8e9e6.1)] +// CHECK:STDOUT: %L1.lookup_impl_witness: = lookup_impl_witness %T.loc9_12.2, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.0a136b.1)] +// CHECK:STDOUT: %L1.facet: %L1.type = facet_value %T.as_type.loc9_23.2, (%L1.lookup_impl_witness) [symbolic = %L1.facet (constants.%L1.facet.ed78cc.1)] +// CHECK:STDOUT: %.loc10_4.2: type = fn_type_with_self_type constants.%R1.type, %L1.facet [symbolic = %.loc10_4.2 (constants.%.3b7304.1)] +// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10_4.2 (%.3b7304.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.a7f881.1)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @R1(%L1.facet) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.f11365.1)] +// CHECK:STDOUT: %.loc12_8.2: type = fn_type_with_self_type constants.%S1.type, %L1.facet [symbolic = %.loc12_8.2 (constants.%.e9a411.1)] +// CHECK:STDOUT: %impl.elem1.loc12_8.2: @Simple4.%.loc12_8.2 (%.e9a411.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc12_8.2 (constants.%impl.elem1.a8c6e3.1)] +// CHECK:STDOUT: %specific_impl_fn.loc12_8.2: = specific_impl_function %impl.elem1.loc12_8.2, @S1(%L1.facet) [symbolic = %specific_impl_fn.loc12_8.2 (constants.%specific_impl_fn.bbb82e.1)] // CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_23.2 [symbolic = %ptr (constants.%ptr.72f01d.2)] // CHECK:STDOUT: %require_complete.loc12: = require_complete_type %ptr [symbolic = %require_complete.loc12 (constants.%require_complete.9326df.1)] // CHECK:STDOUT: @@ -956,10 +951,9 @@ fn Works() { // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type constants.%T [symbolic = %T.as_type.loc9_23.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc10_4.1: type = converted constants.%T, %T.as_type.loc10 [symbolic = %T.as_type.loc9_23.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc10_4.1: = facet_access_witness constants.%T, element0 [symbolic = %T.as_wit.iface0.loc10_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10_4.2 (%.0c30d6.1) = impl_witness_access %T.as_wit.iface0.loc10_4.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.b469d1.1)] +// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10_4.2 (%.3b7304.1) = impl_witness_access constants.%L1.lookup_impl_witness.0a136b.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.a7f881.1)] // CHECK:STDOUT: %bound_method.loc10_4: = bound_method %x.ref.loc10, %impl.elem0.loc10_4.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @R1(constants.%L1.facet.4e6342.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.5798a5.1)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @R1(constants.%L1.facet.ed78cc.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.f11365.1)] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %x.ref.loc10, %specific_impl_fn.loc10_4.1 // CHECK:STDOUT: %.loc10_8: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref.loc10) // CHECK:STDOUT: name_binding_decl { @@ -979,10 +973,9 @@ fn Works() { // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc12: type = facet_access_type constants.%T [symbolic = %T.as_type.loc9_23.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc12_8.1: type = converted constants.%T, %T.as_type.loc12 [symbolic = %T.as_type.loc9_23.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc12: = facet_access_witness constants.%T, element0 [symbolic = %T.as_wit.iface0.loc10_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem1.loc12_8.1: @Simple4.%.loc12_8.2 (%.e74b40.1) = impl_witness_access %T.as_wit.iface0.loc12, element1 [symbolic = %impl.elem1.loc12_8.2 (constants.%impl.elem1.094686.1)] +// CHECK:STDOUT: %impl.elem1.loc12_8.1: @Simple4.%.loc12_8.2 (%.e9a411.1) = impl_witness_access constants.%L1.lookup_impl_witness.0a136b.1, element1 [symbolic = %impl.elem1.loc12_8.2 (constants.%impl.elem1.a8c6e3.1)] // CHECK:STDOUT: %bound_method.loc12_8: = bound_method %xcopy.ref, %impl.elem1.loc12_8.1 -// CHECK:STDOUT: %specific_impl_fn.loc12_8.1: = specific_impl_function %impl.elem1.loc12_8.1, @S1(constants.%L1.facet.4e6342.1) [symbolic = %specific_impl_fn.loc12_8.2 (constants.%specific_impl_fn.e8e9e6.1)] +// CHECK:STDOUT: %specific_impl_fn.loc12_8.1: = specific_impl_function %impl.elem1.loc12_8.1, @S1(constants.%L1.facet.ed78cc.1) [symbolic = %specific_impl_fn.loc12_8.2 (constants.%specific_impl_fn.bbb82e.1)] // CHECK:STDOUT: %bound_method.loc12_12: = bound_method %xcopy.ref, %specific_impl_fn.loc12_8.1 // CHECK:STDOUT: %addr: @Simple4.%ptr (%ptr.72f01d.2) = addr_of %xcopy.ref // CHECK:STDOUT: %.loc12_12: init %empty_tuple.type = call %bound_method.loc12_12(%addr) @@ -997,14 +990,14 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc16: = require_complete_type %V.as_type.loc16_25.2 [symbolic = %require_complete.loc16 (constants.%require_complete.97cd40.2)] -// CHECK:STDOUT: %V.as_wit.iface0.loc17_4.2: = facet_access_witness %V.loc16_14.2, element0 [symbolic = %V.as_wit.iface0.loc17_4.2 (constants.%V.as_wit.iface0)] -// CHECK:STDOUT: %L1.facet: %L1.type = facet_value %V.as_type.loc16_25.2, (%V.as_wit.iface0.loc17_4.2) [symbolic = %L1.facet (constants.%L1.facet.4e6342.2)] -// CHECK:STDOUT: %.loc17_4: type = fn_type_with_self_type constants.%R1.type, %L1.facet [symbolic = %.loc17_4 (constants.%.0c30d6.2)] -// CHECK:STDOUT: %impl.elem0.loc17_4.2: @Compound4.%.loc17_4 (%.0c30d6.2) = impl_witness_access %V.as_wit.iface0.loc17_4.2, element0 [symbolic = %impl.elem0.loc17_4.2 (constants.%impl.elem0.b469d1.2)] -// CHECK:STDOUT: %specific_impl_fn.loc17_4.2: = specific_impl_function %impl.elem0.loc17_4.2, @R1(%L1.facet) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.5798a5.2)] -// CHECK:STDOUT: %.loc19_8: type = fn_type_with_self_type constants.%S1.type, %L1.facet [symbolic = %.loc19_8 (constants.%.e74b40.2)] -// CHECK:STDOUT: %impl.elem1.loc19_8.2: @Compound4.%.loc19_8 (%.e74b40.2) = impl_witness_access %V.as_wit.iface0.loc17_4.2, element1 [symbolic = %impl.elem1.loc19_8.2 (constants.%impl.elem1.094686.2)] -// CHECK:STDOUT: %specific_impl_fn.loc19_8.2: = specific_impl_function %impl.elem1.loc19_8.2, @S1(%L1.facet) [symbolic = %specific_impl_fn.loc19_8.2 (constants.%specific_impl_fn.e8e9e6.2)] +// CHECK:STDOUT: %L1.lookup_impl_witness: = lookup_impl_witness %V.loc16_14.2, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.0a136b.2)] +// CHECK:STDOUT: %L1.facet: %L1.type = facet_value %V.as_type.loc16_25.2, (%L1.lookup_impl_witness) [symbolic = %L1.facet (constants.%L1.facet.ed78cc.2)] +// CHECK:STDOUT: %.loc17_4: type = fn_type_with_self_type constants.%R1.type, %L1.facet [symbolic = %.loc17_4 (constants.%.3b7304.2)] +// CHECK:STDOUT: %impl.elem0.loc17_4.2: @Compound4.%.loc17_4 (%.3b7304.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_4.2 (constants.%impl.elem0.a7f881.2)] +// CHECK:STDOUT: %specific_impl_fn.loc17_4.2: = specific_impl_function %impl.elem0.loc17_4.2, @R1(%L1.facet) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.f11365.2)] +// CHECK:STDOUT: %.loc19_8: type = fn_type_with_self_type constants.%S1.type, %L1.facet [symbolic = %.loc19_8 (constants.%.e9a411.2)] +// CHECK:STDOUT: %impl.elem1.loc19_8.2: @Compound4.%.loc19_8 (%.e9a411.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc19_8.2 (constants.%impl.elem1.a8c6e3.2)] +// CHECK:STDOUT: %specific_impl_fn.loc19_8.2: = specific_impl_function %impl.elem1.loc19_8.2, @S1(%L1.facet) [symbolic = %specific_impl_fn.loc19_8.2 (constants.%specific_impl_fn.bbb82e.2)] // CHECK:STDOUT: %ptr: type = ptr_type %V.as_type.loc16_25.2 [symbolic = %ptr (constants.%ptr.72f01d.3)] // CHECK:STDOUT: %require_complete.loc19: = require_complete_type %ptr [symbolic = %require_complete.loc19 (constants.%require_complete.9326df.2)] // CHECK:STDOUT: @@ -1013,10 +1006,9 @@ fn Works() { // CHECK:STDOUT: %y.ref.loc17: @Compound4.%V.as_type.loc16_25.2 (%V.as_type) = name_ref y, %y // CHECK:STDOUT: %L1.ref.loc17: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %V.as_wit.iface0.loc17_4.1: = facet_access_witness constants.%V, element0 [symbolic = %V.as_wit.iface0.loc17_4.2 (constants.%V.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc17_4.1: @Compound4.%.loc17_4 (%.0c30d6.2) = impl_witness_access %V.as_wit.iface0.loc17_4.1, element0 [symbolic = %impl.elem0.loc17_4.2 (constants.%impl.elem0.b469d1.2)] +// CHECK:STDOUT: %impl.elem0.loc17_4.1: @Compound4.%.loc17_4 (%.3b7304.2) = impl_witness_access constants.%L1.lookup_impl_witness.0a136b.2, element0 [symbolic = %impl.elem0.loc17_4.2 (constants.%impl.elem0.a7f881.2)] // CHECK:STDOUT: %bound_method.loc17_4: = bound_method %y.ref.loc17, %impl.elem0.loc17_4.1 -// CHECK:STDOUT: %specific_impl_fn.loc17_4.1: = specific_impl_function %impl.elem0.loc17_4.1, @R1(constants.%L1.facet.4e6342.2) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.5798a5.2)] +// CHECK:STDOUT: %specific_impl_fn.loc17_4.1: = specific_impl_function %impl.elem0.loc17_4.1, @R1(constants.%L1.facet.ed78cc.2) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.f11365.2)] // CHECK:STDOUT: %bound_method.loc17_13: = bound_method %y.ref.loc17, %specific_impl_fn.loc17_4.1 // CHECK:STDOUT: %.loc17_13: init %empty_tuple.type = call %bound_method.loc17_13(%y.ref.loc17) // CHECK:STDOUT: name_binding_decl { @@ -1035,10 +1027,9 @@ fn Works() { // CHECK:STDOUT: %ycopy.ref: ref @Compound4.%V.as_type.loc16_25.2 (%V.as_type) = name_ref ycopy, %ycopy // CHECK:STDOUT: %L1.ref.loc19: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %V.as_wit.iface0.loc19: = facet_access_witness constants.%V, element0 [symbolic = %V.as_wit.iface0.loc17_4.2 (constants.%V.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem1.loc19_8.1: @Compound4.%.loc19_8 (%.e74b40.2) = impl_witness_access %V.as_wit.iface0.loc19, element1 [symbolic = %impl.elem1.loc19_8.2 (constants.%impl.elem1.094686.2)] +// CHECK:STDOUT: %impl.elem1.loc19_8.1: @Compound4.%.loc19_8 (%.e9a411.2) = impl_witness_access constants.%L1.lookup_impl_witness.0a136b.2, element1 [symbolic = %impl.elem1.loc19_8.2 (constants.%impl.elem1.a8c6e3.2)] // CHECK:STDOUT: %bound_method.loc19_8: = bound_method %ycopy.ref, %impl.elem1.loc19_8.1 -// CHECK:STDOUT: %specific_impl_fn.loc19_8.1: = specific_impl_function %impl.elem1.loc19_8.1, @S1(constants.%L1.facet.4e6342.2) [symbolic = %specific_impl_fn.loc19_8.2 (constants.%specific_impl_fn.e8e9e6.2)] +// CHECK:STDOUT: %specific_impl_fn.loc19_8.1: = specific_impl_function %impl.elem1.loc19_8.1, @S1(constants.%L1.facet.ed78cc.2) [symbolic = %specific_impl_fn.loc19_8.2 (constants.%specific_impl_fn.bbb82e.2)] // CHECK:STDOUT: %bound_method.loc19_17: = bound_method %ycopy.ref, %specific_impl_fn.loc19_8.1 // CHECK:STDOUT: %addr: @Compound4.%ptr (%ptr.72f01d.3) = addr_of %ycopy.ref // CHECK:STDOUT: %.loc19_17: init %empty_tuple.type = call %bound_method.loc19_17(%addr) @@ -1063,13 +1054,13 @@ fn Works() { // CHECK:STDOUT: %T.as_type.loc9_23.2 => constants.%T.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @R1(constants.%L1.facet.4e6342.1) { -// CHECK:STDOUT: %Self => constants.%L1.facet.4e6342.1 +// CHECK:STDOUT: specific @R1(constants.%L1.facet.ed78cc.1) { +// CHECK:STDOUT: %Self => constants.%L1.facet.ed78cc.1 // CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%T.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @S1(constants.%L1.facet.4e6342.1) { -// CHECK:STDOUT: %Self => constants.%L1.facet.4e6342.1 +// CHECK:STDOUT: specific @S1(constants.%L1.facet.ed78cc.1) { +// CHECK:STDOUT: %Self => constants.%L1.facet.ed78cc.1 // CHECK:STDOUT: %Self.as_type.loc5_24.1 => constants.%T.as_type // CHECK:STDOUT: %ptr.loc5_24.1 => constants.%ptr.72f01d.2 // CHECK:STDOUT: } @@ -1084,13 +1075,13 @@ fn Works() { // CHECK:STDOUT: %V.as_type.loc16_25.2 => constants.%V.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @R1(constants.%L1.facet.4e6342.2) { -// CHECK:STDOUT: %Self => constants.%L1.facet.4e6342.2 +// CHECK:STDOUT: specific @R1(constants.%L1.facet.ed78cc.2) { +// CHECK:STDOUT: %Self => constants.%L1.facet.ed78cc.2 // CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%V.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @S1(constants.%L1.facet.4e6342.2) { -// CHECK:STDOUT: %Self => constants.%L1.facet.4e6342.2 +// CHECK:STDOUT: specific @S1(constants.%L1.facet.ed78cc.2) { +// CHECK:STDOUT: %Self => constants.%L1.facet.ed78cc.2 // CHECK:STDOUT: %Self.as_type.loc5_24.1 => constants.%V.as_type // CHECK:STDOUT: %ptr.loc5_24.1 => constants.%ptr.72f01d.3 // CHECK:STDOUT: } @@ -1119,15 +1110,15 @@ fn Works() { // CHECK:STDOUT: %Simple5.type: type = fn_type @Simple5 [concrete] // CHECK:STDOUT: %Simple5: %Simple5.type = struct_value () [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %L2.facet: %L2.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.f52: type = fn_type_with_self_type %R2.type, %L2.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.f52 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.298: = specific_impl_function %impl.elem0, @R2(%L2.facet) [symbolic] -// CHECK:STDOUT: %.f66: type = fn_type_with_self_type %S2.type, %L2.facet [symbolic] -// CHECK:STDOUT: %impl.elem1: %.f66 = impl_witness_access %T.as_wit.iface0, element1 [symbolic] +// CHECK:STDOUT: %L2.lookup_impl_witness: = lookup_impl_witness %T, @L2 [symbolic] +// CHECK:STDOUT: %L2.facet: %L2.type = facet_value %T.as_type, (%L2.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.c42: type = fn_type_with_self_type %R2.type, %L2.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.c42 = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.7ee: = specific_impl_function %impl.elem0, @R2(%L2.facet) [symbolic] +// CHECK:STDOUT: %.7f6: type = fn_type_with_self_type %S2.type, %L2.facet [symbolic] +// CHECK:STDOUT: %impl.elem1: %.7f6 = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic] // CHECK:STDOUT: %ptr.f3e54b.2: type = ptr_type %T.as_type [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b32: = specific_impl_function %impl.elem1, @S2(%L2.facet) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.b69: = specific_impl_function %impl.elem1, @S2(%L2.facet) [symbolic] // CHECK:STDOUT: %V: %L2.type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: %L2.type = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %Compound5.type: type = fn_type @Compound5 [concrete] @@ -1222,14 +1213,14 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc18_4.2: type = facet_access_type %T.loc10_12.2 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc18_4.2: = facet_access_witness %T.loc10_12.2, element0 [symbolic = %T.as_wit.iface0.loc18_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %L2.facet: %L2.type = facet_value %T.as_type.loc18_4.2, (%T.as_wit.iface0.loc18_4.2) [symbolic = %L2.facet (constants.%L2.facet)] -// CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type constants.%R2.type, %L2.facet [symbolic = %.loc18_4.2 (constants.%.f52)] -// CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.f52) = impl_witness_access %T.as_wit.iface0.loc18_4.2, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc18_4.2: = specific_impl_function %impl.elem0.loc18_4.2, @R2(%L2.facet) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.298)] -// CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type constants.%S2.type, %L2.facet [symbolic = %.loc26_4.2 (constants.%.f66)] -// CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.f66) = impl_witness_access %T.as_wit.iface0.loc18_4.2, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc26_4.2: = specific_impl_function %impl.elem1.loc26_4.2, @S2(%L2.facet) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b32)] +// CHECK:STDOUT: %L2.lookup_impl_witness: = lookup_impl_witness %T.loc10_12.2, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness)] +// CHECK:STDOUT: %L2.facet: %L2.type = facet_value %T.as_type.loc18_4.2, (%L2.lookup_impl_witness) [symbolic = %L2.facet (constants.%L2.facet)] +// CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type constants.%R2.type, %L2.facet [symbolic = %.loc18_4.2 (constants.%.c42)] +// CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.c42) = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc18_4.2: = specific_impl_function %impl.elem0.loc18_4.2, @R2(%L2.facet) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.7ee)] +// CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type constants.%S2.type, %L2.facet [symbolic = %.loc26_4.2 (constants.%.7f6)] +// CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.7f6) = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %specific_impl_fn.loc26_4.2: = specific_impl_function %impl.elem1.loc26_4.2, @S2(%L2.facet) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b69)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -1237,17 +1228,15 @@ fn Works() { // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc18_4.1: type = facet_access_type %T.ref.loc18 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc18_4.1: type = converted %T.ref.loc18, %T.as_type.loc18_4.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc18_4.1: = facet_access_witness %T.ref.loc18, element0 [symbolic = %T.as_wit.iface0.loc18_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.f52) = impl_witness_access %T.as_wit.iface0.loc18_4.1, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc18_4.1: = specific_impl_function %impl.elem0.loc18_4.1, @R2(constants.%L2.facet) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.298)] +// CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.c42) = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc18_4.1: = specific_impl_function %impl.elem0.loc18_4.1, @R2(constants.%L2.facet) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.7ee)] // CHECK:STDOUT: %.loc18_8: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1() [concrete = ] // CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_12.1 [symbolic = %T.loc10_12.2 (constants.%T)] // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc26_4.1: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc26: = facet_access_witness %T.ref.loc26, element0 [symbolic = %T.as_wit.iface0.loc18_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.f66) = impl_witness_access %T.as_wit.iface0.loc26, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc26_4.1: = specific_impl_function %impl.elem1.loc26_4.1, @S2(constants.%L2.facet) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b32)] +// CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.7f6) = impl_witness_access constants.%L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %specific_impl_fn.loc26_4.1: = specific_impl_function %impl.elem1.loc26_4.1, @S2(constants.%L2.facet) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b69)] // CHECK:STDOUT: %addr: = addr_of [concrete = ] // CHECK:STDOUT: %.loc26_8: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1() [concrete = ] // CHECK:STDOUT: return @@ -1805,8 +1794,7 @@ fn Works() { // 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.%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.%A.impl_witness] -// CHECK:STDOUT: %impl.elem0.loc13_4: %.e63 = impl_witness_access %as_wit.iface0.loc13, element0 [concrete = constants.%G.001] +// CHECK:STDOUT: %impl.elem0.loc13_4: %.e63 = impl_witness_access constants.%A.impl_witness, 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] @@ -1828,8 +1816,7 @@ fn Works() { // 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.%A.impl_witness] -// CHECK:STDOUT: %impl.elem0.loc14_17: %.e63 = impl_witness_access %as_wit.iface0.loc14, element0 [concrete = constants.%G.001] +// CHECK:STDOUT: %impl.elem0.loc14_17: %.e63 = impl_witness_access constants.%A.impl_witness, 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] @@ -1845,8 +1832,7 @@ fn Works() { // 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.%A.impl_witness] -// CHECK:STDOUT: %impl.elem0.loc15_17: %.e63 = impl_witness_access %as_wit.iface0.loc15, element0 [concrete = constants.%G.001] +// CHECK:STDOUT: %impl.elem0.loc15_17: %.e63 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%G.001] // CHECK:STDOUT: %G.call.loc15: init %empty_tuple.type = call %impl.elem0.loc15_17() // CHECK:STDOUT: return // CHECK:STDOUT: } 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 915351849638..5a3f4bbeb9b7 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 @@ -268,18 +268,18 @@ interface C { // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic] // CHECK:STDOUT: %.Self: %I2.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] -// CHECK:STDOUT: %I2.facet.b82: %I2.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.71d: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %I2.lookup_impl_witness.ebe: = lookup_impl_witness %.Self, @I2 [symbolic_self] +// CHECK:STDOUT: %I2.facet.708: %I2.type = facet_value %.Self.as_type, (%I2.lookup_impl_witness.ebe) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.dde: type = impl_witness_access %I2.lookup_impl_witness.ebe, 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: %I2.impl_witness.24366f.1: = impl_witness file.%I2.impl_witness_table, @impl(%V) [symbolic] +// CHECK:STDOUT: %I2_where.type: type = facet_type <@I2 where %impl.elem0.dde = %empty_tuple.type> [concrete] +// CHECK:STDOUT: %I2.impl_witness.2ab13d.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: %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] +// CHECK:STDOUT: %I2.impl_witness.2ab13d.2: = impl_witness file.%I2.impl_witness_table, @impl(%Self.541) [symbolic] +// CHECK:STDOUT: %I2.lookup_impl_witness.487: = lookup_impl_witness %Self.541, @I2 [symbolic] +// CHECK:STDOUT: %I2.facet.758: %I2.type = facet_value %Self.as_type, (%I2.lookup_impl_witness.487) [symbolic] +// CHECK:STDOUT: %impl.elem0.7c7: type = impl_witness_access %I2.lookup_impl_witness.487, element0 [symbolic] // CHECK:STDOUT: %F2.type: type = fn_type @F2 [concrete] // CHECK:STDOUT: %F2: %F2.type = struct_value () [concrete] // CHECK:STDOUT: %J2.assoc_type: type = assoc_entity_type @J2 [concrete] @@ -313,8 +313,7 @@ interface C { // CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.25f] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.71d] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I2.lookup_impl_witness.ebe, element0 [symbolic_self = constants.%impl.elem0.dde] // CHECK:STDOUT: %.loc11_43.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_43.2: type = converted %.loc11_43.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc11_30: type = where_expr %.Self [concrete = constants.%I2_where.type] { @@ -324,7 +323,7 @@ interface C { // CHECK:STDOUT: %V.loc11_14.1: %J2.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)] // CHECK:STDOUT: } // 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: %I2.impl_witness: = impl_witness %I2.impl_witness_table, @impl(constants.%V) [symbolic = @impl.%I2.impl_witness (constants.%I2.impl_witness.2ab13d.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: } @@ -354,10 +353,9 @@ interface C { // CHECK:STDOUT: %.loc15_14.1: type = converted constants.%Self.541, %Self.as_type.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc15_14.2: %J2.type = converted %.loc15_14.1, constants.%Self.541 [symbolic = %Self (constants.%Self.541)] // CHECK:STDOUT: %Self.as_type.loc15_14.3: type = facet_access_type constants.%Self.541 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %I2.facet.loc15_14.2: %I2.type = facet_value %Self.as_type.loc15_14.3, (constants.%I2.lookup_impl_witness) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.758)] +// CHECK:STDOUT: %I2.facet.loc15_14.2: %I2.type = facet_value %Self.as_type.loc15_14.3, (constants.%I2.lookup_impl_witness.487) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.758)] // CHECK:STDOUT: %.loc15_14.3: %I2.type = converted @J2.%Self, %I2.facet.loc15_14.2 [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.758)] -// CHECK:STDOUT: %as_wit.iface0: = facet_access_witness %.loc15_14.3, element0 [symbolic = %I2.lookup_impl_witness (constants.%I2.lookup_impl_witness)] -// CHECK:STDOUT: %impl.elem0.loc15_14.2: type = impl_witness_access %as_wit.iface0, element0 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.7c7)] +// CHECK:STDOUT: %impl.elem0.loc15_14.2: type = impl_witness_access constants.%I2.lookup_impl_witness.487, element0 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.7c7)] // CHECK:STDOUT: %U2.ref: type = name_ref U2, %impl.elem0.loc15_14.2 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.7c7)] // CHECK:STDOUT: %return.param: ref @F2.%impl.elem0.loc15_14.1 (%impl.elem0.7c7) = out_param call_param0 // CHECK:STDOUT: %return: ref @F2.%impl.elem0.loc15_14.1 (%impl.elem0.7c7) = return_slot %return.param @@ -383,7 +381,7 @@ 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: %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: %I2.impl_witness: = impl_witness file.%I2.impl_witness_table, @impl(%V.loc11_14.2) [symbolic = %I2.impl_witness (constants.%I2.impl_witness.2ab13d.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -396,7 +394,7 @@ interface C { // CHECK:STDOUT: generic fn @F2(@J2.%Self: %J2.type) { // CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.541)] // CHECK:STDOUT: %Self.as_type.loc15_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %I2.lookup_impl_witness: = lookup_impl_witness %Self, @I2 [symbolic = %I2.lookup_impl_witness (constants.%I2.lookup_impl_witness)] +// CHECK:STDOUT: %I2.lookup_impl_witness: = lookup_impl_witness %Self, @I2 [symbolic = %I2.lookup_impl_witness (constants.%I2.lookup_impl_witness.487)] // CHECK:STDOUT: %I2.facet.loc15_14.1: %I2.type = facet_value %Self.as_type.loc15_14.1, (%I2.lookup_impl_witness) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.758)] // CHECK:STDOUT: %impl.elem0.loc15_14.1: type = impl_witness_access %I2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.7c7)] // CHECK:STDOUT: @@ -405,13 +403,13 @@ interface C { // CHECK:STDOUT: // CHECK:STDOUT: specific @T2(constants.%Self.c7b) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T2(constants.%I2.facet.b82) {} +// CHECK:STDOUT: specific @T2(constants.%I2.facet.708) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%V) { // 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: %I2.impl_witness => constants.%I2.impl_witness.24366f.1 +// CHECK:STDOUT: %I2.impl_witness => constants.%I2.impl_witness.2ab13d.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%V.loc11_14.2) {} @@ -420,7 +418,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: %I2.impl_witness => constants.%I2.impl_witness.24366f.2 +// CHECK:STDOUT: %I2.impl_witness => constants.%I2.impl_witness.2ab13d.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -430,7 +428,7 @@ interface C { // CHECK:STDOUT: specific @F2(constants.%Self.541) { // CHECK:STDOUT: %Self => constants.%Self.541 // CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%Self.as_type -// CHECK:STDOUT: %I2.lookup_impl_witness => constants.%I2.lookup_impl_witness +// CHECK:STDOUT: %I2.lookup_impl_witness => constants.%I2.lookup_impl_witness.487 // CHECK:STDOUT: %I2.facet.loc15_14.1 => constants.%I2.facet.758 // CHECK:STDOUT: %impl.elem0.loc15_14.1 => constants.%impl.elem0.7c7 // CHECK:STDOUT: } @@ -552,10 +550,10 @@ interface C { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, @C.%G.decl [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self, element0 [symbolic] -// CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.70a: type = fn_type_with_self_type %F.type, %C.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.70a = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %C.lookup_impl_witness: = lookup_impl_witness %Self, @C [symbolic] +// CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type, (%C.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.54d: type = fn_type_with_self_type %F.type, %C.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.54d = impl_witness_access %C.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F(%C.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -623,10 +621,10 @@ interface C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type.loc8_14.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc9_9.2: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc9_9.2 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type.loc8_14.1, (%Self.as_wit.iface0.loc9_9.2) [symbolic = %C.facet (constants.%C.facet)] -// CHECK:STDOUT: %.loc9_9.2: type = fn_type_with_self_type constants.%F.type, %C.facet [symbolic = %.loc9_9.2 (constants.%.70a)] -// CHECK:STDOUT: %impl.elem0.loc9_9.2: @G.%.loc9_9.2 (%.70a) = impl_witness_access %Self.as_wit.iface0.loc9_9.2, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %C.lookup_impl_witness: = lookup_impl_witness %Self, @C [symbolic = %C.lookup_impl_witness (constants.%C.lookup_impl_witness)] +// CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type.loc8_14.1, (%C.lookup_impl_witness) [symbolic = %C.facet (constants.%C.facet)] +// CHECK:STDOUT: %.loc9_9.2: type = fn_type_with_self_type constants.%F.type, %C.facet [symbolic = %.loc9_9.2 (constants.%.54d)] +// CHECK:STDOUT: %impl.elem0.loc9_9.2: @G.%.loc9_9.2 (%.54d) = impl_witness_access %C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_9.2: = specific_impl_function %impl.elem0.loc9_9.2, @F(%C.facet) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @G.%Self.as_type.loc8_14.1 (%Self.as_type)) { @@ -635,16 +633,14 @@ interface C { // CHECK:STDOUT: %F.ref.loc9: %C.assoc_type = name_ref F, @C.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %Self.as_type.loc9: type = facet_access_type constants.%Self [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc9_9.1: type = converted constants.%Self, %Self.as_type.loc9 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc9_9.1: = facet_access_witness constants.%Self, element0 [symbolic = %Self.as_wit.iface0.loc9_9.2 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc9_9.1: @G.%.loc9_9.2 (%.70a) = impl_witness_access %Self.as_wit.iface0.loc9_9.1, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_9.1: @G.%.loc9_9.2 (%.54d) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc9_9: = bound_method %self.ref.loc9, %impl.elem0.loc9_9.1 // CHECK:STDOUT: %specific_impl_fn.loc9_9.1: = specific_impl_function %impl.elem0.loc9_9.1, @F(constants.%C.facet) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc9_12: = bound_method %self.ref.loc9, %specific_impl_fn.loc9_9.1 // CHECK:STDOUT: %.loc9_12: init %empty_tuple.type = call %bound_method.loc9_12(%self.ref.loc9) // CHECK:STDOUT: %self.ref.loc10: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = name_ref self, %self -// CHECK:STDOUT: %Self.as_wit.iface0.loc10: = facet_access_witness @C.%Self, element0 [symbolic = %Self.as_wit.iface0.loc9_9.2 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc10: @G.%.loc9_9.2 (%.70a) = impl_witness_access %Self.as_wit.iface0.loc10, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %F.ref.loc10: @G.%.loc9_9.2 (%.70a) = name_ref F, %impl.elem0.loc10 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc10: @G.%.loc9_9.2 (%.54d) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %F.ref.loc10: @G.%.loc9_9.2 (%.54d) = name_ref F, %impl.elem0.loc10 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc10_9: = bound_method %self.ref.loc10, %F.ref.loc10 // CHECK:STDOUT: %specific_impl_fn.loc10: = specific_impl_function %F.ref.loc10, @F(constants.%C.facet) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_14: = bound_method %self.ref.loc10, %specific_impl_fn.loc10 diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_fn_invalid_use.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_fn_invalid_use.carbon index 0edb2d22bef1..595b2ff1bcaf 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_fn_invalid_use.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_fn_invalid_use.carbon @@ -39,11 +39,11 @@ fn Use(T:! I) { // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T, element0 [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.3d7: type = fn_type_with_self_type %F.type, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.3d7 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %.3d7 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.ee1: type = fn_type_with_self_type %F.type, %I.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.ee1 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %require_complete: = require_complete_type %.ee1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -95,10 +95,10 @@ fn Use(T:! I) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc13_4.2: type = facet_access_type %T.loc8_8.2 [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc13_4.2: = facet_access_witness %T.loc8_8.2, element0 [symbolic = %T.as_wit.iface0.loc13_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc13_4.2, (%T.as_wit.iface0.loc13_4.2) [symbolic = %I.facet (constants.%I.facet)] -// CHECK:STDOUT: %.loc13_4.2: type = fn_type_with_self_type constants.%F.type, %I.facet [symbolic = %.loc13_4.2 (constants.%.3d7)] -// CHECK:STDOUT: %impl.elem0.loc13_4.2: @Use.%.loc13_4.2 (%.3d7) = impl_witness_access %T.as_wit.iface0.loc13_4.2, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.2, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T.as_type.loc13_4.2, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet)] +// CHECK:STDOUT: %.loc13_4.2: type = fn_type_with_self_type constants.%F.type, %I.facet [symbolic = %.loc13_4.2 (constants.%.ee1)] +// CHECK:STDOUT: %impl.elem0.loc13_4.2: @Use.%.loc13_4.2 (%.ee1) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %require_complete: = require_complete_type %.loc13_4.2 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -107,8 +107,7 @@ fn Use(T:! I) { // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc13_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc13_4.1: type = converted %T.ref, %T.as_type.loc13_4.1 [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc13_4.1: = facet_access_witness %T.ref, element0 [symbolic = %T.as_wit.iface0.loc13_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc13_4.1: @Use.%.loc13_4.2 (%.3d7) = impl_witness_access %T.as_wit.iface0.loc13_4.1, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc13_4.1: @Use.%.loc13_4.2 (%.ee1) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/generic_method.carbon b/toolchain/check/testdata/interface/no_prelude/generic_method.carbon index f8c22434d52d..08083dc6950e 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_method.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_method.carbon @@ -132,12 +132,12 @@ fn CallIndirect() { // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.9c2 [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T.9c2, element0 [symbolic] -// CHECK:STDOUT: %A.facet.834: %A.type.91f = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.591: type = fn_type_with_self_type %F.type.13d, %A.facet.834 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.591 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.9c2, @A, @A(%X) [symbolic] +// CHECK:STDOUT: %A.facet.11f: %A.type.91f = facet_value %T.as_type, (%A.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.ffa: type = fn_type_with_self_type %F.type.13d, %A.facet.11f [symbolic] +// CHECK:STDOUT: %impl.elem0: %.ffa = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %tuple.type.e28: type = tuple_type (%X, %T.as_type, %Z) [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%X, %A.facet.834, %Z) [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%X, %A.facet.11f, %Z) [symbolic] // 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] @@ -342,8 +342,7 @@ fn CallIndirect() { // 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.%A.impl_witness] -// CHECK:STDOUT: %impl.elem0: %.a60 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.ce9] +// CHECK:STDOUT: %impl.elem0: %.a60 = impl_witness_access constants.%A.impl_witness, 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] @@ -364,10 +363,10 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc26_4.2: type = facet_access_type %T.loc25_16.2 [symbolic = %T.as_type.loc26_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc26_4.2: = facet_access_witness %T.loc25_16.2, element0 [symbolic = %T.as_wit.iface0.loc26_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value %T.as_type.loc26_4.2, (%T.as_wit.iface0.loc26_4.2) [symbolic = %A.facet (constants.%A.facet.834)] -// CHECK:STDOUT: %.loc26_4.3: type = fn_type_with_self_type constants.%F.type.13d, %A.facet [symbolic = %.loc26_4.3 (constants.%.591)] -// CHECK:STDOUT: %impl.elem0.loc26_4.2: @CallGeneric.%.loc26_4.3 (%.591) = impl_witness_access %T.as_wit.iface0.loc26_4.2, element0 [symbolic = %impl.elem0.loc26_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc25_16.2, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] +// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value %T.as_type.loc26_4.2, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.11f)] +// CHECK:STDOUT: %.loc26_4.3: type = fn_type_with_self_type constants.%F.type.13d, %A.facet [symbolic = %.loc26_4.3 (constants.%.ffa)] +// CHECK:STDOUT: %impl.elem0.loc26_4.2: @CallGeneric.%.loc26_4.3 (%.ffa) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc26_4.2: = specific_impl_function %impl.elem0.loc26_4.2, @F.1(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc26_4.2, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.e28)] // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.500)] @@ -379,11 +378,10 @@ fn CallIndirect() { // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc26_4.1 [concrete = constants.%assoc0.5f6] // CHECK:STDOUT: %T.as_type.loc26_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc26_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc26_4.2: type = converted %T.ref, %T.as_type.loc26_4.1 [symbolic = %T.as_type.loc26_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc26_4.1: = facet_access_witness %T.ref, element0 [symbolic = %T.as_wit.iface0.loc26_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc26_4.1: @CallGeneric.%.loc26_4.3 (%.591) = impl_witness_access %T.as_wit.iface0.loc26_4.1, element0 [symbolic = %impl.elem0.loc26_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc26_4.1: @CallGeneric.%.loc26_4.3 (%.ffa) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc26_11.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %specific_impl_fn.loc26_4.1: = specific_impl_function %impl.elem0.loc26_4.1, @F.1(constants.%X, constants.%A.facet.834, constants.%Z) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc26_4.1: = specific_impl_function %impl.elem0.loc26_4.1, @F.1(constants.%X, constants.%A.facet.11f, constants.%Z) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc26_12.1: ref @CallGeneric.%tuple.type (%tuple.type.e28) = temporary_storage // CHECK:STDOUT: %.loc26_11.2: ref %Z = temporary_storage // CHECK:STDOUT: %.loc26_11.3: init %Z = class_init (), %.loc26_11.2 [concrete = constants.%Z.val] @@ -473,12 +471,12 @@ fn CallIndirect() { // CHECK:STDOUT: %T.patt.loc25_16.2 => constants.%T.patt.e81 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.834, constants.%Z) { +// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.11f, 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.834 +// CHECK:STDOUT: %Self => constants.%A.facet.11f // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.a0c // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%T.as_type // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.e28 @@ -492,7 +490,7 @@ fn CallIndirect() { // 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.%A.impl_witness +// CHECK:STDOUT: %A.lookup_impl_witness => 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 @@ -591,13 +589,13 @@ fn CallIndirect() { // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.9c2 [symbolic] -// CHECK:STDOUT: %T.as_wit.iface0: = facet_access_witness %T.9c2, element0 [symbolic] -// CHECK:STDOUT: %A.facet.834: %A.type.91f = facet_value %T.as_type, (%T.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %.591: type = fn_type_with_self_type %F.type.13d, %A.facet.834 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.591 = impl_witness_access %T.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.9c2, @A, @A(%X) [symbolic] +// CHECK:STDOUT: %A.facet.11f: %A.type.91f = facet_value %T.as_type, (%A.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.ffa: type = fn_type_with_self_type %F.type.13d, %A.facet.11f [symbolic] +// CHECK:STDOUT: %impl.elem0: %.ffa = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %tuple.type.a0c: type = tuple_type (type, %A.type.91f, type) [concrete] // CHECK:STDOUT: %tuple.type.e28: type = tuple_type (%X, %T.as_type, %Z) [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%X, %A.facet.834, %Z) [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%X, %A.facet.11f, %Z) [symbolic] // 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] @@ -873,8 +871,7 @@ fn CallIndirect() { // 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.%A.impl_witness.8ac] -// CHECK:STDOUT: %impl.elem0: %.406 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%F.93b] +// CHECK:STDOUT: %impl.elem0: %.406 = impl_witness_access constants.%A.impl_witness.8ac, 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] @@ -895,10 +892,10 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc27_16.2 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc28_4.2: = facet_access_witness %T.loc27_16.2, element0 [symbolic = %T.as_wit.iface0.loc28_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value %T.as_type.loc28_4.2, (%T.as_wit.iface0.loc28_4.2) [symbolic = %A.facet (constants.%A.facet.834)] -// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type constants.%F.type.13d, %A.facet [symbolic = %.loc28_4.3 (constants.%.591)] -// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.591) = impl_witness_access %T.as_wit.iface0.loc28_4.2, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc27_16.2, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] +// CHECK:STDOUT: %A.facet: %A.type.91f = facet_value %T.as_type.loc28_4.2, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.11f)] +// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type constants.%F.type.13d, %A.facet [symbolic = %.loc28_4.3 (constants.%.ffa)] +// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.ffa) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @F.1(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.e28)] // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.500)] @@ -910,11 +907,10 @@ fn CallIndirect() { // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc28_4.1 [concrete = constants.%assoc0.5f6] // CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc28_4.2: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_wit.iface0.loc28_4.1: = facet_access_witness %T.ref, element0 [symbolic = %T.as_wit.iface0.loc28_4.2 (constants.%T.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.591) = impl_witness_access %T.as_wit.iface0.loc28_4.1, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.ffa) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc28_11.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @F.1(constants.%X, constants.%A.facet.834, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @F.1(constants.%X, constants.%A.facet.11f, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.e28) = temporary_storage // CHECK:STDOUT: %.loc28_11.2: ref %Z = temporary_storage // CHECK:STDOUT: %.loc28_11.3: init %Z = class_init (), %.loc28_11.2 [concrete = constants.%Z.val] @@ -1087,12 +1083,12 @@ fn CallIndirect() { // CHECK:STDOUT: %T.patt.loc27_16.2 => constants.%T.patt.e81 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.834, constants.%Z) { +// CHECK:STDOUT: specific @F.1(constants.%X, constants.%A.facet.11f, 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.834 +// CHECK:STDOUT: %Self => constants.%A.facet.11f // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.a0c // CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%T.as_type // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.e28 @@ -1106,7 +1102,7 @@ fn CallIndirect() { // 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.%A.impl_witness.8ac +// CHECK:STDOUT: %A.lookup_impl_witness => 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 diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 427698aac843..0aa62a88f4c2 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -752,9 +752,9 @@ impl i32 as Empty { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %Self.as_wit.iface0: = facet_access_witness %Self, element0 [symbolic] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %Self.as_type, (%Self.as_wit.iface0) [symbolic] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %Self.as_type, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%F.decl [concrete] @@ -788,8 +788,7 @@ impl i32 as Empty { // CHECK:STDOUT: %return.patt: @F.%impl.elem0.loc6_13.1 (%impl.elem0) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%impl.elem0.loc6_13.1 (%impl.elem0) = out_param_pattern %return.patt, call_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_13.2: = facet_access_witness @I.%Self, element0 [symbolic = %Self.as_wit.iface0.loc6_13.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc6_13.2: type = impl_witness_access %Self.as_wit.iface0.loc6_13.2, element0 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc6_13.2: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: %T.ref: type = name_ref T, %impl.elem0.loc6_13.2 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: %return.param: ref @F.%impl.elem0.loc6_13.1 (%impl.elem0) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.%impl.elem0.loc6_13.1 (%impl.elem0) = return_slot %return.param @@ -811,8 +810,8 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_13.1: = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc6_13.1 (constants.%Self.as_wit.iface0)] -// CHECK:STDOUT: %impl.elem0.loc6_13.1: type = impl_witness_access %Self.as_wit.iface0.loc6_13.1, element0 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %impl.elem0.loc6_13.1: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @F.%impl.elem0.loc6_13.1 (%impl.elem0); // CHECK:STDOUT: } @@ -823,7 +822,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_wit.iface0.loc6_13.1 => constants.%Self.as_wit.iface0 +// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness // CHECK:STDOUT: %impl.elem0.loc6_13.1 => constants.%impl.elem0 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 7a5af03fb922..f96b62109cc1 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -146,9 +146,9 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [concrete] // CHECK:STDOUT: %Impls: %Impls.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.as_type.541: type = facet_access_type %.Self.258 [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.258, element0 [symbolic_self] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type.541, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.258, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type.541, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type.427: type = facet_type <@I where .Self impls @J and TODO> [concrete] // CHECK:STDOUT: %W: %I_where.type.427 = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %W.patt: %I_where.type.427 = symbolic_binding_pattern W, 0 [symbolic] @@ -219,8 +219,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %Member.ref: %I.assoc_type = name_ref Member, @Member.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc15_38: type = facet_access_type %.Self.ref.loc15_38 [symbolic_self = constants.%.Self.as_type.541] // CHECK:STDOUT: %.loc15_38: type = converted %.Self.ref.loc15_38, %.Self.as_type.loc15_38 [symbolic_self = constants.%.Self.as_type.541] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref.loc15_38, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc15_50: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_14.2: type = where_expr %.Self [concrete = constants.%I_where.type.427] { // CHECK:STDOUT: requirement_impls %.loc15_20, %J.ref @@ -319,9 +318,9 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.%Associated [concrete] // CHECK:STDOUT: %.Self: %K.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] -// CHECK:STDOUT: %K.facet: %K.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %L.type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self] +// CHECK:STDOUT: %K.lookup_impl_witness: = lookup_impl_witness %.Self, @K [symbolic_self] +// CHECK:STDOUT: %K.facet: %K.type = facet_value %.Self.as_type, (%K.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %L.type = impl_witness_access %K.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic_self] // CHECK:STDOUT: %K_where.type: type = facet_type <@K where TODO> [concrete] // CHECK:STDOUT: %W: %K_where.type = bind_symbolic_name W, 0 [symbolic] @@ -359,8 +358,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %Associated.ref: %K.assoc_type = name_ref Associated, @Associated.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_36.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: %L.type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: %L.type = impl_witness_access constants.%K.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] // CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic_self = constants.%as_type] // CHECK:STDOUT: %.loc11_36.2: type = converted %impl.elem0, %as_type [symbolic_self = constants.%as_type] diff --git a/toolchain/check/testdata/where_expr/designator.carbon b/toolchain/check/testdata/where_expr/designator.carbon index 8c52991bde6c..55375324b8b9 100644 --- a/toolchain/check/testdata/where_expr/designator.carbon +++ b/toolchain/check/testdata/where_expr/designator.carbon @@ -102,9 +102,9 @@ class D { // CHECK:STDOUT: %PeriodSelf.type: type = fn_type @PeriodSelf [concrete] // CHECK:STDOUT: %PeriodSelf: %PeriodSelf.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.258 [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.258, element0 [symbolic_self] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self.258, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %U: %I_where.type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: %I_where.type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %PeriodMember.type: type = fn_type @PeriodMember [concrete] @@ -158,8 +158,7 @@ class D { // CHECK:STDOUT: %Member.ref: %I.assoc_type = name_ref Member, @Member.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_29: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_41: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_23.2: type = where_expr %.Self [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc10_41 diff --git a/toolchain/check/testdata/where_expr/dot_self_index.carbon b/toolchain/check/testdata/where_expr/dot_self_index.carbon index 7efcdd4b909e..c1d101c09bbf 100644 --- a/toolchain/check/testdata/where_expr/dot_self_index.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_index.carbon @@ -42,16 +42,16 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %assoc0.3715ce.2: %Empty.assoc_type.3cf698.2 = assoc_entity element0, @Empty.%A [symbolic] // CHECK:STDOUT: %require_complete.22f: = require_complete_type %Empty.type.3e5fde.2 [symbolic] // CHECK:STDOUT: %.Self.as_type.a75: type = facet_access_type %.Self.c95 [symbolic] -// CHECK:STDOUT: %.Self.as_wit.iface0.663: = facet_access_witness %.Self.c95, element0 [symbolic] -// CHECK:STDOUT: %Empty.facet.782: %Empty.type.3e5fde.2 = facet_value %.Self.as_type.a75, (%.Self.as_wit.iface0.663) [symbolic] -// CHECK:STDOUT: %impl.elem0.d0b: type = impl_witness_access %.Self.as_wit.iface0.663, element0 [symbolic] +// CHECK:STDOUT: %Empty.lookup_impl_witness.b1d: = lookup_impl_witness %.Self.c95, @Empty, @Empty(%T) [symbolic] +// CHECK:STDOUT: %Empty.facet.e74: %Empty.type.3e5fde.2 = facet_value %.Self.as_type.a75, (%Empty.lookup_impl_witness.b1d) [symbolic] +// CHECK:STDOUT: %impl.elem0.c6e: type = impl_witness_access %Empty.lookup_impl_witness.b1d, element0 [symbolic] // CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %Empty_where.type.5a8: type = facet_type <@Empty, @Empty(%T) where %impl.elem0.d0b = %ptr.79f> [symbolic] +// CHECK:STDOUT: %Empty_where.type.b73: type = facet_type <@Empty, @Empty(%T) where %impl.elem0.c6e = %ptr.79f> [symbolic] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 1 [symbolic] // CHECK:STDOUT: %V.patt: type = symbolic_binding_pattern V, 1 [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.796: = require_complete_type %Empty_where.type.5a8 [symbolic] +// CHECK:STDOUT: %require_complete.af8: = require_complete_type %Empty_where.type.b73 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Empty.type.f0b: type = facet_type <@Empty, @Empty(%i32)> [concrete] @@ -60,18 +60,18 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %Empty.assoc_type.7c7: type = assoc_entity_type @Empty, @Empty(%i32) [concrete] // CHECK:STDOUT: %assoc0.758: %Empty.assoc_type.7c7 = assoc_entity element0, @Empty.%A [concrete] // CHECK:STDOUT: %.Self.as_type.920: type = facet_access_type %.Self.e6e [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.67d: = facet_access_witness %.Self.e6e, element0 [symbolic_self] -// CHECK:STDOUT: %Empty.facet.311: %Empty.type.f0b = facet_value %.Self.as_type.920, (%.Self.as_wit.iface0.67d) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.1bd: type = impl_witness_access %.Self.as_wit.iface0.67d, element0 [symbolic_self] +// CHECK:STDOUT: %Empty.lookup_impl_witness.4e3: = lookup_impl_witness %.Self.e6e, @Empty, @Empty(%i32) [symbolic_self] +// CHECK:STDOUT: %Empty.facet.112: %Empty.type.f0b = facet_value %.Self.as_type.920, (%Empty.lookup_impl_witness.4e3) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.64a: type = impl_witness_access %Empty.lookup_impl_witness.4e3, element0 [symbolic_self] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Empty_where.type.52c: type = facet_type <@Empty, @Empty(%i32) where %impl.elem0.1bd = %ptr.235> [concrete] +// CHECK:STDOUT: %Empty_where.type.fc2: type = facet_type <@Empty, @Empty(%i32) where %impl.elem0.64a = %ptr.235> [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] // CHECK:STDOUT: %complete_type.091: = complete_type_witness %Empty.type.f0b [concrete] // CHECK:STDOUT: %H.specific_fn: = specific_function %H, @H(%i32, bool) [concrete] -// CHECK:STDOUT: %complete_type.6bd: = complete_type_witness %Empty_where.type.52c [concrete] +// CHECK:STDOUT: %complete_type.a3f: = complete_type_witness %Empty_where.type.fc2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -98,13 +98,13 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] { // CHECK:STDOUT: %T.patt.loc18_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt: @H.%Empty_where.type (%Empty_where.type.5a8) = binding_pattern U -// CHECK:STDOUT: %U.param_patt: @H.%Empty_where.type (%Empty_where.type.5a8) = value_param_pattern %U.patt, call_param0 +// CHECK:STDOUT: %U.patt: @H.%Empty_where.type (%Empty_where.type.b73) = binding_pattern U +// CHECK:STDOUT: %U.param_patt: @H.%Empty_where.type (%Empty_where.type.b73) = value_param_pattern %U.patt, call_param0 // CHECK:STDOUT: %V.patt.loc18_43.1: type = symbolic_binding_pattern V, 1 [symbolic = %V.patt.loc18_43.2 (constants.%V.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.loc18_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc18_6.2 (constants.%T)] -// CHECK:STDOUT: %U.param: @H.%Empty_where.type (%Empty_where.type.5a8) = value_param call_param0 -// CHECK:STDOUT: %.loc18_28.1: type = splice_block %.loc18_28.2 [symbolic = %Empty_where.type (constants.%Empty_where.type.5a8)] { +// CHECK:STDOUT: %U.param: @H.%Empty_where.type (%Empty_where.type.b73) = value_param call_param0 +// CHECK:STDOUT: %.loc18_28.1: type = splice_block %.loc18_28.2 [symbolic = %Empty_where.type (constants.%Empty_where.type.b73)] { // CHECK:STDOUT: %Empty.ref: %Empty.type.d5a = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.generic] // CHECK:STDOUT: %T.ref.loc18_25: type = name_ref T, %T.loc18_6.1 [symbolic = %T.loc18_6.2 (constants.%T)] // CHECK:STDOUT: %Empty.type.loc18_26.1: type = facet_type <@Empty, @Empty(constants.%T)> [symbolic = %Empty.type.loc18_26.2 (constants.%Empty.type.3e5fde.2)] @@ -114,23 +114,22 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %A.ref: @H.%Empty.assoc_type (%Empty.assoc_type.3cf698.2) = name_ref A, %.loc18_34.1 [symbolic = %assoc0 (constants.%assoc0.3715ce.2)] // CHECK:STDOUT: %.Self.as_type.loc18_34.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc18_34.2 (constants.%.Self.as_type.a75)] // CHECK:STDOUT: %.loc18_34.2: type = converted %.Self.ref, %.Self.as_type.loc18_34.1 [symbolic = %.Self.as_type.loc18_34.2 (constants.%.Self.as_type.a75)] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc18_34.1: = facet_access_witness %.Self.ref, element0 [symbolic = %.Self.as_wit.iface0.loc18_34.2 (constants.%.Self.as_wit.iface0.663)] -// CHECK:STDOUT: %impl.elem0.loc18_34.1: type = impl_witness_access %.Self.as_wit.iface0.loc18_34.1, element0 [symbolic = %impl.elem0.loc18_34.2 (constants.%impl.elem0.d0b)] +// CHECK:STDOUT: %impl.elem0.loc18_34.1: type = impl_witness_access constants.%Empty.lookup_impl_witness.b1d, element0 [symbolic = %impl.elem0.loc18_34.2 (constants.%impl.elem0.c6e)] // CHECK:STDOUT: %T.ref.loc18_39: type = name_ref T, %T.loc18_6.1 [symbolic = %T.loc18_6.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc18_40.1: type = ptr_type %T.ref.loc18_39 [symbolic = %ptr.loc18_40.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %.loc18_28.2: type = where_expr %.Self.1 [symbolic = %Empty_where.type (constants.%Empty_where.type.5a8)] { +// CHECK:STDOUT: %.loc18_28.2: type = where_expr %.Self.1 [symbolic = %Empty_where.type (constants.%Empty_where.type.b73)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc18_34.1, %ptr.loc18_40.1 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U: @H.%Empty_where.type (%Empty_where.type.5a8) = bind_name U, %U.param +// CHECK:STDOUT: %U: @H.%Empty_where.type (%Empty_where.type.b73) = bind_name U, %U.param // CHECK:STDOUT: %V.loc18_43.1: type = bind_symbolic_name V, 1 [symbolic = %V.loc18_43.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %U.patt: %Empty_where.type.52c = binding_pattern U -// CHECK:STDOUT: %U.param_patt: %Empty_where.type.52c = value_param_pattern %U.patt, call_param0 +// CHECK:STDOUT: %U.patt: %Empty_where.type.fc2 = binding_pattern U +// CHECK:STDOUT: %U.param_patt: %Empty_where.type.fc2 = value_param_pattern %U.patt, call_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.param: %Empty_where.type.52c = value_param call_param0 -// CHECK:STDOUT: %.loc20_20.1: type = splice_block %.loc20_20.2 [concrete = constants.%Empty_where.type.52c] { +// CHECK:STDOUT: %U.param: %Empty_where.type.fc2 = value_param call_param0 +// CHECK:STDOUT: %.loc20_20.1: type = splice_block %.loc20_20.2 [concrete = constants.%Empty_where.type.fc2] { // CHECK:STDOUT: %Empty.ref: %Empty.type.d5a = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.generic] // CHECK:STDOUT: %int_32.loc20_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc20_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -141,16 +140,15 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %A.ref: %Empty.assoc_type.7c7 = name_ref A, %.loc20_26.1 [concrete = constants.%assoc0.758] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.920] // CHECK:STDOUT: %.loc20_26.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.920] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0.67d] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0.1bd] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Empty.lookup_impl_witness.4e3, element0 [symbolic_self = constants.%impl.elem0.64a] // CHECK:STDOUT: %int_32.loc20_31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc20_31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32.loc20_31 [concrete = constants.%ptr.235] -// CHECK:STDOUT: %.loc20_20.2: type = where_expr %.Self [concrete = constants.%Empty_where.type.52c] { +// CHECK:STDOUT: %.loc20_20.2: type = where_expr %.Self [concrete = constants.%Empty_where.type.fc2] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U: %Empty_where.type.52c = bind_name U, %U.param +// CHECK:STDOUT: %U: %Empty_where.type.fc2 = bind_name U, %U.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -190,28 +188,28 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %Empty.assoc_type: type = assoc_entity_type @Empty, @Empty(%T.loc18_6.2) [symbolic = %Empty.assoc_type (constants.%Empty.assoc_type.3cf698.2)] // CHECK:STDOUT: %assoc0: @H.%Empty.assoc_type (%Empty.assoc_type.3cf698.2) = assoc_entity element0, @Empty.%A [symbolic = %assoc0 (constants.%assoc0.3715ce.2)] // CHECK:STDOUT: %.Self.as_type.loc18_34.2: type = facet_access_type %.Self.2 [symbolic = %.Self.as_type.loc18_34.2 (constants.%.Self.as_type.a75)] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc18_34.2: = facet_access_witness %.Self.2, element0 [symbolic = %.Self.as_wit.iface0.loc18_34.2 (constants.%.Self.as_wit.iface0.663)] -// CHECK:STDOUT: %impl.elem0.loc18_34.2: type = impl_witness_access %.Self.as_wit.iface0.loc18_34.2, element0 [symbolic = %impl.elem0.loc18_34.2 (constants.%impl.elem0.d0b)] +// CHECK:STDOUT: %Empty.lookup_impl_witness: = lookup_impl_witness %.Self.2, @Empty, @Empty(%T.loc18_6.2) [symbolic = %Empty.lookup_impl_witness (constants.%Empty.lookup_impl_witness.b1d)] +// CHECK:STDOUT: %impl.elem0.loc18_34.2: type = impl_witness_access %Empty.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_34.2 (constants.%impl.elem0.c6e)] // CHECK:STDOUT: %ptr.loc18_40.2: type = ptr_type %T.loc18_6.2 [symbolic = %ptr.loc18_40.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %Empty_where.type: type = facet_type <@Empty, @Empty(%T.loc18_6.2) where %impl.elem0.loc18_34.2 = %ptr.loc18_40.2> [symbolic = %Empty_where.type (constants.%Empty_where.type.5a8)] +// CHECK:STDOUT: %Empty_where.type: type = facet_type <@Empty, @Empty(%T.loc18_6.2) where %impl.elem0.loc18_34.2 = %ptr.loc18_40.2> [symbolic = %Empty_where.type (constants.%Empty_where.type.b73)] // CHECK:STDOUT: %V.loc18_43.2: type = bind_symbolic_name V, 1 [symbolic = %V.loc18_43.2 (constants.%V)] // CHECK:STDOUT: %V.patt.loc18_43.2: type = symbolic_binding_pattern V, 1 [symbolic = %V.patt.loc18_43.2 (constants.%V.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc18_17: = require_complete_type %Empty_where.type [symbolic = %require_complete.loc18_17 (constants.%require_complete.796)] +// CHECK:STDOUT: %require_complete.loc18_17: = require_complete_type %Empty_where.type [symbolic = %require_complete.loc18_17 (constants.%require_complete.af8)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param: @H.%Empty_where.type (%Empty_where.type.5a8)) { +// CHECK:STDOUT: fn(%U.param: @H.%Empty_where.type (%Empty_where.type.b73)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%U.param: %Empty_where.type.52c) { +// CHECK:STDOUT: fn @G(%U.param: %Empty_where.type.fc2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [concrete = constants.%H] // 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: %U.ref: %Empty_where.type.52c = name_ref U, %U +// CHECK:STDOUT: %U.ref: %Empty_where.type.fc2 = name_ref U, %U // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %bool.make_type [concrete = bool] // CHECK:STDOUT: %.loc21_17.2: type = converted %bool.make_type, %.loc21_17.1 [concrete = bool] @@ -240,7 +238,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %assoc0 => constants.%assoc0.3715ce.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%T, constants.%Empty.facet.782) {} +// CHECK:STDOUT: specific @A(constants.%T, constants.%Empty.facet.e74) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @H(constants.%T, constants.%V) { // CHECK:STDOUT: %T.loc18_6.2 => constants.%T @@ -251,10 +249,10 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %Empty.assoc_type => constants.%Empty.assoc_type.3cf698.2 // CHECK:STDOUT: %assoc0 => constants.%assoc0.3715ce.2 // CHECK:STDOUT: %.Self.as_type.loc18_34.2 => constants.%.Self.as_type.a75 -// CHECK:STDOUT: %.Self.as_wit.iface0.loc18_34.2 => constants.%.Self.as_wit.iface0.663 -// CHECK:STDOUT: %impl.elem0.loc18_34.2 => constants.%impl.elem0.d0b +// CHECK:STDOUT: %Empty.lookup_impl_witness => constants.%Empty.lookup_impl_witness.b1d +// CHECK:STDOUT: %impl.elem0.loc18_34.2 => constants.%impl.elem0.c6e // CHECK:STDOUT: %ptr.loc18_40.2 => constants.%ptr.79f -// CHECK:STDOUT: %Empty_where.type => constants.%Empty_where.type.5a8 +// CHECK:STDOUT: %Empty_where.type => constants.%Empty_where.type.b73 // CHECK:STDOUT: %V.loc18_43.2 => constants.%V // CHECK:STDOUT: %V.patt.loc18_43.2 => constants.%V.patt // CHECK:STDOUT: } @@ -272,7 +270,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %assoc0 => constants.%assoc0.758 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%i32, constants.%Empty.facet.311) {} +// CHECK:STDOUT: specific @A(constants.%i32, constants.%Empty.facet.112) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @H(constants.%i32, bool) { // CHECK:STDOUT: %T.loc18_6.2 => constants.%i32 @@ -283,14 +281,14 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %Empty.assoc_type => constants.%Empty.assoc_type.7c7 // CHECK:STDOUT: %assoc0 => constants.%assoc0.758 // CHECK:STDOUT: %.Self.as_type.loc18_34.2 => constants.%.Self.as_type.920 -// CHECK:STDOUT: %.Self.as_wit.iface0.loc18_34.2 => constants.%.Self.as_wit.iface0.67d -// CHECK:STDOUT: %impl.elem0.loc18_34.2 => constants.%impl.elem0.1bd +// CHECK:STDOUT: %Empty.lookup_impl_witness => constants.%Empty.lookup_impl_witness.4e3 +// CHECK:STDOUT: %impl.elem0.loc18_34.2 => constants.%impl.elem0.64a // CHECK:STDOUT: %ptr.loc18_40.2 => constants.%ptr.235 -// CHECK:STDOUT: %Empty_where.type => constants.%Empty_where.type.52c +// CHECK:STDOUT: %Empty_where.type => constants.%Empty_where.type.fc2 // CHECK:STDOUT: %V.loc18_43.2 => bool // CHECK:STDOUT: %V.patt.loc18_43.2 => constants.%V.patt // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc18_17 => constants.%complete_type.6bd +// CHECK:STDOUT: %require_complete.loc18_17 => constants.%complete_type.a3f // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/equal_rewrite.carbon b/toolchain/check/testdata/where_expr/equal_rewrite.carbon index 47948b84e034..1a95cb5b2aa1 100644 --- a/toolchain/check/testdata/where_expr/equal_rewrite.carbon +++ b/toolchain/check/testdata/where_expr/equal_rewrite.carbon @@ -206,9 +206,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %assoc0: %N.assoc_type = assoc_entity element0, @N.%P [concrete] // CHECK:STDOUT: %.Self: %N.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] -// CHECK:STDOUT: %N.facet: %N.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: %N.lookup_impl_witness: = lookup_impl_witness %.Self, @N [symbolic_self] +// CHECK:STDOUT: %N.facet: %N.type = facet_value %.Self.as_type, (%N.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %N.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %N_where.type: type = facet_type <@N where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %T: %N_where.type = bind_symbolic_name T, 0 [symbolic] @@ -242,8 +242,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %P.ref: %N.assoc_type = name_ref P, @P.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%N.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc8_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc8_16.2: type = where_expr %.Self [concrete = constants.%N_where.type] { @@ -296,21 +295,21 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %assoc1: %A.assoc_type = assoc_entity element1, @A.%C [concrete] // CHECK:STDOUT: %.Self.3ca: %A.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %.Self.as_type.adb: type = facet_access_type %.Self.3ca [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.844: = facet_access_witness %.Self.3ca, element0 [symbolic_self] -// CHECK:STDOUT: %A.facet.aea: %A.type = facet_value %.Self.as_type.adb, (%.Self.as_wit.iface0.844) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.844, element0 [symbolic_self] +// CHECK:STDOUT: %A.lookup_impl_witness.5ad: = lookup_impl_witness %.Self.3ca, @A [symbolic_self] +// CHECK:STDOUT: %A.facet.ace: %A.type = facet_value %.Self.as_type.adb, (%A.lookup_impl_witness.5ad) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %A.lookup_impl_witness.5ad, element0 [symbolic_self] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %A_where.type.bcb: type = facet_type <@A where %impl.elem0 = bool> [concrete] -// CHECK:STDOUT: %.Self.80b: %A_where.type.bcb = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type.ec1: type = facet_access_type %.Self.80b [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.d15: = facet_access_witness %.Self.80b, element0 [symbolic_self] -// CHECK:STDOUT: %A.facet.271: %A.type = facet_value %.Self.as_type.ec1, (%.Self.as_wit.iface0.d15) [symbolic_self] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.d15, element1 [symbolic_self] -// CHECK:STDOUT: %A_where.type.0fe: type = facet_type <@A where %impl.elem0 = bool and %impl.elem1 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %D: %A_where.type.0fe = bind_symbolic_name D, 0 [symbolic] -// CHECK:STDOUT: %D.patt: %A_where.type.0fe = symbolic_binding_pattern D, 0 [symbolic] +// CHECK:STDOUT: %A_where.type.ef7: type = facet_type <@A where %impl.elem0 = bool> [concrete] +// CHECK:STDOUT: %.Self.60a: %A_where.type.ef7 = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.e64: type = facet_access_type %.Self.60a [symbolic_self] +// CHECK:STDOUT: %A.lookup_impl_witness.138: = lookup_impl_witness %.Self.60a, @A [symbolic_self] +// CHECK:STDOUT: %A.facet.418: %A.type = facet_value %.Self.as_type.e64, (%A.lookup_impl_witness.138) [symbolic_self] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %A.lookup_impl_witness.138, element1 [symbolic_self] +// CHECK:STDOUT: %A_where.type.2d0: type = facet_type <@A where %impl.elem0 = bool and %impl.elem1 = %empty_tuple.type> [concrete] +// CHECK:STDOUT: %D: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic] +// CHECK:STDOUT: %D.patt: %A_where.type.2d0 = symbolic_binding_pattern D, 0 [symbolic] // CHECK:STDOUT: %NestedRewrite.type: type = fn_type @NestedRewrite [concrete] // CHECK:STDOUT: %NestedRewrite: %NestedRewrite.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -332,37 +331,35 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {} // CHECK:STDOUT: %NestedRewrite.decl: %NestedRewrite.type = fn_decl @NestedRewrite [concrete = constants.%NestedRewrite] { -// CHECK:STDOUT: %D.patt.loc9_18.1: %A_where.type.0fe = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc9_18.2 (constants.%D.patt)] +// CHECK:STDOUT: %D.patt.loc9_18.1: %A_where.type.2d0 = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc9_18.2 (constants.%D.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_42.1: type = splice_block %.loc9_42.2 [concrete = constants.%A_where.type.0fe] { +// CHECK:STDOUT: %.loc9_42.1: type = splice_block %.loc9_42.2 [concrete = constants.%A_where.type.2d0] { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %.Self.1: %A.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3ca] // CHECK:STDOUT: %.Self.ref.loc9_31: %A.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.3ca] // CHECK:STDOUT: %B.ref: %A.assoc_type = name_ref B, @B.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9_31: type = facet_access_type %.Self.ref.loc9_31 [symbolic_self = constants.%.Self.as_type.adb] // CHECK:STDOUT: %.loc9_31: type = converted %.Self.ref.loc9_31, %.Self.as_type.loc9_31 [symbolic_self = constants.%.Self.as_type.adb] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_31: = facet_access_witness %.Self.ref.loc9_31, element0 [symbolic_self = constants.%.Self.as_wit.iface0.844] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.loc9_31, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%A.lookup_impl_witness.5ad, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc9_36.1: type = value_of_initializer %bool.make_type [concrete = bool] // CHECK:STDOUT: %.loc9_36.2: type = converted %bool.make_type, %.loc9_36.1 [concrete = bool] -// CHECK:STDOUT: %.loc9_25: type = where_expr %.Self.1 [concrete = constants.%A_where.type.bcb] { +// CHECK:STDOUT: %.loc9_25: type = where_expr %.Self.1 [concrete = constants.%A_where.type.ef7] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_36.2 // CHECK:STDOUT: } -// CHECK:STDOUT: %.Self.2: %A_where.type.bcb = bind_symbolic_name .Self [symbolic_self = constants.%.Self.80b] -// CHECK:STDOUT: %.Self.ref.loc9_48: %A_where.type.bcb = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.80b] +// CHECK:STDOUT: %.Self.2: %A_where.type.ef7 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.60a] +// CHECK:STDOUT: %.Self.ref.loc9_48: %A_where.type.ef7 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.60a] // CHECK:STDOUT: %C.ref: %A.assoc_type = name_ref C, @C.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_type.loc9_48: type = facet_access_type %.Self.ref.loc9_48 [symbolic_self = constants.%.Self.as_type.ec1] -// CHECK:STDOUT: %.loc9_48: type = converted %.Self.ref.loc9_48, %.Self.as_type.loc9_48 [symbolic_self = constants.%.Self.as_type.ec1] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_48: = facet_access_witness %.Self.ref.loc9_48, element0 [symbolic_self = constants.%.Self.as_wit.iface0.d15] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.loc9_48, element1 [symbolic_self = constants.%impl.elem1] +// CHECK:STDOUT: %.Self.as_type.loc9_48: type = facet_access_type %.Self.ref.loc9_48 [symbolic_self = constants.%.Self.as_type.e64] +// CHECK:STDOUT: %.loc9_48: type = converted %.Self.ref.loc9_48, %.Self.as_type.loc9_48 [symbolic_self = constants.%.Self.as_type.e64] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%A.lookup_impl_witness.138, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %.loc9_54.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_54.2: type = converted %.loc9_54.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_42.2: type = where_expr %.Self.2 [concrete = constants.%A_where.type.0fe] { +// CHECK:STDOUT: %.loc9_42.2: type = where_expr %.Self.2 [concrete = constants.%A_where.type.2d0] { // CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc9_54.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %D.loc9_18.1: %A_where.type.0fe = bind_symbolic_name D, 0 [symbolic = %D.loc9_18.2 (constants.%D)] +// CHECK:STDOUT: %D.loc9_18.1: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic = %D.loc9_18.2 (constants.%D)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -390,9 +387,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: assoc_const C:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NestedRewrite(%D.loc9_18.1: %A_where.type.0fe) { -// CHECK:STDOUT: %D.loc9_18.2: %A_where.type.0fe = bind_symbolic_name D, 0 [symbolic = %D.loc9_18.2 (constants.%D)] -// CHECK:STDOUT: %D.patt.loc9_18.2: %A_where.type.0fe = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc9_18.2 (constants.%D.patt)] +// CHECK:STDOUT: generic fn @NestedRewrite(%D.loc9_18.1: %A_where.type.2d0) { +// CHECK:STDOUT: %D.loc9_18.2: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic = %D.loc9_18.2 (constants.%D)] +// CHECK:STDOUT: %D.patt.loc9_18.2: %A_where.type.2d0 = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc9_18.2 (constants.%D.patt)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -401,9 +398,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @B(constants.%A.facet.aea) {} +// CHECK:STDOUT: specific @B(constants.%A.facet.ace) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%A.facet.271) {} +// CHECK:STDOUT: specific @C(constants.%A.facet.418) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @NestedRewrite(constants.%D) { // CHECK:STDOUT: %D.loc9_18.2 => constants.%D @@ -419,9 +416,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %assoc0: %E.assoc_type = assoc_entity element0, @E.%F [concrete] // CHECK:STDOUT: %.Self: %E.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] -// CHECK:STDOUT: %E.facet: %E.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: %E.lookup_impl_witness: = lookup_impl_witness %.Self, @E [symbolic_self] +// CHECK:STDOUT: %E.facet: %E.type = facet_value %.Self.as_type, (%E.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %E.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] @@ -434,13 +431,13 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %H.patt: %E_where.type = symbolic_binding_pattern H, 0 [symbolic] // CHECK:STDOUT: %RepeatedRewrite.type: type = fn_type @RepeatedRewrite [concrete] // CHECK:STDOUT: %RepeatedRewrite: %RepeatedRewrite.type = struct_value () [concrete] -// CHECK:STDOUT: %OneRewrite.specific_fn.90a0d5.1: = specific_function %OneRewrite, @OneRewrite(%H) [symbolic] +// CHECK:STDOUT: %OneRewrite.specific_fn.7fa5d5.1: = specific_function %OneRewrite, @OneRewrite(%H) [symbolic] // CHECK:STDOUT: %I: %E_where.type = bind_symbolic_name I, 0 [symbolic] // CHECK:STDOUT: %I.patt: %E_where.type = symbolic_binding_pattern I, 0 [symbolic] // CHECK:STDOUT: %OneRewriteAgain.type: type = fn_type @OneRewriteAgain [concrete] // CHECK:STDOUT: %OneRewriteAgain: %OneRewriteAgain.type = struct_value () [concrete] // CHECK:STDOUT: %RepeatedRewrite.specific_fn: = specific_function %RepeatedRewrite, @RepeatedRewrite(%I) [symbolic] -// CHECK:STDOUT: %OneRewrite.specific_fn.90a0d5.2: = specific_function %OneRewrite, @OneRewrite(%I) [symbolic] +// CHECK:STDOUT: %OneRewrite.specific_fn.7fa5d5.2: = specific_function %OneRewrite, @OneRewrite(%I) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -471,8 +468,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %F.ref: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_27: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // 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: %.loc8_21.2: type = where_expr %.Self [concrete = constants.%E_where.type] { @@ -491,16 +487,14 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %F.ref.loc10_32: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_32, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_32: = facet_access_witness %.Self.ref.loc10_32, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access %.Self.as_wit.iface0.loc10_32, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_32.loc10_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc10_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.Self.ref.loc10_45: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %F.ref.loc10_45: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_45: type = facet_access_type %.Self.ref.loc10_45 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_45: type = converted %.Self.ref.loc10_45, %.Self.as_type.loc10_45 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc10_45: = facet_access_witness %.Self.ref.loc10_45, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0.loc10_45: type = impl_witness_access %.Self.as_wit.iface0.loc10_45, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc10_45: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_32.loc10_50: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc10_50: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc10_26.2: type = where_expr %.Self [concrete = constants.%E_where.type] { @@ -520,8 +514,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %F.ref: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc14_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // 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: %.loc14_26.2: type = where_expr %.Self [concrete = constants.%E_where.type] { @@ -565,13 +558,13 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %H.patt.loc10_20.2: %E_where.type = symbolic_binding_pattern H, 0 [symbolic = %H.patt.loc10_20.2 (constants.%H.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.2: = specific_function constants.%OneRewrite, @OneRewrite(%H.loc10_20.2) [symbolic = %OneRewrite.specific_fn.loc11_3.2 (constants.%OneRewrite.specific_fn.90a0d5.1)] +// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.2: = specific_function constants.%OneRewrite, @OneRewrite(%H.loc10_20.2) [symbolic = %OneRewrite.specific_fn.loc11_3.2 (constants.%OneRewrite.specific_fn.7fa5d5.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %OneRewrite.ref: %OneRewrite.type = name_ref OneRewrite, file.%OneRewrite.decl [concrete = constants.%OneRewrite] // CHECK:STDOUT: %H.ref: %E_where.type = name_ref H, %H.loc10_20.1 [symbolic = %H.loc10_20.2 (constants.%H)] -// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.1: = specific_function %OneRewrite.ref, @OneRewrite(constants.%H) [symbolic = %OneRewrite.specific_fn.loc11_3.2 (constants.%OneRewrite.specific_fn.90a0d5.1)] +// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.1: = specific_function %OneRewrite.ref, @OneRewrite(constants.%H) [symbolic = %OneRewrite.specific_fn.loc11_3.2 (constants.%OneRewrite.specific_fn.7fa5d5.1)] // CHECK:STDOUT: %OneRewrite.call: init %empty_tuple.type = call %OneRewrite.specific_fn.loc11_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -627,7 +620,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %H.patt.loc10_20.2 => constants.%H.patt // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.2 => constants.%OneRewrite.specific_fn.90a0d5.2 +// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.2 => constants.%OneRewrite.specific_fn.7fa5d5.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @RepeatedRewrite(@OneRewriteAgain.%I.loc14_20.2) {} @@ -649,11 +642,11 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%L [concrete] // CHECK:STDOUT: %.Self: %J.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] -// CHECK:STDOUT: %J.facet: %J.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: %J.lookup_impl_witness: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0, element1 [symbolic_self] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %J.lookup_impl_witness, element1 [symbolic_self] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0 = %empty_tuple.type and %impl.elem1 = bool> [concrete] @@ -695,16 +688,14 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %K.ref: %J.assoc_type = name_ref K, @K.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9_29: type = facet_access_type %.Self.ref.loc9_29 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_29: type = converted %.Self.ref.loc9_29, %.Self.as_type.loc9_29 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_29: = facet_access_witness %.Self.ref.loc9_29, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.loc9_29, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_35.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_35.2: type = converted %.loc9_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.Self.ref.loc9_41: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %L.ref: %J.assoc_type = name_ref L, @L.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc9_41: type = facet_access_type %.Self.ref.loc9_41 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_41: type = converted %.Self.ref.loc9_41, %.Self.as_type.loc9_41 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc9_41: = facet_access_witness %.Self.ref.loc9_41, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.loc9_41, element1 [symbolic_self = constants.%impl.elem1] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%J.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc9_46.1: type = value_of_initializer %bool.make_type [concrete = bool] // CHECK:STDOUT: %.loc9_46.2: type = converted %bool.make_type, %.loc9_46.1 [concrete = bool] @@ -725,8 +716,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %L.ref: %J.assoc_type = name_ref L, @L.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc11_25: type = facet_access_type %.Self.ref.loc11_25 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_25: type = converted %.Self.ref.loc11_25, %.Self.as_type.loc11_25 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc11_25: = facet_access_witness %.Self.ref.loc11_25, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.loc11_25, element1 [symbolic_self = constants.%impl.elem1] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%J.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %bool.make_type [concrete = bool] // CHECK:STDOUT: %.loc11_30.2: type = converted %bool.make_type, %.loc11_30.1 [concrete = bool] @@ -734,8 +724,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %K.ref: %J.assoc_type = name_ref K, @K.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc11_39: type = facet_access_type %.Self.ref.loc11_39 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_39: type = converted %.Self.ref.loc11_39, %.Self.as_type.loc11_39 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc11_39: = facet_access_witness %.Self.ref.loc11_39, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.loc11_39, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc11_45.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_45.2: type = converted %.loc11_45.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc11_19.2: type = where_expr %.Self [concrete = constants.%J_where.type] { @@ -836,27 +825,27 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %assoc0: %O.assoc_type = assoc_entity element0, @O.%P [concrete] // CHECK:STDOUT: %.Self: %O.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] -// CHECK:STDOUT: %O.facet: %O.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: %O.lookup_impl_witness.c7a: = lookup_impl_witness %.Self, @O [symbolic_self] +// CHECK:STDOUT: %O.facet: %O.type = facet_value %.Self.as_type, (%O.lookup_impl_witness.c7a) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %O.lookup_impl_witness.c7a, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %O_where.type.fe1: type = facet_type <@O where %impl.elem0 = %i32> [concrete] -// CHECK:STDOUT: %Q: %O_where.type.fe1 = bind_symbolic_name Q, 0 [symbolic] -// CHECK:STDOUT: %Q.patt: %O_where.type.fe1 = symbolic_binding_pattern Q, 0 [symbolic] +// CHECK:STDOUT: %O_where.type.e27: type = facet_type <@O where %impl.elem0 = %i32> [concrete] +// CHECK:STDOUT: %Q: %O_where.type.e27 = bind_symbolic_name Q, 0 [symbolic] +// CHECK:STDOUT: %Q.patt: %O_where.type.e27 = symbolic_binding_pattern Q, 0 [symbolic] // CHECK:STDOUT: %WithInteger.type: type = fn_type @WithInteger [concrete] // CHECK:STDOUT: %WithInteger: %WithInteger.type = struct_value () [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %O_where.type.741: type = facet_type <@O where %impl.elem0 = bool> [concrete] -// CHECK:STDOUT: %R: %O_where.type.741 = bind_symbolic_name R, 0 [symbolic] -// CHECK:STDOUT: %R.patt: %O_where.type.741 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %O_where.type.e45: type = facet_type <@O where %impl.elem0 = bool> [concrete] +// CHECK:STDOUT: %R: %O_where.type.e45 = bind_symbolic_name R, 0 [symbolic] +// CHECK:STDOUT: %R.patt: %O_where.type.e45 = symbolic_binding_pattern R, 0 [symbolic] // CHECK:STDOUT: %WithBool.type: type = fn_type @WithBool [concrete] // CHECK:STDOUT: %WithBool: %WithBool.type = struct_value () [concrete] -// CHECK:STDOUT: %R.as_wit.iface0: = facet_access_witness %R, element0 [symbolic] +// CHECK:STDOUT: %O.lookup_impl_witness.c41: = lookup_impl_witness %R, @O [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %facet_value: %O_where.type.fe1 = facet_value %R.as_type, (%R.as_wit.iface0) [symbolic] +// CHECK:STDOUT: %facet_value: %O_where.type.e27 = facet_value %R.as_type, (%O.lookup_impl_witness.c41) [symbolic] // CHECK:STDOUT: %WithInteger.specific_fn: = specific_function %WithInteger, @WithInteger(%facet_value) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -879,45 +868,43 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %O.decl: type = interface_decl @O [concrete = constants.%O.type] {} {} // CHECK:STDOUT: %WithInteger.decl: %WithInteger.type = fn_decl @WithInteger [concrete = constants.%WithInteger] { -// CHECK:STDOUT: %Q.patt.loc8_16.1: %O_where.type.fe1 = symbolic_binding_pattern Q, 0 [symbolic = %Q.patt.loc8_16.2 (constants.%Q.patt)] +// CHECK:STDOUT: %Q.patt.loc8_16.1: %O_where.type.e27 = symbolic_binding_pattern Q, 0 [symbolic = %Q.patt.loc8_16.2 (constants.%Q.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_22.1: type = splice_block %.loc8_22.2 [concrete = constants.%O_where.type.fe1] { +// CHECK:STDOUT: %.loc8_22.1: type = splice_block %.loc8_22.2 [concrete = constants.%O_where.type.e27] { // CHECK:STDOUT: %O.ref: type = name_ref O, file.%O.decl [concrete = constants.%O.type] // CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %O.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %P.ref: %O.assoc_type = name_ref P, @P.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_28: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%O.lookup_impl_witness.c7a, element0 [symbolic_self = constants.%impl.elem0] // 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: %.loc8_22.2: type = where_expr %.Self [concrete = constants.%O_where.type.fe1] { +// CHECK:STDOUT: %.loc8_22.2: type = where_expr %.Self [concrete = constants.%O_where.type.e27] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %Q.loc8_16.1: %O_where.type.fe1 = bind_symbolic_name Q, 0 [symbolic = %Q.loc8_16.2 (constants.%Q)] +// CHECK:STDOUT: %Q.loc8_16.1: %O_where.type.e27 = bind_symbolic_name Q, 0 [symbolic = %Q.loc8_16.2 (constants.%Q)] // CHECK:STDOUT: } // CHECK:STDOUT: %WithBool.decl: %WithBool.type = fn_decl @WithBool [concrete = constants.%WithBool] { -// CHECK:STDOUT: %R.patt.loc10_13.1: %O_where.type.741 = symbolic_binding_pattern R, 0 [symbolic = %R.patt.loc10_13.2 (constants.%R.patt)] +// CHECK:STDOUT: %R.patt.loc10_13.1: %O_where.type.e45 = symbolic_binding_pattern R, 0 [symbolic = %R.patt.loc10_13.2 (constants.%R.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_19.1: type = splice_block %.loc10_19.2 [concrete = constants.%O_where.type.741] { +// CHECK:STDOUT: %.loc10_19.1: type = splice_block %.loc10_19.2 [concrete = constants.%O_where.type.e45] { // CHECK:STDOUT: %O.ref: type = name_ref O, file.%O.decl [concrete = constants.%O.type] // CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %O.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %P.ref: %O.assoc_type = name_ref P, @P.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_25: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%O.lookup_impl_witness.c7a, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc10_30.1: type = value_of_initializer %bool.make_type [concrete = bool] // CHECK:STDOUT: %.loc10_30.2: type = converted %bool.make_type, %.loc10_30.1 [concrete = bool] -// CHECK:STDOUT: %.loc10_19.2: type = where_expr %.Self [concrete = constants.%O_where.type.741] { +// CHECK:STDOUT: %.loc10_19.2: type = where_expr %.Self [concrete = constants.%O_where.type.e45] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_30.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %R.loc10_13.1: %O_where.type.741 = bind_symbolic_name R, 0 [symbolic = %R.loc10_13.2 (constants.%R)] +// CHECK:STDOUT: %R.loc10_13.1: %O_where.type.e45 = bind_symbolic_name R, 0 [symbolic = %R.loc10_13.2 (constants.%R)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -937,9 +924,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: assoc_const P:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @WithInteger(%Q.loc8_16.1: %O_where.type.fe1) { -// CHECK:STDOUT: %Q.loc8_16.2: %O_where.type.fe1 = bind_symbolic_name Q, 0 [symbolic = %Q.loc8_16.2 (constants.%Q)] -// CHECK:STDOUT: %Q.patt.loc8_16.2: %O_where.type.fe1 = symbolic_binding_pattern Q, 0 [symbolic = %Q.patt.loc8_16.2 (constants.%Q.patt)] +// CHECK:STDOUT: generic fn @WithInteger(%Q.loc8_16.1: %O_where.type.e27) { +// CHECK:STDOUT: %Q.loc8_16.2: %O_where.type.e27 = bind_symbolic_name Q, 0 [symbolic = %Q.loc8_16.2 (constants.%Q)] +// CHECK:STDOUT: %Q.patt.loc8_16.2: %O_where.type.e27 = symbolic_binding_pattern Q, 0 [symbolic = %Q.patt.loc8_16.2 (constants.%Q.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -949,24 +936,23 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @WithBool(%R.loc10_13.1: %O_where.type.741) { -// CHECK:STDOUT: %R.loc10_13.2: %O_where.type.741 = bind_symbolic_name R, 0 [symbolic = %R.loc10_13.2 (constants.%R)] -// CHECK:STDOUT: %R.patt.loc10_13.2: %O_where.type.741 = symbolic_binding_pattern R, 0 [symbolic = %R.patt.loc10_13.2 (constants.%R.patt)] +// CHECK:STDOUT: generic fn @WithBool(%R.loc10_13.1: %O_where.type.e45) { +// CHECK:STDOUT: %R.loc10_13.2: %O_where.type.e45 = bind_symbolic_name R, 0 [symbolic = %R.loc10_13.2 (constants.%R)] +// CHECK:STDOUT: %R.patt.loc10_13.2: %O_where.type.e45 = symbolic_binding_pattern R, 0 [symbolic = %R.patt.loc10_13.2 (constants.%R.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %R.as_wit.iface0.loc12_16.2: = facet_access_witness %R.loc10_13.2, element0 [symbolic = %R.as_wit.iface0.loc12_16.2 (constants.%R.as_wit.iface0)] +// CHECK:STDOUT: %O.lookup_impl_witness: = lookup_impl_witness %R.loc10_13.2, @O [symbolic = %O.lookup_impl_witness (constants.%O.lookup_impl_witness.c41)] // CHECK:STDOUT: %R.as_type.loc12_16.2: type = facet_access_type %R.loc10_13.2 [symbolic = %R.as_type.loc12_16.2 (constants.%R.as_type)] -// CHECK:STDOUT: %facet_value.loc12_16.2: %O_where.type.fe1 = facet_value %R.as_type.loc12_16.2, (%R.as_wit.iface0.loc12_16.2) [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc12_16.2: %O_where.type.e27 = facet_value %R.as_type.loc12_16.2, (%O.lookup_impl_witness) [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)] // CHECK:STDOUT: %WithInteger.specific_fn.loc12_3.2: = specific_function constants.%WithInteger, @WithInteger(%facet_value.loc12_16.2) [symbolic = %WithInteger.specific_fn.loc12_3.2 (constants.%WithInteger.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %WithInteger.ref: %WithInteger.type = name_ref WithInteger, file.%WithInteger.decl [concrete = constants.%WithInteger] -// CHECK:STDOUT: %R.ref: %O_where.type.741 = name_ref R, %R.loc10_13.1 [symbolic = %R.loc10_13.2 (constants.%R)] -// CHECK:STDOUT: %R.as_wit.iface0.loc12_16.1: = facet_access_witness constants.%R, element0 [symbolic = %R.as_wit.iface0.loc12_16.2 (constants.%R.as_wit.iface0)] +// CHECK:STDOUT: %R.ref: %O_where.type.e45 = name_ref R, %R.loc10_13.1 [symbolic = %R.loc10_13.2 (constants.%R)] // CHECK:STDOUT: %R.as_type.loc12_16.1: type = facet_access_type constants.%R [symbolic = %R.as_type.loc12_16.2 (constants.%R.as_type)] -// CHECK:STDOUT: %facet_value.loc12_16.1: %O_where.type.fe1 = facet_value %R.as_type.loc12_16.1, (%R.as_wit.iface0.loc12_16.1) [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)] -// CHECK:STDOUT: %.loc12: %O_where.type.fe1 = converted %R.ref, %facet_value.loc12_16.1 [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc12_16.1: %O_where.type.e27 = facet_value %R.as_type.loc12_16.1, (constants.%O.lookup_impl_witness.c41) [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)] +// CHECK:STDOUT: %.loc12: %O_where.type.e27 = converted %R.ref, %facet_value.loc12_16.1 [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)] // CHECK:STDOUT: %WithInteger.specific_fn.loc12_3.1: = specific_function %WithInteger.ref, @WithInteger(constants.%facet_value) [symbolic = %WithInteger.specific_fn.loc12_3.2 (constants.%WithInteger.specific_fn)] // CHECK:STDOUT: %WithInteger.call: init %empty_tuple.type = call %WithInteger.specific_fn.loc12_3.1() // CHECK:STDOUT: return @@ -1006,24 +992,24 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %assoc1: %S.assoc_type = assoc_entity element1, @S.%U [concrete] // CHECK:STDOUT: %.Self: %S.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] -// CHECK:STDOUT: %S.facet: %S.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: %S.lookup_impl_witness.ffa: = lookup_impl_witness %.Self, @S [symbolic_self] +// CHECK:STDOUT: %S.facet: %S.type = facet_value %.Self.as_type, (%S.lookup_impl_witness.ffa) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %S.lookup_impl_witness.ffa, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %S_where.type.15b: type = facet_type <@S where %impl.elem0 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %V: %S_where.type.15b = bind_symbolic_name V, 0 [symbolic] -// CHECK:STDOUT: %V.patt: %S_where.type.15b = symbolic_binding_pattern V, 0 [symbolic] +// CHECK:STDOUT: %S_where.type.4c2: type = facet_type <@S where %impl.elem0 = %empty_tuple.type> [concrete] +// CHECK:STDOUT: %V: %S_where.type.4c2 = bind_symbolic_name V, 0 [symbolic] +// CHECK:STDOUT: %V.patt: %S_where.type.4c2 = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %WithT.type: type = fn_type @WithT [concrete] // CHECK:STDOUT: %WithT: %WithT.type = struct_value () [concrete] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0, element1 [symbolic_self] -// CHECK:STDOUT: %S_where.type.0be: type = facet_type <@S where %impl.elem1 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %W: %S_where.type.0be = bind_symbolic_name W, 0 [symbolic] -// CHECK:STDOUT: %W.patt: %S_where.type.0be = symbolic_binding_pattern W, 0 [symbolic] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %S.lookup_impl_witness.ffa, element1 [symbolic_self] +// CHECK:STDOUT: %S_where.type.592: type = facet_type <@S where %impl.elem1 = %empty_tuple.type> [concrete] +// CHECK:STDOUT: %W: %S_where.type.592 = bind_symbolic_name W, 0 [symbolic] +// CHECK:STDOUT: %W.patt: %S_where.type.592 = symbolic_binding_pattern W, 0 [symbolic] // CHECK:STDOUT: %WithU.type: type = fn_type @WithU [concrete] // CHECK:STDOUT: %WithU: %WithU.type = struct_value () [concrete] -// CHECK:STDOUT: %W.as_wit.iface0: = facet_access_witness %W, element0 [symbolic] +// CHECK:STDOUT: %S.lookup_impl_witness.6f2: = lookup_impl_witness %W, @S [symbolic] // CHECK:STDOUT: %W.as_type: type = facet_access_type %W [symbolic] -// CHECK:STDOUT: %facet_value: %S_where.type.15b = facet_value %W.as_type, (%W.as_wit.iface0) [symbolic] +// CHECK:STDOUT: %facet_value: %S_where.type.4c2 = facet_value %W.as_type, (%S.lookup_impl_witness.6f2) [symbolic] // CHECK:STDOUT: %WithT.specific_fn: = specific_function %WithT, @WithT(%facet_value) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1044,44 +1030,42 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %S.decl: type = interface_decl @S [concrete = constants.%S.type] {} {} // CHECK:STDOUT: %WithT.decl: %WithT.type = fn_decl @WithT [concrete = constants.%WithT] { -// CHECK:STDOUT: %V.patt.loc9_10.1: %S_where.type.15b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc9_10.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.patt.loc9_10.1: %S_where.type.4c2 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc9_10.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [concrete = constants.%S_where.type.15b] { +// CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [concrete = constants.%S_where.type.4c2] { // CHECK:STDOUT: %S.ref: type = name_ref S, file.%S.decl [concrete = constants.%S.type] // CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %S.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.ref: %S.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%S.lookup_impl_witness.ffa, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_28.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_28.2: type = converted %.loc9_28.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_16.2: type = where_expr %.Self [concrete = constants.%S_where.type.15b] { +// CHECK:STDOUT: %.loc9_16.2: type = where_expr %.Self [concrete = constants.%S_where.type.4c2] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc9_10.1: %S_where.type.15b = bind_symbolic_name V, 0 [symbolic = %V.loc9_10.2 (constants.%V)] +// CHECK:STDOUT: %V.loc9_10.1: %S_where.type.4c2 = bind_symbolic_name V, 0 [symbolic = %V.loc9_10.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %WithU.decl: %WithU.type = fn_decl @WithU [concrete = constants.%WithU] { -// CHECK:STDOUT: %W.patt.loc11_10.1: %S_where.type.0be = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc11_10.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc11_10.1: %S_where.type.592 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc11_10.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_16.1: type = splice_block %.loc11_16.2 [concrete = constants.%S_where.type.0be] { +// CHECK:STDOUT: %.loc11_16.1: type = splice_block %.loc11_16.2 [concrete = constants.%S_where.type.592] { // CHECK:STDOUT: %S.ref: type = name_ref S, file.%S.decl [concrete = constants.%S.type] // CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %S.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.ref: %S.assoc_type = name_ref U, @U.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0, element1 [symbolic_self = constants.%impl.elem1] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%S.lookup_impl_witness.ffa, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %.loc11_28.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_28.2: type = converted %.loc11_28.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_16.2: type = where_expr %.Self [concrete = constants.%S_where.type.0be] { +// CHECK:STDOUT: %.loc11_16.2: type = where_expr %.Self [concrete = constants.%S_where.type.592] { // CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc11_28.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc11_10.1: %S_where.type.0be = bind_symbolic_name W, 0 [symbolic = %W.loc11_10.2 (constants.%W)] +// CHECK:STDOUT: %W.loc11_10.1: %S_where.type.592 = bind_symbolic_name W, 0 [symbolic = %W.loc11_10.2 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1109,9 +1093,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: assoc_const U:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @WithT(%V.loc9_10.1: %S_where.type.15b) { -// CHECK:STDOUT: %V.loc9_10.2: %S_where.type.15b = bind_symbolic_name V, 0 [symbolic = %V.loc9_10.2 (constants.%V)] -// CHECK:STDOUT: %V.patt.loc9_10.2: %S_where.type.15b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc9_10.2 (constants.%V.patt)] +// CHECK:STDOUT: generic fn @WithT(%V.loc9_10.1: %S_where.type.4c2) { +// CHECK:STDOUT: %V.loc9_10.2: %S_where.type.4c2 = bind_symbolic_name V, 0 [symbolic = %V.loc9_10.2 (constants.%V)] +// CHECK:STDOUT: %V.patt.loc9_10.2: %S_where.type.4c2 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc9_10.2 (constants.%V.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1121,24 +1105,23 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @WithU(%W.loc11_10.1: %S_where.type.0be) { -// CHECK:STDOUT: %W.loc11_10.2: %S_where.type.0be = bind_symbolic_name W, 0 [symbolic = %W.loc11_10.2 (constants.%W)] -// CHECK:STDOUT: %W.patt.loc11_10.2: %S_where.type.0be = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc11_10.2 (constants.%W.patt)] +// CHECK:STDOUT: generic fn @WithU(%W.loc11_10.1: %S_where.type.592) { +// CHECK:STDOUT: %W.loc11_10.2: %S_where.type.592 = bind_symbolic_name W, 0 [symbolic = %W.loc11_10.2 (constants.%W)] +// CHECK:STDOUT: %W.patt.loc11_10.2: %S_where.type.592 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc11_10.2 (constants.%W.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %W.as_wit.iface0.loc13_10.2: = facet_access_witness %W.loc11_10.2, element0 [symbolic = %W.as_wit.iface0.loc13_10.2 (constants.%W.as_wit.iface0)] +// CHECK:STDOUT: %S.lookup_impl_witness: = lookup_impl_witness %W.loc11_10.2, @S [symbolic = %S.lookup_impl_witness (constants.%S.lookup_impl_witness.6f2)] // CHECK:STDOUT: %W.as_type.loc13_10.2: type = facet_access_type %W.loc11_10.2 [symbolic = %W.as_type.loc13_10.2 (constants.%W.as_type)] -// CHECK:STDOUT: %facet_value.loc13_10.2: %S_where.type.15b = facet_value %W.as_type.loc13_10.2, (%W.as_wit.iface0.loc13_10.2) [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc13_10.2: %S_where.type.4c2 = facet_value %W.as_type.loc13_10.2, (%S.lookup_impl_witness) [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)] // CHECK:STDOUT: %WithT.specific_fn.loc13_3.2: = specific_function constants.%WithT, @WithT(%facet_value.loc13_10.2) [symbolic = %WithT.specific_fn.loc13_3.2 (constants.%WithT.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %WithT.ref: %WithT.type = name_ref WithT, file.%WithT.decl [concrete = constants.%WithT] -// CHECK:STDOUT: %W.ref: %S_where.type.0be = name_ref W, %W.loc11_10.1 [symbolic = %W.loc11_10.2 (constants.%W)] -// CHECK:STDOUT: %W.as_wit.iface0.loc13_10.1: = facet_access_witness constants.%W, element0 [symbolic = %W.as_wit.iface0.loc13_10.2 (constants.%W.as_wit.iface0)] +// CHECK:STDOUT: %W.ref: %S_where.type.592 = name_ref W, %W.loc11_10.1 [symbolic = %W.loc11_10.2 (constants.%W)] // CHECK:STDOUT: %W.as_type.loc13_10.1: type = facet_access_type constants.%W [symbolic = %W.as_type.loc13_10.2 (constants.%W.as_type)] -// CHECK:STDOUT: %facet_value.loc13_10.1: %S_where.type.15b = facet_value %W.as_type.loc13_10.1, (%W.as_wit.iface0.loc13_10.1) [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)] -// CHECK:STDOUT: %.loc13: %S_where.type.15b = converted %W.ref, %facet_value.loc13_10.1 [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc13_10.1: %S_where.type.4c2 = facet_value %W.as_type.loc13_10.1, (constants.%S.lookup_impl_witness.6f2) [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)] +// CHECK:STDOUT: %.loc13: %S_where.type.4c2 = converted %W.ref, %facet_value.loc13_10.1 [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)] // CHECK:STDOUT: %WithT.specific_fn.loc13_3.1: = specific_function %WithT.ref, @WithT(constants.%facet_value) [symbolic = %WithT.specific_fn.loc13_3.2 (constants.%WithT.specific_fn)] // CHECK:STDOUT: %WithT.call: init %empty_tuple.type = call %WithT.specific_fn.loc13_3.1() // CHECK:STDOUT: return @@ -1183,9 +1166,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %N.type: type = facet_type <@N> [concrete] // CHECK:STDOUT: %.Self.9aa: %N.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.e75: = facet_access_witness %.Self.9aa, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a31: type = impl_witness_access %.Self.as_wit.iface0.e75, element0 [symbolic_self] -// CHECK:STDOUT: %N_where.type: type = facet_type <@N where %impl.elem0.a31 = %empty_struct_type> [concrete] +// CHECK:STDOUT: %N.lookup_impl_witness: = lookup_impl_witness %.Self.9aa, @N [symbolic_self] +// CHECK:STDOUT: %impl.elem0.abf: type = impl_witness_access %N.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %N_where.type: type = facet_type <@N where %impl.elem0.abf = %empty_struct_type> [concrete] // CHECK:STDOUT: %T.patt: %N_where.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T: %N_where.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] @@ -1194,15 +1177,15 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %NestedRewrite: %NestedRewrite.type = struct_value () [concrete] // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %.Self.3ca: %A.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.844: = facet_access_witness %.Self.3ca, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem0.696: type = impl_witness_access %.Self.as_wit.iface0.844, element0 [symbolic_self] -// CHECK:STDOUT: %A_where.type.bcb: type = facet_type <@A where %impl.elem0.696 = bool> [concrete] -// CHECK:STDOUT: %.Self.80b: %A_where.type.bcb = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.d15: = facet_access_witness %.Self.80b, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %.Self.as_wit.iface0.d15, element1 [symbolic_self] -// CHECK:STDOUT: %A_where.type.0fe: type = facet_type <@A where %impl.elem0.696 = bool and %impl.elem1 = %empty_tuple.type> [concrete] -// CHECK:STDOUT: %D.patt: %A_where.type.0fe = symbolic_binding_pattern D, 0 [symbolic] -// CHECK:STDOUT: %D: %A_where.type.0fe = bind_symbolic_name D, 0 [symbolic] +// CHECK:STDOUT: %A.lookup_impl_witness.5ad: = lookup_impl_witness %.Self.3ca, @A [symbolic_self] +// CHECK:STDOUT: %impl.elem0.2e8: type = impl_witness_access %A.lookup_impl_witness.5ad, element0 [symbolic_self] +// CHECK:STDOUT: %A_where.type.ef7: type = facet_type <@A where %impl.elem0.2e8 = bool> [concrete] +// CHECK:STDOUT: %.Self.60a: %A_where.type.ef7 = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %A.lookup_impl_witness.138: = lookup_impl_witness %.Self.60a, @A [symbolic_self] +// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %A.lookup_impl_witness.138, element1 [symbolic_self] +// CHECK:STDOUT: %A_where.type.2d0: type = facet_type <@A where %impl.elem0.2e8 = bool and %impl.elem1 = %empty_tuple.type> [concrete] +// CHECK:STDOUT: %D.patt: %A_where.type.2d0 = symbolic_binding_pattern D, 0 [symbolic] +// CHECK:STDOUT: %D: %A_where.type.2d0 = bind_symbolic_name D, 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: } @@ -1221,13 +1204,13 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Main.import_ref.169 = import_ref Main//equal_constraint, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.56b = import_ref Main//equal_constraint, loc5_8, unloaded // CHECK:STDOUT: %Main.P = import_ref Main//equal_constraint, P, unloaded -// CHECK:STDOUT: %Main.import_ref.3bc: %N_where.type = import_ref Main//equal_constraint, loc8_10, loaded [symbolic = @Equal.1.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.0bb: %N_where.type = import_ref Main//equal_constraint, loc8_10, loaded [symbolic = @Equal.1.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.b61 = import_ref Main//nested_rewrites, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.38f = import_ref Main//nested_rewrites, loc5_8, unloaded // CHECK:STDOUT: %Main.import_ref.30f = import_ref Main//nested_rewrites, loc6_8, unloaded // CHECK:STDOUT: %Main.B = import_ref Main//nested_rewrites, B, unloaded // CHECK:STDOUT: %Main.C = import_ref Main//nested_rewrites, C, unloaded -// CHECK:STDOUT: %Main.import_ref.3bd: %A_where.type.0fe = import_ref Main//nested_rewrites, loc9_18, loaded [symbolic = @NestedRewrite.%D (constants.%D)] +// CHECK:STDOUT: %Main.import_ref.5fe: %A_where.type.2d0 = import_ref Main//nested_rewrites, loc9_18, loaded [symbolic = @NestedRewrite.%D (constants.%D)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1269,16 +1252,16 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Equal.1(imports.%Main.import_ref.3bc: %N_where.type) [from "equal_constraint.carbon"] { +// CHECK:STDOUT: generic fn @Equal.1(imports.%Main.import_ref.0bb: %N_where.type) [from "equal_constraint.carbon"] { // CHECK:STDOUT: %T: %N_where.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: %N_where.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NestedRewrite(imports.%Main.import_ref.3bd: %A_where.type.0fe) [from "nested_rewrites.carbon"] { -// CHECK:STDOUT: %D: %A_where.type.0fe = bind_symbolic_name D, 0 [symbolic = %D (constants.%D)] -// CHECK:STDOUT: %D.patt: %A_where.type.0fe = symbolic_binding_pattern D, 0 [symbolic = %D.patt (constants.%D.patt)] +// CHECK:STDOUT: generic fn @NestedRewrite(imports.%Main.import_ref.5fe: %A_where.type.2d0) [from "nested_rewrites.carbon"] { +// CHECK:STDOUT: %D: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic = %D (constants.%D)] +// CHECK:STDOUT: %D.patt: %A_where.type.2d0 = symbolic_binding_pattern D, 0 [symbolic = %D.patt (constants.%D.patt)] // CHECK:STDOUT: // CHECK:STDOUT: fn; // CHECK:STDOUT: } @@ -1302,9 +1285,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %assoc0.7bc: %I.assoc_type = assoc_entity element0, @I.%Member [concrete] // CHECK:STDOUT: %.Self: %I.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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %RewriteTypeMismatch.type: type = fn_type @RewriteTypeMismatch [concrete] // CHECK:STDOUT: %RewriteTypeMismatch: %RewriteTypeMismatch.type = struct_value () [concrete] @@ -1336,8 +1319,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Member.ref: %I.assoc_type = name_ref Member, @Member.%assoc0 [concrete = constants.%assoc0.7bc] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc16_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc16_46: type = converted %int_2, [concrete = ] // CHECK:STDOUT: %.loc16_30.2: type = where_expr %.Self [concrete = ] { @@ -1572,28 +1554,28 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %assoc1: %E.assoc_type = assoc_entity element1, @E.%G [concrete] // CHECK:STDOUT: %.Self.da5: %E.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %.Self.as_type.34e: type = facet_access_type %.Self.da5 [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.7f0: = facet_access_witness %.Self.da5, element0 [symbolic_self] -// CHECK:STDOUT: %E.facet.99c: %E.type = facet_value %.Self.as_type.34e, (%.Self.as_wit.iface0.7f0) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0.7f0, element0 [symbolic_self] +// CHECK:STDOUT: %E.lookup_impl_witness.004: = lookup_impl_witness %.Self.da5, @E [symbolic_self] +// CHECK:STDOUT: %E.facet.2c4: %E.type = facet_value %.Self.as_type.34e, (%E.lookup_impl_witness.004) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %E.lookup_impl_witness.004, element0 [symbolic_self] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %impl.elem1.7a9: type = impl_witness_access %.Self.as_wit.iface0.7f0, element1 [symbolic_self] -// CHECK:STDOUT: %E_where.type.f28: type = facet_type <@E where %impl.elem0 = bool and %impl.elem1.7a9 = %empty_tuple.type> [concrete] +// CHECK:STDOUT: %impl.elem1.c11: type = impl_witness_access %E.lookup_impl_witness.004, element1 [symbolic_self] +// CHECK:STDOUT: %E_where.type.82c: type = facet_type <@E where %impl.elem0 = bool and %impl.elem1.c11 = %empty_tuple.type> [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %Float.type: type = fn_type @Float [concrete] // CHECK:STDOUT: %Float: %Float.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %E_where.type.c42: type = facet_type <@E where %impl.elem0 = %empty_struct_type> [concrete] -// CHECK:STDOUT: %.Self.450: %E_where.type.c42 = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type.450: type = facet_access_type %.Self.450 [symbolic_self] -// CHECK:STDOUT: %.Self.as_wit.iface0.b26: = facet_access_witness %.Self.450, element0 [symbolic_self] -// CHECK:STDOUT: %E.facet.8b4: %E.type = facet_value %.Self.as_type.450, (%.Self.as_wit.iface0.b26) [symbolic_self] -// CHECK:STDOUT: %impl.elem1.bae: type = impl_witness_access %.Self.as_wit.iface0.b26, element1 [symbolic_self] +// CHECK:STDOUT: %E_where.type.981: type = facet_type <@E where %impl.elem0 = %empty_struct_type> [concrete] +// CHECK:STDOUT: %.Self.956: %E_where.type.981 = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.eab: type = facet_access_type %.Self.956 [symbolic_self] +// CHECK:STDOUT: %E.lookup_impl_witness.d64: = lookup_impl_witness %.Self.956, @E [symbolic_self] +// CHECK:STDOUT: %E.facet.3c4: %E.type = facet_value %.Self.as_type.eab, (%E.lookup_impl_witness.d64) [symbolic_self] +// CHECK:STDOUT: %impl.elem1.072: type = impl_witness_access %E.lookup_impl_witness.d64, element1 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %E_where.type.7f5: type = facet_type <@E where %impl.elem0 = %empty_struct_type and %impl.elem1.bae = %i32> [concrete] -// CHECK:STDOUT: %E_where.type.ca8: type = facet_type <@E where %impl.elem0 = %impl.elem1.7a9> [concrete] +// CHECK:STDOUT: %E_where.type.a0d: type = facet_type <@E where %impl.elem0 = %empty_struct_type and %impl.elem1.072 = %i32> [concrete] +// CHECK:STDOUT: %E_where.type.0ba: type = facet_type <@E where %impl.elem0 = %impl.elem1.c11> [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1617,17 +1599,16 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %E.decl: type = interface_decl @E [concrete = constants.%E.type] {} {} // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %H.patt: %E_where.type.f28 = binding_pattern H +// CHECK:STDOUT: %H.patt: %E_where.type.82c = binding_pattern H // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_11.1: type = splice_block %.loc15_11.2 [concrete = constants.%E_where.type.f28] { +// CHECK:STDOUT: %.loc15_11.1: type = splice_block %.loc15_11.2 [concrete = constants.%E_where.type.82c] { // CHECK:STDOUT: %E.ref.loc15: type = name_ref E, %E.decl [concrete = constants.%E.type] // CHECK:STDOUT: %.Self.1: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %.Self.ref.loc15_17: %E.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %F.ref.loc15: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc15_17: type = facet_access_type %.Self.ref.loc15_17 [symbolic_self = constants.%.Self.as_type.34e] // CHECK:STDOUT: %.loc15_17: type = converted %.Self.ref.loc15_17, %.Self.as_type.loc15_17 [symbolic_self = constants.%.Self.as_type.34e] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc15_17: = facet_access_witness %.Self.ref.loc15_17, element0 [symbolic_self = constants.%.Self.as_wit.iface0.7f0] -// CHECK:STDOUT: %impl.elem0.loc15: type = impl_witness_access %.Self.as_wit.iface0.loc15_17, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc15: type = impl_witness_access constants.%E.lookup_impl_witness.004, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc15_22.1: type = value_of_initializer %bool.make_type [concrete = bool] // CHECK:STDOUT: %.loc15_22.2: type = converted %bool.make_type, %.loc15_22.1 [concrete = bool] @@ -1635,70 +1616,65 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %G.ref.loc15: %E.assoc_type = name_ref G, @G.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc15_31: type = facet_access_type %.Self.ref.loc15_31 [symbolic_self = constants.%.Self.as_type.34e] // CHECK:STDOUT: %.loc15_31: type = converted %.Self.ref.loc15_31, %.Self.as_type.loc15_31 [symbolic_self = constants.%.Self.as_type.34e] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc15_31: = facet_access_witness %.Self.ref.loc15_31, element0 [symbolic_self = constants.%.Self.as_wit.iface0.7f0] -// CHECK:STDOUT: %impl.elem1.loc15: type = impl_witness_access %.Self.as_wit.iface0.loc15_31, element1 [symbolic_self = constants.%impl.elem1.7a9] +// CHECK:STDOUT: %impl.elem1.loc15: type = impl_witness_access constants.%E.lookup_impl_witness.004, element1 [symbolic_self = constants.%impl.elem1.c11] // CHECK:STDOUT: %.loc15_37.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_37.2: type = converted %.loc15_37.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc15_11.2: type = where_expr %.Self.1 [concrete = constants.%E_where.type.f28] { +// CHECK:STDOUT: %.loc15_11.2: type = where_expr %.Self.1 [concrete = constants.%E_where.type.82c] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc15, %.loc15_22.2 // CHECK:STDOUT: requirement_rewrite %impl.elem1.loc15, %.loc15_37.2 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %H: %E_where.type.f28 = bind_name H, +// CHECK:STDOUT: %H: %E_where.type.82c = bind_name H, // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %J.patt: %E_where.type.7f5 = binding_pattern J +// CHECK:STDOUT: %J.patt: %E_where.type.a0d = binding_pattern J // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21_27.1: type = splice_block %.loc21_27.2 [concrete = constants.%E_where.type.7f5] { +// CHECK:STDOUT: %.loc21_27.1: type = splice_block %.loc21_27.2 [concrete = constants.%E_where.type.a0d] { // CHECK:STDOUT: %E.ref.loc21: type = name_ref E, %E.decl [concrete = constants.%E.type] // CHECK:STDOUT: %.Self.2: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %.Self.ref.loc21_18: %E.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %F.ref.loc21: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc21_18: type = facet_access_type %.Self.ref.loc21_18 [symbolic_self = constants.%.Self.as_type.34e] // CHECK:STDOUT: %.loc21_18: type = converted %.Self.ref.loc21_18, %.Self.as_type.loc21_18 [symbolic_self = constants.%.Self.as_type.34e] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc21_18: = facet_access_witness %.Self.ref.loc21_18, element0 [symbolic_self = constants.%.Self.as_wit.iface0.7f0] -// CHECK:STDOUT: %impl.elem0.loc21: type = impl_witness_access %.Self.as_wit.iface0.loc21_18, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc21: type = impl_witness_access constants.%E.lookup_impl_witness.004, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc21_24.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc21_24.2: type = converted %.loc21_24.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc21_12: type = where_expr %.Self.2 [concrete = constants.%E_where.type.c42] { +// CHECK:STDOUT: %.loc21_12: type = where_expr %.Self.2 [concrete = constants.%E_where.type.981] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc21, %.loc21_24.2 // CHECK:STDOUT: } -// CHECK:STDOUT: %.Self.3: %E_where.type.c42 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.450] -// CHECK:STDOUT: %.Self.ref.loc21_33: %E_where.type.c42 = name_ref .Self, %.Self.3 [symbolic_self = constants.%.Self.450] +// CHECK:STDOUT: %.Self.3: %E_where.type.981 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.956] +// CHECK:STDOUT: %.Self.ref.loc21_33: %E_where.type.981 = name_ref .Self, %.Self.3 [symbolic_self = constants.%.Self.956] // CHECK:STDOUT: %G.ref.loc21: %E.assoc_type = name_ref G, @G.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_type.loc21_33: type = facet_access_type %.Self.ref.loc21_33 [symbolic_self = constants.%.Self.as_type.450] -// CHECK:STDOUT: %.loc21_33: type = converted %.Self.ref.loc21_33, %.Self.as_type.loc21_33 [symbolic_self = constants.%.Self.as_type.450] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc21_33: = facet_access_witness %.Self.ref.loc21_33, element0 [symbolic_self = constants.%.Self.as_wit.iface0.b26] -// CHECK:STDOUT: %impl.elem1.loc21: type = impl_witness_access %.Self.as_wit.iface0.loc21_33, element1 [symbolic_self = constants.%impl.elem1.bae] +// CHECK:STDOUT: %.Self.as_type.loc21_33: type = facet_access_type %.Self.ref.loc21_33 [symbolic_self = constants.%.Self.as_type.eab] +// CHECK:STDOUT: %.loc21_33: type = converted %.Self.ref.loc21_33, %.Self.as_type.loc21_33 [symbolic_self = constants.%.Self.as_type.eab] +// CHECK:STDOUT: %impl.elem1.loc21: type = impl_witness_access constants.%E.lookup_impl_witness.d64, element1 [symbolic_self = constants.%impl.elem1.072] // 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: %.loc21_27.2: type = where_expr %.Self.3 [concrete = constants.%E_where.type.7f5] { +// CHECK:STDOUT: %.loc21_27.2: type = where_expr %.Self.3 [concrete = constants.%E_where.type.a0d] { // CHECK:STDOUT: requirement_rewrite %impl.elem1.loc21, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %J: %E_where.type.7f5 = bind_name J, +// CHECK:STDOUT: %J: %E_where.type.a0d = bind_name J, // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %K.patt: %E_where.type.ca8 = binding_pattern K +// CHECK:STDOUT: %K.patt: %E_where.type.0ba = binding_pattern K // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc27_11.1: type = splice_block %.loc27_11.2 [concrete = constants.%E_where.type.ca8] { +// CHECK:STDOUT: %.loc27_11.1: type = splice_block %.loc27_11.2 [concrete = constants.%E_where.type.0ba] { // CHECK:STDOUT: %E.ref.loc27: type = name_ref E, %E.decl [concrete = constants.%E.type] // CHECK:STDOUT: %.Self.4: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %.Self.ref.loc27_17: %E.type = name_ref .Self, %.Self.4 [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %F.ref.loc27: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc27_17: type = facet_access_type %.Self.ref.loc27_17 [symbolic_self = constants.%.Self.as_type.34e] // CHECK:STDOUT: %.loc27_17: type = converted %.Self.ref.loc27_17, %.Self.as_type.loc27_17 [symbolic_self = constants.%.Self.as_type.34e] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc27_17: = facet_access_witness %.Self.ref.loc27_17, element0 [symbolic_self = constants.%.Self.as_wit.iface0.7f0] -// CHECK:STDOUT: %impl.elem0.loc27: type = impl_witness_access %.Self.as_wit.iface0.loc27_17, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0.loc27: type = impl_witness_access constants.%E.lookup_impl_witness.004, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.Self.ref.loc27_22: %E.type = name_ref .Self, %.Self.4 [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %G.ref.loc27: %E.assoc_type = name_ref G, @G.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc27_27: type = facet_access_type %.Self.ref.loc27_22 [symbolic_self = constants.%.Self.as_type.34e] // CHECK:STDOUT: %.loc27_27: type = converted %.Self.ref.loc27_22, %.Self.as_type.loc27_27 [symbolic_self = constants.%.Self.as_type.34e] -// CHECK:STDOUT: %.Self.as_wit.iface0.loc27_27: = facet_access_witness %.Self.ref.loc27_22, element0 [symbolic_self = constants.%.Self.as_wit.iface0.7f0] -// CHECK:STDOUT: %impl.elem1.loc27: type = impl_witness_access %.Self.as_wit.iface0.loc27_27, element1 [symbolic_self = constants.%impl.elem1.7a9] -// CHECK:STDOUT: %.loc27_11.2: type = where_expr %.Self.4 [concrete = constants.%E_where.type.ca8] { +// CHECK:STDOUT: %impl.elem1.loc27: type = impl_witness_access constants.%E.lookup_impl_witness.004, element1 [symbolic_self = constants.%impl.elem1.c11] +// CHECK:STDOUT: %.loc27_11.2: type = where_expr %.Self.4 [concrete = constants.%E_where.type.0ba] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc27, %impl.elem1.loc27 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %K: %E_where.type.ca8 = bind_name K, +// CHECK:STDOUT: %K: %E_where.type.0ba = bind_name K, // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @E { @@ -1738,9 +1714,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%E.facet.99c) {} +// CHECK:STDOUT: specific @F(constants.%E.facet.2c4) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%E.facet.99c) {} +// CHECK:STDOUT: specific @G(constants.%E.facet.2c4) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%E.facet.8b4) {} +// CHECK:STDOUT: specific @G(constants.%E.facet.3c4) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/non_generic.carbon b/toolchain/check/testdata/where_expr/non_generic.carbon index dc17b1472c97..260cd58e15cb 100644 --- a/toolchain/check/testdata/where_expr/non_generic.carbon +++ b/toolchain/check/testdata/where_expr/non_generic.carbon @@ -22,9 +22,9 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %.Self: %I.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] -// 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.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where TODO> [concrete] @@ -60,8 +60,7 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc14_27: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.as_wit.iface0: = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // 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: %.loc14_21.2: type = where_expr %.Self [concrete = constants.%I_where.type] { diff --git a/toolchain/check/type.cpp b/toolchain/check/type.cpp index 2b6e070bcd04..86a5bf807569 100644 --- a/toolchain/check/type.cpp +++ b/toolchain/check/type.cpp @@ -163,4 +163,33 @@ auto GetUnboundElementType(Context& context, SemIR::TypeInstId class_type_id, element_type_id); } +auto GetCanonicalizedFacetOrTypeValue(Context& context, SemIR::InstId inst_id) + -> SemIR::InstId { + // We can have FacetAccessType of a FacetValue, and a FacetValue of a + // FacetAccessType, but they don't nest indefinitely. + if (auto access = context.insts().TryGetAs(inst_id)) { + inst_id = access->facet_value_inst_id; + } + if (auto value = context.insts().TryGetAs(inst_id)) { + inst_id = value->type_inst_id; + + if (auto access = + context.insts().TryGetAs(inst_id)) { + inst_id = access->facet_value_inst_id; + } + } + + CARBON_CHECK(!context.insts().Is(inst_id)); + CARBON_CHECK(!context.insts().Is(inst_id)); + + return context.constant_values().GetConstantInstId(inst_id); +} + +auto GetCanonicalizedFacetOrTypeValue(Context& context, + SemIR::ConstantId const_id) + -> SemIR::ConstantId { + return context.constant_values().Get(GetCanonicalizedFacetOrTypeValue( + context, context.constant_values().GetInstId(const_id))); +} + } // namespace Carbon::Check diff --git a/toolchain/check/type.h b/toolchain/check/type.h index e9127efea0f2..b900094997ae 100644 --- a/toolchain/check/type.h +++ b/toolchain/check/type.h @@ -86,6 +86,20 @@ auto GetTupleType(Context& context, llvm::ArrayRef type_inst_ids) auto GetUnboundElementType(Context& context, SemIR::TypeInstId class_type_id, SemIR::TypeInstId element_type_id) -> SemIR::TypeId; +// Convert a facet value or type value instruction to a canonical facet or type +// value instruction. +// +// Type values are already canonical and are returned unchanged, except for +// `FacetAccessType` which is unwrapped to find the facet value it refers to. +// +// For facet values, unwraps `FacetValue` instructions to get to an underlying +// canonical type instruction. +auto GetCanonicalizedFacetOrTypeValue(Context& context, SemIR::InstId inst_id) + -> SemIR::InstId; +auto GetCanonicalizedFacetOrTypeValue(Context& context, + SemIR::ConstantId const_id) + -> SemIR::ConstantId; + } // namespace Carbon::Check #endif // CARBON_TOOLCHAIN_CHECK_TYPE_H_ diff --git a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon index 2a0a42f66d80..7762d5deccff 100644 --- a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon @@ -41,19 +41,19 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CH.Main() !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.31a2b92e2485bb9d(), !dbg !7 -// CHECK:STDOUT: call void @_CG.Main.d2cd8e785a426231(), !dbg !8 +// CHECK:STDOUT: call void @_CG.Main.47c020a542e13d96(), !dbg !7 +// CHECK:STDOUT: call void @_CG.Main.a10ac7cbfa858009(), !dbg !8 // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define void @_CG.Main.31a2b92e2485bb9d() !dbg !10 { +// CHECK:STDOUT: define void @_CG.Main.47c020a542e13d96() !dbg !10 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca i1, align 1, !dbg !11 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 1, ptr %x.var), !dbg !11 // CHECK:STDOUT: ret void, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define void @_CG.Main.d2cd8e785a426231() !dbg !13 { +// CHECK:STDOUT: define void @_CG.Main.a10ac7cbfa858009() !dbg !13 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !14 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 4, ptr %x.var), !dbg !14 @@ -81,9 +81,9 @@ fn H() { // CHECK:STDOUT: !7 = !DILocation(line: 34, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 35, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 33, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.31a2b92e2485bb9d", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.47c020a542e13d96", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !11 = !DILocation(line: 21, column: 3, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 20, column: 1, scope: !10) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.d2cd8e785a426231", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a10ac7cbfa858009", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !14 = !DILocation(line: 21, column: 3, scope: !13) // CHECK:STDOUT: !15 = !DILocation(line: 20, column: 1, scope: !13) diff --git a/toolchain/sem_ir/expr_info.cpp b/toolchain/sem_ir/expr_info.cpp index 50ba37ada2b4..4c26eb1edda3 100644 --- a/toolchain/sem_ir/expr_info.cpp +++ b/toolchain/sem_ir/expr_info.cpp @@ -109,7 +109,6 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory { case ConstType::Kind: case ConvertToValueAction::Kind: case FacetAccessType::Kind: - case FacetAccessWitness::Kind: case FacetType::Kind: case FacetValue::Kind: case FloatLiteral::Kind: diff --git a/toolchain/sem_ir/inst_kind.def b/toolchain/sem_ir/inst_kind.def index 0cb6cd342f4c..6d1e821bb3e8 100644 --- a/toolchain/sem_ir/inst_kind.def +++ b/toolchain/sem_ir/inst_kind.def @@ -59,7 +59,6 @@ CARBON_SEM_IR_INST_KIND(Deref) CARBON_SEM_IR_INST_KIND(ErrorInst) CARBON_SEM_IR_INST_KIND(ExportDecl) CARBON_SEM_IR_INST_KIND(FacetAccessType) -CARBON_SEM_IR_INST_KIND(FacetAccessWitness) CARBON_SEM_IR_INST_KIND(FacetType) CARBON_SEM_IR_INST_KIND(FacetValue) CARBON_SEM_IR_INST_KIND(FieldDecl) diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index 633231c8af70..5d4dac58c12a 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -621,18 +621,6 @@ auto InstNamer::CollectNamesInBlock(ScopeId top_scope_id, } continue; } - case CARBON_KIND(FacetAccessWitness inst): { - auto name_id = facet_access_name_id(inst.facet_value_inst_id); - RawStringOstream out; - if (name_id.has_value()) { - out << ".as_wit.iface" << inst.index.index; - add_inst_name_id(name_id, out.TakeStr()); - } else { - out << "as_wit.iface" << inst.index.index; - add_inst_name(out.TakeStr()); - } - continue; - } case CARBON_KIND(FacetType inst): { const auto& facet_type_info = sem_ir_->facet_types().Get(inst.facet_type_id); diff --git a/toolchain/sem_ir/stringify.cpp b/toolchain/sem_ir/stringify.cpp index 69174fa10ae4..4c29ed7618c8 100644 --- a/toolchain/sem_ir/stringify.cpp +++ b/toolchain/sem_ir/stringify.cpp @@ -295,13 +295,6 @@ class Stringifier { step_stack_->PushInstId(inst.facet_value_inst_id); } - auto StringifyInst(SemIR::InstId /*inst_id*/, FacetAccessWitness inst) - -> void { - *out_ << "Push(inst.facet_value_inst_id, ", interface ", inst.index, - ">"); - } - auto StringifyInst(SemIR::InstId /*inst_id*/, FacetType inst) -> void { const FacetTypeInfo& facet_type_info = sem_ir_->facet_types().Get(inst.facet_type_id); @@ -412,20 +405,7 @@ class Stringifier { lookup->query_specific_interface_id); } - if (auto witness = - sem_ir_->insts().TryGetAs(impl_witness_id)) { - auto witness_type_id = - sem_ir_->insts().Get(witness->facet_value_inst_id).type_id(); - auto facet_type = sem_ir_->types().GetAs(witness_type_id); - // TODO: Support != 1 interface better. - const auto& facet_type_info = - sem_ir_->facet_types().Get(facet_type.facet_type_id); - if (facet_type_info.extend_constraints.size() == 1) { - return facet_type_info.extend_constraints.front(); - } - } - - // TODO: Handle other cases. + // TODO: Handle ImplWitness. return std::nullopt; } @@ -466,17 +446,17 @@ class Stringifier { ")"); } - if (auto witness = - sem_ir_->insts().TryGetAs(witness_inst_id)) { + if (auto lookup = + sem_ir_->insts().TryGetAs(witness_inst_id)) { bool period_self = false; if (auto sym_name = sem_ir_->insts().TryGetAs( - witness->facet_value_inst_id)) { + lookup->query_self_inst_id)) { auto name_id = sem_ir_->entity_names().Get(sym_name->entity_name_id).name_id; period_self = (name_id == SemIR::NameId::PeriodSelf); } if (!period_self) { - step_stack_->PushInstId(witness->facet_value_inst_id); + step_stack_->PushInstId(lookup->query_self_inst_id); } } else { // TODO: Omit parens if not needed for precedence. diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index 2e335cd4b2b6..0210a0090196 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -694,24 +694,6 @@ struct FacetAccessType { InstId facet_value_inst_id; }; -// Represents accessing the `witness` field in a facet value, which is -// notionally a pair of a type and a witness. -struct FacetAccessWitness { - static constexpr auto Kind = - InstKind::FacetAccessWitness.Define( - {.ir_name = "facet_access_witness", - .constant_kind = InstConstantKind::SymbolicOnly, - .is_lowered = false}); - - // Always the builtin witness type. - TypeId type_id; - // An instruction that evaluates to a `FacetValue`. - InstId facet_value_inst_id; - // An index to a single `ImplWitness` in the witness block of the `FacetValue` - // from `facet_value_inst_id`. - ElementIndex index; -}; - // A facet type value. struct FacetType { static constexpr auto Kind = InstKind::FacetType.Define(