diff --git a/toolchain/check/BUILD b/toolchain/check/BUILD index 0cbd84d11b50..aeb610c9b3f2 100644 --- a/toolchain/check/BUILD +++ b/toolchain/check/BUILD @@ -118,7 +118,7 @@ cc_library( "//toolchain/parse:tree", "//toolchain/sem_ir:expr_info", "//toolchain/sem_ir:file", - "//toolchain/sem_ir:inst", + "//toolchain/sem_ir:formatter", "//toolchain/sem_ir:typed_insts", "@llvm-project//clang:frontend", "@llvm-project//clang:sema", @@ -189,7 +189,6 @@ cc_library( "//toolchain/sem_ir:entry_point", "//toolchain/sem_ir:expr_info", "//toolchain/sem_ir:file", - "//toolchain/sem_ir:inst", "//toolchain/sem_ir:typed_insts", "@llvm-project//llvm:Support", ], @@ -215,10 +214,10 @@ cc_library( deps = [ "//common:array_stack", "//common:check", + "//common:map", "//common:ostream", "//common:vlog", "//toolchain/sem_ir:file", - "//toolchain/sem_ir:inst", "//toolchain/sem_ir:typed_insts", "@llvm-project//llvm:Support", ], @@ -247,7 +246,7 @@ cc_library( ":context", "//common:check", "//toolchain/parse:node_kind", - "//toolchain/sem_ir:inst", + "//toolchain/sem_ir:file", "//toolchain/sem_ir:typed_insts", "@llvm-project//llvm:Support", ], diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index 7c9bac4b1ce7..a24bc521cbd2 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -21,6 +21,7 @@ #include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/diagnostics/format_providers.h" #include "toolchain/sem_ir/builtin_function_kind.h" +#include "toolchain/sem_ir/constant.h" #include "toolchain/sem_ir/function.h" #include "toolchain/sem_ir/generic.h" #include "toolchain/sem_ir/id_kind.h" @@ -93,11 +94,33 @@ class EvalContext { return constant_values().Get(args[bind_index.index]); } - // Given a constant value from the SemIR we're evaluating, finds the - // corresponding constant value to use in the context of this evaluation. - // This can be different if the original SemIR is for a generic and we are - // evaluating with specific arguments for the generic parameters. - auto GetInContext(SemIR::ConstantId const_id) -> SemIR::ConstantId { + // Given information about a symbolic constant, determine its value in the + // currently-being-evaluated eval block, if it refers to that eval block. If + // we can't find a value in this way, returns `None`. + auto GetInEvaluatedSpecific(const SemIR::SymbolicConstant& symbolic_info) + -> SemIR::ConstantId { + if (!specific_eval_info_ || !symbolic_info.index.has_value()) { + return SemIR::ConstantId::None; + } + + CARBON_CHECK( + symbolic_info.generic_id == specifics().Get(specific_id_).generic_id, + "Instruction has constant operand in wrong generic"); + if (symbolic_info.index.region() != specific_eval_info_->region) { + return SemIR::ConstantId::None; + } + + auto inst_id = specific_eval_info_->values[symbolic_info.index.index()]; + CARBON_CHECK(inst_id.has_value(), + "Forward reference in eval block: index {0} referenced " + "before evaluation", + symbolic_info.index.index()); + return constant_values().Get(inst_id); + } + + // Gets the constant value of the specified instruction in this context. + auto GetConstantValue(SemIR::InstId inst_id) -> SemIR::ConstantId { + auto const_id = constant_values().GetAttached(inst_id); if (!const_id.is_symbolic()) { return const_id; } @@ -107,53 +130,33 @@ class EvalContext { // specific itself yet, so `GetConstantValueInSpecific` won't be able to // find them. const auto& symbolic_info = constant_values().GetSymbolicConstant(const_id); - if (specific_eval_info_ && symbolic_info.index.has_value()) { - CARBON_CHECK( - symbolic_info.generic_id == specifics().Get(specific_id_).generic_id, - "Instruction has constant operand in wrong generic"); - if (symbolic_info.index.region() == specific_eval_info_->region) { - auto inst_id = specific_eval_info_->values[symbolic_info.index.index()]; - CARBON_CHECK(inst_id.has_value(), - "Forward reference in eval block: index {0} referenced " - "before evaluation", - symbolic_info.index.index()); - return constant_values().Get(inst_id); - } else { - // TODO: Eliminate this call. This is the only place where we get a - // value from a specific without using an InstId. There are three ways - // we can get here: - // 1) From GetConstantValue(InstId): these can use - // GetConstantValueInSpecific. - // 2) From GetConstantValue(TypeId): for these, we could change - // instructions so they store InstIds instead of TypeIds. - return GetConstantInSpecific(sem_ir(), specific_id_, const_id); - } + if (auto eval_block_const_id = GetInEvaluatedSpecific(symbolic_info); + eval_block_const_id.has_value()) { + return eval_block_const_id; } - // Map from a specific constant value to the canonical value. - return constant_values().Get(symbolic_info.inst_id); + return GetConstantValueInSpecific(sem_ir(), specific_id_, inst_id); } - // Gets the constant value of the specified instruction in this context. - auto GetConstantValue(SemIR::InstId inst_id) -> SemIR::ConstantId { - return GetInContext(constant_values().Get(inst_id)); - } + // Gets the type of the specified instruction in this context. + auto GetTypeOfInst(SemIR::InstId inst_id) -> SemIR::TypeId { + auto type_id = insts().GetAttachedType(inst_id); + if (!type_id.is_symbolic()) { + return type_id; + } - // Gets the constant value of the specified type in this context. - auto GetConstantValue(SemIR::TypeId type_id) -> SemIR::ConstantId { - return GetInContext(types().GetConstantId(type_id)); - } + // While resolving a specific, map from previous instructions in the eval + // block into their evaluated values. These values won't be present on the + // specific itself yet, so `GetTypeOfInstInSpecific` won't be able to + // find them. + const auto& symbolic_info = + constant_values().GetSymbolicConstant(types().GetConstantId(type_id)); + if (auto eval_block_const_id = GetInEvaluatedSpecific(symbolic_info); + eval_block_const_id.has_value()) { + return types().GetTypeIdForTypeConstantId(eval_block_const_id); + } - // Gets the constant value of the specified type in this context. - auto GetConstantValueAsType(SemIR::TypeId id) -> SemIR::TypeId { - return context().types().GetTypeIdForTypeConstantId(GetConstantValue(id)); - } - - // Gets the instruction describing the constant value of the specified type in - // this context. - auto GetConstantValueAsInst(SemIR::TypeId id) -> SemIR::Inst { - return insts().Get( - context().constant_values().GetInstId(GetConstantValue(id))); + return GetTypeOfInstInSpecific(sem_ir(), specific_id_, inst_id); } auto ints() -> SharedValueStores::IntStore& { return sem_ir().ints(); } @@ -445,14 +448,15 @@ static auto GetConstantValue(EvalContext& /*eval_context*/, return SemIR::InstId::None; } -// Given a type which may refer to a generic parameter, returns the +// Given an instruction whose type may refer to a generic parameter, returns the // corresponding type in the evaluation context. -static auto GetConstantValue(EvalContext& eval_context, SemIR::TypeId type_id, - Phase* phase) -> SemIR::TypeId { - auto const_id = eval_context.GetConstantValue(type_id); - *phase = - LatestPhase(*phase, GetPhase(eval_context.constant_values(), const_id)); - return eval_context.context().types().GetTypeIdForTypeConstantId(const_id); +static auto GetTypeOfInst(EvalContext& eval_context, SemIR::InstId inst_id, + Phase* phase) -> SemIR::TypeId { + auto type_id = eval_context.GetTypeOfInst(inst_id); + *phase = LatestPhase(*phase, + GetPhase(eval_context.constant_values(), + eval_context.types().GetConstantId(type_id))); + return type_id; } // AbsoluteInstBlockId can not have its values substituted, so this overload is @@ -717,19 +721,13 @@ static auto GetConstantValueForArg(EvalContext& eval_context, arg_and_kind.value(), phase); } -// Given an instruction, replaces its type and operands with their constant -// values from the specified evaluation context. `*phase` is updated to describe -// the constant phase of the result. Returns whether `*phase` is a constant -// phase; if not, `inst` may not be fully updated and should not be used. +// Given an instruction, replaces its operands with their constant values from +// the specified evaluation context. `*phase` is updated to describe the +// constant phase of the result. Returns whether `*phase` is a constant phase; +// if not, `inst` may not be fully updated and should not be used. static auto ReplaceAllFieldsWithConstantValues(EvalContext& eval_context, SemIR::Inst* inst, Phase* phase) -> bool { - auto type_id = GetConstantValue(eval_context, inst->type_id(), phase); - inst->SetType(type_id); - if (!IsConstant(*phase)) { - return false; - } - auto arg0 = GetConstantValueForArg(eval_context, inst->arg0_and_kind(), phase); if (!IsConstant(*phase)) { @@ -745,21 +743,51 @@ static auto ReplaceAllFieldsWithConstantValues(EvalContext& eval_context, return true; } +// Given an instruction and its ID, replaces its type with the corresponding +// value in this evaluation context. Updates `*phase` to describe the phase of +// the result, and returns whether `*phase` is a constant phase. +// +// If the `InstId` is not provided, the instruction is assumed to be new and +// therefore unattached, so the type is not updated. +static auto ReplaceTypeWithConstantValue(EvalContext& eval_context, + SemIR::InstId inst_id, + SemIR::Inst* inst, Phase* phase) + -> bool { + if (inst_id.has_value()) { + inst->SetType(GetTypeOfInst(eval_context, inst_id, phase)); + } + return IsConstant(*phase); +} + +template +static auto ReplaceTypeWithConstantValue(EvalContext& eval_context, + SemIR::InstId inst_id, InstT* inst, + Phase* phase) -> bool { + if (inst_id.has_value()) { + inst->type_id = GetTypeOfInst(eval_context, inst_id, phase); + } + return IsConstant(*phase); +} + auto AddImportedConstant(Context& context, SemIR::Inst inst) -> SemIR::ConstantId { EvalContext eval_context(&context, SemIR::LocId::None); Phase phase = Phase::Concrete; switch (inst.kind().value_kind()) { - case SemIR::InstValueKind::Typed: + case SemIR::InstValueKind::Typed: { + phase = GetPhase(context.constant_values(), + context.types().GetConstantId(inst.type_id())); // TODO: Can we avoid doing this replacement? It may do things that are // undesirable during importing, such as resolving specifics. if (!ReplaceAllFieldsWithConstantValues(eval_context, &inst, &phase)) { return SemIR::ConstantId::NotConstant; } break; - case SemIR::InstValueKind::None: + } + case SemIR::InstValueKind::None: { // Instructions without a type_id are not evaluated. break; + } } return MakeConstantResult(context, inst, phase); } @@ -784,8 +812,7 @@ static auto PerformArrayIndex(EvalContext& eval_context, SemIR::ArrayIndex inst) // Array indexing is invalid if the index is constant and out of range, // regardless of whether the array itself is constant. const auto& index_val = eval_context.ints().Get(index->int_id); - auto aggregate_type_id = eval_context.GetConstantValueAsType( - eval_context.insts().Get(inst.array_id).type_id()); + auto aggregate_type_id = eval_context.GetTypeOfInst(inst.array_id); if (auto array_type = eval_context.types().TryGetAs(aggregate_type_id)) { if (auto bound = eval_context.insts().TryGetAs( @@ -1607,8 +1634,9 @@ static auto MakeConstantForBuiltinCall(EvalContext& eval_context, } // Makes a constant for a call instruction. -static auto MakeConstantForCall(EvalContext& eval_context, SemIR::LocId loc_id, - SemIR::Call call) -> SemIR::ConstantId { +static auto MakeConstantForCall(EvalContext& eval_context, + SemIR::InstId inst_id, SemIR::Call call) + -> SemIR::ConstantId { Phase phase = Phase::Concrete; // A call with an invalid argument list is used to represent an erroneous @@ -1644,8 +1672,7 @@ static auto MakeConstantForCall(EvalContext& eval_context, SemIR::LocId loc_id, // Find the argument values and the return type. bool has_constant_operands = has_constant_callee && - ReplaceFieldWithConstantValue(eval_context, &call, &SemIR::Call::type_id, - &phase) && + ReplaceTypeWithConstantValue(eval_context, inst_id, &call, &phase) && ReplaceFieldWithConstantValue(eval_context, &call, &SemIR::Call::args_id, &phase); if (phase == Phase::UnknownDueToError) { @@ -1663,7 +1690,7 @@ static auto MakeConstantForCall(EvalContext& eval_context, SemIR::LocId loc_id, CARBON_DIAGNOSTIC(CompTimeOnlyFunctionHere, Note, "compile-time-only function declared here"); eval_context.emitter() - .Build(loc_id, NonConstantCallToCompTimeOnlyFunction) + .Build(inst_id, NonConstantCallToCompTimeOnlyFunction) .Note(eval_context.functions() .Get(callee_function.function_id) .latest_decl_id(), @@ -1676,7 +1703,7 @@ static auto MakeConstantForCall(EvalContext& eval_context, SemIR::LocId loc_id, // Handle calls to builtins. if (builtin_kind != SemIR::BuiltinFunctionKind::None) { return MakeConstantForBuiltinCall( - eval_context, loc_id, call, builtin_kind, + eval_context, SemIR::LocId(inst_id), call, builtin_kind, eval_context.inst_blocks().Get(call.args_id), phase); } @@ -1743,7 +1770,8 @@ static auto TryEvalTypedInst(EvalContext& eval_context, SemIR::InstId inst_id, // Build a constant instruction by replacing each non-constant operand with // its constant value. Phase phase = Phase::Concrete; - if (!ReplaceAllFieldsWithConstantValues(eval_context, &inst, &phase)) { + if (!ReplaceTypeWithConstantValue(eval_context, inst_id, &inst, &phase) || + !ReplaceAllFieldsWithConstantValues(eval_context, &inst, &phase)) { if constexpr (ConstantKind == SemIR::InstConstantKind::Always) { CARBON_CHECK(phase == Phase::UnknownDueToError, "{0} should always be constant", InstT::Kind); @@ -1799,9 +1827,7 @@ template <> auto TryEvalTypedInst(EvalContext& eval_context, SemIR::InstId inst_id, SemIR::Inst inst) -> SemIR::ConstantId { - return MakeConstantForCall(eval_context, - eval_context.GetDiagnosticLoc(inst_id), - inst.As()); + return MakeConstantForCall(eval_context, inst_id, inst.As()); } // ImportRefLoaded can have a constant value, but it's owned and maintained by @@ -1820,7 +1846,7 @@ auto TryEvalTypedInst(EvalContext& /*eval_context*/, // context and produce a context-specific value. template <> auto TryEvalTypedInst(EvalContext& eval_context, - SemIR::InstId /*inst_id*/, + SemIR::InstId inst_id, SemIR::Inst inst) -> SemIR::ConstantId { auto bind = inst.As(); @@ -1840,8 +1866,7 @@ auto TryEvalTypedInst(EvalContext& eval_context, // original, with no equivalent value. Phase phase = Phase::Concrete; bind.value_id = SemIR::InstId::None; - if (!ReplaceFieldWithConstantValue( - eval_context, &bind, &SemIR::BindSymbolicName::type_id, &phase) || + if (!ReplaceTypeWithConstantValue(eval_context, inst_id, &bind, &phase) || !ReplaceFieldWithConstantValue(eval_context, &bind, &SemIR::BindSymbolicName::entity_name_id, &phase)) { @@ -1888,9 +1913,9 @@ auto TryEvalTypedInst(EvalContext& eval_context, Phase phase = Phase::Concrete; SemIR::TypeId base_facet_type_id = - eval_context.insts().Get(typed_inst.period_self_id).type_id(); + eval_context.GetTypeOfInst(typed_inst.period_self_id); SemIR::Inst base_facet_inst = - eval_context.GetConstantValueAsInst(base_facet_type_id); + eval_context.types().GetAsInst(base_facet_type_id); SemIR::FacetTypeInfo info = {.other_requirements = false}; // `where` provides that the base facet is an error, `type`, or a facet // type. diff --git a/toolchain/check/generic.cpp b/toolchain/check/generic.cpp index 2a6514380d67..e7237df5d916 100644 --- a/toolchain/check/generic.cpp +++ b/toolchain/check/generic.cpp @@ -4,7 +4,6 @@ #include "toolchain/check/generic.h" -#include "common/map.h" #include "toolchain/base/kind_switch.h" #include "toolchain/check/diagnostic_helpers.h" #include "toolchain/check/eval.h" @@ -25,34 +24,37 @@ namespace Carbon::Check { static auto MakeSelfSpecificId(Context& context, SemIR::GenericId generic_id) -> SemIR::SpecificId; -auto StartGenericDecl(Context& context) -> void { - context.generic_region_stack().Push(); +// Get the current pending generic. If we have not yet allocated a `GenericId` +// for it, do so now. +static auto GetOrCreatePendingGeneric(Context& context) + -> GenericRegionStack::PendingGeneric { + auto pending_generic = context.generic_region_stack().PeekPendingGeneric(); + if (!pending_generic.generic_id.has_value()) { + // Allocate a placeholder generic now to form a generic ID. This generic + // will be populated once we reach the end of the generic declaration. + pending_generic.generic_id = context.generics().Add( + SemIR::Generic{.decl_id = SemIR::InstId::None, + .bindings_id = SemIR::InstBlockId::None, + .self_specific_id = SemIR::SpecificId::None}); + context.generic_region_stack().SetPendingGenericId( + pending_generic.generic_id); + } + return pending_generic; } -auto StartGenericDefinition(Context& context) -> void { - // Push a generic region even if we don't have a generic_id. We might still - // have locally-introduced generic parameters to track: - // - // fn F() { - // let T:! type = i32; - // var x: T; - // } - context.generic_region_stack().Push(); -} - -// Adds an instruction `generic_inst_id` to the eval block for a generic region, -// which is the current instruction block. The instruction `generic_inst_id` is -// expected to compute the value of the constant described by `const_inst_id` in -// each specific. Forms and returns a corresponding symbolic constant ID that -// refers to the substituted value of that instruction in each specific. +// Adds an instruction `generic_inst_id` to the eval block for the current +// generic region. The instruction `generic_inst_id` is expected to compute the +// value of the constant described by `const_inst_id` in each specific. Forms +// and returns a corresponding symbolic constant ID that refers to the +// substituted value of that instruction in each specific. static auto AddGenericConstantInstToEvalBlock( - Context& context, SemIR::GenericId generic_id, - SemIR::GenericInstIndex::Region region, SemIR::InstId const_inst_id, + Context& context, SemIR::InstId const_inst_id, SemIR::InstId generic_inst_id, SemIR::ConstantDependence dependence) -> SemIR::ConstantId { + auto [generic_id, region] = GetOrCreatePendingGeneric(context); auto index = SemIR::GenericInstIndex( - region, context.inst_block_stack().PeekCurrentBlockContents().size()); - context.inst_block_stack().AddInstId(generic_inst_id); + region, context.generic_region_stack().PeekEvalBlock().size()); + context.generic_region_stack().AddInstToEvalBlock(generic_inst_id); return context.constant_values().AddSymbolicConstant( {.inst_id = const_inst_id, .generic_id = generic_id, @@ -61,61 +63,50 @@ static auto AddGenericConstantInstToEvalBlock( } namespace { -// A map from an instruction ID representing a canonical symbolic constant to an -// instruction within an eval block of the generic that computes the specific -// value for that constant. -// -// We arbitrarily use a small size of 256 bytes for the map. -// TODO: Determine a better number based on measurements. -using ConstantsInGenericMap = Map; - // Substitution callbacks to rebuild a generic constant in the eval block for a // generic region. class RebuildGenericConstantInEvalBlockCallbacks : public SubstInstCallbacks { public: // `context` must not be null. - RebuildGenericConstantInEvalBlockCallbacks( - Context* context, SemIR::GenericId generic_id, - SemIR::GenericInstIndex::Region region, SemIR::LocId loc_id, - ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration) - : context_(context), - generic_id_(generic_id), - region_(region), + RebuildGenericConstantInEvalBlockCallbacks(Context* context, + SemIR::LocId loc_id) + : SubstInstCallbacks(context), loc_id_(loc_id), - constants_in_generic_(constants_in_generic), - inside_redeclaration_(inside_redeclaration) {} + constants_in_generic_( + context->generic_region_stack().PeekConstantsInGenericMap()) {} - auto context() const -> Context& { return *context_; } + auto RebuildType(SemIR::TypeInstId type_inst_id) const + -> SemIR::TypeId override { + // When building instructions in the eval block, form attached types. + return context().types().GetTypeIdForTypeConstantId( + context().constant_values().GetAttached(type_inst_id)); + } // Check for instructions for which we already have a mapping into the eval - // block, and substitute them for the instructions in the eval block. + // block, and substitute them with the instructions in the eval block. auto Subst(SemIR::InstId& inst_id) const -> bool override { - auto const_id = context_->constant_values().Get(inst_id); + auto const_id = context().constant_values().Get(inst_id); if (!const_id.has_value()) { // An unloaded import ref should never contain anything we need to // substitute into. Don't trigger loading it here. CARBON_CHECK( - context_->insts().Is(inst_id), + context().insts().Is(inst_id), "Substituting into instruction with invalid constant ID: {0}", - context_->insts().Get(inst_id)); + context().insts().Get(inst_id)); return true; } - if (!context_->constant_values().DependsOnGenericParameter(const_id)) { + if (!context().constant_values().DependsOnGenericParameter(const_id)) { // This instruction doesn't have a symbolic constant value, so can't // contain any bindings that need to be substituted. return true; } - // If this instruction is in the map, return the known result. + // If this constant value has a defining instruction in the eval block, + // replace the instruction in the body of the generic with the one from the + // eval block. if (auto result = constants_in_generic_.Lookup( - context_->constant_values().GetInstId(const_id))) { - // In order to reuse instructions from the generic as often as possible, - // keep this instruction as-is if it already has the desired symbolic - // constant value. - if (const_id != context_->constant_values().Get(result.value())) { - inst_id = result.value(); - } - CARBON_CHECK(inst_id.has_value()); + context().constant_values().GetInstId(const_id))) { + inst_id = result.value(); return true; } @@ -126,34 +117,24 @@ class RebuildGenericConstantInEvalBlockCallbacks : public SubstInstCallbacks { // constant. auto Rebuild(SemIR::InstId orig_inst_id, SemIR::Inst new_inst) const -> SemIR::InstId override { - auto& orig_symbolic_const = context_->constant_values().GetSymbolicConstant( - context_->constant_values().Get(orig_inst_id)); + auto& orig_symbolic_const = context().constant_values().GetSymbolicConstant( + context().constant_values().Get(orig_inst_id)); auto const_inst_id = orig_symbolic_const.inst_id; auto dependence = orig_symbolic_const.dependence; // We might already have an instruction in the eval block if a transitive // operand of this instruction has the same constant value. auto result = constants_in_generic_.Insert(const_inst_id, [&] { - if (inside_redeclaration_) { - // Adding instructions to a redeclaration causes crashes later since it - // causes us to produce invalid indices into the original declaration's - // set of instructions. So we terminate now and avoid adding a new - // instruction and new index. It should not be possible to create this - // situation where a generic redeclaration introduces new instructions - // to the eval block. - CARBON_FATAL("generic redeclaration differs from previous declaration"); - } - // TODO: Add a function on `Context` to add the instruction without // inserting it into the dependent instructions list or computing a // constant value for it. // TODO: Is the location we pick here always appropriate for the new // instruction? - auto inst_id = context_->sem_ir().insts().AddInNoBlock( + auto inst_id = context().sem_ir().insts().AddInNoBlock( SemIR::LocIdAndInst::UncheckedLoc(loc_id_, new_inst)); auto const_id = AddGenericConstantInstToEvalBlock( - *context_, generic_id_, region_, const_inst_id, inst_id, dependence); - context_->constant_values().Set(inst_id, const_id); + context(), const_inst_id, inst_id, dependence); + context().constant_values().Set(inst_id, const_id); return inst_id; }); return result.value(); @@ -161,7 +142,7 @@ class RebuildGenericConstantInEvalBlockCallbacks : public SubstInstCallbacks { auto ReuseUnchanged(SemIR::InstId orig_inst_id) const -> SemIR::InstId override { - auto inst = context_->insts().Get(orig_inst_id); + auto inst = context().insts().Get(orig_inst_id); CARBON_CHECK( inst.Is() || inst.Is(), @@ -174,12 +155,8 @@ class RebuildGenericConstantInEvalBlockCallbacks : public SubstInstCallbacks { } private: - Context* context_; - SemIR::GenericId generic_id_; - SemIR::GenericInstIndex::Region region_; SemIR::LocId loc_id_; ConstantsInGenericMap& constants_in_generic_; - bool inside_redeclaration_; }; // Substitution callbacks to rebuild a template action. This rebuilds the action @@ -188,14 +165,10 @@ class RebuildTemplateActionInEvalBlockCallbacks final : public RebuildGenericConstantInEvalBlockCallbacks { public: // `context` must not be null. - RebuildTemplateActionInEvalBlockCallbacks( - Context* context, SemIR::GenericId generic_id, - SemIR::GenericInstIndex::Region region, SemIR::LocId loc_id, - ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration, - SemIR::InstId action_inst_id) - : RebuildGenericConstantInEvalBlockCallbacks(context, generic_id, region, - loc_id, constants_in_generic, - inside_redeclaration), + RebuildTemplateActionInEvalBlockCallbacks(Context* context, + SemIR::LocId loc_id, + SemIR::InstId action_inst_id) + : RebuildGenericConstantInEvalBlockCallbacks(context, loc_id), action_inst_id_(action_inst_id) {} auto Rebuild(SemIR::InstId orig_inst_id, SemIR::Inst new_inst) const @@ -225,73 +198,67 @@ class RebuildTemplateActionInEvalBlockCallbacks final } // namespace // Adds instructions to compute the substituted version of `type_id` in each -// specific into the eval block for the generic, which is the current -// instruction block. Returns a symbolic type ID that refers to the substituted -// type in each specific. -static auto AddGenericTypeToEvalBlock( - Context& context, SemIR::GenericId generic_id, - SemIR::GenericInstIndex::Region region, SemIR::LocId loc_id, - ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration, - SemIR::TypeId type_id) -> SemIR::TypeId { +// specific into the eval block for the current generic region. Returns a +// symbolic type ID that refers to the substituted type in each specific. +static auto AddGenericTypeToEvalBlock(Context& context, SemIR::LocId loc_id, + SemIR::TypeId type_id) -> SemIR::TypeId { // Substitute into the type's constant instruction and rebuild it in the eval // block. auto type_inst_id = SubstInst(context, context.types().GetInstId(type_id), - RebuildGenericConstantInEvalBlockCallbacks( - &context, generic_id, region, loc_id, constants_in_generic, - inside_redeclaration)); - return context.types().GetTypeIdForTypeInstId(type_inst_id); + RebuildGenericConstantInEvalBlockCallbacks(&context, loc_id)); + return context.types().GetTypeIdForTypeConstantId( + context.constant_values().GetAttached(type_inst_id)); } // Adds instructions to compute the substituted value of `inst_id` in each -// specific into the eval block for the generic, which is the current -// instruction block. Returns a symbolic constant instruction ID that refers to -// the substituted constant value in each specific. -static auto AddGenericConstantToEvalBlock( - Context& context, SemIR::GenericId generic_id, - SemIR::GenericInstIndex::Region region, - ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration, - SemIR::InstId inst_id) -> SemIR::ConstantId { +// specific into the eval block for the current generic region. Returns a +// symbolic constant instruction ID that refers to the substituted constant +// value in each specific. +static auto AddGenericConstantToEvalBlock(Context& context, + SemIR::InstId inst_id) + -> SemIR::ConstantId { + CARBON_CHECK(context.constant_values().Get(inst_id).is_symbolic(), + "Adding generic constant {0} with non-symbolic value {1}", + context.insts().Get(inst_id), + context.constant_values().Get(inst_id)); + // Substitute into the constant value and rebuild it in the eval block if // we've not encountered it before. auto const_inst_id = context.constant_values().GetConstantInstId(inst_id); auto callbacks = RebuildGenericConstantInEvalBlockCallbacks( - &context, generic_id, region, SemIR::LocId(inst_id), constants_in_generic, - inside_redeclaration); + &context, SemIR::LocId(inst_id)); auto new_inst_id = SubstInst(context, const_inst_id, callbacks); CARBON_CHECK(new_inst_id != const_inst_id, "No substitutions performed for generic constant {0}", context.insts().Get(inst_id)); - return context.constant_values().Get(new_inst_id); + return context.constant_values().GetAttached(new_inst_id); } // Adds an instruction that performs a template action to the eval block for the // generic. The instruction should not yet have been added to any block. The // instruction might refer to types and constants that need to be rewritten, so // substitute into it first. -static auto AddTemplateActionToEvalBlock( - Context& context, SemIR::GenericId generic_id, - SemIR::GenericInstIndex::Region region, - ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration, - SemIR::InstId inst_id) -> void { +static auto AddTemplateActionToEvalBlock(Context& context, + SemIR::InstId inst_id) -> void { // Substitute into the constant value and rebuild it in the eval block. - auto new_inst_id = - SubstInst(context, inst_id, - RebuildTemplateActionInEvalBlockCallbacks( - &context, generic_id, region, SemIR::LocId(inst_id), - constants_in_generic, inside_redeclaration, inst_id)); + auto new_inst_id = SubstInst(context, inst_id, + RebuildTemplateActionInEvalBlockCallbacks( + &context, SemIR::LocId(inst_id), inst_id)); CARBON_CHECK(new_inst_id == inst_id, "Substitution changed InstId of template action"); - constants_in_generic.Insert(inst_id, inst_id); + context.generic_region_stack().PeekConstantsInGenericMap().Insert(inst_id, + inst_id); // Add the action to the eval block and point its constant value back to its // index within the block. + auto [generic_id, region] = GetOrCreatePendingGeneric(context); auto& symbolic_constant = context.constant_values().GetSymbolicConstant( - context.constant_values().Get(inst_id)); + context.constant_values().GetAttached(inst_id)); symbolic_constant.generic_id = generic_id; symbolic_constant.index = SemIR::GenericInstIndex( - region, context.inst_block_stack().PeekCurrentBlockContents().size()); - context.inst_block_stack().AddInstId(inst_id); + region, context.generic_region_stack().PeekEvalBlock().size()); + context.generic_region_stack().AddInstToEvalBlock(inst_id); } // Populates a map of constants in a generic from the constants in the @@ -312,83 +279,69 @@ static auto PopulateConstantsFromDeclaration( } } +auto AttachDependentInstToCurrentGeneric(Context& context, + DependentInst dependent_inst) -> void { + auto [inst_id, dep_kind] = dependent_inst; + + // If we don't have a generic region here, leave the dependent instruction + // unattached. This happens for out-of-line redeclarations of members of + // dependent scopes: + // + // class A(T:! type) { + // fn F(); + // } + // // Has generic type and constant value, but no generic region. + // fn A(T:! type).F() {} + // + // TODO: Copy the attached type and constant value from the previous + // declaration in this case instead of attempting to attach the new + // declaration to a generic region that we're no longer within. + if (context.generic_region_stack().Empty()) { + // This should only happen for `*Decl` instructions, never for template + // actions. + CARBON_CHECK((dep_kind & DependentInst::Template) == DependentInst::None); + return; + } + + context.generic_region_stack().AddDependentInst(dependent_inst.inst_id); + + // If the type is symbolic, replace it with a type specific to this generic. + if ((dep_kind & DependentInst::SymbolicType) != DependentInst::None) { + auto inst = context.insts().Get(inst_id); + auto type_id = AddGenericTypeToEvalBlock(context, SemIR::LocId(inst_id), + inst.type_id()); + // TODO: Eventually, completeness requirements should be modeled as + // constraints on the generic rather than properties of the type. For now, + // require the transformed type to be complete if the original was. + if (context.types().IsComplete(inst.type_id())) { + CompleteTypeOrCheckFail(context, type_id); + } + inst.SetType(type_id); + context.sem_ir().insts().Set(inst_id, inst); + } + + // If the instruction has a symbolic constant value, then make a note that + // we'll need to evaluate this instruction when forming the specific. Update + // the constant value of the instruction to refer to the result of that + // eventual evaluation. + if ((dep_kind & DependentInst::SymbolicConstant) != DependentInst::None) { + // Update the constant value to refer to this generic. + context.constant_values().Set( + inst_id, AddGenericConstantToEvalBlock(context, inst_id)); + } + + // If the instruction is a template action, add it directly to this position + // in the eval block. + if ((dep_kind & DependentInst::Template) != DependentInst::None) { + AddTemplateActionToEvalBlock(context, inst_id); + } +} + // Builds and returns a block of instructions whose constant values need to be // evaluated in order to resolve a generic to a specific. -static auto MakeGenericEvalBlock(Context& context, SemIR::GenericId generic_id, - SemIR::GenericInstIndex::Region region, - bool inside_redeclaration) - -> SemIR::InstBlockId { - context.inst_block_stack().Push(); - - ConstantsInGenericMap constants_in_generic; - - if (region == SemIR::GenericInstIndex::Region::Definition || - inside_redeclaration) { - PopulateConstantsFromDeclaration(context, generic_id, constants_in_generic); - } - - // The work done in this loop might invalidate iterators into the generic - // region stack, but shouldn't add new dependent instructions to the current - // region. - auto num_dependent_insts = - context.generic_region_stack().PeekDependentInsts().size(); - for (auto i : llvm::seq(num_dependent_insts)) { - auto [inst_id, dep_kind] = - context.generic_region_stack().PeekDependentInsts()[i]; - - // If the type is symbolic, replace it with a type specific to this generic. - if ((dep_kind & GenericRegionStack::DependencyKind::SymbolicType) != - GenericRegionStack::DependencyKind::None) { - auto inst = context.insts().Get(inst_id); - auto type_id = AddGenericTypeToEvalBlock( - context, generic_id, region, SemIR::LocId(inst_id), - constants_in_generic, inside_redeclaration, inst.type_id()); - // If the generic declaration is invalid, it can result in an error. - if (type_id == SemIR::ErrorInst::TypeId) { - break; - } - // TODO: Eventually, completeness requirements should be modeled as - // constraints on the generic rather than properties of the type. For now, - // require the transformed type to be complete if the original was. - if (context.types().IsComplete(inst.type_id())) { - CompleteTypeOrCheckFail(context, type_id); - } - inst.SetType(type_id); - context.sem_ir().insts().Set(inst_id, inst); - } - - // If the instruction has a symbolic constant value, then make a note that - // we'll need to evaluate this instruction when forming the specific. Update - // the constant value of the instruction to refer to the result of that - // eventual evaluation. - if ((dep_kind & GenericRegionStack::DependencyKind::SymbolicConstant) != - GenericRegionStack::DependencyKind::None) { - // Update the constant value to refer to this generic. - context.constant_values().Set( - inst_id, AddGenericConstantToEvalBlock( - context, generic_id, region, constants_in_generic, - inside_redeclaration, inst_id)); - } - - // If the instruction is a template action, add it directly to this position - // in the eval block. - if ((dep_kind & GenericRegionStack::DependencyKind::Template) != - GenericRegionStack::DependencyKind::None) { - AddTemplateActionToEvalBlock(context, generic_id, region, - constants_in_generic, inside_redeclaration, - inst_id); - } - } - - CARBON_CHECK( - num_dependent_insts == - context.generic_region_stack().PeekDependentInsts().size(), - "Building eval block added new dependent insts, for example {0}", - context.insts().Get(context.generic_region_stack() - .PeekDependentInsts()[num_dependent_insts] - .inst_id)); - - return context.inst_block_stack().Pop(); +static auto MakeGenericEvalBlock(Context& context) -> SemIR::InstBlockId { + return context.inst_blocks().Add( + context.generic_region_stack().PeekEvalBlock()); } // Builds and returns an eval block, given the list of canonical symbolic @@ -398,37 +351,71 @@ auto RebuildGenericEvalBlock(Context& context, SemIR::GenericId generic_id, SemIR::GenericInstIndex::Region region, llvm::ArrayRef const_ids) -> SemIR::InstBlockId { - context.inst_block_stack().Push(); + context.generic_region_stack().Push( + {.generic_id = generic_id, .region = region}); - // We say we are not inside a redeclaration since this function is used for - // import and there's no redeclaration there. - bool inside_redeclaration = false; - - ConstantsInGenericMap constants_in_generic; + auto& constants_in_generic = + context.generic_region_stack().PeekConstantsInGenericMap(); // For the definition region, populate constants from the declaration. - if (inside_redeclaration || - region == SemIR::GenericInstIndex::Region::Definition) { + if (region == SemIR::GenericInstIndex::Definition) { PopulateConstantsFromDeclaration(context, generic_id, constants_in_generic); } constants_in_generic.GrowForInsertCount(const_ids.size()); for (auto [i, inst_id] : llvm::enumerate(const_ids)) { // Build a constant in the inst block. - AddGenericConstantToEvalBlock(context, generic_id, region, - constants_in_generic, inside_redeclaration, - inst_id); - CARBON_CHECK( - context.inst_block_stack().PeekCurrentBlockContents().size() == i + 1, - "Produced {0} instructions when importing {1}", - (context.inst_block_stack().PeekCurrentBlockContents().size() - i), - context.insts().Get(inst_id)); + AddGenericConstantToEvalBlock(context, inst_id); + CARBON_CHECK(context.generic_region_stack().PeekEvalBlock().size() == i + 1, + "Produced {0} instructions when importing {1}", + (context.generic_region_stack().PeekEvalBlock().size() - i), + context.insts().Get(inst_id)); } - return context.inst_block_stack().Pop(); + auto eval_block_id = MakeGenericEvalBlock(context); + context.generic_region_stack().Pop(); + return eval_block_id; +} + +auto StartGenericDecl(Context& context) -> void { + context.generic_region_stack().Push( + {.generic_id = SemIR::GenericId::None, + .region = SemIR::GenericInstIndex::Declaration}); +} + +auto StartGenericDefinition(Context& context, SemIR::GenericId generic_id) + -> void { + // Push a generic region even if we don't have a generic_id. We might still + // have locally-introduced generic parameters to track: + // + // fn F() { + // let T:! type = i32; + // var x: T; + // } + context.generic_region_stack().Push( + {.generic_id = generic_id, + .region = SemIR::GenericInstIndex::Definition}); + if (generic_id.has_value()) { + PopulateConstantsFromDeclaration( + context, generic_id, + context.generic_region_stack().PeekConstantsInGenericMap()); + } } auto DiscardGenericDecl(Context& context) -> void { + // Unattach any types and constant values we might have created in the + // generic. + // TODO: We should re-evaluate the contents of the eval block in a synthesized + // specific to form these values, in order to propagate the values of local + // `let :!` bindings. + for (auto inst_id : context.generic_region_stack().PeekDependentInsts()) { + // Note that `Get` returns an instruction with an unattached type. + context.sem_ir().insts().Set(inst_id, context.insts().Get(inst_id)); + // Note that `Get` returns an unattached constant. + context.constant_values().Set(inst_id, + context.constant_values().Get(inst_id)); + } + // Note that we may leak a GenericId here, if one was allocated. context.generic_region_stack().Pop(); } @@ -437,15 +424,13 @@ auto BuildGeneric(Context& context, SemIR::InstId decl_id) -> SemIR::GenericId { context.scope_stack().compile_time_bindings_stack().PeekAllValues(); if (all_bindings.empty()) { - CARBON_CHECK(context.generic_region_stack().PeekDependentInsts().empty(), - "Have dependent instruction {0} in declaration {1} but no " + CARBON_CHECK(context.generic_region_stack().PeekEvalBlock().empty(), + "Have non-empty eval block {0} in declaration {1} but no " "compile time bindings are in scope.", - context.insts().Get(context.generic_region_stack() - .PeekDependentInsts() - .front() - .inst_id), + context.insts().Get( + context.generic_region_stack().PeekEvalBlock().front()), context.insts().Get(decl_id)); - context.generic_region_stack().Pop(); + DiscardGenericDecl(context); return SemIR::GenericId::None; } @@ -455,10 +440,25 @@ auto BuildGeneric(Context& context, SemIR::InstId decl_id) -> SemIR::GenericId { // building this generic. auto bindings_id = context.inst_blocks().Add(all_bindings); - SemIR::GenericId generic_id = context.generics().Add( - SemIR::Generic{.decl_id = decl_id, - .bindings_id = bindings_id, - .self_specific_id = SemIR::SpecificId::None}); + SemIR::Generic generic = {.decl_id = decl_id, + .bindings_id = bindings_id, + .self_specific_id = SemIR::SpecificId::None}; + + // Get the generic ID, or allocate one now if we don't have one yet. That + // could happen if the eval block is empty. + auto generic_id = + context.generic_region_stack().PeekPendingGeneric().generic_id; + if (!generic_id.has_value()) { + CARBON_CHECK(context.generic_region_stack().PeekEvalBlock().empty(), + "Non-empty eval block but didn't yet allocate a GenericId"); + generic_id = context.generics().Add(generic); + context.generic_region_stack().SetPendingGenericId(generic_id); + } else { + CARBON_CHECK(!context.generics().Get(generic_id).decl_id.has_value(), + "Built generic {0} twice", generic_id); + context.generics().Get(generic_id) = generic; + } + // MakeSelfSpecificId could cause something to be imported, which would // invalidate the return value of `context.generics().Get(generic_id)`. auto self_specific_id = MakeSelfSpecificId(context, generic_id); @@ -471,9 +471,7 @@ auto FinishGenericDecl(Context& context, SemIR::LocId loc_id, if (!generic_id.has_value()) { return; } - auto decl_block_id = MakeGenericEvalBlock( - context, generic_id, SemIR::GenericInstIndex::Region::Declaration, - /*inside_redeclaration=*/false); + auto decl_block_id = MakeGenericEvalBlock(context); context.generic_region_stack().Pop(); context.generics().Get(generic_id).decl_block_id = decl_block_id; @@ -490,38 +488,159 @@ auto BuildGenericDecl(Context& context, SemIR::InstId decl_id) return generic_id; } +// Returns the first difference between the two given eval blocks. +static auto FirstDifferenceBetweenEvalBlocks( + Context& context, llvm::ArrayRef old_eval_block, + llvm::ArrayRef new_eval_block) + -> std::pair { + // Check each element of the eval block computes the same unattached constant. + for (auto [old_inst_id, new_inst_id] : + llvm::zip(old_eval_block, new_eval_block)) { + auto old_const_id = context.constant_values().Get(old_inst_id); + auto new_const_id = context.constant_values().Get(new_inst_id); + if (old_const_id != new_const_id) { + if (old_const_id.is_symbolic() && new_const_id.is_symbolic() && + context.constant_values().GetDependence(old_const_id) == + SemIR::ConstantDependence::Template && + context.constant_values().GetDependence(new_const_id) == + SemIR::ConstantDependence::Template && + context.insts().Get(old_inst_id).kind() == + context.insts().Get(new_inst_id).kind()) { + // TODO: We don't have a good mechanism to compare template constants + // because they canonicalize to themselves, so just assume this is OK. + continue; + } + + // These constant values differ unexpectedly. + return {old_inst_id, new_inst_id}; + } + } + + if (old_eval_block.size() < new_eval_block.size()) { + return {SemIR::InstId::None, new_eval_block[old_eval_block.size()]}; + } + if (old_eval_block.size() > new_eval_block.size()) { + return {old_eval_block[new_eval_block.size()], SemIR::InstId::None}; + } + + return {SemIR::InstId::None, SemIR::InstId::None}; +} + +// If `constant_id` refers to a symbolic constant within the declaration region +// of `generic_id`, remap it to refer to the constant value of the corresponding +// element in the given eval block. Otherwise returns the ID unchanged. +static auto ReattachConstant(Context& context, SemIR::GenericId generic_id, + llvm::ArrayRef eval_block, + SemIR::ConstantId constant_id) + -> SemIR::ConstantId { + if (!constant_id.has_value() || !constant_id.is_symbolic()) { + return constant_id; + } + + auto& symbolic_const = + context.constant_values().GetSymbolicConstant(constant_id); + if (symbolic_const.generic_id != generic_id) { + // Constant doesn't refer into this generic. + return constant_id; + } + + CARBON_CHECK( + symbolic_const.index.region() == SemIR::GenericInstIndex::Declaration, + "Definition region of redeclaration should not be referenced"); + return context.constant_values().GetAttached( + eval_block[symbolic_const.index.index()]); +} + +// Same as `ReattachConstant` but for a type. +static auto ReattachType(Context& context, SemIR::GenericId generic_id, + llvm::ArrayRef eval_block, + SemIR::TypeId type_id) -> SemIR::TypeId { + return context.types().GetTypeIdForTypeConstantId(ReattachConstant( + context, generic_id, eval_block, context.types().GetConstantId(type_id))); +} + auto FinishGenericRedecl(Context& context, SemIR::GenericId generic_id) -> void { if (!generic_id.has_value()) { - context.generic_region_stack().Pop(); + DiscardGenericDecl(context); return; } - auto definition_block_id = MakeGenericEvalBlock( - context, generic_id, SemIR::GenericInstIndex::Region::Declaration, - /*inside_redeclaration=*/true); - CARBON_CHECK(definition_block_id == SemIR::InstBlockId::Empty); + // Find the old and new eval blocks. + auto old_eval_block_id = + context.generics() + .Get(generic_id) + .GetEvalBlock(SemIR::GenericInstIndex::Declaration); + CARBON_CHECK(old_eval_block_id.has_value(), + "Old generic is not fully declared"); + auto old_eval_block = context.inst_blocks().Get(old_eval_block_id); + auto new_eval_block = context.generic_region_stack().PeekEvalBlock(); + + // Check the eval blocks are computing the same constants in the same order. + // This should always be the case because we have already verified they have + // the same parse tree, and the poisoning rules mean that all entities they + // refer to are also the same. + // + // Note that it's OK if the first difference is that an old instruction has no + // corresponding new instruction; we wouldn't have used that anyway. This + // happens for `ImplDecl`, for which the witness is included in the eval block + // of the first declaration. + if (auto [old_inst_id, new_inst_id] = FirstDifferenceBetweenEvalBlocks( + context, old_eval_block, new_eval_block); + new_inst_id.has_value()) { + // This shouldn't be possible: we should have already checked that the + // syntax of the redeclaration matches the prior declaration, and none of + // the name lookups or semantic checks should be allowed to differ between + // the two declarations, so we should have built the same eval block as in + // the prior declaration. + // + // However, that isn't a strong enough invariant that it seems appropriate + // to CHECK-fail here, so we produce a diagnostic with context.TODO() + // instead. + // + // TODO: Add something like context.UNEXPECTED() instead of using + // context.TODO() here because there's not really anything to do. + context.TODO(new_inst_id, + "generic redeclaration differs from previous declaration"); + if (old_inst_id.has_value()) { + context.TODO(old_inst_id, "instruction in previous declaration"); + } + DiscardGenericDecl(context); + return; + } + + auto redecl_generic_id = + context.generic_region_stack().PeekPendingGeneric().generic_id; + + // Reattach any instructions that depend on the redeclaration to instead refer + // to the original. + for (auto inst_id : context.generic_region_stack().PeekDependentInsts()) { + // Reattach the type. + auto inst = context.insts().GetWithAttachedType(inst_id); + inst.SetType(ReattachType(context, redecl_generic_id, old_eval_block, + inst.type_id())); + context.sem_ir().insts().Set(inst_id, inst); + + // Reattach the constant value. + context.constant_values().Set( + inst_id, + ReattachConstant(context, redecl_generic_id, old_eval_block, + context.constant_values().GetAttached(inst_id))); + } context.generic_region_stack().Pop(); } auto FinishGenericDefinition(Context& context, SemIR::GenericId generic_id) -> void { if (!generic_id.has_value()) { - // TODO: We can have symbolic constants in a context that had a non-generic - // declaration, for example if there's a local generic let binding in a - // function definition. Handle this case somehow -- perhaps by forming - // substituted constant values now. - context.generic_region_stack().Pop(); + DiscardGenericDecl(context); return; } - auto definition_block_id = MakeGenericEvalBlock( - context, generic_id, SemIR::GenericInstIndex::Region::Definition, - /*inside_redeclaration=*/false); - context.generics().Get(generic_id).definition_block_id = definition_block_id; - + auto definition_block_id = MakeGenericEvalBlock(context); context.generic_region_stack().Pop(); + context.generics().Get(generic_id).definition_block_id = definition_block_id; } auto ResolveSpecificDeclaration(Context& context, SemIR::LocId loc_id, @@ -602,9 +721,8 @@ auto ResolveSpecificDefinition(Context& context, SemIR::LocId loc_id, // The generic is not defined yet. return false; } - auto definition_block_id = - TryEvalBlockForSpecific(context, loc_id, specific_id, - SemIR::GenericInstIndex::Region::Definition); + auto definition_block_id = TryEvalBlockForSpecific( + context, loc_id, specific_id, SemIR::GenericInstIndex::Definition); // Note that TryEvalBlockForSpecific may reallocate the list of specifics, // so re-lookup the specific here. context.specifics().Get(specific_id).definition_block_id = diff --git a/toolchain/check/generic.h b/toolchain/check/generic.h index 7f7ad1ba2500..c1b9a5f05064 100644 --- a/toolchain/check/generic.h +++ b/toolchain/check/generic.h @@ -5,17 +5,44 @@ #ifndef CARBON_TOOLCHAIN_CHECK_GENERIC_H_ #define CARBON_TOOLCHAIN_CHECK_GENERIC_H_ +#include "llvm/ADT/BitmaskEnum.h" #include "toolchain/check/context.h" #include "toolchain/sem_ir/entity_with_params_base.h" #include "toolchain/sem_ir/ids.h" namespace Carbon::Check { +LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); + // Start processing a declaration or definition that might be a generic entity. auto StartGenericDecl(Context& context) -> void; // Start processing a declaration or definition that might be a generic entity. -auto StartGenericDefinition(Context& context) -> void; +auto StartGenericDefinition(Context& context, SemIR::GenericId generic_id) + -> void; + +// An instruction that depends on a generic parameter in some way. +struct DependentInst { + // Ways in which an instruction can depend on a generic parameter. + enum Kind : int8_t { + None = 0x0, + // The type of the instruction depends on a checked generic parameter. + SymbolicType = 0x1, + // The constant value of the instruction depends on a checked generic + // parameter. + SymbolicConstant = 0x2, + Template = 0x4, + LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/Template) + }; + + SemIR::InstId inst_id; + Kind kind; +}; + +// Attach a dependent instruction to the current generic, updating its type and +// constant value as necessary. +auto AttachDependentInstToCurrentGeneric(Context& context, + DependentInst dependent_inst) -> void; // Discard the information about the current generic entity. This should be // called instead of `FinishGenericDecl` if the corresponding `Generic` object diff --git a/toolchain/check/generic_region_stack.cpp b/toolchain/check/generic_region_stack.cpp index 700e5bd02da8..be06694f0f63 100644 --- a/toolchain/check/generic_region_stack.cpp +++ b/toolchain/check/generic_region_stack.cpp @@ -6,31 +6,18 @@ namespace Carbon::Check { -auto GenericRegionStack::Push() -> void { dependent_insts_stack_.PushArray(); } - -auto GenericRegionStack::Pop() -> void { dependent_insts_stack_.PopArray(); } - -auto GenericRegionStack::AddDependentInst(DependentInst inst) -> void { - if (dependent_insts_stack_.empty()) { - // If we don't have a generic region here, leave the dependent instruction - // unattached. This happens for out-of-line redeclarations of members of - // dependent scopes: - // - // class A(T:! type) { - // fn F(); - // } - // // Has generic type and constant value, but no generic region. - // fn A(T:! type).F() {} - // - // TODO: Use a different instruction kind for out-of-line definitions and - // CHECK this doesn't happen. - return; - } - dependent_insts_stack_.AppendToTop(inst); +auto GenericRegionStack::Push(PendingGeneric generic) -> void { + pending_generic_ids_.push_back(generic); + pending_eval_block_stack_.PushArray(); + dependent_inst_stack_.PushArray(); + constants_in_generic_stack_.emplace_back(); } -auto GenericRegionStack::PeekDependentInsts() -> llvm::ArrayRef { - return dependent_insts_stack_.PeekArray(); +auto GenericRegionStack::Pop() -> void { + pending_generic_ids_.pop_back(); + pending_eval_block_stack_.PopArray(); + dependent_inst_stack_.PopArray(); + constants_in_generic_stack_.pop_back(); } } // namespace Carbon::Check diff --git a/toolchain/check/generic_region_stack.h b/toolchain/check/generic_region_stack.h index 0eb7238ced1d..a3d380cd2b0b 100644 --- a/toolchain/check/generic_region_stack.h +++ b/toolchain/check/generic_region_stack.h @@ -6,20 +6,24 @@ #define CARBON_TOOLCHAIN_CHECK_GENERIC_REGION_STACK_H_ #include "common/array_stack.h" -#include "llvm/ADT/BitmaskEnum.h" +#include "common/map.h" #include "toolchain/sem_ir/ids.h" namespace Carbon::Check { -LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); +// A map from an instruction ID representing a canonical symbolic constant to an +// instruction within an eval block of the generic that computes the specific +// value for that constant. +// +// We arbitrarily use a small size of 256 bytes for the map. +// TODO: Determine a better number based on measurements. +using ConstantsInGenericMap = Map; // A stack of enclosing regions that might be declaring or defining a generic // entity. In such a region, we track the generic constructs that are used, such // as symbolic constants and types, and instructions that depend on a template // parameter. // -// TODO: For now we're just tracking symbolic constants. -// // We split a generic into two regions -- declaration and definition -- because // these are in general introduced separately, and substituted into separately. // For example, for `class C(T:! type, N:! T) { var x: T; }`, a use such as @@ -27,47 +31,94 @@ LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); // `var x: C(i32, 0) = {.x = 0};` also substitutes into the definition. class GenericRegionStack { public: - // Ways in which an instruction can depend on a generic parameter. - enum class DependencyKind : int8_t { - None = 0x0, - // The type of the instruction depends on a checked generic parameter. - SymbolicType = 0x1, - // The constant value of the instruction depends on a checked generic - // parameter. - SymbolicConstant = 0x2, - Template = 0x4, - LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/Template) - }; + GenericRegionStack() { + // Reserve a large enough stack that we typically won't need to reallocate. + constants_in_generic_stack_.reserve(4); + } - // An instruction that depends on a generic parameter in some way. - struct DependentInst { - SemIR::InstId inst_id; - DependencyKind kind; + struct PendingGeneric { + // The generic ID. May not have a value if no ID has been assigned yet. + SemIR::GenericId generic_id; + // The region of the generic that is being processed. + SemIR::GenericInstIndex::Region region; }; // Pushes a region that might be declaring or defining a generic. - auto Push() -> void; + auto Push(PendingGeneric generic) -> void; // Pops a generic region. auto Pop() -> void; - // Adds an instruction to the list of instructions in the current region that - // in some way depend on a generic parameter. - auto AddDependentInst(DependentInst inst) -> void; + // Returns whether the stack is empty. + auto Empty() const -> bool { return pending_generic_ids_.empty(); } + + // Sets the GenericId for the currently pending generic, once one has been + // allocated. + auto SetPendingGenericId(SemIR::GenericId generic_id) -> void { + CARBON_CHECK(!pending_generic_ids_.back().generic_id.has_value(), + "Already have a GenericId for the pending generic"); + pending_generic_ids_.back().generic_id = generic_id; + } + + // Adds an instruction to the list of instructions whose type or value depends + // on something in the current pending generic. + auto AddDependentInst(SemIR::InstId inst_id) -> void { + CARBON_CHECK(!Empty()); + dependent_inst_stack_.AppendToTop(inst_id); + } + + // Adds an instruction to the eval block for the current pending generic. + auto AddInstToEvalBlock(SemIR::InstId inst_id) -> void { + CARBON_CHECK(!Empty()); + pending_eval_block_stack_.AppendToTop(inst_id); + } + + // Returns the current pending generic. + auto PeekPendingGeneric() const -> PendingGeneric { + CARBON_CHECK(!Empty()); + return pending_generic_ids_.back(); + } // Returns the list of dependent instructions in the current generic region. - auto PeekDependentInsts() -> llvm::ArrayRef; + auto PeekDependentInsts() -> llvm::ArrayRef { + CARBON_CHECK(!Empty()); + return dependent_inst_stack_.PeekArray(); + } + + // Returns the contents of the eval block for the current generic region. + auto PeekEvalBlock() -> llvm::ArrayRef { + CARBON_CHECK(!Empty()); + return pending_eval_block_stack_.PeekArray(); + } + + // Returns the mapping from abstract constant instructions to eval block + // instructions for the current generic. + auto PeekConstantsInGenericMap() -> ConstantsInGenericMap& { + CARBON_CHECK(!Empty()); + return constants_in_generic_stack_.back(); + } // Runs verification that the processing cleanly finished. auto VerifyOnFinish() const -> void { - CARBON_CHECK(dependent_insts_stack_.empty(), - "generic_region_stack still has {0} entries", - dependent_insts_stack_.all_values_size()); + CARBON_CHECK(pending_generic_ids_.empty(), + "pending_generic_ids_ still has {0} entries", + pending_generic_ids_.size()); } private: - // A stack of symbolic constants for enclosing generic regions. - ArrayStack dependent_insts_stack_; + // The IDs of pending generics. + llvm::SmallVector pending_generic_ids_; + + // Contents of eval blocks for pending generics. + ArrayStack pending_eval_block_stack_; + + // Instructions that depend on the current generic. + ArrayStack dependent_inst_stack_; + + // Mapping from constant InstIds to the corresponding InstIds in the eval + // blocks for each enclosing generic. We reserve this to a suitable size in + // the constructor. + llvm::SmallVector constants_in_generic_stack_; }; } // namespace Carbon::Check diff --git a/toolchain/check/handle_choice.cpp b/toolchain/check/handle_choice.cpp index b799184d5159..b5fd9c23711f 100644 --- a/toolchain/check/handle_choice.cpp +++ b/toolchain/check/handle_choice.cpp @@ -118,7 +118,7 @@ auto HandleParseNode(Context& context, Parse::ChoiceDefinitionStartId node_id) // that here. Either remove the need for a token or find a token (a new // introducer?) for the alternative to name. context.decl_introducer_state_stack().Push(); - StartGenericDefinition(context); + StartGenericDefinition(context, class_info.generic_id); context.name_scopes().AddRequiredName( class_info.scope_id, SemIR::NameId::SelfType, diff --git a/toolchain/check/handle_class.cpp b/toolchain/check/handle_class.cpp index e17c5638b4d3..bccd549977cd 100644 --- a/toolchain/check/handle_class.cpp +++ b/toolchain/check/handle_class.cpp @@ -281,7 +281,7 @@ auto HandleParseNode(Context& context, Parse::ClassDefinitionStartId node_id) context.scope_stack().PushForEntity( class_decl_id, class_info.scope_id, context.generics().GetSelfSpecific(class_info.generic_id)); - StartGenericDefinition(context); + StartGenericDefinition(context, class_info.generic_id); context.inst_block_stack().Push(); context.node_stack().Push(node_id, class_id); diff --git a/toolchain/check/handle_function.cpp b/toolchain/check/handle_function.cpp index bfbbdd3ea97c..6d50b31da525 100644 --- a/toolchain/check/handle_function.cpp +++ b/toolchain/check/handle_function.cpp @@ -623,7 +623,7 @@ static auto HandleFunctionDefinitionAfterSignature( context.scope_stack().PushForFunctionBody(decl_id); context.inst_block_stack().Push(); context.region_stack().PushRegion(context.inst_block_stack().PeekOrAdd()); - StartGenericDefinition(context); + StartGenericDefinition(context, function.generic_id); CheckFunctionDefinitionSignature(context, function); @@ -770,7 +770,7 @@ auto HandleParseNode(Context& context, if (IsValidBuiltinDeclaration(context, function, builtin_kind)) { function.builtin_function_kind = builtin_kind; // Build an empty generic definition if this is a generic builtin. - StartGenericDefinition(context); + StartGenericDefinition(context, function.generic_id); FinishGenericDefinition(context, function.generic_id); } else { CARBON_DIAGNOSTIC(InvalidBuiltinSignature, Error, diff --git a/toolchain/check/handle_impl.cpp b/toolchain/check/handle_impl.cpp index d6506ec8a974..f1fa8d188dd9 100644 --- a/toolchain/check/handle_impl.cpp +++ b/toolchain/check/handle_impl.cpp @@ -541,7 +541,7 @@ auto HandleParseNode(Context& context, Parse::ImplDefinitionStartId node_id) context.scope_stack().PushForEntity( impl_decl_id, impl_info.scope_id, context.generics().GetSelfSpecific(impl_info.generic_id)); - StartGenericDefinition(context); + StartGenericDefinition(context, impl_info.generic_id); ImplWitnessStartDefinition(context, impl_info); context.inst_block_stack().Push(); context.node_stack().Push(node_id, impl_id); diff --git a/toolchain/check/handle_interface.cpp b/toolchain/check/handle_interface.cpp index 45c6b092ecd2..9c3dcd04ec91 100644 --- a/toolchain/check/handle_interface.cpp +++ b/toolchain/check/handle_interface.cpp @@ -164,7 +164,7 @@ auto HandleParseNode(Context& context, auto self_specific_id = context.generics().GetSelfSpecific(interface_info.generic_id); - StartGenericDefinition(context); + StartGenericDefinition(context, interface_info.generic_id); context.inst_block_stack().Push(); context.node_stack().Push(node_id, interface_id); diff --git a/toolchain/check/handle_let_and_var.cpp b/toolchain/check/handle_let_and_var.cpp index db916f672ec9..9d8ad209f038 100644 --- a/toolchain/check/handle_let_and_var.cpp +++ b/toolchain/check/handle_let_and_var.cpp @@ -43,12 +43,12 @@ static auto StartAssociatedConstant(Context& context) -> void { // called at the `=` or the `;` of the declaration, whichever comes first. static auto EndAssociatedConstantDeclRegion(Context& context, SemIR::InterfaceId interface_id) - -> void { + -> SemIR::GenericId { // TODO: Stop special-casing tuple patterns once they behave like other // patterns. if (context.node_stack().PeekIs(Parse::NodeKind::TuplePattern)) { DiscardGenericDecl(context); - return; + return SemIR::GenericId::None; } // Peek the pattern. For a valid associated constant, the corresponding @@ -60,7 +60,7 @@ static auto EndAssociatedConstantDeclRegion(Context& context, // The pattern wasn't suitable for an associated constant. We'll detect // and diagnose this later. For now, just clean up the generic stack. DiscardGenericDecl(context); - return; + return SemIR::GenericId::None; } // Finish the declaration region of this generic. @@ -80,6 +80,7 @@ static auto EndAssociatedConstantDeclRegion(Context& context, .modifier_set.GetAccessKind(); context.decl_name_stack().AddNameOrDiagnose(name_context, assoc_id, access_kind); + return assoc_const.generic_id; } template @@ -206,10 +207,11 @@ auto HandleParseNode(Context& context, Parse::LetInitializerId node_id) -> bool { if (auto interface_decl = context.scope_stack().GetCurrentScopeAs()) { - EndAssociatedConstantDeclRegion(context, interface_decl->interface_id); + auto generic_id = + EndAssociatedConstantDeclRegion(context, interface_decl->interface_id); // Start building the definition region of the constant. - StartGenericDefinition(context); + StartGenericDefinition(context, generic_id); } return HandleInitializer(context, node_id); diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index 6e613b8735b0..f5efd81a591a 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -462,7 +462,8 @@ class ImportRefResolver : public ImportContext { work_stack_.pop_back(); } } - auto constant_id = local_constant_values_for_import_insts().Get(inst_id); + auto constant_id = + local_constant_values_for_import_insts().GetAttached(inst_id); CARBON_CHECK(constant_id.has_value()); return constant_id; } @@ -515,7 +516,8 @@ class ImportRefResolver : public ImportContext { // Returns the ConstantId for an InstId. Adds unresolved constants to // work_stack_. auto GetLocalConstantValueOrPush(SemIR::InstId inst_id) -> SemIR::ConstantId { - auto const_id = local_constant_values_for_import_insts().Get(inst_id); + auto const_id = + local_constant_values_for_import_insts().GetAttached(inst_id); if (!const_id.has_value()) { work_stack_.push_back({.inst_id = inst_id}); } @@ -551,7 +553,7 @@ class ImportRefResolver : public ImportContext { ResolvedConstId result; if (auto existing_const_id = - local_constant_values_for_import_insts().Get(inst_id); + local_constant_values_for_import_insts().GetAttached(inst_id); existing_const_id.has_value()) { result.const_id = existing_const_id; return result; @@ -589,7 +591,7 @@ class ImportRefResolver : public ImportContext { if (auto const_id = local_context() .import_ir_constant_values()[cursor_ir_id.index] - .Get(cursor_inst_id); + .GetAttached(cursor_inst_id); const_id.has_value()) { SetResolvedConstId(inst_id, result.indirect_insts, const_id); result.const_id = const_id; @@ -755,7 +757,7 @@ static auto GetLocalConstantIdChecked(ImportContext& context, SemIR::InstId inst_id) -> SemIR::ConstantId { auto result_id = - context.local_constant_values_for_import_insts().Get(inst_id); + context.local_constant_values_for_import_insts().GetAttached(inst_id); CARBON_CHECK(result_id.has_value()); return result_id; } @@ -1055,11 +1057,11 @@ static auto LoadLocalPatternConstantIds(ImportRefResolver& resolver, const auto& param_patterns = resolver.import_inst_blocks().Get(param_patterns_id); for (auto pattern_id : param_patterns) { - auto pattern_inst = resolver.import_insts().Get(pattern_id); + auto pattern_inst = resolver.import_insts().GetWithAttachedType(pattern_id); GetLocalConstantId(resolver, pattern_inst.type_id()); if (auto addr = pattern_inst.TryAs()) { pattern_id = addr->inner_id; - pattern_inst = resolver.import_insts().Get(pattern_id); + pattern_inst = resolver.import_insts().GetWithAttachedType(pattern_id); GetLocalConstantId(resolver, pattern_inst.type_id()); } // If the parameter is a symbolic binding, build the @@ -1098,27 +1100,27 @@ static auto GetLocalParamPatternsId(ImportContext& context, const auto& param_patterns = context.import_inst_blocks().Get(param_patterns_id); llvm::SmallVector new_patterns; - for (auto param_id : param_patterns) { + for (auto inst_id : param_patterns) { // Figure out the pattern structure. This echoes // Function::GetParamPatternInfoFromPatternId. - auto addr_pattern_id = param_id; - auto addr_inst = - context.import_insts().TryGetAs(addr_pattern_id); - auto param_pattern_id = addr_pattern_id; + auto inst = context.import_insts().GetWithAttachedType(inst_id); + + auto addr_pattern_id = inst_id; + auto addr_inst = inst.TryAs(); if (addr_inst) { - param_pattern_id = addr_inst->inner_id; + inst_id = addr_inst->inner_id; + inst = context.import_insts().GetWithAttachedType(inst_id); } - auto param_pattern = - context.import_insts().TryGetAs( - param_pattern_id); - auto binding_id = addr_pattern_id; + auto param_pattern_id = inst_id; + auto param_pattern = inst.TryAs(); if (param_pattern) { - binding_id = param_pattern->subpattern_id; + inst_id = param_pattern->subpattern_id; + inst = context.import_insts().GetWithAttachedType(inst_id); } - auto binding = - context.import_insts().GetAs(binding_id); + auto binding_id = inst_id; + auto binding = inst.As(); // Rebuild the pattern. auto entity_name = @@ -1179,19 +1181,16 @@ static auto GetLocalParamPatternsId(ImportContext& context, // Returns a version of import_return_slot_pattern_id localized to the current // IR. static auto GetLocalReturnSlotPatternId( - ImportContext& context, SemIR::InstId import_return_slot_pattern_id) - -> SemIR::InstId { + ImportContext& context, SemIR::InstId import_return_slot_pattern_id, + SemIR::ConstantId return_type_const_id) -> SemIR::InstId { if (!import_return_slot_pattern_id.has_value()) { return SemIR::InstId::None; } auto param_pattern = context.import_insts().GetAs( import_return_slot_pattern_id); - auto return_slot_pattern = - context.import_insts().GetAs( - param_pattern.subpattern_id); auto type_id = context.local_context().types().GetTypeIdForTypeConstantId( - GetLocalConstantIdChecked(context, return_slot_pattern.type_id)); + return_type_const_id); auto new_return_slot_pattern_id = AddImportedInst( context, param_pattern.subpattern_id, @@ -1422,7 +1421,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, SemIR::InstId import_inst_id) -> ResolveResult { auto adapted_type_const_id = GetLocalConstantId( resolver, - resolver.import_constant_values().Get(inst.adapted_type_inst_id)); + resolver.import_constant_values().GetAttached(inst.adapted_type_inst_id)); if (resolver.HasNewWork()) { return ResolveResult::Retry(); } @@ -1573,7 +1572,8 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, SemIR::InstId import_inst_id) -> ResolveResult { auto type_const_id = GetLocalConstantId(resolver, inst.type_id); auto base_type_const_id = GetLocalConstantId( - resolver, resolver.import_constant_values().Get(inst.base_type_inst_id)); + resolver, + resolver.import_constant_values().GetAttached(inst.base_type_inst_id)); if (resolver.HasNewWork()) { return ResolveResult::Retry(); } @@ -2010,9 +2010,8 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, auto return_type_const_id = SemIR::ConstantId::None; if (import_function.return_slot_pattern_id.has_value()) { return_type_const_id = GetLocalConstantId( - resolver, resolver.import_insts() - .Get(import_function.return_slot_pattern_id) - .type_id()); + resolver, resolver.import_insts().GetAttachedType( + import_function.return_slot_pattern_id)); } auto parent_scope_id = GetLocalNameScopeId(resolver, import_function.parent_scope_id); @@ -2036,7 +2035,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, new_function.param_patterns_id = GetLocalParamPatternsId(resolver, import_function.param_patterns_id); new_function.return_slot_pattern_id = GetLocalReturnSlotPatternId( - resolver, import_function.return_slot_pattern_id); + resolver, import_function.return_slot_pattern_id, return_type_const_id); SetGenericData(resolver, import_function.generic_id, new_function.generic_id, generic_data); @@ -2207,10 +2206,11 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, LoadLocalPatternConstantIds(resolver, import_impl.implicit_param_patterns_id); auto generic_data = GetLocalGenericData(resolver, import_impl.generic_id); auto self_const_id = GetLocalConstantId( - resolver, resolver.import_constant_values().Get(import_impl.self_id)); + resolver, + resolver.import_constant_values().GetAttached(import_impl.self_id)); auto constraint_const_id = GetLocalConstantId( resolver, - resolver.import_constant_values().Get(import_impl.constraint_id)); + resolver.import_constant_values().GetAttached(import_impl.constraint_id)); auto& new_impl = resolver.local_impls().Get(impl_id); if (resolver.HasNewWork()) { @@ -3036,7 +3036,7 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver, // TODO: Error is returned when support is missing, but that should go away. static auto TryResolveInst(ImportRefResolver& resolver, SemIR::InstId inst_id, SemIR::ConstantId const_id) -> ResolveResult { - auto inst_const_id = resolver.import_constant_values().Get(inst_id); + auto inst_const_id = resolver.import_constant_values().GetAttached(inst_id); if (!inst_const_id.has_value() || !inst_const_id.is_symbolic()) { return TryResolveInstCanonical(resolver, inst_id, const_id); } @@ -3051,7 +3051,7 @@ static auto TryResolveInst(ImportRefResolver& resolver, SemIR::InstId inst_id, if (const_id.has_value()) { // For the third phase, extract the constant value that // TryResolveInstCanonical produced previously. - inner_const_id = resolver.local_constant_values().Get( + inner_const_id = resolver.local_constant_values().GetAttached( resolver.local_constant_values().GetSymbolicConstant(const_id).inst_id); } @@ -3063,8 +3063,8 @@ static auto TryResolveInst(ImportRefResolver& resolver, SemIR::InstId inst_id, } if (!const_id.has_value()) { - // Second phase: we have created an abstract constant. Create a - // corresponding generic constant. + // Second phase: we have created an unattached constant. Create a + // corresponding attached constant. if (symbolic_const.generic_id.has_value()) { result.const_id = resolver.local_constant_values().AddSymbolicConstant( {.inst_id = @@ -3073,8 +3073,8 @@ static auto TryResolveInst(ImportRefResolver& resolver, SemIR::InstId inst_id, .index = symbolic_const.index, .dependence = symbolic_const.dependence}); if (result.decl_id.has_value()) { - // Overwrite the abstract symbolic constant given initially to the - // declaration with its final concrete symbolic value. + // Overwrite the unattached symbolic constant given initially to the + // declaration with its final attached symbolic value. resolver.local_constant_values().Set(result.decl_id, result.const_id); } } @@ -3260,7 +3260,8 @@ static auto GetInstForLoad(Context& context, context.import_irs().Get(import_ir_inst.ir_id()).sem_ir; while (true) { - auto cursor_inst = cursor_ir->insts().Get(import_ir_inst.inst_id()); + auto cursor_inst = + cursor_ir->insts().GetWithAttachedType(import_ir_inst.inst_id()); auto import_ref = cursor_inst.TryAs(); if (!import_ref) { diff --git a/toolchain/check/inst.cpp b/toolchain/check/inst.cpp index 2a1fb4ae4bab..782542b025f5 100644 --- a/toolchain/check/inst.cpp +++ b/toolchain/check/inst.cpp @@ -7,7 +7,7 @@ #include "common/vlog.h" #include "toolchain/check/context.h" #include "toolchain/check/eval.h" -#include "toolchain/check/generic_region_stack.h" +#include "toolchain/check/generic.h" #include "toolchain/sem_ir/constant.h" #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/inst_kind.h" @@ -18,14 +18,13 @@ namespace Carbon::Check { // any applicable instruction lists. static auto FinishInst(Context& context, SemIR::InstId inst_id, SemIR::Inst inst) -> void { - GenericRegionStack::DependencyKind dep_kind = - GenericRegionStack::DependencyKind::None; + DependentInst::Kind dep_kind = DependentInst::None; // If the instruction has a symbolic constant type, track that we need to // substitute into it. if (context.constant_values().DependsOnGenericParameter( context.types().GetConstantId(inst.type_id()))) { - dep_kind |= GenericRegionStack::DependencyKind::SymbolicType; + dep_kind |= DependentInst::SymbolicType; } // If the instruction has a constant value, compute it. @@ -38,7 +37,7 @@ static auto FinishInst(Context& context, SemIR::InstId inst_id, // If the constant value is symbolic, track that we need to substitute into // it. if (context.constant_values().DependsOnGenericParameter(const_id)) { - dep_kind |= GenericRegionStack::DependencyKind::SymbolicConstant; + dep_kind |= DependentInst::SymbolicConstant; } } @@ -49,9 +48,9 @@ static auto FinishInst(Context& context, SemIR::InstId inst_id, "Use AddDependentActionInst to add an action instruction"); // Keep track of dependent instructions. - if (dep_kind != GenericRegionStack::DependencyKind::None) { - context.generic_region_stack().AddDependentInst( - {.inst_id = inst_id, .kind = dep_kind}); + if (dep_kind != DependentInst::None) { + AttachDependentInstToCurrentGeneric(context, + {.inst_id = inst_id, .kind = dep_kind}); } } @@ -86,9 +85,8 @@ auto AddDependentActionInst(Context& context, context.constant_values().Set(inst_id, const_id); // Register the instruction to be added to the eval block. - context.generic_region_stack().AddDependentInst( - {.inst_id = inst_id, - .kind = GenericRegionStack::DependencyKind::Template}); + AttachDependentInstToCurrentGeneric( + context, {.inst_id = inst_id, .kind = DependentInst::Template}); return inst_id; } @@ -232,10 +230,20 @@ auto ReplaceInstBeforeConstantUse(Context& context, SemIR::InstId inst_id, auto ReplaceInstPreservingConstantValue(Context& context, SemIR::InstId inst_id, SemIR::Inst inst) -> void { - auto old_const_id = context.constant_values().Get(inst_id); + // Check that the type didn't change: a change of type will change the + // constant value. Replace the type with the attached type. + auto old_type_id = context.insts().GetAttachedType(inst_id); + CARBON_CHECK(context.types().GetUnattachedType(old_type_id) == inst.type_id(), + "Given wrong type for replacement instruction"); + inst.SetType(old_type_id); + + // Update the instruction. context.sem_ir().insts().Set(inst_id, inst); CARBON_VLOG_TO(context.vlog_stream(), "ReplaceInst: {0} -> {1}\n", inst_id, inst); + + // Check the constant value didn't change. + auto old_const_id = context.constant_values().Get(inst_id); auto new_const_id = TryEvalInstUnsafe(context, inst_id, inst); CARBON_CHECK(old_const_id == new_const_id); } diff --git a/toolchain/check/member_access.cpp b/toolchain/check/member_access.cpp index 9430bb0f9e70..5695a40df3da 100644 --- a/toolchain/check/member_access.cpp +++ b/toolchain/check/member_access.cpp @@ -616,14 +616,13 @@ static auto GetAssociatedValueImpl(Context& context, SemIR::LocId loc_id, auto GetAssociatedValue(Context& context, SemIR::LocId loc_id, SemIR::InstId base_id, - SemIR::InstId assoc_entity_inst_id, + SemIR::ConstantId assoc_entity_const_id, SemIR::SpecificInterface interface) -> SemIR::InstId { // TODO: This function shares a code with PerformCompoundMemberAccess(), // it would be nice to reduce the duplication. auto value_inst_id = - context.constant_values().GetConstantInstId(assoc_entity_inst_id); - CARBON_CHECK(value_inst_id.has_value()); + context.constant_values().GetInstId(assoc_entity_const_id); auto assoc_entity = context.insts().GetAs(value_inst_id); auto decl_id = assoc_entity.decl_id; diff --git a/toolchain/check/member_access.h b/toolchain/check/member_access.h index 4c49306e71e7..cdad9757b453 100644 --- a/toolchain/check/member_access.h +++ b/toolchain/check/member_access.h @@ -32,7 +32,7 @@ auto PerformCompoundMemberAccess( // facet (given by base_id). Never does instance binding. auto GetAssociatedValue(Context& context, SemIR::LocId loc_id, SemIR::InstId base_id, - SemIR::InstId assoc_entity_inst_id, + SemIR::ConstantId assoc_entity_const_id, SemIR::SpecificInterface interface) -> SemIR::InstId; // Creates SemIR to perform a tuple index with base expression `tuple_inst_id` diff --git a/toolchain/check/name_lookup.cpp b/toolchain/check/name_lookup.cpp index b0274acf61eb..d208cefd6638 100644 --- a/toolchain/check/name_lookup.cpp +++ b/toolchain/check/name_lookup.cpp @@ -13,6 +13,7 @@ #include "toolchain/check/member_access.h" #include "toolchain/check/type_completion.h" #include "toolchain/diagnostics/format_providers.h" +#include "toolchain/sem_ir/generic.h" #include "toolchain/sem_ir/name_scope.h" namespace Carbon::Check { @@ -113,16 +114,24 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id, non_lexical_result.scope_result.target_inst_id(); if (auto assoc_type = context.types().TryGetAs( - context.insts().Get(target_inst_id).type_id())) { + SemIR::GetTypeOfInstInSpecific( + context.sem_ir(), non_lexical_result.specific_id, + target_inst_id))) { auto interface_decl = context.insts().GetAs(scope.inst_id()); const auto& interface = context.interfaces().Get(interface_decl.interface_id); SemIR::InstId result_inst_id = GetAssociatedValue( - context, loc_id, interface.self_param_id, target_inst_id, + context, loc_id, interface.self_param_id, + SemIR::GetConstantValueInSpecific(context.sem_ir(), + non_lexical_result.specific_id, + target_inst_id), assoc_type->GetSpecificInterface()); - non_lexical_result.scope_result = SemIR::ScopeLookupResult::MakeFound( - result_inst_id, non_lexical_result.scope_result.access_kind()); + non_lexical_result = { + .specific_id = SemIR::SpecificId::None, + .scope_result = SemIR::ScopeLookupResult::MakeFound( + result_inst_id, + non_lexical_result.scope_result.access_kind())}; } } return non_lexical_result; diff --git a/toolchain/check/subst.cpp b/toolchain/check/subst.cpp index 5501a7770476..d67abbfa4973 100644 --- a/toolchain/check/subst.cpp +++ b/toolchain/check/subst.cpp @@ -14,6 +14,11 @@ namespace Carbon::Check { +auto SubstInstCallbacks::RebuildType(SemIR::TypeInstId type_inst_id) const + -> SemIR::TypeId { + return context().types().GetTypeIdForTypeInstId(type_inst_id); +} + namespace { // Information about an instruction that we are substituting into. @@ -257,7 +262,8 @@ static auto Rebuild(Context& context, Worklist& worklist, SemIR::InstId inst_id, int32_t arg1 = PopOperand(context, worklist, inst.arg1_and_kind()); int32_t arg0 = PopOperand(context, worklist, inst.arg0_and_kind()); auto type_id = inst.type_id().has_value() - ? context.types().GetTypeIdForTypeInstId(worklist.Pop()) + ? callbacks.RebuildType( + context.types().GetAsTypeInstId(worklist.Pop())) : SemIR::TypeId::None; if (type_id == inst.type_id() && arg0 == inst.arg0() && arg1 == inst.arg1()) { return callbacks.ReuseUnchanged(inst_id); @@ -340,12 +346,12 @@ class SubstConstantCallbacks final : public SubstInstCallbacks { public: // `context` must not be null. SubstConstantCallbacks(Context* context, Substitutions substitutions) - : context_(context), substitutions_(substitutions) {} + : SubstInstCallbacks(context), substitutions_(substitutions) {} // Applies the given Substitutions to an instruction, in order to replace // BindSymbolicName instructions with the value of the binding. auto Subst(SemIR::InstId& inst_id) const -> bool override { - if (context_->constant_values().Get(inst_id).is_concrete()) { + if (context().constant_values().Get(inst_id).is_concrete()) { // This instruction is a concrete constant, so can't contain any // bindings that need to be substituted. return true; @@ -353,10 +359,10 @@ class SubstConstantCallbacks final : public SubstInstCallbacks { auto entity_name_id = SemIR::EntityNameId::None; if (auto bind = - context_->insts().TryGetAs(inst_id)) { + context().insts().TryGetAs(inst_id)) { entity_name_id = bind->entity_name_id; } else if (auto bind = - context_->insts().TryGetAs( + context().insts().TryGetAs( inst_id)) { entity_name_id = bind->entity_name_id; } else { @@ -367,10 +373,10 @@ class SubstConstantCallbacks final : public SubstInstCallbacks { // TODO: Consider building a hash map for substitutions. We might have a // lot of them. for (auto [bind_index, replacement_id] : substitutions_) { - if (context_->entity_names().Get(entity_name_id).bind_index() == + if (context().entity_names().Get(entity_name_id).bind_index() == bind_index) { // This is the binding we're replacing. Perform substitution. - inst_id = context_->constant_values().GetInstId(replacement_id); + inst_id = context().constant_values().GetInstId(replacement_id); return true; } } @@ -384,17 +390,16 @@ class SubstConstantCallbacks final : public SubstInstCallbacks { auto Rebuild(SemIR::InstId old_inst_id, SemIR::Inst new_inst) const -> SemIR::InstId override { auto const_id = EvalOrAddInst( - *context_, + context(), SemIR::LocIdAndInst::UncheckedLoc( - context_->insts().GetCanonicalLocId(old_inst_id).ToImplicit(), + context().insts().GetCanonicalLocId(old_inst_id).ToImplicit(), new_inst)); CARBON_CHECK(const_id.has_value(), "Substitution into constant produced non-constant"); - return context_->constant_values().GetInstId(const_id); + return context().constant_values().GetInstId(const_id); } private: - Context* context_; Substitutions substitutions_; }; } // namespace diff --git a/toolchain/check/subst.h b/toolchain/check/subst.h index 351411ef4793..b46bde31a1d1 100644 --- a/toolchain/check/subst.h +++ b/toolchain/check/subst.h @@ -14,12 +14,21 @@ namespace Carbon::Check { // instruction. class SubstInstCallbacks { public: + explicit SubstInstCallbacks(Context* context) : context_(context) {} + + auto context() const -> Context& { return *context_; } + // Performs any needed substitution into an instruction. The instruction ID // should be updated as necessary to represent the new instruction. Returns // true if the resulting instruction ID is fully-substituted, or false if // substitution may be needed into operands of the instruction. virtual auto Subst(SemIR::InstId& inst_id) const -> bool = 0; + // Rebuilds the type of an instruction from the substituted type instruction. + // By default this builds the unattached type described by the given type ID. + virtual auto RebuildType(SemIR::TypeInstId type_inst_id) const + -> SemIR::TypeId; + // Rebuilds an instruction whose operands were changed by substitution. // `orig_inst_id` is the instruction prior to substitution, and `new_inst` is // the substituted instruction. Returns the new instruction ID to use to refer @@ -35,6 +44,9 @@ class SubstInstCallbacks { -> SemIR::InstId { return orig_inst_id; } + + private: + Context* context_; }; // Performs substitution into `inst_id` and its operands recursively, using diff --git a/toolchain/check/testdata/alias/fail_control_flow.carbon b/toolchain/check/testdata/alias/fail_control_flow.carbon index cdd87a42d36a..d4eb52ad1210 100644 --- a/toolchain/check/testdata/alias/fail_control_flow.carbon +++ b/toolchain/check/testdata/alias/fail_control_flow.carbon @@ -77,7 +77,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst33.loc4_24 [concrete = constants.%C.generic] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst34.loc4_24 [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc12_20: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %.loc12: bool = not %true.loc12_20 [concrete = constants.%false] // CHECK:STDOUT: %true.loc12_25: bool = bool_literal true [concrete = constants.%true] diff --git a/toolchain/check/testdata/choice/generic.carbon b/toolchain/check/testdata/choice/generic.carbon index 53a190243ab6..cae06e64a148 100644 --- a/toolchain/check/testdata/choice/generic.carbon +++ b/toolchain/check/testdata/choice/generic.carbon @@ -83,5 +83,3 @@ choice Always(T:! type) { // CHECK:STDOUT: %T.loc11_15.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Always(%T.loc11_15.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index fd45d8bd142d..2db275ac5af0 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -172,10 +172,6 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %pattern_type.loc13_20 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%N.51e) { // CHECK:STDOUT: %N.loc33_10.2 => constants.%N.51e // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index 4ead58dd90ef..36ed22857a93 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -246,8 +246,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.loc4_9.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc4_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { // CHECK:STDOUT: %T.loc4_9.2 => constants.%i32 // CHECK:STDOUT: @@ -303,7 +301,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Main.import_ref.709: = import_ref Main//adapt_specific_type, loc10_1, loaded [concrete = constants.%complete_type.c07] // CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//adapt_specific_type, inst42 [no loc], unloaded // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %.22b: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete] +// CHECK:STDOUT: %.22b: %C.elem.66c = field_decl x, element0 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -388,8 +386,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %complete_type => constants.%complete_type.c07 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_extend_adapt_specific_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -515,8 +511,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.loc4_9.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc4_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { // CHECK:STDOUT: %T.loc4_9.2 => constants.%i32 // CHECK:STDOUT: @@ -620,8 +614,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.loc7_9.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc7_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { // CHECK:STDOUT: %T.loc7_9.2 => constants.%i32 // CHECK:STDOUT: @@ -678,7 +670,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//extend_adapt_specific_type_library, inst42 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.19d12e.2: type = import_ref Main//extend_adapt_specific_type_library, loc12_21, loaded [concrete = constants.%C.239] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %.22b: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete] +// CHECK:STDOUT: %.22b: %C.elem.66c = field_decl x, element0 [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -759,8 +751,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %complete_type => constants.%complete_type.c07 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- adapt_generic_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index 5c39691b9cc9..412a98dcc9ba 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -232,8 +232,6 @@ fn H() { // CHECK:STDOUT: %T.loc4_17.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(%T.loc4_17.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Base(constants.%Param) { // CHECK:STDOUT: %T.loc4_17.2 => constants.%Param // CHECK:STDOUT: @@ -297,7 +295,7 @@ fn H() { // CHECK:STDOUT: %Main.import_ref.d24 = import_ref Main//extend_generic_base, loc13_27, unloaded // CHECK:STDOUT: %Main.import_ref.77a301.2: type = import_ref Main//extend_generic_base, loc13_26, loaded [concrete = constants.%Base.7a8] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %.e66: @Base.%Base.elem (%Base.elem.9af) = field_decl x, element0 [concrete] +// CHECK:STDOUT: %.e66: %Base.elem.9af = field_decl x, element0 [concrete] // CHECK:STDOUT: %.be7: %Param.elem = field_decl y, element0 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -393,8 +391,6 @@ fn H() { // CHECK:STDOUT: %complete_type => constants.%complete_type.db3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_extend_symbolic_base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -692,12 +688,6 @@ fn H() { // CHECK:STDOUT: %G.specific_fn.loc5_24.2 => constants.%G.specific_fn.169 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(%U.loc4_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @X(@G.%U) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @G(%U) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { // CHECK:STDOUT: %T.loc8_9.2 => constants.%T // CHECK:STDOUT: } @@ -710,10 +700,6 @@ fn H() { // CHECK:STDOUT: %G => constants.%G.b504c4.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(@C.%T.loc8_9.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc8_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { // CHECK:STDOUT: %T.loc8_9.2 => constants.%i32 // CHECK:STDOUT: @@ -915,12 +901,6 @@ fn H() { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(%U) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @X(@C.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%U) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -932,10 +912,6 @@ fn H() { // CHECK:STDOUT: %G.specific_fn => constants.%G.specific_fn.169 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(@G.%U) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @G(%U) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index 9768705cced5..3c619bcea5a2 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -220,8 +220,6 @@ class Declaration(T:! type); // CHECK:STDOUT: %pattern_type.loc12_34 => constants.%pattern_type.afe // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@GetAddr.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @GetValue(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Class => constants.%Class @@ -229,10 +227,6 @@ class Declaration(T:! type); // CHECK:STDOUT: %pattern_type.loc17_29 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@GetValue.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Declaration(constants.%T) { // CHECK:STDOUT: %T.loc24_19.2 => constants.%T // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 7e8f748188ea..397fc116f064 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -768,8 +768,6 @@ class Outer(T:! type) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e86 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(@A.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%U) { // CHECK:STDOUT: %T.loc2_13.2 => constants.%U // CHECK:STDOUT: @@ -784,8 +782,6 @@ class Outer(T:! type) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.089 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(@B.%U) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%T, constants.%T) { // CHECK:STDOUT: %U.loc3_15.2 => constants.%T // CHECK:STDOUT: @@ -809,10 +805,6 @@ class Outer(T:! type) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a60 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(@C.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@C.%T, @C.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%T, constants.%U) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.eae @@ -822,11 +814,3 @@ class Outer(T:! type) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.372 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(@D.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@D.%T, @D.%U) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(%T, %U.loc3_15.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(%T.loc2_13.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index 3c0ea473ffc6..5da02c51ff0c 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -258,8 +258,6 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %N.loc6_9.2 => constants.%N.51e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(%N.loc6_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%int_0.6a9) { // CHECK:STDOUT: %N.loc6_9.2 => constants.%int_0.6a9 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index 2a094086f24c..f72d89619f3a 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -236,8 +236,6 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.4339b3.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%i32) { // CHECK:STDOUT: %T.loc11_13.2 => constants.%i32 // CHECK:STDOUT: @@ -256,8 +254,6 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %pattern_type.loc19_29 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@G.%T.loc19_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%U) { // CHECK:STDOUT: %T.loc11_13.2 => constants.%U // CHECK:STDOUT: @@ -276,5 +272,3 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %pattern_type.loc23_29 => constants.%pattern_type.7dcd0a.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@H.%U.loc23_6.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index cd08d35412ee..1d983c39755a 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -246,8 +246,6 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(%T.loc6_21.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%i32) { // CHECK:STDOUT: %T.loc6_21.2 => constants.%i32 // CHECK:STDOUT: } @@ -423,8 +421,6 @@ class Class(U:! type) { // CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.1) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: @@ -435,8 +431,6 @@ class Class(U:! type) { // CHECK:STDOUT: %F => constants.%F.874 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%i32) { @@ -496,7 +490,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Main.import_ref.e76: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.28a) = import_ref Main//foo, loc7_8, loaded [concrete = %.364] // CHECK:STDOUT: %Main.import_ref.a52: @CompleteClass.%F.type (%F.type.14f) = import_ref Main//foo, loc8_17, loaded [symbolic = @CompleteClass.%F (constants.%F.874)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] -// CHECK:STDOUT: %.364: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.28a) = field_decl n, element0 [concrete] +// CHECK:STDOUT: %.364: %CompleteClass.elem.28a = field_decl n, element0 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -620,8 +614,6 @@ class Class(U:! type) { // CHECK:STDOUT: %F => constants.%F.874 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%i32) { @@ -765,8 +757,6 @@ class Class(U:! type) { // CHECK:STDOUT: %F => constants.%F.874 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%ptr.9e1) { diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 369195cfb31a..ea85cdec56ce 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -234,15 +234,11 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.b9e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @InitFromStructGeneric(constants.%T) { // CHECK:STDOUT: %T.loc8_26.2 => constants.%T // CHECK:STDOUT: %pattern_type.loc8 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@InitFromStructGeneric.%T.loc8_26.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%i32) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%i32 // CHECK:STDOUT: @@ -409,8 +405,6 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Adapt(@InitFromAdaptedGeneric.%T.loc8_27.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Adapt(constants.%i32) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%i32 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index 14d3a52140cb..77a245c8fa76 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -30,7 +30,7 @@ fn AddrMethodCall(p: Class(i32)*) -> i32 { return *p->GetAddr(); } -// --- fail_todo_static_member_fn_call.carbon +// --- static_member_fn_call.carbon library "[[@TEST_NAME]]"; @@ -39,13 +39,6 @@ class Class(T:! type) { } fn StaticMemberFunctionCall(T:! type) -> Class(T) { - // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Class(T)` to `Class(T)` [ConversionFailure] - // CHECK:STDERR: return Class(T).Make(); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+4]]:3: note: type `Class(T)` does not implement interface `Core.ImplicitAs(Class(T))` [MissingImplInMemberAccessNote] - // CHECK:STDERR: return Class(T).Make(); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: return Class(T).Make(); } @@ -364,8 +357,6 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %pattern_type.loc5_24 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@Get.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @GetAddr(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Class => constants.%Class.fe1 @@ -375,10 +366,6 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %pattern_type.loc7_34 => constants.%pattern_type.afe // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@GetAddr.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc2_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%i32) { // CHECK:STDOUT: %T.loc2_13.2 => constants.%i32 // CHECK:STDOUT: @@ -421,7 +408,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.elem => constants.%Class.elem.2d8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_static_member_fn_call.carbon +// CHECK:STDOUT: --- static_member_fn_call.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] @@ -434,34 +421,18 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Make: %Make.type = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.4f8: = require_complete_type %Class [symbolic] +// CHECK:STDOUT: %require_complete: = require_complete_type %Class [symbolic] // CHECK:STDOUT: %Class.val: %Class = struct_value () [symbolic] // CHECK:STDOUT: %StaticMemberFunctionCall.type: type = fn_type @StaticMemberFunctionCall [concrete] // CHECK:STDOUT: %StaticMemberFunctionCall: %StaticMemberFunctionCall.type = struct_value () [concrete] // CHECK:STDOUT: %Make.specific_fn: = specific_function %Make, @Make(%T) [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @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.53b: type = facet_type <@ImplicitAs, @ImplicitAs(%Class)> [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.6aa: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Class) [symbolic] -// CHECK:STDOUT: %assoc0.f00: %ImplicitAs.assoc_type.6aa = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %require_complete.d81: = require_complete_type %ImplicitAs.type.53b [symbolic] -// CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [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: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//prelude/operators/as, loc13_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)] -// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude/operators/as, loc13_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//prelude/operators/as, loc13_35, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -526,7 +497,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %pattern_type: type = pattern_type %Class.loc5_23.1 [symbolic = %pattern_type (constants.%pattern_type.3c1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Class.loc5_23.1 [symbolic = %require_complete (constants.%require_complete.4f8)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Class.loc5_23.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %Class.val: @Make.%Class.loc5_23.1 (%Class) = struct_value () [symbolic = %Class.val (constants.%Class.val)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return.param: @Make.%Class.loc5_23.1 (%Class) { @@ -544,30 +515,22 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %pattern_type: type = pattern_type %Class.loc8_49.2 [symbolic = %pattern_type (constants.%pattern_type.3c1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc16_18: = require_complete_type %Class.loc8_49.2 [symbolic = %require_complete.loc16_18 (constants.%require_complete.4f8)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Class.loc8_49.2 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Class(%T.loc8_29.2) [symbolic = %Make.type (constants.%Make.type)] // CHECK:STDOUT: %Make: @StaticMemberFunctionCall.%Make.type (%Make.type) = struct_value () [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %Make.specific_fn.loc16_18.2: = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %Make.specific_fn.loc16_18.2 (constants.%Make.specific_fn)] -// CHECK:STDOUT: %ImplicitAs.type.loc16_25.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Class.loc8_49.2)> [symbolic = %ImplicitAs.type.loc16_25.2 (constants.%ImplicitAs.type.53b)] -// CHECK:STDOUT: %require_complete.loc16_25: = require_complete_type %ImplicitAs.type.loc16_25.2 [symbolic = %require_complete.loc16_25 (constants.%require_complete.d81)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Class.loc8_49.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.6aa)] -// CHECK:STDOUT: %assoc0: @StaticMemberFunctionCall.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.6aa) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.f00)] +// CHECK:STDOUT: %Make.specific_fn.loc9_18.2: = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %Make.specific_fn.loc9_18.2 (constants.%Make.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return.param: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref.loc16: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, %T.loc8_29.1 [symbolic = %T.loc8_29.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc16: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class)] -// CHECK:STDOUT: %.loc16_18: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc16_18 [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %Make.specific_fn.loc16_18.1: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %Make.specific_fn.loc16_18.2 (constants.%Make.specific_fn)] -// CHECK:STDOUT: %.loc16_24: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = temporary_storage -// CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = call %Make.specific_fn.loc16_18.1() to %.loc16_24 -// CHECK:STDOUT: %ImplicitAs.type.loc16_25.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%Class)> [symbolic = %ImplicitAs.type.loc16_25.2 (constants.%ImplicitAs.type.53b)] -// CHECK:STDOUT: %.loc16_25.1: @StaticMemberFunctionCall.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.6aa) = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%Class) [symbolic = %assoc0 (constants.%assoc0.f00)] -// CHECK:STDOUT: %Convert.ref: @StaticMemberFunctionCall.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.6aa) = name_ref Convert, %.loc16_25.1 [symbolic = %assoc0 (constants.%assoc0.f00)] -// CHECK:STDOUT: %.loc16_25.2: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = converted %Make.call, [concrete = ] -// CHECK:STDOUT: return to %return +// CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] +// CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc8_29.1 [symbolic = %T.loc8_29.2 (constants.%T)] +// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class)] +// CHECK:STDOUT: %.loc9: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)] +// CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc9 [symbolic = %Make (constants.%Make)] +// CHECK:STDOUT: %Make.specific_fn.loc9_18.1: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %Make.specific_fn.loc9_18.2 (constants.%Make.specific_fn)] +// CHECK:STDOUT: %.loc8: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = splice_block %return {} +// CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = call %Make.specific_fn.loc9_18.1() to %.loc8 +// CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -585,21 +548,13 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3c1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete.4f8 +// CHECK:STDOUT: %require_complete => constants.%require_complete // CHECK:STDOUT: %Class.val => constants.%Class.val // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@Make.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @StaticMemberFunctionCall(constants.%T) { // CHECK:STDOUT: %T.loc8_29.2 => constants.%T // CHECK:STDOUT: %Class.loc8_49.2 => constants.%Class // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3c1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@StaticMemberFunctionCall.%T.loc8_29.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Make(@StaticMemberFunctionCall.%T.loc8_29.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index 18b4202970ff..b03ac704bc20 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -201,10 +201,6 @@ class C(T:! type) { // CHECK:STDOUT: %pattern_type.loc9_22 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@G.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_member_inline.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -291,7 +287,3 @@ class C(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc4_9.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@F.%T) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_lookup.carbon b/toolchain/check/testdata/class/generic/member_lookup.carbon index cd45e7835b8c..7e8ae966be89 100644 --- a/toolchain/check/testdata/class/generic/member_lookup.carbon +++ b/toolchain/check/testdata/class/generic/member_lookup.carbon @@ -333,8 +333,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.eaf // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(%T.loc4_17.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Derived(constants.%T) { // CHECK:STDOUT: %T.loc8_15.2 => constants.%T // CHECK:STDOUT: @@ -349,10 +347,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %complete_type.loc11_1.2 => constants.%complete_type.8ad // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(@Derived.%T.loc8_15.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Derived(%T.loc8_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @AccessDerived(constants.%T) { // CHECK:STDOUT: %T.loc13_18.2 => constants.%T // CHECK:STDOUT: %Derived.loc13_40.2 => constants.%Derived.85c @@ -360,8 +354,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %pattern_type.loc13_43 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Derived(@AccessDerived.%T.loc13_18.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @AccessBase(constants.%T) { // CHECK:STDOUT: %T.loc17_15.2 => constants.%T // CHECK:STDOUT: %Derived.loc17_37.2 => constants.%Derived.85c @@ -369,10 +361,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %pattern_type.loc17_40 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Derived(@AccessBase.%T.loc17_15.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(@AccessBase.%T.loc17_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Derived(constants.%i32) { // CHECK:STDOUT: %T.loc8_15.2 => constants.%i32 // CHECK:STDOUT: @@ -649,8 +637,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.eaf // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(%T.loc4_17.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Derived(constants.%T) { // CHECK:STDOUT: %T.loc8_15.2 => constants.%T // CHECK:STDOUT: @@ -665,10 +651,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %complete_type.loc11_1.2 => constants.%complete_type.8ad // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(@Derived.%T.loc8_15.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Derived(%T.loc8_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @AccessMissingBase(constants.%T) { // CHECK:STDOUT: %T.loc13_22.2 => constants.%T // CHECK:STDOUT: %Base.loc13_41.2 => constants.%Base.370 @@ -676,8 +658,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %pattern_type.loc13_44 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(@AccessMissingBase.%T.loc13_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @AccessMissingDerived(constants.%T) { // CHECK:STDOUT: %T.loc21_25.2 => constants.%T // CHECK:STDOUT: %Derived.loc21_47.2 => constants.%Derived.85c @@ -685,10 +665,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %pattern_type.loc21_50 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Derived(@AccessMissingDerived.%T.loc21_25.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(@AccessMissingDerived.%T.loc21_25.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Derived(constants.%i32) { // CHECK:STDOUT: %T.loc8_15.2 => constants.%i32 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index 7563d6253727..9891972b935f 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -145,7 +145,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } { // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { // CHECK:STDOUT: %n.patt: @F.%pattern_type (%pattern_type.7dc) = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: @F.%pattern_type (%pattern_type.7dc) = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: @F.%pattern_type (%pattern_type.7dc) = return_slot_pattern [concrete] @@ -159,7 +159,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %return.param.loc10: ref @F.%T.loc5 (%T) = out_param call_param1 // CHECK:STDOUT: %return.loc10: ref @F.%T.loc5 (%T) = return_slot %return.param.loc10 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: @Class.%G.type (%G.type) = fn_decl @G [symbolic = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [symbolic = constants.%G] { // CHECK:STDOUT: %self.patt: @G.%pattern_type.loc6_8 (%pattern_type.3c1) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @G.%pattern_type.loc6_8 (%pattern_type.3c1) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: @G.%pattern_type.loc6_22 (%pattern_type.7dc) = return_slot_pattern [concrete] @@ -299,10 +299,6 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %pattern_type.loc6_22 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@G.%T.loc6) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -343,7 +339,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } { // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: @B.%F.type (%F.type) = fn_decl @F [symbolic = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { // CHECK:STDOUT: %self.patt: @F.%pattern_type.loc6_10 (%pattern_type.13e) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @F.%pattern_type.loc6_10 (%pattern_type.13e) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %a.patt: @F.%pattern_type.loc6_22 (%pattern_type.7dc) = binding_pattern a [concrete] @@ -469,12 +465,6 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %pattern_type.loc6_22 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @B(@F.%T.loc6, @F.%N.loc6) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @B(%T, %N.loc5_11.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @A(%T.loc4_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatched_not_generic_vs_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -606,8 +596,6 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: specific @TooFew.1(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%T.loc4_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatched_too_many_args.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -690,8 +678,6 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: specific @TooMany.1(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%T.loc4_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @TooMany.2(constants.%T, constants.%U) { // CHECK:STDOUT: %T.loc15_12.2 => constants.%T // CHECK:STDOUT: %U.loc15_22.2 => constants.%U @@ -782,8 +768,6 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: specific @WrongType.1(constants.%T.8b3) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%T.loc4_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @WrongType.2(constants.%T.7a6) { // CHECK:STDOUT: %T.loc15_12.2 => constants.%T.7a6 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index 655c2131ebb6..7c99bd679b88 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -287,8 +287,6 @@ fn Test() -> i32 { // CHECK:STDOUT: %complete_type.loc7_3.2 => constants.%complete_type.84b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type.loc9_8 => constants.%pattern_type.7dcd0a.1 @@ -296,12 +294,6 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc9_14 => constants.%pattern_type.253 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@F.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@Outer.%T.loc4_13.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%i32) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%i32 // CHECK:STDOUT: @@ -720,10 +712,6 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -740,12 +728,6 @@ fn Test() -> i32 { // CHECK:STDOUT: %F => constants.%F.ed9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.eed.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@impl.eed.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.eed(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %C => constants.%C.390 @@ -753,8 +735,6 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc11_23 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@F.2.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Inner.facet.9a3) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.392 @@ -764,10 +744,6 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@Outer.%T.loc4_13.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@Outer.%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Inner.facet.c18) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.392 @@ -777,10 +753,6 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@F.2.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(@F.2.%T, @F.2.%Inner.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%i32) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%i32 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index 9a1a89c14abe..017003b3c86c 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -48,7 +48,6 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %require_complete.fe1: = require_complete_type %tuple.type.30b [symbolic] // CHECK:STDOUT: %Get.specific_fn.f73: = specific_function %Get.cf9, @Get(%T, %U) [symbolic] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %require_complete.b54: = require_complete_type %U [symbolic] // CHECK:STDOUT: %GetNoDeduce.specific_fn.536: = specific_function %GetNoDeduce.c9a, @GetNoDeduce(%T, %U) [symbolic] // CHECK:STDOUT: %Class.480: type = class_type @Class, @Class(%A) [concrete] // CHECK:STDOUT: %pattern_type.827: type = pattern_type %Class.480 [concrete] @@ -213,12 +212,10 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [symbolic = %pattern_type (constants.%pattern_type.65c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc15_20: = require_complete_type %tuple.type [symbolic = %require_complete.loc15_20 (constants.%require_complete.fe1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.fe1)] // CHECK:STDOUT: %Get.type: type = fn_type @Get, @Class(%T) [symbolic = %Get.type (constants.%Get.type.fd9)] // CHECK:STDOUT: %Get: @Get.%Get.type (%Get.type.fd9) = struct_value () [symbolic = %Get (constants.%Get.cf9)] // CHECK:STDOUT: %Get.specific_fn.loc15_39.2: = specific_function %Get, @Get(%T, %U.loc15_10.1) [symbolic = %Get.specific_fn.loc15_39.2 (constants.%Get.specific_fn.f73)] -// CHECK:STDOUT: %require_complete.loc15_44.1: = require_complete_type %T [symbolic = %require_complete.loc15_44.1 (constants.%require_complete.4ae)] -// CHECK:STDOUT: %require_complete.loc15_44.2: = require_complete_type %U.loc15_10.1 [symbolic = %require_complete.loc15_44.2 (constants.%require_complete.b54)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return.param: @Get.%tuple.type (%tuple.type.30b) { // CHECK:STDOUT: !entry: @@ -226,20 +223,9 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Get.ref: @Get.%Get.type (%Get.type.fd9) = name_ref Get, %.loc15_39 [symbolic = %Get (constants.%Get.cf9)] // CHECK:STDOUT: %U.ref.loc15_43: type = name_ref U, %U.loc15_10.2 [symbolic = %U.loc15_10.1 (constants.%U)] // CHECK:STDOUT: %Get.specific_fn.loc15_39.1: = specific_function %Get.ref, @Get(constants.%T, constants.%U) [symbolic = %Get.specific_fn.loc15_39.2 (constants.%Get.specific_fn.f73)] -// CHECK:STDOUT: %.loc15_44.1: ref @Get.%tuple.type (%tuple.type.30b) = temporary_storage -// CHECK:STDOUT: %Get.call: init @Get.%tuple.type (%tuple.type.30b) = call %Get.specific_fn.loc15_39.1() to %.loc15_44.1 -// CHECK:STDOUT: %.loc15_44.2: ref @Get.%tuple.type (%tuple.type.30b) = temporary %.loc15_44.1, %Get.call -// CHECK:STDOUT: %tuple.elem0.loc15_44.1: ref @Get.%T (%T) = tuple_access %.loc15_44.2, element0 -// CHECK:STDOUT: %.loc15_44.3: @Get.%T (%T) = bind_value %tuple.elem0.loc15_44.1 -// CHECK:STDOUT: %tuple.elem0.loc15_44.2: ref @Get.%T (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc15_44.4: init @Get.%T (%T) = initialize_from %.loc15_44.3 to %tuple.elem0.loc15_44.2 -// CHECK:STDOUT: %tuple.elem1.loc15_44.1: ref @Get.%U.loc15_10.1 (%U) = tuple_access %.loc15_44.2, element1 -// CHECK:STDOUT: %.loc15_44.5: @Get.%U.loc15_10.1 (%U) = bind_value %tuple.elem1.loc15_44.1 -// CHECK:STDOUT: %tuple.elem1.loc15_44.2: ref @Get.%U.loc15_10.1 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc15_44.6: init @Get.%U.loc15_10.1 (%U) = initialize_from %.loc15_44.5 to %tuple.elem1.loc15_44.2 -// CHECK:STDOUT: %.loc15_44.7: init @Get.%tuple.type (%tuple.type.30b) = tuple_init (%.loc15_44.4, %.loc15_44.6) to %return -// CHECK:STDOUT: %.loc15_45: init @Get.%tuple.type (%tuple.type.30b) = converted %Get.call, %.loc15_44.7 -// CHECK:STDOUT: return %.loc15_45 to %return +// CHECK:STDOUT: %.loc15_20: ref @Get.%tuple.type (%tuple.type.30b) = splice_block %return {} +// CHECK:STDOUT: %Get.call: init @Get.%tuple.type (%tuple.type.30b) = call %Get.specific_fn.loc15_39.1() to %.loc15_20 +// CHECK:STDOUT: return %Get.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -256,7 +242,6 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %GetNoDeduce: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.766) = struct_value () [symbolic = %GetNoDeduce (constants.%GetNoDeduce.c9a)] // CHECK:STDOUT: %GetNoDeduce.specific_fn.loc16_53.2: = specific_function %GetNoDeduce, @GetNoDeduce(%T, %U.loc16_24.1) [symbolic = %GetNoDeduce.specific_fn.loc16_53.2 (constants.%GetNoDeduce.specific_fn.536)] // CHECK:STDOUT: %require_complete.loc16_70: = require_complete_type %tuple.type [symbolic = %require_complete.loc16_70 (constants.%require_complete.fe1)] -// CHECK:STDOUT: %require_complete.loc16_69: = require_complete_type %U.loc16_24.1 [symbolic = %require_complete.loc16_69 (constants.%require_complete.b54)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @GetNoDeduce.%T (%T)) -> %return.param: @GetNoDeduce.%tuple.type (%tuple.type.30b) { // CHECK:STDOUT: !entry: @@ -265,20 +250,9 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %x.ref: @GetNoDeduce.%T (%T) = name_ref x, %x // CHECK:STDOUT: %U.ref.loc16_68: type = name_ref U, %U.loc16_24.2 [symbolic = %U.loc16_24.1 (constants.%U)] // CHECK:STDOUT: %GetNoDeduce.specific_fn.loc16_53.1: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%T, constants.%U) [symbolic = %GetNoDeduce.specific_fn.loc16_53.2 (constants.%GetNoDeduce.specific_fn.536)] -// CHECK:STDOUT: %.loc16_69.1: ref @GetNoDeduce.%tuple.type (%tuple.type.30b) = temporary_storage -// CHECK:STDOUT: %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.30b) = call %GetNoDeduce.specific_fn.loc16_53.1(%x.ref) to %.loc16_69.1 -// CHECK:STDOUT: %.loc16_69.2: ref @GetNoDeduce.%tuple.type (%tuple.type.30b) = temporary %.loc16_69.1, %GetNoDeduce.call -// CHECK:STDOUT: %tuple.elem0.loc16_69.1: ref @GetNoDeduce.%T (%T) = tuple_access %.loc16_69.2, element0 -// CHECK:STDOUT: %.loc16_69.3: @GetNoDeduce.%T (%T) = bind_value %tuple.elem0.loc16_69.1 -// CHECK:STDOUT: %tuple.elem0.loc16_69.2: ref @GetNoDeduce.%T (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_69.4: init @GetNoDeduce.%T (%T) = initialize_from %.loc16_69.3 to %tuple.elem0.loc16_69.2 -// CHECK:STDOUT: %tuple.elem1.loc16_69.1: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %.loc16_69.2, element1 -// CHECK:STDOUT: %.loc16_69.5: @GetNoDeduce.%U.loc16_24.1 (%U) = bind_value %tuple.elem1.loc16_69.1 -// CHECK:STDOUT: %tuple.elem1.loc16_69.2: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_69.6: init @GetNoDeduce.%U.loc16_24.1 (%U) = initialize_from %.loc16_69.5 to %tuple.elem1.loc16_69.2 -// CHECK:STDOUT: %.loc16_69.7: init @GetNoDeduce.%tuple.type (%tuple.type.30b) = tuple_init (%.loc16_69.4, %.loc16_69.6) to %return -// CHECK:STDOUT: %.loc16_70: init @GetNoDeduce.%tuple.type (%tuple.type.30b) = converted %GetNoDeduce.call, %.loc16_69.7 -// CHECK:STDOUT: return %.loc16_70 to %return +// CHECK:STDOUT: %.loc16_34: ref @GetNoDeduce.%tuple.type (%tuple.type.30b) = splice_block %return {} +// CHECK:STDOUT: %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.30b) = call %GetNoDeduce.specific_fn.loc16_53.1(%x.ref) to %.loc16_34 +// CHECK:STDOUT: return %GetNoDeduce.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -329,12 +303,10 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.65c // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc15_20 => constants.%require_complete.fe1 +// CHECK:STDOUT: %require_complete => constants.%require_complete.fe1 // CHECK:STDOUT: %Get.type => constants.%Get.type.fd9 // CHECK:STDOUT: %Get => constants.%Get.cf9 // CHECK:STDOUT: %Get.specific_fn.loc15_39.2 => constants.%Get.specific_fn.f73 -// CHECK:STDOUT: %require_complete.loc15_44.1 => constants.%require_complete.4ae -// CHECK:STDOUT: %require_complete.loc15_44.2 => constants.%require_complete.b54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetNoDeduce(constants.%T, constants.%U) { @@ -350,19 +322,8 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %GetNoDeduce => constants.%GetNoDeduce.c9a // CHECK:STDOUT: %GetNoDeduce.specific_fn.loc16_53.2 => constants.%GetNoDeduce.specific_fn.536 // CHECK:STDOUT: %require_complete.loc16_70 => constants.%require_complete.fe1 -// CHECK:STDOUT: %require_complete.loc16_69 => constants.%require_complete.b54 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc14_13.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@Get.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Get(%T, %U.loc15_10.1) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@GetNoDeduce.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @GetNoDeduce(%T, %U.loc16_24.1) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%A) { // CHECK:STDOUT: %T.loc14_13.2 => constants.%A // CHECK:STDOUT: @@ -380,12 +341,10 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.edc // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc15_20 => constants.%complete_type.56a +// CHECK:STDOUT: %require_complete => constants.%complete_type.56a // CHECK:STDOUT: %Get.type => constants.%Get.type.501 // CHECK:STDOUT: %Get => constants.%Get.f37 // CHECK:STDOUT: %Get.specific_fn.loc15_39.2 => constants.%Get.specific_fn.213 -// CHECK:STDOUT: %require_complete.loc15_44.1 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc15_44.2 => constants.%complete_type.357 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetNoDeduce(constants.%A, constants.%B) { @@ -401,6 +360,5 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %GetNoDeduce => constants.%GetNoDeduce.162 // CHECK:STDOUT: %GetNoDeduce.specific_fn.loc16_53.2 => constants.%GetNoDeduce.specific_fn.438 // CHECK:STDOUT: %require_complete.loc16_70 => constants.%complete_type.56a -// CHECK:STDOUT: %require_complete.loc16_69 => constants.%complete_type.357 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index e49aae9a43ae..90608f8b55b3 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -218,8 +218,6 @@ class Class(T:! type) { // CHECK:STDOUT: %Class.val => constants.%Class.val // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@MakeSelf.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @MakeClass(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Class.loc15_28.1 => constants.%Class @@ -230,15 +228,5 @@ class Class(T:! type) { // CHECK:STDOUT: %Class.val => constants.%Class.val // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@MakeClass.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@F.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @MakeSelf(@F.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @MakeClass(@F.%T) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index a701b64ccc67..6796cfb01583 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -312,8 +312,6 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %U.loc5_15.2 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%ptr.c28) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%ptr.c28 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic_method.carbon b/toolchain/check/testdata/class/generic_method.carbon index f248b47efe36..27711f9ff724 100644 --- a/toolchain/check/testdata/class/generic_method.carbon +++ b/toolchain/check/testdata/class/generic_method.carbon @@ -52,7 +52,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { // CHECK:STDOUT: %self.patt: @F.%pattern_type.loc13_8 (%pattern_type.3c1) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @F.%pattern_type.loc13_8 (%pattern_type.3c1) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %n.patt: @F.%pattern_type.loc13_20 (%pattern_type.7dc) = binding_pattern n [concrete] @@ -150,7 +150,3 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %pattern_type.loc13_20 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(@F.%T.loc13) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/min_prelude/destroy_calls.carbon b/toolchain/check/testdata/class/min_prelude/destroy_calls.carbon index fcc6d89c71c4..64d39d0ce9e7 100644 --- a/toolchain/check/testdata/class/min_prelude/destroy_calls.carbon +++ b/toolchain/check/testdata/class/min_prelude/destroy_calls.carbon @@ -890,8 +890,6 @@ fn G() { F({}); } // CHECK:STDOUT: %T.loc6_15.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@F.%T.loc6_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%empty_struct_type) { // CHECK:STDOUT: %T.loc6_15.2 => constants.%empty_struct_type // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon index 389d83777cca..5128c02ffb60 100644 --- a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon @@ -334,10 +334,6 @@ class Foo[T:! type]; // CHECK:STDOUT: %U.loc10_26.2 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericNoParams(@C.%T.loc8_9.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc8_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.1(constants.%X) { // CHECK:STDOUT: %T.loc6_24.2 => constants.%X // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 24a8ad0cd23d..45f618c65401 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -1919,10 +1919,6 @@ base class T1(T:! type) { // CHECK:STDOUT: %pattern_type.loc8_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Base(%T.loc7_17.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Base(constants.%T1) { // CHECK:STDOUT: %T.loc7_17.2 => constants.%T1 // CHECK:STDOUT: @@ -2245,10 +2241,6 @@ base class T1(T:! type) { // CHECK:STDOUT: %T.loc9_28.1 => constants.%T.336 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(@F.%T.loc9_22) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(%T.loc4_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- generic_with_virtual.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -2335,10 +2327,6 @@ base class T1(T:! type) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.48e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(@F.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(%T.loc4_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- with_dependent_arg.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -2434,7 +2422,3 @@ base class T1(T:! type) { // CHECK:STDOUT: %pattern_type.loc5_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(@F.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(%T.loc4_15.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 051cf543dd0f..14de873846a4 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -226,10 +226,6 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.ef1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@F.%T.loc7_6.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc7_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%D) { // CHECK:STDOUT: %T.loc4_9.2 => constants.%D // CHECK:STDOUT: @@ -402,10 +398,6 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.ef1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.%T.loc7_6.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc7_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%C) { // CHECK:STDOUT: %T.loc4_9.2 => constants.%C // CHECK:STDOUT: @@ -448,8 +440,6 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.fe1: = require_complete_type %tuple.type.30b [symbolic] // CHECK:STDOUT: %require_complete.e7e: = require_complete_type %Inner.c71 [symbolic] // CHECK:STDOUT: %F.specific_fn.dd9: = specific_function %F, @F(%T, %U) [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %require_complete.b54: = require_complete_type %U [symbolic] // CHECK:STDOUT: %Outer.7c4: type = class_type @Outer, @Outer(%C) [concrete] // CHECK:STDOUT: %Inner.type.181: type = generic_class_type @Inner, @Outer(%C) [concrete] // CHECK:STDOUT: %Inner.generic.205: %Inner.type.181 = struct_value () [concrete] @@ -613,28 +603,15 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.loc13_48: = require_complete_type %tuple.type [symbolic = %require_complete.loc13_48 (constants.%require_complete.fe1)] // CHECK:STDOUT: %require_complete.loc13_27: = require_complete_type %Inner.loc13_45.2 [symbolic = %require_complete.loc13_27 (constants.%require_complete.e7e)] // CHECK:STDOUT: %F.specific_fn.loc13_67.2: = specific_function constants.%F, @F(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %F.specific_fn.loc13_67.2 (constants.%F.specific_fn.dd9)] -// CHECK:STDOUT: %require_complete.loc13_70.1: = require_complete_type %T.loc13_6.2 [symbolic = %require_complete.loc13_70.1 (constants.%require_complete.4ae)] -// CHECK:STDOUT: %require_complete.loc13_70.2: = require_complete_type %U.loc13_16.2 [symbolic = %require_complete.loc13_70.2 (constants.%require_complete.b54)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%p.param: @F.%Inner.loc13_45.2 (%Inner.c71)) -> %return.param: @F.%tuple.type (%tuple.type.30b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %p.ref: @F.%Inner.loc13_45.2 (%Inner.c71) = name_ref p, %p // CHECK:STDOUT: %F.specific_fn.loc13_67.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %F.specific_fn.loc13_67.2 (constants.%F.specific_fn.dd9)] -// CHECK:STDOUT: %.loc13_70.1: ref @F.%tuple.type (%tuple.type.30b) = temporary_storage -// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.30b) = call %F.specific_fn.loc13_67.1(%p.ref) to %.loc13_70.1 -// CHECK:STDOUT: %.loc13_70.2: ref @F.%tuple.type (%tuple.type.30b) = temporary %.loc13_70.1, %F.call -// CHECK:STDOUT: %tuple.elem0.loc13_70.1: ref @F.%T.loc13_6.2 (%T) = tuple_access %.loc13_70.2, element0 -// CHECK:STDOUT: %.loc13_70.3: @F.%T.loc13_6.2 (%T) = bind_value %tuple.elem0.loc13_70.1 -// CHECK:STDOUT: %tuple.elem0.loc13_70.2: ref @F.%T.loc13_6.2 (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc13_70.4: init @F.%T.loc13_6.2 (%T) = initialize_from %.loc13_70.3 to %tuple.elem0.loc13_70.2 -// CHECK:STDOUT: %tuple.elem1.loc13_70.1: ref @F.%U.loc13_16.2 (%U) = tuple_access %.loc13_70.2, element1 -// CHECK:STDOUT: %.loc13_70.5: @F.%U.loc13_16.2 (%U) = bind_value %tuple.elem1.loc13_70.1 -// CHECK:STDOUT: %tuple.elem1.loc13_70.2: ref @F.%U.loc13_16.2 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc13_70.6: init @F.%U.loc13_16.2 (%U) = initialize_from %.loc13_70.5 to %tuple.elem1.loc13_70.2 -// CHECK:STDOUT: %.loc13_70.7: init @F.%tuple.type (%tuple.type.30b) = tuple_init (%.loc13_70.4, %.loc13_70.6) to %return -// CHECK:STDOUT: %.loc13_71: init @F.%tuple.type (%tuple.type.30b) = converted %F.call, %.loc13_70.7 -// CHECK:STDOUT: return %.loc13_71 to %return +// CHECK:STDOUT: %.loc13_48: ref @F.%tuple.type (%tuple.type.30b) = splice_block %return {} +// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.30b) = call %F.specific_fn.loc13_67.1(%p.ref) to %.loc13_48 +// CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -662,8 +639,6 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.loc13_6.2 => constants.%T // CHECK:STDOUT: %U.loc13_16.2 => constants.%U @@ -680,16 +655,8 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.loc13_48 => constants.%require_complete.fe1 // CHECK:STDOUT: %require_complete.loc13_27 => constants.%require_complete.e7e // CHECK:STDOUT: %F.specific_fn.loc13_67.2 => constants.%F.specific_fn.dd9 -// CHECK:STDOUT: %require_complete.loc13_70.1 => constants.%require_complete.4ae -// CHECK:STDOUT: %require_complete.loc13_70.2 => constants.%require_complete.b54 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(@F.%T.loc13_6.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@F.%T.loc13_6.2, @F.%U.loc13_16.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc13_6.2, %U.loc13_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%C) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%C // CHECK:STDOUT: @@ -720,8 +687,6 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.loc13_48 => constants.%complete_type.53b // CHECK:STDOUT: %require_complete.loc13_27 => constants.%complete_type.357 // CHECK:STDOUT: %F.specific_fn.loc13_67.2 => constants.%F.specific_fn.4a7 -// CHECK:STDOUT: %require_complete.loc13_70.1 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc13_70.2 => constants.%complete_type.357 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nontype.carbon @@ -900,8 +865,6 @@ fn G() -> i32 { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.48f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithNontype(@F.%N.loc6_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @WithNontype(constants.%int_0.6a9) { // CHECK:STDOUT: %N.loc4_19.2 => constants.%int_0.6a9 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index eb1b17c2262a..c7a170854542 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -206,8 +206,6 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %F.specific_fn.loc7_54.2 => constants.%F.specific_fn.dd9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc7_6.2, %U.loc7_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C, constants.%D) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%C // CHECK:STDOUT: %U.loc7_16.2 => constants.%D @@ -443,8 +441,6 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.88c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasPair(@F.%tuple.loc6_40.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HasPair(constants.%tuple.21c) { // CHECK:STDOUT: %Pair.loc4_15.2 => constants.%tuple.21c // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index 0a854241c05e..caddfd06fd25 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -194,8 +194,6 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.ef1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc6_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %ptr.loc6_20.2 => constants.%ptr.019 @@ -345,8 +343,6 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.specific_fn.loc6_43.2 => constants.%F.specific_fn.ef1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc6_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %const.loc6_19.2 => constants.%const.668 @@ -494,8 +490,6 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.ef1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc6_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%const) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%const // CHECK:STDOUT: %ptr.loc6_20.2 => constants.%ptr.801 @@ -640,5 +634,3 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.specific_fn.loc6_43.2 => constants.%F.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc6_6.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index 79b3522295b2..ae3cb8e0719b 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -267,8 +267,6 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc8_37 => constants.%pattern_type.08e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(@F.%T.loc8_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%tuple) { // CHECK:STDOUT: %T.loc4_17.2 => constants.%tuple // CHECK:STDOUT: @@ -448,8 +446,6 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc8_39 => constants.%pattern_type.9f0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(@F.%T.loc8_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%struct) { // CHECK:STDOUT: %T.loc4_17.2 => constants.%struct // CHECK:STDOUT: @@ -641,8 +637,6 @@ fn G() { // CHECK:STDOUT: %.loc21_38.3 => constants.%.2fe // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(@F.%T.loc21_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%c) { // CHECK:STDOUT: %T.loc8_17.2 => constants.%c // CHECK:STDOUT: @@ -837,5 +831,3 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.142 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(@F.%T.loc12_6.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/access.carbon b/toolchain/check/testdata/facet/min_prelude/access.carbon index 849c932a0911..80d695a53396 100644 --- a/toolchain/check/testdata/facet/min_prelude/access.carbon +++ b/toolchain/check/testdata/facet/min_prelude/access.carbon @@ -234,8 +234,6 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: specific @DoIt(constants.%I.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @DoIt(@Use.%I.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- assoc_fn_using_self.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -364,8 +362,6 @@ interface J { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de4e4.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Make(@Use.%I.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- access_assoc_method.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -514,8 +510,6 @@ interface J { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de4e4.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Copy(@Use.%I.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- access_selfless_method.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -622,8 +616,6 @@ interface J { // CHECK:STDOUT: // CHECK:STDOUT: specific @Hello(constants.%I.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Hello(@Use.%I.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- access_assoc_method_indirect.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -773,8 +765,6 @@ interface J { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de4e4.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Copy(@UseIndirect.%I.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_non_const_associated.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1370,10 +1360,6 @@ interface J { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -1387,7 +1373,3 @@ interface J { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// 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 a6a0d8ae4f07..102dd61b8ab7 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 @@ -447,8 +447,6 @@ fn F() { // 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: %pattern_type => constants.%pattern_type.7dc @@ -481,10 +479,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @BB.1(constants.%B.facet.8d1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @AA.1(@G.%A.facet.loc33) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @BB.1(@G.%B.facet.loc34) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%facet_value) { // CHECK:STDOUT: %T.loc32_6.2 => constants.%facet_value // CHECK:STDOUT: %T.as_type.loc32_28.2 => constants.%C @@ -782,10 +776,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1 // 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: } @@ -799,10 +789,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1 // 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 @@ -814,8 +800,6 @@ fn F() { // 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: %pattern_type => constants.%pattern_type.7dcd0a.2 diff --git a/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon b/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon index 921f68859bce..90240a812218 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon @@ -290,10 +290,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -307,7 +303,3 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon index fac04591391a..d9325a554075 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon @@ -290,8 +290,6 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%Scalar.loc4_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc4_19.2 => constants.%GenericParam // CHECK:STDOUT: @@ -319,8 +317,6 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc15_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { // CHECK:STDOUT: %T.loc15_22.2 => constants.%GenericParam // CHECK:STDOUT: %Generic.type.loc15_45.2 => constants.%Generic.type.769 @@ -337,10 +333,6 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.80f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(@PassThroughToGenericMethod.%T.loc21_31.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGenericMethod(@PassThroughToGenericMethod.%T.loc21_31.2, @PassThroughToGenericMethod.%U.loc21_41.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%GenericParam, constants.%Generic.facet) { // CHECK:STDOUT: %T.loc21_31.2 => constants.%GenericParam // CHECK:STDOUT: %Generic.type.loc21_54.2 => constants.%Generic.type.769 @@ -544,8 +536,6 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%Scalar.loc4_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc4_19.2 => constants.%GenericParam // CHECK:STDOUT: @@ -572,8 +562,6 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc15_48 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc15_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { // CHECK:STDOUT: %T.loc15_22.2 => constants.%GenericParam // CHECK:STDOUT: %Generic.type.loc15_45.2 => constants.%Generic.type.769 @@ -747,10 +735,6 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -764,7 +748,3 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon b/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon index 80a8e64cb121..8982e1d39dc6 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon @@ -320,10 +320,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -337,7 +333,3 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: 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 164a5ac73d0d..d612a48aa031 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 @@ -339,8 +339,6 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee8d8.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%Scalar.loc4_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc4_19.2 => constants.%GenericParam // CHECK:STDOUT: @@ -377,12 +375,8 @@ fn B() { // CHECK:STDOUT: %pattern_type.loc15_54 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc15_22.2) {} -// CHECK:STDOUT: // 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: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8ff) { // CHECK:STDOUT: %T.loc15_22.2 => constants.%GenericParam // CHECK:STDOUT: %Generic.type.loc15_45.2 => constants.%Generic.type.769 @@ -583,8 +577,6 @@ fn B() { // CHECK:STDOUT: %W.loc3_23.2 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%V.loc3_13.2, %W.loc3_23.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T.8b3, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.loc3_13.2 => constants.%T.8b3 // CHECK:STDOUT: %W.loc3_23.2 => constants.%empty_tuple.type @@ -601,10 +593,6 @@ fn B() { // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.989 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc7_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.loc3_13.2 => constants.%empty_struct_type // CHECK:STDOUT: %W.loc3_23.2 => constants.%empty_tuple.type @@ -806,8 +794,6 @@ fn B() { // CHECK:STDOUT: %W.loc3_23.2 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%V.loc3_13.2, %W.loc3_23.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T.8b3, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.loc3_13.2 => constants.%T.8b3 // CHECK:STDOUT: %W.loc3_23.2 => constants.%empty_tuple.type @@ -824,10 +810,6 @@ fn B() { // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.989 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc7_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_struct_type) { // CHECK:STDOUT: %V.loc3_13.2 => constants.%empty_struct_type // CHECK:STDOUT: %W.loc3_23.2 => constants.%empty_struct_type @@ -1025,10 +1007,6 @@ fn B() { // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.45b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc7_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T.826) { // CHECK:STDOUT: %T.loc9_6.2 => constants.%T.826 // CHECK:STDOUT: %T.as_type.loc9_16.2 => constants.%T.as_type @@ -1215,10 +1193,6 @@ fn B() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -1232,7 +1206,3 @@ fn B() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon index 8204c7349406..ede4aa569c5e 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon @@ -543,10 +543,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -560,7 +556,3 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon index 8d85769095c4..74343ae1d9d5 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon @@ -157,8 +157,6 @@ fn F() { // CHECK:STDOUT: %T.loc18_17.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @FeedAnimal(@HandleAnimal.%T.loc18_17.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) { // CHECK:STDOUT: %T.loc18_17.2 => constants.%Animal.facet // CHECK:STDOUT: @@ -334,10 +332,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -351,7 +345,3 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: 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 2ea73c018dcc..a54b32b0a1ed 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 @@ -324,8 +324,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%T.8b3) { // CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -363,8 +361,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.680 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Feed(@HandleAnimal.%Eats.facet.loc8_50.3) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- bigger.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -633,8 +629,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -678,8 +672,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.40f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @FeedTame(@HandleTameAnimal.%facet_value.loc10_13.3) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- with_blanket.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -974,8 +966,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.8ab // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.e7b(%A.loc7_14.2) {} -// 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 @@ -987,8 +977,6 @@ fn CallsWithTypeExplicit(U:! type) { // 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) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -1040,8 +1028,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.ba9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @FeedTame2(@HandleTameAnimal2.%facet_value.loc12_14.3) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- equivalent.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1186,8 +1172,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.cf45b7.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TakesA(@WithExtraWhere.%U.loc9_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- no_interfaces_success.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1361,8 +1345,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.5eb // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TakesTypeDeduced(@CallsWithExtraWhere.%U.as_type.loc4_60.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @TakesTypeExplicit(constants.%T) { // CHECK:STDOUT: %T.loc8_22.2 => constants.%T // CHECK:STDOUT: } @@ -1377,8 +1359,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TakesTypeExplicit(@CallsWithExtraWhereExplicit.%U.as_type.loc10_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- no_interfaces.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1559,8 +1539,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TakesExtraWhereDeduced(@CallsWithType.%facet_value.loc5_27.3) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @TakesExtraWhereExplicit(constants.%T) { // CHECK:STDOUT: %T.loc8_28.2 => constants.%T // CHECK:STDOUT: } @@ -1575,8 +1553,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TakesExtraWhereExplicit(@CallsWithTypeExplicit.%facet_value.loc10_28.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- include_files/facet_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1855,10 +1831,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1 // 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: } @@ -1872,10 +1844,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1 // 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 @@ -1887,8 +1855,6 @@ fn CallsWithTypeExplicit(U:! type) { // 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: %pattern_type => constants.%pattern_type.7dcd0a.2 diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon index 85a8dc03ab41..529120383b7b 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon @@ -192,8 +192,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.8abeaf.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%A.loc17_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Feed(constants.%T.1b5) { // CHECK:STDOUT: %T.loc19_9.2 => constants.%T.1b5 // CHECK:STDOUT: %T.as_type.loc19_22.2 => constants.%T.as_type.27d @@ -223,8 +221,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %require_complete => constants.%require_complete.234 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Feed(@HandleAnimal.%Eats.facet.loc21_43.3) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- include_files/convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -387,10 +383,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -404,7 +396,3 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon index b4eab2489979..0dabfe643f39 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon @@ -401,8 +401,6 @@ fn F() { // CHECK:STDOUT: %Food.loc20_16.2 => constants.%Food.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Eats(%Food.loc20_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Eats(constants.%U.as_type) { // CHECK:STDOUT: %Food.loc20_16.2 => constants.%U.as_type // CHECK:STDOUT: @@ -421,10 +419,6 @@ fn F() { // CHECK:STDOUT: %Eats.impl_witness => constants.%Eats.impl_witness.fabf92.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Eats(@impl.009.%U.as_type.loc25_49.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.009(%T.loc25_14.2, %U.loc25_26.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Eats(constants.%Food.as_type.952) { // CHECK:STDOUT: %Food.loc20_16.2 => constants.%Food.as_type.952 // CHECK:STDOUT: } @@ -440,8 +434,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc30_46 => constants.%pattern_type.54f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Eats(@Feed.%Food.as_type.loc30_37.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%T.fd4, constants.%Food.5fe) { // CHECK:STDOUT: %T.loc31_17.2 => constants.%T.fd4 // CHECK:STDOUT: %Food.loc31_29.2 => constants.%Food.5fe @@ -482,10 +474,6 @@ fn F() { // CHECK:STDOUT: %require_complete.loc30_50 => constants.%require_complete.444 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Eats(@HandleAnimal.%Food.as_type.loc31_56.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Feed(@HandleAnimal.%Food.loc31_29.2, @HandleAnimal.%Eats.facet.loc31_76.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet, constants.%Edible.facet) { // CHECK:STDOUT: %T.loc31_17.2 => constants.%Animal.facet // CHECK:STDOUT: %Food.loc31_29.2 => constants.%Edible.facet @@ -700,10 +688,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -717,7 +701,3 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon index cd9906b8cecb..08961d20283d 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon @@ -201,8 +201,6 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.36a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @FeedAnimal(@HandleAnimal.%T.loc18_17.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) { // CHECK:STDOUT: %T.loc18_17.2 => constants.%Animal.facet // CHECK:STDOUT: %T.as_type.loc18_32.2 => constants.%Goat @@ -384,10 +382,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -401,7 +395,3 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/convert_interface.carbon b/toolchain/check/testdata/facet/min_prelude/convert_interface.carbon index 2d5eeb6a84a4..48d8fc7c52e6 100644 --- a/toolchain/check/testdata/facet/min_prelude/convert_interface.carbon +++ b/toolchain/check/testdata/facet/min_prelude/convert_interface.carbon @@ -270,10 +270,6 @@ fn G() { F(Animal); } // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -287,7 +283,3 @@ fn G() { F(Animal); } // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon index 78436870ed42..fe552667c213 100644 --- a/toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon @@ -222,8 +222,6 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%Scalar.loc14_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc14_19.2 => constants.%GenericParam // CHECK:STDOUT: @@ -249,8 +247,6 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.80f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc26_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%WrongGenericParam) { // CHECK:STDOUT: %Scalar.loc14_19.2 => constants.%WrongGenericParam // CHECK:STDOUT: } @@ -424,10 +420,6 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -441,7 +433,3 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/fail_convert_facet_value_to_missing_impl.carbon b/toolchain/check/testdata/facet/min_prelude/fail_convert_facet_value_to_missing_impl.carbon index abdf6b3143d6..05baa1cfd52d 100644 --- a/toolchain/check/testdata/facet/min_prelude/fail_convert_facet_value_to_missing_impl.carbon +++ b/toolchain/check/testdata/facet/min_prelude/fail_convert_facet_value_to_missing_impl.carbon @@ -317,10 +317,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -334,7 +330,3 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon b/toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon index 5c53141bed9f..d6e99602987f 100644 --- a/toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon +++ b/toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon @@ -292,10 +292,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -309,7 +305,3 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon b/toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon index f73e8dd32731..1c7d1e19dfae 100644 --- a/toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon +++ b/toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon @@ -320,7 +320,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %.loc40_19.3: ref %RuntimeConvertTo = temporary %.loc40_19.1, %.loc40_19.2 // CHECK:STDOUT: %.loc40_19.4: %RuntimeConvertTo = bind_value %.loc40_19.3 // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%tuple, ) [concrete = ] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%holds_to.ref) +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%holds_to.ref) [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -334,10 +334,6 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.519) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62 @@ -377,8 +373,6 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %pattern_type.loc26_29 => constants.%pattern_type.ec6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(@F.%T.loc26_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%tuple) { // CHECK:STDOUT: %T.loc16_17.2 => constants.%tuple // CHECK:STDOUT: @@ -556,10 +550,6 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc12_22.2 => constants.%Dest // CHECK:STDOUT: } @@ -573,7 +563,3 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {} -// 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 193e699eec62..b96afba2b174 100644 --- a/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon +++ b/toolchain/check/testdata/facet/min_prelude/runtime_value.carbon @@ -326,8 +326,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -508,8 +506,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%T, constants.%Self.2bc) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(%T.loc2_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%C) { // CHECK:STDOUT: %T.loc2_13.2 => constants.%C // CHECK:STDOUT: @@ -527,8 +523,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc8_20.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- include_files/facet_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -807,10 +801,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1 // 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: } @@ -824,10 +814,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1 // 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 @@ -839,8 +825,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) { // 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: %pattern_type => constants.%pattern_type.7dcd0a.2 diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index 06c6ca583dd4..5058df9d56b7 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -499,10 +499,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %pattern_type.loc12_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%T.loc11_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { // CHECK:STDOUT: %T.loc15_22.2 => constants.%T // CHECK:STDOUT: } @@ -516,10 +512,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%T.loc15_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Add.facet) { // CHECK:STDOUT: %Self => constants.%Add.facet // CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%i32.builtin @@ -702,11 +694,11 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int] // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst87 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst88 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.5e1: @As.%As.assoc_type (%As.assoc_type.760) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.97d)] // CHECK:STDOUT: %Core.Convert.313 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst87 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)] +// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst88 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)] // CHECK:STDOUT: %Core.import_ref.708: @As.%Convert.type (%Convert.type.843) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%Convert (constants.%Convert.95f)] // CHECK:STDOUT: %Core.import_ref.4e8 = import_ref Core//default, loc12_32, unloaded // CHECK:STDOUT: %Core.import_ref.07c = import_ref Core//default, inst43 [no loc], unloaded @@ -719,14 +711,14 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Core.import_ref.8721d7.1: type = import_ref Core//default, loc23_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.1e5: type = import_ref Core//default, loc23_28, loaded [concrete = constants.%As.type.a6d] // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst131 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst132 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc001e.2)] // CHECK:STDOUT: %Core.Convert.e69 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.c62: = import_ref Core//default, loc27_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a] // CHECK:STDOUT: %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e] // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst131 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] +// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst132 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc16_32, unloaded // CHECK:STDOUT: %Core.import_ref.1c752f.1: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] // CHECK:STDOUT: %Core.import_ref.c5f: = import_ref Core//default, loc31_38, loaded [concrete = constants.%ImplicitAs.impl_witness.9c5] @@ -959,10 +951,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @As(@Convert.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%T, constants.%Self.65a) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %As.type => constants.%As.type.eed @@ -1000,10 +988,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0 => constants.%assoc0.6fd // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%T, constants.%Self.519) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62 diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index 60e8b6e95510..e0cac01cbdf1 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -87,7 +87,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: } { // CHECK:STDOUT: %F.loc5_13.1: type = bind_symbolic_name F, 0 [symbolic = %F.loc5_13.2 (constants.%F.8b3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: @Inner.%G.type (%G.type) = fn_decl @G [symbolic = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [symbolic = constants.%G] { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -213,11 +213,3 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%F.8b3) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(%F.loc8_19.1) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@Class.%F.loc5_13.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@G.%F.loc13_46.1) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@G.%F.loc13_46.1) {} -// CHECK:STDOUT: 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 0d2c8017d2b5..244ec7e529a7 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 @@ -286,8 +286,6 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee8d8.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%Scalar.loc11_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc11_19.2 => constants.%GenericParam // CHECK:STDOUT: @@ -325,12 +323,8 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.80f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc29_22.2) {} -// CHECK:STDOUT: // 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: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8ff) { // CHECK:STDOUT: %T.loc29_22.2 => constants.%GenericParam // CHECK:STDOUT: %Generic.type.loc29_45.2 => constants.%Generic.type.769 diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index cb2f96a650e5..df2b8a563dcc 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -382,8 +382,6 @@ fn F() { // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.c0a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitGenericParam(%T.loc4_25.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%i32) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%i32 // CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr.235 @@ -411,8 +409,6 @@ fn F() { // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.6ad // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitGenericParam(@CallExplicitGenericParamWithGenericArg.%struct_type.a.loc10_62.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_explicit_non_constant.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -526,14 +522,10 @@ fn F() { // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitGenericParam(%T.loc4_25.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CallExplicitGenericParamConst(constants.%T) { // CHECK:STDOUT: %T.loc6_34.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitGenericParam(@CallExplicitGenericParamConst.%T.loc6_34.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- explicit_vs_deduced.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -665,8 +657,6 @@ fn F() { // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 => constants.%ExplicitAndAlsoDeduced.specific_fn.41d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(%T.loc6_27.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%A) { // CHECK:STDOUT: %T.loc6_27.2 => constants.%A // CHECK:STDOUT: %pattern_type.loc6_37 => constants.%pattern_type.c10 @@ -805,8 +795,6 @@ fn F() { // CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2 => constants.%ImplicitGenericParam.specific_fn.fc1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitGenericParam(%T.loc4_25.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitGenericParam(constants.%i32) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%i32 // CHECK:STDOUT: %pattern_type.loc4_35 => constants.%pattern_type.7ce @@ -1773,10 +1761,6 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DD(@impl.266.%E.loc9_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.266(%E.loc9_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CC(constants.%D) { // CHECK:STDOUT: %D.loc11_10.2 => constants.%D // CHECK:STDOUT: } @@ -1794,12 +1778,6 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.b58 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DD(@impl.497.%E.loc12_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @CC(@impl.497.%Z.facet.loc12_32.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.497(%E.loc12_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @DD(constants.%EE) { // CHECK:STDOUT: %E.loc8_10.2 => constants.%EE // CHECK:STDOUT: } @@ -2047,10 +2025,6 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.741 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CC(@impl.562.%Y.facet.loc19_29.2) {} -// CHECK:STDOUT: -// 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: } diff --git a/toolchain/check/testdata/function/generic/min_prelude/call.carbon b/toolchain/check/testdata/function/generic/min_prelude/call.carbon index 9ed2b85b6897..019a47a1f37f 100644 --- a/toolchain/check/testdata/function/generic/min_prelude/call.carbon +++ b/toolchain/check/testdata/function/generic/min_prelude/call.carbon @@ -254,8 +254,6 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(@CallGeneric.%T.loc8_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericPtr(constants.%T) { // CHECK:STDOUT: %T.loc12_19.2 => constants.%T // CHECK:STDOUT: %ptr.loc12_33.2 => constants.%ptr.79f @@ -270,8 +268,6 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %require_complete => constants.%require_complete.6e5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(@CallGenericPtr.%ptr.loc12_33.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%C) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c48 @@ -475,8 +471,6 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(@CallGeneric.%T.loc8_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericPtr(constants.%T) { // CHECK:STDOUT: %T.loc12_19.2 => constants.%T // CHECK:STDOUT: %ptr.loc12_33.2 => constants.%ptr.79f @@ -491,8 +485,6 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %require_complete => constants.%require_complete.6e5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(@CallGenericPtr.%ptr.loc12_33.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%C) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c48 diff --git a/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon b/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon index 550e7bb01dfe..8320a3a29e5b 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon @@ -101,8 +101,6 @@ fn H() { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@G.%T.loc7_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- user.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -196,8 +194,6 @@ fn H() { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@G.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%C) { // CHECK:STDOUT: %T => constants.%C // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index c729b9885f1c..f747f2420336 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -171,8 +171,6 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %F.specific_fn.loc7_10.2 => constants.%F.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc4_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_different_return_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index ac76cf308a2b..73dccf1540e9 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -236,12 +236,6 @@ fn G() { // CHECK:STDOUT: %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.bf1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Wrap(%T.loc11_12.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Wrap(@Make.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Make(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(constants.%i32) { // CHECK:STDOUT: %T.loc11_12.2 => constants.%i32 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/call_basic_depth.carbon b/toolchain/check/testdata/generic/call_basic_depth.carbon index 83e121a0de80..04972f0b2cbc 100644 --- a/toolchain/check/testdata/generic/call_basic_depth.carbon +++ b/toolchain/check/testdata/generic/call_basic_depth.carbon @@ -341,19 +341,11 @@ fn M() { // CHECK:STDOUT: %F.specific_fn.loc21_3.2 => constants.%F.specific_fn.ef1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@H.%T.loc19_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.loc25_6.2 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @H(@G.%T.loc25_6.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@G.%T.loc25_6.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Cfn(@G.%T.loc25_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%i32) { // CHECK:STDOUT: %T.loc16_6.2 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce diff --git a/toolchain/check/testdata/generic/complete_type.carbon b/toolchain/check/testdata/generic/complete_type.carbon index 6b184b412905..46b7d6c4a8c4 100644 --- a/toolchain/check/testdata/generic/complete_type.carbon +++ b/toolchain/check/testdata/generic/complete_type.carbon @@ -178,8 +178,6 @@ fn G() { F(B); } // CHECK:STDOUT: %T.loc6_9.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(%T.loc6_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%B) { // CHECK:STDOUT: %T.loc6_9.2 => constants.%B // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/dependent_param.carbon b/toolchain/check/testdata/generic/dependent_param.carbon index 196b0ab260ec..8df6a7f862ab 100644 --- a/toolchain/check/testdata/generic/dependent_param.carbon +++ b/toolchain/check/testdata/generic/dependent_param.carbon @@ -226,10 +226,6 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(%T, %U.loc5_15.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%i32) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%i32 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index bd58c4d4dbf2..cc61231e8911 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -174,8 +174,6 @@ class C(C:! type) { // CHECK:STDOUT: %T.loc5_11.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc5_11.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { // CHECK:STDOUT: %T.loc5_11.2 => constants.%i32 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/template_dependence.carbon b/toolchain/check/testdata/generic/template_dependence.carbon index 080e9f0d523e..e04c674222cd 100644 --- a/toolchain/check/testdata/generic/template_dependence.carbon +++ b/toolchain/check/testdata/generic/template_dependence.carbon @@ -113,10 +113,8 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %pattern_type.65c: type = pattern_type %tuple.type.30b [template] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.fe1: = require_complete_type %tuple.type.30b [template] +// CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type.30b [template] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%T, %U) [template] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [template] -// CHECK:STDOUT: %require_complete.b54: = require_complete_type %U [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -156,10 +154,8 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [template = %pattern_type (constants.%pattern_type.65c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc4: = require_complete_type %tuple.type [template = %require_complete.loc4 (constants.%require_complete.fe1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [template = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %F.specific_fn.loc5_10.2: = specific_function constants.%F, @F(%T.loc4_15.2, %U.loc4_25.2) [template = %F.specific_fn.loc5_10.2 (constants.%F.specific_fn)] -// CHECK:STDOUT: %require_complete.loc5_16.1: = require_complete_type %T.loc4_15.2 [template = %require_complete.loc5_16.1 (constants.%require_complete.4ae)] -// CHECK:STDOUT: %require_complete.loc5_16.2: = require_complete_type %U.loc4_25.2 [symbolic = %require_complete.loc5_16.2 (constants.%require_complete.b54)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return.param: @F.%tuple.type (%tuple.type.30b) { // CHECK:STDOUT: !entry: @@ -167,20 +163,9 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %T.ref.loc5: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc5: type = name_ref U, %U.loc4_25.1 [symbolic = %U.loc4_25.2 (constants.%U)] // CHECK:STDOUT: %F.specific_fn.loc5_10.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [template = %F.specific_fn.loc5_10.2 (constants.%F.specific_fn)] -// CHECK:STDOUT: %.loc5_16.1: ref @F.%tuple.type (%tuple.type.30b) = temporary_storage -// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.30b) = call %F.specific_fn.loc5_10.1() to %.loc5_16.1 -// CHECK:STDOUT: %.loc5_16.2: ref @F.%tuple.type (%tuple.type.30b) = temporary %.loc5_16.1, %F.call -// CHECK:STDOUT: %tuple.elem0.loc5_16.1: ref @F.%T.loc4_15.2 (%T) = tuple_access %.loc5_16.2, element0 -// CHECK:STDOUT: %.loc5_16.3: @F.%T.loc4_15.2 (%T) = bind_value %tuple.elem0.loc5_16.1 -// CHECK:STDOUT: %tuple.elem0.loc5_16.2: ref @F.%T.loc4_15.2 (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc5_16.4: init @F.%T.loc4_15.2 (%T) = initialize_from %.loc5_16.3 to %tuple.elem0.loc5_16.2 -// CHECK:STDOUT: %tuple.elem1.loc5_16.1: ref @F.%U.loc4_25.2 (%U) = tuple_access %.loc5_16.2, element1 -// CHECK:STDOUT: %.loc5_16.5: @F.%U.loc4_25.2 (%U) = bind_value %tuple.elem1.loc5_16.1 -// CHECK:STDOUT: %tuple.elem1.loc5_16.2: ref @F.%U.loc4_25.2 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc5_16.6: init @F.%U.loc4_25.2 (%U) = initialize_from %.loc5_16.5 to %tuple.elem1.loc5_16.2 -// CHECK:STDOUT: %.loc5_16.7: init @F.%tuple.type (%tuple.type.30b) = tuple_init (%.loc5_16.4, %.loc5_16.6) to %return -// CHECK:STDOUT: %.loc5_17: init @F.%tuple.type (%tuple.type.30b) = converted %F.call, %.loc5_16.7 -// CHECK:STDOUT: return %.loc5_17 to %return +// CHECK:STDOUT: %.loc4_35: ref @F.%tuple.type (%tuple.type.30b) = splice_block %return {} +// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.30b) = call %F.specific_fn.loc5_10.1() to %.loc4_35 +// CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -191,11 +176,7 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.65c // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc4 => constants.%require_complete.fe1 +// CHECK:STDOUT: %require_complete => constants.%require_complete // CHECK:STDOUT: %F.specific_fn.loc5_10.2 => constants.%F.specific_fn -// CHECK:STDOUT: %require_complete.loc5_16.1 => constants.%require_complete.4ae -// CHECK:STDOUT: %require_complete.loc5_16.2 => constants.%require_complete.b54 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(%T.loc4_15.2, %U.loc4_25.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index 987ae2fd2c1d..5f7149042fab 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -152,7 +152,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst21.loc4_24 [concrete = constants.%C.generic] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst22.loc4_24 [concrete = constants.%C.generic] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: complete_type_witness = invalid diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index a3aeaec7a436..5daa2ba27735 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -695,10 +695,6 @@ fn CallF() { // CHECK:STDOUT: %require_complete => constants.%require_complete // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@V.%N) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%N.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%int_-1) { // CHECK:STDOUT: %N.loc4_13.2 => constants.%int_-1 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 1326b3d0a885..92f138784fc8 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -306,8 +306,6 @@ class X(U:! type) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(%T.loc4_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @HasF(constants.%Param) { // CHECK:STDOUT: %T.loc4_16.2 => constants.%Param // CHECK:STDOUT: @@ -539,10 +537,6 @@ class X(U:! type) { // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%U) { // CHECK:STDOUT: %U.loc8_9.2 => constants.%U // CHECK:STDOUT: @@ -575,12 +569,6 @@ class X(U:! type) { // CHECK:STDOUT: %F => constants.%F.b02 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(@impl.%U) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.%U) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%U) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%U) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: %X => constants.%X @@ -590,10 +578,6 @@ class X(U:! type) { // CHECK:STDOUT: %pattern_type.loc10_22 => constants.%pattern_type.7dcd0a.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(@F.2.%U) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.2.%U) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%U, constants.%I.facet) { // CHECK:STDOUT: %T => constants.%U // CHECK:STDOUT: %I.type => constants.%I.type.325e65.2 @@ -603,5 +587,3 @@ class X(U:! type) { // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.7dcd0a.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@X.%U.loc8_9.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index 8da70ba94d38..aa02138ee313 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -186,8 +186,6 @@ class C { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericInterface(%T.loc11_28.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc20_23.2 => constants.%T // CHECK:STDOUT: %GenericInterface.type.loc20_54.2 => constants.%GenericInterface.type.3fe @@ -199,10 +197,6 @@ class C { // CHECK:STDOUT: %F => constants.%F.4b1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericInterface(@impl.%T.loc20_23.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc20_23.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc diff --git a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon index c3779d2931d9..4eddb9fc30a9 100644 --- a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon @@ -97,7 +97,3 @@ interface I { // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%Self) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index 39c20fba4195..e061edb9ab26 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -235,8 +235,6 @@ impl i32 as I { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4fb // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%I.type, @F.1.%Self) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.e8a) { // CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type // CHECK:STDOUT: %X.loc11_19.2 => constants.%I.facet.e8a diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index c485c30d2285..f211a1aba2a3 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -110,8 +110,6 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %F => constants.%F.4c3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc15_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Simple.facet) {} diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index e0b847eb20ff..df6cccc7a008 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -288,8 +288,6 @@ fn G(x: A) { // CHECK:STDOUT: %F => constants.%F.c98 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -507,8 +505,6 @@ fn G(x: A) { // CHECK:STDOUT: %F => constants.%F.c98 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -740,18 +736,12 @@ fn G(x: A) { // CHECK:STDOUT: %F => constants.%F.92a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.%T.loc10_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc10_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %C => constants.%C.f2e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@F.2.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%HasF.facet.766) { // CHECK:STDOUT: %Self => constants.%HasF.facet.766 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%C.f2e @@ -984,10 +974,6 @@ fn G(x: A) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.dfb // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(%T.loc4_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %HasF.type.loc8_36.2 => constants.%HasF.type.901 @@ -999,10 +985,6 @@ fn G(x: A) { // CHECK:STDOUT: %F => constants.%F.008 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(@impl.%T.loc8_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%HasF.facet.566) { @@ -1196,8 +1178,6 @@ fn G(x: A) { // CHECK:STDOUT: %F => constants.%F.9b8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc12_14.2, %U.loc12_24.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T, constants.%U) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -1417,10 +1397,6 @@ fn G(x: A) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.dfb // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(%T.loc4_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %HasF.type.loc8_35.2 => constants.%HasF.type.901 @@ -1432,10 +1408,6 @@ fn G(x: A) { // CHECK:STDOUT: %F => constants.%F.f30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(@impl.%T.loc8_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc 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 index 90904304cb80..d7f060a99e3e 100644 --- a/toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon @@ -480,8 +480,6 @@ fn G() { // 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: %pattern_type => constants.%pattern_type.7dc @@ -516,8 +514,6 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a4f // 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 @@ -824,10 +820,6 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1 // 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: } @@ -841,10 +833,6 @@ fn G() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1 // 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 @@ -856,8 +844,6 @@ fn G() { // 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: %pattern_type => constants.%pattern_type.7dcd0a.2 diff --git a/toolchain/check/testdata/impl/lookup/min_prelude/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/min_prelude/impl_forall.carbon index 9d7e353a2b73..75e8444c0c77 100644 --- a/toolchain/check/testdata/impl/lookup/min_prelude/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/min_prelude/impl_forall.carbon @@ -404,8 +404,6 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %T.loc3_9.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(%T.loc3_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%U) { // CHECK:STDOUT: %U.loc7_13.2 => constants.%U // CHECK:STDOUT: } @@ -419,10 +417,6 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %pattern_type.loc8_22 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.1.%U) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%U.loc7_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%V) { // CHECK:STDOUT: %T.loc3_9.2 => constants.%V // CHECK:STDOUT: @@ -458,12 +452,6 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %F => constants.%F.d6ae34.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(@impl.%V.loc11_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.%V.loc11_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%V.loc11_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%V) { // CHECK:STDOUT: %V => constants.%V // CHECK:STDOUT: %A => constants.%A.13025a.2 @@ -471,8 +459,6 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %pattern_type.loc12_22 => constants.%pattern_type.7dcd0a.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(@F.2.%V) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%V, constants.%I.facet.de3) { // CHECK:STDOUT: %U => constants.%V // CHECK:STDOUT: %I.type => constants.%I.type.325e65.2 @@ -500,8 +486,6 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %pattern_type.loc17_35 => constants.%pattern_type.7dcd0a.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(@TestGeneric.%W.loc17_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%W) { // CHECK:STDOUT: %U.loc7_13.2 => constants.%W // CHECK:STDOUT: @@ -535,10 +519,6 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %pattern_type.loc8_22 => constants.%pattern_type.7dcd0a.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@TestGeneric.%W.loc17_16.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(@TestGeneric.%W.loc17_16.2, @TestGeneric.%I.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%empty_struct_type) { // CHECK:STDOUT: %T.loc3_9.2 => constants.%empty_struct_type // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/min_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/min_prelude/import.carbon index a26617ca036f..3fc37f5ec088 100644 --- a/toolchain/check/testdata/impl/lookup/min_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/min_prelude/import.carbon @@ -385,7 +385,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst42 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] // CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.c63 = import_ref PackageA//default, loc5_21, unloaded @@ -613,7 +613,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst42 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] // CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] @@ -736,7 +736,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageB.D: type = import_ref PackageB//default, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst44 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] // CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] @@ -745,7 +745,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst19 [no loc], loaded [symbolic = constants.%Self.cf3] // CHECK:STDOUT: %PackageA.import_ref.5cd = import_ref PackageA//default, loc11_16, unloaded // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst42 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type] // CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded @@ -904,7 +904,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst42 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded // CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type] // CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded // CHECK:STDOUT: %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] @@ -922,7 +922,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type] // CHECK:STDOUT: %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst44 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.831: type = import_ref PackageB//default, loc18_19, loaded [concrete = constants.%HasF.type] // CHECK:STDOUT: %PackageB.import_ref.569 = import_ref PackageB//default, loc23_16, unloaded @@ -1069,7 +1069,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageB.D: type = import_ref PackageB//default, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst44 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded // CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type] // CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded // CHECK:STDOUT: %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] @@ -1077,12 +1077,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageB.import_ref.70a: %G.type.d9e = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%G.cd6] // CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst21 [no loc], loaded [symbolic = constants.%Self.fcb] // CHECK:STDOUT: %PackageB.import_ref.ea7 = import_ref PackageB//default, loc13_25, unloaded -// CHECK:STDOUT: %PackageB.import_ref.8db: = import_ref PackageB//default, inst53 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageB.import_ref.6a9 = import_ref PackageB//default, inst54 [indirect], unloaded +// CHECK:STDOUT: %PackageB.import_ref.8db: = import_ref PackageB//default, inst54 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %PackageB.import_ref.6a9 = import_ref PackageB//default, inst55 [indirect], unloaded // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.96f = import_ref PackageB//default, inst79 [indirect], unloaded -// CHECK:STDOUT: %PackageB.import_ref.a0b = import_ref PackageB//default, inst80 [indirect], unloaded +// CHECK:STDOUT: %PackageB.import_ref.96f = import_ref PackageB//default, inst80 [indirect], unloaded +// CHECK:STDOUT: %PackageB.import_ref.a0b = import_ref PackageB//default, inst81 [indirect], unloaded // CHECK:STDOUT: %PackageB.F = import_ref PackageB//default, F, unloaded // CHECK:STDOUT: %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D] @@ -1687,8 +1687,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %U.loc6_28.2 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericInterface(%U.loc6_28.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %X => constants.%X @@ -1894,8 +1892,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericInterface(%U) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.0da, constants.%GenericInterface.generic) { // CHECK:STDOUT: %T => constants.%GenericInterface.type.0da // CHECK:STDOUT: %X => constants.%GenericInterface.generic @@ -2608,21 +2604,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %HasExtraInterfaces.C: %C.type = import_ref HasExtraInterfaces//default, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.5ab: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.8f2: = import_ref HasExtraInterfaces//default, loc13_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst58 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst66 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst65 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst73 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.be9: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %HasExtraInterfaces.F = import_ref HasExtraInterfaces//default, F, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.d54: %F.type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%F] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst65 [no loc], loaded [symbolic = constants.%Self.013] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst73 [no loc], loaded [symbolic = constants.%Self.013] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.bca = import_ref HasExtraInterfaces//default, loc16_79, unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst47 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.dfe = import_ref HasExtraInterfaces//default, inst43 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.6b6 = import_ref HasExtraInterfaces//default, inst39 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.576 = import_ref HasExtraInterfaces//default, inst35 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.0dd = import_ref HasExtraInterfaces//default, inst31 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.f83 = import_ref HasExtraInterfaces//default, inst27 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.975 = import_ref HasExtraInterfaces//default, inst23 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst54 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.dfe = import_ref HasExtraInterfaces//default, inst49 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.6b6 = import_ref HasExtraInterfaces//default, inst44 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.576 = import_ref HasExtraInterfaces//default, inst39 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.0dd = import_ref HasExtraInterfaces//default, inst34 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.f83 = import_ref HasExtraInterfaces//default, inst29 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.975 = import_ref HasExtraInterfaces//default, inst24 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.a3c = import_ref HasExtraInterfaces//default, inst19 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.aa8: type = import_ref HasExtraInterfaces//default, loc16_72, loaded [concrete = constants.%C.074] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.301: type = import_ref HasExtraInterfaces//default, loc16_77, loaded [concrete = constants.%I.type] 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 3f0daf4ab2ff..d0e5db0b5b80 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 @@ -345,8 +345,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%T.8b3, constants.%Self.2bc) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(%T.loc3_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%S) { // CHECK:STDOUT: %T.loc3_13.2 => constants.%S // CHECK:STDOUT: @@ -375,10 +373,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.d59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(@impl.119.%S.loc9_24.2) {} -// CHECK:STDOUT: -// 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 // CHECK:STDOUT: @@ -398,8 +392,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.093 // CHECK:STDOUT: } // CHECK:STDOUT: -// 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 // CHECK:STDOUT: %T.as_type.loc13_19.2 => constants.%T.as_type @@ -417,8 +409,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // 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: // CHECK:STDOUT: constants { @@ -800,8 +790,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%T.8b3, constants.%Self.2bc) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(%T.loc3_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%S) { // CHECK:STDOUT: %T.loc3_13.2 => constants.%S // CHECK:STDOUT: @@ -830,10 +818,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.d59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(@impl.119.%S.loc10_24.2) {} -// CHECK:STDOUT: -// 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 // CHECK:STDOUT: @@ -853,8 +837,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.093 // CHECK:STDOUT: } // CHECK:STDOUT: -// 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 // CHECK:STDOUT: %T.as_type.loc14_19.2 => constants.%T.as_type @@ -867,10 +849,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Dest => constants.%Dest // 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 @@ -897,15 +875,11 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // 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: %pattern_type => constants.%pattern_type.7dcd0a.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@F.%impl.elem0.loc22_11.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_impl_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1059,8 +1033,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.e8ce81.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%U.loc7_20.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%T // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.79f131.2 @@ -1082,8 +1054,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %pattern_type.loc9_26 => constants.%pattern_type.afe // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(@F.%T.loc9_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_facet_access_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1245,8 +1215,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.e8c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%U.loc7_20.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T.as_type) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%T.as_type // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.900 @@ -1268,8 +1236,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %pattern_type.loc9_25 => constants.%pattern_type.a95 // CHECK:STDOUT: } // CHECK:STDOUT: -// 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 { @@ -1430,8 +1396,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.e8c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%U.loc7_20.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T.as_type) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%T.as_type // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.900 @@ -1453,8 +1417,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %pattern_type.loc9_25 => constants.%pattern_type.a95 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(@F.%T.as_type.loc9_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- include_files/facet_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1733,10 +1695,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1 // 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: } @@ -1750,10 +1708,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1 // 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 @@ -1765,8 +1719,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // 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: %pattern_type => constants.%pattern_type.7dcd0a.2 diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon index 2affcd1b3c32..4d2ea35ec2f3 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon @@ -174,10 +174,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4be // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T.loc4_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { // CHECK:STDOUT: %T.loc5_9.2 => constants.%T // CHECK:STDOUT: } @@ -316,10 +312,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.209) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.325 @@ -495,10 +487,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.209) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.325 @@ -684,10 +672,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.209) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.325 @@ -896,10 +880,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.209) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.325 diff --git a/toolchain/check/testdata/impl/min_prelude/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/min_prelude/fail_extend_impl_scope.carbon index a158432a93fa..b2c07748e037 100644 --- a/toolchain/check/testdata/impl/min_prelude/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/min_prelude/fail_extend_impl_scope.carbon @@ -304,8 +304,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Zero.2(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.6b5(%Self) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Zero.1(constants.%Z.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- include_files/destroy.carbon diff --git a/toolchain/check/testdata/impl/min_prelude/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/min_prelude/fail_impl_as_scope.carbon index 0cf16421a0f6..ebc76f8f99f0 100644 --- a/toolchain/check/testdata/impl/min_prelude/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/min_prelude/fail_impl_as_scope.carbon @@ -461,8 +461,6 @@ class X { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a40 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.6b5(%Self) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Zero.1(constants.%Z.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Method.1(constants.%Z.facet) { diff --git a/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon b/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon index 60222fa5cad5..c1a61f98eba4 100644 --- a/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon +++ b/toolchain/check/testdata/impl/min_prelude/forward_decls.carbon @@ -558,8 +558,6 @@ interface I { // 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) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -1264,8 +1262,6 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: specific @T(constants.%U, constants.%Self.209) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%U.loc3_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%C) { // CHECK:STDOUT: %U.loc3_13.2 => constants.%C // CHECK:STDOUT: @@ -1570,8 +1566,6 @@ interface I { // 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) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -2039,12 +2033,6 @@ interface I { // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@F.%Self) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_impl_in_interface_definition_with_associated.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -2191,12 +2179,6 @@ interface I { // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@F.%Self) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- include_files/facet_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -2475,10 +2457,6 @@ interface I { // CHECK:STDOUT: %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1 // 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: } @@ -2492,10 +2470,6 @@ interface I { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1 // 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 @@ -2507,8 +2481,6 @@ interface I { // 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: %pattern_type => constants.%pattern_type.7dcd0a.2 diff --git a/toolchain/check/testdata/impl/min_prelude/generic_redeclaration.carbon b/toolchain/check/testdata/impl/min_prelude/generic_redeclaration.carbon index 25139277b16e..7613c0f8b88f 100644 --- a/toolchain/check/testdata/impl/min_prelude/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/min_prelude/generic_redeclaration.carbon @@ -332,32 +332,24 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.a14 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.c3d(%T.loc11_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.793(constants.%T.ccd) { // CHECK:STDOUT: %T.loc12_14.2 => constants.%T.ccd // CHECK:STDOUT: %T.as_type.loc12_21.2 => constants.%T.as_type.3df // CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.608 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.793(%T.loc12_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.c93(constants.%T.09f) { // CHECK:STDOUT: %T.loc13_14.2 => constants.%T.09f // CHECK:STDOUT: %T.as_type.loc13_21.2 => constants.%T.as_type.037 // CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.b9e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.c93(%T.loc13_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.9e6(constants.%T.1d2) { // CHECK:STDOUT: %T.loc14_14.2 => constants.%T.1d2 // CHECK:STDOUT: %T.as_type.loc14_21.2 => constants.%T.as_type.0ed // CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.e9d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.9e6(%T.loc14_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_same_self_and_interface_redefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -461,16 +453,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.a529f4.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.bfd509.1(%T.loc7_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.bfd509.2(constants.%T) { // CHECK:STDOUT: %T.loc15_14.2 => constants.%T // CHECK:STDOUT: %T.as_type.loc15_21.2 => constants.%T.as_type // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.a529f4.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.bfd509.2(%T.loc15_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- same_type_different_spelling.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -721,8 +709,6 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %A => constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.2caff2.1(%T.loc4_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2caff2.2(constants.%T) { @@ -738,8 +724,6 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %D => constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.2caff2.2(%T.loc15_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @B(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { @@ -748,10 +732,6 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.2caff2.2(@D.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@D.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- include_files/destroy.carbon // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/min_prelude/interface_args.carbon b/toolchain/check/testdata/impl/min_prelude/interface_args.carbon index a48028902eca..31c8bc994786 100644 --- a/toolchain/check/testdata/impl/min_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/min_prelude/interface_args.carbon @@ -200,10 +200,6 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- action.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -401,10 +397,6 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8db // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Action(@Op.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Action(%T.loc4_18.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Action(constants.%B) { // CHECK:STDOUT: %T.loc4_18.2 => constants.%B // CHECK:STDOUT: @@ -595,10 +587,6 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %assoc0 => constants.%assoc0.8a8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Action(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Action(@Op.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self.e98) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Action.type => constants.%Action.type.cca @@ -780,10 +768,6 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %assoc0 => constants.%assoc0.338 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Action(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Action(@Op.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op(constants.%T, constants.%Self.e98) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Action.type => constants.%Action.type.cca @@ -1019,10 +1003,6 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %pattern_type.loc8_27 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory(@Method.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory(%T.loc4_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(constants.%B) { // CHECK:STDOUT: %T.loc4_19.2 => constants.%B // CHECK:STDOUT: @@ -1289,15 +1269,11 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %assoc1 => constants.%assoc1.a48 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Make.1(constants.%T, constants.%Self.9ba) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory(@Method.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Method.1(constants.%T, constants.%Self.9ba) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Factory.type => constants.%Factory.type.c96 @@ -1542,15 +1518,11 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %assoc1 => constants.%assoc1.535 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Make(constants.%T, constants.%Self.9ba) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory(@Method.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Method(constants.%T, constants.%Self.9ba) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Factory.type => constants.%Factory.type.c96 diff --git a/toolchain/check/testdata/impl/no_prelude/compound.carbon b/toolchain/check/testdata/impl/no_prelude/compound.carbon index c2b858c08c5f..a1366e507c30 100644 --- a/toolchain/check/testdata/impl/no_prelude/compound.carbon +++ b/toolchain/check/testdata/impl/no_prelude/compound.carbon @@ -210,10 +210,6 @@ fn InstanceCallFail() { // CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- non-instance_success.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -457,10 +453,6 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Dest => constants.%Dest // 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 @@ -645,10 +637,6 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Dest => constants.%Dest // 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 diff --git a/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon b/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon index 0a0201e31c52..bfb0b2ee78e4 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon @@ -386,18 +386,12 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %require_complete => constants.%require_complete.fc7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MyInt(@impl.%N.loc15_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%N.loc15_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%N) { // CHECK:STDOUT: %N => constants.%N // CHECK:STDOUT: %MyInt => constants.%MyInt // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a71 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MyInt(@Op.2.%N) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Add.facet.0e5) { // CHECK:STDOUT: %Self => constants.%Add.facet.0e5 // CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%MyInt @@ -410,16 +404,12 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a71 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MyInt(@Double.%N.loc19_11.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Add.facet.5a7) { // CHECK:STDOUT: %Self => constants.%Add.facet.5a7 // CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%MyInt // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a71 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(@Double.%Add.facet.loc20_11) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- use_generic_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -476,7 +466,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Main.Double: %Double.type = import_ref Main//generic_impl, Double, loaded [concrete = constants.%Double] // CHECK:STDOUT: %Main.import_ref.f1e294.1: Core.IntLiteral = import_ref Main//generic_impl, loc11_13, loaded [symbolic = @MyInt.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.9e9: = import_ref Main//generic_impl, loc13_1, loaded [symbolic = @MyInt.%complete_type (constants.%complete_type.a87)] -// CHECK:STDOUT: %Main.import_ref.697 = import_ref Main//generic_impl, inst91 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.697 = import_ref Main//generic_impl, inst92 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.07c = import_ref Main//generic_impl, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f99: %Add.assoc_type = import_ref Main//generic_impl, loc5_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Op = import_ref Main//generic_impl, Op, unloaded @@ -678,12 +668,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %require_complete => constants.%require_complete.fc7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MyInt(@impl.%N) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%N) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @MyInt(@Op.2.%N) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%N) { // CHECK:STDOUT: %N => constants.%N // CHECK:STDOUT: %MyInt => constants.%MyInt.09f @@ -709,8 +693,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MyInt(@Double.%N) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Double(constants.%N) { // CHECK:STDOUT: %N => constants.%N // CHECK:STDOUT: %MyInt => constants.%MyInt.09f @@ -723,8 +705,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a71 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(@Double.%Add.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Double(constants.%int_64) { // CHECK:STDOUT: %N => constants.%int_64 // CHECK:STDOUT: %MyInt => constants.%MyInt.f30 @@ -1026,8 +1006,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Make.specific_fn.loc9_52.2 => constants.%Make.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Make(%N.loc9_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @MakeFromClass(constants.%N.335) { // CHECK:STDOUT: %N.loc18_18.2 => constants.%N.335 // CHECK:STDOUT: %ToLiteral.bound.loc18_40.2 => constants.%ToLiteral.bound @@ -1040,8 +1018,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %MakeFromClass.specific_fn.loc18_63.2 => constants.%MakeFromClass.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MakeFromClass(%N.loc18_18.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- use_convert_symbolic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1221,8 +1197,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Make.specific_fn => constants.%Make.specific_fn.8ec // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Make(%N) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Make(constants.%int_64.f82) { // CHECK:STDOUT: %N => constants.%int_64.f82 // CHECK:STDOUT: %int.convert_checked => constants.%int_64.fab @@ -1246,8 +1220,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %MakeFromClass.specific_fn => constants.%MakeFromClass.specific_fn.004 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MakeFromClass(%N) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @MakeFromClass(constants.%int_64.06b) { // CHECK:STDOUT: %N => constants.%int_64.06b // CHECK:STDOUT: %ToLiteral.bound => constants.%ToLiteral.bound.735 diff --git a/toolchain/check/testdata/impl/no_prelude/import_compound.carbon b/toolchain/check/testdata/impl/no_prelude/import_compound.carbon index 19d78b0155b9..7409d837fbe3 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_compound.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_compound.carbon @@ -198,10 +198,6 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- lib.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -383,7 +379,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Main.import_ref.a26: = import_ref Main//lib, loc7_30, loaded [concrete = constants.%NonInstance.impl_witness] // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -509,7 +505,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -613,10 +609,6 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Dest => constants.%Dest // 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 @@ -699,7 +691,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -805,10 +797,6 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Dest => constants.%Dest // 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 @@ -863,11 +851,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.NonInstance = import_ref Main//lib, NonInstance, unloaded // CHECK:STDOUT: %Main.Instance: type = import_ref Main//lib, Instance, loaded [concrete = constants.%Instance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.b4d: %G.type.1e1 = import_ref Main//lib, loc12_21, loaded [concrete = constants.%G.449] -// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst42 [no loc], loaded [symbolic = constants.%Self.cf8] +// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst43 [no loc], loaded [symbolic = constants.%Self.cf8] // CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded @@ -1008,11 +996,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.b4d: %G.type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%G] -// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst42 [no loc], loaded [symbolic = constants.%Self.cf8] +// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst43 [no loc], loaded [symbolic = constants.%Self.cf8] // CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded diff --git a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon index 2b990b187de3..dbe3fdfc8ee0 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon @@ -136,7 +136,7 @@ fn G(c: C) { // CHECK:STDOUT: %Main.I = import_ref Main//extend_impl_library, I, unloaded // CHECK:STDOUT: %Main.C: type = import_ref Main//extend_impl_library, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//extend_impl_library, loc12_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//extend_impl_library, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//extend_impl_library, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.3019d1.1: type = import_ref Main//extend_impl_library, loc9_18, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//extend_impl_library, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//extend_impl_library, loc5_9, loaded [concrete = constants.%assoc0] diff --git a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon index 88acaed136c6..cd89b0dd1907 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon @@ -225,18 +225,12 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %Self.2 => constants.%Self.209 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T.loc5_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.084(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.325 // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.1a9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.084.%T.loc8_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.084(%T.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%ptr) { // CHECK:STDOUT: %T.loc5_13.2 => constants.%ptr // CHECK:STDOUT: @@ -253,10 +247,6 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6ad // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.cd2.%ptr.loc12_32.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.cd2(%T.loc12_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_generic.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -460,18 +450,12 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %Self => constants.%Self.209 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.08450a.1(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.325 // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.1a9ed3.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.08450a.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.08450a.1(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%ptr) { // CHECK:STDOUT: %T => constants.%ptr // CHECK:STDOUT: @@ -488,20 +472,12 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6ad3bf.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.cd2fdc.1.%ptr) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.cd2fdc.1(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.08450a.2(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.325 // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.1a9ed3.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.08450a.2.%T.loc8_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.08450a.2(%T.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.08450a.3(constants.%T) { // CHECK:STDOUT: %T.loc14_14.2 => constants.%T // CHECK:STDOUT: %I.type.loc14_32.2 => constants.%I.type.325 @@ -509,10 +485,6 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.1a9ed3.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.08450a.3.%T.loc14_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.08450a.3(%T.loc14_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.cd2fdc.2(constants.%T) { // CHECK:STDOUT: %T.loc20_14.2 => constants.%T // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr @@ -520,10 +492,6 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6ad3bf.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.cd2fdc.2.%ptr.loc20_32.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.cd2fdc.2(%T.loc20_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.cd2fdc.3(constants.%T) { // CHECK:STDOUT: %T.loc26_14.2 => constants.%T // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr @@ -532,10 +500,6 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.6ad3bf.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@impl.cd2fdc.3.%ptr.loc26_32.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.cd2fdc.3(%T.loc26_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_generic_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -636,18 +600,12 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.loc5_13.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(%T.loc5_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.199(constants.%T) { // CHECK:STDOUT: %T.loc11_14.2 => constants.%T // CHECK:STDOUT: %J.type.loc11_32.2 => constants.%J.type.b72 // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.809 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(@impl.199.%T.loc11_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.199(%T.loc11_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @J(constants.%ptr) { // CHECK:STDOUT: %T.loc5_13.2 => constants.%ptr // CHECK:STDOUT: } @@ -659,10 +617,6 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.5a8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(@impl.dfd.%ptr.loc17_32.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.dfd(%T.loc17_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_generic_decl.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -852,18 +806,12 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %Self => constants.%Self.252 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.199bba.1(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %J.type => constants.%J.type.b72 // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.80964e.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(@impl.199bba.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.199bba.1(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @J(constants.%ptr) { // CHECK:STDOUT: %T => constants.%ptr // CHECK:STDOUT: @@ -879,20 +827,12 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.5a859e.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(@impl.dfd2f7.1.%ptr) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.dfd2f7.1(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.199bba.2(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %J.type.loc8_32.2 => constants.%J.type.b72 // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.80964e.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(@impl.199bba.2.%T.loc8_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.199bba.2(%T.loc8_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.199bba.3(constants.%T) { // CHECK:STDOUT: %T.loc14_14.2 => constants.%T // CHECK:STDOUT: %J.type.loc14_32.2 => constants.%J.type.b72 @@ -900,10 +840,6 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.80964e.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(@impl.199bba.3.%T.loc14_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.199bba.3(%T.loc14_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.dfd2f7.2(constants.%T) { // CHECK:STDOUT: %T.loc20_14.2 => constants.%T // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr @@ -911,10 +847,6 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.5a859e.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(@impl.dfd2f7.2.%ptr.loc20_32.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.dfd2f7.2(%T.loc20_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl.dfd2f7.3(constants.%T) { // CHECK:STDOUT: %T.loc26_14.2 => constants.%T // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr @@ -923,7 +855,3 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.5a859e.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(@impl.dfd2f7.3.%ptr.loc26_32.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.dfd2f7.3(%T.loc26_14.2) {} -// 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 842f1dca67dd..2b2bea734cd0 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 @@ -734,7 +734,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded // CHECK:STDOUT: %Main.I3: type = import_ref Main//interface, I3, loaded [concrete = constants.%I3.type] // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.148 = import_ref Main//interface, inst25 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.148 = import_ref Main//interface, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f5f: %I3.assoc_type = import_ref Main//interface, loc6_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.import_ref.680: %I3.assoc_type = import_ref Main//interface, loc7_9, loaded [concrete = constants.%assoc1] // CHECK:STDOUT: %Main.import_ref.181: %I3.assoc_type = import_ref Main//interface, loc8_9, loaded [concrete = constants.%assoc2] @@ -743,13 +743,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.T3 = import_ref Main//interface, T3, unloaded // CHECK:STDOUT: %Main.import_ref.5fb: type = import_ref Main//interface, loc6_9, loaded [concrete = %T1] // CHECK:STDOUT: %T1: type = assoc_const_decl @T1 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.1: %I3.type = import_ref Main//interface, inst25 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.1: %I3.type = import_ref Main//interface, inst26 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.e26: type = import_ref Main//interface, loc7_9, loaded [concrete = %T2] // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.2: %I3.type = import_ref Main//interface, inst25 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.2: %I3.type = import_ref Main//interface, inst26 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.e32: type = import_ref Main//interface, loc8_9, loaded [concrete = %T3] // CHECK:STDOUT: %T3: type = assoc_const_decl @T3 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.3: %I3.type = import_ref Main//interface, inst25 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.3: %I3.type = import_ref Main//interface, inst26 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1472,12 +1472,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType: type = import_ref Main//interface, NonType, loaded [concrete = constants.%NonType.type] -// CHECK:STDOUT: %Main.import_ref.8b7 = import_ref Main//interface, inst39 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.8b7 = import_ref Main//interface, inst41 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.9fa: %NonType.assoc_type = import_ref Main//interface, loc12_8, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Y: %struct_type.a.225 = import_ref Main//interface, Y, loaded [concrete = %Y] // CHECK:STDOUT: %Main.import_ref.f3d: %struct_type.a.225 = import_ref Main//interface, loc12_8, loaded [concrete = %Y] // CHECK:STDOUT: %Y: %struct_type.a.225 = assoc_const_decl @Y [concrete] {} -// CHECK:STDOUT: %Main.import_ref.86c: %NonType.type = import_ref Main//interface, inst39 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.86c: %NonType.type = import_ref Main//interface, inst41 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { 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 f5073b89a989..7175209817e0 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon @@ -168,10 +168,6 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %F => constants.%F.071 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.%T.loc10_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc10_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%I.facet) {} @@ -369,10 +365,6 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %F => constants.%F.071 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%empty_struct_type) { diff --git a/toolchain/check/testdata/impl/use_assoc_const.carbon b/toolchain/check/testdata/impl/use_assoc_const.carbon index 55f67376a2b8..4812e98b9d62 100644 --- a/toolchain/check/testdata/impl/use_assoc_const.carbon +++ b/toolchain/check/testdata/impl/use_assoc_const.carbon @@ -1542,8 +1542,6 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b984e7.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(@GenericCallF.%J.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericCallF(constants.%J.facet.ee5) { // CHECK:STDOUT: %T.loc24_17.2 => constants.%J.facet.ee5 // CHECK:STDOUT: %T.as_type.loc24_27.2 => constants.%E @@ -1802,8 +1800,6 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.aea692.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@GenericAddResult.%J.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- interface_qualified.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -2010,8 +2006,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.b984e7.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(@GenericCallInterfaceQualified.%J.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_use_where.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -2233,8 +2227,6 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c1e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@GenericCallFI32.%J.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_use_associated_constant_in_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -3669,10 +3661,6 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.8bc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@impl.%T.loc9_14.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T.loc9_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%D) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%D // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.131 diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index f153bc62fb37..0793001aead7 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -232,7 +232,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [concrete = constants.%Interface.type] {} {} -// CHECK:STDOUT: %F.decl: @C.%F.type (%F.type) = fn_decl @F [symbolic = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { // CHECK:STDOUT: %self.patt: @F.%pattern_type.loc14_10 (%pattern_type.68b) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @F.%pattern_type.loc14_10 (%pattern_type.68b) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete] @@ -340,7 +340,3 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %pattern_type.loc14_32 => constants.%pattern_type.a32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(@F.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%Self) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index d08cfdefbc4c..8ee421063c20 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -242,8 +242,6 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface(%T.loc4_21.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @AccessGeneric(constants.%T, constants.%I.a5f) { // CHECK:STDOUT: %T.loc8_18.2 => constants.%T // CHECK:STDOUT: %Interface.type.loc8_43.2 => constants.%Interface.type.d32 @@ -252,8 +250,6 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %pattern_type.loc8_46 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface(@AccessGeneric.%T.loc8_18.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%T, constants.%Interface.facet.e18) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae @@ -446,8 +442,6 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface(%T.loc4_21.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @AccessMissingGeneric(constants.%T, constants.%I.a5f) { // CHECK:STDOUT: %T.loc8_25.2 => constants.%T // CHECK:STDOUT: %Interface.type.loc8_50.2 => constants.%Interface.type.d32 @@ -456,8 +450,6 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %pattern_type.loc8_53 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface(@AccessMissingGeneric.%T.loc8_25.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Interface(constants.%i32) { // CHECK:STDOUT: %T.loc4_21.2 => constants.%i32 // 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 a9d32ba8f9f6..75c7659cca31 100644 --- a/toolchain/check/testdata/interface/min_prelude/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/min_prelude/compound_member_access.carbon @@ -464,16 +464,12 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Q1(constants.%K1.facet.9e06af.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Q1(@Simple2.%K1.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Compound2(constants.%V) { // CHECK:STDOUT: %V.loc13_14.2 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Q1(constants.%K1.facet.9e06af.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Q1(@Compound2.%K1.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_caller_instance_interface_not.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -727,8 +723,6 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Q2(constants.%K2.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Q2(@Simple3.%K2.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Compound3(constants.%V) { // CHECK:STDOUT: %V.loc14_14.2 => constants.%V // CHECK:STDOUT: %V.as_type.loc14_25.2 => constants.%V.as_type @@ -739,10 +733,6 @@ fn Works() { // CHECK:STDOUT: %Dest => constants.%Dest // 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 @@ -769,8 +759,6 @@ fn Works() { // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Op(constants.%T.8b3) { // CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.2 @@ -1075,10 +1063,6 @@ fn Works() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.53384b.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @R1(@Simple4.%L1.facet) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @S1(@Simple4.%L1.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Compound4(constants.%V) { // CHECK:STDOUT: %V.loc16_14.2 => constants.%V // CHECK:STDOUT: %V.as_type.loc16_25.2 => constants.%V.as_type @@ -1098,10 +1082,6 @@ fn Works() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.53384b.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @R1(@Compound4.%L1.facet) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @S1(@Compound4.%L1.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_interface_instance_caller_not.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1307,10 +1287,6 @@ fn Works() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.696b36.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @R2(@Simple5.%L2.facet) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @S2(@Simple5.%L2.facet) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Compound5(constants.%V) { // CHECK:STDOUT: %V.loc30_14.2 => constants.%V // CHECK:STDOUT: } @@ -1621,8 +1597,6 @@ fn Works() { // 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) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 @@ -1649,10 +1623,6 @@ fn Works() { // CHECK:STDOUT: %Dest => constants.%Dest // 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 @@ -1906,8 +1876,6 @@ fn Works() { // 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) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc @@ -2208,10 +2176,6 @@ fn Works() { // CHECK:STDOUT: %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1 // 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: } @@ -2225,10 +2189,6 @@ fn Works() { // CHECK:STDOUT: %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1 // 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 @@ -2240,8 +2200,6 @@ fn Works() { // 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: %pattern_type => constants.%pattern_type.7dcd0a.2 diff --git a/toolchain/check/testdata/interface/min_prelude/fail_member_lookup.carbon b/toolchain/check/testdata/interface/min_prelude/fail_member_lookup.carbon index 56951533be8d..6f0930c5b843 100644 --- a/toolchain/check/testdata/interface/min_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/min_prelude/fail_member_lookup.carbon @@ -148,10 +148,6 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_member_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -328,10 +324,6 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %Dest => constants.%Dest // 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 diff --git a/toolchain/check/testdata/interface/min_prelude/generic_method.carbon b/toolchain/check/testdata/interface/min_prelude/generic_method.carbon index 2333bedd4f5a..71948588a77f 100644 --- a/toolchain/check/testdata/interface/min_prelude/generic_method.carbon +++ b/toolchain/check/testdata/interface/min_prelude/generic_method.carbon @@ -437,10 +437,6 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.44c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @A(%T.loc5_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%X) { // CHECK:STDOUT: %T.loc5_13.2 => constants.%X // CHECK:STDOUT: @@ -500,8 +496,6 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.f25 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%X, @CallGeneric.%A.facet, constants.%Z) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.552) { // CHECK:STDOUT: %T.loc25_16.2 => constants.%A.facet.552 // CHECK:STDOUT: @@ -579,10 +573,6 @@ fn CallIndirect() { // CHECK:STDOUT: %require_complete.d4d: = require_complete_type %tuple.type.8ae [symbolic] // CHECK:STDOUT: %require_complete.ed4: = require_complete_type %U.753 [symbolic] // CHECK:STDOUT: %F.specific_fn.7d9: = specific_function %F.d79, @F.2(%V1, %V2, %W, %U.753) [symbolic] -// CHECK:STDOUT: %require_complete.f7f: = require_complete_type %W [symbolic] -// CHECK:STDOUT: %require_complete.fe1: = require_complete_type %tuple.type.30b [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %V1 [symbolic] -// CHECK:STDOUT: %require_complete.b54: = require_complete_type %V2 [symbolic] // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete] // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.a46: type = tuple_type (%Y1, %Y2) [concrete] @@ -621,7 +611,6 @@ fn CallIndirect() { // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] // CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%A.facet.414) [concrete] // CHECK:STDOUT: %complete_type.aa8: = complete_type_witness %tuple.type.415 [concrete] -// CHECK:STDOUT: %complete_type.4d1: = complete_type_witness %tuple.type.a46 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -841,44 +830,17 @@ fn CallIndirect() { // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%V1, %V2, %W) [symbolic = %F.type (constants.%F.type.b3e)] // CHECK:STDOUT: %F: @F.2.%F.type (%F.type.b3e) = struct_value () [symbolic = %F (constants.%F.d79)] // CHECK:STDOUT: %F.specific_fn.loc18_12.2: = specific_function %F, @F.2(%V1, %V2, %W, %U.loc17_8.1) [symbolic = %F.specific_fn.loc18_12.2 (constants.%F.specific_fn.7d9)] -// CHECK:STDOUT: %require_complete.loc18_18.1: = require_complete_type %W [symbolic = %require_complete.loc18_18.1 (constants.%require_complete.f7f)] -// CHECK:STDOUT: %require_complete.loc18_18.2: = require_complete_type %tuple.type.loc17_42.1 [symbolic = %require_complete.loc18_18.2 (constants.%require_complete.fe1)] -// CHECK:STDOUT: %require_complete.loc18_18.3: = require_complete_type %V1 [symbolic = %require_complete.loc18_18.3 (constants.%require_complete.4ae)] -// CHECK:STDOUT: %require_complete.loc18_18.4: = require_complete_type %V2 [symbolic = %require_complete.loc18_18.4 (constants.%require_complete.b54)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%u.param: @F.2.%U.loc17_8.1 (%U.753)) -> %return.param: @F.2.%tuple.type.loc17_42.2 (%tuple.type.8ae) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_12: @F.2.%F.type (%F.type.b3e) = specific_constant @impl.%F.decl, @impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %F (constants.%F.d79)] -// CHECK:STDOUT: %F.ref: @F.2.%F.type (%F.type.b3e) = name_ref F, %.loc18_12 [symbolic = %F (constants.%F.d79)] +// CHECK:STDOUT: %.loc18: @F.2.%F.type (%F.type.b3e) = specific_constant @impl.%F.decl, @impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %F (constants.%F.d79)] +// CHECK:STDOUT: %F.ref: @F.2.%F.type (%F.type.b3e) = name_ref F, %.loc18 [symbolic = %F (constants.%F.d79)] // CHECK:STDOUT: %U.ref.loc18: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.753)] // CHECK:STDOUT: %u.ref: @F.2.%U.loc17_8.1 (%U.753) = name_ref u, %u // CHECK:STDOUT: %F.specific_fn.loc18_12.1: = specific_function %F.ref, @F.2(constants.%V1, constants.%V2, constants.%W, constants.%U.753) [symbolic = %F.specific_fn.loc18_12.2 (constants.%F.specific_fn.7d9)] -// CHECK:STDOUT: %.loc18_18.1: ref @F.2.%tuple.type.loc17_42.2 (%tuple.type.8ae) = temporary_storage -// CHECK:STDOUT: %F.call: init @F.2.%tuple.type.loc17_42.2 (%tuple.type.8ae) = call %F.specific_fn.loc18_12.1(%u.ref) to %.loc18_18.1 -// CHECK:STDOUT: %.loc18_18.2: ref @F.2.%tuple.type.loc17_42.2 (%tuple.type.8ae) = temporary %.loc18_18.1, %F.call -// CHECK:STDOUT: %tuple.elem0.loc18_18.1: ref @F.2.%W (%W) = tuple_access %.loc18_18.2, element0 -// CHECK:STDOUT: %.loc18_18.3: @F.2.%W (%W) = bind_value %tuple.elem0.loc18_18.1 -// CHECK:STDOUT: %tuple.elem0.loc18_18.2: ref @F.2.%W (%W) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc18_18.4: init @F.2.%W (%W) = initialize_from %.loc18_18.3 to %tuple.elem0.loc18_18.2 -// CHECK:STDOUT: %tuple.elem1.loc18_18.1: ref @F.2.%tuple.type.loc17_42.1 (%tuple.type.30b) = tuple_access %.loc18_18.2, element1 -// CHECK:STDOUT: %tuple.elem0.loc18_18.3: ref @F.2.%V1 (%V1) = tuple_access %tuple.elem1.loc18_18.1, element0 -// CHECK:STDOUT: %.loc18_18.5: @F.2.%V1 (%V1) = bind_value %tuple.elem0.loc18_18.3 -// CHECK:STDOUT: %tuple.elem1.loc18_18.2: ref @F.2.%tuple.type.loc17_42.1 (%tuple.type.30b) = tuple_access %return, element1 -// CHECK:STDOUT: %tuple.elem0.loc18_18.4: ref @F.2.%V1 (%V1) = tuple_access %tuple.elem1.loc18_18.2, element0 -// CHECK:STDOUT: %.loc18_18.6: init @F.2.%V1 (%V1) = initialize_from %.loc18_18.5 to %tuple.elem0.loc18_18.4 -// CHECK:STDOUT: %tuple.elem1.loc18_18.3: ref @F.2.%V2 (%V2) = tuple_access %tuple.elem1.loc18_18.1, element1 -// CHECK:STDOUT: %.loc18_18.7: @F.2.%V2 (%V2) = bind_value %tuple.elem1.loc18_18.3 -// CHECK:STDOUT: %tuple.elem1.loc18_18.4: ref @F.2.%V2 (%V2) = tuple_access %tuple.elem1.loc18_18.2, element1 -// CHECK:STDOUT: %.loc18_18.8: init @F.2.%V2 (%V2) = initialize_from %.loc18_18.7 to %tuple.elem1.loc18_18.4 -// CHECK:STDOUT: %.loc18_18.9: init @F.2.%tuple.type.loc17_42.1 (%tuple.type.30b) = tuple_init (%.loc18_18.6, %.loc18_18.8) to %tuple.elem1.loc18_18.2 -// CHECK:STDOUT: %.loc18_18.10: init @F.2.%tuple.type.loc17_42.1 (%tuple.type.30b) = converted %tuple.elem1.loc18_18.1, %.loc18_18.9 -// CHECK:STDOUT: %tuple.elem2.loc18_18.1: ref @F.2.%U.loc17_8.1 (%U.753) = tuple_access %.loc18_18.2, element2 -// CHECK:STDOUT: %.loc18_18.11: @F.2.%U.loc17_8.1 (%U.753) = bind_value %tuple.elem2.loc18_18.1 -// CHECK:STDOUT: %tuple.elem2.loc18_18.2: ref @F.2.%U.loc17_8.1 (%U.753) = tuple_access %return, element2 -// CHECK:STDOUT: %.loc18_18.12: init @F.2.%U.loc17_8.1 (%U.753) = initialize_from %.loc18_18.11 to %tuple.elem2.loc18_18.2 -// CHECK:STDOUT: %.loc18_18.13: init @F.2.%tuple.type.loc17_42.2 (%tuple.type.8ae) = tuple_init (%.loc18_18.4, %.loc18_18.10, %.loc18_18.12) to %return -// CHECK:STDOUT: %.loc18_19: init @F.2.%tuple.type.loc17_42.2 (%tuple.type.8ae) = converted %F.call, %.loc18_18.13 -// CHECK:STDOUT: return %.loc18_19 to %return +// CHECK:STDOUT: %.loc17_24: ref @F.2.%tuple.type.loc17_42.2 (%tuple.type.8ae) = splice_block %return {} +// CHECK:STDOUT: %F.call: init @F.2.%tuple.type.loc17_42.2 (%tuple.type.8ae) = call %F.specific_fn.loc18_12.1(%u.ref) to %.loc17_24 +// CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -978,10 +940,6 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.44c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @A(%T.loc5_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%W) { // CHECK:STDOUT: %T.loc5_13.2 => constants.%W // CHECK:STDOUT: @@ -1008,10 +966,6 @@ fn CallIndirect() { // CHECK:STDOUT: %F => constants.%F.d79 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(@impl.%W.loc14_36.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%V1.loc14_14.2, %V2.loc14_25.2, %W.loc14_36.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%V1, constants.%V2, constants.%W, constants.%U.753) { // CHECK:STDOUT: %U.loc17_8.1 => constants.%U.753 // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.549 @@ -1028,10 +982,6 @@ fn CallIndirect() { // CHECK:STDOUT: %F.type => constants.%F.type.b3e // CHECK:STDOUT: %F => constants.%F.d79 // CHECK:STDOUT: %F.specific_fn.loc18_12.2 => constants.%F.specific_fn.7d9 -// CHECK:STDOUT: %require_complete.loc18_18.1 => constants.%require_complete.f7f -// CHECK:STDOUT: %require_complete.loc18_18.2 => constants.%require_complete.fe1 -// CHECK:STDOUT: %require_complete.loc18_18.3 => constants.%require_complete.4ae -// CHECK:STDOUT: %require_complete.loc18_18.4 => constants.%require_complete.b54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%W, constants.%A.facet.461, constants.%U.753) { @@ -1046,10 +996,6 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.d4a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(@F.2.%V1, @F.2.%V2, @F.2.%W) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(%V1, %V2, %W, %U.loc17_8.1) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%X) { // CHECK:STDOUT: %T.loc5_13.2 => constants.%X // CHECK:STDOUT: @@ -1092,10 +1038,6 @@ fn CallIndirect() { // CHECK:STDOUT: %F.type => constants.%F.type.bf7 // CHECK:STDOUT: %F => constants.%F.93b // CHECK:STDOUT: %F.specific_fn.loc18_12.2 => constants.%F.specific_fn.79b -// CHECK:STDOUT: %require_complete.loc18_18.1 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc18_18.2 => constants.%complete_type.4d1 -// CHECK:STDOUT: %require_complete.loc18_18.3 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc18_18.4 => constants.%complete_type.357 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%T.9c2) { @@ -1114,8 +1056,6 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.f25 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%X, @CallGeneric.%A.facet, constants.%Z) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.414) { // CHECK:STDOUT: %T.loc27_16.2 => constants.%A.facet.414 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon index 9cb8e7143262..8dbf802bd1cc 100644 --- a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon @@ -163,14 +163,10 @@ fn H() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.20f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T.loc11_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.loc15_6.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@G.%T.loc15_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%empty_struct_type) { // CHECK:STDOUT: %T.loc15_6.2 => constants.%empty_struct_type // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon index f2bf13e996ee..cea903b038cc 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon @@ -128,7 +128,5 @@ interface Outer { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%Self.277, constants.%Self.b60) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(%Self.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.3(constants.%Self.277, constants.%Self.b60) {} // 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 86fe61dec164..b349cfeb9b05 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 @@ -176,10 +176,6 @@ interface C { // CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_alias_to_different_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -416,8 +412,6 @@ interface C { // CHECK:STDOUT: %I2.impl_witness => constants.%I2.impl_witness.2ab13d.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(%V.loc11_14.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%Self.541) { // CHECK:STDOUT: %V.loc11_14.2 => constants.%Self.541 // CHECK:STDOUT: %V.as_type.loc11_22.2 => constants.%Self.as_type @@ -678,5 +672,3 @@ interface C { // CHECK:STDOUT: %pattern_type => constants.%pattern_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@G.%C.facet) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon index 30aecdac2892..13960162388c 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -155,8 +155,6 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.loc19_22.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NotGeneric.2(%T.loc19_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.1(constants.%T.8b3) { // CHECK:STDOUT: %T.loc21_19.2 => constants.%T.8b3 // CHECK:STDOUT: } @@ -169,5 +167,3 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.loc39_27.2 => constants.%T.7a6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DifferentParams.2(%T.loc39_27.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon index 23b1fbe2406d..824d2ded319c 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -165,10 +165,6 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4be // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I(%T.loc11_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T, constants.%Self) { // CHECK:STDOUT: %T.loc23_24 => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.325 @@ -177,5 +173,3 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4be // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(@F.2.%T.loc23_24) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index 4c64f05212a3..bd5204980d2b 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -317,16 +317,12 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.loc4_18.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Simple(%T.loc4_18.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @WithAssocFn(constants.%T.8b3) { // CHECK:STDOUT: %T.loc8_23.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T.8b3, constants.%Self.088) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithAssocFn(%T.loc8_23.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Simple(constants.%C) { // CHECK:STDOUT: %T.loc4_18.2 => constants.%C // CHECK:STDOUT: @@ -365,8 +361,6 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.loc25_9.2 => constants.%T.692 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Receive(@Pass.%T.loc25_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatched_args.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -486,8 +480,6 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.loc4_19.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(%T.loc4_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%A) { // CHECK:STDOUT: %T.loc4_19.2 => constants.%A // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon index 880c45548d51..5aff2863dc74 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon @@ -86,8 +86,6 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith(%T.loc4_19.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -192,8 +190,6 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.deb) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%C) { diff --git a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon index d35578e12b2c..a2af0cf4c80c 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon @@ -306,26 +306,16 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %T.loc6_28.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericAndParams.1(%T.loc6_28.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { // CHECK:STDOUT: %T.loc8_9.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericNoParams(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericNoParams(%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.2(constants.%T, constants.%U) { // CHECK:STDOUT: %U.loc10_30.2 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericAndParams.2(%T, %U.loc10_30.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericNoParams(@C.%T.loc8_9.2) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc8_9.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.1(constants.%X) { // CHECK:STDOUT: %T.loc6_28.2 => constants.%X // CHECK:STDOUT: @@ -473,5 +463,3 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %T.loc8_15.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Bar(%T.loc8_15.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/import.carbon b/toolchain/check/testdata/interface/no_prelude/import.carbon index a9b1d19f2d16..6d794cee5f4f 100644 --- a/toolchain/check/testdata/interface/no_prelude/import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import.carbon @@ -187,12 +187,12 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Main.ForwardDeclared: type = import_ref Main//a, ForwardDeclared, loaded [concrete = constants.%ForwardDeclared.type] // CHECK:STDOUT: %Main.f_ref: ref %struct_type.f = import_ref Main//a, f_ref, loaded // CHECK:STDOUT: %Main.import_ref.cc0 = import_ref Main//a, inst17 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.37f = import_ref Main//a, inst21 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.37f = import_ref Main//a, inst22 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.3d5: %Basic.assoc_type = import_ref Main//a, loc8_8, loaded [concrete = constants.%assoc0.fee] // CHECK:STDOUT: %Main.import_ref.760: %Basic.assoc_type = import_ref Main//a, loc9_9, loaded [concrete = constants.%assoc1.4ea] // CHECK:STDOUT: %Main.T.44f = import_ref Main//a, T, unloaded // CHECK:STDOUT: %Main.F.eea = import_ref Main//a, F, unloaded -// CHECK:STDOUT: %Main.import_ref.52b = import_ref Main//a, inst35 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.52b = import_ref Main//a, inst37 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.ad1: %ForwardDeclared.assoc_type = import_ref Main//a, loc16_8, loaded [concrete = constants.%assoc0.d40] // CHECK:STDOUT: %Main.import_ref.339: %ForwardDeclared.assoc_type = import_ref Main//a, loc17_9, loaded [concrete = constants.%assoc1.e3d] // CHECK:STDOUT: %Main.T.6ee = import_ref Main//a, T, unloaded diff --git a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon index 47987a11d55a..22b261eb53c1 100644 --- a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon @@ -285,14 +285,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc7_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo(%a.loc7_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Bar(constants.%a) { // CHECK:STDOUT: %a.loc10_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Bar(%a.loc10_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- spacing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -356,8 +352,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc6_21.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo(%a.loc6_21.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_parens.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -433,8 +427,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc14_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo.2(%a.loc14_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- todo_fail_raw_identifier.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -498,8 +490,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc6_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo(%a.loc6_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- two_file.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -682,8 +672,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc12_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo.2(%a.loc12_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Bar.1(constants.%a) { // CHECK:STDOUT: %a => constants.%a // CHECK:STDOUT: } @@ -692,8 +680,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc21_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Bar.2(%a.loc21_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_name_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -773,8 +759,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %b.loc15_15.2 => constants.%b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo.2(%b.loc15_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -853,8 +837,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc15_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo.2(%a.loc15_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduced_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -933,8 +915,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc15_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo.2(%a.loc15_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- alias_two_file.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1059,8 +1039,6 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc17_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo.2(%a.loc17_15.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_repeat_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1144,5 +1122,3 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc18_15.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Foo.2(%a.loc18_15.2) {} -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index df4a75b254cf..50b217528295 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -301,8 +301,6 @@ fn Test() { // CHECK:STDOUT: %Source.specific_fn.loc27_35.2 => constants.%Source.specific_fn.ff0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Source(%T.loc27_11.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%X) { // CHECK:STDOUT: %T.loc27_11.2 => constants.%X // CHECK:STDOUT: %pattern_type => constants.%pattern_type.019 diff --git a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon index 18a3bda61587..b98310e35d28 100644 --- a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon @@ -256,10 +256,6 @@ fn F() { ()[()]; } // CHECK:STDOUT: %pattern_type.loc5_21 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IndexWith(@At.%SubscriptType) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @IndexWith(%SubscriptType.loc4_21.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- wrong_arg_count.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -416,10 +412,6 @@ fn F() { ()[()]; } // CHECK:STDOUT: %SubscriptType => constants.%SubscriptType // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IndexWith(%SubscriptType) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @IndexWith(@At.1.%SubscriptType) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @At.1(constants.%SubscriptType, constants.%Self.30a) { // CHECK:STDOUT: %SubscriptType => constants.%SubscriptType // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.bd2 diff --git a/toolchain/check/testdata/return/min_prelude/import_convert_function.carbon b/toolchain/check/testdata/return/min_prelude/import_convert_function.carbon index c84b58aa2e9b..02fa4ea72611 100644 --- a/toolchain/check/testdata/return/min_prelude/import_convert_function.carbon +++ b/toolchain/check/testdata/return/min_prelude/import_convert_function.carbon @@ -246,10 +246,6 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%T.loc8_22.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { // CHECK:STDOUT: %T.loc8_22.2 => constants.%i32.builtin // CHECK:STDOUT: @@ -925,10 +921,6 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%T, constants.%Self.519) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62 @@ -1677,10 +1669,6 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(%T) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%T) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%T, constants.%Self.519) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62 diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 6f4e048a3855..72127b47e7be 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -603,7 +603,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8fd = import_ref Main//state_constraints, inst19 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//state_constraints, inst23 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//state_constraints, inst24 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.ce7 = import_ref Main//state_constraints, loc7_13, unloaded // CHECK:STDOUT: %Main.import_ref.731 = import_ref Main//state_constraints, loc8_13, unloaded // CHECK:STDOUT: %Main.Member = import_ref Main//state_constraints, Member, unloaded diff --git a/toolchain/check/testdata/where_expr/dot_self_index.carbon b/toolchain/check/testdata/where_expr/dot_self_index.carbon index ac1a207f4d44..419762fdefc7 100644 --- a/toolchain/check/testdata/where_expr/dot_self_index.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_index.carbon @@ -226,8 +226,6 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%W, constants.%Self.8c5170.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Empty(%W.loc11_17.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Empty(constants.%T) { // CHECK:STDOUT: %W.loc11_17.2 => constants.%T // CHECK:STDOUT: @@ -256,8 +254,6 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %V.loc18_43.2 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Empty(@H.%T.loc18_6.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @Empty(constants.%i32) { // CHECK:STDOUT: %W.loc11_17.2 => constants.%i32 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/equal_rewrite.carbon b/toolchain/check/testdata/where_expr/equal_rewrite.carbon index ba60d99d11f0..f95b35193270 100644 --- a/toolchain/check/testdata/where_expr/equal_rewrite.carbon +++ b/toolchain/check/testdata/where_expr/equal_rewrite.carbon @@ -600,8 +600,6 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @OneRewrite(@RepeatedRewrite.%H.loc10_20.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @OneRewriteAgain(constants.%I) { // CHECK:STDOUT: %I.loc14_20.2 => constants.%I // CHECK:STDOUT: } @@ -613,8 +611,6 @@ let K: (E where .F = .Self.G) = bool; // 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) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @OneRewrite(constants.%I) { // CHECK:STDOUT: %G.loc8_15.2 => constants.%I // CHECK:STDOUT: @@ -798,8 +794,6 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Alphabetical(@Reversed.%N.loc11_13.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- todo_fail_rewrites_mismatch_right.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -963,8 +957,6 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithInteger(@WithBool.%facet_value.loc12_16.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- todo_fail_rewrites_mismatch_left.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1131,8 +1123,6 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithT(@WithU.%facet_value.loc13_10.2) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_rewrites.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { diff --git a/toolchain/driver/testdata/compile/raw_ir.carbon b/toolchain/driver/testdata/compile/raw_ir.carbon index c02755e74a4b..63194ff5af27 100644 --- a/toolchain/driver/testdata/compile/raw_ir.carbon +++ b/toolchain/driver/testdata/compile/raw_ir.carbon @@ -24,17 +24,17 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst38}} +// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst42}} // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name1: {name: name2, parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block12, return_slot_pattern: inst34, body: [inst_block20]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block13, return_slot_pattern: inst38, body: [inst_block20]} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: -// CHECK:STDOUT: generic0: {decl: inst38, bindings: inst_block15} +// CHECK:STDOUT: generic0: {decl: inst42, bindings: inst_block16} // CHECK:STDOUT: specifics: -// CHECK:STDOUT: specific0: {generic: generic0, args: inst_block16} +// CHECK:STDOUT: specific0: {generic: generic0, args: inst_block17} // CHECK:STDOUT: struct_type_fields: // CHECK:STDOUT: struct_type_fields0: {} // CHECK:STDOUT: types: @@ -45,211 +45,211 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} // CHECK:STDOUT: 'type(inst43)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst25)} -// CHECK:STDOUT: 'type(inst25)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst25)} +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst27)} +// CHECK:STDOUT: 'type(inst27)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst27)} // CHECK:STDOUT: 'type(symbolic_constant0)': // CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant0)} -// CHECK:STDOUT: 'type(symbolic_constant2)': +// CHECK:STDOUT: 'type(symbolic_constant4)': // CHECK:STDOUT: value_repr: {kind: pointer, type: type(symbolic_constant8)} // CHECK:STDOUT: 'type(symbolic_constant8)': // CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant8)} // CHECK:STDOUT: 'type(inst(WitnessType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(WitnessType))} -// CHECK:STDOUT: 'type(symbolic_constant4)': -// CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant4)} -// CHECK:STDOUT: 'type(symbolic_constant6)': +// CHECK:STDOUT: 'type(symbolic_constant1)': +// CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant1)} +// CHECK:STDOUT: 'type(symbolic_constant5)': // CHECK:STDOUT: value_repr: {kind: pointer, type: type(symbolic_constant8)} // CHECK:STDOUT: insts: // CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} // CHECK:STDOUT: inst15: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} // CHECK:STDOUT: inst16: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} -// CHECK:STDOUT: inst17: {kind: PatternType, arg0: inst(TypeType), type: type(TypeType)} -// CHECK:STDOUT: inst18: {kind: SymbolicBindingPattern, arg0: entity_name0, type: type(inst17)} -// CHECK:STDOUT: inst19: {kind: NameRef, arg0: name1, arg1: inst15, type: type(TypeType)} -// CHECK:STDOUT: inst20: {kind: BindName, arg0: entity_name1, arg1: inst35, type: type(symbolic_constant4)} -// CHECK:STDOUT: inst21: {kind: PatternType, arg0: inst16, type: type(TypeType)} -// CHECK:STDOUT: inst22: {kind: BindingPattern, arg0: entity_name1, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst23: {kind: ValueParamPattern, arg0: inst22, arg1: call_param0, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst24: {kind: NameRef, arg0: name1, arg1: inst15, type: type(TypeType)} -// CHECK:STDOUT: inst25: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} -// CHECK:STDOUT: inst26: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst25)} -// CHECK:STDOUT: inst27: {kind: TupleType, arg0: inst_block9, type: type(TypeType)} -// CHECK:STDOUT: inst28: {kind: TupleLiteral, arg0: inst_block8, type: type(inst27)} -// CHECK:STDOUT: inst29: {kind: Converted, arg0: inst26, arg1: inst25, type: type(TypeType)} -// CHECK:STDOUT: inst30: {kind: TupleType, arg0: inst_block11, type: type(TypeType)} -// CHECK:STDOUT: inst31: {kind: Converted, arg0: inst28, arg1: inst30, type: type(TypeType)} -// CHECK:STDOUT: inst32: {kind: PatternType, arg0: inst30, type: type(TypeType)} -// CHECK:STDOUT: inst33: {kind: ReturnSlotPattern, arg0: inst31, type: type(symbolic_constant7)} -// CHECK:STDOUT: inst34: {kind: OutParamPattern, arg0: inst33, arg1: call_param1, type: type(symbolic_constant7)} -// CHECK:STDOUT: inst35: {kind: ValueParam, arg0: call_param0, arg1: name2, type: type(symbolic_constant4)} -// CHECK:STDOUT: inst36: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(symbolic_constant6)} -// CHECK:STDOUT: inst37: {kind: ReturnSlot, arg0: inst30, arg1: inst36, type: type(symbolic_constant6)} -// CHECK:STDOUT: inst38: {kind: FunctionDecl, arg0: function0, arg1: inst_block14, type: type(inst43)} -// CHECK:STDOUT: inst39: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} -// CHECK:STDOUT: inst40: {kind: PatternType, arg0: inst39, type: type(TypeType)} -// CHECK:STDOUT: inst41: {kind: TupleType, arg0: inst_block17, type: type(TypeType)} -// CHECK:STDOUT: inst42: {kind: PatternType, arg0: inst41, type: type(TypeType)} +// CHECK:STDOUT: inst17: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} +// CHECK:STDOUT: inst18: {kind: PatternType, arg0: inst(TypeType), type: type(TypeType)} +// CHECK:STDOUT: inst19: {kind: SymbolicBindingPattern, arg0: entity_name0, type: type(inst18)} +// CHECK:STDOUT: inst20: {kind: NameRef, arg0: name1, arg1: inst15, type: type(TypeType)} +// CHECK:STDOUT: inst21: {kind: BindName, arg0: entity_name1, arg1: inst39, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst22: {kind: PatternType, arg0: inst16, type: type(TypeType)} +// CHECK:STDOUT: inst23: {kind: BindingPattern, arg0: entity_name1, type: type(symbolic_constant3)} +// CHECK:STDOUT: inst24: {kind: PatternType, arg0: inst17, type: type(TypeType)} +// CHECK:STDOUT: inst25: {kind: ValueParamPattern, arg0: inst23, arg1: call_param0, type: type(symbolic_constant3)} +// CHECK:STDOUT: inst26: {kind: NameRef, arg0: name1, arg1: inst15, type: type(TypeType)} +// CHECK:STDOUT: inst27: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} +// CHECK:STDOUT: inst28: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst27)} +// CHECK:STDOUT: inst29: {kind: TupleType, arg0: inst_block9, type: type(TypeType)} +// CHECK:STDOUT: inst30: {kind: TupleLiteral, arg0: inst_block8, type: type(inst29)} +// CHECK:STDOUT: inst31: {kind: Converted, arg0: inst28, arg1: inst27, type: type(TypeType)} +// CHECK:STDOUT: inst32: {kind: TupleType, arg0: inst_block11, type: type(TypeType)} +// CHECK:STDOUT: inst33: {kind: Converted, arg0: inst30, arg1: inst32, type: type(TypeType)} +// CHECK:STDOUT: inst34: {kind: TupleType, arg0: inst_block12, type: type(TypeType)} +// CHECK:STDOUT: inst35: {kind: PatternType, arg0: inst32, type: type(TypeType)} +// CHECK:STDOUT: inst36: {kind: ReturnSlotPattern, arg0: inst33, type: type(symbolic_constant7)} +// CHECK:STDOUT: inst37: {kind: PatternType, arg0: inst34, type: type(TypeType)} +// CHECK:STDOUT: inst38: {kind: OutParamPattern, arg0: inst36, arg1: call_param1, type: type(symbolic_constant7)} +// CHECK:STDOUT: inst39: {kind: ValueParam, arg0: call_param0, arg1: name2, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst40: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(symbolic_constant5)} +// CHECK:STDOUT: inst41: {kind: ReturnSlot, arg0: inst32, arg1: inst40, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst42: {kind: FunctionDecl, arg0: function0, arg1: inst_block15, type: type(inst43)} // CHECK:STDOUT: inst43: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} // CHECK:STDOUT: inst44: {kind: StructValue, arg0: inst_block_empty, type: type(inst43)} -// CHECK:STDOUT: inst45: {kind: PointerType, arg0: inst30, type: type(TypeType)} -// CHECK:STDOUT: inst46: {kind: RequireCompleteType, arg0: inst30, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst47: {kind: RequireCompleteType, arg0: inst30, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst48: {kind: RequireCompleteType, arg0: inst16, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst45: {kind: PointerType, arg0: inst32, type: type(TypeType)} +// CHECK:STDOUT: inst46: {kind: RequireCompleteType, arg0: inst32, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst47: {kind: RequireCompleteType, arg0: inst32, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst48: {kind: RequireCompleteType, arg0: inst34, type: type(inst(WitnessType))} // CHECK:STDOUT: inst49: {kind: RequireCompleteType, arg0: inst16, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst50: {kind: NameRef, arg0: name2, arg1: inst20, type: type(symbolic_constant4)} -// CHECK:STDOUT: inst51: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst25)} -// CHECK:STDOUT: inst52: {kind: TupleLiteral, arg0: inst_block21, type: type(symbolic_constant6)} -// CHECK:STDOUT: inst53: {kind: RequireCompleteType, arg0: inst30, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst54: {kind: TupleAccess, arg0: inst37, arg1: element0, type: type(symbolic_constant4)} -// CHECK:STDOUT: inst55: {kind: RequireCompleteType, arg0: inst16, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst56: {kind: InitializeFrom, arg0: inst50, arg1: inst54, type: type(symbolic_constant4)} -// CHECK:STDOUT: inst57: {kind: TupleAccess, arg0: inst37, arg1: element1, type: type(inst25)} -// CHECK:STDOUT: inst58: {kind: TupleInit, arg0: inst_block_empty, arg1: inst57, type: type(inst25)} -// CHECK:STDOUT: inst59: {kind: TupleValue, arg0: inst_block_empty, type: type(inst25)} -// CHECK:STDOUT: inst60: {kind: Converted, arg0: inst51, arg1: inst58, type: type(inst25)} -// CHECK:STDOUT: inst61: {kind: TupleInit, arg0: inst_block22, arg1: inst37, type: type(symbolic_constant6)} -// CHECK:STDOUT: inst62: {kind: Converted, arg0: inst52, arg1: inst61, type: type(symbolic_constant6)} -// CHECK:STDOUT: inst63: {kind: ReturnExpr, arg0: inst62, arg1: inst37} -// CHECK:STDOUT: inst64: {kind: RequireCompleteType, arg0: inst41, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst65: {kind: RequireCompleteType, arg0: inst39, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst50: {kind: RequireCompleteType, arg0: inst16, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst51: {kind: RequireCompleteType, arg0: inst17, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst52: {kind: NameRef, arg0: name2, arg1: inst21, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst53: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst27)} +// CHECK:STDOUT: inst54: {kind: TupleLiteral, arg0: inst_block21, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst55: {kind: RequireCompleteType, arg0: inst32, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst56: {kind: TupleAccess, arg0: inst41, arg1: element0, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst57: {kind: RequireCompleteType, arg0: inst16, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst58: {kind: InitializeFrom, arg0: inst52, arg1: inst56, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst59: {kind: TupleAccess, arg0: inst41, arg1: element1, type: type(inst27)} +// CHECK:STDOUT: inst60: {kind: TupleInit, arg0: inst_block_empty, arg1: inst59, type: type(inst27)} +// CHECK:STDOUT: inst61: {kind: TupleValue, arg0: inst_block_empty, type: type(inst27)} +// CHECK:STDOUT: inst62: {kind: Converted, arg0: inst53, arg1: inst60, type: type(inst27)} +// CHECK:STDOUT: inst63: {kind: TupleInit, arg0: inst_block22, arg1: inst41, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst64: {kind: Converted, arg0: inst54, arg1: inst63, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst65: {kind: ReturnExpr, arg0: inst64, arg1: inst41} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: inst14: concrete_constant(inst14) -// CHECK:STDOUT: inst15: symbolic_constant4 +// CHECK:STDOUT: inst15: symbolic_constant0 // CHECK:STDOUT: inst16: symbolic_constant0 -// CHECK:STDOUT: inst17: concrete_constant(inst17) +// CHECK:STDOUT: inst17: symbolic_constant0 // CHECK:STDOUT: inst18: concrete_constant(inst18) -// CHECK:STDOUT: inst19: symbolic_constant4 -// CHECK:STDOUT: inst21: symbolic_constant1 -// CHECK:STDOUT: inst22: concrete_constant(inst22) +// CHECK:STDOUT: inst19: concrete_constant(inst19) +// CHECK:STDOUT: inst20: symbolic_constant0 +// CHECK:STDOUT: inst22: symbolic_constant2 // CHECK:STDOUT: inst23: concrete_constant(inst23) -// CHECK:STDOUT: inst24: symbolic_constant4 +// CHECK:STDOUT: inst24: symbolic_constant2 // CHECK:STDOUT: inst25: concrete_constant(inst25) +// CHECK:STDOUT: inst26: symbolic_constant0 // CHECK:STDOUT: inst27: concrete_constant(inst27) -// CHECK:STDOUT: inst29: concrete_constant(inst25) -// CHECK:STDOUT: inst30: symbolic_constant2 -// CHECK:STDOUT: inst31: symbolic_constant6 -// CHECK:STDOUT: inst32: symbolic_constant3 -// CHECK:STDOUT: inst33: concrete_constant(inst33) -// CHECK:STDOUT: inst34: concrete_constant(inst34) -// CHECK:STDOUT: inst38: concrete_constant(inst44) -// CHECK:STDOUT: inst39: symbolic_constant4 -// CHECK:STDOUT: inst40: symbolic_constant5 -// CHECK:STDOUT: inst41: symbolic_constant6 -// CHECK:STDOUT: inst42: symbolic_constant7 +// CHECK:STDOUT: inst29: concrete_constant(inst29) +// CHECK:STDOUT: inst31: concrete_constant(inst27) +// CHECK:STDOUT: inst32: symbolic_constant4 +// CHECK:STDOUT: inst33: symbolic_constant4 +// CHECK:STDOUT: inst34: symbolic_constant4 +// CHECK:STDOUT: inst35: symbolic_constant6 +// CHECK:STDOUT: inst36: concrete_constant(inst36) +// CHECK:STDOUT: inst37: symbolic_constant6 +// CHECK:STDOUT: inst38: concrete_constant(inst38) +// CHECK:STDOUT: inst42: concrete_constant(inst44) // CHECK:STDOUT: inst43: concrete_constant(inst43) // CHECK:STDOUT: inst44: concrete_constant(inst44) // CHECK:STDOUT: inst45: symbolic_constant8 -// CHECK:STDOUT: inst46: symbolic_constant11 +// CHECK:STDOUT: inst46: symbolic_constant9 // CHECK:STDOUT: inst47: symbolic_constant9 -// CHECK:STDOUT: inst48: symbolic_constant12 -// CHECK:STDOUT: inst49: symbolic_constant10 -// CHECK:STDOUT: inst53: symbolic_constant11 -// CHECK:STDOUT: inst55: symbolic_constant12 -// CHECK:STDOUT: inst58: concrete_constant(inst59) -// CHECK:STDOUT: inst59: concrete_constant(inst59) -// CHECK:STDOUT: inst60: concrete_constant(inst59) -// CHECK:STDOUT: inst64: symbolic_constant11 -// CHECK:STDOUT: inst65: symbolic_constant12 +// CHECK:STDOUT: inst48: symbolic_constant9 +// CHECK:STDOUT: inst49: symbolic_constant11 +// CHECK:STDOUT: inst50: symbolic_constant11 +// CHECK:STDOUT: inst51: symbolic_constant11 +// CHECK:STDOUT: inst55: symbolic_constant9 +// CHECK:STDOUT: inst57: symbolic_constant11 +// CHECK:STDOUT: inst60: concrete_constant(inst61) +// CHECK:STDOUT: inst61: concrete_constant(inst61) +// CHECK:STDOUT: inst62: concrete_constant(inst61) // CHECK:STDOUT: symbolic_constants: // CHECK:STDOUT: symbolic_constant0: {inst: inst16, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant1: {inst: inst21, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant2: {inst: inst30, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant3: {inst: inst32, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant4: {inst: inst16, generic: generic0, index: generic_inst_in_decl0, kind: checked} -// CHECK:STDOUT: symbolic_constant5: {inst: inst21, generic: generic0, index: generic_inst_in_decl1, kind: checked} -// CHECK:STDOUT: symbolic_constant6: {inst: inst30, generic: generic0, index: generic_inst_in_decl2, kind: checked} -// CHECK:STDOUT: symbolic_constant7: {inst: inst32, generic: generic0, index: generic_inst_in_decl3, kind: checked} +// CHECK:STDOUT: symbolic_constant1: {inst: inst16, generic: generic0, index: generic_inst_in_decl0, kind: checked} +// CHECK:STDOUT: symbolic_constant2: {inst: inst22, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant3: {inst: inst22, generic: generic0, index: generic_inst_in_decl1, kind: checked} +// CHECK:STDOUT: symbolic_constant4: {inst: inst32, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant5: {inst: inst32, generic: generic0, index: generic_inst_in_decl2, kind: checked} +// CHECK:STDOUT: symbolic_constant6: {inst: inst35, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant7: {inst: inst35, generic: generic0, index: generic_inst_in_decl3, kind: checked} // CHECK:STDOUT: symbolic_constant8: {inst: inst45, generic: generic, index: generic_inst, kind: checked} // CHECK:STDOUT: symbolic_constant9: {inst: inst47, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant10: {inst: inst49, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant11: {inst: inst47, generic: generic0, index: generic_inst_in_def0, kind: checked} -// CHECK:STDOUT: symbolic_constant12: {inst: inst49, generic: generic0, index: generic_inst_in_def1, kind: checked} +// CHECK:STDOUT: symbolic_constant10: {inst: inst47, generic: generic0, index: generic_inst_in_def0, kind: checked} +// CHECK:STDOUT: symbolic_constant11: {inst: inst50, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant12: {inst: inst50, generic: generic0, index: generic_inst_in_def1, kind: checked} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst38 +// CHECK:STDOUT: 0: inst42 // CHECK:STDOUT: import_refs: {} // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst18 -// CHECK:STDOUT: inst_block6: // CHECK:STDOUT: 0: inst19 +// CHECK:STDOUT: inst_block6: +// CHECK:STDOUT: 0: inst20 // CHECK:STDOUT: inst_block7: -// CHECK:STDOUT: 0: inst23 +// CHECK:STDOUT: 0: inst25 // CHECK:STDOUT: inst_block8: -// CHECK:STDOUT: 0: inst24 -// CHECK:STDOUT: 1: inst26 +// CHECK:STDOUT: 0: inst26 +// CHECK:STDOUT: 1: inst28 // CHECK:STDOUT: inst_block9: // CHECK:STDOUT: 0: inst(TypeType) -// CHECK:STDOUT: 1: inst25 +// CHECK:STDOUT: 1: inst27 // CHECK:STDOUT: inst_block10: -// CHECK:STDOUT: 0: inst24 -// CHECK:STDOUT: 1: inst29 +// CHECK:STDOUT: 0: inst26 +// CHECK:STDOUT: 1: inst31 // CHECK:STDOUT: inst_block11: // CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: 1: inst25 +// CHECK:STDOUT: 1: inst27 // CHECK:STDOUT: inst_block12: -// CHECK:STDOUT: 0: inst35 -// CHECK:STDOUT: 1: inst36 +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 1: inst27 // CHECK:STDOUT: inst_block13: -// CHECK:STDOUT: 0: inst18 -// CHECK:STDOUT: 1: inst22 -// CHECK:STDOUT: 2: inst23 -// CHECK:STDOUT: 3: inst33 -// CHECK:STDOUT: 4: inst34 -// CHECK:STDOUT: inst_block14: -// CHECK:STDOUT: 0: inst24 -// CHECK:STDOUT: 1: inst26 -// CHECK:STDOUT: 2: inst28 -// CHECK:STDOUT: 3: inst29 -// CHECK:STDOUT: 4: inst31 -// CHECK:STDOUT: 5: inst15 -// CHECK:STDOUT: 6: inst35 -// CHECK:STDOUT: 7: inst19 -// CHECK:STDOUT: 8: inst20 -// CHECK:STDOUT: 9: inst36 -// CHECK:STDOUT: 10: inst37 -// CHECK:STDOUT: inst_block15: -// CHECK:STDOUT: 0: inst15 -// CHECK:STDOUT: inst_block16: -// CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: inst_block17: -// CHECK:STDOUT: 0: inst39 -// CHECK:STDOUT: 1: inst25 -// CHECK:STDOUT: inst_block18: // CHECK:STDOUT: 0: inst39 // CHECK:STDOUT: 1: inst40 -// CHECK:STDOUT: 2: inst41 -// CHECK:STDOUT: 3: inst42 +// CHECK:STDOUT: inst_block14: +// CHECK:STDOUT: 0: inst19 +// CHECK:STDOUT: 1: inst23 +// CHECK:STDOUT: 2: inst25 +// CHECK:STDOUT: 3: inst36 +// CHECK:STDOUT: 4: inst38 +// CHECK:STDOUT: inst_block15: +// CHECK:STDOUT: 0: inst26 +// CHECK:STDOUT: 1: inst28 +// CHECK:STDOUT: 2: inst30 +// CHECK:STDOUT: 3: inst31 +// CHECK:STDOUT: 4: inst33 +// CHECK:STDOUT: 5: inst15 +// CHECK:STDOUT: 6: inst39 +// CHECK:STDOUT: 7: inst20 +// CHECK:STDOUT: 8: inst21 +// CHECK:STDOUT: 9: inst40 +// CHECK:STDOUT: 10: inst41 +// CHECK:STDOUT: inst_block16: +// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: inst_block17: +// CHECK:STDOUT: 0: inst16 +// CHECK:STDOUT: inst_block18: +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 1: inst24 +// CHECK:STDOUT: 2: inst34 +// CHECK:STDOUT: 3: inst37 // CHECK:STDOUT: inst_block19: // CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: 1: inst21 -// CHECK:STDOUT: 2: inst30 -// CHECK:STDOUT: 3: inst32 +// CHECK:STDOUT: 1: inst22 +// CHECK:STDOUT: 2: inst32 +// CHECK:STDOUT: 3: inst35 // CHECK:STDOUT: inst_block20: -// CHECK:STDOUT: 0: inst50 -// CHECK:STDOUT: 1: inst51 -// CHECK:STDOUT: 2: inst52 -// CHECK:STDOUT: 3: inst54 -// CHECK:STDOUT: 4: inst56 -// CHECK:STDOUT: 5: inst57 -// CHECK:STDOUT: 6: inst58 -// CHECK:STDOUT: 7: inst60 -// CHECK:STDOUT: 8: inst61 -// CHECK:STDOUT: 9: inst62 -// CHECK:STDOUT: 10: inst63 +// CHECK:STDOUT: 0: inst52 +// CHECK:STDOUT: 1: inst53 +// CHECK:STDOUT: 2: inst54 +// CHECK:STDOUT: 3: inst56 +// CHECK:STDOUT: 4: inst58 +// CHECK:STDOUT: 5: inst59 +// CHECK:STDOUT: 6: inst60 +// CHECK:STDOUT: 7: inst62 +// CHECK:STDOUT: 8: inst63 +// CHECK:STDOUT: 9: inst64 +// CHECK:STDOUT: 10: inst65 // CHECK:STDOUT: inst_block21: -// CHECK:STDOUT: 0: inst50 -// CHECK:STDOUT: 1: inst51 +// CHECK:STDOUT: 0: inst52 +// CHECK:STDOUT: 1: inst53 // CHECK:STDOUT: inst_block22: -// CHECK:STDOUT: 0: inst56 -// CHECK:STDOUT: 1: inst60 +// CHECK:STDOUT: 0: inst58 +// CHECK:STDOUT: 1: inst62 // CHECK:STDOUT: inst_block23: -// CHECK:STDOUT: 0: inst64 -// CHECK:STDOUT: 1: inst65 +// CHECK:STDOUT: 0: inst48 +// CHECK:STDOUT: 1: inst51 // CHECK:STDOUT: inst_block24: // CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: 1: inst38 +// CHECK:STDOUT: 1: inst42 // CHECK:STDOUT: ... diff --git a/toolchain/lower/BUILD b/toolchain/lower/BUILD index def9c42a730e..bdee7797ec38 100644 --- a/toolchain/lower/BUILD +++ b/toolchain/lower/BUILD @@ -54,7 +54,6 @@ cc_library( "//toolchain/sem_ir:entry_point", "//toolchain/sem_ir:expr_info", "//toolchain/sem_ir:file", - "//toolchain/sem_ir:inst", "//toolchain/sem_ir:inst_namer", "//toolchain/sem_ir:typed_insts", "@llvm-project//clang:ast", diff --git a/toolchain/sem_ir/BUILD b/toolchain/sem_ir/BUILD index 9653a4200d18..efe57667c899 100644 --- a/toolchain/sem_ir/BUILD +++ b/toolchain/sem_ir/BUILD @@ -55,25 +55,6 @@ cc_test( ], ) -cc_library( - name = "inst", - srcs = ["inst.cpp"], - hdrs = ["inst.h"], - deps = [ - ":block_value_store", - ":typed_insts", - "//common:check", - "//common:hashing", - "//common:ostream", - "//common:raw_string_ostream", - "//common:struct_reflection", - "//toolchain/base:index_base", - "//toolchain/base:int", - "//toolchain/base:value_store", - "@llvm-project//llvm:Support", - ], -) - cc_library( name = "file", srcs = [ @@ -86,6 +67,7 @@ cc_library( "generic.cpp", "impl.cpp", "import_ir.cpp", + "inst.cpp", "name.cpp", "name_scope.cpp", "pattern.cpp", @@ -107,6 +89,7 @@ cc_library( "impl.h", "import_cpp.h", "import_ir.h", + "inst.h", "interface.h", "name.h", "name_scope.h", @@ -120,7 +103,6 @@ cc_library( ], deps = [ ":block_value_store", - ":inst", ":typed_insts", "//common:check", "//common:enum_base", @@ -130,6 +112,8 @@ cc_library( "//common:ostream", "//common:raw_string_ostream", "//common:set", + "//common:struct_reflection", + "//toolchain/base:index_base", "//toolchain/base:int", "//toolchain/base:kind_switch", "//toolchain/base:shared_value_stores", @@ -267,7 +251,7 @@ cc_test( size = "small", srcs = ["typed_insts_test.cpp"], deps = [ - ":inst", + ":file", ":typed_insts", "//testing/base:gtest_main", "@googletest//:gtest", diff --git a/toolchain/sem_ir/constant.h b/toolchain/sem_ir/constant.h index d5d773e7c416..6a492b86a072 100644 --- a/toolchain/sem_ir/constant.h +++ b/toolchain/sem_ir/constant.h @@ -75,8 +75,15 @@ class ConstantValueStore { : default_(default_value) {} // Returns the constant value of the requested instruction, which is default_ - // if unallocated. + // if unallocated. Always returns an unattached constant. auto Get(InstId inst_id) const -> ConstantId { + auto const_id = GetAttached(inst_id); + return const_id.has_value() ? GetUnattachedConstant(const_id) : const_id; + } + + // Returns the constant value of the requested instruction, which is default_ + // if unallocated. This may be an attached constant. + auto GetAttached(InstId inst_id) const -> ConstantId { CARBON_DCHECK(inst_id.index >= 0); return static_cast(inst_id.index) >= values_.size() ? default_ @@ -115,7 +122,16 @@ class ConstantValueStore { // Given an instruction, returns the unique constant instruction that is // equivalent to it. Returns `None` for a non-constant instruction. auto GetConstantInstId(InstId inst_id) const -> InstId { - return GetInstId(Get(inst_id)); + return GetInstId(GetAttached(inst_id)); + } + + // Given a symbolic constant, returns the unattached form of that constant. + // For any other constant ID, returns the ID unchanged. + auto GetUnattachedConstant(ConstantId const_id) const -> ConstantId { + if (const_id.is_symbolic()) { + return GetAttached(GetSymbolicConstant(const_id).inst_id); + } + return const_id; } auto AddSymbolicConstant(SymbolicConstant constant) -> ConstantId { diff --git a/toolchain/sem_ir/file.h b/toolchain/sem_ir/file.h index 71c69fe13664..2e8db1ada90e 100644 --- a/toolchain/sem_ir/file.h +++ b/toolchain/sem_ir/file.h @@ -331,7 +331,7 @@ class File : public Printable { // All instructions. The first entries will always be the singleton // instructions. - InstStore insts_; + InstStore insts_ = InstStore(this); // Storage for name scopes. NameScopeStore name_scopes_ = NameScopeStore(this); diff --git a/toolchain/sem_ir/formatter.cpp b/toolchain/sem_ir/formatter.cpp index 7635c2ef4bda..b745f2388c35 100644 --- a/toolchain/sem_ir/formatter.cpp +++ b/toolchain/sem_ir/formatter.cpp @@ -505,6 +505,15 @@ auto Formatter::FormatSpecific(SpecificId id) -> void { return; } + if (specific.IsUnresolved()) { + // Omit specifics that were never resolved. Such specifics exist only to + // track the way the arguments were spelled, and that information is + // conveyed entirely by the name of the specific. These specifics may also + // not be referenced by any SemIR that we format, so including them adds + // clutter and possibly emits references to instructions we didn't name. + return; + } + llvm::SaveAndRestore generic_scope( scope_, inst_namer_.GetScopeFor(specific.generic_id)); @@ -719,7 +728,7 @@ auto Formatter::FormatInst(InstId inst_id) -> void { return; } - FormatInst(inst_id, sem_ir_->insts().Get(inst_id)); + FormatInst(inst_id, sem_ir_->insts().GetWithAttachedType(inst_id)); } auto Formatter::FormatPendingImportedFrom(AddSpace space_where) -> void { @@ -1306,7 +1315,7 @@ auto Formatter::FormatInstAsType(InstId id) -> void { // Types are formatted in the `constants` scope because they typically refer // to constants. llvm::SaveAndRestore file_scope(scope_, InstNamer::ScopeId::Constants); - if (auto const_id = sem_ir_->constant_values().Get(id); + if (auto const_id = sem_ir_->constant_values().GetAttached(id); const_id.has_value()) { FormatConstant(const_id); } else { @@ -1317,7 +1326,7 @@ auto Formatter::FormatInstAsType(InstId id) -> void { } auto Formatter::FormatTypeOfInst(InstId id) -> void { - auto type_id = sem_ir_->insts().Get(id).type_id(); + auto type_id = sem_ir_->insts().GetAttachedType(id); if (!type_id.has_value()) { out_ << "invalid"; return; diff --git a/toolchain/sem_ir/formatter.h b/toolchain/sem_ir/formatter.h index 621a759845e9..68423ca77deb 100644 --- a/toolchain/sem_ir/formatter.h +++ b/toolchain/sem_ir/formatter.h @@ -417,7 +417,7 @@ auto Formatter::FormatInst(InstId inst_id, InstT inst) -> void { Indent(); FormatInstLhs(inst_id, inst); out_ << InstT::Kind.ir_name(); - pending_constant_value_ = sem_ir_->constant_values().Get(inst_id); + pending_constant_value_ = sem_ir_->constant_values().GetAttached(inst_id); pending_constant_value_is_self_ = sem_ir_->constant_values().GetInstIdIfValid( pending_constant_value_) == inst_id; FormatInstRhs(inst); diff --git a/toolchain/sem_ir/generic.cpp b/toolchain/sem_ir/generic.cpp index 73aa12a35844..6bf7f77fd576 100644 --- a/toolchain/sem_ir/generic.cpp +++ b/toolchain/sem_ir/generic.cpp @@ -52,23 +52,24 @@ auto SpecificStore::CollectMemUsage(MemUsage& mem_usage, lookup_table_, KeyContext(specifics_.array_ref())); } -auto GetConstantInSpecific(const File& sem_ir, SpecificId specific_id, - ConstantId const_id) -> ConstantId { +static auto GetConstantInSpecific(const File& sem_ir, SpecificId specific_id, + ConstantId const_id) -> ConstantId { if (!const_id.is_symbolic()) { - // Type does not depend on a generic parameter. + // The constant does not depend on a generic parameter. return const_id; } const auto& symbolic = sem_ir.constant_values().GetSymbolicConstant(const_id); if (!symbolic.generic_id.has_value()) { - // Constant is an abstract symbolic constant, not associated with some + // The constant is an unattached symbolic constant, not associated with some // particular generic. return const_id; } if (!specific_id.has_value()) { - // We have a generic constant but no specific. We treat as a request for the - // canonical value of the constant. + // We have a generic constant but no specific. We treat this as a request + // for the value that should be used within the generic itself, which is the + // unattached constant. return sem_ir.constant_values().Get(symbolic.inst_id); } @@ -77,11 +78,19 @@ auto GetConstantInSpecific(const File& sem_ir, SpecificId specific_id, "Given a specific for the wrong generic"); auto value_block_id = specific.GetValueBlock(symbolic.index.region()); - CARBON_CHECK( - value_block_id.has_value(), - "Queried {0} in {1} for {2} before it was resolved.", symbolic.index, - specific_id, - sem_ir.insts().Get(sem_ir.generics().Get(specific.generic_id).decl_id)); + if (!value_block_id.has_value()) { + // For the self specific, we can see queries before the definition is + // resolved. Return the unattached constant value. + CARBON_CHECK( + sem_ir.generics().GetSelfSpecific(symbolic.generic_id) == specific_id, + "Queried {0} in {1} for {2} before it was resolved.", symbolic.index, + specific_id, + sem_ir.insts().Get(sem_ir.generics().Get(specific.generic_id).decl_id)); + // TODO: Make sure this is the same value that we put in the self specific + // when it's resolved. Consider not building value blocks for a self + // specific. + return sem_ir.constant_values().Get(symbolic.inst_id); + } return sem_ir.constant_values().Get( sem_ir.inst_blocks().Get(value_block_id)[symbolic.index.index()]); } @@ -89,12 +98,12 @@ auto GetConstantInSpecific(const File& sem_ir, SpecificId specific_id, auto GetConstantValueInSpecific(const File& sem_ir, SpecificId specific_id, InstId inst_id) -> ConstantId { return GetConstantInSpecific(sem_ir, specific_id, - sem_ir.constant_values().Get(inst_id)); + sem_ir.constant_values().GetAttached(inst_id)); } auto GetTypeOfInstInSpecific(const File& sem_ir, SpecificId specific_id, InstId inst_id) -> TypeId { - auto type_id = sem_ir.insts().Get(inst_id).type_id(); + auto type_id = sem_ir.insts().GetAttachedType(inst_id); auto const_id = sem_ir.types().GetConstantId(type_id); auto specific_const_id = GetConstantInSpecific(sem_ir, specific_id, const_id); return TypeId::ForTypeConstant(specific_const_id); diff --git a/toolchain/sem_ir/generic.h b/toolchain/sem_ir/generic.h index 90c5ab952845..55146ed8ff0b 100644 --- a/toolchain/sem_ir/generic.h +++ b/toolchain/sem_ir/generic.h @@ -56,7 +56,7 @@ struct Generic : public Printable { class GenericStore : public ValueStore { public: // Get the self specific for a generic, or `None` if the `id` is `None`. - auto GetSelfSpecific(GenericId id) -> SpecificId { + auto GetSelfSpecific(GenericId id) const -> SpecificId { return id.has_value() ? Get(id).self_specific_id : SpecificId::None; } }; @@ -70,6 +70,11 @@ struct Specific : Printable { out << "{generic: " << generic_id << ", args: " << args_id << "}"; } + // Returns true if this specific has never been resolved. Such specifics are + // used to track non-canonical argument values, for example in a non-canonical + // `ClassType` that describes how the arguments to the class were written. + auto IsUnresolved() const -> bool { return !decl_block_id.has_value(); } + // Returns the value block for this region of the specific. This is a block // containing values and instructions produced by evaluating the corresponding // eval block of the generic within the context of this specific. These are @@ -145,12 +150,6 @@ class SpecificStore : public Yaml::Printable { Carbon::Set lookup_table_; }; -// Gets the substituted value of a potentially generic constant within a -// specific. Note that this does not perform substitution, and will return -// `None` if the substituted constant value is not yet known. -auto GetConstantInSpecific(const File& sem_ir, SpecificId specific_id, - ConstantId const_id) -> ConstantId; - // Gets the substituted constant value of a potentially generic instruction // within a specific. Note that this does not perform substitution, and will // return `None` if the substituted constant value is not yet known. diff --git a/toolchain/sem_ir/inst.cpp b/toolchain/sem_ir/inst.cpp index 5a33aea20c12..c1f14eb74b8a 100644 --- a/toolchain/sem_ir/inst.cpp +++ b/toolchain/sem_ir/inst.cpp @@ -6,6 +6,8 @@ #include +#include "toolchain/sem_ir/file.h" + namespace Carbon::SemIR { auto Inst::Print(llvm::raw_ostream& out) const -> void { @@ -52,4 +54,8 @@ const std::pair Inst::ArgKindTable[] = { #include "toolchain/sem_ir/inst_kind.def" }; +auto InstStore::GetUnattachedType(TypeId type_id) const -> TypeId { + return file_->types().GetUnattachedType(type_id); +} + } // namespace Carbon::SemIR diff --git a/toolchain/sem_ir/inst.h b/toolchain/sem_ir/inst.h index 81abc67e0d7c..2f6c23b95b9f 100644 --- a/toolchain/sem_ir/inst.h +++ b/toolchain/sem_ir/inst.h @@ -383,6 +383,8 @@ struct LocIdAndInst { // Provides a ValueStore wrapper for an API specific to instructions. class InstStore { public: + explicit InstStore(File* file) : file_(file) {} + // Adds an instruction to the instruction list, returning an ID to reference // the instruction. Note that this doesn't add the instruction to any // instruction block. Check::Context::AddInst or InstBlockStack::AddInst @@ -393,8 +395,26 @@ class InstStore { return values_.Add(loc_id_and_inst.inst); } - // Returns the requested instruction. - auto Get(InstId inst_id) const -> Inst { return values_.Get(inst_id); } + // Returns the requested instruction. The returned instruction always has an + // unattached type, even if an attached type is stored for it. + auto Get(InstId inst_id) const -> Inst { + Inst result = values_.Get(inst_id); + auto type_id = result.type_id(); + if (type_id.has_value() && type_id.is_symbolic()) { + result.SetType(GetUnattachedType(type_id)); + } + return result; + } + + // Returns the requested instruction, preserving its attached type. + auto GetWithAttachedType(InstId inst_id) const -> Inst { + return values_.Get(inst_id); + } + + // Returns the type of the instruction as an attached type. + auto GetAttachedType(InstId inst_id) const -> TypeId { + return GetWithAttachedType(inst_id).type_id(); + } // Returns the requested instruction and its location ID. auto GetWithLocId(InstId inst_id) const -> LocIdAndInst { @@ -490,6 +510,10 @@ class InstStore { auto enumerate() const -> auto { return values_.enumerate(); } private: + // Given a symbolic type, get the corresponding unattached type. + auto GetUnattachedType(TypeId type_id) const -> TypeId; + + File* file_; llvm::SmallVector loc_ids_; ValueStore values_; }; diff --git a/toolchain/sem_ir/type.cpp b/toolchain/sem_ir/type.cpp index 9ad7a996d18e..f430cb059ba7 100644 --- a/toolchain/sem_ir/type.cpp +++ b/toolchain/sem_ir/type.cpp @@ -55,6 +55,11 @@ auto TypeStore::GetAsInst(TypeId type_id) const -> Inst { return file_->insts().Get(GetInstId(type_id)); } +auto TypeStore::GetUnattachedType(TypeId type_id) const -> TypeId { + return TypeId::ForTypeConstant( + file_->constant_values().GetUnattachedConstant(type_id.AsConstantId())); +} + auto TypeStore::GetObjectRepr(TypeId type_id) const -> TypeId { type_id = GetUnqualifiedType(type_id); auto class_type = TryGetAs(type_id); diff --git a/toolchain/sem_ir/type.h b/toolchain/sem_ir/type.h index b009e5c50c78..f9ca56c49e15 100644 --- a/toolchain/sem_ir/type.h +++ b/toolchain/sem_ir/type.h @@ -64,6 +64,9 @@ class TypeStore : public Yaml::Printable { // Returns the instruction used to define the specified type. auto GetAsInst(TypeId type_id) const -> Inst; + // Returns the unattached form of the given type. + auto GetUnattachedType(TypeId type_id) const -> TypeId; + // Converts an ArrayRef of `InstId`s to a range of `TypeInstId`s via // GetAsTypeInstId(). auto GetBlockAsTypeInstIds(llvm::ArrayRef array diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index ddedf6c959f1..dc124320870a 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -526,8 +526,10 @@ struct Call { // For a syntactic call, the parse node will be a CallExprStartId. However, // calls can arise from other syntaxes, such as operators and implicit // conversions. - static constexpr auto Kind = - InstKind::Call.Define({.ir_name = "call"}); + static constexpr auto Kind = InstKind::Call.Define( + {.ir_name = "call", + .constant_needs_inst_id = + InstConstantNeedsInstIdKind::DuringEvaluation}); TypeId type_id; InstId callee_id;