From 3f9fc633fe613c48a4b5e285d18f5e000407cc92 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 15 Aug 2025 11:36:54 -0700 Subject: [PATCH] Add a vtableDecl inst and use that in classes instead of VtablePtr (#5945) This addresses/avoids the duplicate import of vtables. I went through a few iterations/etc along the way and left them in the commit history for the PR in case any of them are useful to illustrate how I got here, or worth revisiting. Essentially I ended up with a circularity in importing - importing the class imported the vtable_decl which imported the virtual functions - and then pending specifics of the virtual functions needed the self specific of the enclosing class which wasn't ready yet. Adding ImportRef to the vtable_decl to break the cycle caused me trouble when naming the vtable_decl instructions - so I tried making the functions in the vtable unloaded ImportRefs instead. That worked, but meant that importing a class still was doing O(number of vtable entries) even if the vtable wasn't used. So I revisited the lazy vtable_decl - figured out how to make the naming work (when building the vtable_ptr, even though the vtable_decl doesn't have to be loaded for the vtable_ptr, I force it to be loaded anyway, to load the vtable so it's usable by lowering, etc). And then I could go back to the old non-lazy loaded vtable entries (using some loaded ImportRefs in the cases where we needed them/had already adopted them). Then thinking about the VtablePtr instruction, went back/forth on exactly what it needed - went from VtablePtr's member being a VtableDecl InstId, to a ClassId, then back to a VtableId as it was before this patch. Naming the instructions has one oddity, that the VtableDecl and VtablePtr instructions seem to need to add the pending name for the VtableId - despite not using the VtableId in their own name - should the inst namer be doing this work for parameters of instructions rather than requiring the inst to do it deliberately? (or am I holding it wrong in some way?) --------- Co-authored-by: Richard Smith --- toolchain/check/class.cpp | 25 +- toolchain/check/convert.cpp | 65 ++- toolchain/check/convert.h | 3 +- toolchain/check/import_ref.cpp | 56 ++- .../testdata/class/virtual_modifiers.carbon | 415 ++++++++---------- toolchain/lower/testdata/class/virtual.carbon | 1 - toolchain/sem_ir/class.h | 4 +- toolchain/sem_ir/expr_info.cpp | 1 + toolchain/sem_ir/formatter.cpp | 6 +- toolchain/sem_ir/inst_kind.def | 1 + toolchain/sem_ir/inst_namer.cpp | 19 +- toolchain/sem_ir/typed_insts.h | 9 + 12 files changed, 292 insertions(+), 313 deletions(-) diff --git a/toolchain/check/class.cpp b/toolchain/check/class.cpp index e32113acaf26..7a03c925e51a 100644 --- a/toolchain/check/class.cpp +++ b/toolchain/check/class.cpp @@ -145,15 +145,15 @@ static auto BuildVtable(Context& context, Parse::ClassDefinitionId node_id, // Get some base class/type/specific info. if (base_class_type) { auto& base_class_info = context.classes().Get(base_class_type->class_id); - auto base_vtable_ptr_inst_id = base_class_info.vtable_ptr_id; - if (base_vtable_ptr_inst_id.has_value()) { - LoadImportRef(context, base_vtable_ptr_inst_id); + auto base_vtable_decl_inst_id = base_class_info.vtable_decl_id; + if (base_vtable_decl_inst_id.has_value()) { + LoadImportRef(context, base_vtable_decl_inst_id); auto canonical_base_vtable_inst_id = - context.constant_values().GetConstantInstId(base_vtable_ptr_inst_id); - const auto& base_vtable_ptr_inst = - context.insts().GetAs( + context.constant_values().GetConstantInstId(base_vtable_decl_inst_id); + const auto& base_vtable_decl_inst = + context.insts().GetAs( canonical_base_vtable_inst_id); - base_vtable_id = base_vtable_ptr_inst.vtable_id; + base_vtable_id = base_vtable_decl_inst.vtable_id; base_class_specific_id = base_class_type->specific_id; } } @@ -187,7 +187,6 @@ static auto BuildVtable(Context& context, Parse::ClassDefinitionId node_id, // TODO: Avoid quadratic search. Perhaps build a map from `NameId` to the // elements of the top of `vtable_stack`. for (auto base_vtable_entry_id : base_vtable_inst_block) { - LoadImportRef(context, base_vtable_entry_id); auto [derived_vtable_entry_id, derived_vtable_entry_const_id, fn_id, specific_id] = DecomposeVirtualFunction(context.sem_ir(), base_vtable_entry_id, @@ -303,15 +302,9 @@ static auto CheckCompleteClassType( if (class_info.is_dynamic) { auto vtable_id = BuildVtable(context, node_id, class_id, base_class_type, vtable_contents); - auto vptr_type_id = GetPointerType(context, SemIR::VtableType::TypeInstId); - auto generic_id = class_info.generic_id; - auto self_specific_id = context.generics().GetSelfSpecific(generic_id); - class_info.vtable_ptr_id = - AddInst(context, node_id, - {.type_id = vptr_type_id, - .vtable_id = vtable_id, - .specific_id = self_specific_id}); + class_info.vtable_decl_id = AddInst( + context, node_id, {.type_id = vptr_type_id, .vtable_id = vtable_id}); } auto struct_type_id = GetStructType( diff --git a/toolchain/check/convert.cpp b/toolchain/check/convert.cpp index 572ff38d479f..e37b4442e0bf 100644 --- a/toolchain/check/convert.cpp +++ b/toolchain/check/convert.cpp @@ -165,7 +165,7 @@ static auto ConvertAggregateElement( ConversionTarget::Kind kind, SemIR::InstId target_id, SemIR::TypeInstId target_elem_type_inst, PendingBlock* target_block, size_t src_field_index, size_t target_field_index, - SemIR::InstId vtable_ptr_inst_id = SemIR::InstId::None) -> SemIR::InstId { + SemIR::ClassType* vtable_class_type = nullptr) -> SemIR::InstId { auto src_elem_type = context.types().GetTypeIdForTypeInstId(src_elem_type_inst); auto target_elem_type = @@ -193,7 +193,7 @@ static auto ConvertAggregateElement( target.init_id = MakeElementAccessInst( context, loc_id, target_id, target_elem_type, *target_block, target_field_index); - return Convert(context, loc_id, src_elem_id, target, vtable_ptr_inst_id); + return Convert(context, loc_id, src_elem_id, target, vtable_class_type); } // Performs a conversion from a tuple to an array type. This function only @@ -390,7 +390,7 @@ template static auto ConvertStructToStructOrClass( Context& context, SemIR::StructType src_type, SemIR::StructType dest_type, SemIR::InstId value_id, ConversionTarget target, - SemIR::InstId vtable_ptr_inst_id = SemIR::InstId::None) -> SemIR::InstId { + SemIR::ClassType* vtable_class_type = nullptr) -> SemIR::InstId { static_assert(std::is_same_v || std::is_same_v); constexpr bool ToClass = @@ -480,11 +480,22 @@ static auto ConvertStructToStructOrClass( {.type_id = vptr_type_id, .base_id = target.init_id, .index = SemIR::ElementIndex(i)}); - auto init_id = - AddInst(context, value_loc_id, - {.type_id = vptr_type_id, - .src_id = vtable_ptr_inst_id, - .dest_id = dest_id}); + auto vtable_decl_id = + context.classes().Get(vtable_class_type->class_id).vtable_decl_id; + LoadImportRef(context, vtable_decl_id); + auto canonical_vtable_decl_id = + context.constant_values().GetConstantInstId(vtable_decl_id); + auto vtable_ptr_id = AddInst( + context, value_loc_id, + {.type_id = GetPointerType(context, SemIR::VtableType::TypeInstId), + .vtable_id = context.insts() + .GetAs(canonical_vtable_decl_id) + .vtable_id, + .specific_id = vtable_class_type->specific_id}); + auto init_id = AddInst(context, value_loc_id, + {.type_id = vptr_type_id, + .src_id = vtable_ptr_id, + .dest_id = dest_id}); new_block.Set(i, init_id); continue; } @@ -526,7 +537,7 @@ static auto ConvertStructToStructOrClass( context, value_loc_id, value_id, src_field.type_inst_id, literal_elems, inner_kind, target.init_id, dest_field.type_inst_id, target.init_block, src_field_index, - src_field_index + dest_vptr_offset, vtable_ptr_inst_id); + src_field_index + dest_vptr_offset, vtable_class_type); if (init_id == SemIR::ErrorInst::InstId) { return SemIR::ErrorInst::InstId; } @@ -568,10 +579,11 @@ static auto ConvertStructToStruct(Context& context, SemIR::StructType src_type, // Performs a conversion from a struct to a class type. This function only // converts the type, and does not perform a final conversion to the requested // expression category. -static auto ConvertStructToClass( - Context& context, SemIR::StructType src_type, SemIR::ClassType dest_type, - SemIR::InstId value_id, ConversionTarget target, - SemIR::InstId dest_vtable_ptr_inst_id = SemIR::InstId::None) +static auto ConvertStructToClass(Context& context, SemIR::StructType src_type, + SemIR::ClassType dest_type, + SemIR::InstId value_id, + ConversionTarget target, + SemIR::ClassType* vtable_class_type) -> SemIR::InstId { PendingBlock target_block(&context); auto& dest_class_info = context.classes().Get(dest_type.class_id); @@ -598,24 +610,9 @@ static auto ConvertStructToClass( SemIR::LocId(value_id), {.type_id = target.type_id}); } - if (!dest_vtable_ptr_inst_id.has_value()) { - dest_vtable_ptr_inst_id = dest_class_info.vtable_ptr_id; - if (dest_type.specific_id.has_value() && - dest_vtable_ptr_inst_id.has_value()) { - LoadImportRef(context, dest_vtable_ptr_inst_id); - dest_vtable_ptr_inst_id = context.constant_values().GetInstId( - GetConstantValueInSpecific(context.sem_ir(), dest_type.specific_id, - dest_vtable_ptr_inst_id)); - } - } - - if (dest_vtable_ptr_inst_id.has_value()) { - LoadImportRef(context, dest_vtable_ptr_inst_id); - } - auto result_id = ConvertStructToStructOrClass( context, src_type, dest_struct_type, value_id, target, - dest_vtable_ptr_inst_id); + vtable_class_type ? vtable_class_type : &dest_type); if (need_temporary) { target_block.InsertHere(); @@ -799,8 +796,8 @@ static auto DiagnoseConversionFailureToConstraintValue( static auto PerformBuiltinConversion( Context& context, SemIR::LocId loc_id, SemIR::InstId value_id, - ConversionTarget target, - SemIR::InstId vtable_ptr_inst_id = SemIR::InstId::None) -> SemIR::InstId { + ConversionTarget target, SemIR::ClassType* vtable_class_type = nullptr) + -> SemIR::InstId { auto& sem_ir = context.sem_ir(); auto value = sem_ir.insts().Get(value_id); auto value_type_id = value.type_id(); @@ -974,7 +971,7 @@ static auto PerformBuiltinConversion( .adapt_id.has_value()) { return ConvertStructToClass(context, *src_struct_type, *target_class_type, value_id, target, - vtable_ptr_inst_id); + vtable_class_type); } } @@ -1201,7 +1198,7 @@ auto PerformAction(Context& context, SemIR::LocId loc_id, } auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id, - ConversionTarget target, SemIR::InstId vtable_ptr_inst_id) + ConversionTarget target, SemIR::ClassType* vtable_class_type) -> SemIR::InstId { auto& sem_ir = context.sem_ir(); auto orig_expr_id = expr_id; @@ -1266,7 +1263,7 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id, // Check whether any builtin conversion applies. expr_id = PerformBuiltinConversion(context, loc_id, expr_id, target, - vtable_ptr_inst_id); + vtable_class_type); if (expr_id == SemIR::ErrorInst::InstId) { return expr_id; } diff --git a/toolchain/check/convert.h b/toolchain/check/convert.h index 211f160c7a58..5486ab197377 100644 --- a/toolchain/check/convert.h +++ b/toolchain/check/convert.h @@ -67,8 +67,7 @@ struct ConversionTarget { // type. auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id, ConversionTarget target, - SemIR::InstId vtable_ptr_inst_id = SemIR::InstId::None) - -> SemIR::InstId; + SemIR::ClassType* vtable_class_type = nullptr) -> SemIR::InstId; // Performs initialization of `target_id` from `value_id`. Returns the // possibly-converted initializing expression, which should be assigned to the diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index e0ecb0ca28dc..fa31c6677d07 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -1649,7 +1649,7 @@ static auto AddClassDefinition(ImportContext& context, SemIR::Class& new_class, SemIR::InstId complete_type_witness_id, SemIR::InstId base_id, SemIR::InstId adapt_id, - SemIR::InstId vtable_ptr_id) -> void { + SemIR::InstId vtable_decl_id) -> void { new_class.definition_id = new_class.first_owning_decl_id; new_class.complete_type_witness_id = complete_type_witness_id; @@ -1671,8 +1671,8 @@ static auto AddClassDefinition(ImportContext& context, if (import_class.adapt_id.has_value()) { new_class.adapt_id = adapt_id; } - if (import_class.vtable_ptr_id.has_value()) { - new_class.vtable_ptr_id = vtable_ptr_id; + if (import_class.vtable_decl_id.has_value()) { + new_class.vtable_decl_id = vtable_decl_id; } } @@ -1740,11 +1740,11 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, auto adapt_id = import_class.adapt_id.has_value() ? GetLocalConstantInstId(resolver, import_class.adapt_id) : SemIR::InstId::None; - auto& new_class = resolver.local_classes().Get(class_id); - auto vtable_ptr_const_id = - import_class.vtable_ptr_id.has_value() - ? AddImportRef(resolver, import_class.vtable_ptr_id) + auto vtable_decl_id = + import_class.vtable_decl_id.has_value() + ? AddImportRef(resolver, import_class.vtable_decl_id) : SemIR::InstId::None; + auto& new_class = resolver.local_classes().Get(class_id); if (resolver.HasNewWork()) { return ResolveResult::Retry(class_const_id, new_class.first_decl_id()); @@ -1770,7 +1770,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, import_class.complete_type_witness_id, complete_type_witness_const_id); AddClassDefinition(resolver, import_class, new_class, complete_type_witness_id, base_id, adapt_id, - vtable_ptr_const_id); + vtable_decl_id); } return ResolveResult::Done(class_const_id, new_class.first_decl_id()); @@ -2043,18 +2043,14 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, } static auto TryResolveTypedInst(ImportRefResolver& resolver, - SemIR::VtablePtr inst, + SemIR::VtableDecl inst, SemIR::ConstantId /*vtable_const_id*/) -> ResolveResult { const auto& import_vtable = resolver.import_vtables().Get(inst.vtable_id); - auto class_const_id = GetLocalConstantId(resolver, resolver.import_classes() .Get(import_vtable.class_id) .first_owning_decl_id); - - auto specific_data = GetLocalSpecificData(resolver, inst.specific_id); - auto class_const_inst = resolver.local_insts().Get( resolver.local_constant_values().GetInstId(class_const_id)); @@ -2111,12 +2107,35 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, .virtual_functions_id = resolver.local_inst_blocks().Add(lazy_virtual_functions)}}); - return ResolveAsDeduplicated( + return ResolveAsDeduplicated( resolver, {.type_id = GetPointerType(resolver.local_context(), SemIR::VtableType::TypeInstId), - .vtable_id = new_vtable_id, - .specific_id = GetOrAddLocalSpecific( - resolver, inst.specific_id, specific_data)}); + .vtable_id = new_vtable_id}); +} + +static auto TryResolveTypedInst(ImportRefResolver& resolver, + SemIR::VtablePtr inst, + SemIR::ConstantId /*vtable_const_id*/) + -> ResolveResult { + auto specific_data = GetLocalSpecificData(resolver, inst.specific_id); + + auto vtable_const_id = GetLocalConstantId( + resolver, resolver.import_classes() + .Get(resolver.import_vtables().Get(inst.vtable_id).class_id) + .vtable_decl_id); + auto vtable_const_inst = resolver.local_insts().Get( + resolver.local_constant_values().GetInstId(vtable_const_id)); + if (resolver.HasNewWork()) { + return ResolveResult::Retry(); + } + + return ResolveAsDeduplicated( + resolver, + {.type_id = GetPointerType(resolver.local_context(), + SemIR::VtableType::TypeInstId), + .vtable_id = vtable_const_inst.As().vtable_id, + .specific_id = + GetOrAddLocalSpecific(resolver, inst.specific_id, specific_data)}); } static auto TryResolveTypedInst(ImportRefResolver& resolver, @@ -3227,6 +3246,9 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver, case CARBON_KIND(SemIR::VarStorage inst): { return TryResolveTypedInst(resolver, inst, inst_id); } + case CARBON_KIND(SemIR::VtableDecl inst): { + return TryResolveTypedInst(resolver, inst, const_id); + } case CARBON_KIND(SemIR::VtablePtr inst): { return TryResolveTypedInst(resolver, inst, const_id); } diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 7b3012b32a30..2fc0a4430c69 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -531,7 +531,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op.type: type = fn_type @Base.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %Abstract: type = class_type @Abstract [concrete] @@ -545,7 +545,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.f31: type = pattern_type %ptr.404 [concrete] // CHECK:STDOUT: %Abstract.as.Destroy.impl.Op.type: type = fn_type @Abstract.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Abstract.as.Destroy.impl.Op: %Abstract.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %Abstract.vtable_ptr: ref %ptr.454 = vtable_ptr @Abstract.vtable [concrete] +// CHECK:STDOUT: %Abstract.vtable_decl: ref %ptr.454 = vtable_decl @Abstract.vtable [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -613,10 +613,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Base.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.ae4] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -644,10 +644,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Abstract.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Abstract.as.Destroy.impl.%Abstract.as.Destroy.impl.Op.decl), @Abstract.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.9d1] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Abstract.vtable [concrete = constants.%Abstract.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Abstract.vtable [concrete = constants.%Abstract.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract @@ -696,14 +696,15 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Base.H.type: type = fn_type @Base.H [concrete] // CHECK:STDOUT: %Base.H: %Base.H.type = struct_value () [concrete] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.96c: type = struct_type {.base: %Base} [concrete] // CHECK:STDOUT: %complete_type.0e2: = complete_type_witness %struct_type.base.96c [concrete] // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %struct_type.base.f5e: type = struct_type {.base: %empty_struct_type} [concrete] +// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] // CHECK:STDOUT: %Base.val: %Base = struct_value (%Derived.vtable_ptr) [concrete] // CHECK:STDOUT: %Derived.val: %Derived = struct_value (%Base.val) [concrete] // CHECK:STDOUT: } @@ -719,7 +720,7 @@ class T2(G2:! type) { // CHECK:STDOUT: import Modifiers//default // CHECK:STDOUT: } // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] -// CHECK:STDOUT: %Modifiers.import_ref.be7: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %Modifiers.import_ref.97a: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %Modifiers.import_ref.05e: = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%complete_type.513] // CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst19 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded @@ -771,10 +772,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e52] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.96c [concrete = constants.%complete_type.0e2] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -786,7 +787,7 @@ class T2(G2:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class @Base [from "modifiers.carbon"] { // CHECK:STDOUT: complete_type_witness = imports.%Modifiers.import_ref.05e -// CHECK:STDOUT: vtable_ptr = imports.%Modifiers.import_ref.be7 +// CHECK:STDOUT: vtable_decl = imports.%Modifiers.import_ref.97a // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Modifiers.import_ref.1f3 @@ -818,7 +819,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %.loc12_31.1: %struct_type.base.f5e = struct_literal (%.loc12_30.1) // CHECK:STDOUT: %.loc12_31.2: ref %Base = class_element_access %d.var, element0 // CHECK:STDOUT: %.loc12_30.2: ref %ptr.454 = class_element_access %.loc12_31.2, element0 -// CHECK:STDOUT: %.loc12_30.3: init %ptr.454 = initialize_from @Derived.%vtable_ptr to %.loc12_30.2 [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %.loc12_30.3: init %ptr.454 = initialize_from %Derived.vtable_ptr to %.loc12_30.2 [concrete = constants.%Derived.vtable_ptr] // CHECK:STDOUT: %.loc12_30.4: init %Base = class_init (%.loc12_30.3), %.loc12_31.2 [concrete = constants.%Base.val] // CHECK:STDOUT: %.loc12_31.3: init %Base = converted %.loc12_30.1, %.loc12_30.4 [concrete = constants.%Base.val] // CHECK:STDOUT: %.loc12_31.4: init %Derived = class_init (%.loc12_31.3), %d.var [concrete = constants.%Derived.val] @@ -853,8 +855,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Base.H.type: type = fn_type @Base.H [concrete] // CHECK:STDOUT: %Base.H: %Base.H.type = struct_value () [concrete] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [concrete] // CHECK:STDOUT: %complete_type.0e2: = complete_type_witness %struct_type.base [concrete] // CHECK:STDOUT: } @@ -870,7 +872,7 @@ class T2(G2:! type) { // CHECK:STDOUT: import Modifiers//default // CHECK:STDOUT: } // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] -// CHECK:STDOUT: %Modifiers.import_ref.be7: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %Modifiers.import_ref.97a: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %Modifiers.import_ref.05e: = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%complete_type.513] // CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst19 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded @@ -920,10 +922,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base [concrete = constants.%complete_type.0e2] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -935,7 +937,7 @@ class T2(G2:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class @Base [from "modifiers.carbon"] { // CHECK:STDOUT: complete_type_witness = imports.%Modifiers.import_ref.05e -// CHECK:STDOUT: vtable_ptr = imports.%Modifiers.import_ref.be7 +// CHECK:STDOUT: vtable_decl = imports.%Modifiers.import_ref.97a // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Modifiers.import_ref.1f3 @@ -971,6 +973,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %Base.H.type: type = fn_type @Base.H [concrete] // CHECK:STDOUT: %Base.H: %Base.H.type = struct_value () [concrete] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] // CHECK:STDOUT: %Base.val: %Base = struct_value (%Base.vtable_ptr) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -992,7 +995,7 @@ class T2(G2:! type) { // CHECK:STDOUT: import Modifiers//default // CHECK:STDOUT: } // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] -// CHECK:STDOUT: %Modifiers.import_ref.be7: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %Modifiers.import_ref.97a: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %Modifiers.import_ref.05ec96.1: = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst19 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded @@ -1001,7 +1004,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Modifiers.import_ref.87c: type = import_ref Modifiers//default, loc4_17, loaded [concrete = constants.%Base] // CHECK:STDOUT: %Modifiers.import_ref.cb9298.1: type = import_ref Modifiers//default, inst32 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Modifiers.import_ref.5f6 = import_ref Modifiers//default, loc8_25, unloaded -// CHECK:STDOUT: %Modifiers.import_ref.e657ad.2 = import_ref Modifiers//default, loc12_1, unloaded +// CHECK:STDOUT: %Modifiers.import_ref.30bb79.2 = import_ref Modifiers//default, loc12_1, unloaded // CHECK:STDOUT: %Modifiers.import_ref.05ec96.2: = import_ref Modifiers//default, loc12_1, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Modifiers.import_ref.ee1 = import_ref Modifiers//default, inst76 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.bf4 = import_ref Modifiers//default, loc9_30, unloaded @@ -1035,7 +1038,7 @@ class T2(G2:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class @Base [from "modifiers.carbon"] { // CHECK:STDOUT: complete_type_witness = imports.%Modifiers.import_ref.05ec96.1 -// CHECK:STDOUT: vtable_ptr = imports.%Modifiers.import_ref.be7 +// CHECK:STDOUT: vtable_decl = imports.%Modifiers.import_ref.97a // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Modifiers.import_ref.1f3 @@ -1044,7 +1047,7 @@ class T2(G2:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract [from "modifiers.carbon"] { // CHECK:STDOUT: complete_type_witness = imports.%Modifiers.import_ref.05ec96.2 -// CHECK:STDOUT: vtable_ptr = imports.%Modifiers.import_ref.e657ad.2 +// CHECK:STDOUT: vtable_decl = imports.%Modifiers.import_ref.30bb79.2 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Modifiers.import_ref.ee1 @@ -1065,7 +1068,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %v.var: ref %Base = var %v.var_patt // CHECK:STDOUT: %.loc7_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc7_28.2: ref %ptr.454 = class_element_access %v.var, element0 -// CHECK:STDOUT: %.loc7_28.3: init %ptr.454 = initialize_from imports.%Modifiers.import_ref.be7 to %.loc7_28.2 [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %.loc7_28.3: init %ptr.454 = initialize_from %Base.vtable_ptr to %.loc7_28.2 [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %.loc7_28.4: init %Base = class_init (%.loc7_28.3), %v.var [concrete = constants.%Base.val] // CHECK:STDOUT: %.loc7_3: init %Base = converted %.loc7_28.1, %.loc7_28.4 [concrete = constants.%Base.val] // CHECK:STDOUT: assign %v.var, %.loc7_3 @@ -1099,7 +1103,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %A1.as.Destroy.impl.Op.type: type = fn_type @A1.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %A1.as.Destroy.impl.Op: %A1.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %A1.vtable_ptr: ref %ptr.454 = vtable_ptr @A1.vtable [concrete] +// CHECK:STDOUT: %A1.vtable_decl: ref %ptr.454 = vtable_decl @A1.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %A2: type = class_type @A2 [concrete] @@ -1112,7 +1116,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.2c5: type = pattern_type %ptr.590 [concrete] // CHECK:STDOUT: %A2.as.Destroy.impl.Op.type: type = fn_type @A2.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %A2.as.Destroy.impl.Op: %A2.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %A2.vtable_ptr: ref %ptr.454 = vtable_ptr @A2.vtable [concrete] +// CHECK:STDOUT: %A2.vtable_decl: ref %ptr.454 = vtable_decl @A2.vtable [concrete] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %A1} [concrete] // CHECK:STDOUT: %complete_type.a6f: = complete_type_witness %struct_type.base [concrete] // CHECK:STDOUT: } @@ -1182,10 +1186,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @A1.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A1.as.Destroy.impl.%A1.as.Destroy.impl.Op.decl), @A1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.169] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @A1.vtable [concrete = constants.%A1.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @A1.vtable [concrete = constants.%A1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A1 @@ -1207,10 +1211,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @A2.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A2.as.Destroy.impl.%A2.as.Destroy.impl.Op.decl), @A2.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.ed9] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @A2.vtable [concrete = constants.%A2.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @A2.vtable [concrete = constants.%A2.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base [concrete = constants.%complete_type.a6f] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A2 @@ -1252,7 +1256,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %B1.as.Destroy.impl.Op.type: type = fn_type @B1.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %B1.as.Destroy.impl.Op: %B1.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %B1.vtable_ptr: ref %ptr.454 = vtable_ptr @B1.vtable [concrete] +// CHECK:STDOUT: %B1.vtable_decl: ref %ptr.454 = vtable_decl @B1.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %B2: type = class_type @B2 [concrete] @@ -1265,7 +1269,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.98e: type = pattern_type %ptr.afe [concrete] // CHECK:STDOUT: %B2.as.Destroy.impl.Op.type: type = fn_type @B2.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %B2.as.Destroy.impl.Op: %B2.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %B2.vtable_ptr: ref %ptr.454 = vtable_ptr @B2.vtable [concrete] +// CHECK:STDOUT: %B2.vtable_decl: ref %ptr.454 = vtable_decl @B2.vtable [concrete] // CHECK:STDOUT: %struct_type.base.508: type = struct_type {.base: %B1} [concrete] // CHECK:STDOUT: %complete_type.5ac: = complete_type_witness %struct_type.base.508 [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] @@ -1278,17 +1282,20 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] // CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %C.vtable_ptr: ref %ptr.454 = vtable_ptr @C.vtable [concrete] +// CHECK:STDOUT: %C.vtable_decl: ref %ptr.454 = vtable_decl @C.vtable [concrete] // CHECK:STDOUT: %struct_type.base.421: type = struct_type {.base: %B2} [concrete] // CHECK:STDOUT: %complete_type.066: = complete_type_witness %struct_type.base.421 [concrete] // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] +// CHECK:STDOUT: %B1.vtable_ptr: ref %ptr.454 = vtable_ptr @B1.vtable [concrete] // CHECK:STDOUT: %B1.val.267: %B1 = struct_value (%B1.vtable_ptr) [concrete] // CHECK:STDOUT: %struct_type.base.f5e: type = struct_type {.base: %empty_struct_type} [concrete] +// CHECK:STDOUT: %B2.vtable_ptr: ref %ptr.454 = vtable_ptr @B2.vtable [concrete] // CHECK:STDOUT: %B1.val.d2f: %B1 = struct_value (%B2.vtable_ptr) [concrete] // CHECK:STDOUT: %B2.val.e9e: %B2 = struct_value (%B1.val.d2f) [concrete] // CHECK:STDOUT: %struct_type.base.a0c: type = struct_type {.base: %struct_type.base.f5e} [concrete] +// CHECK:STDOUT: %C.vtable_ptr: ref %ptr.454 = vtable_ptr @C.vtable [concrete] // CHECK:STDOUT: %B1.val.b9d: %B1 = struct_value (%C.vtable_ptr) [concrete] // CHECK:STDOUT: %B2.val.426: %B2 = struct_value (%B1.val.b9d) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value (%B2.val.426) [concrete] @@ -1379,10 +1386,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @B1.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@B1.as.Destroy.impl.%B1.as.Destroy.impl.Op.decl), @B1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.20e] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @B1.vtable [concrete = constants.%B1.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @B1.vtable [concrete = constants.%B1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B1 @@ -1404,10 +1411,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @B2.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@B2.as.Destroy.impl.%B2.as.Destroy.impl.Op.decl), @B2.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.594] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @B2.vtable [concrete = constants.%B2.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @B2.vtable [concrete = constants.%B2.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.508 [concrete = constants.%complete_type.5ac] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B2 @@ -1432,10 +1439,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.edd] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @C.vtable [concrete = constants.%C.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @C.vtable [concrete = constants.%C.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.421 [concrete = constants.%complete_type.066] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -1478,7 +1485,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %b1.var: ref %B1 = var %b1.var_patt // CHECK:STDOUT: %.loc19_17.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc19_17.2: ref %ptr.454 = class_element_access %b1.var, element0 -// CHECK:STDOUT: %.loc19_17.3: init %ptr.454 = initialize_from @B1.%vtable_ptr to %.loc19_17.2 [concrete = constants.%B1.vtable_ptr] +// CHECK:STDOUT: %B1.vtable_ptr: ref %ptr.454 = vtable_ptr @B1.vtable [concrete = constants.%B1.vtable_ptr] +// CHECK:STDOUT: %.loc19_17.3: init %ptr.454 = initialize_from %B1.vtable_ptr to %.loc19_17.2 [concrete = constants.%B1.vtable_ptr] // CHECK:STDOUT: %.loc19_17.4: init %B1 = class_init (%.loc19_17.3), %b1.var [concrete = constants.%B1.val.267] // CHECK:STDOUT: %.loc19_3: init %B1 = converted %.loc19_17.1, %.loc19_17.4 [concrete = constants.%B1.val.267] // CHECK:STDOUT: assign %b1.var, %.loc19_3 @@ -1493,7 +1501,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %.loc20_27.1: %struct_type.base.f5e = struct_literal (%.loc20_26.1) // CHECK:STDOUT: %.loc20_27.2: ref %B1 = class_element_access %b2.var, element0 // CHECK:STDOUT: %.loc20_26.2: ref %ptr.454 = class_element_access %.loc20_27.2, element0 -// CHECK:STDOUT: %.loc20_26.3: init %ptr.454 = initialize_from @B2.%vtable_ptr to %.loc20_26.2 [concrete = constants.%B2.vtable_ptr] +// CHECK:STDOUT: %B2.vtable_ptr: ref %ptr.454 = vtable_ptr @B2.vtable [concrete = constants.%B2.vtable_ptr] +// CHECK:STDOUT: %.loc20_26.3: init %ptr.454 = initialize_from %B2.vtable_ptr to %.loc20_26.2 [concrete = constants.%B2.vtable_ptr] // CHECK:STDOUT: %.loc20_26.4: init %B1 = class_init (%.loc20_26.3), %.loc20_27.2 [concrete = constants.%B1.val.d2f] // CHECK:STDOUT: %.loc20_27.3: init %B1 = converted %.loc20_26.1, %.loc20_26.4 [concrete = constants.%B1.val.d2f] // CHECK:STDOUT: %.loc20_27.4: init %B2 = class_init (%.loc20_27.3), %b2.var [concrete = constants.%B2.val.e9e] @@ -1512,7 +1521,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %.loc21_35.2: ref %B2 = class_element_access %c.var, element0 // CHECK:STDOUT: %.loc21_34.2: ref %B1 = class_element_access %.loc21_35.2, element0 // CHECK:STDOUT: %.loc21_33.2: ref %ptr.454 = class_element_access %.loc21_34.2, element0 -// CHECK:STDOUT: %.loc21_33.3: init %ptr.454 = initialize_from @C.%vtable_ptr to %.loc21_33.2 [concrete = constants.%C.vtable_ptr] +// CHECK:STDOUT: %C.vtable_ptr: ref %ptr.454 = vtable_ptr @C.vtable [concrete = constants.%C.vtable_ptr] +// CHECK:STDOUT: %.loc21_33.3: init %ptr.454 = initialize_from %C.vtable_ptr to %.loc21_33.2 [concrete = constants.%C.vtable_ptr] // CHECK:STDOUT: %.loc21_33.4: init %B1 = class_init (%.loc21_33.3), %.loc21_34.2 [concrete = constants.%B1.val.b9d] // CHECK:STDOUT: %.loc21_34.3: init %B1 = converted %.loc21_33.1, %.loc21_33.4 [concrete = constants.%B1.val.b9d] // CHECK:STDOUT: %.loc21_34.4: init %B2 = class_init (%.loc21_34.3), %.loc21_35.2 [concrete = constants.%B2.val.426] @@ -1632,7 +1642,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op.type: type = fn_type @Base.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr.m1.m2: type = struct_type {.: %ptr.454, .m1: %i32, .m2: %i32} [concrete] // CHECK:STDOUT: %complete_type.cf7: = complete_type_witness %struct_type.vptr.m1.m2 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -1656,6 +1666,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %struct_type.m2.m1.68c: type = struct_type {.m2: %i32, .m1: %i32} [concrete] +// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %struct_type.m2.m1.5f2: type = struct_type {.m2: Core.IntLiteral, .m1: Core.IntLiteral} [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e6: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.956 [concrete] @@ -1733,10 +1744,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Base.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.ae4] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr.m1.m2 [concrete = constants.%complete_type.cf7] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -1782,7 +1793,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %i.ref.loc13_34: ref %i32 = name_ref i, %i // CHECK:STDOUT: %.loc13_35.1: %struct_type.m2.m1.68c = struct_literal (%i.ref.loc13_25, %i.ref.loc13_34) // CHECK:STDOUT: %.loc13_35.2: ref %ptr.454 = class_element_access %b1.var, element0 -// CHECK:STDOUT: %.loc13_35.3: init %ptr.454 = initialize_from @Base.%vtable_ptr to %.loc13_35.2 [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %Base.vtable_ptr.loc13: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %.loc13_35.3: init %ptr.454 = initialize_from %Base.vtable_ptr.loc13 to %.loc13_35.2 [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %.loc13_34: %i32 = bind_value %i.ref.loc13_34 // CHECK:STDOUT: %.loc13_35.4: ref %i32 = class_element_access %b1.var, element2 // CHECK:STDOUT: %.loc13_35.5: init %i32 = initialize_from %.loc13_34 to %.loc13_35.4 @@ -1803,7 +1815,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %.loc14_35.1: %struct_type.m2.m1.5f2 = struct_literal (%int_3.loc14, %int_5) // CHECK:STDOUT: %.loc14_35.2: ref %ptr.454 = class_element_access %b2.var, element0 -// CHECK:STDOUT: %.loc14_35.3: init %ptr.454 = initialize_from @Base.%vtable_ptr to %.loc14_35.2 [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %Base.vtable_ptr.loc14: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %.loc14_35.3: init %ptr.454 = initialize_from %Base.vtable_ptr.loc14 to %.loc14_35.2 [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %impl.elem0.loc14_35.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.956] // CHECK:STDOUT: %bound_method.loc14_35.1: = bound_method %int_5, %impl.elem0.loc14_35.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e6] // CHECK:STDOUT: %specific_fn.loc14_35.1: = specific_function %impl.elem0.loc14_35.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -1874,7 +1887,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr.base: type = struct_type {.: %ptr.454, .base: %Base} [concrete] // CHECK:STDOUT: %complete_type.336: = complete_type_witness %struct_type.vptr.base [concrete] // CHECK:STDOUT: } @@ -1958,10 +1971,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e52] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr.base [concrete = constants.%complete_type.336] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -1994,7 +2007,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %AbstractBase.as.Destroy.impl.Op.type: type = fn_type @AbstractBase.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %AbstractBase.as.Destroy.impl.Op: %AbstractBase.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %AbstractBase.vtable_ptr: ref %ptr.454 = vtable_ptr @AbstractBase.vtable [concrete] +// CHECK:STDOUT: %AbstractBase.vtable_decl: ref %ptr.454 = vtable_decl @AbstractBase.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %AbstractIntermediate: type = class_type @AbstractIntermediate [concrete] @@ -2004,7 +2017,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.28b: type = pattern_type %ptr.fd8 [concrete] // CHECK:STDOUT: %AbstractIntermediate.as.Destroy.impl.Op.type: type = fn_type @AbstractIntermediate.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %AbstractIntermediate.as.Destroy.impl.Op: %AbstractIntermediate.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %AbstractIntermediate.vtable_ptr: ref %ptr.454 = vtable_ptr @AbstractIntermediate.vtable [concrete] +// CHECK:STDOUT: %AbstractIntermediate.vtable_decl: ref %ptr.454 = vtable_decl @AbstractIntermediate.vtable [concrete] // CHECK:STDOUT: %struct_type.base.efd: type = struct_type {.base: %AbstractBase} [concrete] // CHECK:STDOUT: %complete_type.2d3: = complete_type_witness %struct_type.base.efd [concrete] // CHECK:STDOUT: %Derived: type = class_type @Derived [concrete] @@ -2017,7 +2030,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.605: type = pattern_type %ptr.404 [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.da5: type = struct_type {.base: %AbstractIntermediate} [concrete] // CHECK:STDOUT: %complete_type.f8c: = complete_type_witness %struct_type.base.da5 [concrete] // CHECK:STDOUT: } @@ -2105,10 +2118,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @AbstractBase.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@AbstractBase.as.Destroy.impl.%AbstractBase.as.Destroy.impl.Op.decl), @AbstractBase.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.ac3] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @AbstractBase.vtable [concrete = constants.%AbstractBase.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @AbstractBase.vtable [concrete = constants.%AbstractBase.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AbstractBase @@ -2122,10 +2135,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @AbstractIntermediate.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@AbstractIntermediate.as.Destroy.impl.%AbstractIntermediate.as.Destroy.impl.Op.decl), @AbstractIntermediate.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.93a] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @AbstractIntermediate.vtable [concrete = constants.%AbstractIntermediate.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @AbstractIntermediate.vtable [concrete = constants.%AbstractIntermediate.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.efd [concrete = constants.%complete_type.2d3] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AbstractIntermediate @@ -2149,10 +2162,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e52] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.da5 [concrete = constants.%complete_type.f8c] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -2199,7 +2212,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %VirtualBase.as.Destroy.impl.Op.type: type = fn_type @VirtualBase.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %VirtualBase.as.Destroy.impl.Op: %VirtualBase.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %VirtualBase.vtable_ptr: ref %ptr.454 = vtable_ptr @VirtualBase.vtable [concrete] +// CHECK:STDOUT: %VirtualBase.vtable_decl: ref %ptr.454 = vtable_decl @VirtualBase.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %VirtualIntermediate: type = class_type @VirtualIntermediate [concrete] @@ -2209,7 +2222,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.906: type = pattern_type %ptr.7dc [concrete] // CHECK:STDOUT: %VirtualIntermediate.as.Destroy.impl.Op.type: type = fn_type @VirtualIntermediate.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %VirtualIntermediate.as.Destroy.impl.Op: %VirtualIntermediate.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %VirtualIntermediate.vtable_ptr: ref %ptr.454 = vtable_ptr @VirtualIntermediate.vtable [concrete] +// CHECK:STDOUT: %VirtualIntermediate.vtable_decl: ref %ptr.454 = vtable_decl @VirtualIntermediate.vtable [concrete] // CHECK:STDOUT: %struct_type.base.61e: type = struct_type {.base: %VirtualBase} [concrete] // CHECK:STDOUT: %complete_type.f09: = complete_type_witness %struct_type.base.61e [concrete] // CHECK:STDOUT: %Derived: type = class_type @Derived [concrete] @@ -2222,7 +2235,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.605: type = pattern_type %ptr.404 [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.43c: type = struct_type {.base: %VirtualIntermediate} [concrete] // CHECK:STDOUT: %complete_type.fa6: = complete_type_witness %struct_type.base.43c [concrete] // CHECK:STDOUT: } @@ -2310,10 +2323,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @VirtualBase.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@VirtualBase.as.Destroy.impl.%VirtualBase.as.Destroy.impl.Op.decl), @VirtualBase.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.8a3] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @VirtualBase.vtable [concrete = constants.%VirtualBase.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @VirtualBase.vtable [concrete = constants.%VirtualBase.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%VirtualBase @@ -2327,10 +2340,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @VirtualIntermediate.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@VirtualIntermediate.as.Destroy.impl.%VirtualIntermediate.as.Destroy.impl.Op.decl), @VirtualIntermediate.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.3cb] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @VirtualIntermediate.vtable [concrete = constants.%VirtualIntermediate.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @VirtualIntermediate.vtable [concrete = constants.%VirtualIntermediate.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.61e [concrete = constants.%complete_type.f09] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%VirtualIntermediate @@ -2354,10 +2367,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e52] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.43c [concrete = constants.%complete_type.fa6] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -2404,7 +2417,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op.type: type = fn_type @Base.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %Derived: type = class_type @Derived [concrete] @@ -2422,7 +2435,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.605: type = pattern_type %ptr.404 [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [concrete] // CHECK:STDOUT: %complete_type.15c: = complete_type_witness %struct_type.base [concrete] // CHECK:STDOUT: } @@ -2494,10 +2507,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Base.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.ae4] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -2527,10 +2540,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e52] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base [concrete = constants.%complete_type.15c] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -2594,7 +2607,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op.type: type = fn_type @Base.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %Derived: type = class_type @Derived [concrete] @@ -2607,7 +2620,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.605: type = pattern_type %ptr.404 [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [concrete] // CHECK:STDOUT: %complete_type.15c: = complete_type_witness %struct_type.base [concrete] // CHECK:STDOUT: } @@ -2774,10 +2787,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Base.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.ae4] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -2806,10 +2819,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e52] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base [concrete = constants.%complete_type.15c] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -2869,7 +2882,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %Base.F.specific_fn: = specific_function %Base.F, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: } @@ -2933,7 +2946,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T.loc7_17.1) [symbolic = %Base.F.type (constants.%Base.F.type)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type) = struct_value () [symbolic = %Base.F (constants.%Base.F)] // CHECK:STDOUT: %Base.F.specific_fn.loc13_1.2: = specific_function %Base.F, @Base.F(%T.loc7_17.1) [symbolic = %Base.F.specific_fn.loc13_1.2 (constants.%Base.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc13_1.2: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T.loc7_17.1) [symbolic = %vtable_ptr.loc13_1.2 (constants.%Base.vtable_ptr)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.F.decl: @Base.%Base.F.type (%Base.F.type) = fn_decl @Base.F [symbolic = @Base.%Base.F (constants.%Base.F)] { @@ -2952,10 +2964,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Base.as.Destroy.impl(constants.%T) [symbolic = @Base.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)] // CHECK:STDOUT: %Base.F.specific_fn.loc13_1.1: = specific_function %Base.F.decl, @Base.F(constants.%T) [symbolic = %Base.F.specific_fn.loc13_1.2 (constants.%Base.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc13_1.1: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T) [symbolic = %vtable_ptr.loc13_1.2 (constants.%Base.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc13_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -3039,7 +3051,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %Base.F.specific_fn.892: = specific_function %Base.F.e26, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr.573: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete.97d: = require_complete_type %Base.370 [symbolic] @@ -3051,7 +3063,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.3bf: type = pattern_type %Base.ea5 [concrete] // CHECK:STDOUT: %pattern_type.28b: type = pattern_type %T1 [concrete] // CHECK:STDOUT: %Base.F.specific_fn.210: = specific_function %Base.F.d25, @Base.F(%T1) [concrete] -// CHECK:STDOUT: %Base.vtable_ptr.bfe: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T1) [concrete] // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base.ea5 [concrete] // CHECK:STDOUT: %pattern_type.fb9: type = pattern_type %Derived [concrete] // CHECK:STDOUT: %Derived.F.type: type = fn_type @Derived.F [concrete] @@ -3061,7 +3072,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.605: type = pattern_type %ptr.404 [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.fda: type = struct_type {.base: %Base.ea5} [concrete] // CHECK:STDOUT: %complete_type.65a: = complete_type_witness %struct_type.base.fda [concrete] // CHECK:STDOUT: } @@ -3173,7 +3184,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T.loc7_17.1) [symbolic = %Base.F.type (constants.%Base.F.type.f17)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type.f17) = struct_value () [symbolic = %Base.F (constants.%Base.F.e26)] // CHECK:STDOUT: %Base.F.specific_fn.loc9_1.2: = specific_function %Base.F, @Base.F(%T.loc7_17.1) [symbolic = %Base.F.specific_fn.loc9_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc9_1.2: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T.loc7_17.1) [symbolic = %vtable_ptr.loc9_1.2 (constants.%Base.vtable_ptr.573)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.F.decl: @Base.%Base.F.type (%Base.F.type.f17) = fn_decl @Base.F [symbolic = @Base.%Base.F (constants.%Base.F.e26)] { @@ -3197,10 +3207,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Base.as.Destroy.impl(constants.%T) [symbolic = @Base.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.9f8)] // CHECK:STDOUT: %Base.F.specific_fn.loc9_1.1: = specific_function %Base.F.decl, @Base.F(constants.%T) [symbolic = %Base.F.specific_fn.loc9_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc9_1.1: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T) [symbolic = %vtable_ptr.loc9_1.2 (constants.%Base.vtable_ptr.573)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc9_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base.370 @@ -3232,10 +3242,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e52] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.fda [concrete = constants.%complete_type.65a] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -3297,7 +3307,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.f17 // CHECK:STDOUT: %Base.F => constants.%Base.F.e26 // CHECK:STDOUT: %Base.F.specific_fn.loc9_1.2 => constants.%Base.F.specific_fn.892 -// CHECK:STDOUT: %vtable_ptr.loc9_1.2 => constants.%Base.vtable_ptr.573 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T) { @@ -3331,7 +3340,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.d82 // CHECK:STDOUT: %Base.F => constants.%Base.F.d25 // CHECK:STDOUT: %Base.F.specific_fn.loc9_1.2 => constants.%Base.F.specific_fn.210 -// CHECK:STDOUT: %vtable_ptr.loc9_1.2 => constants.%Base.vtable_ptr.bfe // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T1) { @@ -3486,7 +3494,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.as.Destroy.impl.Op.type: type = fn_type @T1.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %T1.as.Destroy.impl.Op: %T1.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %T1.vtable_ptr: ref %ptr.454 = vtable_ptr @T1.vtable [concrete] +// CHECK:STDOUT: %T1.vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %T2: type = class_type @T2 [concrete] @@ -3498,7 +3506,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness.658: = impl_witness @T2.%Destroy.impl_witness_table [concrete] // CHECK:STDOUT: %T2.as.Destroy.impl.Op.type: type = fn_type @T2.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %T2.as.Destroy.impl.Op: %T2.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %T2.vtable_ptr: ref %ptr.454 = vtable_ptr @T2.vtable [concrete] +// CHECK:STDOUT: %T2.vtable_decl: ref %ptr.454 = vtable_decl @T2.vtable [concrete] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %T1} [concrete] // CHECK:STDOUT: %complete_type.e14: = complete_type_witness %struct_type.base [concrete] // CHECK:STDOUT: } @@ -3571,10 +3579,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @T1.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@T1.as.Destroy.impl.%T1.as.Destroy.impl.Op.decl), @T1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.ccf] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @T1.vtable [concrete = constants.%T1.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete = constants.%T1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%T1 @@ -3600,10 +3608,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @T2.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@T2.as.Destroy.impl.%T2.as.Destroy.impl.Op.decl), @T2.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.658] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @T2.vtable [concrete = constants.%T2.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @T2.vtable [concrete = constants.%T2.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base [concrete = constants.%complete_type.e14] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%T2 @@ -3896,7 +3904,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.as.Destroy.impl.Op: %T1.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %T1.F.specific_fn: = specific_function %T1.F, @T1.F(%T) [symbolic] -// CHECK:STDOUT: %T1.vtable_ptr: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%T) [symbolic] +// CHECK:STDOUT: %T1.vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %T1 [symbolic] @@ -3961,7 +3969,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%T.loc4_15.1) [symbolic = %T1.F.type (constants.%T1.F.type)] // CHECK:STDOUT: %T1.F: @T1.%T1.F.type (%T1.F.type) = struct_value () [symbolic = %T1.F (constants.%T1.F)] // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2: = specific_function %T1.F, @T1.F(%T.loc4_15.1) [symbolic = %T1.F.specific_fn.loc6_1.2 (constants.%T1.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%T.loc4_15.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%T1.vtable_ptr)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T1.F.decl: @T1.%T1.F.type (%T1.F.type) = fn_decl @T1.F [symbolic = @T1.%T1.F (constants.%T1.F)] { @@ -3980,10 +3987,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@T1.as.Destroy.impl.%T1.as.Destroy.impl.Op.decl), @T1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @T1.as.Destroy.impl(constants.%T) [symbolic = @T1.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)] // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.1: = specific_function %T1.F.decl, @T1.F(constants.%T) [symbolic = %T1.F.specific_fn.loc6_1.2 (constants.%T1.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(constants.%T) [symbolic = %vtable_ptr.loc6_1.2 (constants.%T1.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete = constants.%T1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%T1 @@ -4027,7 +4034,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type => constants.%T1.F.type // CHECK:STDOUT: %T1.F => constants.%T1.F // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2 => constants.%T1.F.specific_fn -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%T1.vtable_ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T1.F(constants.%T) { @@ -4074,7 +4080,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.as.Destroy.impl.Op: %T1.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %T1.F.specific_fn: = specific_function %T1.F, @T1.F(%T) [symbolic] -// CHECK:STDOUT: %T1.vtable_ptr: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%T) [symbolic] +// CHECK:STDOUT: %T1.vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete.86d: = require_complete_type %T1 [symbolic] @@ -4140,7 +4146,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%T.loc4_15.1) [symbolic = %T1.F.type (constants.%T1.F.type)] // CHECK:STDOUT: %T1.F: @T1.%T1.F.type (%T1.F.type) = struct_value () [symbolic = %T1.F (constants.%T1.F)] // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2: = specific_function %T1.F, @T1.F(%T.loc4_15.1) [symbolic = %T1.F.specific_fn.loc6_1.2 (constants.%T1.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%T.loc4_15.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%T1.vtable_ptr)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T1.F.decl: @T1.%T1.F.type (%T1.F.type) = fn_decl @T1.F [symbolic = @T1.%T1.F (constants.%T1.F)] { @@ -4164,10 +4169,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@T1.as.Destroy.impl.%T1.as.Destroy.impl.Op.decl), @T1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @T1.as.Destroy.impl(constants.%T) [symbolic = @T1.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)] // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.1: = specific_function %T1.F.decl, @T1.F(constants.%T) [symbolic = %T1.F.specific_fn.loc6_1.2 (constants.%T1.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(constants.%T) [symbolic = %vtable_ptr.loc6_1.2 (constants.%T1.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete = constants.%T1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%T1 @@ -4214,7 +4219,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type => constants.%T1.F.type // CHECK:STDOUT: %T1.F => constants.%T1.F // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2 => constants.%T1.F.specific_fn -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%T1.vtable_ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T1.F(constants.%T) { @@ -4263,7 +4267,7 @@ class T2(G2:! type) { // CHECK:STDOUT: import Modifiers//default // CHECK:STDOUT: } // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] -// CHECK:STDOUT: %Modifiers.import_ref.39e92f.2 = import_ref Modifiers//default, loc6_1, unloaded +// CHECK:STDOUT: %Modifiers.import_ref.3e3fbe.2 = import_ref Modifiers//default, loc6_1, unloaded // CHECK:STDOUT: %Modifiers.import_ref.05e: = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst19 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded @@ -4292,7 +4296,7 @@ class T2(G2:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class @Base [from "modifiers.carbon"] { // CHECK:STDOUT: complete_type_witness = imports.%Modifiers.import_ref.05e -// CHECK:STDOUT: vtable_ptr = imports.%Modifiers.import_ref.39e92f.2 +// CHECK:STDOUT: vtable_decl = imports.%Modifiers.import_ref.3e3fbe.2 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Modifiers.import_ref.1f3 @@ -4318,7 +4322,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %NonGenericBase.as.Destroy.impl.Op.type: type = fn_type @NonGenericBase.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %NonGenericBase.as.Destroy.impl.Op: %NonGenericBase.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] -// CHECK:STDOUT: %NonGenericBase.vtable_ptr: ref %ptr.454 = vtable_ptr @NonGenericBase.vtable [concrete] +// CHECK:STDOUT: %NonGenericBase.vtable_decl: ref %ptr.454 = vtable_decl @NonGenericBase.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] @@ -4340,7 +4344,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %GenericDerived.as.Destroy.impl.Op: %GenericDerived.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %GenericDerived.F2.specific_fn: = specific_function %GenericDerived.F2, @GenericDerived.F2(%T) [symbolic] // CHECK:STDOUT: %GenericDerived.F3.specific_fn: = specific_function %GenericDerived.F3, @GenericDerived.F3(%T) [symbolic] -// CHECK:STDOUT: %GenericDerived.vtable_ptr: ref %ptr.454 = vtable_ptr @GenericDerived.vtable, @GenericDerived(%T) [symbolic] +// CHECK:STDOUT: %GenericDerived.vtable_decl: ref %ptr.454 = vtable_decl @GenericDerived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.432: type = struct_type {.base: %NonGenericBase} [concrete] // CHECK:STDOUT: %complete_type.099: = complete_type_witness %struct_type.base.432 [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %GenericDerived [symbolic] @@ -4437,10 +4441,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @NonGenericBase.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@NonGenericBase.as.Destroy.impl.%NonGenericBase.as.Destroy.impl.Op.decl), @NonGenericBase.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e51] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @NonGenericBase.vtable [concrete = constants.%NonGenericBase.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @NonGenericBase.vtable [concrete = constants.%NonGenericBase.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NonGenericBase @@ -4460,7 +4464,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %GenericDerived.F3: @GenericDerived.%GenericDerived.F3.type (%GenericDerived.F3.type) = struct_value () [symbolic = %GenericDerived.F3 (constants.%GenericDerived.F3)] // CHECK:STDOUT: %GenericDerived.F2.specific_fn.loc13_1.2: = specific_function %GenericDerived.F2, @GenericDerived.F2(%T.loc9_27.1) [symbolic = %GenericDerived.F2.specific_fn.loc13_1.2 (constants.%GenericDerived.F2.specific_fn)] // CHECK:STDOUT: %GenericDerived.F3.specific_fn.loc13_1.2: = specific_function %GenericDerived.F3, @GenericDerived.F3(%T.loc9_27.1) [symbolic = %GenericDerived.F3.specific_fn.loc13_1.2 (constants.%GenericDerived.F3.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc13_1.2: ref %ptr.454 = vtable_ptr @GenericDerived.vtable, @GenericDerived(%T.loc9_27.1) [symbolic = %vtable_ptr.loc13_1.2 (constants.%GenericDerived.vtable_ptr)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %NonGenericBase.ref: type = name_ref NonGenericBase, file.%NonGenericBase.decl [concrete = constants.%NonGenericBase] @@ -4493,10 +4496,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @GenericDerived.as.Destroy.impl(constants.%T) [symbolic = @GenericDerived.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.885)] // CHECK:STDOUT: %GenericDerived.F2.specific_fn.loc13_1.1: = specific_function %GenericDerived.F2.decl, @GenericDerived.F2(constants.%T) [symbolic = %GenericDerived.F2.specific_fn.loc13_1.2 (constants.%GenericDerived.F2.specific_fn)] // CHECK:STDOUT: %GenericDerived.F3.specific_fn.loc13_1.1: = specific_function %GenericDerived.F3.decl, @GenericDerived.F3(constants.%T) [symbolic = %GenericDerived.F3.specific_fn.loc13_1.2 (constants.%GenericDerived.F3.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc13_1.1: ref %ptr.454 = vtable_ptr @GenericDerived.vtable, @GenericDerived(constants.%T) [symbolic = %vtable_ptr.loc13_1.2 (constants.%GenericDerived.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @GenericDerived.vtable [concrete = constants.%GenericDerived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.432 [concrete = constants.%complete_type.099] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc13_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%GenericDerived @@ -4582,7 +4585,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %GenericDerived.F3 => constants.%GenericDerived.F3 // CHECK:STDOUT: %GenericDerived.F2.specific_fn.loc13_1.2 => constants.%GenericDerived.F2.specific_fn // CHECK:STDOUT: %GenericDerived.F3.specific_fn.loc13_1.2 => constants.%GenericDerived.F3.specific_fn -// CHECK:STDOUT: %vtable_ptr.loc13_1.2 => constants.%GenericDerived.vtable_ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericDerived.F2(constants.%T) { @@ -4640,7 +4642,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %GenericBase.F1.specific_fn.aea: = specific_function %GenericBase.F1.80a, @GenericBase.F1(%T) [symbolic] // CHECK:STDOUT: %GenericBase.F2.specific_fn.758: = specific_function %GenericBase.F2.414, @GenericBase.F2(%T) [symbolic] -// CHECK:STDOUT: %GenericBase.vtable_ptr.e41: ref %ptr.454 = vtable_ptr @GenericBase.vtable, @GenericBase(%T) [symbolic] +// CHECK:STDOUT: %GenericBase.vtable_decl: ref %ptr.454 = vtable_decl @GenericBase.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %GenericBase.018 [symbolic] @@ -4654,7 +4656,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.7a9: type = pattern_type %GenericBase.f84 [concrete] // CHECK:STDOUT: %GenericBase.F1.specific_fn.094: = specific_function %GenericBase.F1.4d3, @GenericBase.F1(%T1) [concrete] // CHECK:STDOUT: %GenericBase.F2.specific_fn.b8b: = specific_function %GenericBase.F2.d59, @GenericBase.F2(%T1) [concrete] -// CHECK:STDOUT: %GenericBase.vtable_ptr.d41: ref %ptr.454 = vtable_ptr @GenericBase.vtable, @GenericBase(%T1) [concrete] // CHECK:STDOUT: %NonGenericDerived.elem: type = unbound_element_type %NonGenericDerived, %GenericBase.f84 [concrete] // CHECK:STDOUT: %pattern_type.5fc: type = pattern_type %NonGenericDerived [concrete] // CHECK:STDOUT: %NonGenericDerived.F2.type: type = fn_type @NonGenericDerived.F2 [concrete] @@ -4666,7 +4667,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.eb2: type = pattern_type %ptr.821 [concrete] // CHECK:STDOUT: %NonGenericDerived.as.Destroy.impl.Op.type: type = fn_type @NonGenericDerived.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %NonGenericDerived.as.Destroy.impl.Op: %NonGenericDerived.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %NonGenericDerived.vtable_ptr: ref %ptr.454 = vtable_ptr @NonGenericDerived.vtable [concrete] +// CHECK:STDOUT: %NonGenericDerived.vtable_decl: ref %ptr.454 = vtable_decl @NonGenericDerived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.29a: type = struct_type {.base: %GenericBase.f84} [concrete] // CHECK:STDOUT: %complete_type.b6e: = complete_type_witness %struct_type.base.29a [concrete] // CHECK:STDOUT: } @@ -4753,7 +4754,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %GenericBase.F2: @GenericBase.%GenericBase.F2.type (%GenericBase.F2.type.2ca) = struct_value () [symbolic = %GenericBase.F2 (constants.%GenericBase.F2.414)] // CHECK:STDOUT: %GenericBase.F1.specific_fn.loc7_1.2: = specific_function %GenericBase.F1, @GenericBase.F1(%T.loc4_24.1) [symbolic = %GenericBase.F1.specific_fn.loc7_1.2 (constants.%GenericBase.F1.specific_fn.aea)] // CHECK:STDOUT: %GenericBase.F2.specific_fn.loc7_1.2: = specific_function %GenericBase.F2, @GenericBase.F2(%T.loc4_24.1) [symbolic = %GenericBase.F2.specific_fn.loc7_1.2 (constants.%GenericBase.F2.specific_fn.758)] -// CHECK:STDOUT: %vtable_ptr.loc7_1.2: ref %ptr.454 = vtable_ptr @GenericBase.vtable, @GenericBase(%T.loc4_24.1) [symbolic = %vtable_ptr.loc7_1.2 (constants.%GenericBase.vtable_ptr.e41)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %GenericBase.F1.decl: @GenericBase.%GenericBase.F1.type (%GenericBase.F1.type.2af) = fn_decl @GenericBase.F1 [symbolic = @GenericBase.%GenericBase.F1 (constants.%GenericBase.F1.80a)] { @@ -4784,10 +4784,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @GenericBase.as.Destroy.impl(constants.%T) [symbolic = @GenericBase.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.c7e)] // CHECK:STDOUT: %GenericBase.F1.specific_fn.loc7_1.1: = specific_function %GenericBase.F1.decl, @GenericBase.F1(constants.%T) [symbolic = %GenericBase.F1.specific_fn.loc7_1.2 (constants.%GenericBase.F1.specific_fn.aea)] // CHECK:STDOUT: %GenericBase.F2.specific_fn.loc7_1.1: = specific_function %GenericBase.F2.decl, @GenericBase.F2(constants.%T) [symbolic = %GenericBase.F2.specific_fn.loc7_1.2 (constants.%GenericBase.F2.specific_fn.758)] -// CHECK:STDOUT: %vtable_ptr.loc7_1.1: ref %ptr.454 = vtable_ptr @GenericBase.vtable, @GenericBase(constants.%T) [symbolic = %vtable_ptr.loc7_1.2 (constants.%GenericBase.vtable_ptr.e41)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @GenericBase.vtable [concrete = constants.%GenericBase.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc7_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%GenericBase.018 @@ -4823,10 +4823,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @NonGenericDerived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@NonGenericDerived.as.Destroy.impl.%NonGenericDerived.as.Destroy.impl.Op.decl), @NonGenericDerived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.330] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @NonGenericDerived.vtable [concrete = constants.%NonGenericDerived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @NonGenericDerived.vtable [concrete = constants.%NonGenericDerived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.29a [concrete = constants.%complete_type.b6e] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NonGenericDerived @@ -4910,7 +4910,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %GenericBase.F2 => constants.%GenericBase.F2.414 // CHECK:STDOUT: %GenericBase.F1.specific_fn.loc7_1.2 => constants.%GenericBase.F1.specific_fn.aea // CHECK:STDOUT: %GenericBase.F2.specific_fn.loc7_1.2 => constants.%GenericBase.F2.specific_fn.758 -// CHECK:STDOUT: %vtable_ptr.loc7_1.2 => constants.%GenericBase.vtable_ptr.e41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericBase.F1(constants.%T) { @@ -4954,7 +4953,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %GenericBase.F2 => constants.%GenericBase.F2.d59 // CHECK:STDOUT: %GenericBase.F1.specific_fn.loc7_1.2 => constants.%GenericBase.F1.specific_fn.094 // CHECK:STDOUT: %GenericBase.F2.specific_fn.loc7_1.2 => constants.%GenericBase.F2.specific_fn.b8b -// CHECK:STDOUT: %vtable_ptr.loc7_1.2 => constants.%GenericBase.vtable_ptr.d41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericBase.F1(constants.%T1) { @@ -4996,7 +4994,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %Base.F.specific_fn.892: = specific_function %Base.F.e26, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr.573: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete.97d: = require_complete_type %Base.370 [symbolic] @@ -5010,7 +5008,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %ptr.184: type = ptr_type %Base.ea5 [concrete] // CHECK:STDOUT: %pattern_type.04d: type = pattern_type %ptr.184 [concrete] // CHECK:STDOUT: %Base.F.specific_fn.210: = specific_function %Base.F.d25, @Base.F(%T1) [concrete] -// CHECK:STDOUT: %Base.vtable_ptr.bfe: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T1) [concrete] // CHECK:STDOUT: %D1.elem: type = unbound_element_type %D1, %Base.ea5 [concrete] // CHECK:STDOUT: %pattern_type.550: type = pattern_type %D1 [concrete] // CHECK:STDOUT: %D1.F.type: type = fn_type @D1.F [concrete] @@ -5020,7 +5017,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.138: type = pattern_type %ptr.7a4 [concrete] // CHECK:STDOUT: %D1.as.Destroy.impl.Op.type: type = fn_type @D1.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %D1.as.Destroy.impl.Op: %D1.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %D1.vtable_ptr: ref %ptr.454 = vtable_ptr @D1.vtable [concrete] +// CHECK:STDOUT: %D1.vtable_decl: ref %ptr.454 = vtable_decl @D1.vtable [concrete] // CHECK:STDOUT: %struct_type.base.fda: type = struct_type {.base: %Base.ea5} [concrete] // CHECK:STDOUT: %complete_type.65a: = complete_type_witness %struct_type.base.fda [concrete] // CHECK:STDOUT: %complete_type.093: = complete_type_witness %ptr.184 [concrete] @@ -5105,7 +5102,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T.loc4_17.1) [symbolic = %Base.F.type (constants.%Base.F.type.f17)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type.f17) = struct_value () [symbolic = %Base.F (constants.%Base.F.e26)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2: = specific_function %Base.F, @Base.F(%T.loc4_17.1) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T.loc4_17.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr.573)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.F.decl: @Base.%Base.F.type (%Base.F.type.f17) = fn_decl @Base.F [symbolic = @Base.%Base.F (constants.%Base.F.e26)] { @@ -5134,10 +5130,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Base.as.Destroy.impl(constants.%T) [symbolic = @Base.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.9f8)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.1: = specific_function %Base.F.decl, @Base.F(constants.%T) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr.573)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base.370 @@ -5177,10 +5173,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @D1.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@D1.as.Destroy.impl.%D1.as.Destroy.impl.Op.decl), @D1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.087] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @D1.vtable [concrete = constants.%D1.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @D1.vtable [concrete = constants.%D1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.fda [concrete = constants.%complete_type.65a] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D1 @@ -5241,7 +5237,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.f17 // CHECK:STDOUT: %Base.F => constants.%Base.F.e26 // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2 => constants.%Base.F.specific_fn.892 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%Base.vtable_ptr.573 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T) { @@ -5276,7 +5271,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.d82 // CHECK:STDOUT: %Base.F => constants.%Base.F.d25 // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2 => constants.%Base.F.specific_fn.210 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%Base.vtable_ptr.bfe // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T1) { @@ -5316,7 +5310,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %Base.F.specific_fn.892: = specific_function %Base.F.e26, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr.573: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %Base.370 [symbolic] @@ -5326,7 +5320,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.d25: %Base.F.type.d82 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.3bf: type = pattern_type %Base.ea5 [concrete] // CHECK:STDOUT: %Base.F.specific_fn.210: = specific_function %Base.F.d25, @Base.F(%T1) [concrete] -// CHECK:STDOUT: %Base.vtable_ptr.bfe: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T1) [concrete] // CHECK:STDOUT: %D1.elem: type = unbound_element_type %D1, %Base.ea5 [concrete] // CHECK:STDOUT: %pattern_type.550: type = pattern_type %D1 [concrete] // CHECK:STDOUT: %ptr.63e: type = ptr_type %T2 [concrete] @@ -5338,7 +5331,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.138: type = pattern_type %ptr.7a4 [concrete] // CHECK:STDOUT: %D1.as.Destroy.impl.Op.type: type = fn_type @D1.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %D1.as.Destroy.impl.Op: %D1.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %D1.vtable_ptr: ref %ptr.454 = vtable_ptr @D1.vtable [concrete] +// CHECK:STDOUT: %D1.vtable_decl: ref %ptr.454 = vtable_decl @D1.vtable [concrete] // CHECK:STDOUT: %struct_type.base.fda: type = struct_type {.base: %Base.ea5} [concrete] // CHECK:STDOUT: %complete_type.65a: = complete_type_witness %struct_type.base.fda [concrete] // CHECK:STDOUT: } @@ -5428,7 +5421,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T.loc7_17.1) [symbolic = %Base.F.type (constants.%Base.F.type.f17)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type.f17) = struct_value () [symbolic = %Base.F (constants.%Base.F.e26)] // CHECK:STDOUT: %Base.F.specific_fn.loc9_1.2: = specific_function %Base.F, @Base.F(%T.loc7_17.1) [symbolic = %Base.F.specific_fn.loc9_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc9_1.2: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T.loc7_17.1) [symbolic = %vtable_ptr.loc9_1.2 (constants.%Base.vtable_ptr.573)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.F.decl: @Base.%Base.F.type (%Base.F.type.f17) = fn_decl @Base.F [symbolic = @Base.%Base.F (constants.%Base.F.e26)] { @@ -5455,10 +5447,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Base.as.Destroy.impl(constants.%T) [symbolic = @Base.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.9f8)] // CHECK:STDOUT: %Base.F.specific_fn.loc9_1.1: = specific_function %Base.F.decl, @Base.F(constants.%T) [symbolic = %Base.F.specific_fn.loc9_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc9_1.1: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T) [symbolic = %vtable_ptr.loc9_1.2 (constants.%Base.vtable_ptr.573)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc9_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base.370 @@ -5493,10 +5485,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @D1.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@D1.as.Destroy.impl.%D1.as.Destroy.impl.Op.decl), @D1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.087] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @D1.vtable [concrete = constants.%D1.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @D1.vtable [concrete = constants.%D1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.fda [concrete = constants.%complete_type.65a] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D1 @@ -5555,7 +5547,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.f17 // CHECK:STDOUT: %Base.F => constants.%Base.F.e26 // CHECK:STDOUT: %Base.F.specific_fn.loc9_1.2 => constants.%Base.F.specific_fn.892 -// CHECK:STDOUT: %vtable_ptr.loc9_1.2 => constants.%Base.vtable_ptr.573 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T) { @@ -5587,7 +5578,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.d82 // CHECK:STDOUT: %Base.F => constants.%Base.F.d25 // CHECK:STDOUT: %Base.F.specific_fn.loc9_1.2 => constants.%Base.F.specific_fn.210 -// CHECK:STDOUT: %vtable_ptr.loc9_1.2 => constants.%Base.vtable_ptr.bfe // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T1) { @@ -5622,7 +5612,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %Base.F.specific_fn: = specific_function %Base.F, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete.97d: = require_complete_type %Base [symbolic] @@ -5641,7 +5631,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op, @Derived.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %Derived.F.specific_fn: = specific_function %Derived.F, @Derived.F(%T) [symbolic] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable, @Derived(%T) [symbolic] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.8ea: type = struct_type {.base: %Base} [symbolic] // CHECK:STDOUT: %complete_type.d5d: = complete_type_witness %struct_type.base.8ea [symbolic] // CHECK:STDOUT: %require_complete.5f4: = require_complete_type %Derived [symbolic] @@ -5743,7 +5733,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T.loc4_21.1) [symbolic = %Base.F.type (constants.%Base.F.type)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type) = struct_value () [symbolic = %Base.F (constants.%Base.F)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2: = specific_function %Base.F, @Base.F(%T.loc4_21.1) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T.loc4_21.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.F.decl: @Base.%Base.F.type (%Base.F.type) = fn_decl @Base.F [symbolic = @Base.%Base.F (constants.%Base.F)] { @@ -5770,10 +5759,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Base.as.Destroy.impl(constants.%T) [symbolic = @Base.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.9f8)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.1: = specific_function %Base.F.decl, @Base.F(constants.%T) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -5793,7 +5782,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.F.type: type = fn_type @Derived.F, @Derived(%T.loc7_15.1) [symbolic = %Derived.F.type (constants.%Derived.F.type)] // CHECK:STDOUT: %Derived.F: @Derived.%Derived.F.type (%Derived.F.type) = struct_value () [symbolic = %Derived.F (constants.%Derived.F)] // CHECK:STDOUT: %Derived.F.specific_fn.loc17_1.2: = specific_function %Derived.F, @Derived.F(%T.loc7_15.1) [symbolic = %Derived.F.specific_fn.loc17_1.2 (constants.%Derived.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc17_1.2: ref %ptr.454 = vtable_ptr @Derived.vtable, @Derived(%T.loc7_15.1) [symbolic = %vtable_ptr.loc17_1.2 (constants.%Derived.vtable_ptr)] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: @Derived.%Base.loc8_22.2 (%Base)} [symbolic = %struct_type.base (constants.%struct_type.base.8ea)] // CHECK:STDOUT: %complete_type.loc17_1.2: = complete_type_witness %struct_type.base [symbolic = %complete_type.loc17_1.2 (constants.%complete_type.d5d)] // CHECK:STDOUT: @@ -5823,10 +5811,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Derived.as.Destroy.impl(constants.%T) [symbolic = @Derived.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.fa7)] // CHECK:STDOUT: %Derived.F.specific_fn.loc17_1.1: = specific_function %Derived.F.decl, @Derived.F(constants.%T) [symbolic = %Derived.F.specific_fn.loc17_1.2 (constants.%Derived.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc17_1.1: ref %ptr.454 = vtable_ptr @Derived.vtable, @Derived(constants.%T) [symbolic = %vtable_ptr.loc17_1.2 (constants.%Derived.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type.loc17_1.1: = complete_type_witness constants.%struct_type.base.8ea [symbolic = %complete_type.loc17_1.2 (constants.%complete_type.d5d)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc17_1.1 -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc17_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -5910,7 +5898,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type // CHECK:STDOUT: %Base.F => constants.%Base.F // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2 => constants.%Base.F.specific_fn -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%Base.vtable_ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T) { @@ -5949,7 +5936,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.F.type => constants.%Derived.F.type // CHECK:STDOUT: %Derived.F => constants.%Derived.F // CHECK:STDOUT: %Derived.F.specific_fn.loc17_1.2 => constants.%Derived.F.specific_fn -// CHECK:STDOUT: %vtable_ptr.loc17_1.2 => constants.%Derived.vtable_ptr // CHECK:STDOUT: %struct_type.base => constants.%struct_type.base.8ea // CHECK:STDOUT: %complete_type.loc17_1.2 => constants.%complete_type.d5d // CHECK:STDOUT: } @@ -6002,7 +5988,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %Base.F.specific_fn.892: = specific_function %Base.F.e26, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr.573: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete.97d: = require_complete_type %Base.370 [symbolic] @@ -6017,7 +6003,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.4a0: type = pattern_type %Base.16b [symbolic] // CHECK:STDOUT: %pattern_type.afe: type = pattern_type %ptr.79f [symbolic] // CHECK:STDOUT: %Base.F.specific_fn.494: = specific_function %Base.F.ad0, @Base.F(%ptr.79f) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr.f98: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%ptr.79f) [symbolic] // CHECK:STDOUT: %require_complete.fce: = require_complete_type %Base.16b [symbolic] // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base.16b [symbolic] // CHECK:STDOUT: %pattern_type.423: type = pattern_type %Derived [symbolic] @@ -6029,7 +6014,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op, @Derived.as.Destroy.impl(%T) [symbolic] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %Derived.F.specific_fn: = specific_function %Derived.F, @Derived.F(%T) [symbolic] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable, @Derived(%T) [symbolic] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.d96: type = struct_type {.base: %Base.16b} [symbolic] // CHECK:STDOUT: %complete_type.5dc: = complete_type_witness %struct_type.base.d96 [symbolic] // CHECK:STDOUT: %require_complete.5f4: = require_complete_type %Derived [symbolic] @@ -6131,7 +6116,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T.loc4_21.1) [symbolic = %Base.F.type (constants.%Base.F.type.f17)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type.f17) = struct_value () [symbolic = %Base.F (constants.%Base.F.e26)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2: = specific_function %Base.F, @Base.F(%T.loc4_21.1) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T.loc4_21.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr.573)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.F.decl: @Base.%Base.F.type (%Base.F.type.f17) = fn_decl @Base.F [symbolic = @Base.%Base.F (constants.%Base.F.e26)] { @@ -6155,10 +6139,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Base.as.Destroy.impl(constants.%T) [symbolic = @Base.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.9f8)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.1: = specific_function %Base.F.decl, @Base.F(constants.%T) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr.573)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base.370 @@ -6179,7 +6163,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.F.type: type = fn_type @Derived.F, @Derived(%T.loc7_15.1) [symbolic = %Derived.F.type (constants.%Derived.F.type)] // CHECK:STDOUT: %Derived.F: @Derived.%Derived.F.type (%Derived.F.type) = struct_value () [symbolic = %Derived.F (constants.%Derived.F)] // CHECK:STDOUT: %Derived.F.specific_fn.loc10_1.2: = specific_function %Derived.F, @Derived.F(%T.loc7_15.1) [symbolic = %Derived.F.specific_fn.loc10_1.2 (constants.%Derived.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc10_1.2: ref %ptr.454 = vtable_ptr @Derived.vtable, @Derived(%T.loc7_15.1) [symbolic = %vtable_ptr.loc10_1.2 (constants.%Derived.vtable_ptr)] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: @Derived.%Base.loc8_23.2 (%Base.16b)} [symbolic = %struct_type.base (constants.%struct_type.base.d96)] // CHECK:STDOUT: %complete_type.loc10_1.2: = complete_type_witness %struct_type.base [symbolic = %complete_type.loc10_1.2 (constants.%complete_type.5dc)] // CHECK:STDOUT: @@ -6213,10 +6196,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Derived.as.Destroy.impl(constants.%T) [symbolic = @Derived.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.fa7)] // CHECK:STDOUT: %Derived.F.specific_fn.loc10_1.1: = specific_function %Derived.F.decl, @Derived.F(constants.%T) [symbolic = %Derived.F.specific_fn.loc10_1.2 (constants.%Derived.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc10_1.1: ref %ptr.454 = vtable_ptr @Derived.vtable, @Derived(constants.%T) [symbolic = %vtable_ptr.loc10_1.2 (constants.%Derived.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type.loc10_1.1: = complete_type_witness constants.%struct_type.base.d96 [symbolic = %complete_type.loc10_1.2 (constants.%complete_type.5dc)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc10_1.1 -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc10_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -6300,7 +6283,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.f17 // CHECK:STDOUT: %Base.F => constants.%Base.F.e26 // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2 => constants.%Base.F.specific_fn.892 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%Base.vtable_ptr.573 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T) { @@ -6339,7 +6321,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Derived.F.type => constants.%Derived.F.type // CHECK:STDOUT: %Derived.F => constants.%Derived.F // CHECK:STDOUT: %Derived.F.specific_fn.loc10_1.2 => constants.%Derived.F.specific_fn -// CHECK:STDOUT: %vtable_ptr.loc10_1.2 => constants.%Derived.vtable_ptr // CHECK:STDOUT: %struct_type.base => constants.%struct_type.base.d96 // CHECK:STDOUT: %complete_type.loc10_1.2 => constants.%complete_type.5dc // CHECK:STDOUT: } @@ -6351,7 +6332,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.5df // CHECK:STDOUT: %Base.F => constants.%Base.F.ad0 // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2 => constants.%Base.F.specific_fn.494 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%Base.vtable_ptr.f98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%ptr.79f) { @@ -6413,7 +6393,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %Base.F.specific_fn.892: = specific_function %Base.F.e26, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr.573: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %T1: type = class_type @T1 [concrete] @@ -6423,7 +6403,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.d25: %Base.F.type.d82 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.3bf: type = pattern_type %Base.ea5 [concrete] // CHECK:STDOUT: %Base.F.specific_fn.210: = specific_function %Base.F.d25, @Base.F(%T1) [concrete] -// CHECK:STDOUT: %Base.vtable_ptr.bfe: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T1) [concrete] // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base.ea5 [concrete] // CHECK:STDOUT: %pattern_type.fb9: type = pattern_type %Derived [concrete] // CHECK:STDOUT: %Derived.F.type: type = fn_type @Derived.F [concrete] @@ -6433,7 +6412,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.605: type = pattern_type %ptr.404 [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op.type: type = fn_type @Derived.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %Derived.as.Destroy.impl.Op: %Derived.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] +// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] // CHECK:STDOUT: %struct_type.base.fda: type = struct_type {.base: %Base.ea5} [concrete] // CHECK:STDOUT: %complete_type.65a: = complete_type_witness %struct_type.base.fda [concrete] // CHECK:STDOUT: } @@ -6517,7 +6496,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T.loc4_21.1) [symbolic = %Base.F.type (constants.%Base.F.type.f17)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type.f17) = struct_value () [symbolic = %Base.F (constants.%Base.F.e26)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2: = specific_function %Base.F, @Base.F(%T.loc4_21.1) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T.loc4_21.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr.573)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.F.decl: @Base.%Base.F.type (%Base.F.type.f17) = fn_decl @Base.F [symbolic = @Base.%Base.F (constants.%Base.F.e26)] { @@ -6536,10 +6514,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Base.as.Destroy.impl(constants.%T) [symbolic = @Base.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.9f8)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.1: = specific_function %Base.F.decl, @Base.F(constants.%T) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr.573)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base.370 @@ -6566,10 +6544,10 @@ class T2(G2:! type) { // CHECK:STDOUT: impl_decl @Derived.as.Destroy.impl [concrete] {} {} // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Derived.as.Destroy.impl.%Derived.as.Destroy.impl.Op.decl), @Derived.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e52] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.base.fda [concrete = constants.%complete_type.65a] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -6644,7 +6622,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.d82 // CHECK:STDOUT: %Base.F => constants.%Base.F.d25 // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2 => constants.%Base.F.specific_fn.210 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%Base.vtable_ptr.bfe // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T1) { @@ -6674,7 +6651,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.as.Destroy.impl.Op: %Base.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %Base.F.specific_fn: = specific_function %Base.F, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T) [symbolic] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %Base [symbolic] @@ -6739,7 +6716,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T.loc4_17.1) [symbolic = %Base.F.type (constants.%Base.F.type)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type) = struct_value () [symbolic = %Base.F (constants.%Base.F)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2: = specific_function %Base.F, @Base.F(%T.loc4_17.1) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T.loc4_17.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.F.decl: @Base.%Base.F.type (%Base.F.type) = fn_decl @Base.F [symbolic = @Base.%Base.F (constants.%Base.F)] { @@ -6758,10 +6734,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Base.as.Destroy.impl.%Base.as.Destroy.impl.Op.decl), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @Base.as.Destroy.impl(constants.%T) [symbolic = @Base.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)] // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.1: = specific_function %Base.F.decl, @Base.F(constants.%T) [symbolic = %Base.F.specific_fn.loc6_1.2 (constants.%Base.F.specific_fn)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T) [symbolic = %vtable_ptr.loc6_1.2 (constants.%Base.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -6805,7 +6781,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type // CHECK:STDOUT: %Base.F => constants.%Base.F // CHECK:STDOUT: %Base.F.specific_fn.loc6_1.2 => constants.%Base.F.specific_fn -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%Base.vtable_ptr // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T) { @@ -6845,19 +6820,17 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.e26: %Base.F.type.f17 = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.9f7: type = pattern_type %Base.370 [symbolic] // CHECK:STDOUT: %Base.F.specific_fn.892: = specific_function %Base.F.e26, @Base.F(%T) [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr.16a6e1.1: ref %ptr.454 = vtable_ptr @Base.vtable.1, @Base(%T) [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Base.370 [symbolic] -// CHECK:STDOUT: %Base.vtable_ptr.16a6e1.2: ref %ptr.454 = vtable_ptr @Base.vtable.2, @Base(%T) [symbolic] // CHECK:STDOUT: %Base.ea5: type = class_type @Base, @Base(%T1) [concrete] // CHECK:STDOUT: %Base.F.type.d82: type = fn_type @Base.F, @Base(%T1) [concrete] // CHECK:STDOUT: %Base.F.d25: %Base.F.type.d82 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.3bf: type = pattern_type %Base.ea5 [concrete] // CHECK:STDOUT: %Base.F.specific_fn.210: = specific_function %Base.F.d25, @Base.F(%T1) [concrete] -// CHECK:STDOUT: %Base.vtable_ptr.e8d: ref %ptr.454 = vtable_ptr @Base.vtable.1, @Base(%T1) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %Base.vtable_ptr.16a6e1.3: ref %ptr.454 = vtable_ptr @Base.vtable.3, @Base(%T) [symbolic] // CHECK:STDOUT: %.b74: ref %ptr.454 = class_element_access file.%v.var, element0 [concrete] -// CHECK:STDOUT: %Base.val: %Base.ea5 = struct_value (%Base.vtable_ptr.e8d) [concrete] +// CHECK:STDOUT: %Base.vtable_decl: ref %ptr.454 = vtable_decl @Base.vtable [concrete] +// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(%T1) [concrete] +// CHECK:STDOUT: %Base.val: %Base.ea5 = struct_value (%Base.vtable_ptr) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -6866,15 +6839,13 @@ class T2(G2:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.03f: ref %ptr.454 = import_ref Main//generic_lib, loc6_1, loaded [symbolic = @Base.%vtable_ptr (constants.%Base.vtable_ptr.16a6e1.3)] +// CHECK:STDOUT: %Main.import_ref.0e5: ref %ptr.454 = import_ref Main//generic_lib, loc6_1, loaded [concrete = constants.%Base.vtable_decl] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//generic_lib, loc4_17, loaded [symbolic = @Base.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.05e: = import_ref Main//generic_lib, loc6_1, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//generic_lib, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e54 = import_ref Main//generic_lib, loc5_30, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//generic_lib, loc4_17, loaded [symbolic = @Base.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.78ad15.1: = import_ref Main//generic_lib, loc6_1, loaded [symbolic = constants.%Base.F.specific_fn.892] -// CHECK:STDOUT: %Main.import_ref.78ad15.2: = import_ref Main//generic_lib, loc6_1, loaded [symbolic = constants.%Base.F.specific_fn.892] -// CHECK:STDOUT: %Main.import_ref.78ad15.3: = import_ref Main//generic_lib, loc6_1, loaded [symbolic = constants.%Base.F.specific_fn.892] +// CHECK:STDOUT: %Main.import_ref.78a: = import_ref Main//generic_lib, loc6_1, loaded [symbolic = constants.%Base.F.specific_fn.892] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -6909,11 +6880,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F, @Base(%T) [symbolic = %Base.F.type (constants.%Base.F.type.f17)] // CHECK:STDOUT: %Base.F: @Base.%Base.F.type (%Base.F.type.f17) = struct_value () [symbolic = %Base.F (constants.%Base.F.e26)] // CHECK:STDOUT: %Base.F.specific_fn: = specific_function %Base.F, @Base.F(%T) [symbolic = %Base.F.specific_fn (constants.%Base.F.specific_fn.892)] -// CHECK:STDOUT: %vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable.1, @Base(%T) [symbolic = %vtable_ptr (constants.%Base.vtable_ptr.16a6e1.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.05e -// CHECK:STDOUT: vtable_ptr = imports.%Main.import_ref.03f +// CHECK:STDOUT: vtable_decl = imports.%Main.import_ref.0e5 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.8e0 @@ -6921,16 +6891,8 @@ class T2(G2:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: vtable @Base.vtable.1 { -// CHECK:STDOUT: imports.%Main.import_ref.78ad15.1 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: vtable @Base.vtable.2 { -// CHECK:STDOUT: imports.%Main.import_ref.78ad15.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: vtable @Base.vtable.3 { -// CHECK:STDOUT: imports.%Main.import_ref.78ad15.3 +// CHECK:STDOUT: vtable @Base.vtable { +// CHECK:STDOUT: imports.%Main.import_ref.78a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic virtual fn @Base.F(imports.%Main.import_ref.5ab3ec.2: type) [from "generic_lib.carbon"] { @@ -6948,7 +6910,8 @@ class T2(G2:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_20.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc7_20.2: ref %ptr.454 = class_element_access file.%v.var, element0 [concrete = constants.%.b74] -// CHECK:STDOUT: %.loc7_20.3: init %ptr.454 = initialize_from constants.%Base.vtable_ptr.e8d to %.loc7_20.2 [concrete = constants.%Base.vtable_ptr.e8d] +// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable, @Base(constants.%T1) [concrete = constants.%Base.vtable_ptr] +// CHECK:STDOUT: %.loc7_20.3: init %ptr.454 = initialize_from %Base.vtable_ptr to %.loc7_20.2 [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %.loc7_20.4: init %Base.ea5 = class_init (%.loc7_20.3), file.%v.var [concrete = constants.%Base.val] // CHECK:STDOUT: %.loc7_1: init %Base.ea5 = converted %.loc7_20.1, %.loc7_20.4 [concrete = constants.%Base.val] // CHECK:STDOUT: assign file.%v.var, %.loc7_1 @@ -6962,7 +6925,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.f17 // CHECK:STDOUT: %Base.F => constants.%Base.F.e26 // CHECK:STDOUT: %Base.F.specific_fn => constants.%Base.F.specific_fn.892 -// CHECK:STDOUT: %vtable_ptr => constants.%Base.vtable_ptr.16a6e1.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T) { @@ -6981,7 +6943,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.F.type => constants.%Base.F.type.d82 // CHECK:STDOUT: %Base.F => constants.%Base.F.d25 // CHECK:STDOUT: %Base.F.specific_fn => constants.%Base.F.specific_fn.210 -// CHECK:STDOUT: %vtable_ptr => constants.%Base.vtable_ptr.e8d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base.F(constants.%T1) { @@ -7014,7 +6975,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.as.Destroy.impl.Op: %T1.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %T1.F.specific_fn.1e2a8c.1: = specific_function %T1.F.0df085.1, @T1.F(%G1) [symbolic] -// CHECK:STDOUT: %T1.vtable_ptr.b5fc91.1: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%G1) [symbolic] +// CHECK:STDOUT: %T1.vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete.86d019.1: = require_complete_type %T1.18aea2.1 [symbolic] @@ -7027,7 +6988,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.0df085.2: %T1.F.type.ebcc3f.2 = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.48ecf1.2: type = pattern_type %T1.18aea2.2 [symbolic] // CHECK:STDOUT: %T1.F.specific_fn.1e2a8c.2: = specific_function %T1.F.0df085.2, @T1.F(%G2) [symbolic] -// CHECK:STDOUT: %T1.vtable_ptr.b5fc91.2: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%G2) [symbolic] // CHECK:STDOUT: %require_complete.86d019.2: = require_complete_type %T1.18aea2.2 [symbolic] // CHECK:STDOUT: %T2.elem: type = unbound_element_type %T2, %T1.18aea2.2 [symbolic] // CHECK:STDOUT: %Destroy.impl_witness.fb2: = impl_witness @T2.%Destroy.impl_witness_table, @T2.as.Destroy.impl(%G2) [symbolic] @@ -7035,7 +6995,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.8f6: type = pattern_type %ptr.112 [symbolic] // CHECK:STDOUT: %T2.as.Destroy.impl.Op.type: type = fn_type @T2.as.Destroy.impl.Op, @T2.as.Destroy.impl(%G2) [symbolic] // CHECK:STDOUT: %T2.as.Destroy.impl.Op: %T2.as.Destroy.impl.Op.type = struct_value () [symbolic] -// CHECK:STDOUT: %T2.vtable_ptr: ref %ptr.454 = vtable_ptr @T2.vtable, @T2(%G2) [symbolic] +// CHECK:STDOUT: %T2.vtable_decl: ref %ptr.454 = vtable_decl @T2.vtable [concrete] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %T1.18aea2.2} [symbolic] // CHECK:STDOUT: %complete_type.987: = complete_type_witness %struct_type.base [symbolic] // CHECK:STDOUT: } @@ -7135,7 +7095,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%G1.loc4_15.1) [symbolic = %T1.F.type (constants.%T1.F.type.ebcc3f.1)] // CHECK:STDOUT: %T1.F: @T1.%T1.F.type (%T1.F.type.ebcc3f.1) = struct_value () [symbolic = %T1.F (constants.%T1.F.0df085.1)] // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2: = specific_function %T1.F, @T1.F(%G1.loc4_15.1) [symbolic = %T1.F.specific_fn.loc6_1.2 (constants.%T1.F.specific_fn.1e2a8c.1)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%G1.loc4_15.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%T1.vtable_ptr.b5fc91.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T1.F.decl: @T1.%T1.F.type (%T1.F.type.ebcc3f.1) = fn_decl @T1.F [symbolic = @T1.%T1.F (constants.%T1.F.0df085.1)] { @@ -7154,10 +7113,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@T1.as.Destroy.impl.%T1.as.Destroy.impl.Op.decl), @T1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @T1.as.Destroy.impl(constants.%G1) [symbolic = @T1.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.fdd)] // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.1: = specific_function %T1.F.decl, @T1.F(constants.%G1) [symbolic = %T1.F.specific_fn.loc6_1.2 (constants.%T1.F.specific_fn.1e2a8c.1)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(constants.%G1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%T1.vtable_ptr.b5fc91.1)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete = constants.%T1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%T1.18aea2.1 @@ -7176,7 +7135,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%G2.loc8_10.1) [symbolic = %T1.F.type (constants.%T1.F.type.ebcc3f.2)] // CHECK:STDOUT: %T1.F: @T2.%T1.F.type (%T1.F.type.ebcc3f.2) = struct_value () [symbolic = %T1.F (constants.%T1.F.0df085.2)] // CHECK:STDOUT: %T1.F.specific_fn.loc10_1.2: = specific_function %T1.F, @T1.F(%G2.loc8_10.1) [symbolic = %T1.F.specific_fn.loc10_1.2 (constants.%T1.F.specific_fn.1e2a8c.2)] -// CHECK:STDOUT: %vtable_ptr.loc10_1.2: ref %ptr.454 = vtable_ptr @T2.vtable, @T2(%G2.loc8_10.1) [symbolic = %vtable_ptr.loc10_1.2 (constants.%T2.vtable_ptr)] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: @T2.%T1.loc9_21.2 (%T1.18aea2.2)} [symbolic = %struct_type.base (constants.%struct_type.base)] // CHECK:STDOUT: %complete_type.loc10_1.2: = complete_type_witness %struct_type.base [symbolic = %complete_type.loc10_1.2 (constants.%complete_type.987)] // CHECK:STDOUT: @@ -7190,10 +7148,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@T2.as.Destroy.impl.%T2.as.Destroy.impl.Op.decl), @T2.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @T2.as.Destroy.impl(constants.%G2) [symbolic = @T2.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.fb2)] // CHECK:STDOUT: %T1.F.specific_fn.loc10_1.1: = specific_function constants.%T1.F.0df085.2, @T1.F(constants.%G2) [symbolic = %T1.F.specific_fn.loc10_1.2 (constants.%T1.F.specific_fn.1e2a8c.2)] -// CHECK:STDOUT: %vtable_ptr.loc10_1.1: ref %ptr.454 = vtable_ptr @T2.vtable, @T2(constants.%G2) [symbolic = %vtable_ptr.loc10_1.2 (constants.%T2.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @T2.vtable [concrete = constants.%T2.vtable_decl] // CHECK:STDOUT: %complete_type.loc10_1.1: = complete_type_witness constants.%struct_type.base [symbolic = %complete_type.loc10_1.2 (constants.%complete_type.987)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc10_1.1 -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc10_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%T2 @@ -7255,7 +7213,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type => constants.%T1.F.type.ebcc3f.1 // CHECK:STDOUT: %T1.F => constants.%T1.F.0df085.1 // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2 => constants.%T1.F.specific_fn.1e2a8c.1 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%T1.vtable_ptr.b5fc91.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T1.F(constants.%G1) { @@ -7291,7 +7248,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type => constants.%T1.F.type.ebcc3f.2 // CHECK:STDOUT: %T1.F => constants.%T1.F.0df085.2 // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2 => constants.%T1.F.specific_fn.1e2a8c.2 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%T1.vtable_ptr.b5fc91.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T1.F(constants.%G2) { @@ -7337,7 +7293,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.as.Destroy.impl.Op: %T1.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] // CHECK:STDOUT: %T1.F.specific_fn.1e2a8c.1: = specific_function %T1.F.0df085.1, @T1.F(%G1) [symbolic] -// CHECK:STDOUT: %T1.vtable_ptr.b5fc91.1: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%G1) [symbolic] +// CHECK:STDOUT: %T1.vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] // CHECK:STDOUT: %require_complete.86d019.1: = require_complete_type %T1.18aea2.1 [symbolic] @@ -7351,7 +7307,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.0df085.2: %T1.F.type.ebcc3f.2 = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.48ecf1.2: type = pattern_type %T1.18aea2.2 [symbolic] // CHECK:STDOUT: %T1.F.specific_fn.1e2a8c.2: = specific_function %T1.F.0df085.2, @T1.F(%G2) [symbolic] -// CHECK:STDOUT: %T1.vtable_ptr.b5fc91.2: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%G2) [symbolic] // CHECK:STDOUT: %require_complete.86d019.2: = require_complete_type %T1.18aea2.2 [symbolic] // CHECK:STDOUT: %T3.elem: type = unbound_element_type %T3, %T1.18aea2.2 [symbolic] // CHECK:STDOUT: %Destroy.impl_witness.7f3: = impl_witness @T3.%Destroy.impl_witness_table, @T3.as.Destroy.impl(%G2) [symbolic] @@ -7359,7 +7314,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %pattern_type.753: type = pattern_type %ptr.625 [symbolic] // CHECK:STDOUT: %T3.as.Destroy.impl.Op.type: type = fn_type @T3.as.Destroy.impl.Op, @T3.as.Destroy.impl(%G2) [symbolic] // CHECK:STDOUT: %T3.as.Destroy.impl.Op: %T3.as.Destroy.impl.Op.type = struct_value () [symbolic] -// CHECK:STDOUT: %T3.vtable_ptr: ref %ptr.454 = vtable_ptr @T3.vtable, @T3(%G2) [symbolic] +// CHECK:STDOUT: %T3.vtable_decl: ref %ptr.454 = vtable_decl @T3.vtable [concrete] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %T1.18aea2.2} [symbolic] // CHECK:STDOUT: %complete_type.987: = complete_type_witness %struct_type.base [symbolic] // CHECK:STDOUT: %Destroy.impl_witness.fb2: = impl_witness @T2.%Destroy.impl_witness_table, @T2.as.Destroy.impl(%G2) [symbolic] @@ -7495,7 +7450,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%G1.loc4_15.1) [symbolic = %T1.F.type (constants.%T1.F.type.ebcc3f.1)] // CHECK:STDOUT: %T1.F: @T1.%T1.F.type (%T1.F.type.ebcc3f.1) = struct_value () [symbolic = %T1.F (constants.%T1.F.0df085.1)] // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2: = specific_function %T1.F, @T1.F(%G1.loc4_15.1) [symbolic = %T1.F.specific_fn.loc6_1.2 (constants.%T1.F.specific_fn.1e2a8c.1)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.2: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(%G1.loc4_15.1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%T1.vtable_ptr.b5fc91.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T1.F.decl: @T1.%T1.F.type (%T1.F.type.ebcc3f.1) = fn_decl @T1.F [symbolic = @T1.%T1.F (constants.%T1.F.0df085.1)] { @@ -7514,10 +7468,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@T1.as.Destroy.impl.%T1.as.Destroy.impl.Op.decl), @T1.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @T1.as.Destroy.impl(constants.%G1) [symbolic = @T1.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.fdd)] // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.1: = specific_function %T1.F.decl, @T1.F(constants.%G1) [symbolic = %T1.F.specific_fn.loc6_1.2 (constants.%T1.F.specific_fn.1e2a8c.1)] -// CHECK:STDOUT: %vtable_ptr.loc6_1.1: ref %ptr.454 = vtable_ptr @T1.vtable, @T1(constants.%G1) [symbolic = %vtable_ptr.loc6_1.2 (constants.%T1.vtable_ptr.b5fc91.1)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @T1.vtable [concrete = constants.%T1.vtable_decl] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type.513] // CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc6_1.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%T1.18aea2.1 @@ -7558,7 +7512,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%G2) [symbolic = %T1.F.type (constants.%T1.F.type.ebcc3f.2)] // CHECK:STDOUT: %T1.F: @T3.%T1.F.type (%T1.F.type.ebcc3f.2) = struct_value () [symbolic = %T1.F (constants.%T1.F.0df085.2)] // CHECK:STDOUT: %T1.F.specific_fn.loc11_3.2: = specific_function %T1.F, @T1.F(%G2) [symbolic = %T1.F.specific_fn.loc11_3.2 (constants.%T1.F.specific_fn.1e2a8c.2)] -// CHECK:STDOUT: %vtable_ptr.loc11_3.2: ref %ptr.454 = vtable_ptr @T3.vtable, @T3(%G2) [symbolic = %vtable_ptr.loc11_3.2 (constants.%T3.vtable_ptr)] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: @T3.%T1.loc10_24.2 (%T1.18aea2.2)} [symbolic = %struct_type.base (constants.%struct_type.base)] // CHECK:STDOUT: %complete_type.loc11_3.2: = complete_type_witness %struct_type.base [symbolic = %complete_type.loc11_3.2 (constants.%complete_type.987)] // CHECK:STDOUT: @@ -7572,10 +7525,10 @@ class T2(G2:! type) { // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@T3.as.Destroy.impl.%T3.as.Destroy.impl.Op.decl), @T3.as.Destroy.impl [concrete] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness %Destroy.impl_witness_table, @T3.as.Destroy.impl(constants.%G2) [symbolic = @T3.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.7f3)] // CHECK:STDOUT: %T1.F.specific_fn.loc11_3.1: = specific_function constants.%T1.F.0df085.2, @T1.F(constants.%G2) [symbolic = %T1.F.specific_fn.loc11_3.2 (constants.%T1.F.specific_fn.1e2a8c.2)] -// CHECK:STDOUT: %vtable_ptr.loc11_3.1: ref %ptr.454 = vtable_ptr @T3.vtable, @T3(constants.%G2) [symbolic = %vtable_ptr.loc11_3.2 (constants.%T3.vtable_ptr)] +// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @T3.vtable [concrete = constants.%T3.vtable_decl] // CHECK:STDOUT: %complete_type.loc11_3.1: = complete_type_witness constants.%struct_type.base [symbolic = %complete_type.loc11_3.2 (constants.%complete_type.987)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc11_3.1 -// CHECK:STDOUT: vtable_ptr = %vtable_ptr.loc11_3.1 +// CHECK:STDOUT: vtable_decl = %vtable_decl // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%T3 @@ -7648,7 +7601,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type => constants.%T1.F.type.ebcc3f.1 // CHECK:STDOUT: %T1.F => constants.%T1.F.0df085.1 // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2 => constants.%T1.F.specific_fn.1e2a8c.1 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%T1.vtable_ptr.b5fc91.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T1.F(constants.%G1) { @@ -7686,7 +7638,6 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.F.type => constants.%T1.F.type.ebcc3f.2 // CHECK:STDOUT: %T1.F => constants.%T1.F.0df085.2 // CHECK:STDOUT: %T1.F.specific_fn.loc6_1.2 => constants.%T1.F.specific_fn.1e2a8c.2 -// CHECK:STDOUT: %vtable_ptr.loc6_1.2 => constants.%T1.vtable_ptr.b5fc91.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T1.F(constants.%G2) { diff --git a/toolchain/lower/testdata/class/virtual.carbon b/toolchain/lower/testdata/class/virtual.carbon index b9d8e8e0c606..41495b6d6dd2 100644 --- a/toolchain/lower/testdata/class/virtual.carbon +++ b/toolchain/lower/testdata/class/virtual.carbon @@ -537,7 +537,6 @@ fn Make() { // CHECK:STDOUT: source_filename = "generic_base.carbon" // CHECK:STDOUT: // CHECK:STDOUT: @"_CDerived.Main.$vtable" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.4d2ffa01ebfb7a1d to i64), i64 ptrtoint (ptr @"_CDerived.Main.$vtable" to i64)) to i32)] -// CHECK:STDOUT: @"_CBase.Main.$vtable.4d2ffa01ebfb7a1d" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.4d2ffa01ebfb7a1d to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.4d2ffa01ebfb7a1d" to i64)) to i32)] // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMake.Main() !dbg !4 { // CHECK:STDOUT: entry: diff --git a/toolchain/sem_ir/class.h b/toolchain/sem_ir/class.h index 7ca6cf12eee2..c1e70732600e 100644 --- a/toolchain/sem_ir/class.h +++ b/toolchain/sem_ir/class.h @@ -63,7 +63,7 @@ struct ClassFields { // The virtual function table. `None` if the class has no (direct or // inherited) virtual functions. - InstId vtable_ptr_id = InstId::None; + InstId vtable_decl_id = InstId::None; auto PrintClassFields(llvm::raw_ostream& out) const -> void { out << "self_type_id: " << self_type_id << ", inheritance_kind: "; @@ -82,7 +82,7 @@ struct ClassFields { << ", body_block_id: " << body_block_id << ", adapt_id: " << adapt_id << ", base_id: " << base_id << ", complete_type_witness_id: " << complete_type_witness_id - << ", vtable_ptr_id: " << vtable_ptr_id << "}"; + << ", vtable_decl_id: " << vtable_decl_id << "}"; } }; diff --git a/toolchain/sem_ir/expr_info.cpp b/toolchain/sem_ir/expr_info.cpp index d50f9894db87..7b2098912576 100644 --- a/toolchain/sem_ir/expr_info.cpp +++ b/toolchain/sem_ir/expr_info.cpp @@ -184,6 +184,7 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory { } case VtablePtr::Kind: + case VtableDecl::Kind: return ExprCategory::EphemeralRef; case CARBON_KIND(ClassElementAccess inst): { diff --git a/toolchain/sem_ir/formatter.cpp b/toolchain/sem_ir/formatter.cpp index 66d22b77873d..544e85e7f656 100644 --- a/toolchain/sem_ir/formatter.cpp +++ b/toolchain/sem_ir/formatter.cpp @@ -347,10 +347,10 @@ auto Formatter::FormatClass(ClassId id) -> void { out_ << "complete_type_witness = "; FormatName(class_info.complete_type_witness_id); out_ << "\n"; - if (class_info.vtable_ptr_id.has_value()) { + if (class_info.vtable_decl_id.has_value()) { Indent(); - out_ << "vtable_ptr = "; - FormatName(class_info.vtable_ptr_id); + out_ << "vtable_decl = "; + FormatName(class_info.vtable_decl_id); out_ << "\n"; } diff --git a/toolchain/sem_ir/inst_kind.def b/toolchain/sem_ir/inst_kind.def index 7616655946e1..25ee47be060d 100644 --- a/toolchain/sem_ir/inst_kind.def +++ b/toolchain/sem_ir/inst_kind.def @@ -146,6 +146,7 @@ CARBON_SEM_IR_INST_KIND(ValueParam) CARBON_SEM_IR_INST_KIND(ValueParamPattern) CARBON_SEM_IR_INST_KIND(VarPattern) CARBON_SEM_IR_INST_KIND(VarStorage) +CARBON_SEM_IR_INST_KIND(VtableDecl) CARBON_SEM_IR_INST_KIND(VtableType) CARBON_SEM_IR_INST_KIND(VtablePtr) CARBON_SEM_IR_INST_KIND(WhereExpr) diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index d7e3c10ab37d..b5bb35cddf3e 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -783,14 +783,21 @@ auto InstNamer::NamingContext::NameInst() -> void { AddInstName("complete_type"); return; } + case CARBON_KIND(VtableDecl inst): { + const auto& vtable = sem_ir().vtables().Get(inst.vtable_id); + inst_namer_->MaybePushEntity(inst.vtable_id); + if (inst_namer_->GetScopeFor(vtable.class_id) == scope_id_) { + inst_namer_->MaybePushEntity(vtable.class_id); + AddInstName("vtable_decl"); + } else { + AddEntityNameAndMaybePush(vtable.class_id, ".vtable_decl"); + } + return; + } case CARBON_KIND(VtablePtr inst): { const auto& vtable = sem_ir().vtables().Get(inst.vtable_id); - if (inst_namer_->GetScopeFor(vtable.class_id) == scope_id_) { - inst_namer_->MaybePushEntity(inst.vtable_id); - AddInstName("vtable_ptr"); - } else { - AddEntityNameAndMaybePush(inst.vtable_id, "_ptr"); - } + inst_namer_->MaybePushEntity(inst.vtable_id); + AddEntityNameAndMaybePush(vtable.class_id, ".vtable_ptr"); return; } case ConstType::Kind: { diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index 9449d0b6c294..73e87fbb8069 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -1889,6 +1889,15 @@ struct VtablePtr { SpecificId specific_id; }; +struct VtableDecl { + static constexpr auto Kind = InstKind::VtableDecl.Define( + {.ir_name = "vtable_decl", + .constant_kind = InstConstantKind::Always, + .is_lowered = false}); + TypeId type_id; + VtableId vtable_id; +}; + // An `expr where requirements` expression. struct WhereExpr { static constexpr auto Kind = InstKind::WhereExpr.Define(