From e855f38b8c54b22fde18880be6e52808f1687761 Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Thu, 10 Jul 2025 14:21:19 -0700 Subject: [PATCH] Tag destruction as desugaring (#5790) In `BuildUnaryOperator`, `GetOperatorOpFunction` is treated as desugaring, but `PerformCompoundMemberAccess` and `PerformCall` are not. This treats all of destruction as desugaring. This leads to some instructions being elided, because of `GetOrAddInst` behaviors: > // If the instruction has a desugared location and a constant value, returns > // the constant value's instruction ID. Otherwise, same as AddInst. This changes instructions that previously had a non-desugared location to instead have a desugared location, so if they also have a constant value then the constant value can be used directly. --- toolchain/check/control_flow.cpp | 3 +- toolchain/check/testdata/array/basics.carbon | 108 +- toolchain/check/testdata/array/import.carbon | 20 +- .../testdata/array/index_not_literal.carbon | 20 +- .../array/init_dependent_bound.carbon | 1 - toolchain/check/testdata/as/basics.carbon | 89 +- .../testdata/basics/dump_sem_ir_ranges.carbon | 51 +- .../basics/duplicate_name_same_line.carbon | 29 +- .../testdata/class/access_modifers.carbon | 18 +- .../testdata/class/adapter/adapt_copy.carbon | 126 +-- .../testdata/class/derived_to_base.carbon | 26 +- .../check/testdata/class/destroy_calls.carbon | 165 +-- .../check/testdata/class/fail_abstract.carbon | 1 - .../class/fail_abstract_in_tuple.carbon | 5 - .../testdata/class/fail_addr_self.carbon | 18 +- .../check/testdata/class/field_access.carbon | 39 +- .../class/field_access_in_value.carbon | 39 +- .../testdata/class/generic/import.carbon | 73 +- .../check/testdata/class/generic/init.carbon | 16 +- .../testdata/class/generic/member_type.carbon | 59 +- .../class/generic/method_deduce.carbon | 30 +- toolchain/check/testdata/class/import.carbon | 74 +- .../check/testdata/class/import_base.carbon | 18 +- .../testdata/class/import_member_cycle.carbon | 18 +- .../testdata/class/inheritance_access.carbon | 18 +- toolchain/check/testdata/class/init_as.carbon | 18 +- .../check/testdata/class/init_nested.carbon | 27 +- toolchain/check/testdata/class/local.carbon | 18 +- toolchain/check/testdata/class/method.carbon | 53 +- toolchain/check/testdata/class/nested.carbon | 66 +- .../check/testdata/class/nested_name.carbon | 18 +- .../check/testdata/class/raw_self_type.carbon | 27 +- .../testdata/class/reorder_qualified.carbon | 86 +- toolchain/check/testdata/class/scope.carbon | 27 +- .../check/testdata/class/static_method.carbon | 18 +- .../testdata/class/virtual_modifiers.carbon | 125 +-- toolchain/check/testdata/deduce/array.carbon | 129 +-- .../check/testdata/deduce/generic_type.carbon | 78 +- toolchain/check/testdata/deduce/tuple.carbon | 17 +- .../testdata/deduce/type_operator.carbon | 51 +- .../value_with_type_through_access.carbon | 101 +- .../facet/call_combined_impl_witness.carbon | 18 +- ...t_class_type_to_generic_facet_value.carbon | 17 +- ...rt_class_value_to_facet_value_value.carbon | 18 +- ..._value_to_generic_facet_value_value.carbon | 80 +- ...t_value_as_type_knows_original_type.carbon | 40 +- ..._value_to_generic_facet_value_value.carbon | 30 +- ...convert_facet_value_value_to_itself.carbon | 18 +- ...uction_uses_runtime_type_conversion.carbon | 34 +- toolchain/check/testdata/for/actual.carbon | 58 +- toolchain/check/testdata/for/basic.carbon | 54 +- toolchain/check/testdata/for/pattern.carbon | 241 ++--- .../check/testdata/function/call/alias.carbon | 18 +- .../function/call/fail_not_callable.carbon | 18 +- .../call/fail_return_type_mismatch.carbon | 18 +- .../check/testdata/function/call/i32.carbon | 26 +- .../function/call/more_param_ir.carbon | 26 +- .../function/call/return_implicit.carbon | 18 +- .../fail_import_incomplete_return.carbon | 27 +- .../definition/fail_local_decl.carbon | 27 +- .../testdata/function/generic/call.carbon | 34 +- .../testdata/function/generic/deduce.carbon | 17 +- .../function/generic/return_slot.carbon | 50 +- .../testdata/generic/call_basic_depth.carbon | 46 +- toolchain/check/testdata/generic/local.carbon | 25 +- .../generic/template/unimplemented.carbon | 17 +- toolchain/check/testdata/if_expr/basic.carbon | 26 +- .../if_expr/constant_condition.carbon | 64 +- .../if_expr/fail_partial_constant.carbon | 3 - .../check/testdata/if_expr/struct.carbon | 18 +- .../testdata/impl/extend_impl_generic.carbon | 46 +- .../impl/fail_extend_impl_scope.carbon | 22 +- .../testdata/impl/fail_impl_as_scope.carbon | 22 +- .../impl/fail_impl_bad_assoc_fn.carbon | 39 +- .../impl/generic_redeclaration.carbon | 17 +- toolchain/check/testdata/impl/impl_as.carbon | 18 +- .../check/testdata/impl/impl_thunk.carbon | 60 +- .../check/testdata/impl/import_self.carbon | 22 +- .../check/testdata/impl/import_thunk.carbon | 13 +- .../check/testdata/impl/interface_args.carbon | 30 +- .../impl/lookup/canonical_query_self.carbon | 31 +- .../check/testdata/impl/lookup/generic.carbon | 25 +- .../testdata/impl/lookup/impl_forall.carbon | 25 +- .../check/testdata/impl/lookup/import.carbon | 84 +- .../testdata/impl/lookup/transitive.carbon | 22 +- .../testdata/impl/use_assoc_const.carbon | 21 +- .../check/testdata/index/expr_category.carbon | 64 +- .../testdata/index/fail_expr_category.carbon | 64 +- .../testdata/index/fail_name_not_found.carbon | 18 +- .../interface/compound_member_access.carbon | 44 +- .../testdata/interface/default_fn.carbon | 22 +- .../interface/fail_member_lookup.carbon | 1 - .../testdata/interface/generic_method.carbon | 72 +- .../interop/cpp/function/class.carbon | 160 +-- .../interop/cpp/function/pointer.carbon | 102 +- .../interop/cpp/function/struct.carbon | 160 +-- .../interop/cpp/function/union.carbon | 120 +-- .../check/testdata/interop/cpp/typedef.carbon | 70 +- .../interop/cpp/unsupported_decl_type.carbon | 1 - .../testdata/let/compile_time_bindings.carbon | 54 +- .../merging_with_indirections.carbon | 36 +- .../check/testdata/namespace/shadow.carbon | 35 +- .../testdata/operators/builtin/and.carbon | 57 +- .../operators/builtin/assignment.carbon | 62 +- .../fail_and_or_partial_constant.carbon | 4 - .../fail_assignment_to_non_assignable.carbon | 35 +- .../fail_redundant_compound_access.carbon | 26 +- .../builtin/fail_type_mismatch.carbon | 18 +- .../fail_type_mismatch_assignment.carbon | 26 +- .../testdata/operators/builtin/or.carbon | 57 +- .../operators/builtin/unary_op.carbon | 30 +- .../testdata/operators/overloaded/dec.carbon | 4 +- .../overloaded/fail_assign_non_ref.carbon | 35 +- .../operators/overloaded/fail_no_impl.carbon | 18 +- .../operators/overloaded/implicit_as.carbon | 34 +- .../testdata/operators/overloaded/inc.carbon | 4 +- .../package_expr/fail_not_found.carbon | 18 +- .../check/testdata/package_expr/syntax.carbon | 35 +- .../check/testdata/patterns/underscore.carbon | 18 +- .../testdata/pointer/address_of_deref.carbon | 26 +- .../testdata/pointer/address_of_lvalue.carbon | 81 +- toolchain/check/testdata/pointer/basic.carbon | 38 +- .../pointer/fail_address_of_value.carbon | 30 +- .../fail_return_with_returned_var.carbon | 26 +- .../fail_returned_var_no_return_type.carbon | 36 +- .../return/fail_returned_var_shadow.carbon | 77 +- .../return/fail_returned_var_type.carbon | 18 +- .../return/import_convert_function.carbon | 979 ++++++++---------- .../check/testdata/return/returned_var.carbon | 26 +- .../testdata/return/returned_var_scope.carbon | 86 +- .../struct/literal_member_access.carbon | 18 +- .../struct/nested_struct_in_place.carbon | 39 +- .../testdata/tuple/element_access.carbon | 20 +- .../testdata/tuple/in_place_tuple_init.carbon | 111 +- .../check/testdata/tuple/tuple_pattern.carbon | 85 +- toolchain/check/testdata/var/decl.carbon | 18 +- .../check/testdata/var/decl_with_init.carbon | 18 +- .../testdata/var/fail_duplicate_decl.carbon | 27 +- .../testdata/var/fail_init_with_self.carbon | 18 +- .../var/fail_lookup_outside_scope.carbon | 18 +- .../testdata/var/fail_not_copyable.carbon | 30 +- .../var/fail_storage_is_literal.carbon | 1 - .../var/global_lookup_in_scope.carbon | 18 +- toolchain/check/testdata/var/lookup.carbon | 18 +- toolchain/check/testdata/var/shadowing.carbon | 36 +- .../check/testdata/var/var_pattern.carbon | 165 +-- toolchain/sem_ir/ids_test.cpp | 4 + 147 files changed, 2194 insertions(+), 4883 deletions(-) diff --git a/toolchain/check/control_flow.cpp b/toolchain/check/control_flow.cpp index 8c9035b521c9..8b47f97c8863 100644 --- a/toolchain/check/control_flow.cpp +++ b/toolchain/check/control_flow.cpp @@ -160,7 +160,8 @@ static auto AddCleanupBlock(Context& context) -> void { // TODO: This does the `Destroy` lookup and call at every cleanup block. // Control flow can lead to the same variable being destroyed by multiple // cleanup blocks, so we'll want to avoid this in the future. - BuildUnaryOperator(context, SemIR::LocId(destroy_id), + BuildUnaryOperator(context, + context.insts().GetLocIdForDesugaring(destroy_id), {.interface_name = "Destroy"}, destroy_id); } } diff --git a/toolchain/check/testdata/array/basics.carbon b/toolchain/check/testdata/array/basics.carbon index 9de5f74adc36..615a9334623a 100644 --- a/toolchain/check/testdata/array/basics.carbon +++ b/toolchain/check/testdata/array/basics.carbon @@ -181,29 +181,14 @@ var a: array(1, 1); // CHECK:STDOUT: %tuple.type.14a: type = tuple_type (%tuple.type.734, %tuple.type.734) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.66a: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.734) [concrete] // CHECK:STDOUT: %Op.type.fe9: type = fn_type @Op.2, @impl(%tuple.type.734) [concrete] // CHECK:STDOUT: %Op.ae1: %Op.type.fe9 = struct_value () [concrete] // CHECK:STDOUT: %ptr.dbe: type = ptr_type %tuple.type.734 [concrete] -// CHECK:STDOUT: %Destroy.facet.829: %Destroy.type = facet_value %tuple.type.734, (%Destroy.impl_witness.66a) [concrete] -// CHECK:STDOUT: %.e31: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.829 [concrete] -// CHECK:STDOUT: %Op.specific_fn.80d: = specific_function %Op.ae1, @Op.2(%tuple.type.734) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.9e1: = impl_witness imports.%Destroy.impl_witness_table, @impl(%array_type) [concrete] // CHECK:STDOUT: %Op.type.280: type = fn_type @Op.2, @impl(%array_type) [concrete] // CHECK:STDOUT: %Op.d4f: %Op.type.280 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.d8f: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.9e1) [concrete] -// CHECK:STDOUT: %.b1e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.d8f [concrete] -// CHECK:STDOUT: %Op.specific_fn.04c: = specific_function %Op.d4f, @Op.2(%array_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -239,24 +224,21 @@ var a: array(1, 1); // CHECK:STDOUT: %array_type: type = array_type %int_2, %.loc10_24.2 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %array_type = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0.loc10_41.1: %.e31 = impl_witness_access constants.%Destroy.impl_witness.66a, element0 [concrete = constants.%Op.ae1] -// CHECK:STDOUT: %bound_method.loc10_41.1: = bound_method %.loc10_41.3, %impl.elem0.loc10_41.1 -// CHECK:STDOUT: %specific_fn.loc10_41.1: = specific_function %impl.elem0.loc10_41.1, @Op.2(constants.%tuple.type.734) [concrete = constants.%Op.specific_fn.80d] -// CHECK:STDOUT: %bound_method.loc10_41.2: = bound_method %.loc10_41.3, %specific_fn.loc10_41.1 +// CHECK:STDOUT: %Op.bound.loc10_41.1: = bound_method %.loc10_41.3, constants.%Op.ae1 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_41.1: = bound_method %.loc10_41.3, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_41.1: %ptr.dbe = addr_of %.loc10_41.3 -// CHECK:STDOUT: %no_op.loc10_41.1: init %empty_tuple.type = call %bound_method.loc10_41.2(%addr.loc10_41.1) -// CHECK:STDOUT: %impl.elem0.loc10_41.2: %.e31 = impl_witness_access constants.%Destroy.impl_witness.66a, element0 [concrete = constants.%Op.ae1] -// CHECK:STDOUT: %bound_method.loc10_41.3: = bound_method %.loc10_41.1, %impl.elem0.loc10_41.2 -// CHECK:STDOUT: %specific_fn.loc10_41.2: = specific_function %impl.elem0.loc10_41.2, @Op.2(constants.%tuple.type.734) [concrete = constants.%Op.specific_fn.80d] -// CHECK:STDOUT: %bound_method.loc10_41.4: = bound_method %.loc10_41.1, %specific_fn.loc10_41.2 +// CHECK:STDOUT: %no_op.loc10_41.1: init %empty_tuple.type = call %bound_method.loc10_41.1(%addr.loc10_41.1) +// CHECK:STDOUT: %Op.bound.loc10_41.2: = bound_method %.loc10_41.1, constants.%Op.ae1 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_41.2: = bound_method %.loc10_41.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10_41.2: %ptr.dbe = addr_of %.loc10_41.1 -// CHECK:STDOUT: %no_op.loc10_41.2: init %empty_tuple.type = call %bound_method.loc10_41.4(%addr.loc10_41.2) -// CHECK:STDOUT: %impl.elem0.loc10_3: %.b1e = impl_witness_access constants.%Destroy.impl_witness.9e1, element0 [concrete = constants.%Op.d4f] -// CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %v.var, %impl.elem0.loc10_3 -// CHECK:STDOUT: %specific_fn.loc10_3: = specific_function %impl.elem0.loc10_3, @Op.2(constants.%array_type) [concrete = constants.%Op.specific_fn.04c] -// CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %v.var, %specific_fn.loc10_3 +// CHECK:STDOUT: %no_op.loc10_41.2: init %empty_tuple.type = call %bound_method.loc10_41.2(%addr.loc10_41.2) +// CHECK:STDOUT: %Op.bound.loc10_3: = bound_method %v.var, constants.%Op.d4f +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_3: = bound_method %v.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc10_3: %ptr.c6b = addr_of %v.var -// CHECK:STDOUT: %no_op.loc10_3: init %empty_tuple.type = call %bound_method.loc10_3.2(%addr.loc10_3) +// CHECK:STDOUT: %no_op.loc10_3: init %empty_tuple.type = call %bound_method.loc10_3(%addr.loc10_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -271,28 +253,13 @@ var a: array(1, 1); // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete] // CHECK:STDOUT: %ptr.7fe: type = ptr_type %tuple.type [concrete] // CHECK:STDOUT: %pattern_type.8c1: type = pattern_type %tuple.type [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.5b3: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type) [concrete] // CHECK:STDOUT: %Op.type.073: type = fn_type @Op.2, @impl(%tuple.type) [concrete] // CHECK:STDOUT: %Op.dce: %Op.type.073 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.d28: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness.5b3) [concrete] -// CHECK:STDOUT: %.886: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.d28 [concrete] -// CHECK:STDOUT: %Op.specific_fn.234: = specific_function %Op.dce, @Op.2(%tuple.type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.287: = impl_witness imports.%Destroy.impl_witness_table, @impl(%array_type) [concrete] // CHECK:STDOUT: %Op.type.c60: type = fn_type @Op.2, @impl(%array_type) [concrete] // CHECK:STDOUT: %Op.f81: %Op.type.c60 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.409: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.287) [concrete] -// CHECK:STDOUT: %.b3c: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.409 [concrete] -// CHECK:STDOUT: %Op.specific_fn.29c: = specific_function %Op.f81, @Op.2(%array_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -325,18 +292,16 @@ var a: array(1, 1); // CHECK:STDOUT: %.loc8_21.6: type = converted %.loc8_21.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0.loc8: %.886 = impl_witness_access constants.%Destroy.impl_witness.5b3, element0 [concrete = constants.%Op.dce] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %b.var, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.2(constants.%tuple.type) [concrete = constants.%Op.specific_fn.234] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %b.var, %specific_fn.loc8 +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %b.var, constants.%Op.dce +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc8: = bound_method %b.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8: %ptr.7fe = addr_of %b.var -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc7: %.b3c = impl_witness_access constants.%Destroy.impl_witness.287, element0 [concrete = constants.%Op.f81] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %a.var, %impl.elem0.loc7 -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.2(constants.%array_type) [concrete = constants.%Op.specific_fn.29c] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %a.var, %specific_fn.loc7 +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %a.var, constants.%Op.f81 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc7: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7: %ptr.20b = addr_of %a.var -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -354,29 +319,14 @@ var a: array(1, 1); // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %array_type [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%empty_tuple) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.511: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type) [concrete] // CHECK:STDOUT: %Op.type.23e: type = fn_type @Op.2, @impl(%tuple.type) [concrete] // CHECK:STDOUT: %Op.f19: %Op.type.23e = struct_value () [concrete] // CHECK:STDOUT: %ptr.652: type = ptr_type %tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet.108: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness.511) [concrete] -// CHECK:STDOUT: %.2cd: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.108 [concrete] -// CHECK:STDOUT: %Op.specific_fn.d2b: = specific_function %Op.f19, @Op.2(%tuple.type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.740: = impl_witness imports.%Destroy.impl_witness_table, @impl(%array_type) [concrete] // CHECK:STDOUT: %Op.type.471: type = fn_type @Op.2, @impl(%array_type) [concrete] // CHECK:STDOUT: %Op.688: %Op.type.471 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.682: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.740) [concrete] -// CHECK:STDOUT: %.0ab: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.682 [concrete] -// CHECK:STDOUT: %Op.specific_fn.cae: = specific_function %Op.688, @Op.2(%array_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -405,18 +355,16 @@ var a: array(1, 1); // CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc8_17.2 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %t: ref %array_type = bind_name t, %t.var -// CHECK:STDOUT: %impl.elem0.loc8_27: %.2cd = impl_witness_access constants.%Destroy.impl_witness.511, element0 [concrete = constants.%Op.f19] -// CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %.loc8_27.1, %impl.elem0.loc8_27 -// CHECK:STDOUT: %specific_fn.loc8_27: = specific_function %impl.elem0.loc8_27, @Op.2(constants.%tuple.type) [concrete = constants.%Op.specific_fn.d2b] -// CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %.loc8_27.1, %specific_fn.loc8_27 +// CHECK:STDOUT: %Op.bound.loc8_27: = bound_method %.loc8_27.1, constants.%Op.f19 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc8_27: = bound_method %.loc8_27.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8_27: %ptr.652 = addr_of %.loc8_27.1 -// CHECK:STDOUT: %no_op.loc8_27: init %empty_tuple.type = call %bound_method.loc8_27.2(%addr.loc8_27) -// CHECK:STDOUT: %impl.elem0.loc8_3: %.0ab = impl_witness_access constants.%Destroy.impl_witness.740, element0 [concrete = constants.%Op.688] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %t.var, %impl.elem0.loc8_3 -// CHECK:STDOUT: %specific_fn.loc8_3: = specific_function %impl.elem0.loc8_3, @Op.2(constants.%array_type) [concrete = constants.%Op.specific_fn.cae] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %t.var, %specific_fn.loc8_3 +// CHECK:STDOUT: %no_op.loc8_27: init %empty_tuple.type = call %bound_method.loc8_27(%addr.loc8_27) +// CHECK:STDOUT: %Op.bound.loc8_3: = bound_method %t.var, constants.%Op.688 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc8_3: = bound_method %t.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_3: %ptr.b99 = addr_of %t.var -// CHECK:STDOUT: %no_op.loc8_3: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8_3) +// CHECK:STDOUT: %no_op.loc8_3: init %empty_tuple.type = call %bound_method.loc8_3(%addr.loc8_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index ee3505b08196..1450a6f7c7d7 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -37,23 +37,12 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [concrete] // CHECK:STDOUT: %ptr.830: type = ptr_type %array_type [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.cc7: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.type.b8c: type = fn_type @Op.3, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.552: %Op.type.b8c = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.cc7) [concrete] -// CHECK:STDOUT: %.1ca: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.552, @Op.3(%array_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.F: %F.type = import_ref Main//library, F, loaded [concrete = constants.%F] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%n.param: %i32) -> %i32 { @@ -67,12 +56,11 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc6_15.1: ref %i32 = array_index %.loc6_12.2, %n.ref // CHECK:STDOUT: %.loc6_15.2: %i32 = bind_value %.loc6_15.1 -// CHECK:STDOUT: %impl.elem0: %.1ca = impl_witness_access constants.%Destroy.impl_witness.cc7, element0 [concrete = constants.%Op.552] -// CHECK:STDOUT: %bound_method.loc6_12.1: = bound_method %.loc6_12.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_12.2: = bound_method %.loc6_12.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc6_12.1, constants.%Op.552 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc6_12.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.830 = addr_of %.loc6_12.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc6_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc6_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 1f6150786a34..632c4e46da99 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -82,24 +82,13 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.5d2, %int_2.ef8, %int_3.822) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.14a: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.type.1e4: type = fn_type @Op.3, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.f0b: %Op.type.1e4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.14a) [concrete] -// CHECK:STDOUT: %.9c9: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.f0b, @Op.3(%array_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%arr.param: %array_type, %i.param: %i32) -> %i32 { @@ -164,12 +153,11 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc10_20.15, %.loc10_23.2) // CHECK:STDOUT: %.loc10_25.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc10_25.2: %i32 = converted %F.call, %.loc10_25.1 -// CHECK:STDOUT: %impl.elem0.loc10_20.4: %.9c9 = impl_witness_access constants.%Destroy.impl_witness.14a, element0 [concrete = constants.%Op.f0b] -// CHECK:STDOUT: %bound_method.loc10_20.7: = bound_method %.loc10_20.3, %impl.elem0.loc10_20.4 -// CHECK:STDOUT: %specific_fn.loc10_20.4: = specific_function %impl.elem0.loc10_20.4, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_20.8: = bound_method %.loc10_20.3, %specific_fn.loc10_20.4 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc10_20.3, constants.%Op.f0b +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_20.7: = bound_method %.loc10_20.3, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.f01 = addr_of %.loc10_20.3 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc10_20.8(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc10_20.7(%addr) // CHECK:STDOUT: return %.loc10_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index b8e404ddb4bb..3453fc349c1f 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -223,7 +223,6 @@ fn H() { G(3); } // CHECK:STDOUT: assign %arr.var, // CHECK:STDOUT: // CHECK:STDOUT: %arr: = bind_name arr, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/basics.carbon b/toolchain/check/testdata/as/basics.carbon index 3c6caa92c2fa..d028a867e59d 100644 --- a/toolchain/check/testdata/as/basics.carbon +++ b/toolchain/check/testdata/as/basics.carbon @@ -209,30 +209,15 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.b67: type = tuple_type (%X, %X) [concrete] // CHECK:STDOUT: %pattern_type.bb7: type = pattern_type %tuple.type.b67 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.599: = impl_witness imports.%Destroy.impl_witness_table, @impl(%X) [concrete] // CHECK:STDOUT: %Op.type.9e1: type = fn_type @Op.2, @impl(%X) [concrete] // CHECK:STDOUT: %Op.33a: %Op.type.9e1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d17: type = ptr_type %X [concrete] -// CHECK:STDOUT: %Destroy.facet.177: %Destroy.type = facet_value %X, (%Destroy.impl_witness.599) [concrete] -// CHECK:STDOUT: %.bfc: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.177 [concrete] -// CHECK:STDOUT: %Op.specific_fn.d1f: = specific_function %Op.33a, @Op.2(%X) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.543: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.b67) [concrete] // CHECK:STDOUT: %Op.type.df3: type = fn_type @Op.2, @impl(%tuple.type.b67) [concrete] // CHECK:STDOUT: %Op.279: %Op.type.df3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.120: type = ptr_type %tuple.type.b67 [concrete] -// CHECK:STDOUT: %Destroy.facet.54c: %Destroy.type = facet_value %tuple.type.b67, (%Destroy.impl_witness.543) [concrete] -// CHECK:STDOUT: %.fdd: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.54c [concrete] -// CHECK:STDOUT: %Op.specific_fn.837: = specific_function %Op.279, @Op.2(%tuple.type.b67) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Let() { @@ -264,18 +249,16 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %tuple: %tuple.type.b67 = tuple_value (%.loc13_25.3, %.loc13_33.3) // CHECK:STDOUT: %.loc13_34.2: %tuple.type.b67 = converted %.loc13_34.1, %tuple // CHECK:STDOUT: %a: %tuple.type.b67 = bind_name a, %.loc13_34.2 -// CHECK:STDOUT: %impl.elem0.loc13_33: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc13_33.1: = bound_method %.loc13_33.1, %impl.elem0.loc13_33 -// CHECK:STDOUT: %specific_fn.loc13_33: = specific_function %impl.elem0.loc13_33, @Op.2(constants.%X) [concrete = constants.%Op.specific_fn.d1f] -// CHECK:STDOUT: %bound_method.loc13_33.2: = bound_method %.loc13_33.1, %specific_fn.loc13_33 +// CHECK:STDOUT: %Op.bound.loc13_33: = bound_method %.loc13_33.1, constants.%Op.33a +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc13_33: = bound_method %.loc13_33.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc13_33: %ptr.d17 = addr_of %.loc13_33.1 -// CHECK:STDOUT: %no_op.loc13_33: init %empty_tuple.type = call %bound_method.loc13_33.2(%addr.loc13_33) -// CHECK:STDOUT: %impl.elem0.loc13_25: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc13_25.1: = bound_method %.loc13_25.1, %impl.elem0.loc13_25 -// CHECK:STDOUT: %specific_fn.loc13_25: = specific_function %impl.elem0.loc13_25, @Op.2(constants.%X) [concrete = constants.%Op.specific_fn.d1f] -// CHECK:STDOUT: %bound_method.loc13_25.2: = bound_method %.loc13_25.1, %specific_fn.loc13_25 +// CHECK:STDOUT: %no_op.loc13_33: init %empty_tuple.type = call %bound_method.loc13_33(%addr.loc13_33) +// CHECK:STDOUT: %Op.bound.loc13_25: = bound_method %.loc13_25.1, constants.%Op.33a +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc13_25: = bound_method %.loc13_25.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc13_25: %ptr.d17 = addr_of %.loc13_25.1 -// CHECK:STDOUT: %no_op.loc13_25: init %empty_tuple.type = call %bound_method.loc13_25.2(%addr.loc13_25) +// CHECK:STDOUT: %no_op.loc13_25: init %empty_tuple.type = call %bound_method.loc13_25(%addr.loc13_25) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -307,24 +290,21 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %.loc20_15.3: type = converted %.loc20_15.2, constants.%tuple.type.b67 [concrete = constants.%tuple.type.b67] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %tuple.type.b67 = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0.loc20_34.1: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc20_34.1: = bound_method %tuple.elem1, %impl.elem0.loc20_34.1 -// CHECK:STDOUT: %specific_fn.loc20_34.1: = specific_function %impl.elem0.loc20_34.1, @Op.2(constants.%X) [concrete = constants.%Op.specific_fn.d1f] -// CHECK:STDOUT: %bound_method.loc20_34.2: = bound_method %tuple.elem1, %specific_fn.loc20_34.1 +// CHECK:STDOUT: %Op.bound.loc20_34.1: = bound_method %tuple.elem1, constants.%Op.33a +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc20_34.1: = bound_method %tuple.elem1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc20_34.1: %ptr.d17 = addr_of %tuple.elem1 -// CHECK:STDOUT: %no_op.loc20_34.1: init %empty_tuple.type = call %bound_method.loc20_34.2(%addr.loc20_34.1) -// CHECK:STDOUT: %impl.elem0.loc20_34.2: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc20_34.3: = bound_method %tuple.elem0, %impl.elem0.loc20_34.2 -// CHECK:STDOUT: %specific_fn.loc20_34.2: = specific_function %impl.elem0.loc20_34.2, @Op.2(constants.%X) [concrete = constants.%Op.specific_fn.d1f] -// CHECK:STDOUT: %bound_method.loc20_34.4: = bound_method %tuple.elem0, %specific_fn.loc20_34.2 +// CHECK:STDOUT: %no_op.loc20_34.1: init %empty_tuple.type = call %bound_method.loc20_34.1(%addr.loc20_34.1) +// CHECK:STDOUT: %Op.bound.loc20_34.2: = bound_method %tuple.elem0, constants.%Op.33a +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc20_34.2: = bound_method %tuple.elem0, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc20_34.2: %ptr.d17 = addr_of %tuple.elem0 -// CHECK:STDOUT: %no_op.loc20_34.2: init %empty_tuple.type = call %bound_method.loc20_34.4(%addr.loc20_34.2) -// CHECK:STDOUT: %impl.elem0.loc20_3: %.fdd = impl_witness_access constants.%Destroy.impl_witness.543, element0 [concrete = constants.%Op.279] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %b.var, %impl.elem0.loc20_3 -// CHECK:STDOUT: %specific_fn.loc20_3: = specific_function %impl.elem0.loc20_3, @Op.2(constants.%tuple.type.b67) [concrete = constants.%Op.specific_fn.837] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %b.var, %specific_fn.loc20_3 +// CHECK:STDOUT: %no_op.loc20_34.2: init %empty_tuple.type = call %bound_method.loc20_34.2(%addr.loc20_34.2) +// CHECK:STDOUT: %Op.bound.loc20_3: = bound_method %b.var, constants.%Op.279 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc20_3: = bound_method %b.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc20_3: %ptr.120 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc20_3: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr.loc20_3) +// CHECK:STDOUT: %no_op.loc20_3: init %empty_tuple.type = call %bound_method.loc20_3(%addr.loc20_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -338,22 +318,11 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %pattern_type.1c6: type = pattern_type %ptr.d17 [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.599: = impl_witness imports.%Destroy.impl_witness_table, @impl(%X) [concrete] // CHECK:STDOUT: %Op.type.9e1: type = fn_type @Op.2, @impl(%X) [concrete] // CHECK:STDOUT: %Op.33a: %Op.type.9e1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%Destroy.impl_witness.599) [concrete] -// CHECK:STDOUT: %.bfc: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.33a, @Op.2(%X) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Value(%n.param: %X) { @@ -399,18 +368,16 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: assign %x.var, %Make.call // CHECK:STDOUT: %X.ref.loc24_10: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %x: ref %X = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0.loc24_3.1: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %.loc24, %impl.elem0.loc24_3.1 -// CHECK:STDOUT: %specific_fn.loc24_3.1: = specific_function %impl.elem0.loc24_3.1, @Op.2(constants.%X) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %.loc24, %specific_fn.loc24_3.1 +// CHECK:STDOUT: %Op.bound.loc24_3.1: = bound_method %.loc24, constants.%Op.33a +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %.loc24, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc24_3.1: %ptr.d17 = addr_of %.loc24 -// CHECK:STDOUT: %no_op.loc24_3.1: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24_3.1) -// CHECK:STDOUT: %impl.elem0.loc24_3.2: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc24_3.3: = bound_method %x.var, %impl.elem0.loc24_3.2 -// CHECK:STDOUT: %specific_fn.loc24_3.2: = specific_function %impl.elem0.loc24_3.2, @Op.2(constants.%X) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc24_3.4: = bound_method %x.var, %specific_fn.loc24_3.2 +// CHECK:STDOUT: %no_op.loc24_3.1: init %empty_tuple.type = call %bound_method.loc24_3.1(%addr.loc24_3.1) +// CHECK:STDOUT: %Op.bound.loc24_3.2: = bound_method %x.var, constants.%Op.33a +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %x.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc24_3.2: %ptr.d17 = addr_of %x.var -// CHECK:STDOUT: %no_op.loc24_3.2: init %empty_tuple.type = call %bound_method.loc24_3.4(%addr.loc24_3.2) +// CHECK:STDOUT: %no_op.loc24_3.2: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24_3.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon b/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon index c15cf41e4754..ecba8de2bcc4 100644 --- a/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon +++ b/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon @@ -98,18 +98,9 @@ fn F(); // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A: %A.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] // CHECK:STDOUT: %B: %B.type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] @@ -118,8 +109,6 @@ fn F(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -163,12 +152,11 @@ fn F(); // CHECK:STDOUT: %c.ref.loc20: ref %empty_tuple.type = name_ref c, %c // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc20: %empty_tuple.type = converted %c.ref.loc20, %tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %c.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %c.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %c.var, constants.%Op.ea3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %c.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %c.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc20 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,23 +214,12 @@ fn F(); // CHECK:STDOUT: %C.type: type = fn_type @C [concrete] // CHECK:STDOUT: %C: %C.type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -263,19 +240,17 @@ fn F(); // CHECK:STDOUT: %tuple.loc17: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc17_7.3: %empty_tuple.type = converted %C.call, %tuple.loc17 [concrete = constants.%empty_tuple] // CHECK:STDOUT: -// CHECK:STDOUT: %impl.elem0.loc17: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %.loc17_7.1, %impl.elem0.loc17 -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %.loc17_7.1, %specific_fn.loc17 -// CHECK:STDOUT: %addr.loc17: %ptr.843 = addr_of %.loc17_7.1 -// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17_7.2(%addr.loc17) +// CHECK:STDOUT: %Op.bound.loc17: = bound_method %.loc17_7.1, constants.%Op.ea3 // CHECK:STDOUT: -// CHECK:STDOUT: %impl.elem0.loc13: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc13_7.1: = bound_method %.loc13_7.1, %impl.elem0.loc13 -// CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_7.2: = bound_method %.loc13_7.1, %specific_fn.loc13 +// CHECK:STDOUT: %bound_method.loc17: = bound_method %.loc17_7.1, %Op.specific_fn.1 +// CHECK:STDOUT: %addr.loc17: %ptr.843 = addr_of %.loc17_7.1 +// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17(%addr.loc17) +// CHECK:STDOUT: +// CHECK:STDOUT: %Op.bound.loc13: = bound_method %.loc13_7.1, constants.%Op.ea3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc13: = bound_method %.loc13_7.1, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc13: %ptr.843 = addr_of %.loc13_7.1 -// CHECK:STDOUT: %no_op.loc13: init %empty_tuple.type = call %bound_method.loc13_7.2(%addr.loc13) +// CHECK:STDOUT: %no_op.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/duplicate_name_same_line.carbon b/toolchain/check/testdata/basics/duplicate_name_same_line.carbon index bc5b81c623dc..59fc73dc7dfc 100644 --- a/toolchain/check/testdata/basics/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/basics/duplicate_name_same_line.carbon @@ -25,23 +25,12 @@ fn A() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -75,18 +64,16 @@ fn A() { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !if.done: -// CHECK:STDOUT: %impl.elem0.loc18_25: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc18_25.1: = bound_method %n.var.loc18_25, %impl.elem0.loc18_25 -// CHECK:STDOUT: %specific_fn.loc18_25: = specific_function %impl.elem0.loc18_25, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_25.2: = bound_method %n.var.loc18_25, %specific_fn.loc18_25 +// CHECK:STDOUT: %Op.bound.loc18_25: = bound_method %n.var.loc18_25, constants.%Op.ea3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc18_25: = bound_method %n.var.loc18_25, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18_25: %ptr.843 = addr_of %n.var.loc18_25 -// CHECK:STDOUT: %no_op.loc18_25: init %empty_tuple.type = call %bound_method.loc18_25.2(%addr.loc18_25) -// CHECK:STDOUT: %impl.elem0.loc18_5: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %n.var.loc18_5, %impl.elem0.loc18_5 -// CHECK:STDOUT: %specific_fn.loc18_5: = specific_function %impl.elem0.loc18_5, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_5.2: = bound_method %n.var.loc18_5, %specific_fn.loc18_5 +// CHECK:STDOUT: %no_op.loc18_25: init %empty_tuple.type = call %bound_method.loc18_25(%addr.loc18_25) +// CHECK:STDOUT: %Op.bound.loc18_5: = bound_method %n.var.loc18_5, constants.%Op.ea3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc18_5: = bound_method %n.var.loc18_5, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc18_5: %ptr.843 = addr_of %n.var.loc18_5 -// CHECK:STDOUT: %no_op.loc18_5: init %empty_tuple.type = call %bound_method.loc18_5.2(%addr.loc18_5) +// CHECK:STDOUT: %no_op.loc18_5: init %empty_tuple.type = call %bound_method.loc18_5(%addr.loc18_5) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index dc08aea5a657..c1140af30c34 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -194,16 +194,9 @@ class A { // CHECK:STDOUT: %Run.type: type = fn_type @Run [concrete] // CHECK:STDOUT: %Run: %Run.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.315: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Circle) [concrete] // CHECK:STDOUT: %Op.type.6cf: type = fn_type @Op.3, @impl.49c(%Circle) [concrete] // CHECK:STDOUT: %Op.e38: %Op.type.6cf = struct_value () [concrete] // CHECK:STDOUT: %ptr.54d: type = ptr_type %Circle [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Circle, (%Destroy.impl_witness.315) [concrete] -// CHECK:STDOUT: %.9b5: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e38, @Op.3(%Circle) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -220,8 +213,6 @@ class A { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -345,12 +336,11 @@ class A { // CHECK:STDOUT: %SOME_INTERNAL_CONSTANT.ref: = name_ref SOME_INTERNAL_CONSTANT, [concrete = ] // CHECK:STDOUT: %circle.ref.loc51: %Circle = name_ref circle, %circle // CHECK:STDOUT: %SomeInternalFunction.ref: = name_ref SomeInternalFunction, [concrete = ] -// CHECK:STDOUT: %impl.elem0: %.9b5 = impl_witness_access constants.%Destroy.impl_witness.315, element0 [concrete = constants.%Op.e38] -// CHECK:STDOUT: %bound_method.loc18_36.1: = bound_method %.loc18_36.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%Circle) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_36.2: = bound_method %.loc18_36.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc18_36.1, constants.%Op.e38 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e38, @Op.3(constants.%Circle) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc18_36.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.54d = addr_of %.loc18_36.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_36.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/adapter/adapt_copy.carbon b/toolchain/check/testdata/class/adapter/adapt_copy.carbon index 78a530b5873b..889c619f7c74 100644 --- a/toolchain/check/testdata/class/adapter/adapt_copy.carbon +++ b/toolchain/check/testdata/class/adapter/adapt_copy.carbon @@ -139,16 +139,9 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.a93: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%AdaptCopyable) [concrete] // CHECK:STDOUT: %Op.type.b65: type = fn_type @Op.2, @impl.49c(%AdaptCopyable) [concrete] // CHECK:STDOUT: %Op.f60: %Op.type.b65 = struct_value () [concrete] // CHECK:STDOUT: %ptr.4c1: type = ptr_type %AdaptCopyable [concrete] -// CHECK:STDOUT: %Destroy.facet.279: %Destroy.type = facet_value %AdaptCopyable, (%Destroy.impl_witness.a93) [concrete] -// CHECK:STDOUT: %.6a3: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.279 [concrete] // CHECK:STDOUT: %Op.specific_fn.e4c: = specific_function %Op.f60, @Op.2(%AdaptCopyable) [concrete] // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] @@ -159,11 +152,8 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %InTuple.type: type = fn_type @InTuple [concrete] // CHECK:STDOUT: %InTuple: %InTuple.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.c30: type = ptr_type %tuple.type.2a3 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.d22: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.2a3) [concrete] // CHECK:STDOUT: %Op.type.f33: type = fn_type @Op.2, @impl.49c(%tuple.type.2a3) [concrete] // CHECK:STDOUT: %Op.f7d: %Op.type.f33 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.ced: %Destroy.type = facet_value %tuple.type.2a3, (%Destroy.impl_witness.d22) [concrete] -// CHECK:STDOUT: %.c90: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.ced [concrete] // CHECK:STDOUT: %Op.specific_fn.2af: = specific_function %Op.f7d, @Op.2(%tuple.type.2a3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -177,8 +167,6 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/parts/uint, UInt, loaded [concrete = constants.%UInt.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -253,12 +241,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %d: ref %AdaptCopyable = bind_name d, %d.var // CHECK:STDOUT: %d.ref: ref %AdaptCopyable = name_ref d, %d // CHECK:STDOUT: %.loc12: %AdaptCopyable = bind_value %d.ref -// CHECK:STDOUT: %impl.elem0: %.6a3 = impl_witness_access constants.%Destroy.impl_witness.a93, element0 [concrete = constants.%Op.f60] -// CHECK:STDOUT: %bound_method.loc11_3.1: = bound_method %d.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%AdaptCopyable) [concrete = constants.%Op.specific_fn.e4c] -// CHECK:STDOUT: %bound_method.loc11_3.2: = bound_method %d.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %d.var, constants.%Op.f60 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.f60, @Op.2(constants.%AdaptCopyable) [concrete = constants.%Op.specific_fn.e4c] +// CHECK:STDOUT: %bound_method: = bound_method %d.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.4c1 = addr_of %d.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc11_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -298,12 +285,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc17_10.4: init %u32 = initialize_from %.loc17_10.3 to %tuple.elem1.loc17_10.2 // CHECK:STDOUT: %.loc17_10.5: init %tuple.type.2a3 = tuple_init (%.loc17_10.2, %.loc17_10.4) to %return // CHECK:STDOUT: %.loc17_11: init %tuple.type.2a3 = converted %d.ref, %.loc17_10.5 -// CHECK:STDOUT: %impl.elem0: %.c90 = impl_witness_access constants.%Destroy.impl_witness.d22, element0 [concrete = constants.%Op.f7d] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %d.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%tuple.type.2a3) [concrete = constants.%Op.specific_fn.2af] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %d.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %d.var, constants.%Op.f7d +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.f7d, @Op.2(constants.%tuple.type.2a3) [concrete = constants.%Op.specific_fn.2af] +// CHECK:STDOUT: %bound_method: = bound_method %d.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c30 = addr_of %d.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc17_11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -323,16 +309,9 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2ca: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%AdaptTuple) [concrete] // CHECK:STDOUT: %Op.type.0f1: type = fn_type @Op.2, @impl.49c(%AdaptTuple) [concrete] // CHECK:STDOUT: %Op.621: %Op.type.0f1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.ca3: type = ptr_type %AdaptTuple [concrete] -// CHECK:STDOUT: %Destroy.facet.6e1: %Destroy.type = facet_value %AdaptTuple, (%Destroy.impl_witness.2ca) [concrete] -// CHECK:STDOUT: %.169: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.6e1 [concrete] // CHECK:STDOUT: %Op.specific_fn.283: = specific_function %Op.621, @Op.2(%AdaptTuple) [concrete] // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] @@ -341,12 +320,9 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %pattern_type.c9e: type = pattern_type %tuple.type.f69 [concrete] // CHECK:STDOUT: %InTuple.type: type = fn_type @InTuple [concrete] // CHECK:STDOUT: %InTuple: %InTuple.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.a18: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.f69) [concrete] // CHECK:STDOUT: %Op.type.390: type = fn_type @Op.2, @impl.49c(%tuple.type.f69) [concrete] // CHECK:STDOUT: %Op.d9f: %Op.type.390 = struct_value () [concrete] // CHECK:STDOUT: %ptr.ed5: type = ptr_type %tuple.type.f69 [concrete] -// CHECK:STDOUT: %Destroy.facet.172: %Destroy.type = facet_value %tuple.type.f69, (%Destroy.impl_witness.a18) [concrete] -// CHECK:STDOUT: %.ee3: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.172 [concrete] // CHECK:STDOUT: %Op.specific_fn.20d: = specific_function %Op.d9f, @Op.2(%tuple.type.f69) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -360,8 +336,6 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/parts/uint, UInt, loaded [concrete = constants.%UInt.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -463,12 +437,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc10_11.7: init %tuple.type.d07 = tuple_init (%.loc10_11.4, %.loc10_11.6) to %.loc10_11.3 // CHECK:STDOUT: %.loc10_11.8: init %AdaptTuple = as_compatible %.loc10_11.7 // CHECK:STDOUT: %.loc10_11.9: init %AdaptTuple = converted %d.ref, %.loc10_11.8 -// CHECK:STDOUT: %impl.elem0: %.169 = impl_witness_access constants.%Destroy.impl_witness.2ca, element0 [concrete = constants.%Op.621] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %d.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%AdaptTuple) [concrete = constants.%Op.specific_fn.283] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %d.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %d.var, constants.%Op.621 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.621, @Op.2(constants.%AdaptTuple) [concrete = constants.%Op.specific_fn.283] +// CHECK:STDOUT: %bound_method: = bound_method %d.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ca3 = addr_of %d.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc10_11.9 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -529,12 +502,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.11: init %u32 = initialize_from %.loc15_10.10 to %tuple.elem1.loc15_10.4 // CHECK:STDOUT: %.loc15_10.12: init %tuple.type.f69 = tuple_init (%.loc15_10.9, %.loc15_10.11) to %return // CHECK:STDOUT: %.loc15_11: init %tuple.type.f69 = converted %d.ref, %.loc15_10.12 -// CHECK:STDOUT: %impl.elem0: %.ee3 = impl_witness_access constants.%Destroy.impl_witness.a18, element0 [concrete = constants.%Op.d9f] -// CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %d.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%tuple.type.f69) [concrete = constants.%Op.specific_fn.20d] -// CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %d.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %d.var, constants.%Op.d9f +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d9f, @Op.2(constants.%tuple.type.f69) [concrete = constants.%Op.specific_fn.20d] +// CHECK:STDOUT: %bound_method: = bound_method %d.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ed5 = addr_of %d.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc15_11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -550,16 +522,9 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.b01: = impl_witness imports.%Destroy.impl_witness_table, @impl(%AdaptNoncopyable) [concrete] // CHECK:STDOUT: %Op.type.b79: type = fn_type @Op.2, @impl(%AdaptNoncopyable) [concrete] // CHECK:STDOUT: %Op.77f: %Op.type.b79 = struct_value () [concrete] // CHECK:STDOUT: %ptr.ed9: type = ptr_type %AdaptNoncopyable [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AdaptNoncopyable, (%Destroy.impl_witness.b01) [concrete] -// CHECK:STDOUT: %.1f7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.77f, @Op.2(%AdaptNoncopyable) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -570,8 +535,6 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -632,12 +595,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %b: ref %AdaptNoncopyable = bind_name b, %b.var // CHECK:STDOUT: %b.ref: ref %AdaptNoncopyable = name_ref b, %b // CHECK:STDOUT: %.loc22: %AdaptNoncopyable = bind_value %b.ref -// CHECK:STDOUT: %impl.elem0: %.1f7 = impl_witness_access constants.%Destroy.impl_witness.b01, element0 [concrete = constants.%Op.77f] -// CHECK:STDOUT: %bound_method.loc17_3.1: = bound_method %b.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%AdaptNoncopyable) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_3.2: = bound_method %b.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %b.var, constants.%Op.77f +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.77f, @Op.2(constants.%AdaptNoncopyable) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %b.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ed9 = addr_of %b.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc17_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -660,16 +622,9 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.a9c: = impl_witness imports.%Destroy.impl_witness_table, @impl(%AdaptNoncopyableIndirect) [concrete] // CHECK:STDOUT: %Op.type.b45: type = fn_type @Op.2, @impl(%AdaptNoncopyableIndirect) [concrete] // CHECK:STDOUT: %Op.003: %Op.type.b45 = struct_value () [concrete] // CHECK:STDOUT: %ptr.921: type = ptr_type %AdaptNoncopyableIndirect [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AdaptNoncopyableIndirect, (%Destroy.impl_witness.a9c) [concrete] -// CHECK:STDOUT: %.b9a: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.003, @Op.2(%AdaptNoncopyableIndirect) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -682,8 +637,6 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -763,12 +716,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc28_11.4: init %i32 = initialize_from %.loc28_11.2 to %tuple.elem0.loc28_11.2 // CHECK:STDOUT: %tuple.elem1.loc28: ref %Noncopyable = tuple_access %.loc28_11.1, element1 // CHECK:STDOUT: %.loc28_11.5: %Noncopyable = bind_value %tuple.elem1.loc28 -// CHECK:STDOUT: %impl.elem0: %.b9a = impl_witness_access constants.%Destroy.impl_witness.a9c, element0 [concrete = constants.%Op.003] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %b.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%AdaptNoncopyableIndirect) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %b.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %b.var, constants.%Op.003 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.003, @Op.2(constants.%AdaptNoncopyableIndirect) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %b.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.921 = addr_of %b.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -787,16 +739,9 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %I.type: type = fn_type @I [concrete] // CHECK:STDOUT: %I: %I.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.da6: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%AdaptStruct) [concrete] // CHECK:STDOUT: %Op.type.38c: type = fn_type @Op.2, @impl.49c(%AdaptStruct) [concrete] // CHECK:STDOUT: %Op.d16: %Op.type.38c = struct_value () [concrete] // CHECK:STDOUT: %ptr.e10: type = ptr_type %AdaptStruct [concrete] -// CHECK:STDOUT: %Destroy.facet.94b: %Destroy.type = facet_value %AdaptStruct, (%Destroy.impl_witness.da6) [concrete] -// CHECK:STDOUT: %.cc4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.94b [concrete] // CHECK:STDOUT: %Op.specific_fn.ad6: = specific_function %Op.d16, @Op.2(%AdaptStruct) [concrete] // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] @@ -806,12 +751,9 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %pattern_type.31d: type = pattern_type %tuple.type.80b [concrete] // CHECK:STDOUT: %InTuple.type: type = fn_type @InTuple [concrete] // CHECK:STDOUT: %InTuple: %InTuple.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.c31: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.80b) [concrete] // CHECK:STDOUT: %Op.type.628: type = fn_type @Op.2, @impl.49c(%tuple.type.80b) [concrete] // CHECK:STDOUT: %Op.8ff: %Op.type.628 = struct_value () [concrete] // CHECK:STDOUT: %ptr.b09: type = ptr_type %tuple.type.80b [concrete] -// CHECK:STDOUT: %Destroy.facet.df5: %Destroy.type = facet_value %tuple.type.80b, (%Destroy.impl_witness.c31) [concrete] -// CHECK:STDOUT: %.9ef: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.df5 [concrete] // CHECK:STDOUT: %Op.specific_fn.301: = specific_function %Op.8ff, @Op.2(%tuple.type.80b) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -825,8 +767,6 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/parts/uint, UInt, loaded [concrete = constants.%UInt.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -927,12 +867,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc10_11.11: init %struct_type.e.f = struct_init (%.loc10_11.6, %.loc10_11.10) to %.loc10_11.4 // CHECK:STDOUT: %.loc10_11.12: init %AdaptStruct = as_compatible %.loc10_11.11 // CHECK:STDOUT: %.loc10_11.13: init %AdaptStruct = converted %h.ref, %.loc10_11.12 -// CHECK:STDOUT: %impl.elem0: %.cc4 = impl_witness_access constants.%Destroy.impl_witness.da6, element0 [concrete = constants.%Op.d16] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %h.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%AdaptStruct) [concrete = constants.%Op.specific_fn.ad6] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %h.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %h.var, constants.%Op.d16 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d16, @Op.2(constants.%AdaptStruct) [concrete = constants.%Op.specific_fn.ad6] +// CHECK:STDOUT: %bound_method: = bound_method %h.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.e10 = addr_of %h.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc10_11.13 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -993,12 +932,11 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.15: init %u32 = initialize_from %.loc15_10.14 to %tuple.elem1.loc15_10.2 // CHECK:STDOUT: %.loc15_10.16: init %tuple.type.80b = tuple_init (%.loc15_10.13, %.loc15_10.15) to %return // CHECK:STDOUT: %.loc15_11: init %tuple.type.80b = converted %d.ref, %.loc15_10.16 -// CHECK:STDOUT: %impl.elem0: %.9ef = impl_witness_access constants.%Destroy.impl_witness.c31, element0 [concrete = constants.%Op.8ff] -// CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %d.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%tuple.type.80b) [concrete = constants.%Op.specific_fn.301] -// CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %d.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %d.var, constants.%Op.8ff +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.8ff, @Op.2(constants.%tuple.type.80b) [concrete = constants.%Op.specific_fn.301] +// CHECK:STDOUT: %bound_method: = bound_method %d.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.b09 = addr_of %d.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc15_11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index b750ecf2460d..2505ee8268d6 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -116,15 +116,8 @@ fn ConvertInit() { // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %C.val: %C = struct_value (%B.val, %int_3.822) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.3, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.3(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -141,8 +134,6 @@ fn ConvertInit() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -383,10 +374,10 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc42_48.6: init %i32 = initialize_from %.loc42_48.4 to %.loc42_48.5 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc42_48.7: init %B = class_init (%.loc42_48.3, %.loc42_48.6), %.loc42_57.3 [concrete = constants.%B.val] // CHECK:STDOUT: %.loc42_57.4: init %B = converted %.loc42_48.1, %.loc42_48.7 [concrete = constants.%B.val] -// CHECK:STDOUT: %impl.elem0.loc42_57.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc42_57.1: = bound_method %int_3, %impl.elem0.loc42_57.1 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc42_57.1: = specific_function %impl.elem0.loc42_57.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc42_57.2: = bound_method %int_3, %specific_fn.loc42_57.1 [concrete = constants.%bound_method.047] +// CHECK:STDOUT: %impl.elem0.loc42_57: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc42_57.1: = bound_method %int_3, %impl.elem0.loc42_57 [concrete = constants.%Convert.bound.b30] +// CHECK:STDOUT: %specific_fn.loc42_57: = specific_function %impl.elem0.loc42_57, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc42_57.2: = bound_method %int_3, %specific_fn.loc42_57 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc42_57: init %i32 = call %bound_method.loc42_57.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc42_57.5: init %i32 = converted %int_3, %int.convert_checked.loc42_57 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc42_57.6: ref %i32 = class_element_access %.loc42_57.2, element1 @@ -400,12 +391,11 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc42_59.4: ref %A = converted %.loc42_59.1, %.loc42_59.3 // CHECK:STDOUT: %.loc42_59.5: %A = bind_value %.loc42_59.4 // CHECK:STDOUT: %a: %A = bind_name a, %.loc42_59.5 -// CHECK:STDOUT: %impl.elem0.loc42_57.2: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc42_57.3: = bound_method %.loc42_57.2, %impl.elem0.loc42_57.2 -// CHECK:STDOUT: %specific_fn.loc42_57.2: = specific_function %impl.elem0.loc42_57.2, @Op.3(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc42_57.4: = bound_method %.loc42_57.2, %specific_fn.loc42_57.2 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc42_57.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.3(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc42_57.3: = bound_method %.loc42_57.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc42_57.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc42_57.4(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc42_57.3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index 167fb91ef9e9..f724fde6fa0e 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -276,30 +276,17 @@ fn G() { F({}); } // CHECK:STDOUT: %WithAddr: type = class_type @WithAddr [concrete] // CHECK:STDOUT: %pattern_type.f93: type = pattern_type %WithAddr [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.824: = impl_witness imports.%Destroy.impl_witness_table, @impl(%WithAddr) [concrete] // CHECK:STDOUT: %Op.type.8f4: type = fn_type @Op.2, @impl(%WithAddr) [concrete] // CHECK:STDOUT: %Op.bec: %Op.type.8f4 = struct_value () [concrete] // CHECK:STDOUT: %ptr.b4e: type = ptr_type %WithAddr [concrete] -// CHECK:STDOUT: %Destroy.facet.6cc: %Destroy.type = facet_value %WithAddr, (%Destroy.impl_witness.824) [concrete] -// CHECK:STDOUT: %.372: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.6cc [concrete] // CHECK:STDOUT: %Op.specific_fn.b42: = specific_function %Op.bec, @Op.2(%WithAddr) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.40a: = impl_witness imports.%Destroy.impl_witness_table, @impl(%ExplicitReturn) [concrete] // CHECK:STDOUT: %Op.type.641: type = fn_type @Op.2, @impl(%ExplicitReturn) [concrete] // CHECK:STDOUT: %Op.8e6: %Op.type.641 = struct_value () [concrete] // CHECK:STDOUT: %ptr.b0a: type = ptr_type %ExplicitReturn [concrete] -// CHECK:STDOUT: %Destroy.facet.c42: %Destroy.type = facet_value %ExplicitReturn, (%Destroy.impl_witness.40a) [concrete] -// CHECK:STDOUT: %.b47: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.c42 [concrete] // CHECK:STDOUT: %Op.specific_fn.523: = specific_function %Op.8e6, @Op.2(%ExplicitReturn) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.aaa: = impl_witness imports.%Destroy.impl_witness_table, @impl(%NoAddr) [concrete] // CHECK:STDOUT: %Op.type.73f: type = fn_type @Op.2, @impl(%NoAddr) [concrete] // CHECK:STDOUT: %Op.d78: %Op.type.73f = struct_value () [concrete] // CHECK:STDOUT: %ptr.4b8: type = ptr_type %NoAddr [concrete] -// CHECK:STDOUT: %Destroy.facet.2b6: %Destroy.type = facet_value %NoAddr, (%Destroy.impl_witness.aaa) [concrete] -// CHECK:STDOUT: %.7a4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2b6 [concrete] // CHECK:STDOUT: %Op.specific_fn.8fe: = specific_function %Op.d78, @Op.2(%NoAddr) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -325,8 +312,6 @@ fn G() { F({}); } // CHECK:STDOUT: %Main.import_ref.1cb = import_ref Main//types, loc15_24, unloaded // CHECK:STDOUT: %Main.import_ref.675 = import_ref Main//types, loc16_33, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -392,24 +377,21 @@ fn G() { F({}); } // CHECK:STDOUT: %with_addr.var: ref %WithAddr = var %with_addr.var_patt // CHECK:STDOUT: %WithAddr.ref: type = name_ref WithAddr, imports.%Main.WithAddr [concrete = constants.%WithAddr] // CHECK:STDOUT: %with_addr: ref %WithAddr = bind_name with_addr, %with_addr.var -// CHECK:STDOUT: %impl.elem0.loc8: %.372 = impl_witness_access constants.%Destroy.impl_witness.824, element0 [concrete = constants.%Op.bec] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %with_addr.var, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.2(constants.%WithAddr) [concrete = constants.%Op.specific_fn.b42] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %with_addr.var, %specific_fn.loc8 +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %with_addr.var, constants.%Op.bec +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.bec, @Op.2(constants.%WithAddr) [concrete = constants.%Op.specific_fn.b42] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %with_addr.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8: %ptr.b4e = addr_of %with_addr.var -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc7: %.b47 = impl_witness_access constants.%Destroy.impl_witness.40a, element0 [concrete = constants.%Op.8e6] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %explicit_return.var, %impl.elem0.loc7 -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.2(constants.%ExplicitReturn) [concrete = constants.%Op.specific_fn.523] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %explicit_return.var, %specific_fn.loc7 +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %explicit_return.var, constants.%Op.8e6 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.8e6, @Op.2(constants.%ExplicitReturn) [concrete = constants.%Op.specific_fn.523] +// CHECK:STDOUT: %bound_method.loc7: = bound_method %explicit_return.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7: %ptr.b0a = addr_of %explicit_return.var -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) -// CHECK:STDOUT: %impl.elem0.loc6: %.7a4 = impl_witness_access constants.%Destroy.impl_witness.aaa, element0 [concrete = constants.%Op.d78] -// CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %no_addr.var, %impl.elem0.loc6 -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Op.2(constants.%NoAddr) [concrete = constants.%Op.specific_fn.8fe] -// CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %no_addr.var, %specific_fn.loc6 +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) +// CHECK:STDOUT: %Op.bound.loc6: = bound_method %no_addr.var, constants.%Op.d78 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.d78, @Op.2(constants.%NoAddr) [concrete = constants.%Op.specific_fn.8fe] +// CHECK:STDOUT: %bound_method.loc6: = bound_method %no_addr.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc6: %ptr.4b8 = addr_of %no_addr.var -// CHECK:STDOUT: %no_op.loc6: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6) +// CHECK:STDOUT: %no_op.loc6: init %empty_tuple.type = call %bound_method.loc6(%addr.loc6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -429,30 +411,17 @@ fn G() { F({}); } // CHECK:STDOUT: %pattern_type.f93: type = pattern_type %WithAddr [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.aaa: = impl_witness imports.%Destroy.impl_witness_table, @impl(%NoAddr) [concrete] // CHECK:STDOUT: %Op.type.73f: type = fn_type @Op.2, @impl(%NoAddr) [concrete] // CHECK:STDOUT: %Op.d78: %Op.type.73f = struct_value () [concrete] // CHECK:STDOUT: %ptr.4b8: type = ptr_type %NoAddr [concrete] -// CHECK:STDOUT: %Destroy.facet.2b6: %Destroy.type = facet_value %NoAddr, (%Destroy.impl_witness.aaa) [concrete] -// CHECK:STDOUT: %.7a4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2b6 [concrete] // CHECK:STDOUT: %Op.specific_fn.8fe: = specific_function %Op.d78, @Op.2(%NoAddr) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.824: = impl_witness imports.%Destroy.impl_witness_table, @impl(%WithAddr) [concrete] // CHECK:STDOUT: %Op.type.8f4: type = fn_type @Op.2, @impl(%WithAddr) [concrete] // CHECK:STDOUT: %Op.bec: %Op.type.8f4 = struct_value () [concrete] // CHECK:STDOUT: %ptr.b4e: type = ptr_type %WithAddr [concrete] -// CHECK:STDOUT: %Destroy.facet.6cc: %Destroy.type = facet_value %WithAddr, (%Destroy.impl_witness.824) [concrete] -// CHECK:STDOUT: %.372: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.6cc [concrete] // CHECK:STDOUT: %Op.specific_fn.b42: = specific_function %Op.bec, @Op.2(%WithAddr) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.40a: = impl_witness imports.%Destroy.impl_witness_table, @impl(%ExplicitReturn) [concrete] // CHECK:STDOUT: %Op.type.641: type = fn_type @Op.2, @impl(%ExplicitReturn) [concrete] // CHECK:STDOUT: %Op.8e6: %Op.type.641 = struct_value () [concrete] // CHECK:STDOUT: %ptr.b0a: type = ptr_type %ExplicitReturn [concrete] -// CHECK:STDOUT: %Destroy.facet.c42: %Destroy.type = facet_value %ExplicitReturn, (%Destroy.impl_witness.40a) [concrete] -// CHECK:STDOUT: %.b47: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.c42 [concrete] // CHECK:STDOUT: %Op.specific_fn.523: = specific_function %Op.8e6, @Op.2(%ExplicitReturn) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -478,8 +447,6 @@ fn G() { F({}); } // CHECK:STDOUT: %Main.import_ref.1cb = import_ref Main//types, loc15_24, unloaded // CHECK:STDOUT: %Main.import_ref.675 = import_ref Main//types, loc16_33, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -559,30 +526,26 @@ fn G() { F({}); } // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %impl.elem0.loc10: %.7a4 = impl_witness_access constants.%Destroy.impl_witness.aaa, element0 [concrete = constants.%Op.d78] -// CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %in_scope.var, %impl.elem0.loc10 -// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Op.2(constants.%NoAddr) [concrete = constants.%Op.specific_fn.8fe] -// CHECK:STDOUT: %bound_method.loc10_5.2: = bound_method %in_scope.var, %specific_fn.loc10 +// CHECK:STDOUT: %Op.bound.loc10: = bound_method %in_scope.var, constants.%Op.d78 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.d78, @Op.2(constants.%NoAddr) [concrete = constants.%Op.specific_fn.8fe] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %in_scope.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10: %ptr.4b8 = addr_of %in_scope.var -// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10_5.2(%addr.loc10) -// CHECK:STDOUT: %impl.elem0.loc8: %.372 = impl_witness_access constants.%Destroy.impl_witness.824, element0 [concrete = constants.%Op.bec] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %with_addr.var, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.2(constants.%WithAddr) [concrete = constants.%Op.specific_fn.b42] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %with_addr.var, %specific_fn.loc8 +// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %with_addr.var, constants.%Op.bec +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.bec, @Op.2(constants.%WithAddr) [concrete = constants.%Op.specific_fn.b42] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %with_addr.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8: %ptr.b4e = addr_of %with_addr.var -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc7: %.b47 = impl_witness_access constants.%Destroy.impl_witness.40a, element0 [concrete = constants.%Op.8e6] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %explicit_return.var, %impl.elem0.loc7 -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.2(constants.%ExplicitReturn) [concrete = constants.%Op.specific_fn.523] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %explicit_return.var, %specific_fn.loc7 +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %explicit_return.var, constants.%Op.8e6 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.8e6, @Op.2(constants.%ExplicitReturn) [concrete = constants.%Op.specific_fn.523] +// CHECK:STDOUT: %bound_method.loc7: = bound_method %explicit_return.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc7: %ptr.b0a = addr_of %explicit_return.var -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) -// CHECK:STDOUT: %impl.elem0.loc6: %.7a4 = impl_witness_access constants.%Destroy.impl_witness.aaa, element0 [concrete = constants.%Op.d78] -// CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %no_addr.var, %impl.elem0.loc6 -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Op.2(constants.%NoAddr) [concrete = constants.%Op.specific_fn.8fe] -// CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %no_addr.var, %specific_fn.loc6 +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) +// CHECK:STDOUT: %Op.bound.loc6: = bound_method %no_addr.var, constants.%Op.d78 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.d78, @Op.2(constants.%NoAddr) [concrete = constants.%Op.specific_fn.8fe] +// CHECK:STDOUT: %bound_method.loc6: = bound_method %no_addr.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc6: %ptr.4b8 = addr_of %no_addr.var -// CHECK:STDOUT: %no_op.loc6: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6) +// CHECK:STDOUT: %no_op.loc6: init %empty_tuple.type = call %bound_method.loc6(%addr.loc6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -604,30 +567,17 @@ fn G() { F({}); } // CHECK:STDOUT: %Make.type.e14: type = fn_type @Make.3 [concrete] // CHECK:STDOUT: %Make.b0a: %Make.type.e14 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.824: = impl_witness imports.%Destroy.impl_witness_table, @impl(%WithAddr) [concrete] // CHECK:STDOUT: %Op.type.8f4: type = fn_type @Op.2, @impl(%WithAddr) [concrete] // CHECK:STDOUT: %Op.bec: %Op.type.8f4 = struct_value () [concrete] // CHECK:STDOUT: %ptr.b4e: type = ptr_type %WithAddr [concrete] -// CHECK:STDOUT: %Destroy.facet.6cc: %Destroy.type = facet_value %WithAddr, (%Destroy.impl_witness.824) [concrete] -// CHECK:STDOUT: %.372: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.6cc [concrete] // CHECK:STDOUT: %Op.specific_fn.b42: = specific_function %Op.bec, @Op.2(%WithAddr) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.40a: = impl_witness imports.%Destroy.impl_witness_table, @impl(%ExplicitReturn) [concrete] // CHECK:STDOUT: %Op.type.641: type = fn_type @Op.2, @impl(%ExplicitReturn) [concrete] // CHECK:STDOUT: %Op.8e6: %Op.type.641 = struct_value () [concrete] // CHECK:STDOUT: %ptr.b0a: type = ptr_type %ExplicitReturn [concrete] -// CHECK:STDOUT: %Destroy.facet.c42: %Destroy.type = facet_value %ExplicitReturn, (%Destroy.impl_witness.40a) [concrete] -// CHECK:STDOUT: %.b47: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.c42 [concrete] // CHECK:STDOUT: %Op.specific_fn.523: = specific_function %Op.8e6, @Op.2(%ExplicitReturn) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.aaa: = impl_witness imports.%Destroy.impl_witness_table, @impl(%NoAddr) [concrete] // CHECK:STDOUT: %Op.type.73f: type = fn_type @Op.2, @impl(%NoAddr) [concrete] // CHECK:STDOUT: %Op.d78: %Op.type.73f = struct_value () [concrete] // CHECK:STDOUT: %ptr.4b8: type = ptr_type %NoAddr [concrete] -// CHECK:STDOUT: %Destroy.facet.2b6: %Destroy.type = facet_value %NoAddr, (%Destroy.impl_witness.aaa) [concrete] -// CHECK:STDOUT: %.7a4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2b6 [concrete] // CHECK:STDOUT: %Op.specific_fn.8fe: = specific_function %Op.d78, @Op.2(%NoAddr) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -653,8 +603,6 @@ fn G() { F({}); } // CHECK:STDOUT: %Main.import_ref.974: %Make.type.e14 = import_ref Main//types, loc15_24, loaded [concrete = constants.%Make.b0a] // CHECK:STDOUT: %Main.import_ref.675 = import_ref Main//types, loc16_33, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -714,24 +662,21 @@ fn G() { F({}); } // CHECK:STDOUT: %.loc10_17.1: ref %WithAddr = temporary_storage // CHECK:STDOUT: %Make.call.loc10: init %WithAddr = call %Make.ref.loc10() to %.loc10_17.1 // CHECK:STDOUT: %.loc10_17.2: ref %WithAddr = temporary %.loc10_17.1, %Make.call.loc10 -// CHECK:STDOUT: %impl.elem0.loc10: %.372 = impl_witness_access constants.%Destroy.impl_witness.824, element0 [concrete = constants.%Op.bec] -// CHECK:STDOUT: %bound_method.loc10_17.1: = bound_method %.loc10_17.1, %impl.elem0.loc10 -// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Op.2(constants.%WithAddr) [concrete = constants.%Op.specific_fn.b42] -// CHECK:STDOUT: %bound_method.loc10_17.2: = bound_method %.loc10_17.1, %specific_fn.loc10 +// CHECK:STDOUT: %Op.bound.loc10: = bound_method %.loc10_17.1, constants.%Op.bec +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.bec, @Op.2(constants.%WithAddr) [concrete = constants.%Op.specific_fn.b42] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %.loc10_17.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10: %ptr.b4e = addr_of %.loc10_17.1 -// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10_17.2(%addr.loc10) -// CHECK:STDOUT: %impl.elem0.loc9: %.b47 = impl_witness_access constants.%Destroy.impl_witness.40a, element0 [concrete = constants.%Op.8e6] -// CHECK:STDOUT: %bound_method.loc9_23.1: = bound_method %.loc9_23.1, %impl.elem0.loc9 -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Op.2(constants.%ExplicitReturn) [concrete = constants.%Op.specific_fn.523] -// CHECK:STDOUT: %bound_method.loc9_23.2: = bound_method %.loc9_23.1, %specific_fn.loc9 +// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) +// CHECK:STDOUT: %Op.bound.loc9: = bound_method %.loc9_23.1, constants.%Op.8e6 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.8e6, @Op.2(constants.%ExplicitReturn) [concrete = constants.%Op.specific_fn.523] +// CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_23.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9: %ptr.b0a = addr_of %.loc9_23.1 -// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_23.2(%addr.loc9) -// CHECK:STDOUT: %impl.elem0.loc8: %.7a4 = impl_witness_access constants.%Destroy.impl_witness.aaa, element0 [concrete = constants.%Op.d78] -// CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %.loc8_15.1, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.2(constants.%NoAddr) [concrete = constants.%Op.specific_fn.8fe] -// CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %.loc8_15.1, %specific_fn.loc8 +// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %.loc8_15.1, constants.%Op.d78 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.d78, @Op.2(constants.%NoAddr) [concrete = constants.%Op.specific_fn.8fe] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8_15.1, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8: %ptr.4b8 = addr_of %.loc8_15.1 -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_15.2(%addr.loc8) +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -759,23 +704,13 @@ fn G() { F({}); } // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.9f4: type = pattern_type %NoSelf [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.ba4: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Args) [concrete] // CHECK:STDOUT: %Op.type.59d: type = fn_type @Op.2, @impl(%Args) [concrete] // CHECK:STDOUT: %Op.a71: %Op.type.59d = struct_value () [concrete] // CHECK:STDOUT: %ptr.7b2: type = ptr_type %Args [concrete] -// CHECK:STDOUT: %Destroy.facet.7fd: %Destroy.type = facet_value %Args, (%Destroy.impl_witness.ba4) [concrete] -// CHECK:STDOUT: %.dcb: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.7fd [concrete] // CHECK:STDOUT: %Op.specific_fn.242: = specific_function %Op.a71, @Op.2(%Args) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.da8: = impl_witness imports.%Destroy.impl_witness_table, @impl(%NoSelf) [concrete] // CHECK:STDOUT: %Op.type.f20: type = fn_type @Op.2, @impl(%NoSelf) [concrete] // CHECK:STDOUT: %Op.2e0: %Op.type.f20 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5ab: type = ptr_type %NoSelf [concrete] -// CHECK:STDOUT: %Destroy.facet.f87: %Destroy.type = facet_value %NoSelf, (%Destroy.impl_witness.da8) [concrete] -// CHECK:STDOUT: %.960: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.f87 [concrete] // CHECK:STDOUT: %Op.specific_fn.a58: = specific_function %Op.2e0, @Op.2(%NoSelf) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -786,8 +721,6 @@ fn G() { F({}); } // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -860,18 +793,16 @@ fn G() { F({}); } // CHECK:STDOUT: %b.var: ref %Args = var %b.var_patt // CHECK:STDOUT: %Args.ref: type = name_ref Args, file.%Args.decl [concrete = constants.%Args] // CHECK:STDOUT: %b: ref %Args = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0.loc22: %.dcb = impl_witness_access constants.%Destroy.impl_witness.ba4, element0 [concrete = constants.%Op.a71] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %b.var, %impl.elem0.loc22 -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Op.2(constants.%Args) [concrete = constants.%Op.specific_fn.242] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %b.var, %specific_fn.loc22 +// CHECK:STDOUT: %Op.bound.loc22: = bound_method %b.var, constants.%Op.a71 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.a71, @Op.2(constants.%Args) [concrete = constants.%Op.specific_fn.242] +// CHECK:STDOUT: %bound_method.loc22: = bound_method %b.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc22: %ptr.7b2 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22) -// CHECK:STDOUT: %impl.elem0.loc21: %.960 = impl_witness_access constants.%Destroy.impl_witness.da8, element0 [concrete = constants.%Op.2e0] -// CHECK:STDOUT: %bound_method.loc21_3.1: = bound_method %a.var, %impl.elem0.loc21 -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Op.2(constants.%NoSelf) [concrete = constants.%Op.specific_fn.a58] -// CHECK:STDOUT: %bound_method.loc21_3.2: = bound_method %a.var, %specific_fn.loc21 +// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22) +// CHECK:STDOUT: %Op.bound.loc21: = bound_method %a.var, constants.%Op.2e0 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.2e0, @Op.2(constants.%NoSelf) [concrete = constants.%Op.specific_fn.a58] +// CHECK:STDOUT: %bound_method.loc21: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc21: %ptr.5ab = addr_of %a.var -// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21_3.2(%addr.loc21) +// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index fdc6cfeb13e8..4cac41021b7d 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -291,7 +291,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %v.var: ref = var %v.var_patt [concrete = ] // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [concrete = constants.%Abstract] // CHECK:STDOUT: %v: = bind_name v, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon b/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon index 0037991588af..9635509c247e 100644 --- a/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon +++ b/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon @@ -233,7 +233,6 @@ fn Var5() { // CHECK:STDOUT: %.loc13_21.3: type = converted %.loc13_21.2, constants.%tuple.type.ac6 [concrete = constants.%tuple.type.ac6] // CHECK:STDOUT: } // CHECK:STDOUT: %v: = bind_name v, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -369,7 +368,6 @@ fn Var5() { // CHECK:STDOUT: %.loc14_32.3: type = converted %.loc14_32.2, constants.%tuple.type.e3e [concrete = constants.%tuple.type.e3e] // CHECK:STDOUT: } // CHECK:STDOUT: %v2: = bind_name v2, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -430,7 +428,6 @@ fn Var5() { // CHECK:STDOUT: %.loc13_25.4: type = converted %.loc13_25.2, constants.%tuple.type.d93 [concrete = constants.%tuple.type.d93] // CHECK:STDOUT: } // CHECK:STDOUT: %v3: = bind_name v3, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -491,7 +488,6 @@ fn Var5() { // CHECK:STDOUT: %.loc13_25.4: type = converted %.loc13_25.2, constants.%tuple.type.919 [concrete = constants.%tuple.type.919] // CHECK:STDOUT: } // CHECK:STDOUT: %v4: = bind_name v4, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -584,7 +580,6 @@ fn Var5() { // CHECK:STDOUT: %.loc14_21.3: type = converted %.loc14_21.2, constants.%tuple.type.555 [concrete = constants.%tuple.type.555] // CHECK:STDOUT: } // CHECK:STDOUT: %v5: = bind_name v5, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index b4aff92c4ff6..7d57bc4c7df2 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -57,15 +57,8 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %F.type.b25: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.c41: %F.type.b25 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.fef: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Class) [concrete] // CHECK:STDOUT: %Op.type.7de: type = fn_type @Op.2, @impl(%Class) [concrete] // CHECK:STDOUT: %Op.d64: %Op.type.7de = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.fef) [concrete] -// CHECK:STDOUT: %.b9f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d64, @Op.2(%Class) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -76,8 +69,6 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -166,12 +157,11 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %G.bound.loc39: = bound_method %.loc39_4.1, %G.ref.loc39 // CHECK:STDOUT: %.loc39_4.2: %Class = bind_value %.loc39_4.1 // CHECK:STDOUT: %G.call.loc39: init %empty_tuple.type = call %G.bound.loc39(%.loc39_4.2) -// CHECK:STDOUT: %impl.elem0: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc32_3.1: = bound_method %.loc32, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%Class) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc32_3.2: = bound_method %.loc32, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc32, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d64, @Op.2(constants.%Class) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc32, %Op.specific_fn // CHECK:STDOUT: %addr.loc32_3.2: %ptr.e71 = addr_of %.loc32 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc32_3.2(%addr.loc32_3.2) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr.loc32_3.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index 7a3df93a598f..f5c2f468e065 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -63,23 +63,13 @@ fn Run() { // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.3(%i32) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.fef: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Class) [concrete] // CHECK:STDOUT: %Op.type.7de: type = fn_type @Op.3, @impl.49c(%Class) [concrete] // CHECK:STDOUT: %Op.d64: %Op.type.7de = struct_value () [concrete] // CHECK:STDOUT: %ptr.e71: type = ptr_type %Class [concrete] -// CHECK:STDOUT: %Destroy.facet.817: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.fef) [concrete] -// CHECK:STDOUT: %.b9f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.817 [concrete] // CHECK:STDOUT: %Op.specific_fn.618: = specific_function %Op.d64, @Op.3(%Class) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -96,8 +86,6 @@ fn Run() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,24 +177,21 @@ fn Run() { // CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %ck: ref %i32 = bind_name ck, %ck.var -// CHECK:STDOUT: %impl.elem0.loc25: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc25_3.1: = bound_method %ck.var, %impl.elem0.loc25 -// CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc25_3.2: = bound_method %ck.var, %specific_fn.loc25 +// CHECK:STDOUT: %Op.bound.loc25: = bound_method %ck.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc25: = bound_method %ck.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc25: %ptr.235 = addr_of %ck.var -// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25_3.2(%addr.loc25) -// CHECK:STDOUT: %impl.elem0.loc24: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %cj.var, %impl.elem0.loc24 -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %cj.var, %specific_fn.loc24 +// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25(%addr.loc25) +// CHECK:STDOUT: %Op.bound.loc24: = bound_method %cj.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc24: = bound_method %cj.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc24: %ptr.235 = addr_of %cj.var -// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24) -// CHECK:STDOUT: %impl.elem0.loc21: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc21_3.1: = bound_method %c.var, %impl.elem0.loc21 -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn.618] -// CHECK:STDOUT: %bound_method.loc21_3.2: = bound_method %c.var, %specific_fn.loc21 +// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24) +// CHECK:STDOUT: %Op.bound.loc21: = bound_method %c.var, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.d64, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn.618] +// CHECK:STDOUT: %bound_method.loc21: = bound_method %c.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc21: %ptr.e71 = addr_of %c.var -// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21_3.2(%addr.loc21) +// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index 071b979f75eb..803766e41105 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -64,23 +64,13 @@ fn Test() { // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.3(%i32) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.fef: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Class) [concrete] // CHECK:STDOUT: %Op.type.7de: type = fn_type @Op.3, @impl.49c(%Class) [concrete] // CHECK:STDOUT: %Op.d64: %Op.type.7de = struct_value () [concrete] // CHECK:STDOUT: %ptr.e71: type = ptr_type %Class [concrete] -// CHECK:STDOUT: %Destroy.facet.817: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.fef) [concrete] -// CHECK:STDOUT: %.b9f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.817 [concrete] // CHECK:STDOUT: %Op.specific_fn.618: = specific_function %Op.d64, @Op.3(%Class) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -97,8 +87,6 @@ fn Test() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -197,24 +185,21 @@ fn Test() { // CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %ck: ref %i32 = bind_name ck, %ck.var -// CHECK:STDOUT: %impl.elem0.loc26: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc26_3.1: = bound_method %ck.var, %impl.elem0.loc26 -// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc26_3.2: = bound_method %ck.var, %specific_fn.loc26 +// CHECK:STDOUT: %Op.bound.loc26: = bound_method %ck.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc26: = bound_method %ck.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc26: %ptr.235 = addr_of %ck.var -// CHECK:STDOUT: %no_op.loc26: init %empty_tuple.type = call %bound_method.loc26_3.2(%addr.loc26) -// CHECK:STDOUT: %impl.elem0.loc25: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc25_3.1: = bound_method %cj.var, %impl.elem0.loc25 -// CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc25_3.2: = bound_method %cj.var, %specific_fn.loc25 +// CHECK:STDOUT: %no_op.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26) +// CHECK:STDOUT: %Op.bound.loc25: = bound_method %cj.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc25: = bound_method %cj.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc25: %ptr.235 = addr_of %cj.var -// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25_3.2(%addr.loc25) -// CHECK:STDOUT: %impl.elem0.loc21: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc21_3.1: = bound_method %cv.var, %impl.elem0.loc21 -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn.618] -// CHECK:STDOUT: %bound_method.loc21_3.2: = bound_method %cv.var, %specific_fn.loc21 +// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25(%addr.loc25) +// CHECK:STDOUT: %Op.bound.loc21: = bound_method %cv.var, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.d64, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn.618] +// CHECK:STDOUT: %bound_method.loc21: = bound_method %cv.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc21: %ptr.e71 = addr_of %cv.var -// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21_3.2(%addr.loc21) +// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 8ebbb9658d3c..acc188e182de 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -476,15 +476,9 @@ class Class(U:! type) { // CHECK:STDOUT: %F.c41: %F.type.b25 = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.f7c, @F.1(%i32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.801: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%CompleteClass.e9e) [concrete] // CHECK:STDOUT: %Op.type.9c5: type = fn_type @Op.3, @impl.49c(%CompleteClass.e9e) [concrete] // CHECK:STDOUT: %Op.d10: %Op.type.9c5 = struct_value () [concrete] // CHECK:STDOUT: %ptr.a97: type = ptr_type %CompleteClass.e9e [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %CompleteClass.e9e, (%Destroy.impl_witness.801) [concrete] -// CHECK:STDOUT: %.2c0: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d10, @Op.3(%CompleteClass.e9e) [concrete] // CHECK:STDOUT: %UseField.type: type = fn_type @UseField [concrete] // CHECK:STDOUT: %UseField: %UseField.type = struct_value () [concrete] @@ -508,8 +502,6 @@ class Class(U:! type) { // CHECK:STDOUT: %Main.import_ref.a52: @CompleteClass.%F.type (%F.type.14f) = import_ref Main//foo, loc8_17, loaded [symbolic = @CompleteClass.%F (constants.%F.874)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %.364: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.28a) = field_decl n, element0 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -588,18 +580,16 @@ class Class(U:! type) { // CHECK:STDOUT: %F.call.loc7: init %i32 = call %F.specific_fn() // CHECK:STDOUT: %.loc7_15.1: %i32 = value_of_initializer %F.call.loc7 // CHECK:STDOUT: %.loc7_15.2: %i32 = converted %F.call.loc7, %.loc7_15.1 -// CHECK:STDOUT: %impl.elem0.loc6_3.1: %.2c0 = impl_witness_access constants.%Destroy.impl_witness.801, element0 [concrete = constants.%Op.d10] -// CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %.loc6_3, %impl.elem0.loc6_3.1 -// CHECK:STDOUT: %specific_fn.loc6_3.1: = specific_function %impl.elem0.loc6_3.1, @Op.3(constants.%CompleteClass.e9e) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %.loc6_3, %specific_fn.loc6_3.1 +// CHECK:STDOUT: %Op.bound.loc6_3.1: = bound_method %.loc6_3, constants.%Op.d10 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.d10, @Op.3(constants.%CompleteClass.e9e) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %.loc6_3, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc6_3.1: %ptr.a97 = addr_of %.loc6_3 -// CHECK:STDOUT: %no_op.loc6_3.1: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6_3.1) -// CHECK:STDOUT: %impl.elem0.loc6_3.2: %.2c0 = impl_witness_access constants.%Destroy.impl_witness.801, element0 [concrete = constants.%Op.d10] -// CHECK:STDOUT: %bound_method.loc6_3.3: = bound_method %v.var, %impl.elem0.loc6_3.2 -// CHECK:STDOUT: %specific_fn.loc6_3.2: = specific_function %impl.elem0.loc6_3.2, @Op.3(constants.%CompleteClass.e9e) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_3.4: = bound_method %v.var, %specific_fn.loc6_3.2 +// CHECK:STDOUT: %no_op.loc6_3.1: init %empty_tuple.type = call %bound_method.loc6_3.1(%addr.loc6_3.1) +// CHECK:STDOUT: %Op.bound.loc6_3.2: = bound_method %v.var, constants.%Op.d10 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.d10, @Op.3(constants.%CompleteClass.e9e) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc6_3.2: %ptr.a97 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc6_3.2: init %empty_tuple.type = call %bound_method.loc6_3.4(%addr.loc6_3.2) +// CHECK:STDOUT: %no_op.loc6_3.2: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6_3.2) // CHECK:STDOUT: return %.loc7_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -633,18 +623,16 @@ class Class(U:! type) { // CHECK:STDOUT: %n.ref: %CompleteClass.elem.7fc = name_ref n, imports.%Main.import_ref.e76 [concrete = imports.%.364] // CHECK:STDOUT: %.loc12_11.1: ref %i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc12_11.2: %i32 = bind_value %.loc12_11.1 -// CHECK:STDOUT: %impl.elem0.loc11_3.1: %.2c0 = impl_witness_access constants.%Destroy.impl_witness.801, element0 [concrete = constants.%Op.d10] -// CHECK:STDOUT: %bound_method.loc11_3.1: = bound_method %.loc11_3, %impl.elem0.loc11_3.1 -// CHECK:STDOUT: %specific_fn.loc11_3.1: = specific_function %impl.elem0.loc11_3.1, @Op.3(constants.%CompleteClass.e9e) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_3.2: = bound_method %.loc11_3, %specific_fn.loc11_3.1 +// CHECK:STDOUT: %Op.bound.loc11_3.1: = bound_method %.loc11_3, constants.%Op.d10 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.d10, @Op.3(constants.%CompleteClass.e9e) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc11_3.1: = bound_method %.loc11_3, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc11_3.1: %ptr.a97 = addr_of %.loc11_3 -// CHECK:STDOUT: %no_op.loc11_3.1: init %empty_tuple.type = call %bound_method.loc11_3.2(%addr.loc11_3.1) -// CHECK:STDOUT: %impl.elem0.loc11_3.2: %.2c0 = impl_witness_access constants.%Destroy.impl_witness.801, element0 [concrete = constants.%Op.d10] -// CHECK:STDOUT: %bound_method.loc11_3.3: = bound_method %v.var, %impl.elem0.loc11_3.2 -// CHECK:STDOUT: %specific_fn.loc11_3.2: = specific_function %impl.elem0.loc11_3.2, @Op.3(constants.%CompleteClass.e9e) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_3.4: = bound_method %v.var, %specific_fn.loc11_3.2 +// CHECK:STDOUT: %no_op.loc11_3.1: init %empty_tuple.type = call %bound_method.loc11_3.1(%addr.loc11_3.1) +// CHECK:STDOUT: %Op.bound.loc11_3.2: = bound_method %v.var, constants.%Op.d10 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.d10, @Op.3(constants.%CompleteClass.e9e) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc11_3.2: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc11_3.2: %ptr.a97 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc11_3.2: init %empty_tuple.type = call %bound_method.loc11_3.4(%addr.loc11_3.2) +// CHECK:STDOUT: %no_op.loc11_3.2: init %empty_tuple.type = call %bound_method.loc11_3.2(%addr.loc11_3.2) // CHECK:STDOUT: return %.loc12_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -708,22 +696,13 @@ class Class(U:! type) { // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.f45: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%CompleteClass.a06) [concrete] // CHECK:STDOUT: %Op.type.370: type = fn_type @Op.3, @impl.49c(%CompleteClass.a06) [concrete] // CHECK:STDOUT: %Op.867: %Op.type.370 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d29: type = ptr_type %CompleteClass.a06 [concrete] -// CHECK:STDOUT: %Destroy.facet.968: %Destroy.type = facet_value %CompleteClass.a06, (%Destroy.impl_witness.f45) [concrete] -// CHECK:STDOUT: %.219: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.968 [concrete] // CHECK:STDOUT: %Op.specific_fn.0ab: = specific_function %Op.867, @Op.3(%CompleteClass.a06) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.190: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%CompleteClass.0fe) [concrete] // CHECK:STDOUT: %Op.type.310: type = fn_type @Op.3, @impl.49c(%CompleteClass.0fe) [concrete] // CHECK:STDOUT: %Op.200: %Op.type.310 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c79: type = ptr_type %CompleteClass.0fe [concrete] -// CHECK:STDOUT: %Destroy.facet.e96: %Destroy.type = facet_value %CompleteClass.0fe, (%Destroy.impl_witness.190) [concrete] -// CHECK:STDOUT: %.614: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.e96 [concrete] // CHECK:STDOUT: %Op.specific_fn.a4e: = specific_function %Op.200, @Op.3(%CompleteClass.0fe) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -747,8 +726,6 @@ class Class(U:! type) { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -803,18 +780,16 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%ptr.9e1) [concrete = constants.%CompleteClass.0fe] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %CompleteClass.0fe = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0.loc14_34: %.219 = impl_witness_access constants.%Destroy.impl_witness.f45, element0 [concrete = constants.%Op.867] -// CHECK:STDOUT: %bound_method.loc14_34.1: = bound_method %.loc14_34, %impl.elem0.loc14_34 -// CHECK:STDOUT: %specific_fn.loc14_34: = specific_function %impl.elem0.loc14_34, @Op.3(constants.%CompleteClass.a06) [concrete = constants.%Op.specific_fn.0ab] -// CHECK:STDOUT: %bound_method.loc14_34.2: = bound_method %.loc14_34, %specific_fn.loc14_34 +// CHECK:STDOUT: %Op.bound.loc14_34: = bound_method %.loc14_34, constants.%Op.867 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.867, @Op.3(constants.%CompleteClass.a06) [concrete = constants.%Op.specific_fn.0ab] +// CHECK:STDOUT: %bound_method.loc14_34: = bound_method %.loc14_34, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc14_34: %ptr.d29 = addr_of %.loc14_34 -// CHECK:STDOUT: %no_op.loc14_34: init %empty_tuple.type = call %bound_method.loc14_34.2(%addr.loc14_34) -// CHECK:STDOUT: %impl.elem0.loc14_3: %.614 = impl_witness_access constants.%Destroy.impl_witness.190, element0 [concrete = constants.%Op.200] -// CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %v.var, %impl.elem0.loc14_3 -// CHECK:STDOUT: %specific_fn.loc14_3: = specific_function %impl.elem0.loc14_3, @Op.3(constants.%CompleteClass.0fe) [concrete = constants.%Op.specific_fn.a4e] -// CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %v.var, %specific_fn.loc14_3 +// CHECK:STDOUT: %no_op.loc14_34: init %empty_tuple.type = call %bound_method.loc14_34(%addr.loc14_34) +// CHECK:STDOUT: %Op.bound.loc14_3: = bound_method %v.var, constants.%Op.200 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.200, @Op.3(constants.%CompleteClass.0fe) [concrete = constants.%Op.specific_fn.a4e] +// CHECK:STDOUT: %bound_method.loc14_3: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc14_3: %ptr.c79 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc14_3: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr.loc14_3) +// CHECK:STDOUT: %no_op.loc14_3: init %empty_tuple.type = call %bound_method.loc14_3(%addr.loc14_3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 154b26d979ff..c29ecb6c51b5 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -66,8 +66,6 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %pattern_type.3c1: type = pattern_type %Class.fe1 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] // CHECK:STDOUT: %ptr.955: type = ptr_type %Class.fe1 [symbolic] // CHECK:STDOUT: %require_complete.2ae: = require_complete_type %ptr.955 [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Class.fe1, @Destroy [symbolic] @@ -89,12 +87,9 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %struct_type.k.0bf: type = struct_type {.k: %i32} [concrete] // CHECK:STDOUT: %complete_type.954: = complete_type_witness %struct_type.k.0bf [concrete] // CHECK:STDOUT: %pattern_type.0fa: type = pattern_type %Class.247 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.5f0: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Class.247) [concrete] // CHECK:STDOUT: %Op.type.fdc: type = fn_type @Op.2, @impl.49c(%Class.247) [concrete] // CHECK:STDOUT: %Op.af5: %Op.type.fdc = struct_value () [concrete] // CHECK:STDOUT: %ptr.f7c: type = ptr_type %Class.247 [concrete] -// CHECK:STDOUT: %Destroy.facet.c29: %Destroy.type = facet_value %Class.247, (%Destroy.impl_witness.5f0) [concrete] -// CHECK:STDOUT: %.9ad: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.c29 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.af5, @Op.2(%Class.247) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,8 +101,6 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -260,12 +253,11 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %k.ref: %Class.elem.2d8 = name_ref k, @Class.%.loc5 [concrete = @Class.%.loc5] // CHECK:STDOUT: %.loc15_11.1: ref %i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc15_11.2: %i32 = bind_value %.loc15_11.1 -// CHECK:STDOUT: %impl.elem0: %.9ad = impl_witness_access constants.%Destroy.impl_witness.5f0, element0 [concrete = constants.%Op.af5] -// CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %v.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%Class.247) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %v.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %v.var, constants.%Op.af5 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.af5, @Op.2(constants.%Class.247) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.f7c = addr_of %v.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc15_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index 70d9c76551cb..21b65ed47e0c 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -113,15 +113,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.480: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Inner.721) [concrete] // CHECK:STDOUT: %Op.type.a38: type = fn_type @Op.3, @impl.49c(%Inner.721) [concrete] // CHECK:STDOUT: %Op.27e: %Op.type.a38 = struct_value () [concrete] // CHECK:STDOUT: %ptr.416: type = ptr_type %Inner.721 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Inner.721, (%Destroy.impl_witness.480) [concrete] -// CHECK:STDOUT: %.cdb: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.27e, @Op.3(%Inner.721) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -138,8 +132,6 @@ fn Test() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -263,10 +255,10 @@ fn Test() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%i32) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc13_3: ref %Inner.721 = splice_block %c.var {} -// CHECK:STDOUT: %impl.elem0.loc13_42: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc13_42.1: = bound_method %int_1, %impl.elem0.loc13_42 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc13_42: = specific_function %impl.elem0.loc13_42, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_42.2: = bound_method %int_1, %specific_fn.loc13_42 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc13_42.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc13_42.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc13_42.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_42.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_42.2: %i32 = converted %int_1, %.loc13_42.1 [concrete = constants.%int_1.5d2] @@ -285,18 +277,16 @@ fn Test() -> i32 { // CHECK:STDOUT: %n.ref: %Inner.elem.6c2 = name_ref n, @Inner.%.loc6 [concrete = @Inner.%.loc6] // CHECK:STDOUT: %.loc14_11.1: ref %i32 = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc14_11.2: %i32 = bind_value %.loc14_11.1 -// CHECK:STDOUT: %impl.elem0.loc13_3.1: %.cdb = impl_witness_access constants.%Destroy.impl_witness.480, element0 [concrete = constants.%Op.27e] -// CHECK:STDOUT: %bound_method.loc13_3.1: = bound_method %.loc13_3, %impl.elem0.loc13_3.1 -// CHECK:STDOUT: %specific_fn.loc13_3.1: = specific_function %impl.elem0.loc13_3.1, @Op.3(constants.%Inner.721) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_3.2: = bound_method %.loc13_3, %specific_fn.loc13_3.1 +// CHECK:STDOUT: %Op.bound.loc13_3.1: = bound_method %.loc13_3, constants.%Op.27e +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.27e, @Op.3(constants.%Inner.721) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc13_3.1: = bound_method %.loc13_3, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc13_3.1: %ptr.416 = addr_of %.loc13_3 -// CHECK:STDOUT: %no_op.loc13_3.1: init %empty_tuple.type = call %bound_method.loc13_3.2(%addr.loc13_3.1) -// CHECK:STDOUT: %impl.elem0.loc13_3.2: %.cdb = impl_witness_access constants.%Destroy.impl_witness.480, element0 [concrete = constants.%Op.27e] -// CHECK:STDOUT: %bound_method.loc13_3.3: = bound_method %c.var, %impl.elem0.loc13_3.2 -// CHECK:STDOUT: %specific_fn.loc13_3.2: = specific_function %impl.elem0.loc13_3.2, @Op.3(constants.%Inner.721) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_3.4: = bound_method %c.var, %specific_fn.loc13_3.2 +// CHECK:STDOUT: %no_op.loc13_3.1: init %empty_tuple.type = call %bound_method.loc13_3.1(%addr.loc13_3.1) +// CHECK:STDOUT: %Op.bound.loc13_3.2: = bound_method %c.var, constants.%Op.27e +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.27e, @Op.3(constants.%Inner.721) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc13_3.2: = bound_method %c.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc13_3.2: %ptr.416 = addr_of %c.var -// CHECK:STDOUT: %no_op.loc13_3.2: init %empty_tuple.type = call %bound_method.loc13_3.4(%addr.loc13_3.2) +// CHECK:STDOUT: %no_op.loc13_3.2: init %empty_tuple.type = call %bound_method.loc13_3.2(%addr.loc13_3.2) // CHECK:STDOUT: return %.loc14_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -424,15 +414,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %.b10: type = fn_type_with_self_type %F.type.86e, %Inner.facet.840 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.e75, @F.2(%i32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.bad: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C.70f) [concrete] // CHECK:STDOUT: %Op.type.b66: type = fn_type @Op.3, @impl.49c(%C.70f) [concrete] // CHECK:STDOUT: %Op.369: %Op.type.b66 = struct_value () [concrete] // CHECK:STDOUT: %ptr.18f: type = ptr_type %C.70f [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.70f, (%Destroy.impl_witness.bad) [concrete] -// CHECK:STDOUT: %.ecb: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.369, @Op.3(%C.70f) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -445,8 +429,6 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -721,20 +703,19 @@ fn Test() -> i32 { // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc24_23 [concrete = constants.%Inner.type.52d] // CHECK:STDOUT: %.loc24_29: %Inner.assoc_type.215 = specific_constant @Inner.%assoc0.loc6_28.1, @Inner(constants.%i32) [concrete = constants.%assoc0.e80] // CHECK:STDOUT: %F.ref: %Inner.assoc_type.215 = name_ref F, %.loc24_29 [concrete = constants.%assoc0.e80] -// CHECK:STDOUT: %impl.elem0.loc24: %.b10 = impl_witness_access constants.%Inner.impl_witness.47d, element0 [concrete = constants.%F.e75] -// CHECK:STDOUT: %bound_method.loc24_11: = bound_method %c.ref, %impl.elem0.loc24 -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @F.2(constants.%i32) [concrete = constants.%F.specific_fn] -// CHECK:STDOUT: %bound_method.loc24_33: = bound_method %c.ref, %specific_fn.loc24 +// CHECK:STDOUT: %impl.elem0: %.b10 = impl_witness_access constants.%Inner.impl_witness.47d, element0 [concrete = constants.%F.e75] +// CHECK:STDOUT: %bound_method.loc24_11: = bound_method %c.ref, %impl.elem0 +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%i32) [concrete = constants.%F.specific_fn] +// CHECK:STDOUT: %bound_method.loc24_33: = bound_method %c.ref, %specific_fn // CHECK:STDOUT: %.loc24_10: %C.70f = bind_value %c.ref // CHECK:STDOUT: %F.call: init %i32 = call %bound_method.loc24_33(%.loc24_10) // CHECK:STDOUT: %.loc24_34.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc24_34.2: %i32 = converted %F.call, %.loc24_34.1 -// CHECK:STDOUT: %impl.elem0.loc23: %.ecb = impl_witness_access constants.%Destroy.impl_witness.bad, element0 [concrete = constants.%Op.369] -// CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %c.var, %impl.elem0.loc23 -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Op.3(constants.%C.70f) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %c.var, %specific_fn.loc23 +// CHECK:STDOUT: %Op.bound: = bound_method %c.var, constants.%Op.369 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.369, @Op.3(constants.%C.70f) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %c.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.18f = addr_of %c.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc23_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc23(%addr) // CHECK:STDOUT: return %.loc24_34.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index b88b49705fa5..2d088dd2638f 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -89,12 +89,9 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete] // CHECK:STDOUT: %GetNoDeduce.specific_fn.438: = specific_function %GetNoDeduce.162, @GetNoDeduce(%A, %B) [concrete] // CHECK:STDOUT: %A.val: %A = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.b6e: = impl_witness imports.%Destroy.impl_witness_table, @impl(%A) [concrete] // CHECK:STDOUT: %Op.type.b96: type = fn_type @Op.2, @impl(%A) [concrete] // CHECK:STDOUT: %Op.885: %Op.type.b96 = struct_value () [concrete] // CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete] -// CHECK:STDOUT: %Destroy.facet.4a1: %Destroy.type = facet_value %A, (%Destroy.impl_witness.b6e) [concrete] -// CHECK:STDOUT: %.af1: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.4a1 [concrete] // CHECK:STDOUT: %Op.specific_fn.716: = specific_function %Op.885, @Op.2(%A) [concrete] // CHECK:STDOUT: %complete_type.56a: = complete_type_witness %tuple.type.cc6 [concrete] // CHECK:STDOUT: } @@ -326,12 +323,11 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Get.specific_fn: = specific_function %Get.ref, @Get(constants.%A, constants.%B) [concrete = constants.%Get.specific_fn.213] // CHECK:STDOUT: %.loc23_35: ref %tuple.type.cc6 = splice_block %return {} // CHECK:STDOUT: %Get.call: init %tuple.type.cc6 = call %Get.specific_fn() to %.loc23_35 -// CHECK:STDOUT: %impl.elem0: %.c9f = impl_witness_access constants.%Destroy.impl_witness.ae3, element0 [concrete = constants.%Op.f13] -// CHECK:STDOUT: %bound_method.loc23_35.1: = bound_method %.loc23_35, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%tuple.type.cc6) [concrete = constants.%Op.specific_fn.8d7] -// CHECK:STDOUT: %bound_method.loc23_35.2: = bound_method %.loc23_35, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc23_35, constants.%Op.f13 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.f13, @Op.2(constants.%tuple.type.cc6) [concrete = constants.%Op.specific_fn.8d7] +// CHECK:STDOUT: %bound_method: = bound_method %.loc23_35, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.3b5 = addr_of %.loc23_35 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc23_35.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Get.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -350,18 +346,16 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %.loc28_25.5: ref %A = converted %.loc28_25.1, %.loc28_25.4 // CHECK:STDOUT: %.loc28_25.6: %A = bind_value %.loc28_25.5 // CHECK:STDOUT: %GetNoDeduce.call: init %tuple.type.cc6 = call %GetNoDeduce.specific_fn(%.loc28_25.6) to %.loc27_54 -// CHECK:STDOUT: %impl.elem0.loc28: %.af1 = impl_witness_access constants.%Destroy.impl_witness.b6e, element0 [concrete = constants.%Op.885] -// CHECK:STDOUT: %bound_method.loc28_25.1: = bound_method %.loc28_25.2, %impl.elem0.loc28 -// CHECK:STDOUT: %specific_fn.loc28: = specific_function %impl.elem0.loc28, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn.716] -// CHECK:STDOUT: %bound_method.loc28_25.2: = bound_method %.loc28_25.2, %specific_fn.loc28 +// CHECK:STDOUT: %Op.bound.loc28: = bound_method %.loc28_25.2, constants.%Op.885 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.885, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn.716] +// CHECK:STDOUT: %bound_method.loc28: = bound_method %.loc28_25.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc28: %ptr.6db = addr_of %.loc28_25.2 -// CHECK:STDOUT: %no_op.loc28: init %empty_tuple.type = call %bound_method.loc28_25.2(%addr.loc28) -// CHECK:STDOUT: %impl.elem0.loc27: %.c9f = impl_witness_access constants.%Destroy.impl_witness.ae3, element0 [concrete = constants.%Op.f13] -// CHECK:STDOUT: %bound_method.loc27_54.1: = bound_method %.loc27_54, %impl.elem0.loc27 -// CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Op.2(constants.%tuple.type.cc6) [concrete = constants.%Op.specific_fn.8d7] -// CHECK:STDOUT: %bound_method.loc27_54.2: = bound_method %.loc27_54, %specific_fn.loc27 +// CHECK:STDOUT: %no_op.loc28: init %empty_tuple.type = call %bound_method.loc28(%addr.loc28) +// CHECK:STDOUT: %Op.bound.loc27: = bound_method %.loc27_54, constants.%Op.f13 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.f13, @Op.2(constants.%tuple.type.cc6) [concrete = constants.%Op.specific_fn.8d7] +// CHECK:STDOUT: %bound_method.loc27: = bound_method %.loc27_54, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc27: %ptr.3b5 = addr_of %.loc27_54 -// CHECK:STDOUT: %no_op.loc27: init %empty_tuple.type = call %bound_method.loc27_54.2(%addr.loc27) +// CHECK:STDOUT: %no_op.loc27: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27) // CHECK:STDOUT: return %GetNoDeduce.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 54af478692c4..e61775e4d875 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -217,43 +217,24 @@ fn Run() { // CHECK:STDOUT: %ptr.c62: type = ptr_type %Incomplete [concrete] // CHECK:STDOUT: %pattern_type.275: type = pattern_type %ptr.c62 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.0f1: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.c62) [concrete] // CHECK:STDOUT: %Op.type.7f0: type = fn_type @Op.3, @impl.49c(%ptr.c62) [concrete] // CHECK:STDOUT: %Op.90d: %Op.type.7f0 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c22: type = ptr_type %ptr.c62 [concrete] -// CHECK:STDOUT: %Destroy.facet.f98: %Destroy.type = facet_value %ptr.c62, (%Destroy.impl_witness.0f1) [concrete] -// CHECK:STDOUT: %.1e9: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.f98 [concrete] // CHECK:STDOUT: %Op.specific_fn.b24: = specific_function %Op.90d, @Op.3(%ptr.c62) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.20e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.6cf) [concrete] // CHECK:STDOUT: %Op.type.d2a: type = fn_type @Op.3, @impl.49c(%ptr.6cf) [concrete] // CHECK:STDOUT: %Op.3b0: %Op.type.d2a = struct_value () [concrete] // CHECK:STDOUT: %ptr.df0: type = ptr_type %ptr.6cf [concrete] -// CHECK:STDOUT: %Destroy.facet.c42: %Destroy.type = facet_value %ptr.6cf, (%Destroy.impl_witness.20e) [concrete] -// CHECK:STDOUT: %.581: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.c42 [concrete] // CHECK:STDOUT: %Op.specific_fn.3de: = specific_function %Op.3b0, @Op.3(%ptr.6cf) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.ff6: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ForwardDeclared.7b34f2.1) [concrete] // CHECK:STDOUT: %Op.type.308: type = fn_type @Op.3, @impl.49c(%ForwardDeclared.7b34f2.1) [concrete] // CHECK:STDOUT: %Op.9e2: %Op.type.308 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.0e6: %Destroy.type = facet_value %ForwardDeclared.7b34f2.1, (%Destroy.impl_witness.ff6) [concrete] -// CHECK:STDOUT: %.21e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.0e6 [concrete] // CHECK:STDOUT: %Op.specific_fn.09a: = specific_function %Op.9e2, @Op.3(%ForwardDeclared.7b34f2.1) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.913: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Field) [concrete] // CHECK:STDOUT: %Op.type.47c: type = fn_type @Op.3, @impl.49c(%Field) [concrete] // CHECK:STDOUT: %Op.576: %Op.type.47c = struct_value () [concrete] // CHECK:STDOUT: %ptr.d8b: type = ptr_type %Field [concrete] -// CHECK:STDOUT: %Destroy.facet.30c: %Destroy.type = facet_value %Field, (%Destroy.impl_witness.913) [concrete] -// CHECK:STDOUT: %.e41: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.30c [concrete] // CHECK:STDOUT: %Op.specific_fn.29d: = specific_function %Op.576, @Op.3(%Field) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.5ee: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Empty) [concrete] // CHECK:STDOUT: %Op.type.b74: type = fn_type @Op.3, @impl.49c(%Empty) [concrete] // CHECK:STDOUT: %Op.6e4: %Op.type.b74 = struct_value () [concrete] // CHECK:STDOUT: %ptr.961: type = ptr_type %Empty [concrete] -// CHECK:STDOUT: %Destroy.facet.96b: %Destroy.type = facet_value %Empty, (%Destroy.impl_witness.5ee) [concrete] -// CHECK:STDOUT: %.98a: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.96b [concrete] // CHECK:STDOUT: %Op.specific_fn.1a5: = specific_function %Op.6e4, @Op.3(%Empty) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -286,8 +267,6 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.42a = import_ref Main//a, loc14_21, unloaded // CHECK:STDOUT: %Main.import_ref.67a = import_ref Main//a, loc15_27, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -359,10 +338,10 @@ fn Run() { // CHECK:STDOUT: %b.var: ref %Field = var %b.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc9_25.1: %struct_type.x.c96 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc9_25: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] -// CHECK:STDOUT: %bound_method.loc9_25.1: = bound_method %int_1, %impl.elem0.loc9_25 [concrete = constants.%Convert.bound.43e] -// CHECK:STDOUT: %specific_fn.loc9_25: = specific_function %impl.elem0.loc9_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_25.2: = bound_method %int_1, %specific_fn.loc9_25 [concrete = constants.%bound_method.947] +// CHECK:STDOUT: %impl.elem0.loc9: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %bound_method.loc9_25.1: = bound_method %int_1, %impl.elem0.loc9 [concrete = constants.%Convert.bound.43e] +// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_25.2: = bound_method %int_1, %specific_fn.loc9 [concrete = constants.%bound_method.947] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %bound_method.loc9_25.2(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc9_25.2: init %i32 = converted %int_1, %int.convert_checked.loc9 [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc9_25.3: ref %i32 = class_element_access %b.var, element0 @@ -427,36 +406,31 @@ fn Run() { // CHECK:STDOUT: %ptr.loc18: type = ptr_type %Incomplete.ref [concrete = constants.%ptr.c62] // CHECK:STDOUT: } // CHECK:STDOUT: %e: ref %ptr.c62 = bind_name e, %e.var -// CHECK:STDOUT: %impl.elem0.loc18: %.1e9 = impl_witness_access constants.%Destroy.impl_witness.0f1, element0 [concrete = constants.%Op.90d] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %e.var, %impl.elem0.loc18 -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Op.3(constants.%ptr.c62) [concrete = constants.%Op.specific_fn.b24] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %e.var, %specific_fn.loc18 +// CHECK:STDOUT: %Op.bound.loc18: = bound_method %e.var, constants.%Op.90d +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.90d, @Op.3(constants.%ptr.c62) [concrete = constants.%Op.specific_fn.b24] +// CHECK:STDOUT: %bound_method.loc18: = bound_method %e.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18: %ptr.c22 = addr_of %e.var -// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18_3.2(%addr.loc18) -// CHECK:STDOUT: %impl.elem0.loc16: %.581 = impl_witness_access constants.%Destroy.impl_witness.20e, element0 [concrete = constants.%Op.3b0] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %d.var, %impl.elem0.loc16 -// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Op.3(constants.%ptr.6cf) [concrete = constants.%Op.specific_fn.3de] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %d.var, %specific_fn.loc16 +// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18(%addr.loc18) +// CHECK:STDOUT: %Op.bound.loc16: = bound_method %d.var, constants.%Op.3b0 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.3b0, @Op.3(constants.%ptr.6cf) [concrete = constants.%Op.specific_fn.3de] +// CHECK:STDOUT: %bound_method.loc16: = bound_method %d.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc16_3: %ptr.df0 = addr_of %d.var -// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16_3.2(%addr.loc16_3) -// CHECK:STDOUT: %impl.elem0.loc12: %.21e = impl_witness_access constants.%Destroy.impl_witness.ff6, element0 [concrete = constants.%Op.9e2] -// CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %c.var, %impl.elem0.loc12 -// CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Op.3(constants.%ForwardDeclared.7b34f2.1) [concrete = constants.%Op.specific_fn.09a] -// CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %c.var, %specific_fn.loc12 +// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16(%addr.loc16_3) +// CHECK:STDOUT: %Op.bound.loc12: = bound_method %c.var, constants.%Op.9e2 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.9e2, @Op.3(constants.%ForwardDeclared.7b34f2.1) [concrete = constants.%Op.specific_fn.09a] +// CHECK:STDOUT: %bound_method.loc12: = bound_method %c.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc12: %ptr.6cf = addr_of %c.var -// CHECK:STDOUT: %no_op.loc12: init %empty_tuple.type = call %bound_method.loc12_3.2(%addr.loc12) -// CHECK:STDOUT: %impl.elem0.loc9_3: %.e41 = impl_witness_access constants.%Destroy.impl_witness.913, element0 [concrete = constants.%Op.576] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %b.var, %impl.elem0.loc9_3 -// CHECK:STDOUT: %specific_fn.loc9_3: = specific_function %impl.elem0.loc9_3, @Op.3(constants.%Field) [concrete = constants.%Op.specific_fn.29d] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %b.var, %specific_fn.loc9_3 +// CHECK:STDOUT: %no_op.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12) +// CHECK:STDOUT: %Op.bound.loc9: = bound_method %b.var, constants.%Op.576 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.576, @Op.3(constants.%Field) [concrete = constants.%Op.specific_fn.29d] +// CHECK:STDOUT: %bound_method.loc9_3: = bound_method %b.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc9: %ptr.d8b = addr_of %b.var -// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr.loc9) -// CHECK:STDOUT: %impl.elem0.loc7: %.98a = impl_witness_access constants.%Destroy.impl_witness.5ee, element0 [concrete = constants.%Op.6e4] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %a.var, %impl.elem0.loc7 -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.3(constants.%Empty) [concrete = constants.%Op.specific_fn.1a5] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %a.var, %specific_fn.loc7 +// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_3(%addr.loc9) +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %a.var, constants.%Op.6e4 +// CHECK:STDOUT: %Op.specific_fn.5: = specific_function constants.%Op.6e4, @Op.3(constants.%Empty) [concrete = constants.%Op.specific_fn.1a5] +// CHECK:STDOUT: %bound_method.loc7: = bound_method %a.var, %Op.specific_fn.5 // CHECK:STDOUT: %addr.loc7: %ptr.961 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index a3884fcb31f1..34603ea36490 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -183,16 +183,9 @@ fn Run() { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.23a: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Child) [concrete] // CHECK:STDOUT: %Op.type.ea2: type = fn_type @Op.3, @impl.49c(%Child) [concrete] // CHECK:STDOUT: %Op.c04: %Op.type.ea2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.dc0: type = ptr_type %Child [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Child, (%Destroy.impl_witness.23a) [concrete] -// CHECK:STDOUT: %.337: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c04, @Op.3(%Child) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -220,8 +213,6 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.e36 = impl_witness_table (%Core.import_ref.a86), @impl.c81 [concrete] // CHECK:STDOUT: %.720: %Base.elem = field_decl x, element0 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -313,12 +304,11 @@ fn Run() { // CHECK:STDOUT: %.loc9_3.2: ref %Base = converted %a.ref.loc9, %.loc9_3.1 // CHECK:STDOUT: %.loc9_3.3: %Base = bind_value %.loc9_3.2 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound(%.loc9_3.3) -// CHECK:STDOUT: %impl.elem0.loc7_3: %.337 = impl_witness_access constants.%Destroy.impl_witness.23a, element0 [concrete = constants.%Op.c04] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %a.var, %impl.elem0.loc7_3 -// CHECK:STDOUT: %specific_fn.loc7_3: = specific_function %impl.elem0.loc7_3, @Op.3(constants.%Child) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %a.var, %specific_fn.loc7_3 +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.c04 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.c04, @Op.3(constants.%Child) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc7_3: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.dc0 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_member_cycle.carbon b/toolchain/check/testdata/class/import_member_cycle.carbon index 06dd34d2df22..8be9782ebfc3 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -82,16 +82,9 @@ fn Run() { // CHECK:STDOUT: %complete_type.e4b: = complete_type_witness %struct_type.a [concrete] // CHECK:STDOUT: %pattern_type.d3d: type = pattern_type %ptr.257 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2ce: = impl_witness imports.%Destroy.impl_witness_table, @impl(%ptr.257) [concrete] // CHECK:STDOUT: %Op.type.a45: type = fn_type @Op.2, @impl(%ptr.257) [concrete] // CHECK:STDOUT: %Op.109: %Op.type.a45 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d80: type = ptr_type %ptr.257 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.257, (%Destroy.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dff: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.109, @Op.2(%ptr.257) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,8 +99,6 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.3a6 = import_ref Main//a, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4e0 = import_ref Main//a, loc5_8, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -141,12 +132,11 @@ fn Run() { // CHECK:STDOUT: %ptr: type = ptr_type %Cycle.ref [concrete = constants.%ptr.257] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %ptr.257 = bind_name a, %a.var -// CHECK:STDOUT: %impl.elem0: %.dff = impl_witness_access constants.%Destroy.impl_witness.2ce, element0 [concrete = constants.%Op.109] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %a.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%ptr.257) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %a.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.109 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.109, @Op.2(constants.%ptr.257) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d80 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 131943f6ab43..0a7a71fc6681 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -380,16 +380,9 @@ class B { // CHECK:STDOUT: %complete_type.98e: = complete_type_witness %struct_type.base.0ff [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -402,8 +395,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -497,12 +488,11 @@ class B { // CHECK:STDOUT: %.loc15_44.2: ref %empty_tuple.type = temporary %.loc15_44.1, %F.call // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc15_45: %empty_tuple.type = converted %F.call, %tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc15_44.1: = bound_method %.loc15_44.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_44.2: = bound_method %.loc15_44.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc15_44.1, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc15_44.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %.loc15_44.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc15_44.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc15_45 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 7488c6975b76..431ae208d9ec 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -60,16 +60,9 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.5d2, %int_2.ef8) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.fef: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Class) [concrete] // CHECK:STDOUT: %Op.type.7de: type = fn_type @Op.3, @impl.49c(%Class) [concrete] // CHECK:STDOUT: %Op.d64: %Op.type.7de = struct_value () [concrete] // CHECK:STDOUT: %ptr.e71: type = ptr_type %Class [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.fef) [concrete] -// CHECK:STDOUT: %.b9f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d64, @Op.3(%Class) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -86,8 +79,6 @@ fn F() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -155,12 +146,11 @@ fn F() -> i32 { // CHECK:STDOUT: %a.ref: %Class.elem = name_ref a, @Class.%.loc16 [concrete = @Class.%.loc16] // CHECK:STDOUT: %.loc21_37.1: ref %i32 = class_element_access %.loc21_28, element0 // CHECK:STDOUT: %.loc21_37.2: %i32 = bind_value %.loc21_37.1 -// CHECK:STDOUT: %impl.elem0.loc21_26.3: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc21_26.5: = bound_method %.loc21_26.3, %impl.elem0.loc21_26.3 -// CHECK:STDOUT: %specific_fn.loc21_26.3: = specific_function %impl.elem0.loc21_26.3, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc21_26.6: = bound_method %.loc21_26.3, %specific_fn.loc21_26.3 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc21_26.3, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d64, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc21_26.5: = bound_method %.loc21_26.3, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.e71 = addr_of %.loc21_26.3 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc21_26.6(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc21_26.5(%addr) // CHECK:STDOUT: return %.loc21_37.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init_nested.carbon b/toolchain/check/testdata/class/init_nested.carbon index e6dc28cfdc3e..6040a1bd5a63 100644 --- a/toolchain/check/testdata/class/init_nested.carbon +++ b/toolchain/check/testdata/class/init_nested.carbon @@ -51,16 +51,9 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: %MakeOuter.type: type = fn_type @MakeOuter [concrete] // CHECK:STDOUT: %MakeOuter: %MakeOuter.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.14c: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Inner) [concrete] // CHECK:STDOUT: %Op.type.e24: type = fn_type @Op.2, @impl(%Inner) [concrete] // CHECK:STDOUT: %Op.7b1: %Op.type.e24 = struct_value () [concrete] // CHECK:STDOUT: %ptr.78b: type = ptr_type %Inner [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Inner, (%Destroy.impl_witness.14c) [concrete] -// CHECK:STDOUT: %.f61: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.7b1, @Op.2(%Inner) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -73,8 +66,6 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -152,18 +143,16 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: %.loc28_45.3: %struct_type.c.d.dce = struct_literal (%MakeInner.call.loc28_26, %MakeInner.call.loc28_44) // CHECK:STDOUT: %.loc28_45.4: init %Outer = class_init (%MakeInner.call.loc28_26, %MakeInner.call.loc28_44), %return // CHECK:STDOUT: %.loc28_46: init %Outer = converted %.loc28_45.3, %.loc28_45.4 -// CHECK:STDOUT: %impl.elem0.loc28_45.1: %.f61 = impl_witness_access constants.%Destroy.impl_witness.14c, element0 [concrete = constants.%Op.7b1] -// CHECK:STDOUT: %bound_method.loc28_45.1: = bound_method %.loc28_45.2, %impl.elem0.loc28_45.1 -// CHECK:STDOUT: %specific_fn.loc28_45.1: = specific_function %impl.elem0.loc28_45.1, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc28_45.2: = bound_method %.loc28_45.2, %specific_fn.loc28_45.1 +// CHECK:STDOUT: %Op.bound.loc28_45.1: = bound_method %.loc28_45.2, constants.%Op.7b1 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.7b1, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc28_45.1: = bound_method %.loc28_45.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc28_45.1: %ptr.78b = addr_of %.loc28_45.2 -// CHECK:STDOUT: %no_op.loc28_45.1: init %empty_tuple.type = call %bound_method.loc28_45.2(%addr.loc28_45.1) -// CHECK:STDOUT: %impl.elem0.loc28_45.2: %.f61 = impl_witness_access constants.%Destroy.impl_witness.14c, element0 [concrete = constants.%Op.7b1] -// CHECK:STDOUT: %bound_method.loc28_45.3: = bound_method %.loc28_45.1, %impl.elem0.loc28_45.2 -// CHECK:STDOUT: %specific_fn.loc28_45.2: = specific_function %impl.elem0.loc28_45.2, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc28_45.4: = bound_method %.loc28_45.1, %specific_fn.loc28_45.2 +// CHECK:STDOUT: %no_op.loc28_45.1: init %empty_tuple.type = call %bound_method.loc28_45.1(%addr.loc28_45.1) +// CHECK:STDOUT: %Op.bound.loc28_45.2: = bound_method %.loc28_45.1, constants.%Op.7b1 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.7b1, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc28_45.2: = bound_method %.loc28_45.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc28_45.2: %ptr.78b = addr_of %.loc28_45.1 -// CHECK:STDOUT: %no_op.loc28_45.2: init %empty_tuple.type = call %bound_method.loc28_45.4(%addr.loc28_45.2) +// CHECK:STDOUT: %no_op.loc28_45.2: init %empty_tuple.type = call %bound_method.loc28_45.2(%addr.loc28_45.2) // CHECK:STDOUT: return %.loc28_46 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/local.carbon b/toolchain/check/testdata/class/local.carbon index 15007f93cb37..3016d10f739b 100644 --- a/toolchain/check/testdata/class/local.carbon +++ b/toolchain/check/testdata/class/local.carbon @@ -68,16 +68,9 @@ class A { // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %B.val: %B = struct_value (%int_1.5d2) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.8a9: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%B) [concrete] // CHECK:STDOUT: %Op.type.96c: type = fn_type @Op.3, @impl.49c(%B) [concrete] // CHECK:STDOUT: %Op.c53: %Op.type.96c = struct_value () [concrete] // CHECK:STDOUT: %ptr.bac: type = ptr_type %B [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %B, (%Destroy.impl_witness.8a9) [concrete] -// CHECK:STDOUT: %.f0e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c53, @Op.3(%B) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,8 +87,6 @@ class A { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -159,12 +150,11 @@ class A { // CHECK:STDOUT: %n.ref: %B.elem = name_ref n, @B.%.loc23 [concrete = @B.%.loc23] // CHECK:STDOUT: %.loc26_20.1: ref %i32 = class_element_access %.loc26_19.2, element0 // CHECK:STDOUT: %.loc26_20.2: %i32 = bind_value %.loc26_20.1 -// CHECK:STDOUT: %impl.elem0: %.f0e = impl_witness_access constants.%Destroy.impl_witness.8a9, element0 [concrete = constants.%Op.c53] -// CHECK:STDOUT: %bound_method.loc26_19.1: = bound_method %.loc26_19.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%B) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_19.2: = bound_method %.loc26_19.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc26_19.1, constants.%Op.c53 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.c53, @Op.3(constants.%B) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc26_19.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.bac = addr_of %.loc26_19.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26_19.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc26_20.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 903ed869ccfa..6eeb3c5b8c18 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -109,15 +109,8 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.5d2) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.fef: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Class) [concrete] // CHECK:STDOUT: %Op.type.7de: type = fn_type @Op.3, @impl.49c(%Class) [concrete] // CHECK:STDOUT: %Op.d64: %Op.type.7de = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.fef) [concrete] -// CHECK:STDOUT: %.b9f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d64, @Op.3(%Class) [concrete] // CHECK:STDOUT: %CallWithAddr.type: type = fn_type @CallWithAddr [concrete] // CHECK:STDOUT: %CallWithAddr: %CallWithAddr.type = struct_value () [concrete] @@ -146,8 +139,6 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -376,10 +367,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc39_18.1: %struct_type.k.240 = struct_literal (%int_1) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %impl.elem0.loc39_18.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc39_18.1: = bound_method %int_1, %impl.elem0.loc39_18.1 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc39_18.1: = specific_function %impl.elem0.loc39_18.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc39_18.2: = bound_method %int_1, %specific_fn.loc39_18.1 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc39_18.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc39_18.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc39_18.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc39_18.2: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc39_18.3: ref %Class = temporary_storage @@ -394,12 +385,11 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc39_20.2) // CHECK:STDOUT: %.loc39_33.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc39_33.2: %i32 = converted %F.call, %.loc39_33.1 -// CHECK:STDOUT: %impl.elem0.loc39_18.2: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc39_18.3: = bound_method %.loc39_18.3, %impl.elem0.loc39_18.2 -// CHECK:STDOUT: %specific_fn.loc39_18.2: = specific_function %impl.elem0.loc39_18.2, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc39_18.4: = bound_method %.loc39_18.3, %specific_fn.loc39_18.2 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc39_18.3, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d64, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc39_18.3: = bound_method %.loc39_18.3, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.e71 = addr_of %.loc39_18.3 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc39_18.4(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc39_18.3(%addr) // CHECK:STDOUT: return %.loc39_33.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -419,12 +409,11 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%addr.loc44) // CHECK:STDOUT: %.loc44_15.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc44_15.2: %i32 = converted %G.call, %.loc44_15.1 -// CHECK:STDOUT: %impl.elem0: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc43_3.1: = bound_method %c.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc43_3.2: = bound_method %c.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %c.var, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d64, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %c.var, %Op.specific_fn // CHECK:STDOUT: %addr.loc43: %ptr.e71 = addr_of %c.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc43_3.2(%addr.loc43) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr.loc43) // CHECK:STDOUT: return %.loc44_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -468,12 +457,11 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %F.call: init %i32 = call %F.bound(%.loc58_15.3) // CHECK:STDOUT: %.loc58_20.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc58_20.2: %i32 = converted %F.call, %.loc58_20.1 -// CHECK:STDOUT: %impl.elem0: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc58_15.1: = bound_method %.loc58_15.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc58_15.2: = bound_method %.loc58_15.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc58_15.1, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d64, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc58_15.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.e71 = addr_of %.loc58_15.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc58_15.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc58_20.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -489,12 +477,11 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %G.call: init %i32 = call %G.bound(%addr.loc62_15.1) // CHECK:STDOUT: %.loc62_20.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc62_20.2: %i32 = converted %G.call, %.loc62_20.1 -// CHECK:STDOUT: %impl.elem0: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc62_15.1: = bound_method %.loc62_15.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc62_15.2: = bound_method %.loc62_15.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc62_15.1, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d64, @Op.3(constants.%Class) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc62_15.1, %Op.specific_fn // CHECK:STDOUT: %addr.loc62_15.2: %ptr.e71 = addr_of %.loc62_15.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc62_15.2(%addr.loc62_15.2) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr.loc62_15.2) // CHECK:STDOUT: return %.loc62_20.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index 7561fb086d97..1735282b3112 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -78,22 +78,12 @@ fn F(a: Outer*) { // CHECK:STDOUT: %pattern_type.e74: type = pattern_type %Outer [concrete] // CHECK:STDOUT: %pattern_type.906: type = pattern_type %Inner [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.768: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Inner) [concrete] // CHECK:STDOUT: %Op.type.9bc: type = fn_type @Op.2, @impl(%Inner) [concrete] // CHECK:STDOUT: %Op.754: %Op.type.9bc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.adc: %Destroy.type = facet_value %Inner, (%Destroy.impl_witness.768) [concrete] -// CHECK:STDOUT: %.6f6: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.adc [concrete] // CHECK:STDOUT: %pattern_type.27f: type = pattern_type %ptr.36a [concrete] // CHECK:STDOUT: %Op.specific_fn.72f: = specific_function %Op.754, @Op.2(%Inner) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.e12: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Outer) [concrete] // CHECK:STDOUT: %Op.type.50c: type = fn_type @Op.2, @impl(%Outer) [concrete] // CHECK:STDOUT: %Op.8d4: %Op.type.50c = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.c71: %Destroy.type = facet_value %Outer, (%Destroy.impl_witness.e12) [concrete] -// CHECK:STDOUT: %.2c9: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.c71 [concrete] // CHECK:STDOUT: %pattern_type.95c: type = pattern_type %ptr.5df [concrete] // CHECK:STDOUT: %Op.specific_fn.2a1: = specific_function %Op.8d4, @Op.2(%Outer) [concrete] // CHECK:STDOUT: %F.type.b25: type = fn_type @F.2 [concrete] @@ -107,8 +97,6 @@ fn F(a: Outer*) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -201,18 +189,16 @@ fn F(a: Outer*) { // CHECK:STDOUT: %i.var: ref %Inner = var %i.var_patt // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [concrete = constants.%Inner] // CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var -// CHECK:STDOUT: %impl.elem0.loc19: %.6f6 = impl_witness_access constants.%Destroy.impl_witness.768, element0 [concrete = constants.%Op.754] -// CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %i.var, %impl.elem0.loc19 -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn.72f] -// CHECK:STDOUT: %bound_method.loc19_5.2: = bound_method %i.var, %specific_fn.loc19 +// CHECK:STDOUT: %Op.bound.loc19: = bound_method %i.var, constants.%Op.754 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.754, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn.72f] +// CHECK:STDOUT: %bound_method.loc19: = bound_method %i.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc19: %ptr.36a = addr_of %i.var -// CHECK:STDOUT: %no_op.loc19: init %empty_tuple.type = call %bound_method.loc19_5.2(%addr.loc19) -// CHECK:STDOUT: %impl.elem0.loc18: %.2c9 = impl_witness_access constants.%Destroy.impl_witness.e12, element0 [concrete = constants.%Op.8d4] -// CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %o.var, %impl.elem0.loc18 -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Op.2(constants.%Outer) [concrete = constants.%Op.specific_fn.2a1] -// CHECK:STDOUT: %bound_method.loc18_5.2: = bound_method %o.var, %specific_fn.loc18 +// CHECK:STDOUT: %no_op.loc19: init %empty_tuple.type = call %bound_method.loc19(%addr.loc19) +// CHECK:STDOUT: %Op.bound.loc18: = bound_method %o.var, constants.%Op.8d4 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.8d4, @Op.2(constants.%Outer) [concrete = constants.%Op.specific_fn.2a1] +// CHECK:STDOUT: %bound_method.loc18: = bound_method %o.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc18: %ptr.5df = addr_of %o.var -// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18_5.2(%addr.loc18) +// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18(%addr.loc18) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -232,18 +218,16 @@ fn F(a: Outer*) { // CHECK:STDOUT: %i.var: ref %Inner = var %i.var_patt // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [concrete = constants.%Inner] // CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var -// CHECK:STDOUT: %impl.elem0.loc30: %.6f6 = impl_witness_access constants.%Destroy.impl_witness.768, element0 [concrete = constants.%Op.754] -// CHECK:STDOUT: %bound_method.loc30_7.1: = bound_method %i.var, %impl.elem0.loc30 -// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn.72f] -// CHECK:STDOUT: %bound_method.loc30_7.2: = bound_method %i.var, %specific_fn.loc30 +// CHECK:STDOUT: %Op.bound.loc30: = bound_method %i.var, constants.%Op.754 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.754, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn.72f] +// CHECK:STDOUT: %bound_method.loc30: = bound_method %i.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc30: %ptr.36a = addr_of %i.var -// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30_7.2(%addr.loc30) -// CHECK:STDOUT: %impl.elem0.loc29: %.2c9 = impl_witness_access constants.%Destroy.impl_witness.e12, element0 [concrete = constants.%Op.8d4] -// CHECK:STDOUT: %bound_method.loc29_7.1: = bound_method %o.var, %impl.elem0.loc29 -// CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Op.2(constants.%Outer) [concrete = constants.%Op.specific_fn.2a1] -// CHECK:STDOUT: %bound_method.loc29_7.2: = bound_method %o.var, %specific_fn.loc29 +// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30(%addr.loc30) +// CHECK:STDOUT: %Op.bound.loc29: = bound_method %o.var, constants.%Op.8d4 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.8d4, @Op.2(constants.%Outer) [concrete = constants.%Op.specific_fn.2a1] +// CHECK:STDOUT: %bound_method.loc29: = bound_method %o.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc29: %ptr.5df = addr_of %o.var -// CHECK:STDOUT: %no_op.loc29: init %empty_tuple.type = call %bound_method.loc29_7.2(%addr.loc29) +// CHECK:STDOUT: %no_op.loc29: init %empty_tuple.type = call %bound_method.loc29(%addr.loc29) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -263,18 +247,16 @@ fn F(a: Outer*) { // CHECK:STDOUT: %i.var: ref %Inner = var %i.var_patt // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [concrete = constants.%Inner] // CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var -// CHECK:STDOUT: %impl.elem0.loc37: %.6f6 = impl_witness_access constants.%Destroy.impl_witness.768, element0 [concrete = constants.%Op.754] -// CHECK:STDOUT: %bound_method.loc37_5.1: = bound_method %i.var, %impl.elem0.loc37 -// CHECK:STDOUT: %specific_fn.loc37: = specific_function %impl.elem0.loc37, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn.72f] -// CHECK:STDOUT: %bound_method.loc37_5.2: = bound_method %i.var, %specific_fn.loc37 +// CHECK:STDOUT: %Op.bound.loc37: = bound_method %i.var, constants.%Op.754 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.754, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn.72f] +// CHECK:STDOUT: %bound_method.loc37: = bound_method %i.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc37: %ptr.36a = addr_of %i.var -// CHECK:STDOUT: %no_op.loc37: init %empty_tuple.type = call %bound_method.loc37_5.2(%addr.loc37) -// CHECK:STDOUT: %impl.elem0.loc36: %.2c9 = impl_witness_access constants.%Destroy.impl_witness.e12, element0 [concrete = constants.%Op.8d4] -// CHECK:STDOUT: %bound_method.loc36_5.1: = bound_method %o.var, %impl.elem0.loc36 -// CHECK:STDOUT: %specific_fn.loc36: = specific_function %impl.elem0.loc36, @Op.2(constants.%Outer) [concrete = constants.%Op.specific_fn.2a1] -// CHECK:STDOUT: %bound_method.loc36_5.2: = bound_method %o.var, %specific_fn.loc36 +// CHECK:STDOUT: %no_op.loc37: init %empty_tuple.type = call %bound_method.loc37(%addr.loc37) +// CHECK:STDOUT: %Op.bound.loc36: = bound_method %o.var, constants.%Op.8d4 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.8d4, @Op.2(constants.%Outer) [concrete = constants.%Op.specific_fn.2a1] +// CHECK:STDOUT: %bound_method.loc36: = bound_method %o.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc36: %ptr.5df = addr_of %o.var -// CHECK:STDOUT: %no_op.loc36: init %empty_tuple.type = call %bound_method.loc36_5.2(%addr.loc36) +// CHECK:STDOUT: %no_op.loc36: init %empty_tuple.type = call %bound_method.loc36(%addr.loc36) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index 99d757edda72..6384cdf52177 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -49,16 +49,9 @@ fn G(o: Outer) { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.768: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Inner) [concrete] // CHECK:STDOUT: %Op.type.9bc: type = fn_type @Op.2, @impl(%Inner) [concrete] // CHECK:STDOUT: %Op.754: %Op.type.9bc = struct_value () [concrete] // CHECK:STDOUT: %ptr.36a: type = ptr_type %Inner [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Inner, (%Destroy.impl_witness.768) [concrete] -// CHECK:STDOUT: %.6f6: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.754, @Op.2(%Inner) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -71,8 +64,6 @@ fn G(o: Outer) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -156,12 +147,11 @@ fn G(o: Outer) { // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [concrete = constants.%Inner] // CHECK:STDOUT: } // CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var -// CHECK:STDOUT: %impl.elem0: %.6f6 = impl_witness_access constants.%Destroy.impl_witness.768, element0 [concrete = constants.%Op.754] -// CHECK:STDOUT: %bound_method.loc26_3.1: = bound_method %i.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_3.2: = bound_method %i.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %i.var, constants.%Op.754 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.754, @Op.2(constants.%Inner) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %i.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.36a = addr_of %i.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/raw_self_type.carbon b/toolchain/check/testdata/class/raw_self_type.carbon index 9dfc0d127d89..ae1d05f90ce8 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -39,16 +39,9 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %ptr.e71: type = ptr_type %Class [concrete] // CHECK:STDOUT: %pattern_type.796: type = pattern_type %ptr.e71 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.a50: = impl_witness imports.%Destroy.impl_witness_table, @impl(%ptr.e71) [concrete] // CHECK:STDOUT: %Op.type.faa: type = fn_type @Op.2, @impl(%ptr.e71) [concrete] // CHECK:STDOUT: %Op.5a3: %Op.type.faa = struct_value () [concrete] // CHECK:STDOUT: %ptr.0dd: type = ptr_type %ptr.e71 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.e71, (%Destroy.impl_witness.a50) [concrete] -// CHECK:STDOUT: %.9cd: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5a3, @Op.2(%ptr.e71) [concrete] // CHECK:STDOUT: %MemberNamedSelf: type = class_type @MemberNamedSelf [concrete] // CHECK:STDOUT: %Self.362: type = class_type @Self [concrete] @@ -65,8 +58,6 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -163,18 +154,16 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %ptr.loc18: type = ptr_type %Self.ref.loc18_12 [concrete = constants.%ptr.e71] // CHECK:STDOUT: } // CHECK:STDOUT: %p: ref %ptr.e71 = bind_name p, %p.var -// CHECK:STDOUT: %impl.elem0.loc18: %.9cd = impl_witness_access constants.%Destroy.impl_witness.a50, element0 [concrete = constants.%Op.5a3] -// CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %p.var, %impl.elem0.loc18 -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Op.2(constants.%ptr.e71) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_5.2: = bound_method %p.var, %specific_fn.loc18 +// CHECK:STDOUT: %Op.bound.loc18: = bound_method %p.var, constants.%Op.5a3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.5a3, @Op.2(constants.%ptr.e71) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18: = bound_method %p.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18: %ptr.0dd = addr_of %p.var -// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18_5.2(%addr.loc18) -// CHECK:STDOUT: %impl.elem0.loc17: %.9cd = impl_witness_access constants.%Destroy.impl_witness.a50, element0 [concrete = constants.%Op.5a3] -// CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %Self.var, %impl.elem0.loc17 -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Op.2(constants.%ptr.e71) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_5.2: = bound_method %Self.var, %specific_fn.loc17 +// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18(%addr.loc18) +// CHECK:STDOUT: %Op.bound.loc17: = bound_method %Self.var, constants.%Op.5a3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.5a3, @Op.2(constants.%ptr.e71) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc17: = bound_method %Self.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc17: %ptr.0dd = addr_of %Self.var -// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17_5.2(%addr.loc17) +// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17(%addr.loc17) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index a2ae0cebb953..5e2116dd7d42 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -126,37 +126,21 @@ class A { // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %D.val: %D = struct_value (%int_4.940) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.102: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%D) [concrete] // CHECK:STDOUT: %Op.type.7e3: type = fn_type @Op.3, @impl.49c(%D) [concrete] // CHECK:STDOUT: %Op.47c: %Op.type.7e3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.321: type = ptr_type %D [concrete] -// CHECK:STDOUT: %Destroy.facet.18e: %Destroy.type = facet_value %D, (%Destroy.impl_witness.102) [concrete] -// CHECK:STDOUT: %.8ce: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.18e [concrete] // CHECK:STDOUT: %Op.specific_fn.ceb: = specific_function %Op.47c, @Op.3(%D) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.c38: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.2eb: type = fn_type @Op.3, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.f77: %Op.type.2eb = struct_value () [concrete] // CHECK:STDOUT: %ptr.388: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.8bd: %Destroy.type = facet_value %C, (%Destroy.impl_witness.c38) [concrete] -// CHECK:STDOUT: %.e53: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.8bd [concrete] // CHECK:STDOUT: %Op.specific_fn.c65: = specific_function %Op.f77, @Op.3(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.7c6: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%B) [concrete] // CHECK:STDOUT: %Op.type.266: type = fn_type @Op.3, @impl.49c(%B) [concrete] // CHECK:STDOUT: %Op.4a4: %Op.type.266 = struct_value () [concrete] // CHECK:STDOUT: %ptr.01b: type = ptr_type %B [concrete] -// CHECK:STDOUT: %Destroy.facet.422: %Destroy.type = facet_value %B, (%Destroy.impl_witness.7c6) [concrete] -// CHECK:STDOUT: %.24f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.422 [concrete] // CHECK:STDOUT: %Op.specific_fn.70c: = specific_function %Op.4a4, @Op.3(%B) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.b6e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%A) [concrete] // CHECK:STDOUT: %Op.type.b96: type = fn_type @Op.3, @impl.49c(%A) [concrete] // CHECK:STDOUT: %Op.885: %Op.type.b96 = struct_value () [concrete] // CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete] -// CHECK:STDOUT: %Destroy.facet.4a1: %Destroy.type = facet_value %A, (%Destroy.impl_witness.b6e) [concrete] -// CHECK:STDOUT: %.af1: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.4a1 [concrete] // CHECK:STDOUT: %Op.specific_fn.716: = specific_function %Op.885, @Op.3(%A) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -173,8 +157,6 @@ class A { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -285,10 +267,10 @@ class A { // CHECK:STDOUT: %a.var: ref %A = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc33_25.1: %struct_type.a.a6c = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc33_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc33_25.1: = bound_method %int_1, %impl.elem0.loc33_25 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc33_25: = specific_function %impl.elem0.loc33_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc33_25.2: = bound_method %int_1, %specific_fn.loc33_25 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0.loc33: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc33_25.1: = bound_method %int_1, %impl.elem0.loc33 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc33_25.2: = bound_method %int_1, %specific_fn.loc33 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %bound_method.loc33_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc33_25.2: init %i32 = converted %int_1, %int.convert_checked.loc33 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc33_25.3: ref %i32 = class_element_access %a.var, element0 @@ -305,10 +287,10 @@ class A { // CHECK:STDOUT: %b.var: ref %B = var %b.var_patt // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc34_25.1: %struct_type.b.a15 = struct_literal (%int_2) -// CHECK:STDOUT: %impl.elem0.loc34_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc34_25.1: = bound_method %int_2, %impl.elem0.loc34_25 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc34_25: = specific_function %impl.elem0.loc34_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc34_25.2: = bound_method %int_2, %specific_fn.loc34_25 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %impl.elem0.loc34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc34_25.1: = bound_method %int_2, %impl.elem0.loc34 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc34_25.2: = bound_method %int_2, %specific_fn.loc34 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc34: init %i32 = call %bound_method.loc34_25.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc34_25.2: init %i32 = converted %int_2, %int.convert_checked.loc34 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc34_25.3: ref %i32 = class_element_access %b.var, element0 @@ -325,10 +307,10 @@ class A { // CHECK:STDOUT: %c.var: ref %C = var %c.var_patt // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc35_25.1: %struct_type.c.5b8 = struct_literal (%int_3) -// CHECK:STDOUT: %impl.elem0.loc35_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc35_25.1: = bound_method %int_3, %impl.elem0.loc35_25 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc35_25: = specific_function %impl.elem0.loc35_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc35_25.2: = bound_method %int_3, %specific_fn.loc35_25 [concrete = constants.%bound_method.047] +// CHECK:STDOUT: %impl.elem0.loc35: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc35_25.1: = bound_method %int_3, %impl.elem0.loc35 [concrete = constants.%Convert.bound.b30] +// CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc35_25.2: = bound_method %int_3, %specific_fn.loc35 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %bound_method.loc35_25.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc35_25.2: init %i32 = converted %int_3, %int.convert_checked.loc35 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc35_25.3: ref %i32 = class_element_access %c.var, element0 @@ -345,10 +327,10 @@ class A { // CHECK:STDOUT: %d.var: ref %D = var %d.var_patt // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc36_25.1: %struct_type.d.3ea = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0.loc36_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc36_25.1: = bound_method %int_4, %impl.elem0.loc36_25 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc36_25: = specific_function %impl.elem0.loc36_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc36_25.2: = bound_method %int_4, %specific_fn.loc36_25 [concrete = constants.%bound_method.1da] +// CHECK:STDOUT: %impl.elem0.loc36: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc36_25.1: = bound_method %int_4, %impl.elem0.loc36 [concrete = constants.%Convert.bound.ac3] +// CHECK:STDOUT: %specific_fn.loc36: = specific_function %impl.elem0.loc36, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc36_25.2: = bound_method %int_4, %specific_fn.loc36 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %bound_method.loc36_25.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc36_25.2: init %i32 = converted %int_4, %int.convert_checked.loc36 [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc36_25.3: ref %i32 = class_element_access %d.var, element0 @@ -366,30 +348,26 @@ class A { // CHECK:STDOUT: %CF.call: init %empty_tuple.type = call %CF.ref() // CHECK:STDOUT: %DF.ref: %DF.type = name_ref DF, @D.%DF.decl [concrete = constants.%DF] // CHECK:STDOUT: %DF.call: init %empty_tuple.type = call %DF.ref() -// CHECK:STDOUT: %impl.elem0.loc36_7: %.8ce = impl_witness_access constants.%Destroy.impl_witness.102, element0 [concrete = constants.%Op.47c] -// CHECK:STDOUT: %bound_method.loc36_7.1: = bound_method %d.var, %impl.elem0.loc36_7 -// CHECK:STDOUT: %specific_fn.loc36_7: = specific_function %impl.elem0.loc36_7, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn.ceb] -// CHECK:STDOUT: %bound_method.loc36_7.2: = bound_method %d.var, %specific_fn.loc36_7 +// CHECK:STDOUT: %Op.bound.loc36: = bound_method %d.var, constants.%Op.47c +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.47c, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn.ceb] +// CHECK:STDOUT: %bound_method.loc36_7: = bound_method %d.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc36: %ptr.321 = addr_of %d.var -// CHECK:STDOUT: %no_op.loc36: init %empty_tuple.type = call %bound_method.loc36_7.2(%addr.loc36) -// CHECK:STDOUT: %impl.elem0.loc35_7: %.e53 = impl_witness_access constants.%Destroy.impl_witness.c38, element0 [concrete = constants.%Op.f77] -// CHECK:STDOUT: %bound_method.loc35_7.1: = bound_method %c.var, %impl.elem0.loc35_7 -// CHECK:STDOUT: %specific_fn.loc35_7: = specific_function %impl.elem0.loc35_7, @Op.3(constants.%C) [concrete = constants.%Op.specific_fn.c65] -// CHECK:STDOUT: %bound_method.loc35_7.2: = bound_method %c.var, %specific_fn.loc35_7 +// CHECK:STDOUT: %no_op.loc36: init %empty_tuple.type = call %bound_method.loc36_7(%addr.loc36) +// CHECK:STDOUT: %Op.bound.loc35: = bound_method %c.var, constants.%Op.f77 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.f77, @Op.3(constants.%C) [concrete = constants.%Op.specific_fn.c65] +// CHECK:STDOUT: %bound_method.loc35_7: = bound_method %c.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc35: %ptr.388 = addr_of %c.var -// CHECK:STDOUT: %no_op.loc35: init %empty_tuple.type = call %bound_method.loc35_7.2(%addr.loc35) -// CHECK:STDOUT: %impl.elem0.loc34_7: %.24f = impl_witness_access constants.%Destroy.impl_witness.7c6, element0 [concrete = constants.%Op.4a4] -// CHECK:STDOUT: %bound_method.loc34_7.1: = bound_method %b.var, %impl.elem0.loc34_7 -// CHECK:STDOUT: %specific_fn.loc34_7: = specific_function %impl.elem0.loc34_7, @Op.3(constants.%B) [concrete = constants.%Op.specific_fn.70c] -// CHECK:STDOUT: %bound_method.loc34_7.2: = bound_method %b.var, %specific_fn.loc34_7 +// CHECK:STDOUT: %no_op.loc35: init %empty_tuple.type = call %bound_method.loc35_7(%addr.loc35) +// CHECK:STDOUT: %Op.bound.loc34: = bound_method %b.var, constants.%Op.4a4 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.4a4, @Op.3(constants.%B) [concrete = constants.%Op.specific_fn.70c] +// CHECK:STDOUT: %bound_method.loc34_7: = bound_method %b.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc34: %ptr.01b = addr_of %b.var -// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34_7.2(%addr.loc34) -// CHECK:STDOUT: %impl.elem0.loc33_7: %.af1 = impl_witness_access constants.%Destroy.impl_witness.b6e, element0 [concrete = constants.%Op.885] -// CHECK:STDOUT: %bound_method.loc33_7.1: = bound_method %a.var, %impl.elem0.loc33_7 -// CHECK:STDOUT: %specific_fn.loc33_7: = specific_function %impl.elem0.loc33_7, @Op.3(constants.%A) [concrete = constants.%Op.specific_fn.716] -// CHECK:STDOUT: %bound_method.loc33_7.2: = bound_method %a.var, %specific_fn.loc33_7 +// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34_7(%addr.loc34) +// CHECK:STDOUT: %Op.bound.loc33: = bound_method %a.var, constants.%Op.885 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.885, @Op.3(constants.%A) [concrete = constants.%Op.specific_fn.716] +// CHECK:STDOUT: %bound_method.loc33_7: = bound_method %a.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc33: %ptr.6db = addr_of %a.var -// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33_7.2(%addr.loc33) +// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33_7(%addr.loc33) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index c7d876d81235..b0c1deda4e97 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -73,16 +73,9 @@ fn Run() { // CHECK:STDOUT: %Run.type: type = fn_type @Run [concrete] // CHECK:STDOUT: %Run: %Run.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -99,8 +92,6 @@ fn Run() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -217,18 +208,16 @@ fn Run() { // CHECK:STDOUT: %i32.loc31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0.loc31: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc31_3.1: = bound_method %b.var, %impl.elem0.loc31 -// CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc31_3.2: = bound_method %b.var, %specific_fn.loc31 +// CHECK:STDOUT: %Op.bound.loc31: = bound_method %b.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc31: = bound_method %b.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc31: %ptr.235 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc31: init %empty_tuple.type = call %bound_method.loc31_3.2(%addr.loc31) -// CHECK:STDOUT: %impl.elem0.loc30: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc30_3.1: = bound_method %a.var, %impl.elem0.loc30 -// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc30_3.2: = bound_method %a.var, %specific_fn.loc30 +// CHECK:STDOUT: %no_op.loc31: init %empty_tuple.type = call %bound_method.loc31(%addr.loc31) +// CHECK:STDOUT: %Op.bound.loc30: = bound_method %a.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc30: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc30: %ptr.235 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30_3.2(%addr.loc30) +// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30(%addr.loc30) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/static_method.carbon b/toolchain/check/testdata/class/static_method.carbon index 691bc028d603..63563f1c2833 100644 --- a/toolchain/check/testdata/class/static_method.carbon +++ b/toolchain/check/testdata/class/static_method.carbon @@ -39,16 +39,9 @@ fn Run() -> i32 { // CHECK:STDOUT: %Run: %Run.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.761: type = pattern_type %Class [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.fef: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Class) [concrete] // CHECK:STDOUT: %Op.type.7de: type = fn_type @Op.2, @impl(%Class) [concrete] // CHECK:STDOUT: %Op.d64: %Op.type.7de = struct_value () [concrete] // CHECK:STDOUT: %ptr.e71: type = ptr_type %Class [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.fef) [concrete] -// CHECK:STDOUT: %.b9f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d64, @Op.2(%Class) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -61,8 +54,6 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -121,12 +112,11 @@ fn Run() -> i32 { // CHECK:STDOUT: %F.call: init %i32 = call %F.ref() // CHECK:STDOUT: %.loc21_15.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc21_15.2: %i32 = converted %F.call, %.loc21_15.1 -// CHECK:STDOUT: %impl.elem0: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %c.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%Class) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %c.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %c.var, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d64, @Op.2(constants.%Class) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %c.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.e71 = addr_of %c.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc21_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 414dfe6c12b8..bd9b9557e449 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -476,16 +476,9 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: %Base.val: %Base = struct_value (%Derived.vtable_ptr) [concrete] // CHECK:STDOUT: %Derived.val: %Derived = struct_value (%Base.val) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.ff9: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Derived) [concrete] // CHECK:STDOUT: %Op.type.102: type = fn_type @Op.2, @impl(%Derived) [concrete] // CHECK:STDOUT: %Op.539: %Op.type.102 = struct_value () [concrete] // CHECK:STDOUT: %ptr.404: type = ptr_type %Derived [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Derived, (%Destroy.impl_witness.ff9) [concrete] -// CHECK:STDOUT: %.3cb: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.539, @Op.2(%Derived) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -505,8 +498,6 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst18 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -588,12 +579,11 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: assign %d.var, %.loc12_3 // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived] // CHECK:STDOUT: %d: ref %Derived = bind_name d, %d.var -// CHECK:STDOUT: %impl.elem0: %.3cb = impl_witness_access constants.%Destroy.impl_witness.ff9, element0 [concrete = constants.%Op.539] -// CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %d.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%Derived) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %d.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %d.var, constants.%Op.539 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.539, @Op.2(constants.%Derived) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %d.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.404 = addr_of %d.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc12_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -709,16 +699,9 @@ fn F(b: Modifiers.Base); // 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] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.cec: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Base) [concrete] // CHECK:STDOUT: %Op.type.47e: type = fn_type @Op.2, @impl(%Base) [concrete] // CHECK:STDOUT: %Op.033: %Op.type.47e = struct_value () [concrete] // CHECK:STDOUT: %ptr.f03: type = ptr_type %Base [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Base, (%Destroy.impl_witness.cec) [concrete] -// CHECK:STDOUT: %.3f1: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.033, @Op.2(%Base) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -738,8 +721,6 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst18 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -784,12 +765,11 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%Modifiers.Base [concrete = constants.%Base] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %Base = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0: %.3f1 = impl_witness_access constants.%Destroy.impl_witness.cec, element0 [concrete = constants.%Op.033] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%Base) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %v.var, constants.%Op.033 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.033, @Op.2(constants.%Base) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.f03 = addr_of %v.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -931,30 +911,17 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: %B2.val.426: %B2 = struct_value (%B1.val.b9d) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value (%B2.val.426) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.494: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.494 [concrete] // CHECK:STDOUT: %Op.specific_fn.6eb: = specific_function %Op.5d7, @Op.2(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.453: = impl_witness imports.%Destroy.impl_witness_table, @impl(%B2) [concrete] // CHECK:STDOUT: %Op.type.49c: type = fn_type @Op.2, @impl(%B2) [concrete] // CHECK:STDOUT: %Op.bb0: %Op.type.49c = struct_value () [concrete] // CHECK:STDOUT: %ptr.afe: type = ptr_type %B2 [concrete] -// CHECK:STDOUT: %Destroy.facet.0c6: %Destroy.type = facet_value %B2, (%Destroy.impl_witness.453) [concrete] -// CHECK:STDOUT: %.65f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.0c6 [concrete] // CHECK:STDOUT: %Op.specific_fn.a6f: = specific_function %Op.bb0, @Op.2(%B2) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.67b: = impl_witness imports.%Destroy.impl_witness_table, @impl(%B1) [concrete] // CHECK:STDOUT: %Op.type.5ba: type = fn_type @Op.2, @impl(%B1) [concrete] // CHECK:STDOUT: %Op.a5c: %Op.type.5ba = struct_value () [concrete] // CHECK:STDOUT: %ptr.890: type = ptr_type %B1 [concrete] -// CHECK:STDOUT: %Destroy.facet.7f9: %Destroy.type = facet_value %B1, (%Destroy.impl_witness.67b) [concrete] -// CHECK:STDOUT: %.3cf: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.7f9 [concrete] // CHECK:STDOUT: %Op.specific_fn.075: = specific_function %Op.a5c, @Op.2(%B1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -965,8 +932,6 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1125,24 +1090,21 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: assign %c.var, %.loc21_3 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %impl.elem0.loc21: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc21_3.1: = bound_method %c.var, %impl.elem0.loc21 -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] -// CHECK:STDOUT: %bound_method.loc21_3.2: = bound_method %c.var, %specific_fn.loc21 +// CHECK:STDOUT: %Op.bound.loc21: = bound_method %c.var, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] +// CHECK:STDOUT: %bound_method.loc21: = bound_method %c.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc21: %ptr.019 = addr_of %c.var -// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21_3.2(%addr.loc21) -// CHECK:STDOUT: %impl.elem0.loc20: %.65f = impl_witness_access constants.%Destroy.impl_witness.453, element0 [concrete = constants.%Op.bb0] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %b2.var, %impl.elem0.loc20 -// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Op.2(constants.%B2) [concrete = constants.%Op.specific_fn.a6f] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %b2.var, %specific_fn.loc20 +// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21) +// CHECK:STDOUT: %Op.bound.loc20: = bound_method %b2.var, constants.%Op.bb0 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.bb0, @Op.2(constants.%B2) [concrete = constants.%Op.specific_fn.a6f] +// CHECK:STDOUT: %bound_method.loc20: = bound_method %b2.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc20: %ptr.afe = addr_of %b2.var -// CHECK:STDOUT: %no_op.loc20: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr.loc20) -// CHECK:STDOUT: %impl.elem0.loc19: %.3cf = impl_witness_access constants.%Destroy.impl_witness.67b, element0 [concrete = constants.%Op.a5c] -// CHECK:STDOUT: %bound_method.loc19_3.1: = bound_method %b1.var, %impl.elem0.loc19 -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Op.2(constants.%B1) [concrete = constants.%Op.specific_fn.075] -// CHECK:STDOUT: %bound_method.loc19_3.2: = bound_method %b1.var, %specific_fn.loc19 +// CHECK:STDOUT: %no_op.loc20: init %empty_tuple.type = call %bound_method.loc20(%addr.loc20) +// CHECK:STDOUT: %Op.bound.loc19: = bound_method %b1.var, constants.%Op.a5c +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.a5c, @Op.2(constants.%B1) [concrete = constants.%Op.specific_fn.075] +// CHECK:STDOUT: %bound_method.loc19: = bound_method %b1.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc19: %ptr.890 = addr_of %b1.var -// CHECK:STDOUT: %no_op.loc19: init %empty_tuple.type = call %bound_method.loc19_3.2(%addr.loc19) +// CHECK:STDOUT: %no_op.loc19: init %empty_tuple.type = call %bound_method.loc19(%addr.loc19) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1248,23 +1210,13 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: %bound_method.1da: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.dfd: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Base) [concrete] // CHECK:STDOUT: %Op.type.193: type = fn_type @Op.3, @impl.49c(%Base) [concrete] // CHECK:STDOUT: %Op.345: %Op.type.193 = struct_value () [concrete] // CHECK:STDOUT: %ptr.11f: type = ptr_type %Base [concrete] -// CHECK:STDOUT: %Destroy.facet.055: %Destroy.type = facet_value %Base, (%Destroy.impl_witness.dfd) [concrete] -// CHECK:STDOUT: %.097: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.055 [concrete] // CHECK:STDOUT: %Op.specific_fn.083: = specific_function %Op.345, @Op.3(%Base) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1281,8 +1233,6 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1338,10 +1288,10 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: } // CHECK:STDOUT: %i.var: ref %i32 = var %i.var_patt // CHECK:STDOUT: %int_3.loc12: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc12_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_3.loc12, %impl.elem0.loc12_3.1 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc12_3.1: = specific_function %impl.elem0.loc12_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_3.loc12, %specific_fn.loc12_3.1 [concrete = constants.%bound_method.047] +// CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_3.loc12, %impl.elem0.loc12 [concrete = constants.%Convert.bound.b30] +// CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_3.loc12, %specific_fn.loc12 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %bound_method.loc12_3.2(%int_3.loc12) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc12_3: init %i32 = converted %int_3.loc12, %int.convert_checked.loc12 [concrete = constants.%int_3.822] // CHECK:STDOUT: assign %i.var, %.loc12_3 @@ -1413,24 +1363,21 @@ fn F(b: Modifiers.Base); // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_9.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc18_9: init %i32 = converted %int_4, %int.convert_checked.loc18 [concrete = constants.%int_4.940] // CHECK:STDOUT: assign %.loc18_5, %.loc18_9 -// CHECK:STDOUT: %impl.elem0.loc15_3: %.097 = impl_witness_access constants.%Destroy.impl_witness.dfd, element0 [concrete = constants.%Op.345] -// CHECK:STDOUT: %bound_method.loc15_3.1: = bound_method %b2.var, %impl.elem0.loc15_3 -// CHECK:STDOUT: %specific_fn.loc15_3: = specific_function %impl.elem0.loc15_3, @Op.3(constants.%Base) [concrete = constants.%Op.specific_fn.083] -// CHECK:STDOUT: %bound_method.loc15_3.2: = bound_method %b2.var, %specific_fn.loc15_3 +// CHECK:STDOUT: %Op.bound.loc15: = bound_method %b2.var, constants.%Op.345 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.345, @Op.3(constants.%Base) [concrete = constants.%Op.specific_fn.083] +// CHECK:STDOUT: %bound_method.loc15_3: = bound_method %b2.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc15: %ptr.11f = addr_of %b2.var -// CHECK:STDOUT: %no_op.loc15: init %empty_tuple.type = call %bound_method.loc15_3.2(%addr.loc15) -// CHECK:STDOUT: %impl.elem0.loc14: %.097 = impl_witness_access constants.%Destroy.impl_witness.dfd, element0 [concrete = constants.%Op.345] -// CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %b1.var, %impl.elem0.loc14 -// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Op.3(constants.%Base) [concrete = constants.%Op.specific_fn.083] -// CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %b1.var, %specific_fn.loc14 +// CHECK:STDOUT: %no_op.loc15: init %empty_tuple.type = call %bound_method.loc15_3(%addr.loc15) +// CHECK:STDOUT: %Op.bound.loc14: = bound_method %b1.var, constants.%Op.345 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.345, @Op.3(constants.%Base) [concrete = constants.%Op.specific_fn.083] +// CHECK:STDOUT: %bound_method.loc14: = bound_method %b1.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc14: %ptr.11f = addr_of %b1.var -// CHECK:STDOUT: %no_op.loc14: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr.loc14) -// CHECK:STDOUT: %impl.elem0.loc12_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc12_3.3: = bound_method %i.var, %impl.elem0.loc12_3.2 -// CHECK:STDOUT: %specific_fn.loc12_3.2: = specific_function %impl.elem0.loc12_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc12_3.4: = bound_method %i.var, %specific_fn.loc12_3.2 +// CHECK:STDOUT: %no_op.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14) +// CHECK:STDOUT: %Op.bound.loc12: = bound_method %i.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc12_3.3: = bound_method %i.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc12: %ptr.235 = addr_of %i.var -// CHECK:STDOUT: %no_op.loc12: init %empty_tuple.type = call %bound_method.loc12_3.4(%addr.loc12) +// CHECK:STDOUT: %no_op.loc12: init %empty_tuple.type = call %bound_method.loc12_3.3(%addr.loc12) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index d44c27b944bf..86e25456e4da 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -176,21 +176,12 @@ fn G() -> i32 { // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.3, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.494: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.494 [concrete] // CHECK:STDOUT: %Op.specific_fn.6eb: = specific_function %Op.5d7, @Op.3(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.f2c: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type.002) [concrete] // CHECK:STDOUT: %Op.type.85d: type = fn_type @Op.3, @impl.49c(%array_type.002) [concrete] // CHECK:STDOUT: %Op.1f9: %Op.type.85d = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.de0: %Destroy.type = facet_value %array_type.002, (%Destroy.impl_witness.f2c) [concrete] -// CHECK:STDOUT: %.4c4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.de0 [concrete] // CHECK:STDOUT: %Op.specific_fn.f55: = specific_function %Op.1f9, @Op.3(%array_type.002) [concrete] // CHECK:STDOUT: %complete_type.dd1: = complete_type_witness %array_type.002 [concrete] // CHECK:STDOUT: } @@ -208,8 +199,6 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -327,18 +316,16 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc8: ref %C = splice_block %return {} // CHECK:STDOUT: %.loc10: %array_type.002 = bind_value %a.ref // CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%.loc10) to %.loc8 -// CHECK:STDOUT: %impl.elem0.loc8: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc8_8.1: = bound_method %.loc8, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.3(constants.%C) [concrete = constants.%Op.specific_fn.6eb] -// CHECK:STDOUT: %bound_method.loc8_8.2: = bound_method %.loc8, %specific_fn.loc8 +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %.loc8, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.5d7, @Op.3(constants.%C) [concrete = constants.%Op.specific_fn.6eb] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8: %ptr.019 = addr_of %.loc8 -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_8.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc9: %.4c4 = impl_witness_access constants.%Destroy.impl_witness.f2c, element0 [concrete = constants.%Op.1f9] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %a.var, %impl.elem0.loc9 -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Op.3(constants.%array_type.002) [concrete = constants.%Op.specific_fn.f55] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %a.var, %specific_fn.loc9 +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %Op.bound.loc9: = bound_method %a.var, constants.%Op.1f9 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.1f9, @Op.3(constants.%array_type.002) [concrete = constants.%Op.specific_fn.f55] +// CHECK:STDOUT: %bound_method.loc9: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr.loc9) +// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -411,15 +398,8 @@ fn G() -> i32 { // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.f2c: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type.002) [concrete] // CHECK:STDOUT: %Op.type.85d: type = fn_type @Op.3, @impl.49c(%array_type.002) [concrete] // CHECK:STDOUT: %Op.1f9: %Op.type.85d = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.002, (%Destroy.impl_witness.f2c) [concrete] -// CHECK:STDOUT: %.4c4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.1f9, @Op.3(%array_type.002) [concrete] // CHECK:STDOUT: %complete_type.dd1: = complete_type_witness %array_type.002 [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] @@ -442,8 +422,6 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -566,12 +544,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn(%.loc10_12) // CHECK:STDOUT: %.loc10_14.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc10_14.2: %i32 = converted %F.call, %.loc10_14.1 -// CHECK:STDOUT: %impl.elem0: %.4c4 = impl_witness_access constants.%Destroy.impl_witness.f2c, element0 [concrete = constants.%Op.1f9] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %a.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%array_type.002) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %a.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.1f9 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.1f9, @Op.3(constants.%array_type.002) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc10_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -625,14 +602,8 @@ fn G() -> i32 { // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C, %int_3) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.f2c: = impl_witness imports.%Destroy.impl_witness_table, @impl(%array_type.002) [concrete] // CHECK:STDOUT: %Op.type.85d: type = fn_type @Op.2, @impl(%array_type.002) [concrete] // CHECK:STDOUT: %Op.1f9: %Op.type.85d = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.002, (%Destroy.impl_witness.f2c) [concrete] -// CHECK:STDOUT: %.4c4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.1f9, @Op.2(%array_type.002) [concrete] // CHECK:STDOUT: %complete_type.dd1: = complete_type_witness %array_type.002 [concrete] // CHECK:STDOUT: } @@ -646,8 +617,6 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -746,12 +715,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C, constants.%int_3) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc10: %array_type.002 = bind_value %a.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc10) -// CHECK:STDOUT: %impl.elem0: %.4c4 = impl_witness_access constants.%Destroy.impl_witness.f2c, element0 [concrete = constants.%Op.1f9] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %a.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%array_type.002) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %a.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.1f9 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.1f9, @Op.2(constants.%array_type.002) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -825,21 +793,12 @@ fn G() -> i32 { // CHECK:STDOUT: %pattern_type.114: type = pattern_type %array_type.15a [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.3, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.494: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.494 [concrete] // CHECK:STDOUT: %Op.specific_fn.6eb: = specific_function %Op.5d7, @Op.3(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.f2c: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type.002) [concrete] // CHECK:STDOUT: %Op.type.85d: type = fn_type @Op.3, @impl.49c(%array_type.002) [concrete] // CHECK:STDOUT: %Op.1f9: %Op.type.85d = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.de0: %Destroy.type = facet_value %array_type.002, (%Destroy.impl_witness.f2c) [concrete] -// CHECK:STDOUT: %.4c4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.de0 [concrete] // CHECK:STDOUT: %Op.specific_fn.f55: = specific_function %Op.1f9, @Op.3(%array_type.002) [concrete] // CHECK:STDOUT: %complete_type.8eb: = complete_type_witness %array_type.15a [concrete] // CHECK:STDOUT: } @@ -857,8 +816,6 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -976,18 +933,16 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc8: ref %C = splice_block %return {} // CHECK:STDOUT: %.loc21: %array_type.15a = converted %a.ref, [concrete = ] // CHECK:STDOUT: %F.call: init %C = call %F.specific_fn() to %.loc8 -// CHECK:STDOUT: %impl.elem0.loc8: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc8_8.1: = bound_method %.loc8, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.3(constants.%C) [concrete = constants.%Op.specific_fn.6eb] -// CHECK:STDOUT: %bound_method.loc8_8.2: = bound_method %.loc8, %specific_fn.loc8 +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %.loc8, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.5d7, @Op.3(constants.%C) [concrete = constants.%Op.specific_fn.6eb] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8: %ptr.019 = addr_of %.loc8 -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_8.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc10: %.4c4 = impl_witness_access constants.%Destroy.impl_witness.f2c, element0 [concrete = constants.%Op.1f9] -// CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %a.var, %impl.elem0.loc10 -// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Op.3(constants.%array_type.002) [concrete = constants.%Op.specific_fn.f55] -// CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %a.var, %specific_fn.loc10 +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %Op.bound.loc10: = bound_method %a.var, constants.%Op.1f9 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.1f9, @Op.3(constants.%array_type.002) [concrete = constants.%Op.specific_fn.f55] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10_3.2(%addr.loc10) +// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1063,15 +1018,8 @@ fn G() -> i32 { // CHECK:STDOUT: %pattern_type.a63: type = pattern_type %array_type.002 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.51e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type.fe4) [concrete] // CHECK:STDOUT: %Op.type.419: type = fn_type @Op.3, @impl.49c(%array_type.fe4) [concrete] // CHECK:STDOUT: %Op.11a: %Op.type.419 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.fe4, (%Destroy.impl_witness.51e) [concrete] -// CHECK:STDOUT: %.761: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.11a, @Op.3(%array_type.fe4) [concrete] // CHECK:STDOUT: %complete_type.dd1: = complete_type_witness %array_type.002 [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] @@ -1094,8 +1042,6 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1229,12 +1175,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn() // CHECK:STDOUT: %.loc22_14.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc22_14.2: %i32 = converted %F.call, %.loc22_14.1 -// CHECK:STDOUT: %impl.elem0: %.761 = impl_witness_access constants.%Destroy.impl_witness.51e, element0 [concrete = constants.%Op.11a] -// CHECK:STDOUT: %bound_method.loc11_3.1: = bound_method %a.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%array_type.fe4) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_3.2: = bound_method %a.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.11a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.11a, @Op.3(constants.%array_type.fe4) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.af6 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc11_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc22_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1303,15 +1248,8 @@ fn G() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.f2c: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type.002) [concrete] // CHECK:STDOUT: %Op.type.85d: type = fn_type @Op.3, @impl.49c(%array_type.002) [concrete] // CHECK:STDOUT: %Op.1f9: %Op.type.85d = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.002, (%Destroy.impl_witness.f2c) [concrete] -// CHECK:STDOUT: %.4c4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.1f9, @Op.3(%array_type.002) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1328,8 +1266,6 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/parts/int, loc20_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (%Core.import_ref.85c), @impl.971 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1444,12 +1380,11 @@ fn G() -> i32 { // CHECK:STDOUT: %a: ref %array_type.002 = bind_name a, %a.var // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %a.ref: ref %array_type.002 = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.4c4 = impl_witness_access constants.%Destroy.impl_witness.f2c, element0 [concrete = constants.%Op.1f9] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %a.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%array_type.002) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %a.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.1f9 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.1f9, @Op.3(constants.%array_type.002) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 5168e325eabb..5fd361b73032 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -95,15 +95,9 @@ fn G() -> i32 { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn.c4a: = specific_function %F, @F(%D) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.45e: = impl_witness imports.%Destroy.impl_witness_table, @impl(%D) [concrete] // CHECK:STDOUT: %Op.type.548: type = fn_type @Op.2, @impl(%D) [concrete] // CHECK:STDOUT: %Op.2d4: %Op.type.548 = struct_value () [concrete] // CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %D, (%Destroy.impl_witness.45e) [concrete] -// CHECK:STDOUT: %.64e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2d4, @Op.2(%D) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,8 +108,6 @@ fn G() -> i32 { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -225,12 +217,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%D) [concrete = constants.%F.specific_fn.c4a] // CHECK:STDOUT: %.loc9_15: ref %D = splice_block %return {} // CHECK:STDOUT: %F.call: init %D = call %F.specific_fn(%p.ref) to %.loc9_15 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc9_15.1: = bound_method %.loc9_15, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_15.2: = bound_method %.loc9_15, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9_15, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_15, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc9_15 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_15.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -289,15 +280,9 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.1c8: = require_complete_type %I.ff1 [symbolic] // CHECK:STDOUT: %F.specific_fn.ef1: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: %I.ed8: type = class_type @I, @I(%C) [concrete] // CHECK:STDOUT: %pattern_type.917: type = pattern_type %I.ed8 [concrete] @@ -313,8 +298,6 @@ fn G() -> i32 { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -410,12 +393,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.ef1)] // CHECK:STDOUT: %.loc7_25: ref %C = splice_block %return {} // CHECK:STDOUT: %F.call: init %C = call %F.specific_fn.loc7_39.1(%p.ref) to %.loc7_25 -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc7_25.1: = bound_method %.loc7_25, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_25.2: = bound_method %.loc7_25, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc7_25, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc7_25, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc7_25 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_25.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -427,12 +409,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [concrete = constants.%F.specific_fn.04a] // CHECK:STDOUT: %.loc9_15: ref %C = splice_block %return {} // CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc9_15 -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc9_15.1: = bound_method %.loc9_15, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_15.2: = bound_method %.loc9_15, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9_15, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_15, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc9_15 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_15.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -713,12 +694,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C, constants.%D) [concrete = constants.%F.specific_fn.4a7] // CHECK:STDOUT: %.loc15_28: ref %tuple.type.e8a = splice_block %return {} // CHECK:STDOUT: %F.call: init %tuple.type.e8a = call %F.specific_fn(%p.ref) to %.loc15_28 -// CHECK:STDOUT: %impl.elem0: %.77c = impl_witness_access constants.%Destroy.impl_witness.2a9, element0 [concrete = constants.%Op.ce2] -// CHECK:STDOUT: %bound_method.loc15_28.1: = bound_method %.loc15_28, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%tuple.type.e8a) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_28.2: = bound_method %.loc15_28, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc15_28, constants.%Op.ce2 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ce2, @Op.2(constants.%tuple.type.e8a) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc15_28, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d45 = addr_of %.loc15_28 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc15_28.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -843,16 +823,9 @@ fn G() -> i32 { // CHECK:STDOUT: %pattern_type.b66: type = pattern_type %WithNontype.b82 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_0.6a9) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.a00: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%WithNontype.b82) [concrete] // CHECK:STDOUT: %Op.type.68d: type = fn_type @Op.3, @impl.49c(%WithNontype.b82) [concrete] // CHECK:STDOUT: %Op.6ee: %Op.type.68d = struct_value () [concrete] // CHECK:STDOUT: %ptr.791: type = ptr_type %WithNontype.b82 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %WithNontype.b82, (%Destroy.impl_witness.a00) [concrete] -// CHECK:STDOUT: %.3b2: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.6ee, @Op.3(%WithNontype.b82) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -869,8 +842,6 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -961,10 +932,10 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_13.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [concrete = constants.%WithNontype.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc9_31: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc9_31.1: = bound_method %int_0, %impl.elem0.loc9_31 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc9_31: = specific_function %impl.elem0.loc9_31, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_31.2: = bound_method %int_0, %specific_fn.loc9_31 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc9_31.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_31.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_31.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc9_31.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc9_31.2: %i32 = converted %int_0, %.loc9_31.1 [concrete = constants.%int_0.6a9] @@ -978,12 +949,11 @@ fn G() -> i32 { // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn(%.loc9_15.2) // CHECK:STDOUT: %.loc9_33.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc9_33.2: %i32 = converted %F.call, %.loc9_33.1 -// CHECK:STDOUT: %impl.elem0.loc9_13: %.3b2 = impl_witness_access constants.%Destroy.impl_witness.a00, element0 [concrete = constants.%Op.6ee] -// CHECK:STDOUT: %bound_method.loc9_13.1: = bound_method %.loc9_13.2, %impl.elem0.loc9_13 -// CHECK:STDOUT: %specific_fn.loc9_13: = specific_function %impl.elem0.loc9_13, @Op.3(constants.%WithNontype.b82) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_13.2: = bound_method %.loc9_13.2, %specific_fn.loc9_13 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9_13.2, constants.%Op.6ee +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.6ee, @Op.3(constants.%WithNontype.b82) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_13: = bound_method %.loc9_13.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.791 = addr_of %.loc9_13.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_13.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_13(%addr) // CHECK:STDOUT: return %.loc9_33.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index b6b55427dce5..8cdd7f03c208 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -84,15 +84,9 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn.4a7: = specific_function %F, @F(%C, %D) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.45e: = impl_witness imports.%Destroy.impl_witness_table, @impl(%D) [concrete] // CHECK:STDOUT: %Op.type.548: type = fn_type @Op.2, @impl(%D) [concrete] // CHECK:STDOUT: %Op.2d4: %Op.type.548 = struct_value () [concrete] // CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %D, (%Destroy.impl_witness.45e) [concrete] -// CHECK:STDOUT: %.64e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2d4, @Op.2(%D) [concrete] // CHECK:STDOUT: %complete_type.53b: = complete_type_witness %tuple.type.e8a [concrete] // CHECK:STDOUT: } @@ -104,8 +98,6 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -210,12 +202,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C, constants.%D) [concrete = constants.%F.specific_fn.4a7] // CHECK:STDOUT: %.loc9_20: ref %D = splice_block %return {} // CHECK:STDOUT: %F.call: init %D = call %F.specific_fn(%pair.ref) to %.loc9_20 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc9_20.1: = bound_method %.loc9_20, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_20.2: = bound_method %.loc9_20, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9_20, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_20, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc9_20 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_20.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index 8f9c898df894..b9bddcc065d6 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -91,15 +91,9 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn.04a: = specific_function %F, @F(%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %complete_type.d05: = complete_type_witness %ptr.019 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -110,8 +104,6 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -198,12 +190,11 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [concrete = constants.%F.specific_fn.04a] // CHECK:STDOUT: %.loc8_13: ref %C = splice_block %return {} // CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc8_13 -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %.loc8_13, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %.loc8_13, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_13, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_13, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc8_13 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_13.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -257,15 +248,9 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn.04a: = specific_function %F, @F(%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: %complete_type.247: = complete_type_witness %ptr.801 [concrete] // CHECK:STDOUT: } @@ -277,8 +262,6 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -368,12 +351,11 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [concrete = constants.%F.specific_fn.04a] // CHECK:STDOUT: %.loc8_19: ref %C = splice_block %return {} // CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc8_19 -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc8_19.1: = bound_method %.loc8_19, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_19.2: = bound_method %.loc8_19, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_19, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_19, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc8_19 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_19.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -428,15 +410,9 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn.486: = specific_function %F, @F(%const) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.be1: = impl_witness imports.%Destroy.impl_witness_table, @impl(%const) [concrete] // CHECK:STDOUT: %Op.type.dff: type = fn_type @Op.2, @impl(%const) [concrete] // CHECK:STDOUT: %Op.206: %Op.type.dff = struct_value () [concrete] // CHECK:STDOUT: %complete_type.247: = complete_type_witness %ptr.801 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %const, (%Destroy.impl_witness.be1) [concrete] -// CHECK:STDOUT: %.174: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.206, @Op.2(%const) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -447,8 +423,6 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -537,12 +511,11 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%const) [concrete = constants.%F.specific_fn.486] // CHECK:STDOUT: %.loc8_19: ref %const = splice_block %return {} // CHECK:STDOUT: %F.call: init %const = call %F.specific_fn(%p.ref) to %.loc8_19 -// CHECK:STDOUT: %impl.elem0: %.174 = impl_witness_access constants.%Destroy.impl_witness.be1, element0 [concrete = constants.%Op.206] -// CHECK:STDOUT: %bound_method.loc8_19.1: = bound_method %.loc8_19, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%const) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_19.2: = bound_method %.loc8_19, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_19, constants.%Op.206 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.206, @Op.2(constants.%const) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_19, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.801 = addr_of %.loc8_19 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_19.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index 7057f02d89af..d215eb1c63bd 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -133,23 +133,13 @@ fn G() { // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%tuple) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.494: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.494 [concrete] // CHECK:STDOUT: %Op.specific_fn.6eb: = specific_function %Op.5d7, @Op.2(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.ccb: = impl_witness imports.%Destroy.impl_witness_table, @impl(%HoldsType.c09) [concrete] // CHECK:STDOUT: %Op.type.431: type = fn_type @Op.2, @impl(%HoldsType.c09) [concrete] // CHECK:STDOUT: %Op.f20: %Op.type.431 = struct_value () [concrete] // CHECK:STDOUT: %ptr.79a: type = ptr_type %HoldsType.c09 [concrete] -// CHECK:STDOUT: %Destroy.facet.835: %Destroy.type = facet_value %HoldsType.c09, (%Destroy.impl_witness.ccb) [concrete] -// CHECK:STDOUT: %.9ea: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.835 [concrete] // CHECK:STDOUT: %Op.specific_fn.58d: = specific_function %Op.f20, @Op.2(%HoldsType.c09) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -160,8 +150,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -277,18 +265,16 @@ fn G() { // CHECK:STDOUT: %.loc13_30.5: ref %C = converted %.loc13_30.1, %.loc13_30.4 // CHECK:STDOUT: %.loc13_30.6: %C = bind_value %.loc13_30.5 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc13_8.2, %.loc13_30.6) -// CHECK:STDOUT: %impl.elem0.loc13_30: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc13_30.1: = bound_method %.loc13_30.2, %impl.elem0.loc13_30 -// CHECK:STDOUT: %specific_fn.loc13_30: = specific_function %impl.elem0.loc13_30, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] -// CHECK:STDOUT: %bound_method.loc13_30.2: = bound_method %.loc13_30.2, %specific_fn.loc13_30 +// CHECK:STDOUT: %Op.bound.loc13_30: = bound_method %.loc13_30.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] +// CHECK:STDOUT: %bound_method.loc13_30: = bound_method %.loc13_30.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc13_30: %ptr.019 = addr_of %.loc13_30.2 -// CHECK:STDOUT: %no_op.loc13_30: init %empty_tuple.type = call %bound_method.loc13_30.2(%addr.loc13_30) -// CHECK:STDOUT: %impl.elem0.loc13_6: %.9ea = impl_witness_access constants.%Destroy.impl_witness.ccb, element0 [concrete = constants.%Op.f20] -// CHECK:STDOUT: %bound_method.loc13_6.1: = bound_method %.loc13_6.2, %impl.elem0.loc13_6 -// CHECK:STDOUT: %specific_fn.loc13_6: = specific_function %impl.elem0.loc13_6, @Op.2(constants.%HoldsType.c09) [concrete = constants.%Op.specific_fn.58d] -// CHECK:STDOUT: %bound_method.loc13_6.2: = bound_method %.loc13_6.2, %specific_fn.loc13_6 +// CHECK:STDOUT: %no_op.loc13_30: init %empty_tuple.type = call %bound_method.loc13_30(%addr.loc13_30) +// CHECK:STDOUT: %Op.bound.loc13_6: = bound_method %.loc13_6.2, constants.%Op.f20 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.f20, @Op.2(constants.%HoldsType.c09) [concrete = constants.%Op.specific_fn.58d] +// CHECK:STDOUT: %bound_method.loc13_6: = bound_method %.loc13_6.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc13_6: %ptr.79a = addr_of %.loc13_6.2 -// CHECK:STDOUT: %no_op.loc13_6: init %empty_tuple.type = call %bound_method.loc13_6.2(%addr.loc13_6) +// CHECK:STDOUT: %no_op.loc13_6: init %empty_tuple.type = call %bound_method.loc13_6(%addr.loc13_6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -354,23 +340,13 @@ fn G() { // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%struct) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.494: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.494 [concrete] // CHECK:STDOUT: %Op.specific_fn.6eb: = specific_function %Op.5d7, @Op.2(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.55e: = impl_witness imports.%Destroy.impl_witness_table, @impl(%HoldsType.705) [concrete] // CHECK:STDOUT: %Op.type.8ea: type = fn_type @Op.2, @impl(%HoldsType.705) [concrete] // CHECK:STDOUT: %Op.180: %Op.type.8ea = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d1: type = ptr_type %HoldsType.705 [concrete] -// CHECK:STDOUT: %Destroy.facet.7e8: %Destroy.type = facet_value %HoldsType.705, (%Destroy.impl_witness.55e) [concrete] -// CHECK:STDOUT: %.3b5: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.7e8 [concrete] // CHECK:STDOUT: %Op.specific_fn.fde: = specific_function %Op.180, @Op.2(%HoldsType.705) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -381,8 +357,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -491,18 +465,16 @@ fn G() { // CHECK:STDOUT: %.loc13_33.5: ref %C = converted %.loc13_33.1, %.loc13_33.4 // CHECK:STDOUT: %.loc13_33.6: %C = bind_value %.loc13_33.5 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc13_8.2, %.loc13_33.6) -// CHECK:STDOUT: %impl.elem0.loc13_33: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc13_33.1: = bound_method %.loc13_33.2, %impl.elem0.loc13_33 -// CHECK:STDOUT: %specific_fn.loc13_33: = specific_function %impl.elem0.loc13_33, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] -// CHECK:STDOUT: %bound_method.loc13_33.2: = bound_method %.loc13_33.2, %specific_fn.loc13_33 +// CHECK:STDOUT: %Op.bound.loc13_33: = bound_method %.loc13_33.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] +// CHECK:STDOUT: %bound_method.loc13_33: = bound_method %.loc13_33.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc13_33: %ptr.019 = addr_of %.loc13_33.2 -// CHECK:STDOUT: %no_op.loc13_33: init %empty_tuple.type = call %bound_method.loc13_33.2(%addr.loc13_33) -// CHECK:STDOUT: %impl.elem0.loc13_6: %.3b5 = impl_witness_access constants.%Destroy.impl_witness.55e, element0 [concrete = constants.%Op.180] -// CHECK:STDOUT: %bound_method.loc13_6.1: = bound_method %.loc13_6.2, %impl.elem0.loc13_6 -// CHECK:STDOUT: %specific_fn.loc13_6: = specific_function %impl.elem0.loc13_6, @Op.2(constants.%HoldsType.705) [concrete = constants.%Op.specific_fn.fde] -// CHECK:STDOUT: %bound_method.loc13_6.2: = bound_method %.loc13_6.2, %specific_fn.loc13_6 +// CHECK:STDOUT: %no_op.loc13_33: init %empty_tuple.type = call %bound_method.loc13_33(%addr.loc13_33) +// CHECK:STDOUT: %Op.bound.loc13_6: = bound_method %.loc13_6.2, constants.%Op.180 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.180, @Op.2(constants.%HoldsType.705) [concrete = constants.%Op.specific_fn.fde] +// CHECK:STDOUT: %bound_method.loc13_6: = bound_method %.loc13_6.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc13_6: %ptr.5d1 = addr_of %.loc13_6.2 -// CHECK:STDOUT: %no_op.loc13_6: init %empty_tuple.type = call %bound_method.loc13_6.2(%addr.loc13_6) +// CHECK:STDOUT: %no_op.loc13_6: init %empty_tuple.type = call %bound_method.loc13_6(%addr.loc13_6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -567,21 +539,15 @@ fn G() { // CHECK:STDOUT: %HoldsType.val: %HoldsType.f95cf2.2 = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] // CHECK:STDOUT: %ptr.deb: type = ptr_type %HoldsType.f95cf2.2 [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %HoldsType.f95cf2.2, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.088: %Destroy.type = facet_value %HoldsType.f95cf2.2, (%Destroy.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %.da6: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.088 [symbolic] // CHECK:STDOUT: %impl.elem0: %.da6 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Op.1(%Destroy.facet.088) [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.fef: = impl_witness imports.%Destroy.impl_witness_table, @impl(%Class) [concrete] // CHECK:STDOUT: %Op.type.7de: type = fn_type @Op.2, @impl(%Class) [concrete] // CHECK:STDOUT: %Op.d64: %Op.type.7de = struct_value () [concrete] // CHECK:STDOUT: %ptr.e71: type = ptr_type %Class [concrete] -// CHECK:STDOUT: %Destroy.facet.817: %Destroy.type = facet_value %Class, (%Destroy.impl_witness.fef) [concrete] -// CHECK:STDOUT: %.b9f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.817 [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d64, @Op.2(%Class) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -592,8 +558,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -719,18 +683,17 @@ fn G() { // CHECK:STDOUT: %.loc27_6.4: ref %HoldsType.f95cf2.2 = temporary %.loc27_6.2, %.loc27_6.3 // CHECK:STDOUT: %.loc27_8: ref %HoldsType.f95cf2.2 = converted %.loc27_6.1, %.loc27_6.4 // CHECK:STDOUT: %.loc27_26: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %impl.elem0.loc27: %.da6 = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %bound_method.loc27_6.1: = bound_method %.loc27_6.2, %impl.elem0.loc27 -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0.loc27, @Op.1(constants.%Destroy.facet.088) [symbolic = constants.%specific_impl_fn] +// CHECK:STDOUT: %impl.elem0: %.da6 = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %bound_method.loc27_6.1: = bound_method %.loc27_6.2, %impl.elem0 +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Op.1(constants.%Destroy.facet.088) [symbolic = constants.%specific_impl_fn] // CHECK:STDOUT: %bound_method.loc27_6.2: = bound_method %.loc27_6.2, %specific_impl_fn // CHECK:STDOUT: %addr.loc27: %ptr.deb = addr_of %.loc27_6.2 // CHECK:STDOUT: %.loc27_6.5: init %empty_tuple.type = call %bound_method.loc27_6.2(%addr.loc27) -// CHECK:STDOUT: %impl.elem0.loc26: %.b9f = impl_witness_access constants.%Destroy.impl_witness.fef, element0 [concrete = constants.%Op.d64] -// CHECK:STDOUT: %bound_method.loc26_26.1: = bound_method %.loc26_26.2, %impl.elem0.loc26 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc26, @Op.2(constants.%Class) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_26.2: = bound_method %.loc26_26.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc26_26.2, constants.%Op.d64 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d64, @Op.2(constants.%Class) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc26: = bound_method %.loc26_26.2, %Op.specific_fn // CHECK:STDOUT: %addr.loc26: %ptr.e71 = addr_of %.loc26_26.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26_26.2(%addr.loc26) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -798,15 +761,8 @@ fn G() { // CHECK:STDOUT: %tuple.type: type = tuple_type (type) [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.a38: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.type.8a7: type = fn_type @Op.3, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.246: %Op.type.8a7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.a38) [concrete] -// CHECK:STDOUT: %.f95: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.246, @Op.3(%array_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -823,8 +779,6 @@ fn G() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -943,12 +897,11 @@ fn G() { // CHECK:STDOUT: %.loc24_27.2: ref %array_type = temporary %.loc24_25.2, %.loc24_27.1 // CHECK:STDOUT: %.loc24_27.3: %array_type = bind_value %.loc24_27.2 // CHECK:STDOUT: %.loc24_48: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %impl.elem0: %.f95 = impl_witness_access constants.%Destroy.impl_witness.a38, element0 [concrete = constants.%Op.246] -// CHECK:STDOUT: %bound_method.loc24_25.1: = bound_method %.loc24_25.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc24_25.2: = bound_method %.loc24_25.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc24_25.2, constants.%Op.246 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.246, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc24_25.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ea3 = addr_of %.loc24_25.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc24_25.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 53542cff3ab6..459bedb4d59e 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -112,16 +112,9 @@ fn F() { // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%facet_value) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.4, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.4, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.4(%C) [concrete] // CHECK:STDOUT: %.7ab: type = fn_type_with_self_type %AA.type.b97, %A.facet.66c [concrete] // CHECK:STDOUT: %.b43: type = fn_type_with_self_type %BB.type.64d, %B.facet.82f [concrete] @@ -138,8 +131,6 @@ fn F() { // CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -375,12 +366,11 @@ fn F() { // CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%facet_value) [concrete = constants.%G.specific_fn] // CHECK:STDOUT: %.loc45_8.2: %C = bind_value %.loc45_8.1 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn(%.loc45_8.2) -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc45_6.1: = bound_method %.loc45_6.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc45_6.2: = bound_method %.loc45_6.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc45_6.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc45_6.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc45_6.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc45_6.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon index 07bf23dafdff..6d3bd21af67d 100644 --- a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon @@ -388,15 +388,9 @@ fn G() { // CHECK:STDOUT: %pattern_type.589: type = pattern_type %GenericParam [concrete] // CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.abd: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%GenericParam) [concrete] // CHECK:STDOUT: %Op.type.ae1: type = fn_type @Op.2, @impl.49c(%GenericParam) [concrete] // CHECK:STDOUT: %Op.0cc: %Op.type.ae1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.f73: type = ptr_type %GenericParam [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %GenericParam, (%Destroy.impl_witness.abd) [concrete] -// CHECK:STDOUT: %.4c3: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.0cc, @Op.2(%GenericParam) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -407,8 +401,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -545,12 +537,11 @@ fn G() { // CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) [concrete = constants.%CallGenericMethod.specific_fn] // CHECK:STDOUT: %.loc18_38.2: %GenericParam = bind_value %.loc18_38.1 // CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn(%.loc18_38.2) -// CHECK:STDOUT: %impl.elem0: %.4c3 = impl_witness_access constants.%Destroy.impl_witness.abd, element0 [concrete = constants.%Op.0cc] -// CHECK:STDOUT: %bound_method.loc18_36.1: = bound_method %.loc18_36.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%GenericParam) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_36.2: = bound_method %.loc18_36.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc18_36.2, constants.%Op.0cc +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.0cc, @Op.2(constants.%GenericParam) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc18_36.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.f73 = addr_of %.loc18_36.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_36.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon index c4337f38581d..f09a598adc24 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon @@ -47,16 +47,9 @@ fn F() { // CHECK:STDOUT: %pattern_type.ab7: type = pattern_type %Goat [concrete] // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal, @WalkAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.b14: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Goat) [concrete] // CHECK:STDOUT: %Op.type.e7a: type = fn_type @Op.2, @impl.49c(%Goat) [concrete] // CHECK:STDOUT: %Op.55a: %Op.type.e7a = struct_value () [concrete] // CHECK:STDOUT: %ptr.940: type = ptr_type %Goat [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Goat, (%Destroy.impl_witness.b14) [concrete] -// CHECK:STDOUT: %.095: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.55a, @Op.2(%Goat) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -67,8 +60,6 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -158,12 +149,11 @@ fn F() { // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal.ref, @WalkAnimal(constants.%Animal.facet) [concrete = constants.%WalkAnimal.specific_fn] // CHECK:STDOUT: %.loc23_17.2: %Goat = bind_value %.loc23_17.1 // CHECK:STDOUT: %WalkAnimal.call: init %empty_tuple.type = call %WalkAnimal.specific_fn(%.loc23_17.2) -// CHECK:STDOUT: %impl.elem0: %.095 = impl_witness_access constants.%Destroy.impl_witness.b14, element0 [concrete = constants.%Op.55a] -// CHECK:STDOUT: %bound_method.loc23_15.1: = bound_method %.loc23_15.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc23_15.2: = bound_method %.loc23_15.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc23_15.2, constants.%Op.55a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.55a, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc23_15.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.940 = addr_of %.loc23_15.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc23_15.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon index 640476aa50ea..f314089e909c 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon @@ -153,22 +153,13 @@ fn B() { // CHECK:STDOUT: %pattern_type.589: type = pattern_type %GenericParam [concrete] // CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet.8ff) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.abd: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%GenericParam) [concrete] // CHECK:STDOUT: %Op.type.ae1: type = fn_type @Op.2, @impl.49c(%GenericParam) [concrete] // CHECK:STDOUT: %Op.0cc: %Op.type.ae1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.f73: type = ptr_type %GenericParam [concrete] -// CHECK:STDOUT: %Destroy.facet.8f4: %Destroy.type = facet_value %GenericParam, (%Destroy.impl_witness.abd) [concrete] -// CHECK:STDOUT: %.4c3: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.8f4 [concrete] // CHECK:STDOUT: %Op.specific_fn.934: = specific_function %Op.0cc, @Op.2(%GenericParam) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.32c: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ImplsGeneric) [concrete] // CHECK:STDOUT: %Op.type.e98: type = fn_type @Op.2, @impl.49c(%ImplsGeneric) [concrete] // CHECK:STDOUT: %Op.51a: %Op.type.e98 = struct_value () [concrete] // CHECK:STDOUT: %ptr.011: type = ptr_type %ImplsGeneric [concrete] -// CHECK:STDOUT: %Destroy.facet.ec7: %Destroy.type = facet_value %ImplsGeneric, (%Destroy.impl_witness.32c) [concrete] -// CHECK:STDOUT: %.de2: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.ec7 [concrete] // CHECK:STDOUT: %Op.specific_fn.7b0: = specific_function %Op.51a, @Op.2(%ImplsGeneric) [concrete] // CHECK:STDOUT: %complete_type.997: = complete_type_witness %Generic.type.769 [concrete] // CHECK:STDOUT: %.3e6: type = fn_type_with_self_type %F.type.4cf, %Generic.facet.8ff [concrete] @@ -181,8 +172,6 @@ fn B() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -354,18 +343,16 @@ fn B() { // CHECK:STDOUT: %.loc20_24.2: %ImplsGeneric = bind_value %.loc20_24.1 // CHECK:STDOUT: %.loc20_44.2: %GenericParam = bind_value %.loc20_44.1 // CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn(%.loc20_24.2, %.loc20_44.2) -// CHECK:STDOUT: %impl.elem0.loc20_42: %.4c3 = impl_witness_access constants.%Destroy.impl_witness.abd, element0 [concrete = constants.%Op.0cc] -// CHECK:STDOUT: %bound_method.loc20_42.1: = bound_method %.loc20_42.2, %impl.elem0.loc20_42 -// CHECK:STDOUT: %specific_fn.loc20_42: = specific_function %impl.elem0.loc20_42, @Op.2(constants.%GenericParam) [concrete = constants.%Op.specific_fn.934] -// CHECK:STDOUT: %bound_method.loc20_42.2: = bound_method %.loc20_42.2, %specific_fn.loc20_42 +// CHECK:STDOUT: %Op.bound.loc20_42: = bound_method %.loc20_42.2, constants.%Op.0cc +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.0cc, @Op.2(constants.%GenericParam) [concrete = constants.%Op.specific_fn.934] +// CHECK:STDOUT: %bound_method.loc20_42: = bound_method %.loc20_42.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc20_42: %ptr.f73 = addr_of %.loc20_42.2 -// CHECK:STDOUT: %no_op.loc20_42: init %empty_tuple.type = call %bound_method.loc20_42.2(%addr.loc20_42) -// CHECK:STDOUT: %impl.elem0.loc20_22: %.de2 = impl_witness_access constants.%Destroy.impl_witness.32c, element0 [concrete = constants.%Op.51a] -// CHECK:STDOUT: %bound_method.loc20_22.1: = bound_method %.loc20_22.2, %impl.elem0.loc20_22 -// CHECK:STDOUT: %specific_fn.loc20_22: = specific_function %impl.elem0.loc20_22, @Op.2(constants.%ImplsGeneric) [concrete = constants.%Op.specific_fn.7b0] -// CHECK:STDOUT: %bound_method.loc20_22.2: = bound_method %.loc20_22.2, %specific_fn.loc20_22 +// CHECK:STDOUT: %no_op.loc20_42: init %empty_tuple.type = call %bound_method.loc20_42(%addr.loc20_42) +// CHECK:STDOUT: %Op.bound.loc20_22: = bound_method %.loc20_22.2, constants.%Op.51a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.51a, @Op.2(constants.%ImplsGeneric) [concrete = constants.%Op.specific_fn.7b0] +// CHECK:STDOUT: %bound_method.loc20_22: = bound_method %.loc20_22.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc20_22: %ptr.011 = addr_of %.loc20_22.2 -// CHECK:STDOUT: %no_op.loc20_22: init %empty_tuple.type = call %bound_method.loc20_22.2(%addr.loc20_22) +// CHECK:STDOUT: %no_op.loc20_22: init %empty_tuple.type = call %bound_method.loc20_22(%addr.loc20_22) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -473,15 +460,9 @@ fn B() { // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %A.specific_fn: = specific_function %A, @A(%I.facet) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -492,8 +473,6 @@ fn B() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -621,12 +600,11 @@ fn B() { // CHECK:STDOUT: %A.specific_fn: = specific_function %A.ref, @A(constants.%I.facet) [concrete = constants.%A.specific_fn] // CHECK:STDOUT: %.loc12_8.2: %C = bind_value %.loc12_8.1 // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.specific_fn(%.loc12_8.2) -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc12_6.1: = bound_method %.loc12_6.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_6.2: = bound_method %.loc12_6.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc12_6.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc12_6.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc12_6.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc12_6.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -715,15 +693,9 @@ fn B() { // CHECK:STDOUT: %B: %B.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -734,8 +706,6 @@ fn B() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -856,12 +826,11 @@ fn B() { // CHECK:STDOUT: %.loc19_6.3: init %C = class_init (), %.loc19_6.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc19_6.4: ref %C = temporary %.loc19_6.2, %.loc19_6.3 // CHECK:STDOUT: %.loc19_8: ref %C = converted %.loc19_6.1, %.loc19_6.4 -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc19_6.1: = bound_method %.loc19_6.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc19_6.2: = bound_method %.loc19_6.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc19_6.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc19_6.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc19_6.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc19_6.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -926,15 +895,9 @@ fn B() { // CHECK:STDOUT: %C.c74: type = class_type @C, @C(%empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %C.val: %C.c74 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.efa: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C.c74) [concrete] // CHECK:STDOUT: %Op.type.53e: type = fn_type @Op.2, @impl.49c(%C.c74) [concrete] // CHECK:STDOUT: %Op.2b8: %Op.type.53e = struct_value () [concrete] // CHECK:STDOUT: %ptr.128: type = ptr_type %C.c74 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.c74, (%Destroy.impl_witness.efa) [concrete] -// CHECK:STDOUT: %.77a: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2b8, @Op.2(%C.c74) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -945,8 +908,6 @@ fn B() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1062,12 +1023,11 @@ fn B() { // CHECK:STDOUT: %.loc19_6.3: init %C.c74 = class_init (), %.loc19_6.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc19_6.4: ref %C.c74 = temporary %.loc19_6.2, %.loc19_6.3 // CHECK:STDOUT: %.loc19_8: ref %C.c74 = converted %.loc19_6.1, %.loc19_6.4 -// CHECK:STDOUT: %impl.elem0: %.77a = impl_witness_access constants.%Destroy.impl_witness.efa, element0 [concrete = constants.%Op.2b8] -// CHECK:STDOUT: %bound_method.loc19_6.1: = bound_method %.loc19_6.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C.c74) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc19_6.2: = bound_method %.loc19_6.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc19_6.2, constants.%Op.2b8 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2b8, @Op.2(constants.%C.c74) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc19_6.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.128 = addr_of %.loc19_6.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc19_6.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon index 16b959edaef8..2130b3d9a11d 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon @@ -225,16 +225,9 @@ fn F() { // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] // CHECK:STDOUT: %.f6e: type = fn_type_with_self_type %Eat.type.e5d, %Eats.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.b14: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Goat) [concrete] // CHECK:STDOUT: %Op.type.e7a: type = fn_type @Op.2, @impl.49c(%Goat) [concrete] // CHECK:STDOUT: %Op.55a: %Op.type.e7a = struct_value () [concrete] // CHECK:STDOUT: %ptr.940: type = ptr_type %Goat [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Goat, (%Destroy.impl_witness.b14) [concrete] -// CHECK:STDOUT: %.095: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.55a, @Op.2(%Goat) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,8 +238,6 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -392,26 +383,23 @@ fn F() { // CHECK:STDOUT: %as_type.loc27: type = facet_access_type %.loc27_26 [concrete = constants.%Goat] // CHECK:STDOUT: %.loc27_35: type = converted %.loc27_26, %as_type.loc27 [concrete = constants.%Goat] // CHECK:STDOUT: %Eat.ref.loc27: %Eats.assoc_type = name_ref Eat, @Eats.%assoc0 [concrete = constants.%assoc0.e43] -// CHECK:STDOUT: %impl.elem0.loc27_37: %.f6e = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Eat.73e] -// CHECK:STDOUT: %Eat.call.loc27: init %empty_tuple.type = call %impl.elem0.loc27_37() -// CHECK:STDOUT: %impl.elem0.loc27_6: %.095 = impl_witness_access constants.%Destroy.impl_witness.b14, element0 [concrete = constants.%Op.55a] -// CHECK:STDOUT: %bound_method.loc27_6.1: = bound_method %.loc27_6.2, %impl.elem0.loc27_6 -// CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27_6, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_6.2: = bound_method %.loc27_6.2, %specific_fn.loc27 +// CHECK:STDOUT: %impl.elem0.loc27: %.f6e = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Eat.73e] +// CHECK:STDOUT: %Eat.call.loc27: init %empty_tuple.type = call %impl.elem0.loc27() +// CHECK:STDOUT: %Op.bound.loc27: = bound_method %.loc27_6.2, constants.%Op.55a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.55a, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc27: = bound_method %.loc27_6.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc27: %ptr.940 = addr_of %.loc27_6.2 -// CHECK:STDOUT: %no_op.loc27: init %empty_tuple.type = call %bound_method.loc27_6.2(%addr.loc27) -// CHECK:STDOUT: %impl.elem0.loc26: %.095 = impl_witness_access constants.%Destroy.impl_witness.b14, element0 [concrete = constants.%Op.55a] -// CHECK:STDOUT: %bound_method.loc26_6.1: = bound_method %.loc26_6.2, %impl.elem0.loc26 -// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_6.2: = bound_method %.loc26_6.2, %specific_fn.loc26 +// CHECK:STDOUT: %no_op.loc27: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27) +// CHECK:STDOUT: %Op.bound.loc26: = bound_method %.loc26_6.2, constants.%Op.55a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.55a, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc26: = bound_method %.loc26_6.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc26: %ptr.940 = addr_of %.loc26_6.2 -// CHECK:STDOUT: %no_op.loc26: init %empty_tuple.type = call %bound_method.loc26_6.2(%addr.loc26) -// CHECK:STDOUT: %impl.elem0.loc22: %.095 = impl_witness_access constants.%Destroy.impl_witness.b14, element0 [concrete = constants.%Op.55a] -// CHECK:STDOUT: %bound_method.loc22_28.1: = bound_method %.loc22_28.2, %impl.elem0.loc22 -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_28.2: = bound_method %.loc22_28.2, %specific_fn.loc22 +// CHECK:STDOUT: %no_op.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26) +// CHECK:STDOUT: %Op.bound.loc22: = bound_method %.loc22_28.2, constants.%Op.55a +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.55a, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc22: = bound_method %.loc22_28.2, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc22: %ptr.940 = addr_of %.loc22_28.2 -// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_28.2(%addr.loc22) +// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon index 9f69753903d8..7b8a6910906b 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon @@ -102,23 +102,13 @@ fn F() { // CHECK:STDOUT: %pattern_type.aff: type = pattern_type %Grass [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet, %Edible.facet) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.fd6: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Grass) [concrete] // CHECK:STDOUT: %Op.type.7fb: type = fn_type @Op.2, @impl.49c(%Grass) [concrete] // CHECK:STDOUT: %Op.d66: %Op.type.7fb = struct_value () [concrete] // CHECK:STDOUT: %ptr.2bd: type = ptr_type %Grass [concrete] -// CHECK:STDOUT: %Destroy.facet.049: %Destroy.type = facet_value %Grass, (%Destroy.impl_witness.fd6) [concrete] -// CHECK:STDOUT: %.cd1: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.049 [concrete] // CHECK:STDOUT: %Op.specific_fn.9e2: = specific_function %Op.d66, @Op.2(%Grass) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.b14: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Goat) [concrete] // CHECK:STDOUT: %Op.type.e7a: type = fn_type @Op.2, @impl.49c(%Goat) [concrete] // CHECK:STDOUT: %Op.55a: %Op.type.e7a = struct_value () [concrete] // CHECK:STDOUT: %ptr.940: type = ptr_type %Goat [concrete] -// CHECK:STDOUT: %Destroy.facet.cfd: %Destroy.type = facet_value %Goat, (%Destroy.impl_witness.b14) [concrete] -// CHECK:STDOUT: %.095: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.cfd [concrete] // CHECK:STDOUT: %Op.specific_fn.d9f: = specific_function %Op.55a, @Op.2(%Goat) [concrete] // CHECK:STDOUT: %Eats.type.1ae: type = facet_type <@Eats, @Eats(%Grass)> [concrete] // CHECK:STDOUT: %Self.016: %Eats.type.1ae = bind_symbolic_name Self, 1 [symbolic] @@ -136,8 +126,6 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -419,18 +407,16 @@ fn F() { // CHECK:STDOUT: %.loc35_19.2: %Goat = bind_value %.loc35_19.1 // CHECK:STDOUT: %.loc35_31.2: %Grass = bind_value %.loc35_31.1 // CHECK:STDOUT: %HandleAnimal.call: init %empty_tuple.type = call %HandleAnimal.specific_fn(%.loc35_19.2, %.loc35_31.2) -// CHECK:STDOUT: %impl.elem0.loc35_29: %.cd1 = impl_witness_access constants.%Destroy.impl_witness.fd6, element0 [concrete = constants.%Op.d66] -// CHECK:STDOUT: %bound_method.loc35_29.1: = bound_method %.loc35_29.2, %impl.elem0.loc35_29 -// CHECK:STDOUT: %specific_fn.loc35_29: = specific_function %impl.elem0.loc35_29, @Op.2(constants.%Grass) [concrete = constants.%Op.specific_fn.9e2] -// CHECK:STDOUT: %bound_method.loc35_29.2: = bound_method %.loc35_29.2, %specific_fn.loc35_29 +// CHECK:STDOUT: %Op.bound.loc35_29: = bound_method %.loc35_29.2, constants.%Op.d66 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.d66, @Op.2(constants.%Grass) [concrete = constants.%Op.specific_fn.9e2] +// CHECK:STDOUT: %bound_method.loc35_29: = bound_method %.loc35_29.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc35_29: %ptr.2bd = addr_of %.loc35_29.2 -// CHECK:STDOUT: %no_op.loc35_29: init %empty_tuple.type = call %bound_method.loc35_29.2(%addr.loc35_29) -// CHECK:STDOUT: %impl.elem0.loc35_17: %.095 = impl_witness_access constants.%Destroy.impl_witness.b14, element0 [concrete = constants.%Op.55a] -// CHECK:STDOUT: %bound_method.loc35_17.1: = bound_method %.loc35_17.2, %impl.elem0.loc35_17 -// CHECK:STDOUT: %specific_fn.loc35_17: = specific_function %impl.elem0.loc35_17, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn.d9f] -// CHECK:STDOUT: %bound_method.loc35_17.2: = bound_method %.loc35_17.2, %specific_fn.loc35_17 +// CHECK:STDOUT: %no_op.loc35_29: init %empty_tuple.type = call %bound_method.loc35_29(%addr.loc35_29) +// CHECK:STDOUT: %Op.bound.loc35_17: = bound_method %.loc35_17.2, constants.%Op.55a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.55a, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn.d9f] +// CHECK:STDOUT: %bound_method.loc35_17: = bound_method %.loc35_17.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc35_17: %ptr.940 = addr_of %.loc35_17.2 -// CHECK:STDOUT: %no_op.loc35_17: init %empty_tuple.type = call %bound_method.loc35_17.2(%addr.loc35_17) +// CHECK:STDOUT: %no_op.loc35_17: init %empty_tuple.type = call %bound_method.loc35_17(%addr.loc35_17) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon index cb000f071e13..0efbdaf667d4 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon @@ -52,16 +52,9 @@ fn F() { // CHECK:STDOUT: %pattern_type.ab7: type = pattern_type %Goat [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.b14: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Goat) [concrete] // CHECK:STDOUT: %Op.type.e7a: type = fn_type @Op.2, @impl.49c(%Goat) [concrete] // CHECK:STDOUT: %Op.55a: %Op.type.e7a = struct_value () [concrete] // CHECK:STDOUT: %ptr.940: type = ptr_type %Goat [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Goat, (%Destroy.impl_witness.b14) [concrete] -// CHECK:STDOUT: %.095: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.55a, @Op.2(%Goat) [concrete] // CHECK:STDOUT: %FeedAnimal.specific_fn.82e: = specific_function %FeedAnimal, @FeedAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: } @@ -73,8 +66,6 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -201,12 +192,11 @@ fn F() { // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal.ref, @HandleAnimal(constants.%Animal.facet) [concrete = constants.%HandleAnimal.specific_fn] // CHECK:STDOUT: %.loc25_19.2: %Goat = bind_value %.loc25_19.1 // CHECK:STDOUT: %HandleAnimal.call: init %empty_tuple.type = call %HandleAnimal.specific_fn(%.loc25_19.2) -// CHECK:STDOUT: %impl.elem0: %.095 = impl_witness_access constants.%Destroy.impl_witness.b14, element0 [concrete = constants.%Op.55a] -// CHECK:STDOUT: %bound_method.loc25_17.1: = bound_method %.loc25_17.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc25_17.2: = bound_method %.loc25_17.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc25_17.2, constants.%Op.55a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.55a, @Op.2(constants.%Goat) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc25_17.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.940 = addr_of %.loc25_17.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc25_17.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon index 8ce33bc2ac83..02b17cebe3b4 100644 --- a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon +++ b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon @@ -84,23 +84,13 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %.f4e: type = fn_type_with_self_type %Convert.type.50a, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %from, %Convert.e81 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.3c9: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%RuntimeConvertTo) [concrete] // CHECK:STDOUT: %Op.type.139: type = fn_type @Op.2, @impl.49c(%RuntimeConvertTo) [concrete] // CHECK:STDOUT: %Op.d2d: %Op.type.139 = struct_value () [concrete] // CHECK:STDOUT: %ptr.339: type = ptr_type %RuntimeConvertTo [concrete] -// CHECK:STDOUT: %Destroy.facet.31d: %Destroy.type = facet_value %RuntimeConvertTo, (%Destroy.impl_witness.3c9) [concrete] -// CHECK:STDOUT: %.79d: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.31d [concrete] // CHECK:STDOUT: %Op.specific_fn.373: = specific_function %Op.d2d, @Op.2(%RuntimeConvertTo) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.fab: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%RuntimeConvertFrom) [concrete] // CHECK:STDOUT: %Op.type.147: type = fn_type @Op.2, @impl.49c(%RuntimeConvertFrom) [concrete] // CHECK:STDOUT: %Op.3f3: %Op.type.147 = struct_value () [concrete] // CHECK:STDOUT: %ptr.415: type = ptr_type %RuntimeConvertFrom [concrete] -// CHECK:STDOUT: %Destroy.facet.71e: %Destroy.type = facet_value %RuntimeConvertFrom, (%Destroy.impl_witness.fab) [concrete] -// CHECK:STDOUT: %.a98: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.71e [concrete] // CHECK:STDOUT: %Op.specific_fn.5db: = specific_function %Op.3f3, @Op.2(%RuntimeConvertFrom) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,8 +103,6 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -285,8 +273,8 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %from.ref: %RuntimeConvertFrom = name_ref from, %from [symbolic = constants.%from] // CHECK:STDOUT: %holds_to.ref: %HoldsType.066 = name_ref holds_to, %holds_to -// CHECK:STDOUT: %impl.elem0.loc41_19.1: %.f4e = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Convert.e81] -// CHECK:STDOUT: %bound_method.loc41_19.1: = bound_method constants.%from, %impl.elem0.loc41_19.1 [symbolic = constants.%Convert.bound] +// CHECK:STDOUT: %impl.elem0: %.f4e = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Convert.e81] +// CHECK:STDOUT: %bound_method.loc41_19.1: = bound_method constants.%from, %impl.elem0 [symbolic = constants.%Convert.bound] // CHECK:STDOUT: %.loc41_19.1: ref %RuntimeConvertTo = temporary_storage // CHECK:STDOUT: %Convert.call: init %RuntimeConvertTo = call %bound_method.loc41_19.1(constants.%from) to %.loc41_19.1 // CHECK:STDOUT: %.loc41_19.2: init %RuntimeConvertTo = converted constants.%from, %Convert.call @@ -294,18 +282,16 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %.loc41_19.4: %RuntimeConvertTo = bind_value %.loc41_19.3 // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%tuple, ) [concrete = ] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%holds_to.ref) -// CHECK:STDOUT: %impl.elem0.loc41_19.2: %.79d = impl_witness_access constants.%Destroy.impl_witness.3c9, element0 [concrete = constants.%Op.d2d] -// CHECK:STDOUT: %bound_method.loc41_19.2: = bound_method %.loc41_19.1, %impl.elem0.loc41_19.2 -// CHECK:STDOUT: %specific_fn.loc41: = specific_function %impl.elem0.loc41_19.2, @Op.2(constants.%RuntimeConvertTo) [concrete = constants.%Op.specific_fn.373] -// CHECK:STDOUT: %bound_method.loc41_19.3: = bound_method %.loc41_19.1, %specific_fn.loc41 +// CHECK:STDOUT: %Op.bound.loc41: = bound_method %.loc41_19.1, constants.%Op.d2d +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.d2d, @Op.2(constants.%RuntimeConvertTo) [concrete = constants.%Op.specific_fn.373] +// CHECK:STDOUT: %bound_method.loc41_19.2: = bound_method %.loc41_19.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc41: %ptr.339 = addr_of %.loc41_19.1 -// CHECK:STDOUT: %no_op.loc41: init %empty_tuple.type = call %bound_method.loc41_19.3(%addr.loc41) -// CHECK:STDOUT: %impl.elem0.loc30: %.a98 = impl_witness_access constants.%Destroy.impl_witness.fab, element0 [concrete = constants.%Op.3f3] -// CHECK:STDOUT: %bound_method.loc30_36.1: = bound_method %.loc30_36.2, %impl.elem0.loc30 -// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Op.2(constants.%RuntimeConvertFrom) [concrete = constants.%Op.specific_fn.5db] -// CHECK:STDOUT: %bound_method.loc30_36.2: = bound_method %.loc30_36.2, %specific_fn.loc30 +// CHECK:STDOUT: %no_op.loc41: init %empty_tuple.type = call %bound_method.loc41_19.2(%addr.loc41) +// CHECK:STDOUT: %Op.bound.loc30: = bound_method %.loc30_36.2, constants.%Op.3f3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.3f3, @Op.2(constants.%RuntimeConvertFrom) [concrete = constants.%Op.specific_fn.5db] +// CHECK:STDOUT: %bound_method.loc30: = bound_method %.loc30_36.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc30: %ptr.415 = addr_of %.loc30_36.2 -// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30_36.2(%addr.loc30) +// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30(%addr.loc30) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index 3a1cea657359..9670e2ddb996 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -143,8 +143,6 @@ fn Read() { // CHECK:STDOUT: %Some.specific_fn: = specific_function %Some.58a, @Some(%Int.49d0e6.1) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.96 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.97, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] // CHECK:STDOUT: %ptr.2aa: type = ptr_type %Optional.708 [symbolic] // CHECK:STDOUT: %require_complete.a5e: = require_complete_type %ptr.2aa [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.f9d: = lookup_impl_witness %Optional.708, @Destroy [symbolic] @@ -185,12 +183,9 @@ fn Read() { // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.eb8: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%IntRange.365) [concrete] // CHECK:STDOUT: %Op.type.2d1: type = fn_type @Op.97, @impl.49c(%IntRange.365) [concrete] // CHECK:STDOUT: %Op.fa8: %Op.type.2d1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.049: type = ptr_type %IntRange.365 [concrete] -// CHECK:STDOUT: %Destroy.facet.507: %Destroy.type = facet_value %IntRange.365, (%Destroy.impl_witness.eb8) [concrete] -// CHECK:STDOUT: %.cb4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.507 [concrete] // CHECK:STDOUT: %Op.specific_fn.df8: = specific_function %Op.fa8, @Op.97(%IntRange.365) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -232,8 +227,6 @@ fn Read() { // CHECK:STDOUT: %OrderedWith.impl_witness_table.2b2 = impl_witness_table (%Core.import_ref.a5f, %Core.import_ref.a58, %Core.import_ref.a39, %Core.import_ref.c4c), @impl.db3 [concrete] // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -670,20 +663,19 @@ fn Read() { // CHECK:STDOUT: %end.ref: %i32 = name_ref end, %end // CHECK:STDOUT: %Make.specific_fn: = specific_function %Make.ref, @Make(constants.%int_32) [concrete = constants.%Make.specific_fn] // CHECK:STDOUT: %.loc26_20: ref %IntRange.365 = splice_block %return {} -// CHECK:STDOUT: %impl.elem0.loc27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc27_28.1: = bound_method %int_0, %impl.elem0.loc27 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_28.2: = bound_method %int_0, %specific_fn.loc27 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc27_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc27_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc27_28.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc27_28.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc27_28.2: %i32 = converted %int_0, %.loc27_28.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %Make.call: init %IntRange.365 = call %Make.specific_fn(%.loc27_28.2, %end.ref) to %.loc26_20 -// CHECK:STDOUT: %impl.elem0.loc26: %.cb4 = impl_witness_access constants.%Destroy.impl_witness.eb8, element0 [concrete = constants.%Op.fa8] -// CHECK:STDOUT: %bound_method.loc26_20.1: = bound_method %.loc26_20, %impl.elem0.loc26 -// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Op.97(constants.%IntRange.365) [concrete = constants.%Op.specific_fn.df8] -// CHECK:STDOUT: %bound_method.loc26_20.2: = bound_method %.loc26_20, %specific_fn.loc26 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc26_20, constants.%Op.fa8 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.fa8, @Op.97(constants.%IntRange.365) [concrete = constants.%Op.specific_fn.df8] +// CHECK:STDOUT: %bound_method.loc26: = bound_method %.loc26_20, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.049 = addr_of %.loc26_20 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26_20.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -820,7 +812,6 @@ fn Read() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %Convert.type.0b2: type = fn_type @Convert.3, @impl.c81(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.6d7: %Convert.type.0b2 = struct_value () [symbolic] @@ -889,14 +880,9 @@ fn Read() { // CHECK:STDOUT: %None.type.8c4: type = fn_type @None, @Optional(%Int.7ff11f.1) [symbolic] // CHECK:STDOUT: %None.7a7: %None.type.8c4 = struct_value () [symbolic] // CHECK:STDOUT: %None.specific_fn: = specific_function %None.7a7, @None(%Int.7ff11f.1) [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.97, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.6eb: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%IntRange.365) [concrete] // CHECK:STDOUT: %Op.type.2d1: type = fn_type @Op.97, @impl.49c(%IntRange.365) [concrete] // CHECK:STDOUT: %Op.fa8: %Op.type.2d1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.049: type = ptr_type %IntRange.365 [concrete] -// CHECK:STDOUT: %Destroy.facet.c1a: %Destroy.type = facet_value %IntRange.365, (%Destroy.impl_witness.6eb) [concrete] -// CHECK:STDOUT: %.f02: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.c1a [concrete] // CHECK:STDOUT: %Op.specific_fn.df8: = specific_function %Op.fa8, @Op.97(%IntRange.365) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -939,8 +925,6 @@ fn Read() { // CHECK:STDOUT: %Main.import_ref.f1e294.4: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.f1e294.5: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.014 = import_ref Main//lib, inst519 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.3a7: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Main//lib, inst6835 [indirect], loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Main.import_ref.3a7), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1021,10 +1005,10 @@ fn Read() { // CHECK:STDOUT: %Range.ref: %Range.type = name_ref Range, imports.%Main.Range [concrete = constants.%Range] // CHECK:STDOUT: %y.ref: Core.IntLiteral = name_ref y, %y [symbolic = constants.%y] // CHECK:STDOUT: %.loc6_3: ref %IntRange.365 = splice_block %x.var {} -// CHECK:STDOUT: %impl.elem0.loc6_31: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] -// CHECK:STDOUT: %bound_method.loc6_31.1: = bound_method %y.ref, %impl.elem0.loc6_31 [symbolic = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc6_31: = specific_function %impl.elem0.loc6_31, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_31.2: = bound_method %y.ref, %specific_fn.loc6_31 [symbolic = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] +// CHECK:STDOUT: %bound_method.loc6_31.1: = bound_method %y.ref, %impl.elem0 [symbolic = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc6_31.2: = bound_method %y.ref, %specific_fn [symbolic = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc6_31.2(%y.ref) [symbolic = constants.%int.convert_checked.58b] // CHECK:STDOUT: %.loc6_31.1: %i32 = value_of_initializer %int.convert_checked [symbolic = constants.%int.convert_checked.58b] // CHECK:STDOUT: %.loc6_31.2: %i32 = converted %y.ref, %.loc6_31.1 [symbolic = constants.%int.convert_checked.58b] @@ -1036,18 +1020,16 @@ fn Read() { // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(constants.%int_32) [concrete = constants.%IntRange.365] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %IntRange.365 = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0.loc6_3.1: %.f02 = impl_witness_access constants.%Destroy.impl_witness.6eb, element0 [concrete = constants.%Op.fa8] -// CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %.loc6_3, %impl.elem0.loc6_3.1 -// CHECK:STDOUT: %specific_fn.loc6_3.1: = specific_function %impl.elem0.loc6_3.1, @Op.97(constants.%IntRange.365) [concrete = constants.%Op.specific_fn.df8] -// CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %.loc6_3, %specific_fn.loc6_3.1 +// CHECK:STDOUT: %Op.bound.loc6_3.1: = bound_method %.loc6_3, constants.%Op.fa8 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.fa8, @Op.97(constants.%IntRange.365) [concrete = constants.%Op.specific_fn.df8] +// CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %.loc6_3, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc6_3.1: %ptr.049 = addr_of %.loc6_3 -// CHECK:STDOUT: %no_op.loc6_3.1: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6_3.1) -// CHECK:STDOUT: %impl.elem0.loc6_3.2: %.f02 = impl_witness_access constants.%Destroy.impl_witness.6eb, element0 [concrete = constants.%Op.fa8] -// CHECK:STDOUT: %bound_method.loc6_3.3: = bound_method %x.var, %impl.elem0.loc6_3.2 -// CHECK:STDOUT: %specific_fn.loc6_3.2: = specific_function %impl.elem0.loc6_3.2, @Op.97(constants.%IntRange.365) [concrete = constants.%Op.specific_fn.df8] -// CHECK:STDOUT: %bound_method.loc6_3.4: = bound_method %x.var, %specific_fn.loc6_3.2 +// CHECK:STDOUT: %no_op.loc6_3.1: init %empty_tuple.type = call %bound_method.loc6_3.1(%addr.loc6_3.1) +// CHECK:STDOUT: %Op.bound.loc6_3.2: = bound_method %x.var, constants.%Op.fa8 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.fa8, @Op.97(constants.%IntRange.365) [concrete = constants.%Op.specific_fn.df8] +// CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %x.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc6_3.2: %ptr.049 = addr_of %x.var -// CHECK:STDOUT: %no_op.loc6_3.2: init %empty_tuple.type = call %bound_method.loc6_3.4(%addr.loc6_3.2) +// CHECK:STDOUT: %no_op.loc6_3.2: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6_3.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/basic.carbon b/toolchain/check/testdata/for/basic.carbon index 386457eac96b..217757bb91ed 100644 --- a/toolchain/check/testdata/for/basic.carbon +++ b/toolchain/check/testdata/for/basic.carbon @@ -82,24 +82,12 @@ fn Run() { // CHECK:STDOUT: %HasValue.ada: %HasValue.type.b7a = struct_value () [concrete] // CHECK:STDOUT: %Get.type.130: type = fn_type @Get, @Optional(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Get.6e8: %Get.type.130 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.003: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Optional.f9a) [concrete] // CHECK:STDOUT: %Op.type.7e4: type = fn_type @Op.2, @impl.49c(%Optional.f9a) [concrete] // CHECK:STDOUT: %Op.466: %Op.type.7e4 = struct_value () [concrete] // CHECK:STDOUT: %ptr.511: type = ptr_type %Optional.f9a [concrete] -// CHECK:STDOUT: %Destroy.facet.a27: %Destroy.type = facet_value %Optional.f9a, (%Destroy.impl_witness.003) [concrete] -// CHECK:STDOUT: %.3c9: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.a27 [concrete] -// CHECK:STDOUT: %Op.specific_fn.733: = specific_function %Op.466, @Op.2(%Optional.f9a) [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl.49c(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.926: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.926 [concrete] -// CHECK:STDOUT: %Op.specific_fn.393: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Body.type: type = fn_type @Body [concrete] // CHECK:STDOUT: %Body: %Body.type = struct_value () [concrete] // CHECK:STDOUT: %AfterLoop.type: type = fn_type @AfterLoop [concrete] @@ -109,20 +97,14 @@ fn Run() { // CHECK:STDOUT: %.708: type = fn_type_with_self_type %Next.type.941, %Iterate.facet.d50 [concrete] // CHECK:STDOUT: %HasValue.specific_fn: = specific_function %HasValue.ada, @HasValue(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Get.specific_fn: = specific_function %Get.6e8, @Get(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.49d: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%TrivialRange) [concrete] // CHECK:STDOUT: %Op.type.8d6: type = fn_type @Op.2, @impl.49c(%TrivialRange) [concrete] // CHECK:STDOUT: %Op.90d: %Op.type.8d6 = struct_value () [concrete] // CHECK:STDOUT: %ptr.41d: type = ptr_type %TrivialRange [concrete] -// CHECK:STDOUT: %Destroy.facet.2e4: %Destroy.type = facet_value %TrivialRange, (%Destroy.impl_witness.49d) [concrete] -// CHECK:STDOUT: %.448: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2e4 [concrete] -// CHECK:STDOUT: %Op.specific_fn.b69: = specific_function %Op.90d, @Op.2(%TrivialRange) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.cd6: @Optional.%HasValue.type (%HasValue.type.a15) = import_ref Core//prelude/parts/iterate, inst98 [indirect], loaded [symbolic = @Optional.%HasValue (constants.%HasValue.73f)] // CHECK:STDOUT: %Core.import_ref.4fd: @Optional.%Get.type (%Get.type.e03) = import_ref Core//prelude/parts/iterate, inst99 [indirect], loaded [symbolic = @Optional.%Get (constants.%Get.971)] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -189,30 +171,26 @@ fn Run() { // CHECK:STDOUT: !for.done: // CHECK:STDOUT: %AfterLoop.ref: %AfterLoop.type = name_ref AfterLoop, file.%AfterLoop.decl [concrete = constants.%AfterLoop] // CHECK:STDOUT: %AfterLoop.call: init %empty_tuple.type = call %AfterLoop.ref() -// CHECK:STDOUT: %impl.elem0.loc18_35.1: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc18_35.5: = bound_method %.loc18_35.9, %impl.elem0.loc18_35.1 -// CHECK:STDOUT: %specific_fn.loc18_35.1: = specific_function %impl.elem0.loc18_35.1, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc18_35.6: = bound_method %.loc18_35.9, %specific_fn.loc18_35.1 +// CHECK:STDOUT: %Op.bound.loc18_35.1: = bound_method %.loc18_35.9, constants.%Op.ea3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc18_35.5: = bound_method %.loc18_35.9, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18_35.2: %ptr.843 = addr_of %.loc18_35.9 -// CHECK:STDOUT: %no_op.loc18_35.1: init %empty_tuple.type = call %bound_method.loc18_35.6(%addr.loc18_35.2) -// CHECK:STDOUT: %impl.elem0.loc18_35.2: %.3c9 = impl_witness_access constants.%Destroy.impl_witness.003, element0 [concrete = constants.%Op.466] -// CHECK:STDOUT: %bound_method.loc18_35.7: = bound_method %.loc18_35.1, %impl.elem0.loc18_35.2 -// CHECK:STDOUT: %specific_fn.loc18_35.2: = specific_function %impl.elem0.loc18_35.2, @Op.2(constants.%Optional.f9a) [concrete = constants.%Op.specific_fn.733] -// CHECK:STDOUT: %bound_method.loc18_35.8: = bound_method %.loc18_35.1, %specific_fn.loc18_35.2 +// CHECK:STDOUT: %no_op.loc18_35.1: init %empty_tuple.type = call %bound_method.loc18_35.5(%addr.loc18_35.2) +// CHECK:STDOUT: %Op.bound.loc18_35.2: = bound_method %.loc18_35.1, constants.%Op.466 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc18_35.6: = bound_method %.loc18_35.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc18_35.3: %ptr.511 = addr_of %.loc18_35.1 -// CHECK:STDOUT: %no_op.loc18_35.2: init %empty_tuple.type = call %bound_method.loc18_35.8(%addr.loc18_35.3) -// CHECK:STDOUT: %impl.elem0.loc18_35.3: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc18_35.9: = bound_method %var, %impl.elem0.loc18_35.3 -// CHECK:STDOUT: %specific_fn.loc18_35.3: = specific_function %impl.elem0.loc18_35.3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc18_35.10: = bound_method %var, %specific_fn.loc18_35.3 +// CHECK:STDOUT: %no_op.loc18_35.2: init %empty_tuple.type = call %bound_method.loc18_35.6(%addr.loc18_35.3) +// CHECK:STDOUT: %Op.bound.loc18_35.3: = bound_method %var, constants.%Op.ea3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc18_35.7: = bound_method %var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc18_35.4: %ptr.843 = addr_of %var -// CHECK:STDOUT: %no_op.loc18_35.3: init %empty_tuple.type = call %bound_method.loc18_35.10(%addr.loc18_35.4) -// CHECK:STDOUT: %impl.elem0.loc18_18: %.448 = impl_witness_access constants.%Destroy.impl_witness.49d, element0 [concrete = constants.%Op.90d] -// CHECK:STDOUT: %bound_method.loc18_18.1: = bound_method %.loc18_18.2, %impl.elem0.loc18_18 -// CHECK:STDOUT: %specific_fn.loc18_18: = specific_function %impl.elem0.loc18_18, @Op.2(constants.%TrivialRange) [concrete = constants.%Op.specific_fn.b69] -// CHECK:STDOUT: %bound_method.loc18_18.2: = bound_method %.loc18_18.2, %specific_fn.loc18_18 +// CHECK:STDOUT: %no_op.loc18_35.3: init %empty_tuple.type = call %bound_method.loc18_35.7(%addr.loc18_35.4) +// CHECK:STDOUT: %Op.bound.loc18_18: = bound_method %.loc18_18.2, constants.%Op.90d +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc18_18: = bound_method %.loc18_18.2, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc18_18: %ptr.41d = addr_of %.loc18_18.2 -// CHECK:STDOUT: %no_op.loc18_18: init %empty_tuple.type = call %bound_method.loc18_18.2(%addr.loc18_18) +// CHECK:STDOUT: %no_op.loc18_18: init %empty_tuple.type = call %bound_method.loc18_18(%addr.loc18_18) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/pattern.carbon b/toolchain/check/testdata/for/pattern.carbon index 0fe0f247140f..7a0cc2b9b5c0 100644 --- a/toolchain/check/testdata/for/pattern.carbon +++ b/toolchain/check/testdata/for/pattern.carbon @@ -147,10 +147,6 @@ fn Run() { // CHECK:STDOUT: %HasValue.6fd: %HasValue.type.f81 = struct_value () [symbolic] // CHECK:STDOUT: %Get.type.b8f: type = fn_type @Get, @Optional(%T) [symbolic] // CHECK:STDOUT: %Get.9c8: %Get.type.b8f = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.989: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.ed4: type = fn_type @Op.2, @impl.d2b(%T) [symbolic] -// CHECK:STDOUT: %Op.486: %Op.type.ed4 = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.impl_witness.52a: = impl_witness imports.%Iterate.impl_witness_table, @impl.86e(%C) [concrete] // CHECK:STDOUT: %NewCursor.type.951: type = fn_type @NewCursor.2, @impl.86e(%C) [concrete] // CHECK:STDOUT: %NewCursor.535: %NewCursor.type.951 = struct_value () [concrete] @@ -169,33 +165,17 @@ fn Run() { // CHECK:STDOUT: %Get.9c1: %Get.type.115 = struct_value () [concrete] // CHECK:STDOUT: %HasValue.specific_fn: = specific_function %HasValue.513, @HasValue(%C) [concrete] // CHECK:STDOUT: %Get.specific_fn: = specific_function %Get.9c1, @Get(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.832: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%C) [concrete] // CHECK:STDOUT: %Op.type.f77: type = fn_type @Op.2, @impl.d2b(%C) [concrete] // CHECK:STDOUT: %Op.01c: %Op.type.f77 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.25e: %Destroy.type = facet_value %C, (%Destroy.impl_witness.832) [concrete] -// CHECK:STDOUT: %.4cb: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.25e [concrete] -// CHECK:STDOUT: %Op.specific_fn.abf: = specific_function %Op.01c, @Op.2(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.b21: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%Optional.cf0) [concrete] // CHECK:STDOUT: %Op.type.e93: type = fn_type @Op.2, @impl.d2b(%Optional.cf0) [concrete] // CHECK:STDOUT: %Op.a97: %Op.type.e93 = struct_value () [concrete] // CHECK:STDOUT: %ptr.8e6: type = ptr_type %Optional.cf0 [concrete] -// CHECK:STDOUT: %Destroy.facet.f84: %Destroy.type = facet_value %Optional.cf0, (%Destroy.impl_witness.b21) [concrete] -// CHECK:STDOUT: %.d26: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.f84 [concrete] -// CHECK:STDOUT: %Op.specific_fn.448: = specific_function %Op.a97, @Op.2(%Optional.cf0) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.67e: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.type.8b2: type = fn_type @Op.2, @impl.d2b(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.ca6: %Op.type.8b2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.2a8: %Destroy.type = facet_value %empty_struct_type, (%Destroy.impl_witness.67e) [concrete] -// CHECK:STDOUT: %.902: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.2a8 [concrete] -// CHECK:STDOUT: %Op.specific_fn.04c: = specific_function %Op.ca6, @Op.2(%empty_struct_type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.805: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%EmptyRange.cc8) [concrete] // CHECK:STDOUT: %Op.type.699: type = fn_type @Op.2, @impl.d2b(%EmptyRange.cc8) [concrete] // CHECK:STDOUT: %Op.d12: %Op.type.699 = struct_value () [concrete] // CHECK:STDOUT: %ptr.35d: type = ptr_type %EmptyRange.cc8 [concrete] -// CHECK:STDOUT: %Destroy.facet.5b2: %Destroy.type = facet_value %EmptyRange.cc8, (%Destroy.impl_witness.805) [concrete] -// CHECK:STDOUT: %.73c: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.5b2 [concrete] -// CHECK:STDOUT: %Op.specific_fn.cc4: = specific_function %Op.d12, @Op.2(%EmptyRange.cc8) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -208,8 +188,6 @@ fn Run() { // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @impl.86e [concrete] // CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%HasValue.type (%HasValue.type.f81) = import_ref Main//empty_range, inst136 [indirect], loaded [symbolic = @Optional.%HasValue (constants.%HasValue.6fd)] // CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Get.type (%Get.type.b8f) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Get (constants.%Get.9c8)] -// CHECK:STDOUT: %Main.import_ref.fcc: @impl.d2b.%Op.type (%Op.type.ed4) = import_ref Main//empty_range, inst373 [indirect], loaded [symbolic = @impl.d2b.%Op (constants.%Op.486)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Main.import_ref.fcc), @impl.d2b [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -276,30 +254,26 @@ fn Run() { // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %impl.elem0.loc12_36.1: %.4cb = impl_witness_access constants.%Destroy.impl_witness.832, element0 [concrete = constants.%Op.01c] -// CHECK:STDOUT: %bound_method.loc12_36.7: = bound_method %.loc12_36.8, %impl.elem0.loc12_36.1 -// CHECK:STDOUT: %specific_fn.loc12_36.3: = specific_function %impl.elem0.loc12_36.1, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.abf] -// CHECK:STDOUT: %bound_method.loc12_36.8: = bound_method %.loc12_36.8, %specific_fn.loc12_36.3 +// CHECK:STDOUT: %Op.bound.loc12_36.1: = bound_method %.loc12_36.8, constants.%Op.01c +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_36.7: = bound_method %.loc12_36.8, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc12_36.2: %ptr.019 = addr_of %.loc12_36.8 -// CHECK:STDOUT: %no_op.loc12_36.1: init %empty_tuple.type = call %bound_method.loc12_36.8(%addr.loc12_36.2) -// CHECK:STDOUT: %impl.elem0.loc12_36.2: %.d26 = impl_witness_access constants.%Destroy.impl_witness.b21, element0 [concrete = constants.%Op.a97] -// CHECK:STDOUT: %bound_method.loc12_36.9: = bound_method %.loc12_36.1, %impl.elem0.loc12_36.2 -// CHECK:STDOUT: %specific_fn.loc12_36.4: = specific_function %impl.elem0.loc12_36.2, @Op.2(constants.%Optional.cf0) [concrete = constants.%Op.specific_fn.448] -// CHECK:STDOUT: %bound_method.loc12_36.10: = bound_method %.loc12_36.1, %specific_fn.loc12_36.4 +// CHECK:STDOUT: %no_op.loc12_36.1: init %empty_tuple.type = call %bound_method.loc12_36.7(%addr.loc12_36.2) +// CHECK:STDOUT: %Op.bound.loc12_36.2: = bound_method %.loc12_36.1, constants.%Op.a97 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_36.8: = bound_method %.loc12_36.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc12_36.3: %ptr.8e6 = addr_of %.loc12_36.1 -// CHECK:STDOUT: %no_op.loc12_36.2: init %empty_tuple.type = call %bound_method.loc12_36.10(%addr.loc12_36.3) -// CHECK:STDOUT: %impl.elem0.loc12_36.3: %.902 = impl_witness_access constants.%Destroy.impl_witness.67e, element0 [concrete = constants.%Op.ca6] -// CHECK:STDOUT: %bound_method.loc12_36.11: = bound_method %var, %impl.elem0.loc12_36.3 -// CHECK:STDOUT: %specific_fn.loc12_36.5: = specific_function %impl.elem0.loc12_36.3, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn.04c] -// CHECK:STDOUT: %bound_method.loc12_36.12: = bound_method %var, %specific_fn.loc12_36.5 +// CHECK:STDOUT: %no_op.loc12_36.2: init %empty_tuple.type = call %bound_method.loc12_36.8(%addr.loc12_36.3) +// CHECK:STDOUT: %Op.bound.loc12_36.3: = bound_method %var, constants.%Op.ca6 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_36.9: = bound_method %var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc12_36.4: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %no_op.loc12_36.3: init %empty_tuple.type = call %bound_method.loc12_36.12(%addr.loc12_36.4) -// CHECK:STDOUT: %impl.elem0.loc12_35: %.73c = impl_witness_access constants.%Destroy.impl_witness.805, element0 [concrete = constants.%Op.d12] -// CHECK:STDOUT: %bound_method.loc12_35.1: = bound_method %.loc12_35.1, %impl.elem0.loc12_35 -// CHECK:STDOUT: %specific_fn.loc12_35: = specific_function %impl.elem0.loc12_35, @Op.2(constants.%EmptyRange.cc8) [concrete = constants.%Op.specific_fn.cc4] -// CHECK:STDOUT: %bound_method.loc12_35.2: = bound_method %.loc12_35.1, %specific_fn.loc12_35 +// CHECK:STDOUT: %no_op.loc12_36.3: init %empty_tuple.type = call %bound_method.loc12_36.9(%addr.loc12_36.4) +// CHECK:STDOUT: %Op.bound.loc12_35: = bound_method %.loc12_35.1, constants.%Op.d12 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_35: = bound_method %.loc12_35.1, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc12_35: %ptr.35d = addr_of %.loc12_35.1 -// CHECK:STDOUT: %no_op.loc12_35: init %empty_tuple.type = call %bound_method.loc12_35.2(%addr.loc12_35) +// CHECK:STDOUT: %no_op.loc12_35: init %empty_tuple.type = call %bound_method.loc12_35(%addr.loc12_35) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -333,10 +307,6 @@ fn Run() { // CHECK:STDOUT: %HasValue.6fd: %HasValue.type.f81 = struct_value () [symbolic] // CHECK:STDOUT: %Get.type.b8f: type = fn_type @Get, @Optional(%T) [symbolic] // CHECK:STDOUT: %Get.9c8: %Get.type.b8f = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.989: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.ed4: type = fn_type @Op.2, @impl.d2b(%T) [symbolic] -// CHECK:STDOUT: %Op.486: %Op.type.ed4 = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.impl_witness.52a: = impl_witness imports.%Iterate.impl_witness_table, @impl.86e(%C) [concrete] // CHECK:STDOUT: %NewCursor.type.951: type = fn_type @NewCursor.2, @impl.86e(%C) [concrete] // CHECK:STDOUT: %NewCursor.535: %NewCursor.type.951 = struct_value () [concrete] @@ -355,32 +325,16 @@ fn Run() { // CHECK:STDOUT: %Get.9c1: %Get.type.115 = struct_value () [concrete] // CHECK:STDOUT: %HasValue.specific_fn: = specific_function %HasValue.513, @HasValue(%C) [concrete] // CHECK:STDOUT: %Get.specific_fn: = specific_function %Get.9c1, @Get(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.832: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%C) [concrete] // CHECK:STDOUT: %Op.type.f77: type = fn_type @Op.2, @impl.d2b(%C) [concrete] // CHECK:STDOUT: %Op.01c: %Op.type.f77 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.25e: %Destroy.type = facet_value %C, (%Destroy.impl_witness.832) [concrete] -// CHECK:STDOUT: %.4cb: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.25e [concrete] -// CHECK:STDOUT: %Op.specific_fn.abf: = specific_function %Op.01c, @Op.2(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.b21: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%Optional.cf0) [concrete] // CHECK:STDOUT: %Op.type.e93: type = fn_type @Op.2, @impl.d2b(%Optional.cf0) [concrete] // CHECK:STDOUT: %Op.a97: %Op.type.e93 = struct_value () [concrete] // CHECK:STDOUT: %ptr.8e6: type = ptr_type %Optional.cf0 [concrete] -// CHECK:STDOUT: %Destroy.facet.f84: %Destroy.type = facet_value %Optional.cf0, (%Destroy.impl_witness.b21) [concrete] -// CHECK:STDOUT: %.d26: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.f84 [concrete] -// CHECK:STDOUT: %Op.specific_fn.448: = specific_function %Op.a97, @Op.2(%Optional.cf0) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.67e: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.type.8b2: type = fn_type @Op.2, @impl.d2b(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.ca6: %Op.type.8b2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.2a8: %Destroy.type = facet_value %empty_struct_type, (%Destroy.impl_witness.67e) [concrete] -// CHECK:STDOUT: %.902: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.2a8 [concrete] -// CHECK:STDOUT: %Op.specific_fn.04c: = specific_function %Op.ca6, @Op.2(%empty_struct_type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.805: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%EmptyRange.cc8) [concrete] // CHECK:STDOUT: %Op.type.699: type = fn_type @Op.2, @impl.d2b(%EmptyRange.cc8) [concrete] // CHECK:STDOUT: %Op.d12: %Op.type.699 = struct_value () [concrete] // CHECK:STDOUT: %ptr.35d: type = ptr_type %EmptyRange.cc8 [concrete] -// CHECK:STDOUT: %Destroy.facet.5b2: %Destroy.type = facet_value %EmptyRange.cc8, (%Destroy.impl_witness.805) [concrete] -// CHECK:STDOUT: %.73c: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.5b2 [concrete] -// CHECK:STDOUT: %Op.specific_fn.cc4: = specific_function %Op.d12, @Op.2(%EmptyRange.cc8) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -393,8 +347,6 @@ fn Run() { // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @impl.86e [concrete] // CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%HasValue.type (%HasValue.type.f81) = import_ref Main//empty_range, inst136 [indirect], loaded [symbolic = @Optional.%HasValue (constants.%HasValue.6fd)] // CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Get.type (%Get.type.b8f) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Get (constants.%Get.9c8)] -// CHECK:STDOUT: %Main.import_ref.fcc: @impl.d2b.%Op.type (%Op.type.ed4) = import_ref Main//empty_range, inst373 [indirect], loaded [symbolic = @impl.d2b.%Op (constants.%Op.486)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Main.import_ref.fcc), @impl.d2b [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -463,36 +415,31 @@ fn Run() { // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %impl.elem0.loc12_8.1: %.4cb = impl_witness_access constants.%Destroy.impl_witness.832, element0 [concrete = constants.%Op.01c] -// CHECK:STDOUT: %bound_method.loc12_8.1: = bound_method %.loc12_8, %impl.elem0.loc12_8.1 -// CHECK:STDOUT: %specific_fn.loc12_8.1: = specific_function %impl.elem0.loc12_8.1, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.abf] -// CHECK:STDOUT: %bound_method.loc12_8.2: = bound_method %.loc12_8, %specific_fn.loc12_8.1 +// CHECK:STDOUT: %Op.bound.loc12_8.1: = bound_method %.loc12_8, constants.%Op.01c +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_8.1: = bound_method %.loc12_8, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc12_8.1: %ptr.019 = addr_of %.loc12_8 -// CHECK:STDOUT: %no_op.loc12_8.1: init %empty_tuple.type = call %bound_method.loc12_8.2(%addr.loc12_8.1) -// CHECK:STDOUT: %impl.elem0.loc12_8.2: %.4cb = impl_witness_access constants.%Destroy.impl_witness.832, element0 [concrete = constants.%Op.01c] -// CHECK:STDOUT: %bound_method.loc12_8.3: = bound_method %c.var, %impl.elem0.loc12_8.2 -// CHECK:STDOUT: %specific_fn.loc12_8.2: = specific_function %impl.elem0.loc12_8.2, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.abf] -// CHECK:STDOUT: %bound_method.loc12_8.4: = bound_method %c.var, %specific_fn.loc12_8.2 +// CHECK:STDOUT: %no_op.loc12_8.1: init %empty_tuple.type = call %bound_method.loc12_8.1(%addr.loc12_8.1) +// CHECK:STDOUT: %Op.bound.loc12_8.2: = bound_method %c.var, constants.%Op.01c +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_8.2: = bound_method %c.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc12_8.2: %ptr.019 = addr_of %c.var -// CHECK:STDOUT: %no_op.loc12_8.2: init %empty_tuple.type = call %bound_method.loc12_8.4(%addr.loc12_8.2) -// CHECK:STDOUT: %impl.elem0.loc12_40.1: %.d26 = impl_witness_access constants.%Destroy.impl_witness.b21, element0 [concrete = constants.%Op.a97] -// CHECK:STDOUT: %bound_method.loc12_40.7: = bound_method %.loc12_40.1, %impl.elem0.loc12_40.1 -// CHECK:STDOUT: %specific_fn.loc12_40.3: = specific_function %impl.elem0.loc12_40.1, @Op.2(constants.%Optional.cf0) [concrete = constants.%Op.specific_fn.448] -// CHECK:STDOUT: %bound_method.loc12_40.8: = bound_method %.loc12_40.1, %specific_fn.loc12_40.3 +// CHECK:STDOUT: %no_op.loc12_8.2: init %empty_tuple.type = call %bound_method.loc12_8.2(%addr.loc12_8.2) +// CHECK:STDOUT: %Op.bound.loc12_40.1: = bound_method %.loc12_40.1, constants.%Op.a97 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_40.7: = bound_method %.loc12_40.1, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc12_40.2: %ptr.8e6 = addr_of %.loc12_40.1 -// CHECK:STDOUT: %no_op.loc12_40.1: init %empty_tuple.type = call %bound_method.loc12_40.8(%addr.loc12_40.2) -// CHECK:STDOUT: %impl.elem0.loc12_40.2: %.902 = impl_witness_access constants.%Destroy.impl_witness.67e, element0 [concrete = constants.%Op.ca6] -// CHECK:STDOUT: %bound_method.loc12_40.9: = bound_method %var, %impl.elem0.loc12_40.2 -// CHECK:STDOUT: %specific_fn.loc12_40.4: = specific_function %impl.elem0.loc12_40.2, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn.04c] -// CHECK:STDOUT: %bound_method.loc12_40.10: = bound_method %var, %specific_fn.loc12_40.4 +// CHECK:STDOUT: %no_op.loc12_40.1: init %empty_tuple.type = call %bound_method.loc12_40.7(%addr.loc12_40.2) +// CHECK:STDOUT: %Op.bound.loc12_40.2: = bound_method %var, constants.%Op.ca6 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_40.8: = bound_method %var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc12_40.3: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %no_op.loc12_40.2: init %empty_tuple.type = call %bound_method.loc12_40.10(%addr.loc12_40.3) -// CHECK:STDOUT: %impl.elem0.loc12_39: %.73c = impl_witness_access constants.%Destroy.impl_witness.805, element0 [concrete = constants.%Op.d12] -// CHECK:STDOUT: %bound_method.loc12_39.1: = bound_method %.loc12_39.1, %impl.elem0.loc12_39 -// CHECK:STDOUT: %specific_fn.loc12_39: = specific_function %impl.elem0.loc12_39, @Op.2(constants.%EmptyRange.cc8) [concrete = constants.%Op.specific_fn.cc4] -// CHECK:STDOUT: %bound_method.loc12_39.2: = bound_method %.loc12_39.1, %specific_fn.loc12_39 +// CHECK:STDOUT: %no_op.loc12_40.2: init %empty_tuple.type = call %bound_method.loc12_40.8(%addr.loc12_40.3) +// CHECK:STDOUT: %Op.bound.loc12_39: = bound_method %.loc12_39.1, constants.%Op.d12 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_39: = bound_method %.loc12_39.1, %Op.specific_fn.5 // CHECK:STDOUT: %addr.loc12_39: %ptr.35d = addr_of %.loc12_39.1 -// CHECK:STDOUT: %no_op.loc12_39: init %empty_tuple.type = call %bound_method.loc12_39.2(%addr.loc12_39) +// CHECK:STDOUT: %no_op.loc12_39: init %empty_tuple.type = call %bound_method.loc12_39(%addr.loc12_39) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -529,10 +476,6 @@ fn Run() { // CHECK:STDOUT: %HasValue.6fd: %HasValue.type.f81 = struct_value () [symbolic] // CHECK:STDOUT: %Get.type.b8f: type = fn_type @Get, @Optional(%T) [symbolic] // CHECK:STDOUT: %Get.9c8: %Get.type.b8f = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.989: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.ed4: type = fn_type @Op.2, @impl.d2b(%T) [symbolic] -// CHECK:STDOUT: %Op.486: %Op.type.ed4 = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.impl_witness.6db: = impl_witness imports.%Iterate.impl_witness_table, @impl.86e(%tuple.type.784) [concrete] // CHECK:STDOUT: %NewCursor.type.d32: type = fn_type @NewCursor.2, @impl.86e(%tuple.type.784) [concrete] // CHECK:STDOUT: %NewCursor.763: %NewCursor.type.d32 = struct_value () [concrete] @@ -552,32 +495,16 @@ fn Run() { // CHECK:STDOUT: %ptr.b85: type = ptr_type %tuple.type.784 [concrete] // CHECK:STDOUT: %HasValue.specific_fn: = specific_function %HasValue.4f9, @HasValue(%tuple.type.784) [concrete] // CHECK:STDOUT: %Get.specific_fn: = specific_function %Get.d99, @Get(%tuple.type.784) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.356: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%tuple.type.784) [concrete] // CHECK:STDOUT: %Op.type.973: type = fn_type @Op.2, @impl.d2b(%tuple.type.784) [concrete] // CHECK:STDOUT: %Op.149: %Op.type.973 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.833: %Destroy.type = facet_value %tuple.type.784, (%Destroy.impl_witness.356) [concrete] -// CHECK:STDOUT: %.f45: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.833 [concrete] -// CHECK:STDOUT: %Op.specific_fn.14c: = specific_function %Op.149, @Op.2(%tuple.type.784) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.4cb: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%Optional.79e) [concrete] // CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2, @impl.d2b(%Optional.79e) [concrete] // CHECK:STDOUT: %Op.3ef: %Op.type.1cc = struct_value () [concrete] // CHECK:STDOUT: %ptr.07d: type = ptr_type %Optional.79e [concrete] -// CHECK:STDOUT: %Destroy.facet.58b: %Destroy.type = facet_value %Optional.79e, (%Destroy.impl_witness.4cb) [concrete] -// CHECK:STDOUT: %.df3: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.58b [concrete] -// CHECK:STDOUT: %Op.specific_fn.01c: = specific_function %Op.3ef, @Op.2(%Optional.79e) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.67e: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.type.8b2: type = fn_type @Op.2, @impl.d2b(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.ca6: %Op.type.8b2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.2a8: %Destroy.type = facet_value %empty_struct_type, (%Destroy.impl_witness.67e) [concrete] -// CHECK:STDOUT: %.902: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.2a8 [concrete] -// CHECK:STDOUT: %Op.specific_fn.04c: = specific_function %Op.ca6, @Op.2(%empty_struct_type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.e89: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%EmptyRange.2f3) [concrete] // CHECK:STDOUT: %Op.type.f1e: type = fn_type @Op.2, @impl.d2b(%EmptyRange.2f3) [concrete] // CHECK:STDOUT: %Op.155: %Op.type.f1e = struct_value () [concrete] // CHECK:STDOUT: %ptr.5cf: type = ptr_type %EmptyRange.2f3 [concrete] -// CHECK:STDOUT: %Destroy.facet.dcc: %Destroy.type = facet_value %EmptyRange.2f3, (%Destroy.impl_witness.e89) [concrete] -// CHECK:STDOUT: %.be5: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.dcc [concrete] -// CHECK:STDOUT: %Op.specific_fn.e02: = specific_function %Op.155, @Op.2(%EmptyRange.2f3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -590,8 +517,6 @@ fn Run() { // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @impl.86e [concrete] // CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%HasValue.type (%HasValue.type.f81) = import_ref Main//empty_range, inst136 [indirect], loaded [symbolic = @Optional.%HasValue (constants.%HasValue.6fd)] // CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Get.type (%Get.type.b8f) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Get (constants.%Get.9c8)] -// CHECK:STDOUT: %Main.import_ref.fcc: @impl.d2b.%Op.type (%Op.type.ed4) = import_ref Main//empty_range, inst373 [indirect], loaded [symbolic = @impl.d2b.%Op (constants.%Op.486)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Main.import_ref.fcc), @impl.d2b [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -681,30 +606,26 @@ fn Run() { // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %impl.elem0.loc10_61.1: %.f45 = impl_witness_access constants.%Destroy.impl_witness.356, element0 [concrete = constants.%Op.149] -// CHECK:STDOUT: %bound_method.loc10_61.7: = bound_method %.loc10_61.8, %impl.elem0.loc10_61.1 -// CHECK:STDOUT: %specific_fn.loc10_61.3: = specific_function %impl.elem0.loc10_61.1, @Op.2(constants.%tuple.type.784) [concrete = constants.%Op.specific_fn.14c] -// CHECK:STDOUT: %bound_method.loc10_61.8: = bound_method %.loc10_61.8, %specific_fn.loc10_61.3 +// CHECK:STDOUT: %Op.bound.loc10_61.1: = bound_method %.loc10_61.8, constants.%Op.149 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_61.7: = bound_method %.loc10_61.8, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_61.2: %ptr.b85 = addr_of %.loc10_61.8 -// CHECK:STDOUT: %no_op.loc10_61.1: init %empty_tuple.type = call %bound_method.loc10_61.8(%addr.loc10_61.2) -// CHECK:STDOUT: %impl.elem0.loc10_61.2: %.df3 = impl_witness_access constants.%Destroy.impl_witness.4cb, element0 [concrete = constants.%Op.3ef] -// CHECK:STDOUT: %bound_method.loc10_61.9: = bound_method %.loc10_61.1, %impl.elem0.loc10_61.2 -// CHECK:STDOUT: %specific_fn.loc10_61.4: = specific_function %impl.elem0.loc10_61.2, @Op.2(constants.%Optional.79e) [concrete = constants.%Op.specific_fn.01c] -// CHECK:STDOUT: %bound_method.loc10_61.10: = bound_method %.loc10_61.1, %specific_fn.loc10_61.4 +// CHECK:STDOUT: %no_op.loc10_61.1: init %empty_tuple.type = call %bound_method.loc10_61.7(%addr.loc10_61.2) +// CHECK:STDOUT: %Op.bound.loc10_61.2: = bound_method %.loc10_61.1, constants.%Op.3ef +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_61.8: = bound_method %.loc10_61.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10_61.3: %ptr.07d = addr_of %.loc10_61.1 -// CHECK:STDOUT: %no_op.loc10_61.2: init %empty_tuple.type = call %bound_method.loc10_61.10(%addr.loc10_61.3) -// CHECK:STDOUT: %impl.elem0.loc10_61.3: %.902 = impl_witness_access constants.%Destroy.impl_witness.67e, element0 [concrete = constants.%Op.ca6] -// CHECK:STDOUT: %bound_method.loc10_61.11: = bound_method %var, %impl.elem0.loc10_61.3 -// CHECK:STDOUT: %specific_fn.loc10_61.5: = specific_function %impl.elem0.loc10_61.3, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn.04c] -// CHECK:STDOUT: %bound_method.loc10_61.12: = bound_method %var, %specific_fn.loc10_61.5 +// CHECK:STDOUT: %no_op.loc10_61.2: init %empty_tuple.type = call %bound_method.loc10_61.8(%addr.loc10_61.3) +// CHECK:STDOUT: %Op.bound.loc10_61.3: = bound_method %var, constants.%Op.ca6 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_61.9: = bound_method %var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc10_61.4: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %no_op.loc10_61.3: init %empty_tuple.type = call %bound_method.loc10_61.12(%addr.loc10_61.4) -// CHECK:STDOUT: %impl.elem0.loc10_60: %.be5 = impl_witness_access constants.%Destroy.impl_witness.e89, element0 [concrete = constants.%Op.155] -// CHECK:STDOUT: %bound_method.loc10_60.1: = bound_method %.loc10_60.1, %impl.elem0.loc10_60 -// CHECK:STDOUT: %specific_fn.loc10_60: = specific_function %impl.elem0.loc10_60, @Op.2(constants.%EmptyRange.2f3) [concrete = constants.%Op.specific_fn.e02] -// CHECK:STDOUT: %bound_method.loc10_60.2: = bound_method %.loc10_60.1, %specific_fn.loc10_60 +// CHECK:STDOUT: %no_op.loc10_61.3: init %empty_tuple.type = call %bound_method.loc10_61.9(%addr.loc10_61.4) +// CHECK:STDOUT: %Op.bound.loc10_60: = bound_method %.loc10_60.1, constants.%Op.155 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_60: = bound_method %.loc10_60.1, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc10_60: %ptr.5cf = addr_of %.loc10_60.1 -// CHECK:STDOUT: %no_op.loc10_60: init %empty_tuple.type = call %bound_method.loc10_60.2(%addr.loc10_60) +// CHECK:STDOUT: %no_op.loc10_60: init %empty_tuple.type = call %bound_method.loc10_60(%addr.loc10_60) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -740,10 +661,6 @@ fn Run() { // CHECK:STDOUT: %HasValue.6fd: %HasValue.type.f81 = struct_value () [symbolic] // CHECK:STDOUT: %Get.type.b8f: type = fn_type @Get, @Optional(%T) [symbolic] // CHECK:STDOUT: %Get.9c8: %Get.type.b8f = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.989: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.ed4: type = fn_type @Op.2, @impl.d2b(%T) [symbolic] -// CHECK:STDOUT: %Op.486: %Op.type.ed4 = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.impl_witness.627: = impl_witness imports.%Iterate.impl_witness_table, @impl.86e(%tuple.type.56b) [concrete] // CHECK:STDOUT: %NewCursor.type.59c: type = fn_type @NewCursor.2, @impl.86e(%tuple.type.56b) [concrete] // CHECK:STDOUT: %NewCursor.263: %NewCursor.type.59c = struct_value () [concrete] @@ -762,33 +679,17 @@ fn Run() { // CHECK:STDOUT: %Get.8a7: %Get.type.4a4 = struct_value () [concrete] // CHECK:STDOUT: %HasValue.specific_fn: = specific_function %HasValue.bef, @HasValue(%tuple.type.56b) [concrete] // CHECK:STDOUT: %Get.specific_fn: = specific_function %Get.8a7, @Get(%tuple.type.56b) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.c9b: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%tuple.type.56b) [concrete] // CHECK:STDOUT: %Op.type.65e: type = fn_type @Op.2, @impl.d2b(%tuple.type.56b) [concrete] // CHECK:STDOUT: %Op.587: %Op.type.65e = struct_value () [concrete] // CHECK:STDOUT: %ptr.9f0: type = ptr_type %tuple.type.56b [concrete] -// CHECK:STDOUT: %Destroy.facet.882: %Destroy.type = facet_value %tuple.type.56b, (%Destroy.impl_witness.c9b) [concrete] -// CHECK:STDOUT: %.d75: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.882 [concrete] -// CHECK:STDOUT: %Op.specific_fn.6b2: = specific_function %Op.587, @Op.2(%tuple.type.56b) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.f8d: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%Optional.657) [concrete] // CHECK:STDOUT: %Op.type.400: type = fn_type @Op.2, @impl.d2b(%Optional.657) [concrete] // CHECK:STDOUT: %Op.5ec: %Op.type.400 = struct_value () [concrete] // CHECK:STDOUT: %ptr.036: type = ptr_type %Optional.657 [concrete] -// CHECK:STDOUT: %Destroy.facet.cb2: %Destroy.type = facet_value %Optional.657, (%Destroy.impl_witness.f8d) [concrete] -// CHECK:STDOUT: %.894: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.cb2 [concrete] -// CHECK:STDOUT: %Op.specific_fn.840: = specific_function %Op.5ec, @Op.2(%Optional.657) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.67e: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.type.8b2: type = fn_type @Op.2, @impl.d2b(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.ca6: %Op.type.8b2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.2a8: %Destroy.type = facet_value %empty_struct_type, (%Destroy.impl_witness.67e) [concrete] -// CHECK:STDOUT: %.902: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.2a8 [concrete] -// CHECK:STDOUT: %Op.specific_fn.04c: = specific_function %Op.ca6, @Op.2(%empty_struct_type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.f74: = impl_witness imports.%Destroy.impl_witness_table, @impl.d2b(%EmptyRange.90a) [concrete] // CHECK:STDOUT: %Op.type.cee: type = fn_type @Op.2, @impl.d2b(%EmptyRange.90a) [concrete] // CHECK:STDOUT: %Op.323: %Op.type.cee = struct_value () [concrete] // CHECK:STDOUT: %ptr.f9b: type = ptr_type %EmptyRange.90a [concrete] -// CHECK:STDOUT: %Destroy.facet.31a: %Destroy.type = facet_value %EmptyRange.90a, (%Destroy.impl_witness.f74) [concrete] -// CHECK:STDOUT: %.3a2: type = fn_type_with_self_type %Op.type.989, %Destroy.facet.31a [concrete] -// CHECK:STDOUT: %Op.specific_fn.5d2: = specific_function %Op.323, @Op.2(%EmptyRange.90a) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -801,8 +702,6 @@ fn Run() { // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @impl.86e [concrete] // CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%HasValue.type (%HasValue.type.f81) = import_ref Main//empty_range, inst136 [indirect], loaded [symbolic = @Optional.%HasValue (constants.%HasValue.6fd)] // CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Get.type (%Get.type.b8f) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Get (constants.%Get.9c8)] -// CHECK:STDOUT: %Main.import_ref.fcc: @impl.d2b.%Op.type (%Op.type.ed4) = import_ref Main//empty_range, inst373 [indirect], loaded [symbolic = @impl.d2b.%Op (constants.%Op.486)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Main.import_ref.fcc), @impl.d2b [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -880,30 +779,26 @@ fn Run() { // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %impl.elem0.loc12_49.1: %.d75 = impl_witness_access constants.%Destroy.impl_witness.c9b, element0 [concrete = constants.%Op.587] -// CHECK:STDOUT: %bound_method.loc12_49.7: = bound_method %.loc12_49.8, %impl.elem0.loc12_49.1 -// CHECK:STDOUT: %specific_fn.loc12_49.3: = specific_function %impl.elem0.loc12_49.1, @Op.2(constants.%tuple.type.56b) [concrete = constants.%Op.specific_fn.6b2] -// CHECK:STDOUT: %bound_method.loc12_49.8: = bound_method %.loc12_49.8, %specific_fn.loc12_49.3 +// CHECK:STDOUT: %Op.bound.loc12_49.1: = bound_method %.loc12_49.8, constants.%Op.587 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_49.7: = bound_method %.loc12_49.8, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc12_49.2: %ptr.9f0 = addr_of %.loc12_49.8 -// CHECK:STDOUT: %no_op.loc12_49.1: init %empty_tuple.type = call %bound_method.loc12_49.8(%addr.loc12_49.2) -// CHECK:STDOUT: %impl.elem0.loc12_49.2: %.894 = impl_witness_access constants.%Destroy.impl_witness.f8d, element0 [concrete = constants.%Op.5ec] -// CHECK:STDOUT: %bound_method.loc12_49.9: = bound_method %.loc12_49.1, %impl.elem0.loc12_49.2 -// CHECK:STDOUT: %specific_fn.loc12_49.4: = specific_function %impl.elem0.loc12_49.2, @Op.2(constants.%Optional.657) [concrete = constants.%Op.specific_fn.840] -// CHECK:STDOUT: %bound_method.loc12_49.10: = bound_method %.loc12_49.1, %specific_fn.loc12_49.4 +// CHECK:STDOUT: %no_op.loc12_49.1: init %empty_tuple.type = call %bound_method.loc12_49.7(%addr.loc12_49.2) +// CHECK:STDOUT: %Op.bound.loc12_49.2: = bound_method %.loc12_49.1, constants.%Op.5ec +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_49.8: = bound_method %.loc12_49.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc12_49.3: %ptr.036 = addr_of %.loc12_49.1 -// CHECK:STDOUT: %no_op.loc12_49.2: init %empty_tuple.type = call %bound_method.loc12_49.10(%addr.loc12_49.3) -// CHECK:STDOUT: %impl.elem0.loc12_49.3: %.902 = impl_witness_access constants.%Destroy.impl_witness.67e, element0 [concrete = constants.%Op.ca6] -// CHECK:STDOUT: %bound_method.loc12_49.11: = bound_method %var, %impl.elem0.loc12_49.3 -// CHECK:STDOUT: %specific_fn.loc12_49.5: = specific_function %impl.elem0.loc12_49.3, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn.04c] -// CHECK:STDOUT: %bound_method.loc12_49.12: = bound_method %var, %specific_fn.loc12_49.5 +// CHECK:STDOUT: %no_op.loc12_49.2: init %empty_tuple.type = call %bound_method.loc12_49.8(%addr.loc12_49.3) +// CHECK:STDOUT: %Op.bound.loc12_49.3: = bound_method %var, constants.%Op.ca6 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_49.9: = bound_method %var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc12_49.4: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %no_op.loc12_49.3: init %empty_tuple.type = call %bound_method.loc12_49.12(%addr.loc12_49.4) -// CHECK:STDOUT: %impl.elem0.loc12_48: %.3a2 = impl_witness_access constants.%Destroy.impl_witness.f74, element0 [concrete = constants.%Op.323] -// CHECK:STDOUT: %bound_method.loc12_48.1: = bound_method %.loc12_48.1, %impl.elem0.loc12_48 -// CHECK:STDOUT: %specific_fn.loc12_48: = specific_function %impl.elem0.loc12_48, @Op.2(constants.%EmptyRange.90a) [concrete = constants.%Op.specific_fn.5d2] -// CHECK:STDOUT: %bound_method.loc12_48.2: = bound_method %.loc12_48.1, %specific_fn.loc12_48 +// CHECK:STDOUT: %no_op.loc12_49.3: init %empty_tuple.type = call %bound_method.loc12_49.9(%addr.loc12_49.4) +// CHECK:STDOUT: %Op.bound.loc12_48: = bound_method %.loc12_48.1, constants.%Op.323 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc12_48: = bound_method %.loc12_48.1, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc12_48: %ptr.f9b = addr_of %.loc12_48.1 -// CHECK:STDOUT: %no_op.loc12_48: init %empty_tuple.type = call %bound_method.loc12_48.2(%addr.loc12_48) +// CHECK:STDOUT: %no_op.loc12_48: init %empty_tuple.type = call %bound_method.loc12_48(%addr.loc12_48) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/alias.carbon b/toolchain/check/testdata/function/call/alias.carbon index bbc90084ea97..1807078c6845 100644 --- a/toolchain/check/testdata/function/call/alias.carbon +++ b/toolchain/check/testdata/function/call/alias.carbon @@ -31,16 +31,9 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [concrete] // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -51,8 +44,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -100,12 +91,11 @@ fn Main() { // CHECK:STDOUT: %.loc20_11.3: type = converted %.loc20_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %b.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %b.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %b.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %b.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %b.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index fc991e83af57..c34fad55208f 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -32,16 +32,9 @@ fn Run() { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %str: String = string_literal "hello" [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.2, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.2(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -54,8 +47,6 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -81,12 +72,11 @@ fn Run() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc19_3.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc19_3.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.2(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc19_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index 43cd371d0014..7efab8b5c268 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -46,16 +46,9 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -72,8 +65,6 @@ fn Run() { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -119,12 +110,11 @@ fn Run() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc25_3.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc25_3.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc25_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 4b3e76ac76fc..4c18a89ad86e 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -51,16 +51,9 @@ fn Main() { // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -77,8 +70,6 @@ fn Main() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -123,10 +114,10 @@ fn Main() { // CHECK:STDOUT: %b.var: ref %i32 = var %b.var_patt // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [concrete = constants.%Echo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc20_21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc20_21.1: = bound_method %int_1, %impl.elem0.loc20_21 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc20_21: = specific_function %impl.elem0.loc20_21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_21.2: = bound_method %int_1, %specific_fn.loc20_21 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc20_21.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc20_21.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc20_21.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_21.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_21.2: %i32 = converted %int_1, %.loc20_21.1 [concrete = constants.%int_1.5d2] @@ -137,12 +128,11 @@ fn Main() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0.loc20_3: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %b.var, %impl.elem0.loc20_3 -// CHECK:STDOUT: %specific_fn.loc20_3: = specific_function %impl.elem0.loc20_3, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %b.var, %specific_fn.loc20_3 +// CHECK:STDOUT: %Op.bound: = bound_method %b.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc20_3: = bound_method %b.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %b.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 5f82d6bbadee..e2adfc224611 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -61,16 +61,9 @@ fn Main() { // CHECK:STDOUT: %bound_method.efa: = bound_method %int_6.462, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_6.e56: %i32 = int_value 6 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.088: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.a1c) [concrete] // CHECK:STDOUT: %Op.type.438: type = fn_type @Op.3, @impl.49c(%tuple.type.a1c) [concrete] // CHECK:STDOUT: %Op.c8e: %Op.type.438 = struct_value () [concrete] // CHECK:STDOUT: %ptr.0b7: type = ptr_type %tuple.type.a1c [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type.a1c, (%Destroy.impl_witness.088) [concrete] -// CHECK:STDOUT: %.6a9: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c8e, @Op.3(%tuple.type.a1c) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -87,8 +80,6 @@ fn Main() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -134,10 +125,10 @@ fn Main() { // CHECK:STDOUT: %x.var: ref %tuple.type.a1c = var %x.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc18_22.1: %tuple.type.985 = tuple_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc18_22: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc18_22.1: = bound_method %int_1, %impl.elem0.loc18_22 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc18_22: = specific_function %impl.elem0.loc18_22, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_22.2: = bound_method %int_1, %specific_fn.loc18_22 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc18_22.1: = bound_method %int_1, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_22.2: = bound_method %int_1, %specific_fn.loc18 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_22.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_22.2: init %i32 = converted %int_1, %int.convert_checked.loc18 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_22.3: init %tuple.type.a1c = tuple_init (%.loc18_22.2) to %x.var [concrete = constants.%tuple] @@ -164,12 +155,11 @@ fn Main() { // CHECK:STDOUT: %.loc20_12.1: %i32 = value_of_initializer %int.convert_checked.loc20 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %.loc20_12.2: %i32 = converted %int_6, %.loc20_12.1 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc20_8, %.loc20_12.2) -// CHECK:STDOUT: %impl.elem0.loc18_3: %.6a9 = impl_witness_access constants.%Destroy.impl_witness.088, element0 [concrete = constants.%Op.c8e] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %x.var, %impl.elem0.loc18_3 -// CHECK:STDOUT: %specific_fn.loc18_3: = specific_function %impl.elem0.loc18_3, @Op.3(constants.%tuple.type.a1c) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %x.var, %specific_fn.loc18_3 +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.c8e +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.c8e, @Op.3(constants.%tuple.type.a1c) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.0b7 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/return_implicit.carbon b/toolchain/check/testdata/function/call/return_implicit.carbon index b4573a402c8b..2b39cba574de 100644 --- a/toolchain/check/testdata/function/call/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/return_implicit.carbon @@ -29,16 +29,9 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -49,8 +42,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -84,12 +75,11 @@ fn Main() { // CHECK:STDOUT: %.loc19_11.3: type = converted %.loc19_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc19_3.1: = bound_method %b.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc19_3.2: = bound_method %b.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %b.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %b.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %b.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc19_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon index 59289beda598..7bc459aad18f 100644 --- a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon @@ -212,16 +212,9 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [concrete] // CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.45e: = impl_witness imports.%Destroy.impl_witness_table, @impl(%D) [concrete] // CHECK:STDOUT: %Op.type.548: type = fn_type @Op.2, @impl(%D) [concrete] // CHECK:STDOUT: %Op.2d4: %Op.type.548 = struct_value () [concrete] // CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %D, (%Destroy.impl_witness.45e) [concrete] -// CHECK:STDOUT: %.64e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2d4, @Op.2(%D) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -241,8 +234,6 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//incomplete_return, loc37_10, loaded [concrete = constants.%complete_type.357] // CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//incomplete_return, inst20 [no loc], unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -285,18 +276,16 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %.loc34_15.1: ref %D = temporary_storage // CHECK:STDOUT: %ReturnDUsed.call: init %D = call %ReturnDUsed.ref() to %.loc34_15.1 // CHECK:STDOUT: %.loc34_15.2: ref %D = temporary %.loc34_15.1, %ReturnDUsed.call -// CHECK:STDOUT: %impl.elem0.loc34: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc34_15.1: = bound_method %.loc34_15.1, %impl.elem0.loc34 -// CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc34_15.2: = bound_method %.loc34_15.1, %specific_fn.loc34 +// CHECK:STDOUT: %Op.bound.loc34: = bound_method %.loc34_15.1, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.2d4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc34: = bound_method %.loc34_15.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc34: %ptr.19c = addr_of %.loc34_15.1 -// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34_15.2(%addr.loc34) -// CHECK:STDOUT: %impl.elem0.loc33: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc33_17.1: = bound_method %.loc33_17.1, %impl.elem0.loc33 -// CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc33_17.2: = bound_method %.loc33_17.1, %specific_fn.loc33 +// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34(%addr.loc34) +// CHECK:STDOUT: %Op.bound.loc33: = bound_method %.loc33_17.1, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.2d4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc33: = bound_method %.loc33_17.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc33: %ptr.19c = addr_of %.loc33_17.1 -// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33_17.2(%addr.loc33) +// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33(%addr.loc33) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/fail_local_decl.carbon b/toolchain/check/testdata/function/definition/fail_local_decl.carbon index 28e3e4c4ab31..44d3f50b17a7 100644 --- a/toolchain/check/testdata/function/definition/fail_local_decl.carbon +++ b/toolchain/check/testdata/function/definition/fail_local_decl.carbon @@ -103,16 +103,9 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.eb8: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.type.069: type = fn_type @Op.2, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.d5a: %Op.type.069 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_struct_type, (%Destroy.impl_witness.eb8) [concrete] -// CHECK:STDOUT: %.9da: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d5a, @Op.2(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -123,8 +116,6 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -158,18 +149,16 @@ fn F() { // CHECK:STDOUT: %.loc14_21.3: type = converted %.loc14_21.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %w: ref %empty_struct_type = bind_name w, %w.var -// CHECK:STDOUT: %impl.elem0.loc14: %.9da = impl_witness_access constants.%Destroy.impl_witness.eb8, element0 [concrete = constants.%Op.d5a] -// CHECK:STDOUT: %bound_method.loc14_13.1: = bound_method %w.var, %impl.elem0.loc14 -// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_13.2: = bound_method %w.var, %specific_fn.loc14 +// CHECK:STDOUT: %Op.bound.loc14: = bound_method %w.var, constants.%Op.d5a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.d5a, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc14: = bound_method %w.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc14: %ptr.c28 = addr_of %w.var -// CHECK:STDOUT: %no_op.loc14: init %empty_tuple.type = call %bound_method.loc14_13.2(%addr.loc14) -// CHECK:STDOUT: %impl.elem0.loc9: %.9da = impl_witness_access constants.%Destroy.impl_witness.eb8, element0 [concrete = constants.%Op.d5a] -// CHECK:STDOUT: %bound_method.loc9_11.1: = bound_method %v.var, %impl.elem0.loc9 -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_11.2: = bound_method %v.var, %specific_fn.loc9 +// CHECK:STDOUT: %no_op.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14) +// CHECK:STDOUT: %Op.bound.loc9: = bound_method %v.var, constants.%Op.d5a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.d5a, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc9: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9: %ptr.c28 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_11.2(%addr.loc9) +// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/call.carbon b/toolchain/check/testdata/function/generic/call.carbon index 499763acdcf1..e8bd8eea9796 100644 --- a/toolchain/check/testdata/function/generic/call.carbon +++ b/toolchain/check/testdata/function/generic/call.carbon @@ -83,15 +83,9 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %CallSpecific: %CallSpecific.type = struct_value () [concrete] // CHECK:STDOUT: %Function.specific_fn.1b5: = specific_function %Function, @Function(%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -102,8 +96,6 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -256,12 +248,11 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %Function.specific_fn: = specific_function %Function.ref, @Function(constants.%C) [concrete = constants.%Function.specific_fn.1b5] // CHECK:STDOUT: %.loc18: ref %C = splice_block %return {} // CHECK:STDOUT: %Function.call: init %C = call %Function.specific_fn(%x.ref) to %.loc18 -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc18_23.1: = bound_method %.loc18, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_23.2: = bound_method %.loc18, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc18, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc18, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc18 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_23.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Function.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -327,15 +318,9 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %CallSpecific: %CallSpecific.type = struct_value () [concrete] // CHECK:STDOUT: %Function.specific_fn.1b5: = specific_function %Function, @Function(%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -346,8 +331,6 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -496,12 +479,11 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %Function.specific_fn: = specific_function %Function.ref, @Function(constants.%C) [concrete = constants.%Function.specific_fn.1b5] // CHECK:STDOUT: %.loc18: ref %C = splice_block %return {} // CHECK:STDOUT: %Function.call: init %C = call %Function.specific_fn(%x.ref) to %.loc18 -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc18_23.1: = bound_method %.loc18, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_23.2: = bound_method %.loc18, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc18, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc18, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc18 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_23.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Function.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 1b5b56745d54..c12627a382af 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -530,15 +530,9 @@ fn F() { // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.720: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%A) [concrete] // CHECK:STDOUT: %A.val: %A = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.b6e: = impl_witness imports.%Destroy.impl_witness_table, @impl(%A) [concrete] // CHECK:STDOUT: %Op.type.b96: type = fn_type @Op.2, @impl(%A) [concrete] // CHECK:STDOUT: %Op.885: %Op.type.b96 = struct_value () [concrete] // CHECK:STDOUT: %complete_type.7ea: = complete_type_witness %ptr.6db [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%Destroy.impl_witness.b6e) [concrete] -// CHECK:STDOUT: %.af1: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.885, @Op.2(%A) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -549,8 +543,6 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -636,12 +628,11 @@ fn F() { // CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init %ptr.6db = call %ExplicitAndAlsoDeduced.specific_fn(%.loc11_37.6) // CHECK:STDOUT: %.loc11_39.1: %ptr.6db = value_of_initializer %ExplicitAndAlsoDeduced.call // CHECK:STDOUT: %.loc11_39.2: %ptr.6db = converted %ExplicitAndAlsoDeduced.call, %.loc11_39.1 -// CHECK:STDOUT: %impl.elem0: %.af1 = impl_witness_access constants.%Destroy.impl_witness.b6e, element0 [concrete = constants.%Op.885] -// CHECK:STDOUT: %bound_method.loc11_37.1: = bound_method %.loc11_37.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_37.2: = bound_method %.loc11_37.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc11_37.2, constants.%Op.885 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.885, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc11_37.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.6db = addr_of %.loc11_37.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc11_37.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc11_39.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 0361277c4abc..9a6ac3f76cdc 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -70,29 +70,17 @@ fn G() { // CHECK:STDOUT: %Make.e4b: %Make.type.708 = struct_value () [concrete] // CHECK:STDOUT: %Make.specific_fn.834: = specific_function %Make.e4b, @Make(%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.494: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.494 [concrete] // CHECK:STDOUT: %Op.specific_fn.6eb: = specific_function %Op.5d7, @Op.2(%C) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl.49c(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet.926: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.926 [concrete] // CHECK:STDOUT: %Op.specific_fn.393: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.2, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.2(%i32) [concrete] // CHECK:STDOUT: %complete_type.782: = complete_type_witness %empty_tuple.type [concrete] // CHECK:STDOUT: } @@ -106,8 +94,6 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -247,30 +233,26 @@ fn G() { // CHECK:STDOUT: assign %c.var, %Make.call.loc24 // CHECK:STDOUT: %C.ref.loc24_10: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %impl.elem0.loc24_3.1: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %.loc24_3, %impl.elem0.loc24_3.1 -// CHECK:STDOUT: %specific_fn.loc24_3.1: = specific_function %impl.elem0.loc24_3.1, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] -// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %.loc24_3, %specific_fn.loc24_3.1 +// CHECK:STDOUT: %Op.bound.loc24_3.1: = bound_method %.loc24_3, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] +// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %.loc24_3, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc24_3.1: %ptr.019 = addr_of %.loc24_3 -// CHECK:STDOUT: %no_op.loc24_3.1: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24_3.1) -// CHECK:STDOUT: %impl.elem0.loc24_3.2: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc24_3.3: = bound_method %c.var, %impl.elem0.loc24_3.2 -// CHECK:STDOUT: %specific_fn.loc24_3.2: = specific_function %impl.elem0.loc24_3.2, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] -// CHECK:STDOUT: %bound_method.loc24_3.4: = bound_method %c.var, %specific_fn.loc24_3.2 +// CHECK:STDOUT: %no_op.loc24_3.1: init %empty_tuple.type = call %bound_method.loc24_3.1(%addr.loc24_3.1) +// CHECK:STDOUT: %Op.bound.loc24_3.2: = bound_method %c.var, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] +// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %c.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc24_3.2: %ptr.019 = addr_of %c.var -// CHECK:STDOUT: %no_op.loc24_3.2: init %empty_tuple.type = call %bound_method.loc24_3.4(%addr.loc24_3.2) -// CHECK:STDOUT: %impl.elem0.loc23: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %b.var, %impl.elem0.loc23 -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %b.var, %specific_fn.loc23 +// CHECK:STDOUT: %no_op.loc24_3.2: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24_3.2) +// CHECK:STDOUT: %Op.bound.loc23: = bound_method %b.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %b.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc23: %ptr.843 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3.2(%addr.loc23) -// CHECK:STDOUT: %impl.elem0.loc22: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %a.var, %impl.elem0.loc22 -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Op.2(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %a.var, %specific_fn.loc22 +// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23) +// CHECK:STDOUT: %Op.bound.loc22: = bound_method %a.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.e6a, @Op.2(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc22: = bound_method %a.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc22: %ptr.235 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22) +// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/call_basic_depth.carbon b/toolchain/check/testdata/generic/call_basic_depth.carbon index f34fc8e72227..a07785136040 100644 --- a/toolchain/check/testdata/generic/call_basic_depth.carbon +++ b/toolchain/check/testdata/generic/call_basic_depth.carbon @@ -67,15 +67,9 @@ fn M() { // CHECK:STDOUT: %H.specific_fn.1ed: = specific_function %H, @H(%T) [symbolic] // CHECK:STDOUT: %Cfn.specific_fn.53f: = specific_function %Cfn, @Cfn(%T) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet.494: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.494 [concrete] // CHECK:STDOUT: %Op.specific_fn.6eb: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: %M.type: type = fn_type @M [concrete] // CHECK:STDOUT: %M: %M.type = struct_value () [concrete] @@ -105,12 +99,9 @@ fn M() { // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %F.specific_fn.501: = specific_function %F, @F(%i32) [concrete] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%i32) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.2, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.2(%i32) [concrete] // CHECK:STDOUT: %H.specific_fn.aac: = specific_function %H, @H(%i32) [concrete] // CHECK:STDOUT: %Cfn.specific_fn.7b2: = specific_function %Cfn, @Cfn(%i32) [concrete] @@ -125,8 +116,6 @@ fn M() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] @@ -293,12 +282,11 @@ fn M() { // CHECK:STDOUT: %.loc34: %C = bind_value %c.ref // CHECK:STDOUT: %Cfn.call: init %empty_tuple.type = call %bound_method.loc34(%.loc34, %x.ref.loc34) // CHECK:STDOUT: %x.ref.loc35: @G.%T.loc29_6.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc33_3.1: = bound_method %c.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] -// CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %c.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %c.var, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn.6eb] +// CHECK:STDOUT: %bound_method.loc33: = bound_method %c.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc33_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc33(%addr) // CHECK:STDOUT: return %x.ref.loc35 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -311,10 +299,10 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc39_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc39_3.1: = bound_method %int_0, %impl.elem0.loc39_3.1 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc39_3.1: = specific_function %impl.elem0.loc39_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc39_3.2: = bound_method %int_0, %specific_fn.loc39_3.1 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc39_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc39_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc39_3.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc39_3: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %n.var, %.loc39_3 @@ -345,18 +333,16 @@ fn M() { // CHECK:STDOUT: %.loc43: %i32 = bind_value %n.ref.loc43 // CHECK:STDOUT: %G.call: init %i32 = call %G.specific_fn(%.loc43) // CHECK:STDOUT: assign %m.ref, %G.call -// CHECK:STDOUT: %impl.elem0.loc40: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc40_3.1: = bound_method %m.var, %impl.elem0.loc40 -// CHECK:STDOUT: %specific_fn.loc40: = specific_function %impl.elem0.loc40, @Op.2(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc40_3.2: = bound_method %m.var, %specific_fn.loc40 +// CHECK:STDOUT: %Op.bound.loc40: = bound_method %m.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.2(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc40: = bound_method %m.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc40: %ptr.235 = addr_of %m.var -// CHECK:STDOUT: %no_op.loc40: init %empty_tuple.type = call %bound_method.loc40_3.2(%addr.loc40) -// CHECK:STDOUT: %impl.elem0.loc39_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc39_3.3: = bound_method %n.var, %impl.elem0.loc39_3.2 -// CHECK:STDOUT: %specific_fn.loc39_3.2: = specific_function %impl.elem0.loc39_3.2, @Op.2(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc39_3.4: = bound_method %n.var, %specific_fn.loc39_3.2 +// CHECK:STDOUT: %no_op.loc40: init %empty_tuple.type = call %bound_method.loc40(%addr.loc40) +// CHECK:STDOUT: %Op.bound.loc39: = bound_method %n.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.2(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc39_3.3: = bound_method %n.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc39: %ptr.235 = addr_of %n.var -// CHECK:STDOUT: %no_op.loc39: init %empty_tuple.type = call %bound_method.loc39_3.4(%addr.loc39) +// CHECK:STDOUT: %no_op.loc39: init %empty_tuple.type = call %bound_method.loc39_3.3(%addr.loc39) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index acfd6fcfb62d..d5461c2752b8 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -93,15 +93,9 @@ class C(C:! type) { // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %C.val: %C.d45 = struct_value (%int_1.5d2) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.bcb: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C.d45) [concrete] // CHECK:STDOUT: %Op.type.39b: type = fn_type @Op.3, @impl.49c(%C.d45) [concrete] // CHECK:STDOUT: %Op.5e9: %Op.type.39b = struct_value () [concrete] // CHECK:STDOUT: %ptr.9c7: type = ptr_type %C.d45 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.d45, (%Destroy.impl_witness.bcb) [concrete] -// CHECK:STDOUT: %.f33: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5e9, @Op.3(%C.d45) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -118,8 +112,6 @@ class C(C:! type) { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -169,10 +161,10 @@ class C(C:! type) { // CHECK:STDOUT: %v.var: ref %C.d45 = var %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc8_26.1: %struct_type.x.c96 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc8_26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc8_26.1: = bound_method %int_1, %impl.elem0.loc8_26 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc8_26: = specific_function %impl.elem0.loc8_26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_26.2: = bound_method %int_1, %specific_fn.loc8_26 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc8_26.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_26.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_26.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_26.2: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_26.3: ref %i32 = class_element_access %v.var, element0 @@ -187,12 +179,11 @@ class C(C:! type) { // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [concrete = constants.%C.d45] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %C.d45 = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0.loc8_3: %.f33 = impl_witness_access constants.%Destroy.impl_witness.bcb, element0 [concrete = constants.%Op.5e9] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %v.var, %impl.elem0.loc8_3 -// CHECK:STDOUT: %specific_fn.loc8_3: = specific_function %impl.elem0.loc8_3, @Op.3(constants.%C.d45) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %v.var, %specific_fn.loc8_3 +// CHECK:STDOUT: %Op.bound: = bound_method %v.var, constants.%Op.5e9 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5e9, @Op.3(constants.%C.d45) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_3: = bound_method %v.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.9c7 = addr_of %v.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/template/unimplemented.carbon b/toolchain/check/testdata/generic/template/unimplemented.carbon index 05b9faded5d0..3252480749a8 100644 --- a/toolchain/check/testdata/generic/template/unimplemented.carbon +++ b/toolchain/check/testdata/generic/template/unimplemented.carbon @@ -254,17 +254,11 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %T.8b3d5d.2: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.95 [concrete] -// CHECK:STDOUT: %Op.type.bc96ef.1: type = fn_type @Op.96, @impl.49c(%T.8b3d5d.2) [symbolic] -// CHECK:STDOUT: %Op.46fd6b.1: %Op.type.bc96ef.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.96, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.96(%i32) [concrete] // CHECK:STDOUT: %ptr.79f131.2: type = ptr_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %require_complete.6e5e64.2: = require_complete_type %ptr.79f131.2 [template] @@ -286,8 +280,6 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc96ef.1) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46fd6b.1)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -352,12 +344,11 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %impl.elem0.loc22: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %w.var, %impl.elem0.loc22 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc22, @Op.96(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %w.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %w.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.96(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc22: = bound_method %w.var, %Op.specific_fn // CHECK:STDOUT: %addr.loc22: %ptr.235 = addr_of %w.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22) // CHECK:STDOUT: %impl.elem0.loc14_3.1: @F.%.loc14_3.6 (%.a63) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.538)] // CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %v.var, %impl.elem0.loc14_3.1 // CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Op.95(constants.%Destroy.facet.713) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.1af)] diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 303ff5f2305f..aca52f1e8ae6 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -55,15 +55,8 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.6a9) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.bc9: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.type.fa9: type = fn_type @Op.3, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.606: %Op.type.fa9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.bc9) [concrete] -// CHECK:STDOUT: %.050: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.606, @Op.3(%array_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -82,8 +75,6 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -137,10 +128,10 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %x.var: ref %array_type = var %x.var_patt // CHECK:STDOUT: %int_0.loc16_27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc16_29.1: %tuple.type = tuple_literal (%int_0.loc16_27) -// CHECK:STDOUT: %impl.elem0.loc16_29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_29.1: = bound_method %int_0.loc16_27, %impl.elem0.loc16_29 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc16_29: = specific_function %impl.elem0.loc16_29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_29.2: = bound_method %int_0.loc16_27, %specific_fn.loc16_29 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_29.1: = bound_method %int_0.loc16_27, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_29.2: = bound_method %int_0.loc16_27, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_29.2(%int_0.loc16_27) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_29.2: init %i32 = converted %int_0.loc16_27, %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %int_0.loc16_29: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] @@ -179,12 +170,11 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc17_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: %impl.elem0.loc16_3: %.050 = impl_witness_access constants.%Destroy.impl_witness.bc9, element0 [concrete = constants.%Op.606] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %x.var, %impl.elem0.loc16_3 -// CHECK:STDOUT: %specific_fn.loc16_3: = specific_function %impl.elem0.loc16_3, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %x.var, %specific_fn.loc16_3 +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.606 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.606, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_3: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.260 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_3(%addr) // CHECK:STDOUT: return %.loc17_10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 160744bd5a59..d8ac7571ba12 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -81,22 +81,12 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.711: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.type.ba2: type = fn_type @Op.3, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.649: %Op.type.ba2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %ptr.235, (%Destroy.impl_witness.711) [concrete] -// CHECK:STDOUT: %.a79: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2bf [concrete] // CHECK:STDOUT: %Op.specific_fn.829: = specific_function %Op.649, @Op.3(%ptr.235) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: %PartiallyConstant.type: type = fn_type @PartiallyConstant [concrete] // CHECK:STDOUT: %PartiallyConstant: %PartiallyConstant.type = struct_value () [concrete] @@ -115,8 +105,6 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -272,10 +260,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc27_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc27_3.1: = bound_method %int_1, %impl.elem0.loc27_3.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc27_3.1: = specific_function %impl.elem0.loc27_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_3.2: = bound_method %int_1, %specific_fn.loc27_3.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc27_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc27_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc27_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc27_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign %v.var, %.loc27_3 @@ -337,18 +325,16 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %.loc29_11: %ptr.235 = bind_value %w.ref // CHECK:STDOUT: %.loc29_10.1: ref %i32 = deref %.loc29_11 // CHECK:STDOUT: %.loc29_10.2: %i32 = bind_value %.loc29_10.1 -// CHECK:STDOUT: %impl.elem0.loc28: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc28_3.1: = bound_method %w.var, %impl.elem0.loc28 -// CHECK:STDOUT: %specific_fn.loc28: = specific_function %impl.elem0.loc28, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc28_3.2: = bound_method %w.var, %specific_fn.loc28 +// CHECK:STDOUT: %Op.bound.loc28: = bound_method %w.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc28: = bound_method %w.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc28_3: %ptr.5d5 = addr_of %w.var -// CHECK:STDOUT: %no_op.loc28: init %empty_tuple.type = call %bound_method.loc28_3.2(%addr.loc28_3) -// CHECK:STDOUT: %impl.elem0.loc27_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc27_3.3: = bound_method %v.var, %impl.elem0.loc27_3.2 -// CHECK:STDOUT: %specific_fn.loc27_3.2: = specific_function %impl.elem0.loc27_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc27_3.4: = bound_method %v.var, %specific_fn.loc27_3.2 +// CHECK:STDOUT: %no_op.loc28: init %empty_tuple.type = call %bound_method.loc28(%addr.loc28_3) +// CHECK:STDOUT: %Op.bound.loc27: = bound_method %v.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc27_3.3: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc27: %ptr.235 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc27: init %empty_tuple.type = call %bound_method.loc27_3.4(%addr.loc27) +// CHECK:STDOUT: %no_op.loc27: init %empty_tuple.type = call %bound_method.loc27_3.3(%addr.loc27) // CHECK:STDOUT: return %.loc29_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -360,10 +346,10 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc33_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc33_3.1: = bound_method %int_1, %impl.elem0.loc33_3.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc33_3.1: = specific_function %impl.elem0.loc33_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %int_1, %specific_fn.loc33_3.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc33_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc33_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc33_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign %v.var, %.loc33_3 @@ -422,18 +408,16 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %.loc35_11: %ptr.235 = bind_value %w.ref // CHECK:STDOUT: %.loc35_10.1: ref %i32 = deref %.loc35_11 // CHECK:STDOUT: %.loc35_10.2: %i32 = bind_value %.loc35_10.1 -// CHECK:STDOUT: %impl.elem0.loc34: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc34_3.1: = bound_method %w.var, %impl.elem0.loc34 -// CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc34_3.2: = bound_method %w.var, %specific_fn.loc34 +// CHECK:STDOUT: %Op.bound.loc34: = bound_method %w.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc34: = bound_method %w.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc34_3: %ptr.5d5 = addr_of %w.var -// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34_3.2(%addr.loc34_3) -// CHECK:STDOUT: %impl.elem0.loc33_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc33_3.3: = bound_method %v.var, %impl.elem0.loc33_3.2 -// CHECK:STDOUT: %specific_fn.loc33_3.2: = specific_function %impl.elem0.loc33_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc33_3.4: = bound_method %v.var, %specific_fn.loc33_3.2 +// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34(%addr.loc34_3) +// CHECK:STDOUT: %Op.bound.loc33: = bound_method %v.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc33_3.3: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc33: %ptr.235 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33_3.4(%addr.loc33) +// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33_3.3(%addr.loc33) // CHECK:STDOUT: return %.loc35_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index 87da182c053b..61aaa81a1c72 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -124,7 +124,6 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc12_7: // CHECK:STDOUT: %v: = bind_name v, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -228,8 +227,6 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc14_7: // CHECK:STDOUT: %w: = bind_name w, [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc14: = impl_witness_access , element0 [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc9: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index 9e9b1ba996d0..3cce1b8fa98f 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -61,15 +61,8 @@ fn F(cond: bool) { // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %struct: %struct_type.a.b.501 = struct_value (%int_1.5d2, %int_2.ef8) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.ad1: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: %Op.type.da3: type = fn_type @Op.3, @impl.49c(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: %Op.9db: %Op.type.da3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %struct_type.a.b.501, (%Destroy.impl_witness.ad1) [concrete] -// CHECK:STDOUT: %.8e0: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.9db, @Op.3(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -88,8 +81,6 @@ fn F(cond: bool) { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -193,12 +184,11 @@ fn F(cond: bool) { // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc19_5: %struct_type.a.b.501 = block_arg !if.expr.result // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc19_5) -// CHECK:STDOUT: %impl.elem0.loc18_3: %.8e0 = impl_witness_access constants.%Destroy.impl_witness.ad1, element0 [concrete = constants.%Op.9db] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %a.var, %impl.elem0.loc18_3 -// CHECK:STDOUT: %specific_fn.loc18_3: = specific_function %impl.elem0.loc18_3, @Op.3(constants.%struct_type.a.b.501) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %a.var, %specific_fn.loc18_3 +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.9db +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.9db, @Op.3(constants.%struct_type.a.b.501) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.3ee = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index bd024a2025d8..fb06cdf75f0c 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -113,22 +113,13 @@ class X(U:! type) { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %.22c: type = fn_type_with_self_type %F.type.7f1, %HasF.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.9ca: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Param) [concrete] // CHECK:STDOUT: %Op.type.70d: type = fn_type @Op.3, @impl.49c(%Param) [concrete] // CHECK:STDOUT: %Op.e46: %Op.type.70d = struct_value () [concrete] // CHECK:STDOUT: %ptr.756: type = ptr_type %Param [concrete] -// CHECK:STDOUT: %Destroy.facet.6a7: %Destroy.type = facet_value %Param, (%Destroy.impl_witness.9ca) [concrete] -// CHECK:STDOUT: %.92a: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.6a7 [concrete] // CHECK:STDOUT: %Op.specific_fn.022: = specific_function %Op.e46, @Op.3(%Param) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -145,8 +136,6 @@ class X(U:! type) { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -289,9 +278,9 @@ class X(U:! type) { // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %.loc21_17: %HasF.assoc_type.257 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [concrete = constants.%assoc0.afb] // CHECK:STDOUT: %F.ref.loc21: %HasF.assoc_type.257 = name_ref F, %.loc21_17 [concrete = constants.%assoc0.afb] -// CHECK:STDOUT: %impl.elem0.loc21_17: %.22c = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.901] +// CHECK:STDOUT: %impl.elem0.loc21: %.22c = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.901] // CHECK:STDOUT: %.loc21_20.1: ref %Param = temporary_storage -// CHECK:STDOUT: %F.call.loc21: init %Param = call %impl.elem0.loc21_17() to %.loc21_20.1 +// CHECK:STDOUT: %F.call.loc21: init %Param = call %impl.elem0.loc21() to %.loc21_20.1 // CHECK:STDOUT: %.loc21_20.2: ref %Param = temporary %.loc21_20.1, %F.call.loc21 // CHECK:STDOUT: %x.ref.loc21: %Param.elem = name_ref x, @Param.%.loc9 [concrete = @Param.%.loc9] // CHECK:STDOUT: %.loc21_21.1: ref %i32 = class_element_access %.loc21_20.2, element0 @@ -309,9 +298,9 @@ class X(U:! type) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %.loc22_17: %HasF.assoc_type.257 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [concrete = constants.%assoc0.afb] // CHECK:STDOUT: %F.ref.loc22: %HasF.assoc_type.257 = name_ref F, %.loc22_17 [concrete = constants.%assoc0.afb] -// CHECK:STDOUT: %impl.elem0.loc22_17: %.22c = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.901] +// CHECK:STDOUT: %impl.elem0.loc22: %.22c = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.901] // CHECK:STDOUT: %.loc22_20.1: ref %Param = temporary_storage -// CHECK:STDOUT: %F.call.loc22: init %Param = call %impl.elem0.loc22_17() to %.loc22_20.1 +// CHECK:STDOUT: %F.call.loc22: init %Param = call %impl.elem0.loc22() to %.loc22_20.1 // CHECK:STDOUT: %.loc22_20.2: ref %Param = temporary %.loc22_20.1, %F.call.loc22 // CHECK:STDOUT: %x.ref.loc22: %Param.elem = name_ref x, @Param.%.loc9 [concrete = @Param.%.loc9] // CHECK:STDOUT: %.loc22_21.1: ref %i32 = class_element_access %.loc22_20.2, element0 @@ -322,24 +311,21 @@ class X(U:! type) { // CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0.loc22_20: %.92a = impl_witness_access constants.%Destroy.impl_witness.9ca, element0 [concrete = constants.%Op.e46] -// CHECK:STDOUT: %bound_method.loc22_20.1: = bound_method %.loc22_20.1, %impl.elem0.loc22_20 -// CHECK:STDOUT: %specific_fn.loc22_20: = specific_function %impl.elem0.loc22_20, @Op.3(constants.%Param) [concrete = constants.%Op.specific_fn.022] -// CHECK:STDOUT: %bound_method.loc22_20.2: = bound_method %.loc22_20.1, %specific_fn.loc22_20 +// CHECK:STDOUT: %Op.bound.loc22_20: = bound_method %.loc22_20.1, constants.%Op.e46 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e46, @Op.3(constants.%Param) [concrete = constants.%Op.specific_fn.022] +// CHECK:STDOUT: %bound_method.loc22_20: = bound_method %.loc22_20.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc22_20: %ptr.756 = addr_of %.loc22_20.1 -// CHECK:STDOUT: %no_op.loc22_20: init %empty_tuple.type = call %bound_method.loc22_20.2(%addr.loc22_20) -// CHECK:STDOUT: %impl.elem0.loc22_3: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %b.var, %impl.elem0.loc22_3 -// CHECK:STDOUT: %specific_fn.loc22_3: = specific_function %impl.elem0.loc22_3, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %b.var, %specific_fn.loc22_3 +// CHECK:STDOUT: %no_op.loc22_20: init %empty_tuple.type = call %bound_method.loc22_20(%addr.loc22_20) +// CHECK:STDOUT: %Op.bound.loc22_3: = bound_method %b.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc22_3: = bound_method %b.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc22_3: %ptr.235 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc22_3: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22_3) -// CHECK:STDOUT: %impl.elem0.loc21_20: %.92a = impl_witness_access constants.%Destroy.impl_witness.9ca, element0 [concrete = constants.%Op.e46] -// CHECK:STDOUT: %bound_method.loc21_20.1: = bound_method %.loc21_20.1, %impl.elem0.loc21_20 -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21_20, @Op.3(constants.%Param) [concrete = constants.%Op.specific_fn.022] -// CHECK:STDOUT: %bound_method.loc21_20.2: = bound_method %.loc21_20.1, %specific_fn.loc21 +// CHECK:STDOUT: %no_op.loc22_3: init %empty_tuple.type = call %bound_method.loc22_3(%addr.loc22_3) +// CHECK:STDOUT: %Op.bound.loc21: = bound_method %.loc21_20.1, constants.%Op.e46 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.e46, @Op.3(constants.%Param) [concrete = constants.%Op.specific_fn.022] +// CHECK:STDOUT: %bound_method.loc21: = bound_method %.loc21_20.1, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc21: %ptr.756 = addr_of %.loc21_20.1 -// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21_20.2(%addr.loc21) +// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index f80a7e215c21..47d2d4a8d93a 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -187,16 +187,9 @@ fn F() { // CHECK:STDOUT: %Point.val: %Point = struct_value () [concrete] // CHECK:STDOUT: %.766: type = fn_type_with_self_type %Zero.type.822, %Z.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.ea4: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Point) [concrete] // CHECK:STDOUT: %Op.type.003: type = fn_type @Op.2, @impl.49c(%Point) [concrete] // CHECK:STDOUT: %Op.d2d: %Op.type.003 = struct_value () [concrete] // CHECK:STDOUT: %ptr.536: type = ptr_type %Point [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Point, (%Destroy.impl_witness.ea4) [concrete] -// CHECK:STDOUT: %.038: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d2d, @Op.2(%Point) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -207,8 +200,6 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -308,14 +299,13 @@ fn F() { // CHECK:STDOUT: %.loc25_5.4: ref %Point = temporary %.loc25_5.2, %.loc25_5.3 // CHECK:STDOUT: %.loc25_7: ref %Point = converted %.loc25_5.1, %.loc25_5.4 // CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0.534] -// CHECK:STDOUT: %impl.elem0.loc25_16: %.766 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Zero.dec] -// CHECK:STDOUT: %Zero.call: init %empty_tuple.type = call %impl.elem0.loc25_16() -// CHECK:STDOUT: %impl.elem0.loc25_5: %.038 = impl_witness_access constants.%Destroy.impl_witness.ea4, element0 [concrete = constants.%Op.d2d] -// CHECK:STDOUT: %bound_method.loc25_5.1: = bound_method %.loc25_5.2, %impl.elem0.loc25_5 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc25_5, @Op.2(constants.%Point) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc25_5.2: = bound_method %.loc25_5.2, %specific_fn +// CHECK:STDOUT: %impl.elem0: %.766 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Zero.dec] +// CHECK:STDOUT: %Zero.call: init %empty_tuple.type = call %impl.elem0() +// CHECK:STDOUT: %Op.bound: = bound_method %.loc25_5.2, constants.%Op.d2d +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d2d, @Op.2(constants.%Point) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc25_5.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.536 = addr_of %.loc25_5.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc25_5.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index 733b690292fd..6bba10213f7e 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -257,16 +257,9 @@ class X { // CHECK:STDOUT: %Point.val: %Point = struct_value () [concrete] // CHECK:STDOUT: %.462: type = fn_type_with_self_type %Method.type.f12, %Z.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.ea4: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Point) [concrete] // CHECK:STDOUT: %Op.type.003: type = fn_type @Op.2, @impl.49c(%Point) [concrete] // CHECK:STDOUT: %Op.d2d: %Op.type.003 = struct_value () [concrete] // CHECK:STDOUT: %ptr.536: type = ptr_type %Point [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Point, (%Destroy.impl_witness.ea4) [concrete] -// CHECK:STDOUT: %.038: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d2d, @Op.2(%Point) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -277,8 +270,6 @@ class X { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -439,8 +430,8 @@ class X { // CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0.534] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%Point, (constants.%Z.impl_witness) [concrete = constants.%Z.facet] // CHECK:STDOUT: %.loc28: %Z.type = converted %Point.ref.loc28, %Z.facet [concrete = constants.%Z.facet] -// CHECK:STDOUT: %impl.elem0.loc28: %.d52 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Zero.dec] -// CHECK:STDOUT: %Zero.call: init %empty_tuple.type = call %impl.elem0.loc28() +// CHECK:STDOUT: %impl.elem0: %.d52 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Zero.dec] +// CHECK:STDOUT: %Zero.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: %.loc29_5.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %Point.ref.loc29: type = name_ref Point, file.%Point.decl [concrete = constants.%Point] // CHECK:STDOUT: %.loc29_5.2: ref %Point = temporary_storage @@ -453,12 +444,11 @@ class X { // CHECK:STDOUT: %bound_method.loc29_16: = bound_method %.loc29_7.1, %impl.elem1 // CHECK:STDOUT: %.loc29_7.2: %Point = bind_value %.loc29_7.1 // CHECK:STDOUT: %Method.call: init %empty_tuple.type = call %bound_method.loc29_16(%.loc29_7.2) -// CHECK:STDOUT: %impl.elem0.loc29: %.038 = impl_witness_access constants.%Destroy.impl_witness.ea4, element0 [concrete = constants.%Op.d2d] -// CHECK:STDOUT: %bound_method.loc29_5.1: = bound_method %.loc29_5.2, %impl.elem0.loc29 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc29, @Op.2(constants.%Point) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc29_5.2: = bound_method %.loc29_5.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc29_5.2, constants.%Op.d2d +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d2d, @Op.2(constants.%Point) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc29_5: = bound_method %.loc29_5.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.536 = addr_of %.loc29_5.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc29_5.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc29_5(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index 2494fe75e3b7..819f2196ad34 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -338,16 +338,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.type.d3b58f.2: type = fn_type @F.19 [concrete] // CHECK:STDOUT: %F.be86c9.2: %F.type.d3b58f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1f3: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%FDifferentReturnType) [concrete] // CHECK:STDOUT: %Op.type.3d3: type = fn_type @Op.2, @impl.49c(%FDifferentReturnType) [concrete] // CHECK:STDOUT: %Op.ddd: %Op.type.3d3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.954: type = ptr_type %FDifferentReturnType [concrete] -// CHECK:STDOUT: %Destroy.facet.ada: %Destroy.type = facet_value %FDifferentReturnType, (%Destroy.impl_witness.1f3) [concrete] -// CHECK:STDOUT: %.04a: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.ada [concrete] // CHECK:STDOUT: %Op.specific_fn.b4b: = specific_function %Op.ddd, @Op.2(%FDifferentReturnType) [concrete] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete] // CHECK:STDOUT: %Self.2ff: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] @@ -385,11 +378,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.type.f90165.2: type = fn_type @F.22 [concrete] // CHECK:STDOUT: %F.fa8d04.2: %F.type.f90165.2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.f40: type = ptr_type %array_type.a41 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.de1: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type.a41) [concrete] // CHECK:STDOUT: %Op.type.ba3: type = fn_type @Op.2, @impl.49c(%array_type.a41) [concrete] // CHECK:STDOUT: %Op.d25: %Op.type.ba3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.158: %Destroy.type = facet_value %array_type.a41, (%Destroy.impl_witness.de1) [concrete] -// CHECK:STDOUT: %.bb0: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.158 [concrete] // CHECK:STDOUT: %Op.specific_fn.235: = specific_function %Op.d25, @Op.2(%array_type.a41) [concrete] // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [concrete] // CHECK:STDOUT: %SelfNested.impl_witness.d5e: = impl_witness @SelfNestedBadReturnType.%SelfNested.impl_witness_table [concrete] @@ -418,8 +408,6 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1328,12 +1316,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc200_38.1: ref %FDifferentReturnType = temporary_storage // CHECK:STDOUT: %F.call: init %FDifferentReturnType = call %F.bound(%self.ref, %b.ref) to %.loc200_38.1 // CHECK:STDOUT: %.loc200_38.2: bool = converted %F.call, [concrete = ] -// CHECK:STDOUT: %impl.elem0: %.04a = impl_witness_access constants.%Destroy.impl_witness.1f3, element0 [concrete = constants.%Op.ddd] -// CHECK:STDOUT: %bound_method.loc200_38.1: = bound_method %.loc200_38.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%FDifferentReturnType) [concrete = constants.%Op.specific_fn.b4b] -// CHECK:STDOUT: %bound_method.loc200_38.2: = bound_method %.loc200_38.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc200_38.1, constants.%Op.ddd +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ddd, @Op.2(constants.%FDifferentReturnType) [concrete = constants.%Op.specific_fn.b4b] +// CHECK:STDOUT: %bound_method: = bound_method %.loc200_38.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.954 = addr_of %.loc200_38.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc200_38.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1363,12 +1350,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc211_9.1: %SelfNestedBadParam = struct_access %tuple.elem1, element0 // CHECK:STDOUT: %.loc211_9.2: %i32 = converted %.loc211_9.1, [concrete = ] // CHECK:STDOUT: %F.call: init %array_type.a41 = call %F.ref() to %.loc211_41 -// CHECK:STDOUT: %impl.elem0: %.bb0 = impl_witness_access constants.%Destroy.impl_witness.de1, element0 [concrete = constants.%Op.d25] -// CHECK:STDOUT: %bound_method.loc211_41.1: = bound_method %.loc211_41, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%array_type.a41) [concrete = constants.%Op.specific_fn.235] -// CHECK:STDOUT: %bound_method.loc211_41.2: = bound_method %.loc211_41, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc211_41, constants.%Op.d25 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d25, @Op.2(constants.%array_type.a41) [concrete = constants.%Op.specific_fn.235] +// CHECK:STDOUT: %bound_method: = bound_method %.loc211_41, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.f40 = addr_of %.loc211_41 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc211_41.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1382,12 +1368,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc239_112.1: ref %array_type.a41 = temporary_storage // CHECK:STDOUT: %F.call: init %array_type.a41 = call %F.ref(%x.ref) to %.loc239_112.1 // CHECK:STDOUT: %.loc239_112.2: %array_type.126 = converted %F.call, [concrete = ] -// CHECK:STDOUT: %impl.elem0: %.bb0 = impl_witness_access constants.%Destroy.impl_witness.de1, element0 [concrete = constants.%Op.d25] -// CHECK:STDOUT: %bound_method.loc239_112.1: = bound_method %.loc239_112.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%array_type.a41) [concrete = constants.%Op.specific_fn.235] -// CHECK:STDOUT: %bound_method.loc239_112.2: = bound_method %.loc239_112.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc239_112.1, constants.%Op.d25 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d25, @Op.2(constants.%array_type.a41) [concrete = constants.%Op.specific_fn.235] +// CHECK:STDOUT: %bound_method: = bound_method %.loc239_112.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.f40 = addr_of %.loc239_112.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc239_112.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/generic_redeclaration.carbon b/toolchain/check/testdata/impl/generic_redeclaration.carbon index 36cc1b01f0aa..fb563731b05c 100644 --- a/toolchain/check/testdata/impl/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/generic_redeclaration.carbon @@ -572,15 +572,9 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %C.specific_fn: = specific_function %C, @C(%T) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl.49c(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -591,8 +585,6 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -732,12 +724,11 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %.loc21_14.2: ref %empty_tuple.type = temporary %.loc21_14.1, %C.call // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc21_15: %empty_tuple.type = converted %C.call, %tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc21_14.1: = bound_method %.loc21_14.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc21_14.2: = bound_method %.loc21_14.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc21_14.1, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc21_14.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %.loc21_14.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc21_14.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc21_15 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 1528abd5e855..18df940e9685 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -45,16 +45,9 @@ class C { // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -65,8 +58,6 @@ class C { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -134,12 +125,11 @@ class C { // CHECK:STDOUT: assign %c.var, %.loc23_7 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc23_7.1: = bound_method %c.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc23_7.2: = bound_method %c.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %c.var, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %c.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc23_7.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index 58d3b004bd2c..5b21af5b2d8c 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -329,23 +329,12 @@ impl () as I({}) { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.c.d.15a = struct_value (%empty_tuple, %empty_struct) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.626: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%struct_type.d.c.b36) [concrete] // CHECK:STDOUT: %Op.type.afe: type = fn_type @Op.2, @impl.49c(%struct_type.d.c.b36) [concrete] // CHECK:STDOUT: %Op.742: %Op.type.afe = struct_value () [concrete] // CHECK:STDOUT: %ptr.eab: type = ptr_type %struct_type.d.c.b36 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %struct_type.d.c.b36, (%Destroy.impl_witness.626) [concrete] -// CHECK:STDOUT: %.fa5: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.742, @Op.2(%struct_type.d.c.b36) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4ab: %.loc8_7.2 as %I.ref { @@ -403,12 +392,11 @@ impl () as I({}) { // CHECK:STDOUT: %.loc10_48.10: init %empty_struct_type = converted %.loc10_48.7, %.loc10_48.9 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_48.11: init %struct_type.c.d.15a = struct_init (%.loc10_48.6, %.loc10_48.10) to %return [concrete = constants.%struct] // CHECK:STDOUT: %.loc10_48.12: init %struct_type.c.d.15a = converted %F.call, %.loc10_48.11 [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0: %.fa5 = impl_witness_access constants.%Destroy.impl_witness.626, element0 [concrete = constants.%Op.742] -// CHECK:STDOUT: %bound_method.loc10_48.1: = bound_method %.loc10_48.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%struct_type.d.c.b36) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_48.2: = bound_method %.loc10_48.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc10_48.1, constants.%Op.742 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc10_48.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.eab = addr_of %.loc10_48.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc10_48.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc10_48.12 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -635,23 +623,12 @@ impl () as I({}) { // CHECK:STDOUT: %F.77e9d5.1: %F.type.b24d6f.1 = struct_value () [concrete] // CHECK:STDOUT: %F.type.b24d6f.2: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.77e9d5.2: %F.type.b24d6f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.39d: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%B) [concrete] // CHECK:STDOUT: %Op.type.1a6: type = fn_type @Op.2, @impl.49c(%B) [concrete] // CHECK:STDOUT: %Op.3c2: %Op.type.1a6 = struct_value () [concrete] // CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %B, (%Destroy.impl_witness.39d) [concrete] -// CHECK:STDOUT: %.c16: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.3c2, @Op.2(%B) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3d2: %A.ref as %X.ref { @@ -687,12 +664,11 @@ impl () as I({}) { // CHECK:STDOUT: %.loc20_14.3: ref %A = class_element_access %.loc20_14.2, element0 // CHECK:STDOUT: %.loc20_14.4: ref %A = converted %F.call, %.loc20_14.3 // CHECK:STDOUT: %.loc20_14.5: %A = bind_value %.loc20_14.4 -// CHECK:STDOUT: %impl.elem0: %.c16 = impl_witness_access constants.%Destroy.impl_witness.39d, element0 [concrete = constants.%Op.3c2] -// CHECK:STDOUT: %bound_method.loc20_14.1: = bound_method %.loc20_14.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%B) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_14.2: = bound_method %.loc20_14.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc20_14.1, constants.%Op.3c2 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc20_14.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.e79 = addr_of %.loc20_14.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_14.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -893,7 +869,6 @@ impl () as I({}) { // CHECK:STDOUT: --- generic_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %struct_type.b.a.1b0: type = struct_type {.b: %empty_struct_type, .a: %empty_struct_type} [concrete] @@ -905,22 +880,12 @@ impl () as I({}) { // CHECK:STDOUT: %F.975709.2: %F.type.29ab63.2 = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.a.b.f95 = struct_value (%empty_struct, %empty_struct) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.879: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%struct_type.b.a.1b0) [concrete] // CHECK:STDOUT: %Op.type.f20: type = fn_type @Op.2, @impl.49c(%struct_type.b.a.1b0) [concrete] // CHECK:STDOUT: %Op.eab: %Op.type.f20 = struct_value () [concrete] // CHECK:STDOUT: %ptr.30d: type = ptr_type %struct_type.b.a.1b0 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %struct_type.b.a.1b0, (%Destroy.impl_witness.879) [concrete] -// CHECK:STDOUT: %.49e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.eab, @Op.2(%struct_type.b.a.1b0) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.50b: %.loc8_7.2 as %I.type { @@ -966,12 +931,11 @@ impl () as I({}) { // CHECK:STDOUT: %.loc10_29.10: init %empty_struct_type = converted %.loc10_29.7, %.loc10_29.9 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_29.11: init %struct_type.a.b.f95 = struct_init (%.loc10_29.6, %.loc10_29.10) to %return [concrete = constants.%struct] // CHECK:STDOUT: %.loc10_29.12: init %struct_type.a.b.f95 = converted %F.call, %.loc10_29.11 [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0: %.49e = impl_witness_access constants.%Destroy.impl_witness.879, element0 [concrete = constants.%Op.eab] -// CHECK:STDOUT: %bound_method.loc10_29.1: = bound_method %.loc10_29.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%struct_type.b.a.1b0) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_29.2: = bound_method %.loc10_29.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc10_29.1, constants.%Op.eab +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc10_29.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.30d = addr_of %.loc10_29.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc10_29.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc10_29.12 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_self.carbon b/toolchain/check/testdata/impl/import_self.carbon index 42c176e3a133..52cebdbaadad 100644 --- a/toolchain/check/testdata/impl/import_self.carbon +++ b/toolchain/check/testdata/impl/import_self.carbon @@ -137,16 +137,9 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %assoc0.5ca: %Add.assoc_type = assoc_entity element0, imports.%Main.import_ref.5a3 [concrete] // CHECK:STDOUT: %.59e: type = fn_type_with_self_type %Op.type.31b, %Add.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.4, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.4, @impl.49c(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.4(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -163,8 +156,6 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Main.import_ref.e5e: %Add.type = import_ref Main//a, inst19 [no loc], loaded [symbolic = constants.%Self.b3d] // CHECK:STDOUT: %Main.import_ref.5a3: %Op.type.31b = import_ref Main//a, loc5_41, loaded [concrete = constants.%Op.d59] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -262,20 +253,19 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Main.Add [concrete = constants.%Add.type] // CHECK:STDOUT: %Op.ref: %Add.assoc_type = name_ref Op, imports.%Main.import_ref.f99 [concrete = constants.%assoc0.5ca] -// CHECK:STDOUT: %impl.elem0.loc11_11: %.59e = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.489] -// CHECK:STDOUT: %bound_method.loc11_11: = bound_method %x.ref, %impl.elem0.loc11_11 +// CHECK:STDOUT: %impl.elem0: %.59e = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.489] +// CHECK:STDOUT: %bound_method.loc11_11: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %y.ref: %empty_tuple.type = name_ref y, %y // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method.loc11_11(%x.ref, %y.ref) // CHECK:STDOUT: %.loc11_22.1: ref %empty_tuple.type = temporary_storage // CHECK:STDOUT: %.loc11_22.2: ref %empty_tuple.type = temporary %.loc11_22.1, %Op.call // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_23: %empty_tuple.type = converted %Op.call, %tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %impl.elem0.loc11_22: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc11_22.1: = bound_method %.loc11_22.1, %impl.elem0.loc11_22 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc11_22, @Op.4(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_22.2: = bound_method %.loc11_22.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc11_22.1, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.4(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc11_22: = bound_method %.loc11_22.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %.loc11_22.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc11_22.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc11_22(%addr) // CHECK:STDOUT: return %.loc11_23 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 9bbb294580fc..e82788ece09e 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -500,11 +500,11 @@ fn G() { // CHECK:STDOUT: %F.ref.loc7_11: %I.assoc_type = name_ref F, imports.%Main.import_ref.c44 [concrete = constants.%assoc0.3f3] // CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C.607, (constants.%I.impl_witness.02b) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc7_8: %I.type = converted %C, %I.facet [concrete = constants.%I.facet] -// CHECK:STDOUT: %impl.elem0.loc7_8: %.885 = impl_witness_access constants.%I.impl_witness.02b, element0 [concrete = constants.%F.5fa954.2] +// CHECK:STDOUT: %impl.elem0: %.885 = impl_witness_access constants.%I.impl_witness.02b, element0 [concrete = constants.%F.5fa954.2] // CHECK:STDOUT: %.loc7_16.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %empty_struct.loc7_16.1: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_17.1: %empty_struct_type = converted %.loc7_16.1, %empty_struct.loc7_16.1 [concrete = constants.%empty_struct] -// CHECK:STDOUT: %specific_fn.loc7_8: = specific_function %impl.elem0.loc7_8, @F.3(constants.%empty_tuple) [concrete = constants.%F.specific_fn.4832e8.1] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.3(constants.%empty_tuple) [concrete = constants.%F.specific_fn.4832e8.1] // CHECK:STDOUT: %empty_struct.loc7_16.2: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_16.2: %empty_struct_type = converted %.loc7_16.1, %empty_struct.loc7_16.2 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_17.2: %F.type.af4856.1 = specific_constant imports.%Main.F.5a8, @impl.22b(constants.%empty_tuple) [concrete = constants.%F.5fa954.1] @@ -516,12 +516,11 @@ fn G() { // CHECK:STDOUT: %.loc7_16.6: ref %C.607 = converted %.loc7_16.2, %.loc7_16.5 // CHECK:STDOUT: %.loc7_16.7: %C.607 = bind_value %.loc7_16.6 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc7_16.7) -// CHECK:STDOUT: %impl.elem0.loc7_16: %.69e = impl_witness_access constants.%Destroy.impl_witness.ce0, element0 [concrete = constants.%Op.ac0] -// CHECK:STDOUT: %bound_method.loc7_16.1: = bound_method %.loc7_16.3, %impl.elem0.loc7_16 -// CHECK:STDOUT: %specific_fn.loc7_16: = specific_function %impl.elem0.loc7_16, @Op.2(constants.%C.607) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_16.2: = bound_method %.loc7_16.3, %specific_fn.loc7_16 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc7_16.3, constants.%Op.ac0 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ac0, @Op.2(constants.%C.607) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc7_16.3, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.2ce = addr_of %.loc7_16.3 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_16.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/interface_args.carbon b/toolchain/check/testdata/impl/interface_args.carbon index 4c8d17986da9..5440137f6e26 100644 --- a/toolchain/check/testdata/impl/interface_args.carbon +++ b/toolchain/check/testdata/impl/interface_args.carbon @@ -1079,15 +1079,9 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Make.type.ec4: type = fn_type @Make.2 [concrete] // CHECK:STDOUT: %Make.377: %Make.type.ec4 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.39d: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%B) [concrete] // CHECK:STDOUT: %Op.type.1a6: type = fn_type @Op.2, @impl.49c(%B) [concrete] // CHECK:STDOUT: %Op.3c2: %Op.type.1a6 = struct_value () [concrete] // CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %B, (%Destroy.impl_witness.39d) [concrete] -// CHECK:STDOUT: %.c16: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.3c2, @Op.2(%B) [concrete] // CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete] // CHECK:STDOUT: %InstanceB.type: type = fn_type @InstanceB [concrete] @@ -1135,8 +1129,6 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.7dd: %Method.type.af5 = import_ref Main//factory, loc16_31, loaded [concrete = constants.%Method.3d4] // CHECK:STDOUT: %Factory.impl_witness_table = impl_witness_table (%Main.import_ref.9ec, %Main.import_ref.7dd), @impl.ba3 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Main.import_ref.46fc3c.2 = import_ref Main//factory, loc8_31, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1247,15 +1239,14 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Make.ref: %Factory.assoc_type.579 = name_ref Make, %.loc5_23 [concrete = constants.%assoc0.153] // CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value constants.%A, (constants.%Factory.impl_witness) [concrete = constants.%Factory.facet] // CHECK:STDOUT: %.loc5_11: %Factory.type.a5d = converted %A.ref, %Factory.facet [concrete = constants.%Factory.facet] -// CHECK:STDOUT: %impl.elem0.loc5: %.711 = impl_witness_access constants.%Factory.impl_witness, element0 [concrete = constants.%Make.377] +// CHECK:STDOUT: %impl.elem0: %.711 = impl_witness_access constants.%Factory.impl_witness, element0 [concrete = constants.%Make.377] // CHECK:STDOUT: %.loc4: ref %B = splice_block %return {} -// CHECK:STDOUT: %Make.call: init %B = call %impl.elem0.loc5() to %.loc4 -// CHECK:STDOUT: %impl.elem0.loc4: %.c16 = impl_witness_access constants.%Destroy.impl_witness.39d, element0 [concrete = constants.%Op.3c2] -// CHECK:STDOUT: %bound_method.loc4_12.1: = bound_method %.loc4, %impl.elem0.loc4 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc4, @Op.2(constants.%B) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc4_12.2: = bound_method %.loc4, %specific_fn +// CHECK:STDOUT: %Make.call: init %B = call %impl.elem0() to %.loc4 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc4, constants.%Op.3c2 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.3c2, @Op.2(constants.%B) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc4, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.e79 = addr_of %.loc4 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc4_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1273,12 +1264,11 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %bound_method.loc8: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %.loc7: ref %B = splice_block %return {} // CHECK:STDOUT: %Method.call: init %B = call %bound_method.loc8(%a.ref) to %.loc7 -// CHECK:STDOUT: %impl.elem0: %.c16 = impl_witness_access constants.%Destroy.impl_witness.39d, element0 [concrete = constants.%Op.3c2] -// CHECK:STDOUT: %bound_method.loc7_20.1: = bound_method %.loc7, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%B) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_20.2: = bound_method %.loc7, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc7, constants.%Op.3c2 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.3c2, @Op.2(constants.%B) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc7: = bound_method %.loc7, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.e79 = addr_of %.loc7 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_20.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7(%addr) // CHECK:STDOUT: return %Method.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index 2fa76591dc91..6e29dd30b1e5 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -110,16 +110,9 @@ fn G() { // CHECK:STDOUT: %facet_value: %facet_type = facet_value %C, (%I.impl_witness, %J.impl_witness) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%facet_value) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.4, @impl.49c(%T.8b3) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.c4a: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.8e9: type = fn_type @Op.4, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.ddb: %Op.type.8e9 = struct_value () [concrete] // CHECK:STDOUT: %ptr.8e6: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.c4a) [concrete] -// CHECK:STDOUT: %.40c: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ddb, @Op.4(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -134,8 +127,6 @@ fn G() { // CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -376,8 +367,8 @@ fn G() { // CHECK:STDOUT: %as_type.loc40_75: type = facet_access_type %.loc40_71 [concrete = constants.%C] // CHECK:STDOUT: %.loc40_75: type = converted %.loc40_71, %as_type.loc40_75 [concrete = constants.%C] // CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c] -// CHECK:STDOUT: %impl.elem0.loc40_77: %.638 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%JJ.9c9] -// CHECK:STDOUT: %bound_method.loc40_77: = bound_method %.loc40_8.1, %impl.elem0.loc40_77 +// CHECK:STDOUT: %impl.elem0: %.638 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%JJ.9c9] +// CHECK:STDOUT: %bound_method.loc40_77: = bound_method %.loc40_8.1, %impl.elem0 // CHECK:STDOUT: %.loc40_8.2: %C = bind_value %.loc40_8.1 // CHECK:STDOUT: %JJ.call: init %empty_tuple.type = call %bound_method.loc40_77(%.loc40_8.2) // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] @@ -397,18 +388,16 @@ fn G() { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%facet_value) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc46_11.2: %C = bind_value %.loc46_11.1 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc46_11.2) -// CHECK:STDOUT: %impl.elem0.loc46: %.40c = impl_witness_access constants.%Destroy.impl_witness.c4a, element0 [concrete = constants.%Op.ddb] -// CHECK:STDOUT: %bound_method.loc46_9.1: = bound_method %.loc46_9.2, %impl.elem0.loc46 -// CHECK:STDOUT: %specific_fn.loc46: = specific_function %impl.elem0.loc46, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc46_9.2: = bound_method %.loc46_9.2, %specific_fn.loc46 +// CHECK:STDOUT: %Op.bound.loc46: = bound_method %.loc46_9.2, constants.%Op.ddb +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.ddb, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc46: = bound_method %.loc46_9.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc46: %ptr.8e6 = addr_of %.loc46_9.2 -// CHECK:STDOUT: %no_op.loc46: init %empty_tuple.type = call %bound_method.loc46_9.2(%addr.loc46) -// CHECK:STDOUT: %impl.elem0.loc40_6: %.40c = impl_witness_access constants.%Destroy.impl_witness.c4a, element0 [concrete = constants.%Op.ddb] -// CHECK:STDOUT: %bound_method.loc40_6.1: = bound_method %.loc40_6.2, %impl.elem0.loc40_6 -// CHECK:STDOUT: %specific_fn.loc40: = specific_function %impl.elem0.loc40_6, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc40_6.2: = bound_method %.loc40_6.2, %specific_fn.loc40 +// CHECK:STDOUT: %no_op.loc46: init %empty_tuple.type = call %bound_method.loc46(%addr.loc46) +// CHECK:STDOUT: %Op.bound.loc40: = bound_method %.loc40_6.2, constants.%Op.ddb +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ddb, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc40_6: = bound_method %.loc40_6.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc40: %ptr.8e6 = addr_of %.loc40_6.2 -// CHECK:STDOUT: %no_op.loc40: init %empty_tuple.type = call %bound_method.loc40_6.2(%addr.loc40) +// CHECK:STDOUT: %no_op.loc40: init %empty_tuple.type = call %bound_method.loc40_6(%addr.loc40) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 023ed7761544..5bc1803bce7d 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -352,15 +352,9 @@ fn G(x: A) { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.f13, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.eb8: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.type.069: type = fn_type @Op.2, @impl.49c(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.d5a: %Op.type.069 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_struct_type, (%Destroy.impl_witness.eb8) [concrete] -// CHECK:STDOUT: %.9da: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d5a, @Op.2(%empty_struct_type) [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } @@ -372,8 +366,6 @@ fn G(x: A) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -498,21 +490,20 @@ fn G(x: A) { // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.97a] -// CHECK:STDOUT: %impl.elem0.loc13_11: %.e02 = impl_witness_access constants.%HasF.impl_witness.6e4, element0 [concrete = constants.%F.f13] -// CHECK:STDOUT: %bound_method.loc13_11: = bound_method %x.ref, %impl.elem0.loc13_11 -// CHECK:STDOUT: %specific_fn.loc13_11: = specific_function %impl.elem0.loc13_11, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_21.1: = bound_method %x.ref, %specific_fn.loc13_11 +// CHECK:STDOUT: %impl.elem0: %.e02 = impl_witness_access constants.%HasF.impl_witness.6e4, element0 [concrete = constants.%F.f13] +// CHECK:STDOUT: %bound_method.loc13_11: = bound_method %x.ref, %impl.elem0 +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] +// CHECK:STDOUT: %bound_method.loc13_21.1: = bound_method %x.ref, %specific_fn // CHECK:STDOUT: %F.call: init %empty_struct_type = call %bound_method.loc13_21.1(%x.ref) // CHECK:STDOUT: %.loc13_21.1: ref %empty_struct_type = temporary_storage // CHECK:STDOUT: %.loc13_21.2: ref %empty_struct_type = temporary %.loc13_21.1, %F.call // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc13_22: %empty_struct_type = converted %F.call, %empty_struct [concrete = constants.%empty_struct] -// CHECK:STDOUT: %impl.elem0.loc13_21: %.9da = impl_witness_access constants.%Destroy.impl_witness.eb8, element0 [concrete = constants.%Op.d5a] -// CHECK:STDOUT: %bound_method.loc13_21.2: = bound_method %.loc13_21.1, %impl.elem0.loc13_21 -// CHECK:STDOUT: %specific_fn.loc13_21: = specific_function %impl.elem0.loc13_21, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_21.3: = bound_method %.loc13_21.1, %specific_fn.loc13_21 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc13_21.1, constants.%Op.d5a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d5a, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc13_21.2: = bound_method %.loc13_21.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c28 = addr_of %.loc13_21.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13_21.3(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13_21.2(%addr) // CHECK:STDOUT: return %.loc13_22 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/impl_forall.carbon index 97b6f6fd7af7..f0bf2f7c7269 100644 --- a/toolchain/check/testdata/impl/lookup/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_forall.carbon @@ -133,15 +133,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.158, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.eb8: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.type.069: type = fn_type @Op.2, @impl.49c(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.d5a: %Op.type.069 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_struct_type, (%Destroy.impl_witness.eb8) [concrete] -// CHECK:STDOUT: %.9da: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d5a, @Op.2(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -152,8 +146,6 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -406,21 +398,20 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type)> [concrete = constants.%I.type.885] // CHECK:STDOUT: %.loc22_18: %I.assoc_type.22c = specific_constant @I.%assoc0.loc8_26.1, @I(constants.%empty_struct_type) [concrete = constants.%assoc0.722] // CHECK:STDOUT: %F.ref: %I.assoc_type.22c = name_ref F, %.loc22_18 [concrete = constants.%assoc0.722] -// CHECK:STDOUT: %impl.elem0.loc22_11: %.8fd = impl_witness_access constants.%I.impl_witness.0f2, element0 [concrete = constants.%F.158] -// CHECK:STDOUT: %bound_method.loc22_11: = bound_method %a.ref, %impl.elem0.loc22_11 -// CHECK:STDOUT: %specific_fn.loc22_11: = specific_function %impl.elem0.loc22_11, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_22.1: = bound_method %a.ref, %specific_fn.loc22_11 +// CHECK:STDOUT: %impl.elem0: %.8fd = impl_witness_access constants.%I.impl_witness.0f2, element0 [concrete = constants.%F.158] +// CHECK:STDOUT: %bound_method.loc22_11: = bound_method %a.ref, %impl.elem0 +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%empty_struct_type) [concrete = constants.%F.specific_fn] +// CHECK:STDOUT: %bound_method.loc22_22.1: = bound_method %a.ref, %specific_fn // CHECK:STDOUT: %F.call: init %empty_struct_type = call %bound_method.loc22_22.1(%a.ref) // CHECK:STDOUT: %.loc22_22.1: ref %empty_struct_type = temporary_storage // CHECK:STDOUT: %.loc22_22.2: ref %empty_struct_type = temporary %.loc22_22.1, %F.call // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc22_23: %empty_struct_type = converted %F.call, %empty_struct [concrete = constants.%empty_struct] -// CHECK:STDOUT: %impl.elem0.loc22_22: %.9da = impl_witness_access constants.%Destroy.impl_witness.eb8, element0 [concrete = constants.%Op.d5a] -// CHECK:STDOUT: %bound_method.loc22_22.2: = bound_method %.loc22_22.1, %impl.elem0.loc22_22 -// CHECK:STDOUT: %specific_fn.loc22_22: = specific_function %impl.elem0.loc22_22, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_22.3: = bound_method %.loc22_22.1, %specific_fn.loc22_22 +// CHECK:STDOUT: %Op.bound: = bound_method %.loc22_22.1, constants.%Op.d5a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d5a, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc22_22.2: = bound_method %.loc22_22.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c28 = addr_of %.loc22_22.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc22_22.3(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc22_22.2(%addr) // CHECK:STDOUT: return %.loc22_23 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index b0f89579373e..62cb3363c2ac 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -1545,15 +1545,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %assoc0.494: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete] // CHECK:STDOUT: %.0fb: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.98b: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%AnyParam.241) [concrete] // CHECK:STDOUT: %Op.type.5fc: type = fn_type @Op.2, @impl.49c(%AnyParam.241) [concrete] // CHECK:STDOUT: %Op.6f3: %Op.type.5fc = struct_value () [concrete] // CHECK:STDOUT: %ptr.301: type = ptr_type %AnyParam.241 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.241, (%Destroy.impl_witness.98b) [concrete] -// CHECK:STDOUT: %.644: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.6f3, @Op.2(%AnyParam.241) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1580,8 +1574,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst40 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %K.type.311 = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%K.7a1] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1702,16 +1694,15 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0.494] -// CHECK:STDOUT: %impl.elem0.loc14: %.0fb = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.2e9] -// CHECK:STDOUT: %bound_method.loc14: = bound_method %obj.ref, %impl.elem0.loc14 +// CHECK:STDOUT: %impl.elem0: %.0fb = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.2e9] +// CHECK:STDOUT: %bound_method.loc14: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc14: %AnyParam.241 = bind_value %obj.ref // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method.loc14(%.loc14) -// CHECK:STDOUT: %impl.elem0.loc13: %.644 = impl_witness_access constants.%Destroy.impl_witness.98b, element0 [concrete = constants.%Op.6f3] -// CHECK:STDOUT: %bound_method.loc13_3.1: = bound_method %obj.var, %impl.elem0.loc13 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc13, @Op.2(constants.%AnyParam.241) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_3.2: = bound_method %obj.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %obj.var, constants.%Op.6f3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.6f3, @Op.2(constants.%AnyParam.241) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc13: = bound_method %obj.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.301 = addr_of %obj.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1777,20 +1768,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %pattern_type.cb4: type = pattern_type %Self.as_type.61d [symbolic] // CHECK:STDOUT: %require_complete.b14: = require_complete_type %Self.as_type.61d [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.92c: type = fn_type @Op.1, @impl.4b5(%T) [symbolic] -// CHECK:STDOUT: %Op.b8f: %Op.type.92c = struct_value () [symbolic] // CHECK:STDOUT: %Y.impl_witness: = impl_witness imports.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.861, (%Y.impl_witness) [concrete] // CHECK:STDOUT: %.e17: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] // CHECK:STDOUT: %K.type.7f9: type = fn_type @K.2 [concrete] // CHECK:STDOUT: %K.c3c: %K.type.7f9 = struct_value () [concrete] -// CHECK:STDOUT: %Op.type.f00: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.c49: = impl_witness imports.%Destroy.impl_witness_table, @impl.4b5(%AnyParam.861) [concrete] // CHECK:STDOUT: %Op.type.77e: type = fn_type @Op.1, @impl.4b5(%AnyParam.861) [concrete] // CHECK:STDOUT: %Op.49f: %Op.type.77e = struct_value () [concrete] // CHECK:STDOUT: %ptr.1ef: type = ptr_type %AnyParam.861 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.861, (%Destroy.impl_witness.c49) [concrete] -// CHECK:STDOUT: %.a90: type = fn_type_with_self_type %Op.type.f00, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.49f, @Op.1(%AnyParam.861) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1826,8 +1811,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageGenericInterface.import_ref.53c: = import_ref PackageGenericInterface//default, loc8_70, loaded [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: %PackageGenericInterface.import_ref.321: type = import_ref PackageGenericInterface//default, loc8_47, loaded [concrete = constants.%AnyParam.861] // CHECK:STDOUT: %PackageGenericInterface.import_ref.ca6: type = import_ref PackageGenericInterface//default, loc8_67, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageGenericInterface.import_ref.01e: @impl.4b5.%Op.type (%Op.type.92c) = import_ref PackageGenericInterface//default, inst158 [indirect], loaded [symbolic = @impl.4b5.%Op (constants.%Op.b8f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%PackageGenericInterface.import_ref.01e), @impl.4b5 [concrete] // CHECK:STDOUT: %PackageGenericInterface.import_ref.456: %K.type.7f9 = import_ref PackageGenericInterface//default, loc9_22, loaded [concrete = constants.%K.c3c] // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (%PackageGenericInterface.import_ref.456), @impl.02a [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -1910,16 +1893,15 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc10: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0.494] -// CHECK:STDOUT: %impl.elem0.loc10: %.e17 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.c3c] -// CHECK:STDOUT: %bound_method.loc10: = bound_method %obj.ref, %impl.elem0.loc10 +// CHECK:STDOUT: %impl.elem0: %.e17 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.c3c] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc10: %AnyParam.861 = bind_value %obj.ref // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method.loc10(%.loc10) -// CHECK:STDOUT: %impl.elem0.loc8: %.a90 = impl_witness_access constants.%Destroy.impl_witness.c49, element0 [concrete = constants.%Op.49f] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %obj.var, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc8, @Op.1(constants.%AnyParam.861) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %obj.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %obj.var, constants.%Op.49f +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.49f, @Op.1(constants.%AnyParam.861) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %obj.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.1ef = addr_of %obj.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1997,15 +1979,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %assoc0.494: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete] // CHECK:STDOUT: %.701: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.418: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%AnyParam.0dd) [concrete] // CHECK:STDOUT: %Op.type.f56: type = fn_type @Op.2, @impl.49c(%AnyParam.0dd) [concrete] // CHECK:STDOUT: %Op.1fa: %Op.type.f56 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d96: type = ptr_type %AnyParam.0dd [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.0dd, (%Destroy.impl_witness.418) [concrete] -// CHECK:STDOUT: %.94f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.1fa, @Op.2(%AnyParam.0dd) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2032,8 +2008,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst40 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %K.type.311 = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%K.7a1] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2153,16 +2127,15 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0.494] -// CHECK:STDOUT: %impl.elem0.loc14: %.701 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.5a9] -// CHECK:STDOUT: %bound_method.loc14: = bound_method %obj.ref, %impl.elem0.loc14 +// CHECK:STDOUT: %impl.elem0: %.701 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.5a9] +// CHECK:STDOUT: %bound_method.loc14: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc14: %AnyParam.0dd = bind_value %obj.ref // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method.loc14(%.loc14) -// CHECK:STDOUT: %impl.elem0.loc13: %.94f = impl_witness_access constants.%Destroy.impl_witness.418, element0 [concrete = constants.%Op.1fa] -// CHECK:STDOUT: %bound_method.loc13_3.1: = bound_method %obj.var, %impl.elem0.loc13 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc13, @Op.2(constants.%AnyParam.0dd) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_3.2: = bound_method %obj.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %obj.var, constants.%Op.1fa +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.1fa, @Op.2(constants.%AnyParam.0dd) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc13: = bound_method %obj.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d96 = addr_of %obj.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2226,20 +2199,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %pattern_type.cb4: type = pattern_type %Self.as_type.61d [symbolic] // CHECK:STDOUT: %require_complete.b14: = require_complete_type %Self.as_type.61d [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.5d4: type = fn_type @Op.1, @impl.1d2(%T) [symbolic] -// CHECK:STDOUT: %Op.ab3: %Op.type.5d4 = struct_value () [symbolic] // CHECK:STDOUT: %Y.impl_witness: = impl_witness imports.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.d71, (%Y.impl_witness) [concrete] // CHECK:STDOUT: %.0dd: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete] // CHECK:STDOUT: %K.type.9cf: type = fn_type @K.2 [concrete] // CHECK:STDOUT: %K.039: %K.type.9cf = struct_value () [concrete] -// CHECK:STDOUT: %Op.type.0fd: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.ea7: = impl_witness imports.%Destroy.impl_witness_table, @impl.1d2(%AnyParam.d71) [concrete] // CHECK:STDOUT: %Op.type.051: type = fn_type @Op.1, @impl.1d2(%AnyParam.d71) [concrete] // CHECK:STDOUT: %Op.d0b: %Op.type.051 = struct_value () [concrete] // CHECK:STDOUT: %ptr.8ee: type = ptr_type %AnyParam.d71 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.d71, (%Destroy.impl_witness.ea7) [concrete] -// CHECK:STDOUT: %.275: type = fn_type_with_self_type %Op.type.0fd, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d0b, @Op.1(%AnyParam.d71) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2276,8 +2243,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageGenericClass.import_ref.246: = import_ref PackageGenericClass//default, loc8_66, loaded [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: %PackageGenericClass.import_ref.a0e: type = import_ref PackageGenericClass//default, loc8_43, loaded [concrete = constants.%AnyParam.d71] // CHECK:STDOUT: %PackageGenericClass.import_ref.ca6: type = import_ref PackageGenericClass//default, loc8_63, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageGenericClass.import_ref.9fa: @impl.1d2.%Op.type (%Op.type.5d4) = import_ref PackageGenericClass//default, inst156 [indirect], loaded [symbolic = @impl.1d2.%Op (constants.%Op.ab3)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%PackageGenericClass.import_ref.9fa), @impl.1d2 [concrete] // CHECK:STDOUT: %PackageGenericClass.import_ref.fbf: %K.type.9cf = import_ref PackageGenericClass//default, loc9_22, loaded [concrete = constants.%K.039] // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (%PackageGenericClass.import_ref.fbf), @impl.421 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -2359,16 +2324,15 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.ref.loc9: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0.494] -// CHECK:STDOUT: %impl.elem0.loc9: %.0dd = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.039] -// CHECK:STDOUT: %bound_method.loc9: = bound_method %obj.ref, %impl.elem0.loc9 +// CHECK:STDOUT: %impl.elem0: %.0dd = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.039] +// CHECK:STDOUT: %bound_method.loc9: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc9: %AnyParam.d71 = bind_value %obj.ref // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method.loc9(%.loc9) -// CHECK:STDOUT: %impl.elem0.loc8: %.275 = impl_witness_access constants.%Destroy.impl_witness.ea7, element0 [concrete = constants.%Op.d0b] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %obj.var, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc8, @Op.1(constants.%AnyParam.d71) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %obj.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %obj.var, constants.%Op.d0b +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d0b, @Op.1(constants.%AnyParam.d71) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %obj.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.8ee = addr_of %obj.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/transitive.carbon b/toolchain/check/testdata/impl/lookup/transitive.carbon index 06bd85c62782..1f196b9b70e9 100644 --- a/toolchain/check/testdata/impl/lookup/transitive.carbon +++ b/toolchain/check/testdata/impl/lookup/transitive.carbon @@ -288,16 +288,9 @@ fn Call() { // CHECK:STDOUT: %F.type.5d6: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.a2e: %F.type.5d6 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -322,8 +315,6 @@ fn Call() { // CHECK:STDOUT: %Main.import_ref.742: %F.type.5d6 = import_ref Main//c, loc7_34, loaded [concrete = constants.%F.a2e] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.742), @impl.770 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -364,17 +355,16 @@ fn Call() { // CHECK:STDOUT: %Get.call: init %C = call %Get.ref() to %.loc9_7.1 // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.c44 [concrete = constants.%assoc0.3f3] -// CHECK:STDOUT: %impl.elem0.loc9_8: %.1b3 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.a2e] -// CHECK:STDOUT: %bound_method.loc9_8: = bound_method %Get.call, %impl.elem0.loc9_8 +// CHECK:STDOUT: %impl.elem0: %.1b3 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.a2e] +// CHECK:STDOUT: %bound_method.loc9_8: = bound_method %Get.call, %impl.elem0 // CHECK:STDOUT: %.loc9_7.2: ref %C = temporary %.loc9_7.1, %Get.call // CHECK:STDOUT: %.loc9_7.3: %C = bind_value %.loc9_7.2 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method.loc9_8(%.loc9_7.3) -// CHECK:STDOUT: %impl.elem0.loc9_7: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc9_7.1: = bound_method %.loc9_7.1, %impl.elem0.loc9_7 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc9_7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_7.2: = bound_method %.loc9_7.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9_7.1, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_7: = bound_method %.loc9_7.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc9_7.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_7.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_7(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/use_assoc_const.carbon b/toolchain/check/testdata/impl/use_assoc_const.carbon index c52e5c328349..83b63097fa8b 100644 --- a/toolchain/check/testdata/impl/use_assoc_const.carbon +++ b/toolchain/check/testdata/impl/use_assoc_const.carbon @@ -3642,15 +3642,9 @@ fn F() { // CHECK:STDOUT: %pattern_type.7f8: type = pattern_type %C.131 [concrete] // CHECK:STDOUT: %C.val: %C.131 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.ee0: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C.131) [concrete] // CHECK:STDOUT: %Op.type.b84: type = fn_type @Op.2, @impl.49c(%C.131) [concrete] // CHECK:STDOUT: %Op.e16: %Op.type.b84 = struct_value () [concrete] // CHECK:STDOUT: %ptr.aaa: type = ptr_type %C.131 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.131, (%Destroy.impl_witness.ee0) [concrete] -// CHECK:STDOUT: %.04b: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e16, @Op.2(%C.131) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3661,8 +3655,6 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -3774,22 +3766,21 @@ fn F() { // CHECK:STDOUT: %.loc12_21.3: init %C.131 = class_init (), %.loc12_21.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc12_21.4: ref %C.131 = temporary %.loc12_21.2, %.loc12_21.3 // CHECK:STDOUT: %.loc12_23.1: ref %C.131 = converted %.loc12_21.1, %.loc12_21.4 -// CHECK:STDOUT: %.loc12_11.1: type = splice_block %impl.elem0.loc12_11 [concrete = constants.%C.131] { +// CHECK:STDOUT: %.loc12_11.1: type = splice_block %impl.elem0 [concrete = constants.%C.131] { // CHECK:STDOUT: %D.ref.loc12_10: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.659] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%D, (constants.%Z.impl_witness.19e) [concrete = constants.%Z.facet.f2a] // CHECK:STDOUT: %.loc12_11.2: %Z.type = converted %D.ref.loc12_10, %Z.facet [concrete = constants.%Z.facet.f2a] -// CHECK:STDOUT: %impl.elem0.loc12_11: type = impl_witness_access constants.%Z.impl_witness.19e, element0 [concrete = constants.%C.131] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.19e, element0 [concrete = constants.%C.131] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc12_23.2: %C.131 = bind_value %.loc12_23.1 // CHECK:STDOUT: %a: %C.131 = bind_name a, %.loc12_23.2 -// CHECK:STDOUT: %impl.elem0.loc12_21: %.04b = impl_witness_access constants.%Destroy.impl_witness.ee0, element0 [concrete = constants.%Op.e16] -// CHECK:STDOUT: %bound_method.loc12_21.1: = bound_method %.loc12_21.2, %impl.elem0.loc12_21 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc12_21, @Op.2(constants.%C.131) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_21.2: = bound_method %.loc12_21.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc12_21.2, constants.%Op.e16 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e16, @Op.2(constants.%C.131) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc12_21.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.aaa = addr_of %.loc12_21.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc12_21.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 4cac00d4b7bc..73fced2c2884 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -85,22 +85,12 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %bound_method.1da: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.711: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.type.ba2: type = fn_type @Op.3, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.649: %Op.type.ba2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %ptr.235, (%Destroy.impl_witness.711) [concrete] -// CHECK:STDOUT: %.a79: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2bf [concrete] // CHECK:STDOUT: %Op.specific_fn.829: = specific_function %Op.649, @Op.3(%ptr.235) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.14a: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.type.1e4: type = fn_type @Op.3, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.f0b: %Op.type.1e4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.75f: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.14a) [concrete] -// CHECK:STDOUT: %.9c9: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.75f [concrete] // CHECK:STDOUT: %Op.specific_fn.c51: = specific_function %Op.f0b, @Op.3(%array_type) [concrete] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [concrete] // CHECK:STDOUT: %ValueBinding: %ValueBinding.type = struct_value () [concrete] @@ -119,8 +109,6 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -229,10 +217,10 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc21_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc21_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc21_21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc21_21.1: = bound_method %int_0.loc21, %impl.elem0.loc21_21 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc21_21: = specific_function %impl.elem0.loc21_21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc21_21.2: = bound_method %int_0.loc21, %specific_fn.loc21_21 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc21_21.1: = bound_method %int_0.loc21, %impl.elem0.loc21 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc21_21.2: = bound_method %int_0.loc21, %specific_fn.loc21 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %bound_method.loc21_21.2(%int_0.loc21) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc21_21.1: %i32 = value_of_initializer %int.convert_checked.loc21 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc21_21.2: %i32 = converted %int_0.loc21, %.loc21_21.1 [concrete = constants.%int_0.6a9] @@ -265,18 +253,16 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int.convert_checked.loc22_8: init %i32 = call %bound_method.loc22_8.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc22_8: init %i32 = converted %int_4, %int.convert_checked.loc22_8 [concrete = constants.%int_4.940] // CHECK:STDOUT: assign %.loc22_6, %.loc22_8 -// CHECK:STDOUT: %impl.elem0.loc21_3: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc21_3.1: = bound_method %pa.var, %impl.elem0.loc21_3 -// CHECK:STDOUT: %specific_fn.loc21_3: = specific_function %impl.elem0.loc21_3, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc21_3.2: = bound_method %pa.var, %specific_fn.loc21_3 +// CHECK:STDOUT: %Op.bound.loc21: = bound_method %pa.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc21_3: = bound_method %pa.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc21_3: %ptr.5d5 = addr_of %pa.var -// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21_3.2(%addr.loc21_3) -// CHECK:STDOUT: %impl.elem0.loc18_3: %.9c9 = impl_witness_access constants.%Destroy.impl_witness.14a, element0 [concrete = constants.%Op.f0b] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %a.var, %impl.elem0.loc18_3 -// CHECK:STDOUT: %specific_fn.loc18_3: = specific_function %impl.elem0.loc18_3, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %a.var, %specific_fn.loc18_3 +// CHECK:STDOUT: %no_op.loc21: init %empty_tuple.type = call %bound_method.loc21_3(%addr.loc21_3) +// CHECK:STDOUT: %Op.bound.loc18: = bound_method %a.var, constants.%Op.f0b +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.f0b, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] +// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc18: %ptr.f01 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18_3.2(%addr.loc18) +// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18_3(%addr.loc18) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -361,27 +347,25 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc32_5.2: ref %array_type = temporary %.loc32_5.1, %F.call // CHECK:STDOUT: %int_32.loc32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc32_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc32_7.1: = bound_method %int_0.loc32, %impl.elem0.loc32_7 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc32_7: = specific_function %impl.elem0.loc32_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc32_7.2: = bound_method %int_0.loc32, %specific_fn.loc32_7 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc32_7.1: = bound_method %int_0.loc32, %impl.elem0.loc32 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc32_7.2: = bound_method %int_0.loc32, %specific_fn.loc32 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %bound_method.loc32_7.2(%int_0.loc32) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc32_7.1: %i32 = value_of_initializer %int.convert_checked.loc32 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc32_7.2: %i32 = converted %int_0.loc32, %.loc32_7.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc32_8.1: ref %i32 = array_index %.loc32_5.2, %.loc32_7.2 // CHECK:STDOUT: %.loc32_8.2: %i32 = bind_value %.loc32_8.1 -// CHECK:STDOUT: %impl.elem0.loc32_5: %.9c9 = impl_witness_access constants.%Destroy.impl_witness.14a, element0 [concrete = constants.%Op.f0b] -// CHECK:STDOUT: %bound_method.loc32_5.1: = bound_method %.loc32_5.1, %impl.elem0.loc32_5 -// CHECK:STDOUT: %specific_fn.loc32_5: = specific_function %impl.elem0.loc32_5, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] -// CHECK:STDOUT: %bound_method.loc32_5.2: = bound_method %.loc32_5.1, %specific_fn.loc32_5 +// CHECK:STDOUT: %Op.bound.loc32: = bound_method %.loc32_5.1, constants.%Op.f0b +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.f0b, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] +// CHECK:STDOUT: %bound_method.loc32_5: = bound_method %.loc32_5.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc32: %ptr.f01 = addr_of %.loc32_5.1 -// CHECK:STDOUT: %no_op.loc32: init %empty_tuple.type = call %bound_method.loc32_5.2(%addr.loc32) -// CHECK:STDOUT: %impl.elem0.loc26_3: %.9c9 = impl_witness_access constants.%Destroy.impl_witness.14a, element0 [concrete = constants.%Op.f0b] -// CHECK:STDOUT: %bound_method.loc26_3.1: = bound_method %a.var, %impl.elem0.loc26_3 -// CHECK:STDOUT: %specific_fn.loc26_3: = specific_function %impl.elem0.loc26_3, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] -// CHECK:STDOUT: %bound_method.loc26_3.2: = bound_method %a.var, %specific_fn.loc26_3 +// CHECK:STDOUT: %no_op.loc32: init %empty_tuple.type = call %bound_method.loc32_5(%addr.loc32) +// CHECK:STDOUT: %Op.bound.loc26: = bound_method %a.var, constants.%Op.f0b +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.f0b, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] +// CHECK:STDOUT: %bound_method.loc26_3: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc26: %ptr.f01 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc26: init %empty_tuple.type = call %bound_method.loc26_3.2(%addr.loc26) +// CHECK:STDOUT: %no_op.loc26: init %empty_tuple.type = call %bound_method.loc26_3(%addr.loc26) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 6cb04230be76..928f95f5a6e4 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -81,22 +81,12 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %bound_method.1da: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.14a: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.type.1e4: type = fn_type @Op.3, @impl.49c(%array_type) [concrete] // CHECK:STDOUT: %Op.f0b: %Op.type.1e4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.75f: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.14a) [concrete] -// CHECK:STDOUT: %.9c9: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.75f [concrete] // CHECK:STDOUT: %Op.specific_fn.c51: = specific_function %Op.f0b, @Op.3(%array_type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.711: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.type.ba2: type = fn_type @Op.3, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.649: %Op.type.ba2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %ptr.235, (%Destroy.impl_witness.711) [concrete] -// CHECK:STDOUT: %.a79: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2bf [concrete] // CHECK:STDOUT: %Op.specific_fn.829: = specific_function %Op.649, @Op.3(%ptr.235) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,8 +103,6 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -163,10 +151,10 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc23: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc23_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc23_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc23_21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc23_21.1: = bound_method %int_0.loc23, %impl.elem0.loc23_21 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc23_21: = specific_function %impl.elem0.loc23_21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc23_21.2: = bound_method %int_0.loc23, %specific_fn.loc23_21 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc23_21.1: = bound_method %int_0.loc23, %impl.elem0.loc23 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc23_21.2: = bound_method %int_0.loc23, %specific_fn.loc23 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %bound_method.loc23_21.2(%int_0.loc23) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc23_21.1: %i32 = value_of_initializer %int.convert_checked.loc23 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc23_21.2: %i32 = converted %int_0.loc23, %.loc23_21.1 [concrete = constants.%int_0.6a9] @@ -215,10 +203,10 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc36_21.2: ref %array_type = temporary %.loc36_21.1, %F.call.loc36 // CHECK:STDOUT: %int_32.loc36_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc36_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc36_23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc36_23.1: = bound_method %int_0.loc36, %impl.elem0.loc36_23 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc36_23: = specific_function %impl.elem0.loc36_23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc36_23.2: = bound_method %int_0.loc36, %specific_fn.loc36_23 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc36: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc36_23.1: = bound_method %int_0.loc36, %impl.elem0.loc36 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc36: = specific_function %impl.elem0.loc36, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc36_23.2: = bound_method %int_0.loc36, %specific_fn.loc36 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %bound_method.loc36_23.2(%int_0.loc36) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc36_23.1: %i32 = value_of_initializer %int.convert_checked.loc36 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc36_23.2: %i32 = converted %int_0.loc36, %.loc36_23.1 [concrete = constants.%int_0.6a9] @@ -256,30 +244,26 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int.convert_checked.loc41_10: init %i32 = call %bound_method.loc41_10.2(%int_4.loc41) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc41_10: init %i32 = converted %int_4.loc41, %int.convert_checked.loc41_10 [concrete = constants.%int_4.940] // CHECK:STDOUT: assign %.loc41_8.2, %.loc41_10 -// CHECK:STDOUT: %impl.elem0.loc41_5: %.9c9 = impl_witness_access constants.%Destroy.impl_witness.14a, element0 [concrete = constants.%Op.f0b] -// CHECK:STDOUT: %bound_method.loc41_5.1: = bound_method %.loc41_5.1, %impl.elem0.loc41_5 -// CHECK:STDOUT: %specific_fn.loc41_5: = specific_function %impl.elem0.loc41_5, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] -// CHECK:STDOUT: %bound_method.loc41_5.2: = bound_method %.loc41_5.1, %specific_fn.loc41_5 +// CHECK:STDOUT: %Op.bound.loc41: = bound_method %.loc41_5.1, constants.%Op.f0b +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.f0b, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] +// CHECK:STDOUT: %bound_method.loc41_5: = bound_method %.loc41_5.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc41: %ptr.f01 = addr_of %.loc41_5.1 -// CHECK:STDOUT: %no_op.loc41: init %empty_tuple.type = call %bound_method.loc41_5.2(%addr.loc41) -// CHECK:STDOUT: %impl.elem0.loc36_21: %.9c9 = impl_witness_access constants.%Destroy.impl_witness.14a, element0 [concrete = constants.%Op.f0b] -// CHECK:STDOUT: %bound_method.loc36_21.1: = bound_method %.loc36_21.1, %impl.elem0.loc36_21 -// CHECK:STDOUT: %specific_fn.loc36_21: = specific_function %impl.elem0.loc36_21, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] -// CHECK:STDOUT: %bound_method.loc36_21.2: = bound_method %.loc36_21.1, %specific_fn.loc36_21 +// CHECK:STDOUT: %no_op.loc41: init %empty_tuple.type = call %bound_method.loc41_5(%addr.loc41) +// CHECK:STDOUT: %Op.bound.loc36_21: = bound_method %.loc36_21.1, constants.%Op.f0b +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.f0b, @Op.3(constants.%array_type) [concrete = constants.%Op.specific_fn.c51] +// CHECK:STDOUT: %bound_method.loc36_21: = bound_method %.loc36_21.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc36_21: %ptr.f01 = addr_of %.loc36_21.1 -// CHECK:STDOUT: %no_op.loc36_21: init %empty_tuple.type = call %bound_method.loc36_21.2(%addr.loc36_21) -// CHECK:STDOUT: %impl.elem0.loc36_3: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc36_3.1: = bound_method %pf.var, %impl.elem0.loc36_3 -// CHECK:STDOUT: %specific_fn.loc36_3: = specific_function %impl.elem0.loc36_3, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc36_3.2: = bound_method %pf.var, %specific_fn.loc36_3 +// CHECK:STDOUT: %no_op.loc36_21: init %empty_tuple.type = call %bound_method.loc36_21(%addr.loc36_21) +// CHECK:STDOUT: %Op.bound.loc36_3: = bound_method %pf.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc36_3: = bound_method %pf.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc36_3: %ptr.5d5 = addr_of %pf.var -// CHECK:STDOUT: %no_op.loc36_3: init %empty_tuple.type = call %bound_method.loc36_3.2(%addr.loc36_3) -// CHECK:STDOUT: %impl.elem0.loc23_3: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %pb.var, %impl.elem0.loc23_3 -// CHECK:STDOUT: %specific_fn.loc23_3: = specific_function %impl.elem0.loc23_3, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %pb.var, %specific_fn.loc23_3 +// CHECK:STDOUT: %no_op.loc36_3: init %empty_tuple.type = call %bound_method.loc36_3(%addr.loc36_3) +// CHECK:STDOUT: %Op.bound.loc23: = bound_method %pb.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %pb.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc23_3: %ptr.5d5 = addr_of %pb.var -// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3.2(%addr.loc23_3) +// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23_3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index e98d4cfdf847..5f26a271b064 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -33,16 +33,9 @@ fn Main() { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -55,8 +48,6 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -84,12 +75,11 @@ fn Main() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %b.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %b.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %b.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %b.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %b.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index db31ad773a85..104f7e6ebc06 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -1232,16 +1232,9 @@ fn Works() { // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.4, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.4, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.4(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1258,8 +1251,6 @@ fn Works() { // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1328,8 +1319,8 @@ fn Works() { // CHECK:STDOUT: %.loc22_7: ref %C = converted %.loc22_5.1, %.loc22_5.4 // CHECK:STDOUT: %A.ref.loc22_15: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc22_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc22_17: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] -// CHECK:STDOUT: %bound_method.loc22_17: = bound_method %A.ref.loc22_15, %impl.elem0.loc22_17 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem0.loc22: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method.loc22_17: = bound_method %A.ref.loc22_15, %impl.elem0.loc22 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc22: init type = call %bound_method.loc22_17(%A.ref.loc22_15, %A.ref.loc22_19) [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc22: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] // CHECK:STDOUT: %.loc22_12: %A.type = converted %.loc22_7, [concrete = ] @@ -1367,8 +1358,8 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc38_18: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc38_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc38_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc38_26: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] -// CHECK:STDOUT: %bound_method.loc38_26: = bound_method %A.ref.loc38_24, %impl.elem0.loc38_26 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem0.loc38: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method.loc38_26: = bound_method %A.ref.loc38_24, %impl.elem0.loc38 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc38: init type = call %bound_method.loc38_26(%A.ref.loc38_24, %A.ref.loc38_28) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc38_29.1: type = value_of_initializer %type.and.loc38 [concrete = constants.%A.type] // CHECK:STDOUT: %.loc38_29.2: type = converted %type.and.loc38, %.loc38_29.1 [concrete = constants.%A.type] @@ -1379,24 +1370,21 @@ fn Works() { // CHECK:STDOUT: %A.ref.loc38_34: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc38: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] // CHECK:STDOUT: %.loc38_32: %A.type = converted %.loc38_8, [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc38_6: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc38_6.1: = bound_method %.loc38_6.2, %impl.elem0.loc38_6 -// CHECK:STDOUT: %specific_fn.loc38: = specific_function %impl.elem0.loc38_6, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc38_6.2: = bound_method %.loc38_6.2, %specific_fn.loc38 +// CHECK:STDOUT: %Op.bound.loc38: = bound_method %.loc38_6.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.5d7, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc38_6: = bound_method %.loc38_6.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc38: %ptr.019 = addr_of %.loc38_6.2 -// CHECK:STDOUT: %no_op.loc38: init %empty_tuple.type = call %bound_method.loc38_6.2(%addr.loc38) -// CHECK:STDOUT: %impl.elem0.loc30_6: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc30_6.1: = bound_method %.loc30_6.2, %impl.elem0.loc30_6 -// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30_6, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc30_6.2: = bound_method %.loc30_6.2, %specific_fn.loc30 +// CHECK:STDOUT: %no_op.loc38: init %empty_tuple.type = call %bound_method.loc38_6(%addr.loc38) +// CHECK:STDOUT: %Op.bound.loc30: = bound_method %.loc30_6.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.5d7, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc30_6: = bound_method %.loc30_6.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc30: %ptr.019 = addr_of %.loc30_6.2 -// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30_6.2(%addr.loc30) -// CHECK:STDOUT: %impl.elem0.loc22_5: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %.loc22_5.2, %impl.elem0.loc22_5 -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22_5, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_5.2: = bound_method %.loc22_5.2, %specific_fn.loc22 +// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30_6(%addr.loc30) +// CHECK:STDOUT: %Op.bound.loc22: = bound_method %.loc22_5.2, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.5d7, @Op.4(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc22_5: = bound_method %.loc22_5.2, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc22: %ptr.019 = addr_of %.loc22_5.2 -// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_5.2(%addr.loc22) +// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_5(%addr.loc22) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/default_fn.carbon b/toolchain/check/testdata/interface/default_fn.carbon index 6b756b27e77e..263a2e6ba930 100644 --- a/toolchain/check/testdata/interface/default_fn.carbon +++ b/toolchain/check/testdata/interface/default_fn.carbon @@ -51,16 +51,9 @@ class C { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.e5b: type = fn_type_with_self_type %F.type.0b5, %I.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.2, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -71,8 +64,6 @@ class C { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -165,16 +156,15 @@ class C { // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.a33] -// CHECK:STDOUT: %impl.elem0.loc21: %.e5b = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.eb2] -// CHECK:STDOUT: %bound_method.loc21: = bound_method %c.ref, %impl.elem0.loc21 +// CHECK:STDOUT: %impl.elem0: %.e5b = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.eb2] +// CHECK:STDOUT: %bound_method.loc21: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %.loc21: %C = bind_value %c.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method.loc21(%.loc21) -// CHECK:STDOUT: %impl.elem0.loc20: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc20_7.1: = bound_method %c.var, %impl.elem0.loc20 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc20, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_7.2: = bound_method %c.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %c.var, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc20: = bound_method %c.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_7.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_member_lookup.carbon b/toolchain/check/testdata/interface/fail_member_lookup.carbon index 489b073e738f..db05fa52d8dc 100644 --- a/toolchain/check/testdata/interface/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/fail_member_lookup.carbon @@ -153,7 +153,6 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %.loc23: type = converted %T.ref, [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: %v: = bind_name v, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index 531d77ef9542..215e9c42aeb8 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -139,12 +139,9 @@ fn CallIndirect() { // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T.8b3) [symbolic] // CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.347: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Z) [concrete] // CHECK:STDOUT: %Op.type.f73: type = fn_type @Op.2, @impl.49c(%Z) [concrete] // CHECK:STDOUT: %Op.6e3: %Op.type.f73 = struct_value () [concrete] // CHECK:STDOUT: %ptr.fb6: type = ptr_type %Z [concrete] -// CHECK:STDOUT: %Destroy.facet.26a: %Destroy.type = facet_value %Z, (%Destroy.impl_witness.347) [concrete] -// CHECK:STDOUT: %.b91: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.26a [concrete] // CHECK:STDOUT: %Op.specific_fn.3b7: = specific_function %Op.6e3, @Op.2(%Z) [concrete] // CHECK:STDOUT: %Destroy.impl_witness.955: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.f6b) [concrete] // CHECK:STDOUT: %Op.type.495: type = fn_type @Op.2, @impl.49c(%tuple.type.f6b) [concrete] @@ -391,30 +388,28 @@ fn CallIndirect() { // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc22_14.1 [concrete = constants.%assoc0.5f6] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc22_6 [concrete = constants.%Y] // CHECK:STDOUT: %.loc22_14.2: type = converted %.loc22_6, %as_type [concrete = constants.%Y] -// CHECK:STDOUT: %impl.elem0.loc22_14: %.a60 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%F.ce9] +// CHECK:STDOUT: %impl.elem0: %.a60 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%F.ce9] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc22_21.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %specific_fn.loc22_14: = specific_function %impl.elem0.loc22_14, @F.2(constants.%Z) [concrete = constants.%F.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%Z) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc22_22.1: ref %tuple.type.f6b = temporary_storage // CHECK:STDOUT: %.loc22_21.2: ref %Z = temporary_storage // CHECK:STDOUT: %.loc22_21.3: init %Z = class_init (), %.loc22_21.2 [concrete = constants.%Z.val] // CHECK:STDOUT: %.loc22_21.4: ref %Z = temporary %.loc22_21.2, %.loc22_21.3 // CHECK:STDOUT: %.loc22_21.5: ref %Z = converted %.loc22_21.1, %.loc22_21.4 // CHECK:STDOUT: %.loc22_21.6: %Z = bind_value %.loc22_21.5 -// CHECK:STDOUT: %F.call: init %tuple.type.f6b = call %specific_fn.loc22_14(%.loc22_21.6) to %.loc22_22.1 +// CHECK:STDOUT: %F.call: init %tuple.type.f6b = call %specific_fn(%.loc22_21.6) to %.loc22_22.1 // CHECK:STDOUT: %.loc22_22.2: ref %tuple.type.f6b = temporary %.loc22_22.1, %F.call -// CHECK:STDOUT: %impl.elem0.loc22_21: %.b91 = impl_witness_access constants.%Destroy.impl_witness.347, element0 [concrete = constants.%Op.6e3] -// CHECK:STDOUT: %bound_method.loc22_21.1: = bound_method %.loc22_21.2, %impl.elem0.loc22_21 -// CHECK:STDOUT: %specific_fn.loc22_21: = specific_function %impl.elem0.loc22_21, @Op.2(constants.%Z) [concrete = constants.%Op.specific_fn.3b7] -// CHECK:STDOUT: %bound_method.loc22_21.2: = bound_method %.loc22_21.2, %specific_fn.loc22_21 +// CHECK:STDOUT: %Op.bound.loc22_21: = bound_method %.loc22_21.2, constants.%Op.6e3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.6e3, @Op.2(constants.%Z) [concrete = constants.%Op.specific_fn.3b7] +// CHECK:STDOUT: %bound_method.loc22_21: = bound_method %.loc22_21.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc22_21: %ptr.fb6 = addr_of %.loc22_21.2 -// CHECK:STDOUT: %no_op.loc22_21: init %empty_tuple.type = call %bound_method.loc22_21.2(%addr.loc22_21) -// CHECK:STDOUT: %impl.elem0.loc22_22: %.a86 = impl_witness_access constants.%Destroy.impl_witness.955, element0 [concrete = constants.%Op.51a] -// CHECK:STDOUT: %bound_method.loc22_22.1: = bound_method %.loc22_22.1, %impl.elem0.loc22_22 -// CHECK:STDOUT: %specific_fn.loc22_22: = specific_function %impl.elem0.loc22_22, @Op.2(constants.%tuple.type.f6b) [concrete = constants.%Op.specific_fn.8e5] -// CHECK:STDOUT: %bound_method.loc22_22.2: = bound_method %.loc22_22.1, %specific_fn.loc22_22 +// CHECK:STDOUT: %no_op.loc22_21: init %empty_tuple.type = call %bound_method.loc22_21(%addr.loc22_21) +// CHECK:STDOUT: %Op.bound.loc22_22: = bound_method %.loc22_22.1, constants.%Op.51a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.51a, @Op.2(constants.%tuple.type.f6b) [concrete = constants.%Op.specific_fn.8e5] +// CHECK:STDOUT: %bound_method.loc22_22: = bound_method %.loc22_22.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc22_22: %ptr.959 = addr_of %.loc22_22.1 -// CHECK:STDOUT: %no_op.loc22_22: init %empty_tuple.type = call %bound_method.loc22_22.2(%addr.loc22_22) +// CHECK:STDOUT: %no_op.loc22_22: init %empty_tuple.type = call %bound_method.loc22_22(%addr.loc22_22) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -457,12 +452,11 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc26_11.6: %Z = bind_value %.loc26_11.5 // CHECK:STDOUT: %.loc26_12.2: init @CallGeneric.%tuple.type (%tuple.type.e28) = call %specific_impl_fn.loc26_4.1(%.loc26_11.6) to %.loc26_12.1 // CHECK:STDOUT: %.loc26_12.3: ref @CallGeneric.%tuple.type (%tuple.type.e28) = temporary %.loc26_12.1, %.loc26_12.2 -// CHECK:STDOUT: %impl.elem0.loc26_11: %.b91 = impl_witness_access constants.%Destroy.impl_witness.347, element0 [concrete = constants.%Op.6e3] -// CHECK:STDOUT: %bound_method.loc26_11.1: = bound_method %.loc26_11.2, %impl.elem0.loc26_11 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc26_11, @Op.2(constants.%Z) [concrete = constants.%Op.specific_fn.3b7] -// CHECK:STDOUT: %bound_method.loc26_11.2: = bound_method %.loc26_11.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc26_11.2, constants.%Op.6e3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.6e3, @Op.2(constants.%Z) [concrete = constants.%Op.specific_fn.3b7] +// CHECK:STDOUT: %bound_method.loc26_11: = bound_method %.loc26_11.2, %Op.specific_fn // CHECK:STDOUT: %addr.loc26_11: %ptr.fb6 = addr_of %.loc26_11.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26_11.2(%addr.loc26_11) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26_11(%addr.loc26_11) // CHECK:STDOUT: %impl.elem0.loc26_12.1: @CallGeneric.%.loc26_12.5 (%.efa) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_12.2 (constants.%impl.elem0.305)] // CHECK:STDOUT: %bound_method.loc26_12.1: = bound_method %.loc26_12.1, %impl.elem0.loc26_12.1 // CHECK:STDOUT: %specific_impl_fn.loc26_12.1: = specific_impl_function %impl.elem0.loc26_12.1, @Op.1(constants.%Destroy.facet.1a6) [symbolic = %specific_impl_fn.loc26_12.2 (constants.%specific_impl_fn.52a)] @@ -674,12 +668,9 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.0b2: type = pattern_type %tuple.type.415 [concrete] // CHECK:STDOUT: %F.specific_fn.79b: = specific_function %F.93b, @F.2(%Y1, %Y2, %X, %Z) [concrete] // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.347: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%Z) [concrete] // CHECK:STDOUT: %Op.type.f73: type = fn_type @Op.2, @impl.49c(%Z) [concrete] // CHECK:STDOUT: %Op.6e3: %Op.type.f73 = struct_value () [concrete] // CHECK:STDOUT: %ptr.fb6: type = ptr_type %Z [concrete] -// CHECK:STDOUT: %Destroy.facet.26a: %Destroy.type = facet_value %Z, (%Destroy.impl_witness.347) [concrete] -// CHECK:STDOUT: %.b91: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.26a [concrete] // CHECK:STDOUT: %Op.specific_fn.3b7: = specific_function %Op.6e3, @Op.2(%Z) [concrete] // CHECK:STDOUT: %Destroy.impl_witness.c80: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.415) [concrete] // CHECK:STDOUT: %Op.type.2a3: type = fn_type @Op.2, @impl.49c(%tuple.type.415) [concrete] @@ -980,30 +971,28 @@ fn CallIndirect() { // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc24_31.1 [concrete = constants.%assoc0.5f6] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc24_23 [concrete = constants.%tuple.type.a46] // CHECK:STDOUT: %.loc24_31.2: type = converted %.loc24_23, %as_type [concrete = constants.%tuple.type.a46] -// CHECK:STDOUT: %impl.elem0.loc24_31: %.406 = impl_witness_access constants.%A.impl_witness.8ac, element0 [concrete = constants.%F.93b] +// CHECK:STDOUT: %impl.elem0: %.406 = impl_witness_access constants.%A.impl_witness.8ac, element0 [concrete = constants.%F.93b] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc24_38.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %specific_fn.loc24_31: = specific_function %impl.elem0.loc24_31, @F.2(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) [concrete = constants.%F.specific_fn.79b] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @F.2(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) [concrete = constants.%F.specific_fn.79b] // CHECK:STDOUT: %.loc24_39.1: ref %tuple.type.415 = temporary_storage // CHECK:STDOUT: %.loc24_38.2: ref %Z = temporary_storage // CHECK:STDOUT: %.loc24_38.3: init %Z = class_init (), %.loc24_38.2 [concrete = constants.%Z.val] // CHECK:STDOUT: %.loc24_38.4: ref %Z = temporary %.loc24_38.2, %.loc24_38.3 // CHECK:STDOUT: %.loc24_38.5: ref %Z = converted %.loc24_38.1, %.loc24_38.4 // CHECK:STDOUT: %.loc24_38.6: %Z = bind_value %.loc24_38.5 -// CHECK:STDOUT: %F.call: init %tuple.type.415 = call %specific_fn.loc24_31(%.loc24_38.6) to %.loc24_39.1 +// CHECK:STDOUT: %F.call: init %tuple.type.415 = call %specific_fn(%.loc24_38.6) to %.loc24_39.1 // CHECK:STDOUT: %.loc24_39.2: ref %tuple.type.415 = temporary %.loc24_39.1, %F.call -// CHECK:STDOUT: %impl.elem0.loc24_38: %.b91 = impl_witness_access constants.%Destroy.impl_witness.347, element0 [concrete = constants.%Op.6e3] -// CHECK:STDOUT: %bound_method.loc24_38.1: = bound_method %.loc24_38.2, %impl.elem0.loc24_38 -// CHECK:STDOUT: %specific_fn.loc24_38: = specific_function %impl.elem0.loc24_38, @Op.2(constants.%Z) [concrete = constants.%Op.specific_fn.3b7] -// CHECK:STDOUT: %bound_method.loc24_38.2: = bound_method %.loc24_38.2, %specific_fn.loc24_38 +// CHECK:STDOUT: %Op.bound.loc24_38: = bound_method %.loc24_38.2, constants.%Op.6e3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.6e3, @Op.2(constants.%Z) [concrete = constants.%Op.specific_fn.3b7] +// CHECK:STDOUT: %bound_method.loc24_38: = bound_method %.loc24_38.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc24_38: %ptr.fb6 = addr_of %.loc24_38.2 -// CHECK:STDOUT: %no_op.loc24_38: init %empty_tuple.type = call %bound_method.loc24_38.2(%addr.loc24_38) -// CHECK:STDOUT: %impl.elem0.loc24_39: %.1b7 = impl_witness_access constants.%Destroy.impl_witness.c80, element0 [concrete = constants.%Op.66e] -// CHECK:STDOUT: %bound_method.loc24_39.1: = bound_method %.loc24_39.1, %impl.elem0.loc24_39 -// CHECK:STDOUT: %specific_fn.loc24_39: = specific_function %impl.elem0.loc24_39, @Op.2(constants.%tuple.type.415) [concrete = constants.%Op.specific_fn.ce9] -// CHECK:STDOUT: %bound_method.loc24_39.2: = bound_method %.loc24_39.1, %specific_fn.loc24_39 +// CHECK:STDOUT: %no_op.loc24_38: init %empty_tuple.type = call %bound_method.loc24_38(%addr.loc24_38) +// CHECK:STDOUT: %Op.bound.loc24_39: = bound_method %.loc24_39.1, constants.%Op.66e +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.66e, @Op.2(constants.%tuple.type.415) [concrete = constants.%Op.specific_fn.ce9] +// CHECK:STDOUT: %bound_method.loc24_39: = bound_method %.loc24_39.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc24_39: %ptr.ad9 = addr_of %.loc24_39.1 -// CHECK:STDOUT: %no_op.loc24_39: init %empty_tuple.type = call %bound_method.loc24_39.2(%addr.loc24_39) +// CHECK:STDOUT: %no_op.loc24_39: init %empty_tuple.type = call %bound_method.loc24_39(%addr.loc24_39) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1046,12 +1035,11 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc28_11.6: %Z = bind_value %.loc28_11.5 // CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.e28) = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) to %.loc28_12.1 // CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.e28) = temporary %.loc28_12.1, %.loc28_12.2 -// CHECK:STDOUT: %impl.elem0.loc28_11: %.b91 = impl_witness_access constants.%Destroy.impl_witness.347, element0 [concrete = constants.%Op.6e3] -// CHECK:STDOUT: %bound_method.loc28_11.1: = bound_method %.loc28_11.2, %impl.elem0.loc28_11 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc28_11, @Op.2(constants.%Z) [concrete = constants.%Op.specific_fn.3b7] -// CHECK:STDOUT: %bound_method.loc28_11.2: = bound_method %.loc28_11.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc28_11.2, constants.%Op.6e3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.6e3, @Op.2(constants.%Z) [concrete = constants.%Op.specific_fn.3b7] +// CHECK:STDOUT: %bound_method.loc28_11: = bound_method %.loc28_11.2, %Op.specific_fn // CHECK:STDOUT: %addr.loc28_11: %ptr.fb6 = addr_of %.loc28_11.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc28_11.2(%addr.loc28_11) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc28_11(%addr.loc28_11) // CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.5 (%.efa) = impl_witness_access constants.%Destroy.lookup_impl_witness.1a2, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.305)] // CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.1, %impl.elem0.loc28_12.1 // CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem0.loc28_12.1, @Op.1(constants.%Destroy.facet.1a6) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.52a)] diff --git a/toolchain/check/testdata/interop/cpp/function/class.carbon b/toolchain/check/testdata/interop/cpp/function/class.carbon index c113ecf15065..28517c1e51db 100644 --- a/toolchain/check/testdata/interop/cpp/function/class.carbon +++ b/toolchain/check/testdata/interop/cpp/function/class.carbon @@ -407,18 +407,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.4f0: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.1b3: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.21b: %Op.type.1b3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.4f0) [concrete] -// CHECK:STDOUT: %.b20: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.21b, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -431,8 +422,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -446,12 +435,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %C = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %C = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.b20 = impl_witness_access constants.%Destroy.impl_witness.4f0, element0 [concrete = constants.%Op.21b] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.21b +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -464,18 +452,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.4f0: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.1b3: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.21b: %Op.type.1b3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.4f0) [concrete] -// CHECK:STDOUT: %.b20: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.21b, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -488,8 +467,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -503,12 +480,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %C = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %C = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.b20 = impl_witness_access constants.%Destroy.impl_witness.4f0, element0 [concrete = constants.%Op.21b] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.21b +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -521,18 +497,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.4f0: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.1b3: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.21b: %Op.type.1b3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.4f0) [concrete] -// CHECK:STDOUT: %.b20: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.21b, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -545,8 +512,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -560,12 +525,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %C = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %C = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.b20 = impl_witness_access constants.%Destroy.impl_witness.4f0, element0 [concrete = constants.%Op.21b] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.21b +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -578,18 +542,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.86f: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.9ae: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.dbb: %Op.type.9ae = struct_value () [concrete] // CHECK:STDOUT: %ptr.838: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.86f) [concrete] -// CHECK:STDOUT: %.268: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.dbb, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -602,8 +557,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -617,12 +570,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %C = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %C = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.268 = impl_witness_access constants.%Destroy.impl_witness.86f, element0 [concrete = constants.%Op.dbb] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.dbb +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.838 = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -635,18 +587,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.5c3: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.b28: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.f48: %Op.type.b28 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c0c: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.5c3) [concrete] -// CHECK:STDOUT: %.f7d: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.f48, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -663,8 +606,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -679,12 +620,11 @@ fn F() { // CHECK:STDOUT: %.loc8_15.5: ref %C = converted %.loc8_15.1, %.loc8_15.4 // CHECK:STDOUT: %.loc8_15.6: %C = bind_value %.loc8_15.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_15.6) -// CHECK:STDOUT: %impl.elem0: %.f7d = impl_witness_access constants.%Destroy.impl_witness.5c3, element0 [concrete = constants.%Op.f48] -// CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %.loc8_15.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %.loc8_15.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_15.2, constants.%Op.f48 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c0c = addr_of %.loc8_15.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_15.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -699,18 +639,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.4f0: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.1b3: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.21b: %Op.type.1b3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.4f0) [concrete] -// CHECK:STDOUT: %.b20: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.21b, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -726,8 +657,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -746,12 +675,11 @@ fn F() { // CHECK:STDOUT: %.loc9_12.5: ref %C = converted %.loc9_12.1, %.loc9_12.4 // CHECK:STDOUT: %.loc9_12.6: %C = bind_value %.loc9_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc9_12.6) -// CHECK:STDOUT: %impl.elem0: %.b20 = impl_witness_access constants.%Destroy.impl_witness.4f0, element0 [concrete = constants.%Op.21b] -// CHECK:STDOUT: %bound_method.loc9_12.1: = bound_method %.loc9_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_12.2: = bound_method %.loc9_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9_12.2, constants.%Op.21b +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc9_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -766,18 +694,9 @@ fn F() { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %bar.type: type = fn_type @bar [concrete] // CHECK:STDOUT: %bar: %bar.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.4f0: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.1b3: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.21b: %Op.type.1b3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.4f0) [concrete] -// CHECK:STDOUT: %.b20: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.21b, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -793,8 +712,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: %bar.decl: %bar.type = fn_decl @bar [concrete = constants.%bar] {} {} -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -812,12 +729,11 @@ fn F() { // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %bar.ref: %bar.type = name_ref bar, imports.%bar.decl [concrete = constants.%bar] // CHECK:STDOUT: %bar.call: init %empty_tuple.type = call %bar.ref() -// CHECK:STDOUT: %impl.elem0: %.b20 = impl_witness_access constants.%Destroy.impl_witness.4f0, element0 [concrete = constants.%Op.21b] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.21b +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -891,18 +807,9 @@ fn F() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.4f0: = impl_witness imports.%Destroy.impl_witness_table, @impl(%C) [concrete] // CHECK:STDOUT: %Op.type.1b3: type = fn_type @Op.2, @impl(%C) [concrete] // CHECK:STDOUT: %Op.21b: %Op.type.1b3 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.4f0) [concrete] -// CHECK:STDOUT: %.b20: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.21b, @Op.2(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -915,8 +822,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -926,12 +831,11 @@ fn F() { // CHECK:STDOUT: %.loc8_11.1: ref %C = temporary_storage // CHECK:STDOUT: %foo.call: init %C = call %foo.ref() to %.loc8_11.1 // CHECK:STDOUT: %.loc8_11.2: ref %C = temporary %.loc8_11.1, %foo.call -// CHECK:STDOUT: %impl.elem0: %.b20 = impl_witness_access constants.%Destroy.impl_witness.4f0, element0 [concrete = constants.%Op.21b] -// CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %.loc8_11.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_11.1, constants.%Op.21b +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_11.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_11.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/pointer.carbon b/toolchain/check/testdata/interop/cpp/function/pointer.carbon index 64d2388b5a0c..968c04933546 100644 --- a/toolchain/check/testdata/interop/cpp/function/pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/function/pointer.carbon @@ -226,17 +226,8 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -251,8 +242,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -277,12 +266,11 @@ fn F() { // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %addr.loc9: %ptr.5c7 = addr_of %s.ref // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%addr.loc9) -// CHECK:STDOUT: %impl.elem0: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %s.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %s.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %s.var, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %s.var, %Op.specific_fn // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -299,23 +287,10 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.dfe: type = ptr_type %ptr.5c7 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.79a: = impl_witness imports.%Destroy.impl_witness_table, @impl(%ptr.5c7) [concrete] // CHECK:STDOUT: %Op.type.c07: type = fn_type @Op.2, @impl(%ptr.5c7) [concrete] // CHECK:STDOUT: %Op.64b: %Op.type.c07 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.a4e: %Destroy.type = facet_value %ptr.5c7, (%Destroy.impl_witness.79a) [concrete] -// CHECK:STDOUT: %.33b: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.a4e [concrete] -// CHECK:STDOUT: %Op.specific_fn.131: = specific_function %Op.64b, @Op.2(%ptr.5c7) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.556: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.556 [concrete] -// CHECK:STDOUT: %Op.specific_fn.4ce: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -330,8 +305,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -370,18 +343,16 @@ fn F() { // CHECK:STDOUT: %p.ref: ref %ptr.5c7 = name_ref p, %p // CHECK:STDOUT: %addr.loc17: %ptr.dfe = addr_of %p.ref // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref() -// CHECK:STDOUT: %impl.elem0.loc9: %.33b = impl_witness_access constants.%Destroy.impl_witness.79a, element0 [concrete = constants.%Op.64b] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %p.var, %impl.elem0.loc9 -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Op.2(constants.%ptr.5c7) [concrete = constants.%Op.specific_fn.131] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %p.var, %specific_fn.loc9 +// CHECK:STDOUT: %Op.bound.loc9: = bound_method %p.var, constants.%Op.64b +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc9: = bound_method %p.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9_3: %ptr.dfe = addr_of %p.var -// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr.loc9_3) -// CHECK:STDOUT: %impl.elem0.loc8: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %s.var, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn.4ce] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %s.var, %specific_fn.loc8 +// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_3) +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %s.var, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc8: = bound_method %s.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -395,17 +366,8 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.ff5: type = ptr_type %const [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.4d8: = impl_witness imports.%Destroy.impl_witness_table, @impl(%const) [concrete] // CHECK:STDOUT: %Op.type.372: type = fn_type @Op.2, @impl(%const) [concrete] // CHECK:STDOUT: %Op.af7: %Op.type.372 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %const, (%Destroy.impl_witness.4d8) [concrete] -// CHECK:STDOUT: %.af2: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.af7, @Op.2(%const) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -415,8 +377,6 @@ fn F() { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %S.decl: type = class_decl @S [concrete = constants.%S] {} {} -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -440,18 +400,16 @@ fn F() { // CHECK:STDOUT: %foo.ref: = name_ref foo, [concrete = ] // CHECK:STDOUT: %s.ref: ref %const = name_ref s, %s // CHECK:STDOUT: %addr.loc18: %ptr.ff5 = addr_of %s.ref -// CHECK:STDOUT: %impl.elem0.loc10_3.1: %.af2 = impl_witness_access constants.%Destroy.impl_witness.4d8, element0 [concrete = constants.%Op.af7] -// CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %.loc10_3, %impl.elem0.loc10_3.1 -// CHECK:STDOUT: %specific_fn.loc10_3.1: = specific_function %impl.elem0.loc10_3.1, @Op.2(constants.%const) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %.loc10_3, %specific_fn.loc10_3.1 +// CHECK:STDOUT: %Op.bound.loc10_3.1: = bound_method %.loc10_3, constants.%Op.af7 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %.loc10_3, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_3.1: %ptr.ff5 = addr_of %.loc10_3 -// CHECK:STDOUT: %no_op.loc10_3.1: init %empty_tuple.type = call %bound_method.loc10_3.2(%addr.loc10_3.1) -// CHECK:STDOUT: %impl.elem0.loc10_3.2: %.af2 = impl_witness_access constants.%Destroy.impl_witness.4d8, element0 [concrete = constants.%Op.af7] -// CHECK:STDOUT: %bound_method.loc10_3.3: = bound_method %s.var, %impl.elem0.loc10_3.2 -// CHECK:STDOUT: %specific_fn.loc10_3.2: = specific_function %impl.elem0.loc10_3.2, @Op.2(constants.%const) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_3.4: = bound_method %s.var, %specific_fn.loc10_3.2 +// CHECK:STDOUT: %no_op.loc10_3.1: init %empty_tuple.type = call %bound_method.loc10_3.1(%addr.loc10_3.1) +// CHECK:STDOUT: %Op.bound.loc10_3.2: = bound_method %s.var, constants.%Op.af7 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %s.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10_3.2: %ptr.ff5 = addr_of %s.var -// CHECK:STDOUT: %no_op.loc10_3.2: init %empty_tuple.type = call %bound_method.loc10_3.4(%addr.loc10_3.2) +// CHECK:STDOUT: %no_op.loc10_3.2: init %empty_tuple.type = call %bound_method.loc10_3.2(%addr.loc10_3.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -574,17 +532,8 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -599,8 +548,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -625,12 +572,11 @@ fn F() { // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %addr.loc16: %ptr.5c7 = addr_of %s.ref // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref() -// CHECK:STDOUT: %impl.elem0: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %s.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %s.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %s.var, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %s.var, %Op.specific_fn // CHECK:STDOUT: %addr.loc8: %ptr.5c7 = addr_of %s.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/struct.carbon b/toolchain/check/testdata/interop/cpp/function/struct.carbon index 783be7d54cd4..8735abcca551 100644 --- a/toolchain/check/testdata/interop/cpp/function/struct.carbon +++ b/toolchain/check/testdata/interop/cpp/function/struct.carbon @@ -407,18 +407,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -431,8 +422,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -446,12 +435,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %S = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %S = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -464,18 +452,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -488,8 +467,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -503,12 +480,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %S = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %S = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -521,18 +497,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -545,8 +512,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -560,12 +525,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %S = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %S = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -578,18 +542,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.0f8: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.2b5: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.9b3: %Op.type.2b5 = struct_value () [concrete] // CHECK:STDOUT: %ptr.edf: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.0f8) [concrete] -// CHECK:STDOUT: %.f1f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.9b3, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -602,8 +557,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -617,12 +570,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %S = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %S = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.f1f = impl_witness_access constants.%Destroy.impl_witness.0f8, element0 [concrete = constants.%Op.9b3] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.9b3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.edf = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -635,18 +587,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1b1: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.17f: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.463: %Op.type.17f = struct_value () [concrete] // CHECK:STDOUT: %ptr.887: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.1b1) [concrete] -// CHECK:STDOUT: %.74f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.463, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -663,8 +606,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -679,12 +620,11 @@ fn F() { // CHECK:STDOUT: %.loc8_15.5: ref %S = converted %.loc8_15.1, %.loc8_15.4 // CHECK:STDOUT: %.loc8_15.6: %S = bind_value %.loc8_15.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_15.6) -// CHECK:STDOUT: %impl.elem0: %.74f = impl_witness_access constants.%Destroy.impl_witness.1b1, element0 [concrete = constants.%Op.463] -// CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %.loc8_15.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %.loc8_15.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_15.2, constants.%Op.463 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.887 = addr_of %.loc8_15.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_15.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -699,18 +639,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -726,8 +657,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -746,12 +675,11 @@ fn F() { // CHECK:STDOUT: %.loc9_12.5: ref %S = converted %.loc9_12.1, %.loc9_12.4 // CHECK:STDOUT: %.loc9_12.6: %S = bind_value %.loc9_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc9_12.6) -// CHECK:STDOUT: %impl.elem0: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc9_12.1: = bound_method %.loc9_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_12.2: = bound_method %.loc9_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9_12.2, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %.loc9_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -766,18 +694,9 @@ fn F() { // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] // CHECK:STDOUT: %bar.type: type = fn_type @bar [concrete] // CHECK:STDOUT: %bar: %bar.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -793,8 +712,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: %bar.decl: %bar.type = fn_decl @bar [concrete = constants.%bar] {} {} -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -812,12 +729,11 @@ fn F() { // CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S] // CHECK:STDOUT: %bar.ref: %bar.type = name_ref bar, imports.%bar.decl [concrete = constants.%bar] // CHECK:STDOUT: %bar.call: init %empty_tuple.type = call %bar.ref() -// CHECK:STDOUT: %impl.elem0: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -891,18 +807,9 @@ fn F() { // CHECK:STDOUT: %S: type = class_type @S [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.2d2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%S) [concrete] // CHECK:STDOUT: %Op.type.642: type = fn_type @Op.2, @impl(%S) [concrete] // CHECK:STDOUT: %Op.ab5: %Op.type.642 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%Destroy.impl_witness.2d2) [concrete] -// CHECK:STDOUT: %.271: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ab5, @Op.2(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -915,8 +822,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -926,12 +831,11 @@ fn F() { // CHECK:STDOUT: %.loc8_11.1: ref %S = temporary_storage // CHECK:STDOUT: %foo.call: init %S = call %foo.ref() to %.loc8_11.1 // CHECK:STDOUT: %.loc8_11.2: ref %S = temporary %.loc8_11.1, %foo.call -// CHECK:STDOUT: %impl.elem0: %.271 = impl_witness_access constants.%Destroy.impl_witness.2d2, element0 [concrete = constants.%Op.ab5] -// CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %.loc8_11.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%S) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_11.1, constants.%Op.ab5 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %.loc8_11.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_11.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/union.carbon b/toolchain/check/testdata/interop/cpp/function/union.carbon index 317caa47ff86..f7832f2fed71 100644 --- a/toolchain/check/testdata/interop/cpp/function/union.carbon +++ b/toolchain/check/testdata/interop/cpp/function/union.carbon @@ -453,18 +453,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %U.val: %U = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.abf: = impl_witness imports.%Destroy.impl_witness_table, @impl(%U) [concrete] // CHECK:STDOUT: %Op.type.0b7: type = fn_type @Op.2, @impl(%U) [concrete] // CHECK:STDOUT: %Op.2fa: %Op.type.0b7 = struct_value () [concrete] // CHECK:STDOUT: %ptr.86f: type = ptr_type %U [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %U, (%Destroy.impl_witness.abf) [concrete] -// CHECK:STDOUT: %.487: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2fa, @Op.2(%U) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -477,8 +468,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -492,12 +481,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %U = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %U = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.487 = impl_witness_access constants.%Destroy.impl_witness.abf, element0 [concrete = constants.%Op.2fa] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%U) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.2fa +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.86f = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -570,18 +558,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %U.val: %U = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.493: = impl_witness imports.%Destroy.impl_witness_table, @impl(%U) [concrete] // CHECK:STDOUT: %Op.type.2e1: type = fn_type @Op.2, @impl(%U) [concrete] // CHECK:STDOUT: %Op.d5d: %Op.type.2e1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.87e: type = ptr_type %U [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %U, (%Destroy.impl_witness.493) [concrete] -// CHECK:STDOUT: %.c67: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d5d, @Op.2(%U) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -594,8 +573,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -609,12 +586,11 @@ fn F() { // CHECK:STDOUT: %.loc8_12.5: ref %U = converted %.loc8_12.1, %.loc8_12.4 // CHECK:STDOUT: %.loc8_12.6: %U = bind_value %.loc8_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_12.6) -// CHECK:STDOUT: %impl.elem0: %.c67 = impl_witness_access constants.%Destroy.impl_witness.493, element0 [concrete = constants.%Op.d5d] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%U) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.d5d +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.87e = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -627,18 +603,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %U.val: %U = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.583: = impl_witness imports.%Destroy.impl_witness_table, @impl(%U) [concrete] // CHECK:STDOUT: %Op.type.ee1: type = fn_type @Op.2, @impl(%U) [concrete] // CHECK:STDOUT: %Op.28c: %Op.type.ee1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.8c1: type = ptr_type %U [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %U, (%Destroy.impl_witness.583) [concrete] -// CHECK:STDOUT: %.3b3: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.28c, @Op.2(%U) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -655,8 +622,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -671,12 +636,11 @@ fn F() { // CHECK:STDOUT: %.loc8_15.5: ref %U = converted %.loc8_15.1, %.loc8_15.4 // CHECK:STDOUT: %.loc8_15.6: %U = bind_value %.loc8_15.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc8_15.6) -// CHECK:STDOUT: %impl.elem0: %.3b3 = impl_witness_access constants.%Destroy.impl_witness.583, element0 [concrete = constants.%Op.28c] -// CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %.loc8_15.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%U) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %.loc8_15.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_15.2, constants.%Op.28c +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_15.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.8c1 = addr_of %.loc8_15.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_15.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -691,18 +655,9 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %U.val: %U = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.abf: = impl_witness imports.%Destroy.impl_witness_table, @impl(%U) [concrete] // CHECK:STDOUT: %Op.type.0b7: type = fn_type @Op.2, @impl(%U) [concrete] // CHECK:STDOUT: %Op.2fa: %Op.type.0b7 = struct_value () [concrete] // CHECK:STDOUT: %ptr.86f: type = ptr_type %U [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %U, (%Destroy.impl_witness.abf) [concrete] -// CHECK:STDOUT: %.487: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2fa, @Op.2(%U) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -718,8 +673,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -738,12 +691,11 @@ fn F() { // CHECK:STDOUT: %.loc9_12.5: ref %U = converted %.loc9_12.1, %.loc9_12.4 // CHECK:STDOUT: %.loc9_12.6: %U = bind_value %.loc9_12.5 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref(%.loc9_12.6) -// CHECK:STDOUT: %impl.elem0: %.487 = impl_witness_access constants.%Destroy.impl_witness.abf, element0 [concrete = constants.%Op.2fa] -// CHECK:STDOUT: %bound_method.loc9_12.1: = bound_method %.loc9_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%U) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_12.2: = bound_method %.loc9_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9_12.2, constants.%Op.2fa +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc9_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.86f = addr_of %.loc9_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -758,18 +710,9 @@ fn F() { // CHECK:STDOUT: %U.val: %U = struct_value () [concrete] // CHECK:STDOUT: %bar.type: type = fn_type @bar [concrete] // CHECK:STDOUT: %bar: %bar.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.abf: = impl_witness imports.%Destroy.impl_witness_table, @impl(%U) [concrete] // CHECK:STDOUT: %Op.type.0b7: type = fn_type @Op.2, @impl(%U) [concrete] // CHECK:STDOUT: %Op.2fa: %Op.type.0b7 = struct_value () [concrete] // CHECK:STDOUT: %ptr.86f: type = ptr_type %U [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %U, (%Destroy.impl_witness.abf) [concrete] -// CHECK:STDOUT: %.487: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2fa, @Op.2(%U) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -785,8 +728,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: %bar.decl: %bar.type = fn_decl @bar [concrete = constants.%bar] {} {} -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -804,12 +745,11 @@ fn F() { // CHECK:STDOUT: %U.ref: type = name_ref U, imports.%U.decl [concrete = constants.%U] // CHECK:STDOUT: %bar.ref: %bar.type = name_ref bar, imports.%bar.decl [concrete = constants.%bar] // CHECK:STDOUT: %bar.call: init %empty_tuple.type = call %bar.ref() -// CHECK:STDOUT: %impl.elem0: %.487 = impl_witness_access constants.%Destroy.impl_witness.abf, element0 [concrete = constants.%Op.2fa] -// CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%U) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_12.2, constants.%Op.2fa +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_12.2, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.86f = addr_of %.loc8_12.2 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -883,18 +823,9 @@ fn F() { // CHECK:STDOUT: %U: type = class_type @U [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.abf: = impl_witness imports.%Destroy.impl_witness_table, @impl(%U) [concrete] // CHECK:STDOUT: %Op.type.0b7: type = fn_type @Op.2, @impl(%U) [concrete] // CHECK:STDOUT: %Op.2fa: %Op.type.0b7 = struct_value () [concrete] // CHECK:STDOUT: %ptr.86f: type = ptr_type %U [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %U, (%Destroy.impl_witness.abf) [concrete] -// CHECK:STDOUT: %.487: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2fa, @Op.2(%U) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -907,8 +838,6 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -918,12 +847,11 @@ fn F() { // CHECK:STDOUT: %.loc8_11.1: ref %U = temporary_storage // CHECK:STDOUT: %foo.call: init %U = call %foo.ref() to %.loc8_11.1 // CHECK:STDOUT: %.loc8_11.2: ref %U = temporary %.loc8_11.1, %foo.call -// CHECK:STDOUT: %impl.elem0: %.487 = impl_witness_access constants.%Destroy.impl_witness.abf, element0 [concrete = constants.%Op.2fa] -// CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %.loc8_11.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%U) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8_11.1, constants.%Op.2fa +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc8_11.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.86f = addr_of %.loc8_11.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_11.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/typedef.carbon b/toolchain/check/testdata/interop/cpp/typedef.carbon index 179fe68ef887..247752e7ae48 100644 --- a/toolchain/check/testdata/interop/cpp/typedef.carbon +++ b/toolchain/check/testdata/interop/cpp/typedef.carbon @@ -73,24 +73,11 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.711: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.type.ba2: type = fn_type @Op.3, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.649: %Op.type.ba2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %ptr.235, (%Destroy.impl_witness.711) [concrete] -// CHECK:STDOUT: %.a79: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2bf [concrete] -// CHECK:STDOUT: %Op.specific_fn.829: = specific_function %Op.649, @Op.3(%ptr.235) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] -// CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,8 +88,6 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -113,10 +98,10 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0.loc8_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %int_42, %impl.elem0.loc8_3.1 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc8_3.1: = specific_function %impl.elem0.loc8_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %int_42, %specific_fn.loc8_3.1 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_3.2(%int_42) [concrete = constants.%int_42.c68] // CHECK:STDOUT: %.loc8_3: init %i32 = converted %int_42, %int.convert_checked [concrete = constants.%int_42.c68] // CHECK:STDOUT: assign %n.var, %.loc8_3 @@ -141,18 +126,16 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr: type = ptr_type %bar.ref [concrete = constants.%ptr.235] // CHECK:STDOUT: } // CHECK:STDOUT: %p: ref %ptr.235 = bind_name p, %p.var -// CHECK:STDOUT: %impl.elem0.loc10: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %p.var, %impl.elem0.loc10 -// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %p.var, %specific_fn.loc10 +// CHECK:STDOUT: %Op.bound.loc10: = bound_method %p.var, constants.%Op.649 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10: = bound_method %p.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_3: %ptr.5d5 = addr_of %p.var -// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10_3.2(%addr.loc10_3) -// CHECK:STDOUT: %impl.elem0.loc8_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc8_3.3: = bound_method %n.var, %impl.elem0.loc8_3.2 -// CHECK:STDOUT: %specific_fn.loc8_3.2: = specific_function %impl.elem0.loc8_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc8_3.4: = bound_method %n.var, %specific_fn.loc8_3.2 +// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_3) +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %n.var, constants.%Op.e6a +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc8_3.3: = bound_method %n.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8: %ptr.235 = addr_of %n.var -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.4(%addr.loc8) +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.3(%addr.loc8) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -163,18 +146,9 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] // CHECK:STDOUT: %pattern_type.a31: type = pattern_type %ptr.d9e [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.5a8: = impl_witness imports.%Destroy.impl_witness_table, @impl(%ptr.d9e) [concrete] // CHECK:STDOUT: %Op.type.cb8: type = fn_type @Op.2, @impl(%ptr.d9e) [concrete] // CHECK:STDOUT: %Op.8e3: %Op.type.cb8 = struct_value () [concrete] // CHECK:STDOUT: %ptr.01d: type = ptr_type %ptr.d9e [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.d9e, (%Destroy.impl_witness.5a8) [concrete] -// CHECK:STDOUT: %.8d5: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.8e3, @Op.2(%ptr.d9e) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -184,8 +158,6 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H(%c.param: %C, %d.param: %C) { @@ -218,18 +190,16 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr.loc10: type = ptr_type %C.ref.loc10 [concrete = constants.%ptr.d9e] // CHECK:STDOUT: } // CHECK:STDOUT: %pc: ref %ptr.d9e = bind_name pc, %pc.var -// CHECK:STDOUT: %impl.elem0.loc10: %.8d5 = impl_witness_access constants.%Destroy.impl_witness.5a8, element0 [concrete = constants.%Op.8e3] -// CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %pc.var, %impl.elem0.loc10 -// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Op.2(constants.%ptr.d9e) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %pc.var, %specific_fn.loc10 +// CHECK:STDOUT: %Op.bound.loc10: = bound_method %pc.var, constants.%Op.8e3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc10: = bound_method %pc.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10_3: %ptr.01d = addr_of %pc.var -// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10_3.2(%addr.loc10_3) -// CHECK:STDOUT: %impl.elem0.loc9: %.8d5 = impl_witness_access constants.%Destroy.impl_witness.5a8, element0 [concrete = constants.%Op.8e3] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %pd.var, %impl.elem0.loc9 -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Op.2(constants.%ptr.d9e) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %pd.var, %specific_fn.loc9 +// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_3) +// CHECK:STDOUT: %Op.bound.loc9: = bound_method %pd.var, constants.%Op.8e3 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc9: = bound_method %pd.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9_3: %ptr.01d = addr_of %pd.var -// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr.loc9_3) +// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/unsupported_decl_type.carbon b/toolchain/check/testdata/interop/cpp/unsupported_decl_type.carbon index d569fa87ba7d..5c0751172337 100644 --- a/toolchain/check/testdata/interop/cpp/unsupported_decl_type.carbon +++ b/toolchain/check/testdata/interop/cpp/unsupported_decl_type.carbon @@ -47,7 +47,6 @@ fn F() { // CHECK:STDOUT: %c.var: ref = var %c.var_patt [concrete = ] // CHECK:STDOUT: // CHECK:STDOUT: %c: = bind_name c, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index e2a8b45def58..f41680a2dc5b 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -320,35 +320,19 @@ impl i32 as Empty { // CHECK:STDOUT: %tuple.elem0.eaf: %empty_tuple.type = tuple_access %c, element0 [symbolic] // CHECK:STDOUT: %tuple.elem1: %empty_tuple.type = tuple_access %c, element1 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.5b3: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.2d5) [concrete] // CHECK:STDOUT: %Op.type.073: type = fn_type @Op.2, @impl(%tuple.type.2d5) [concrete] // CHECK:STDOUT: %Op.dce: %Op.type.073 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.d28: %Destroy.type = facet_value %tuple.type.2d5, (%Destroy.impl_witness.5b3) [concrete] -// CHECK:STDOUT: %.886: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.d28 [concrete] // CHECK:STDOUT: %Op.specific_fn.234: = specific_function %Op.dce, @Op.2(%tuple.type.2d5) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.585: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.bcd) [concrete] // CHECK:STDOUT: %Op.type.4e8: type = fn_type @Op.2, @impl(%tuple.type.bcd) [concrete] // CHECK:STDOUT: %Op.166: %Op.type.4e8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.65b: %Destroy.type = facet_value %tuple.type.bcd, (%Destroy.impl_witness.585) [concrete] -// CHECK:STDOUT: %.b6c: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.65b [concrete] // CHECK:STDOUT: %Op.specific_fn.48a: = specific_function %Op.166, @Op.2(%tuple.type.bcd) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.511: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.9fb) [concrete] // CHECK:STDOUT: %Op.type.23e: type = fn_type @Op.2, @impl(%tuple.type.9fb) [concrete] // CHECK:STDOUT: %Op.f19: %Op.type.23e = struct_value () [concrete] // CHECK:STDOUT: %ptr.652: type = ptr_type %tuple.type.9fb [concrete] -// CHECK:STDOUT: %Destroy.facet.108: %Destroy.type = facet_value %tuple.type.9fb, (%Destroy.impl_witness.511) [concrete] -// CHECK:STDOUT: %.2cd: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.108 [concrete] // CHECK:STDOUT: %Op.specific_fn.d2b: = specific_function %Op.f19, @Op.2(%tuple.type.9fb) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet.926: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.926 [concrete] // CHECK:STDOUT: %Op.specific_fn.393: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -359,8 +343,6 @@ impl i32 as Empty { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -556,30 +538,26 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc16_24.6: type = converted %.loc16_24.2, constants.%tuple.type.2d5 [concrete = constants.%tuple.type.2d5] // CHECK:STDOUT: } // CHECK:STDOUT: %d1: ref %tuple.type.2d5 = bind_name d1, %d1.var -// CHECK:STDOUT: %impl.elem0.loc16: %.886 = impl_witness_access constants.%Destroy.impl_witness.5b3, element0 [concrete = constants.%Op.dce] -// CHECK:STDOUT: %bound_method.loc16_5.1: = bound_method %d1.var, %impl.elem0.loc16 -// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Op.2(constants.%tuple.type.2d5) [concrete = constants.%Op.specific_fn.234] -// CHECK:STDOUT: %bound_method.loc16_5.2: = bound_method %d1.var, %specific_fn.loc16 +// CHECK:STDOUT: %Op.bound.loc16: = bound_method %d1.var, constants.%Op.dce +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.dce, @Op.2(constants.%tuple.type.2d5) [concrete = constants.%Op.specific_fn.234] +// CHECK:STDOUT: %bound_method.loc16: = bound_method %d1.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc16: %ptr.7fe = addr_of %d1.var -// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16_5.2(%addr.loc16) -// CHECK:STDOUT: %impl.elem0.loc15: %.b6c = impl_witness_access constants.%Destroy.impl_witness.585, element0 [concrete = constants.%Op.166] -// CHECK:STDOUT: %bound_method.loc15_5.1: = bound_method %c1.var, %impl.elem0.loc15 -// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Op.2(constants.%tuple.type.bcd) [concrete = constants.%Op.specific_fn.48a] -// CHECK:STDOUT: %bound_method.loc15_5.2: = bound_method %c1.var, %specific_fn.loc15 +// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16(%addr.loc16) +// CHECK:STDOUT: %Op.bound.loc15: = bound_method %c1.var, constants.%Op.166 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.166, @Op.2(constants.%tuple.type.bcd) [concrete = constants.%Op.specific_fn.48a] +// CHECK:STDOUT: %bound_method.loc15: = bound_method %c1.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc15: %ptr.709 = addr_of %c1.var -// CHECK:STDOUT: %no_op.loc15: init %empty_tuple.type = call %bound_method.loc15_5.2(%addr.loc15) -// CHECK:STDOUT: %impl.elem0.loc14: %.2cd = impl_witness_access constants.%Destroy.impl_witness.511, element0 [concrete = constants.%Op.f19] -// CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %b1.var, %impl.elem0.loc14 -// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Op.2(constants.%tuple.type.9fb) [concrete = constants.%Op.specific_fn.d2b] -// CHECK:STDOUT: %bound_method.loc14_5.2: = bound_method %b1.var, %specific_fn.loc14 +// CHECK:STDOUT: %no_op.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15) +// CHECK:STDOUT: %Op.bound.loc14: = bound_method %b1.var, constants.%Op.f19 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.f19, @Op.2(constants.%tuple.type.9fb) [concrete = constants.%Op.specific_fn.d2b] +// CHECK:STDOUT: %bound_method.loc14: = bound_method %b1.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc14: %ptr.652 = addr_of %b1.var -// CHECK:STDOUT: %no_op.loc14: init %empty_tuple.type = call %bound_method.loc14_5.2(%addr.loc14) -// CHECK:STDOUT: %impl.elem0.loc13: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %a1.var, %impl.elem0.loc13 -// CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc13_5.2: = bound_method %a1.var, %specific_fn.loc13 +// CHECK:STDOUT: %no_op.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14) +// CHECK:STDOUT: %Op.bound.loc13: = bound_method %a1.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method.loc13: = bound_method %a1.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc13: %ptr.843 = addr_of %a1.var -// CHECK:STDOUT: %no_op.loc13: init %empty_tuple.type = call %bound_method.loc13_5.2(%addr.loc13) +// CHECK:STDOUT: %no_op.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/merging_with_indirections.carbon b/toolchain/check/testdata/namespace/merging_with_indirections.carbon index 6bae16b49175..da76c8afc600 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.carbon @@ -170,16 +170,9 @@ fn Run() { // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.272: type = pattern_type %A [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.f31: = impl_witness imports.%Destroy.impl_witness_table, @impl(%A) [concrete] // CHECK:STDOUT: %Op.type.d74: type = fn_type @Op.2, @impl(%A) [concrete] // CHECK:STDOUT: %Op.478: %Op.type.d74 = struct_value () [concrete] // CHECK:STDOUT: %ptr.07e: type = ptr_type %A [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%Destroy.impl_witness.f31) [concrete] -// CHECK:STDOUT: %.8ba: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.478, @Op.2(%A) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -206,8 +199,6 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Other.A: type = import_ref Other//a, A, loaded [concrete = constants.%A] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -252,24 +243,21 @@ fn Run() { // CHECK:STDOUT: %.loc13: ref %A = splice_block %a.ref {} // CHECK:STDOUT: %F.call.loc13: init %A = call %F.ref.loc13() to %.loc13 // CHECK:STDOUT: assign %a.ref, %F.call.loc13 -// CHECK:STDOUT: %impl.elem0.loc13: %.8ba = impl_witness_access constants.%Destroy.impl_witness.f31, element0 [concrete = constants.%Op.478] -// CHECK:STDOUT: %bound_method.loc13_3.1: = bound_method %.loc13, %impl.elem0.loc13 -// CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_3.2: = bound_method %.loc13, %specific_fn.loc13 +// CHECK:STDOUT: %Op.bound.loc13: = bound_method %.loc13, constants.%Op.478 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.478, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc13: = bound_method %.loc13, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc13: %ptr.07e = addr_of %.loc13 -// CHECK:STDOUT: %no_op.loc13: init %empty_tuple.type = call %bound_method.loc13_3.2(%addr.loc13) -// CHECK:STDOUT: %impl.elem0.loc10: %.8ba = impl_witness_access constants.%Destroy.impl_witness.f31, element0 [concrete = constants.%Op.478] -// CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %a.var, %impl.elem0.loc10 -// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %a.var, %specific_fn.loc10 +// CHECK:STDOUT: %no_op.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13) +// CHECK:STDOUT: %Op.bound.loc10: = bound_method %a.var, constants.%Op.478 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.478, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc10: %ptr.07e = addr_of %a.var -// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10_3.2(%addr.loc10) -// CHECK:STDOUT: %impl.elem0.loc7: %.8ba = impl_witness_access constants.%Destroy.impl_witness.f31, element0 [concrete = constants.%Op.478] -// CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %.loc7_11.1, %impl.elem0.loc7 -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %.loc7_11.1, %specific_fn.loc7 +// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %.loc7_11.1, constants.%Op.478 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.478, @Op.2(constants.%A) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc7: = bound_method %.loc7_11.1, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc7: %ptr.07e = addr_of %.loc7_11.1 -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_11.2(%addr.loc7) +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index 7c309e601ab3..85bb9de14b72 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -65,16 +65,9 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -91,8 +84,6 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -141,10 +132,10 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %A.var: ref %i32 = var %A.var_patt // CHECK:STDOUT: %int_0.loc26: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc26_5.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc26_5.1: = bound_method %int_0.loc26, %impl.elem0.loc26_5.1 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc26_5.1: = specific_function %impl.elem0.loc26_5.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_5.2: = bound_method %int_0.loc26, %specific_fn.loc26_5.1 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0.loc26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc26_5.1: = bound_method %int_0.loc26, %impl.elem0.loc26 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc26_5.2: = bound_method %int_0.loc26, %specific_fn.loc26 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %bound_method.loc26_5.2(%int_0.loc26) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc26_5: init %i32 = converted %int_0.loc26, %int.convert_checked.loc26 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %A.var, %.loc26_5 @@ -155,12 +146,11 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %A: ref %i32 = bind_name A, %A.var // CHECK:STDOUT: %A.ref.loc29: ref %i32 = name_ref A, %A // CHECK:STDOUT: %.loc29: %i32 = bind_value %A.ref.loc29 -// CHECK:STDOUT: %impl.elem0.loc26_5.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc26_5.3: = bound_method %A.var, %impl.elem0.loc26_5.2 -// CHECK:STDOUT: %specific_fn.loc26_5.2: = specific_function %impl.elem0.loc26_5.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_5.4: = bound_method %A.var, %specific_fn.loc26_5.2 +// CHECK:STDOUT: %Op.bound.loc26_5.1: = bound_method %A.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc26_5.3: = bound_method %A.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc26_5.1: %ptr.235 = addr_of %A.var -// CHECK:STDOUT: %no_op.loc26_5.1: init %empty_tuple.type = call %bound_method.loc26_5.4(%addr.loc26_5.1) +// CHECK:STDOUT: %no_op.loc26_5.1: init %empty_tuple.type = call %bound_method.loc26_5.3(%addr.loc26_5.1) // CHECK:STDOUT: return %.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -172,12 +162,11 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %bound_method.loc31_11.2(%int_0.loc31) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc31_11.1: %i32 = value_of_initializer %int.convert_checked.loc31 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc31_11.2: %i32 = converted %int_0.loc31, %.loc31_11.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc26_5.3: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc26_5.5: = bound_method %A.var, %impl.elem0.loc26_5.3 -// CHECK:STDOUT: %specific_fn.loc26_5.3: = specific_function %impl.elem0.loc26_5.3, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_5.6: = bound_method %A.var, %specific_fn.loc26_5.3 +// CHECK:STDOUT: %Op.bound.loc26_5.2: = bound_method %A.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc26_5.4: = bound_method %A.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc26_5.2: %ptr.235 = addr_of %A.var -// CHECK:STDOUT: %no_op.loc26_5.2: init %empty_tuple.type = call %bound_method.loc26_5.6(%addr.loc26_5.2) +// CHECK:STDOUT: %no_op.loc26_5.2: init %empty_tuple.type = call %bound_method.loc26_5.4(%addr.loc26_5.2) // CHECK:STDOUT: return %.loc31_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index 300300276307..2d1f2f27cf1a 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -50,23 +50,13 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet.926: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.926 [concrete] // CHECK:STDOUT: %Op.specific_fn.393: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.862: = impl_witness imports.%Destroy.impl_witness_table, @impl(bool) [concrete] // CHECK:STDOUT: %Op.type.655: type = fn_type @Op.2, @impl(bool) [concrete] // CHECK:STDOUT: %Op.8b7: %Op.type.655 = struct_value () [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] -// CHECK:STDOUT: %Destroy.facet.2aa: %Destroy.type = facet_value bool, (%Destroy.impl_witness.862) [concrete] -// CHECK:STDOUT: %.0d4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2aa [concrete] // CHECK:STDOUT: %Op.specific_fn.c3f: = specific_function %Op.8b7, @Op.2(bool) [concrete] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [concrete] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [concrete] @@ -81,8 +71,6 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -337,30 +325,26 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc26_7: // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %impl.elem0.loc26: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc26_3.1: = bound_method %d.var, %impl.elem0.loc26 -// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc26_3.2: = bound_method %d.var, %specific_fn.loc26 +// CHECK:STDOUT: %Op.bound.loc26: = bound_method %d.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method.loc26: = bound_method %d.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc26: %ptr.843 = addr_of %d.var -// CHECK:STDOUT: %no_op.loc26: init %empty_tuple.type = call %bound_method.loc26_3.2(%addr.loc26) -// CHECK:STDOUT: %impl.elem0.loc25: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc25_3.1: = bound_method %c.var, %impl.elem0.loc25 -// CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc25_3.2: = bound_method %c.var, %specific_fn.loc25 +// CHECK:STDOUT: %no_op.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26) +// CHECK:STDOUT: %Op.bound.loc25: = bound_method %c.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method.loc25: = bound_method %c.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc25: %ptr.843 = addr_of %c.var -// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25_3.2(%addr.loc25) -// CHECK:STDOUT: %impl.elem0.loc24: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %b.var, %impl.elem0.loc24 -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %b.var, %specific_fn.loc24 +// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25(%addr.loc25) +// CHECK:STDOUT: %Op.bound.loc24: = bound_method %b.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method.loc24: = bound_method %b.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc24: %ptr.843 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24) -// CHECK:STDOUT: %impl.elem0.loc23: %.0d4 = impl_witness_access constants.%Destroy.impl_witness.862, element0 [concrete = constants.%Op.8b7] -// CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %a.var, %impl.elem0.loc23 -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] -// CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %a.var, %specific_fn.loc23 +// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24) +// CHECK:STDOUT: %Op.bound.loc23: = bound_method %a.var, constants.%Op.8b7 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.8b7, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %a.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc23: %ptr.bb2 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3.2(%addr.loc23) +// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -407,12 +391,11 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc30_7: // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc30_3.1: = bound_method %a.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc30_3.2: = bound_method %a.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc30_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index 249412319489..14f4b8a4dbb7 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -102,34 +102,18 @@ fn Main() { // CHECK:STDOUT: %bound_method.5ba: = bound_method %int_10.64f, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_10.265: %i32 = int_value 10 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.711: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.type.ba2: type = fn_type @Op.3, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.649: %Op.type.ba2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %ptr.235, (%Destroy.impl_witness.711) [concrete] -// CHECK:STDOUT: %.a79: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2bf [concrete] // CHECK:STDOUT: %Op.specific_fn.829: = specific_function %Op.649, @Op.3(%ptr.235) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.ad1: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: %Op.type.da3: type = fn_type @Op.3, @impl.49c(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: %Op.9db: %Op.type.da3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.807: %Destroy.type = facet_value %struct_type.a.b.501, (%Destroy.impl_witness.ad1) [concrete] -// CHECK:STDOUT: %.8e0: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.807 [concrete] // CHECK:STDOUT: %Op.specific_fn.1e0: = specific_function %Op.9db, @Op.3(%struct_type.a.b.501) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.5a7: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.d07) [concrete] // CHECK:STDOUT: %Op.type.a4a: type = fn_type @Op.3, @impl.49c(%tuple.type.d07) [concrete] // CHECK:STDOUT: %Op.7c6: %Op.type.a4a = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.167: %Destroy.type = facet_value %tuple.type.d07, (%Destroy.impl_witness.5a7) [concrete] -// CHECK:STDOUT: %.b68: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.167 [concrete] // CHECK:STDOUT: %Op.specific_fn.bbb: = specific_function %Op.7c6, @Op.3(%tuple.type.d07) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -146,8 +130,6 @@ fn Main() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -167,10 +149,10 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var %a.var_patt // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] -// CHECK:STDOUT: %impl.elem0.loc16_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_12, %impl.elem0.loc16_3.1 [concrete = constants.%Convert.bound.221] -// CHECK:STDOUT: %specific_fn.loc16_3.1: = specific_function %impl.elem0.loc16_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_12, %specific_fn.loc16_3.1 [concrete = constants.%bound_method.dae] +// CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_12, %impl.elem0.loc16 [concrete = constants.%Convert.bound.221] +// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_12, %specific_fn.loc16 [concrete = constants.%bound_method.dae] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %bound_method.loc16_3.2(%int_12) [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %.loc16_3: init %i32 = converted %int_12, %int.convert_checked.loc16 [concrete = constants.%int_12.1e1] // CHECK:STDOUT: assign %a.var, %.loc16_3 @@ -350,30 +332,26 @@ fn Main() { // CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %bound_method.loc30_29.2(%int_10) [concrete = constants.%int_10.265] // CHECK:STDOUT: %.loc30_29: init %i32 = converted %int_10, %int.convert_checked.loc30 [concrete = constants.%int_10.265] // CHECK:STDOUT: assign %.loc30_3, %.loc30_29 -// CHECK:STDOUT: %impl.elem0.loc27: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc27_3.1: = bound_method %p.var, %impl.elem0.loc27 -// CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc27_3.2: = bound_method %p.var, %specific_fn.loc27 +// CHECK:STDOUT: %Op.bound.loc27: = bound_method %p.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc27: = bound_method %p.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc27_3: %ptr.5d5 = addr_of %p.var -// CHECK:STDOUT: %no_op.loc27: init %empty_tuple.type = call %bound_method.loc27_3.2(%addr.loc27_3) -// CHECK:STDOUT: %impl.elem0.loc23_3: %.8e0 = impl_witness_access constants.%Destroy.impl_witness.ad1, element0 [concrete = constants.%Op.9db] -// CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %c.var, %impl.elem0.loc23_3 -// CHECK:STDOUT: %specific_fn.loc23_3: = specific_function %impl.elem0.loc23_3, @Op.3(constants.%struct_type.a.b.501) [concrete = constants.%Op.specific_fn.1e0] -// CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %c.var, %specific_fn.loc23_3 +// CHECK:STDOUT: %no_op.loc27: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27_3) +// CHECK:STDOUT: %Op.bound.loc23: = bound_method %c.var, constants.%Op.9db +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.9db, @Op.3(constants.%struct_type.a.b.501) [concrete = constants.%Op.specific_fn.1e0] +// CHECK:STDOUT: %bound_method.loc23_3: = bound_method %c.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc23: %ptr.3ee = addr_of %c.var -// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3.2(%addr.loc23) -// CHECK:STDOUT: %impl.elem0.loc19_3: %.b68 = impl_witness_access constants.%Destroy.impl_witness.5a7, element0 [concrete = constants.%Op.7c6] -// CHECK:STDOUT: %bound_method.loc19_3.1: = bound_method %b.var, %impl.elem0.loc19_3 -// CHECK:STDOUT: %specific_fn.loc19_3: = specific_function %impl.elem0.loc19_3, @Op.3(constants.%tuple.type.d07) [concrete = constants.%Op.specific_fn.bbb] -// CHECK:STDOUT: %bound_method.loc19_3.2: = bound_method %b.var, %specific_fn.loc19_3 +// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3(%addr.loc23) +// CHECK:STDOUT: %Op.bound.loc19: = bound_method %b.var, constants.%Op.7c6 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.7c6, @Op.3(constants.%tuple.type.d07) [concrete = constants.%Op.specific_fn.bbb] +// CHECK:STDOUT: %bound_method.loc19_3: = bound_method %b.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc19: %ptr.261 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc19: init %empty_tuple.type = call %bound_method.loc19_3.2(%addr.loc19) -// CHECK:STDOUT: %impl.elem0.loc16_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %a.var, %impl.elem0.loc16_3.2 -// CHECK:STDOUT: %specific_fn.loc16_3.2: = specific_function %impl.elem0.loc16_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc16_3.4: = bound_method %a.var, %specific_fn.loc16_3.2 +// CHECK:STDOUT: %no_op.loc19: init %empty_tuple.type = call %bound_method.loc19_3(%addr.loc19) +// CHECK:STDOUT: %Op.bound.loc16: = bound_method %a.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %a.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc16: %ptr.235 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16_3.4(%addr.loc16) +// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16_3.3(%addr.loc16) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon index 471c041a908d..1c29343bd7e1 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon @@ -170,8 +170,6 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc14_7: // CHECK:STDOUT: %b: = bind_name b, [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc14: = impl_witness_access , element0 [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc9: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -297,8 +295,6 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc16_7: // CHECK:STDOUT: %d: = bind_name d, [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc16: = impl_witness_access , element0 [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc11: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index e7387389e31e..0060230bbc99 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -119,15 +119,8 @@ fn Main() { // CHECK:STDOUT: %bound_method.5ba: = bound_method %int_10.64f, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_10.265: %i32 = int_value 10 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -144,8 +137,6 @@ fn Main() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -205,10 +196,10 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc33_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc33_3.1: = bound_method %int_0, %impl.elem0.loc33_3.1 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc33_3.1: = specific_function %impl.elem0.loc33_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %int_0, %specific_fn.loc33_3.1 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc33: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc33_3.1: = bound_method %int_0, %impl.elem0.loc33 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %int_0, %specific_fn.loc33 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %bound_method.loc33_3.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc33_3: init %i32 = converted %int_0, %int.convert_checked.loc33 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %n.var, %.loc33_3 @@ -337,18 +328,16 @@ fn Main() { // CHECK:STDOUT: %int.convert_checked.loc61: init %i32 = call %bound_method.loc61_27.2(%int_10) [concrete = constants.%int_10.265] // CHECK:STDOUT: %.loc61_27: init %i32 = converted %int_10, %int.convert_checked.loc61 [concrete = constants.%int_10.265] // CHECK:STDOUT: assign %.loc61_4, %.loc61_27 -// CHECK:STDOUT: %impl.elem0.loc56: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc56_3.1: = bound_method %a.var, %impl.elem0.loc56 -// CHECK:STDOUT: %specific_fn.loc56: = specific_function %impl.elem0.loc56, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc56_3.2: = bound_method %a.var, %specific_fn.loc56 +// CHECK:STDOUT: %Op.bound.loc56: = bound_method %a.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc56: = bound_method %a.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc56: %ptr.235 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc56: init %empty_tuple.type = call %bound_method.loc56_3.2(%addr.loc56) -// CHECK:STDOUT: %impl.elem0.loc33_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc33_3.3: = bound_method %n.var, %impl.elem0.loc33_3.2 -// CHECK:STDOUT: %specific_fn.loc33_3.2: = specific_function %impl.elem0.loc33_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc33_3.4: = bound_method %n.var, %specific_fn.loc33_3.2 +// CHECK:STDOUT: %no_op.loc56: init %empty_tuple.type = call %bound_method.loc56(%addr.loc56) +// CHECK:STDOUT: %Op.bound.loc33: = bound_method %n.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc33_3.3: = bound_method %n.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc33: %ptr.235 = addr_of %n.var -// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33_3.4(%addr.loc33) +// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33_3.3(%addr.loc33) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 74ba46bc548d..65b6b8201564 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -63,16 +63,9 @@ fn Main() { // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -89,8 +82,6 @@ fn Main() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -133,10 +124,10 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var %a.var_patt // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc18_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %int_3, %impl.elem0.loc18_3.1 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc18_3.1: = specific_function %impl.elem0.loc18_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %int_3, %specific_fn.loc18_3.1 [concrete = constants.%bound_method.047] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound.b30] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc18_3.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc18_3: init %i32 = converted %int_3, %int.convert_checked [concrete = constants.%int_3.822] // CHECK:STDOUT: assign %a.var, %.loc18_3 @@ -155,12 +146,11 @@ fn Main() { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref() // CHECK:STDOUT: assign %a.ref.loc28_3, %F.call -// CHECK:STDOUT: %impl.elem0.loc18_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc18_3.3: = bound_method %a.var, %impl.elem0.loc18_3.2 -// CHECK:STDOUT: %specific_fn.loc18_3.2: = specific_function %impl.elem0.loc18_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_3.4: = bound_method %a.var, %specific_fn.loc18_3.2 +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_3.3: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_3.4(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_3.3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index 33d8b9163c1f..0565131fdbaf 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -34,17 +34,10 @@ fn Main() { // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.862: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(bool) [concrete] // CHECK:STDOUT: %Op.type.655: type = fn_type @Op.2, @impl.49c(bool) [concrete] // CHECK:STDOUT: %Op.8b7: %Op.type.655 = struct_value () [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value bool, (%Destroy.impl_witness.862) [concrete] -// CHECK:STDOUT: %.0d4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.8b7, @Op.2(bool) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -59,8 +52,6 @@ fn Main() { // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -89,12 +80,11 @@ fn Main() { // CHECK:STDOUT: %.loc22_10.3: type = converted %bool.make_type, %.loc22_10.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref bool = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0: %.0d4 = impl_witness_access constants.%Destroy.impl_witness.862, element0 [concrete = constants.%Op.8b7] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(bool) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.8b7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.8b7, @Op.2(bool) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.bb2 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 66ff64698772..19241b189331 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -54,16 +54,9 @@ fn Main() { // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %float: f64 = float_literal 5.6000000000000005 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,8 +73,6 @@ fn Main() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -101,10 +92,10 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var %a.var_patt // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc16_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_3, %impl.elem0.loc16_3.1 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc16_3.1: = specific_function %impl.elem0.loc16_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_3, %specific_fn.loc16_3.1 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_3.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc16_3: init %i32 = converted %int_3, %int.convert_checked [concrete = constants.%int_3.822] // CHECK:STDOUT: assign %a.var, %.loc16_3 @@ -117,12 +108,11 @@ fn Main() { // CHECK:STDOUT: %float: f64 = float_literal 5.6000000000000005 [concrete = constants.%float] // CHECK:STDOUT: %.loc24: %i32 = converted %float, [concrete = ] // CHECK:STDOUT: assign %a.ref, -// CHECK:STDOUT: %impl.elem0.loc16_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %a.var, %impl.elem0.loc16_3.2 -// CHECK:STDOUT: %specific_fn.loc16_3.2: = specific_function %impl.elem0.loc16_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3.4: = bound_method %a.var, %specific_fn.loc16_3.2 +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_3.4(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_3.3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index 17b56fdcf08f..87b1e6cec2d5 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -49,23 +49,13 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet.926: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.926 [concrete] // CHECK:STDOUT: %Op.specific_fn.393: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.862: = impl_witness imports.%Destroy.impl_witness_table, @impl(bool) [concrete] // CHECK:STDOUT: %Op.type.655: type = fn_type @Op.2, @impl(bool) [concrete] // CHECK:STDOUT: %Op.8b7: %Op.type.655 = struct_value () [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] -// CHECK:STDOUT: %Destroy.facet.2aa: %Destroy.type = facet_value bool, (%Destroy.impl_witness.862) [concrete] -// CHECK:STDOUT: %.0d4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2aa [concrete] // CHECK:STDOUT: %Op.specific_fn.c3f: = specific_function %Op.8b7, @Op.2(bool) [concrete] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [concrete] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [concrete] @@ -80,8 +70,6 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -337,30 +325,26 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc25_7: // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %impl.elem0.loc25: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc25_3.1: = bound_method %d.var, %impl.elem0.loc25 -// CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc25_3.2: = bound_method %d.var, %specific_fn.loc25 +// CHECK:STDOUT: %Op.bound.loc25: = bound_method %d.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method.loc25: = bound_method %d.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc25: %ptr.843 = addr_of %d.var -// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25_3.2(%addr.loc25) -// CHECK:STDOUT: %impl.elem0.loc24: %.0d4 = impl_witness_access constants.%Destroy.impl_witness.862, element0 [concrete = constants.%Op.8b7] -// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %c.var, %impl.elem0.loc24 -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] -// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %c.var, %specific_fn.loc24 +// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25(%addr.loc25) +// CHECK:STDOUT: %Op.bound.loc24: = bound_method %c.var, constants.%Op.8b7 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.8b7, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] +// CHECK:STDOUT: %bound_method.loc24: = bound_method %c.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc24: %ptr.bb2 = addr_of %c.var -// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24) -// CHECK:STDOUT: %impl.elem0.loc23: %.0d4 = impl_witness_access constants.%Destroy.impl_witness.862, element0 [concrete = constants.%Op.8b7] -// CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %b.var, %impl.elem0.loc23 -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] -// CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %b.var, %specific_fn.loc23 +// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24) +// CHECK:STDOUT: %Op.bound.loc23: = bound_method %b.var, constants.%Op.8b7 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.8b7, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %b.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc23: %ptr.bb2 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3.2(%addr.loc23) -// CHECK:STDOUT: %impl.elem0.loc22: %.0d4 = impl_witness_access constants.%Destroy.impl_witness.862, element0 [concrete = constants.%Op.8b7] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %a.var, %impl.elem0.loc22 -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %a.var, %specific_fn.loc22 +// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23) +// CHECK:STDOUT: %Op.bound.loc22: = bound_method %a.var, constants.%Op.8b7 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.8b7, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] +// CHECK:STDOUT: %bound_method.loc22: = bound_method %a.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc22: %ptr.bb2 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22) +// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -406,12 +390,11 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !.loc29_7: // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %impl.elem0: %.0d4 = impl_witness_access constants.%Destroy.impl_witness.862, element0 [concrete = constants.%Op.8b7] -// CHECK:STDOUT: %bound_method.loc29_3.1: = bound_method %a.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] -// CHECK:STDOUT: %bound_method.loc29_3.2: = bound_method %a.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.8b7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.8b7, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.bb2 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc29_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index 40c003c48065..14e61a81f63b 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -39,23 +39,13 @@ fn Constant() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.862: = impl_witness imports.%Destroy.impl_witness_table, @impl(bool) [concrete] // CHECK:STDOUT: %Op.type.655: type = fn_type @Op.2, @impl(bool) [concrete] // CHECK:STDOUT: %Op.8b7: %Op.type.655 = struct_value () [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] -// CHECK:STDOUT: %Destroy.facet.2aa: %Destroy.type = facet_value bool, (%Destroy.impl_witness.862) [concrete] -// CHECK:STDOUT: %.0d4: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2aa [concrete] // CHECK:STDOUT: %Op.specific_fn.c3f: = specific_function %Op.8b7, @Op.2(bool) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet.926: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.926 [concrete] // CHECK:STDOUT: %Op.specific_fn.393: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -68,8 +58,6 @@ fn Constant() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -194,18 +182,16 @@ fn Constant() { // CHECK:STDOUT: // CHECK:STDOUT: !.loc23_7: // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var -// CHECK:STDOUT: %impl.elem0.loc23: %.0d4 = impl_witness_access constants.%Destroy.impl_witness.862, element0 [concrete = constants.%Op.8b7] -// CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %b.var, %impl.elem0.loc23 -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] -// CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %b.var, %specific_fn.loc23 +// CHECK:STDOUT: %Op.bound.loc23: = bound_method %b.var, constants.%Op.8b7 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.8b7, @Op.2(bool) [concrete = constants.%Op.specific_fn.c3f] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %b.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc23: %ptr.bb2 = addr_of %b.var -// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3.2(%addr.loc23) -// CHECK:STDOUT: %impl.elem0.loc22: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %a.var, %impl.elem0.loc22 -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %a.var, %specific_fn.loc22 +// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23) +// CHECK:STDOUT: %Op.bound.loc22: = bound_method %a.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method.loc22: = bound_method %a.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc22: %ptr.843 = addr_of %a.var -// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22) +// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 249dc3ec8d80..81345790ad08 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -50,8 +50,8 @@ fn TestOp() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %impl.elem0.loc27: %.859 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Op.cf9] -// CHECK:STDOUT: %bound_method.loc27: = bound_method %c.ref, %impl.elem0.loc27 +// CHECK:STDOUT: %impl.elem0: %.859 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Op.cf9] +// CHECK:STDOUT: %bound_method.loc27: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %addr.loc27: %ptr.019 = addr_of %c.ref // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index b87b5519e8ad..16687fea929d 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -73,15 +73,8 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [concrete] // CHECK:STDOUT: %.bc7: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.10 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.11, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.11, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.11(%C) [concrete] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [concrete] // CHECK:STDOUT: %TestAddAssignNonRef: %TestAddAssignNonRef.type = struct_value () [concrete] @@ -99,8 +92,6 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] // CHECK:STDOUT: %Core.AddAssignWith: %AddAssignWith.type.fc6 = import_ref Core//prelude/operators/arithmetic, AddAssignWith, loaded [concrete = constants.%AddAssignWith.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -212,17 +203,16 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: fn @TestIncNonRef(%a.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc33_3: %.bc7 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Op.0c9] -// CHECK:STDOUT: %bound_method.loc33_3: = bound_method %a.ref, %impl.elem0.loc33_3 +// CHECK:STDOUT: %impl.elem0: %.bc7 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Op.0c9] +// CHECK:STDOUT: %bound_method.loc33_3: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc33: ref %C = temporary_storage // CHECK:STDOUT: %addr.loc33_5.1: %ptr.019 = addr_of %.loc33 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method.loc33_3(%addr.loc33_5.1) -// CHECK:STDOUT: %impl.elem0.loc33_5: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc33_5.1: = bound_method %.loc33, %impl.elem0.loc33_5 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc33_5, @Op.11(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc33_5.2: = bound_method %.loc33, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc33, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.11(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc33_5: = bound_method %.loc33, %Op.specific_fn // CHECK:STDOUT: %addr.loc33_5.2: %ptr.019 = addr_of %.loc33 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc33_5.2(%addr.loc33_5.2) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc33_5(%addr.loc33_5.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -230,17 +220,16 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc44_5: %.e2d = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%Op.572] -// CHECK:STDOUT: %bound_method.loc44_5: = bound_method %a.ref, %impl.elem0.loc44_5 +// CHECK:STDOUT: %impl.elem0: %.e2d = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%Op.572] +// CHECK:STDOUT: %bound_method.loc44_5: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc44: ref %C = temporary_storage // CHECK:STDOUT: %addr.loc44_3.1: %ptr.019 = addr_of %.loc44 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method.loc44_5(%addr.loc44_3.1, %b.ref) -// CHECK:STDOUT: %impl.elem0.loc44_3: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc44_3.1: = bound_method %.loc44, %impl.elem0.loc44_3 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc44_3, @Op.11(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc44_3.2: = bound_method %.loc44, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc44, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.11(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc44_3: = bound_method %.loc44, %Op.specific_fn // CHECK:STDOUT: %addr.loc44_3.2: %ptr.019 = addr_of %.loc44 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc44_3.2(%addr.loc44_3.2) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc44_3(%addr.loc44_3.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index 840bb51acb28..1d57e0c5468d 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -67,16 +67,9 @@ fn TestRef(b: C) { // CHECK:STDOUT: %AddAssignWith.generic: %AddAssignWith.type.fc6 = struct_value () [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.9 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.10, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.906: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.type.153: type = fn_type @Op.10, @impl.49c(%C) [concrete] // CHECK:STDOUT: %Op.5d7: %Op.type.153 = struct_value () [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.impl_witness.906) [concrete] -// CHECK:STDOUT: %.b80: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.5d7, @Op.10(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -95,8 +88,6 @@ fn TestRef(b: C) { // CHECK:STDOUT: %Core.AddAssignWith: %AddAssignWith.type.fc6 = import_ref Core//prelude/operators/arithmetic, AddAssignWith, loaded [concrete = constants.%AddAssignWith.generic] // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -188,12 +179,11 @@ fn TestRef(b: C) { // CHECK:STDOUT: %a.ref.loc40: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b // CHECK:STDOUT: %a.ref.loc45: ref %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.b80 = impl_witness_access constants.%Destroy.impl_witness.906, element0 [concrete = constants.%Op.5d7] -// CHECK:STDOUT: %bound_method.loc35_3.1: = bound_method %a.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.10(constants.%C) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc35_3.2: = bound_method %a.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %a.var, constants.%Op.5d7 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.5d7, @Op.10(constants.%C) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %a.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.019 = addr_of %a.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc35_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index c37a334ee1ab..2d8cbf4d54d8 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -83,15 +83,9 @@ fn Test() { // CHECK:STDOUT: %Source.specific_fn.cc7: = specific_function %Source, @Source(%i32) [concrete] // CHECK:STDOUT: %.9b4: type = fn_type_with_self_type %Convert.type.665, %ImplicitAs.facet.d80 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.599: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%X) [concrete] // CHECK:STDOUT: %Op.type.9e1: type = fn_type @Op.3, @impl.49c(%X) [concrete] // CHECK:STDOUT: %Op.33a: %Op.type.9e1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d17: type = ptr_type %X [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%Destroy.impl_witness.599) [concrete] -// CHECK:STDOUT: %.bfc: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.33a, @Op.3(%X) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,8 +100,6 @@ fn Test() { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -284,8 +276,8 @@ fn Test() { // CHECK:STDOUT: %Source.specific_fn.loc34: = specific_function %Source.ref.loc34, @Source(constants.%X) [concrete = constants.%Source.specific_fn.363] // CHECK:STDOUT: %.loc34_20.1: ref %X = temporary_storage // CHECK:STDOUT: %Source.call.loc34: init %X = call %Source.specific_fn.loc34() to %.loc34_20.1 -// CHECK:STDOUT: %impl.elem0.loc34_20.1: %.2ea = impl_witness_access constants.%ImplicitAs.impl_witness.b30, element0 [concrete = constants.%Convert.c7a] -// CHECK:STDOUT: %bound_method.loc34_20.1: = bound_method %Source.call.loc34, %impl.elem0.loc34_20.1 +// CHECK:STDOUT: %impl.elem0.loc34: %.2ea = impl_witness_access constants.%ImplicitAs.impl_witness.b30, element0 [concrete = constants.%Convert.c7a] +// CHECK:STDOUT: %bound_method.loc34_20.1: = bound_method %Source.call.loc34, %impl.elem0.loc34 // CHECK:STDOUT: %.loc34_20.2: ref %X = temporary %.loc34_20.1, %Source.call.loc34 // CHECK:STDOUT: %.loc34_20.3: %X = bind_value %.loc34_20.2 // CHECK:STDOUT: %Convert.call.loc34: init %i32 = call %bound_method.loc34_20.1(%.loc34_20.3) @@ -298,8 +290,8 @@ fn Test() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Source.specific_fn.loc35: = specific_function %Source.ref.loc35, @Source(constants.%i32) [concrete = constants.%Source.specific_fn.cc7] // CHECK:STDOUT: %Source.call.loc35: init %i32 = call %Source.specific_fn.loc35() -// CHECK:STDOUT: %impl.elem0.loc35_20.1: %.9b4 = impl_witness_access constants.%ImplicitAs.impl_witness.aa3, element0 [concrete = constants.%Convert.08a] -// CHECK:STDOUT: %bound_method.loc35_20.1: = bound_method %Source.call.loc35, %impl.elem0.loc35_20.1 +// CHECK:STDOUT: %impl.elem0.loc35: %.9b4 = impl_witness_access constants.%ImplicitAs.impl_witness.aa3, element0 [concrete = constants.%Convert.08a] +// CHECK:STDOUT: %bound_method.loc35_20.1: = bound_method %Source.call.loc35, %impl.elem0.loc35 // CHECK:STDOUT: %.loc35_20.1: ref %X = temporary_storage // CHECK:STDOUT: %.loc35_20.2: %i32 = value_of_initializer %Source.call.loc35 // CHECK:STDOUT: %.loc35_20.3: %i32 = converted %Source.call.loc35, %.loc35_20.2 @@ -308,18 +300,16 @@ fn Test() { // CHECK:STDOUT: %.loc35_20.5: ref %X = temporary %.loc35_20.1, %.loc35_20.4 // CHECK:STDOUT: %.loc35_20.6: %X = bind_value %.loc35_20.5 // CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc35_20.6) -// CHECK:STDOUT: %impl.elem0.loc35_20.2: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc35_20.2: = bound_method %.loc35_20.1, %impl.elem0.loc35_20.2 -// CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35_20.2, @Op.3(constants.%X) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc35_20.3: = bound_method %.loc35_20.1, %specific_fn.loc35 +// CHECK:STDOUT: %Op.bound.loc35: = bound_method %.loc35_20.1, constants.%Op.33a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.33a, @Op.3(constants.%X) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc35_20.2: = bound_method %.loc35_20.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc35: %ptr.d17 = addr_of %.loc35_20.1 -// CHECK:STDOUT: %no_op.loc35: init %empty_tuple.type = call %bound_method.loc35_20.3(%addr.loc35) -// CHECK:STDOUT: %impl.elem0.loc34_20.2: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc34_20.2: = bound_method %.loc34_20.1, %impl.elem0.loc34_20.2 -// CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34_20.2, @Op.3(constants.%X) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc34_20.3: = bound_method %.loc34_20.1, %specific_fn.loc34 +// CHECK:STDOUT: %no_op.loc35: init %empty_tuple.type = call %bound_method.loc35_20.2(%addr.loc35) +// CHECK:STDOUT: %Op.bound.loc34: = bound_method %.loc34_20.1, constants.%Op.33a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.33a, @Op.3(constants.%X) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc34_20.2: = bound_method %.loc34_20.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc34: %ptr.d17 = addr_of %.loc34_20.1 -// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34_20.3(%addr.loc34) +// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34_20.2(%addr.loc34) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index d733adffff7e..b13c490d9d67 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -50,8 +50,8 @@ fn TestOp() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %impl.elem0.loc27: %.bc7 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Op.0c9] -// CHECK:STDOUT: %bound_method.loc27: = bound_method %c.ref, %impl.elem0.loc27 +// CHECK:STDOUT: %impl.elem0: %.bc7 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Op.0c9] +// CHECK:STDOUT: %bound_method.loc27: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %addr.loc27: %ptr.019 = addr_of %c.ref // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/package_expr/fail_not_found.carbon b/toolchain/check/testdata/package_expr/fail_not_found.carbon index 7775eee0469e..d868ca1cf723 100644 --- a/toolchain/check/testdata/package_expr/fail_not_found.carbon +++ b/toolchain/check/testdata/package_expr/fail_not_found.carbon @@ -32,16 +32,9 @@ fn Main() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -54,8 +47,6 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,12 +74,11 @@ fn Main() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var -// CHECK:STDOUT: %impl.elem0: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %y.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %y.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %y.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %y.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %y.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index f993d3ac3fd9..1c76734e517e 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -164,16 +164,9 @@ fn Main() { // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -190,8 +183,6 @@ fn Main() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -222,10 +213,10 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %i32 = var %x.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc7_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0.loc7_3.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc7_3.1: = specific_function %impl.elem0.loc7_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn.loc7_3.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign %x.var, %.loc7_3 @@ -248,18 +239,16 @@ fn Main() { // CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var -// CHECK:STDOUT: %impl.elem0.loc9: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %y.var, %impl.elem0.loc9 -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %y.var, %specific_fn.loc9 +// CHECK:STDOUT: %Op.bound.loc9: = bound_method %y.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc9: = bound_method %y.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9: %ptr.235 = addr_of %y.var -// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr.loc9) -// CHECK:STDOUT: %impl.elem0.loc7_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc7_3.3: = bound_method %x.var, %impl.elem0.loc7_3.2 -// CHECK:STDOUT: %specific_fn.loc7_3.2: = specific_function %impl.elem0.loc7_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.4: = bound_method %x.var, %specific_fn.loc7_3.2 +// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9) +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %x.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc7_3.3: = bound_method %x.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7: %ptr.235 = addr_of %x.var -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.4(%addr.loc7) +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.3(%addr.loc7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/patterns/underscore.carbon b/toolchain/check/testdata/patterns/underscore.carbon index ec45ac51f0b0..19076e7391f9 100644 --- a/toolchain/check/testdata/patterns/underscore.carbon +++ b/toolchain/check/testdata/patterns/underscore.carbon @@ -131,16 +131,9 @@ fn F() -> {} { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.eb8: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.type.069: type = fn_type @Op.2, @impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %Op.d5a: %Op.type.069 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_struct_type, (%Destroy.impl_witness.eb8) [concrete] -// CHECK:STDOUT: %.9da: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.d5a, @Op.2(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -151,8 +144,6 @@ fn F() -> {} { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -211,12 +202,11 @@ fn F() -> {} { // CHECK:STDOUT: %.loc9_11.3: type = converted %.loc9_11.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %_.loc9: ref %empty_struct_type = bind_name _, %_.var -// CHECK:STDOUT: %impl.elem0: %.9da = impl_witness_access constants.%Destroy.impl_witness.eb8, element0 [concrete = constants.%Op.d5a] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %_.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %_.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %_.var, constants.%Op.d5a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.d5a, @Op.2(constants.%empty_struct_type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %_.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.c28 = addr_of %_.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index 8514094b0909..c0bfdfae4edf 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -47,15 +47,8 @@ fn F() -> i32 { // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -72,8 +65,6 @@ fn F() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -101,10 +92,10 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc16_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_0, %impl.elem0.loc16_3.1 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc16_3.1: = specific_function %impl.elem0.loc16_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_0, %specific_fn.loc16_3.1 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_3.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_3: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %n.var, %.loc16_3 @@ -119,12 +110,11 @@ fn F() -> i32 { // CHECK:STDOUT: %addr.loc17_11: %ptr.235 = addr_of %.loc17_12 // CHECK:STDOUT: %.loc17_10.1: ref %i32 = deref %addr.loc17_11 // CHECK:STDOUT: %.loc17_10.2: %i32 = bind_value %.loc17_10.1 -// CHECK:STDOUT: %impl.elem0.loc16_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %n.var, %impl.elem0.loc16_3.2 -// CHECK:STDOUT: %specific_fn.loc16_3.2: = specific_function %impl.elem0.loc16_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3.4: = bound_method %n.var, %specific_fn.loc16_3.2 +// CHECK:STDOUT: %Op.bound: = bound_method %n.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %n.var, %Op.specific_fn // CHECK:STDOUT: %addr.loc16: %ptr.235 = addr_of %n.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_3.4(%addr.loc16) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_3.3(%addr.loc16) // CHECK:STDOUT: return %.loc17_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 044d1d079a60..c76c376e135f 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -71,35 +71,19 @@ fn F() { // CHECK:STDOUT: %tuple: %tuple.type.d07 = tuple_value (%int_1.5d2, %int_2.ef8) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.711: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.type.ba2: type = fn_type @Op.3, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.649: %Op.type.ba2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %ptr.235, (%Destroy.impl_witness.711) [concrete] -// CHECK:STDOUT: %.a79: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2bf [concrete] // CHECK:STDOUT: %Op.specific_fn.829: = specific_function %Op.649, @Op.3(%ptr.235) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.5a7: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.d07) [concrete] // CHECK:STDOUT: %Op.type.a4a: type = fn_type @Op.3, @impl.49c(%tuple.type.d07) [concrete] // CHECK:STDOUT: %Op.7c6: %Op.type.a4a = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.167: %Destroy.type = facet_value %tuple.type.d07, (%Destroy.impl_witness.5a7) [concrete] -// CHECK:STDOUT: %.b68: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.167 [concrete] // CHECK:STDOUT: %Op.specific_fn.bbb: = specific_function %Op.7c6, @Op.3(%tuple.type.d07) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.ff6: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.3ee) [concrete] // CHECK:STDOUT: %Op.type.757: type = fn_type @Op.3, @impl.49c(%ptr.3ee) [concrete] // CHECK:STDOUT: %Op.e22: %Op.type.757 = struct_value () [concrete] // CHECK:STDOUT: %ptr.40c: type = ptr_type %ptr.3ee [concrete] -// CHECK:STDOUT: %Destroy.facet.ed3: %Destroy.type = facet_value %ptr.3ee, (%Destroy.impl_witness.ff6) [concrete] -// CHECK:STDOUT: %.f93: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.ed3 [concrete] // CHECK:STDOUT: %Op.specific_fn.ce1: = specific_function %Op.e22, @Op.3(%ptr.3ee) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.ad1: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: %Op.type.da3: type = fn_type @Op.3, @impl.49c(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: %Op.9db: %Op.type.da3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.807: %Destroy.type = facet_value %struct_type.a.b.501, (%Destroy.impl_witness.ad1) [concrete] -// CHECK:STDOUT: %.8e0: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.807 [concrete] // CHECK:STDOUT: %Op.specific_fn.1e0: = specific_function %Op.9db, @Op.3(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -116,8 +100,6 @@ fn F() { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -281,48 +263,41 @@ fn F() { // CHECK:STDOUT: %ptr.loc24: type = ptr_type %i32.loc24 [concrete = constants.%ptr.235] // CHECK:STDOUT: } // CHECK:STDOUT: %t1: ref %ptr.235 = bind_name t1, %t1.var -// CHECK:STDOUT: %impl.elem0.loc24: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %t1.var, %impl.elem0.loc24 -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %t1.var, %specific_fn.loc24 +// CHECK:STDOUT: %Op.bound.loc24: = bound_method %t1.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc24: = bound_method %t1.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc24_3: %ptr.5d5 = addr_of %t1.var -// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24_3) -// CHECK:STDOUT: %impl.elem0.loc23: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %t0.var, %impl.elem0.loc23 -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %t0.var, %specific_fn.loc23 +// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24_3) +// CHECK:STDOUT: %Op.bound.loc23: = bound_method %t0.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc23: = bound_method %t0.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc23_3: %ptr.5d5 = addr_of %t0.var -// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23_3.2(%addr.loc23_3) -// CHECK:STDOUT: %impl.elem0.loc22_3: %.b68 = impl_witness_access constants.%Destroy.impl_witness.5a7, element0 [concrete = constants.%Op.7c6] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %t.var, %impl.elem0.loc22_3 -// CHECK:STDOUT: %specific_fn.loc22_3: = specific_function %impl.elem0.loc22_3, @Op.3(constants.%tuple.type.d07) [concrete = constants.%Op.specific_fn.bbb] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %t.var, %specific_fn.loc22_3 +// CHECK:STDOUT: %no_op.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23_3) +// CHECK:STDOUT: %Op.bound.loc22: = bound_method %t.var, constants.%Op.7c6 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.7c6, @Op.3(constants.%tuple.type.d07) [concrete = constants.%Op.specific_fn.bbb] +// CHECK:STDOUT: %bound_method.loc22_3: = bound_method %t.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc22: %ptr.261 = addr_of %t.var -// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22) -// CHECK:STDOUT: %impl.elem0.loc20: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc20_3.1: = bound_method %r.var, %impl.elem0.loc20 -// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc20_3.2: = bound_method %r.var, %specific_fn.loc20 +// CHECK:STDOUT: %no_op.loc22: init %empty_tuple.type = call %bound_method.loc22_3(%addr.loc22) +// CHECK:STDOUT: %Op.bound.loc20: = bound_method %r.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc20: = bound_method %r.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc20_3: %ptr.5d5 = addr_of %r.var -// CHECK:STDOUT: %no_op.loc20: init %empty_tuple.type = call %bound_method.loc20_3.2(%addr.loc20_3) -// CHECK:STDOUT: %impl.elem0.loc19: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc19_3.1: = bound_method %q.var, %impl.elem0.loc19 -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc19_3.2: = bound_method %q.var, %specific_fn.loc19 +// CHECK:STDOUT: %no_op.loc20: init %empty_tuple.type = call %bound_method.loc20(%addr.loc20_3) +// CHECK:STDOUT: %Op.bound.loc19: = bound_method %q.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.5: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc19: = bound_method %q.var, %Op.specific_fn.5 // CHECK:STDOUT: %addr.loc19_3: %ptr.5d5 = addr_of %q.var -// CHECK:STDOUT: %no_op.loc19: init %empty_tuple.type = call %bound_method.loc19_3.2(%addr.loc19_3) -// CHECK:STDOUT: %impl.elem0.loc18: %.f93 = impl_witness_access constants.%Destroy.impl_witness.ff6, element0 [concrete = constants.%Op.e22] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %p.var, %impl.elem0.loc18 -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Op.3(constants.%ptr.3ee) [concrete = constants.%Op.specific_fn.ce1] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %p.var, %specific_fn.loc18 +// CHECK:STDOUT: %no_op.loc19: init %empty_tuple.type = call %bound_method.loc19(%addr.loc19_3) +// CHECK:STDOUT: %Op.bound.loc18: = bound_method %p.var, constants.%Op.e22 +// CHECK:STDOUT: %Op.specific_fn.6: = specific_function constants.%Op.e22, @Op.3(constants.%ptr.3ee) [concrete = constants.%Op.specific_fn.ce1] +// CHECK:STDOUT: %bound_method.loc18: = bound_method %p.var, %Op.specific_fn.6 // CHECK:STDOUT: %addr.loc18_3: %ptr.40c = addr_of %p.var -// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18_3.2(%addr.loc18_3) -// CHECK:STDOUT: %impl.elem0.loc16_3: %.8e0 = impl_witness_access constants.%Destroy.impl_witness.ad1, element0 [concrete = constants.%Op.9db] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %s.var, %impl.elem0.loc16_3 -// CHECK:STDOUT: %specific_fn.loc16_3: = specific_function %impl.elem0.loc16_3, @Op.3(constants.%struct_type.a.b.501) [concrete = constants.%Op.specific_fn.1e0] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %s.var, %specific_fn.loc16_3 +// CHECK:STDOUT: %no_op.loc18: init %empty_tuple.type = call %bound_method.loc18(%addr.loc18_3) +// CHECK:STDOUT: %Op.bound.loc16: = bound_method %s.var, constants.%Op.9db +// CHECK:STDOUT: %Op.specific_fn.7: = specific_function constants.%Op.9db, @Op.3(constants.%struct_type.a.b.501) [concrete = constants.%Op.specific_fn.1e0] +// CHECK:STDOUT: %bound_method.loc16_3: = bound_method %s.var, %Op.specific_fn.7 // CHECK:STDOUT: %addr.loc16: %ptr.3ee = addr_of %s.var -// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16_3.2(%addr.loc16) +// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16_3(%addr.loc16) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index ab240889f0f0..cc8aa8f1dc52 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -50,22 +50,12 @@ fn F() -> i32 { // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.711: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.type.ba2: type = fn_type @Op.3, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.649: %Op.type.ba2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %ptr.235, (%Destroy.impl_witness.711) [concrete] -// CHECK:STDOUT: %.a79: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2bf [concrete] // CHECK:STDOUT: %Op.specific_fn.829: = specific_function %Op.649, @Op.3(%ptr.235) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.5f7: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.5f7 [concrete] // CHECK:STDOUT: %Op.specific_fn.014: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -82,8 +72,6 @@ fn F() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -111,10 +99,10 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc16_3.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_0, %impl.elem0.loc16_3.1 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc16_3.1: = specific_function %impl.elem0.loc16_3.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_0, %specific_fn.loc16_3.1 [concrete = constants.%bound_method] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_3.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_3: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %n.var, %.loc16_3 @@ -141,18 +129,16 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc19_11: %ptr.235 = bind_value %p.ref // CHECK:STDOUT: %.loc19_10.1: ref %i32 = deref %.loc19_11 // CHECK:STDOUT: %.loc19_10.2: %i32 = bind_value %.loc19_10.1 -// CHECK:STDOUT: %impl.elem0.loc17: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc17_3.1: = bound_method %p.var, %impl.elem0.loc17 -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc17_3.2: = bound_method %p.var, %specific_fn.loc17 +// CHECK:STDOUT: %Op.bound.loc17: = bound_method %p.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.649, @Op.3(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method.loc17: = bound_method %p.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc17_3: %ptr.5d5 = addr_of %p.var -// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17_3.2(%addr.loc17_3) -// CHECK:STDOUT: %impl.elem0.loc16_3.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %n.var, %impl.elem0.loc16_3.2 -// CHECK:STDOUT: %specific_fn.loc16_3.2: = specific_function %impl.elem0.loc16_3.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] -// CHECK:STDOUT: %bound_method.loc16_3.4: = bound_method %n.var, %specific_fn.loc16_3.2 +// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17(%addr.loc17_3) +// CHECK:STDOUT: %Op.bound.loc16: = bound_method %n.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn.014] +// CHECK:STDOUT: %bound_method.loc16_3.3: = bound_method %n.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc16: %ptr.235 = addr_of %n.var -// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16_3.4(%addr.loc16) +// CHECK:STDOUT: %no_op.loc16: init %empty_tuple.type = call %bound_method.loc16_3.3(%addr.loc16) // CHECK:STDOUT: return %.loc19_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index 75e467226140..2ea85c9b3773 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -141,16 +141,9 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.6d2: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%struct_type.a.ba9) [concrete] // CHECK:STDOUT: %Op.type.c80: type = fn_type @Op.2, @impl.49c(%struct_type.a.ba9) [concrete] // CHECK:STDOUT: %Op.691: %Op.type.c80 = struct_value () [concrete] // CHECK:STDOUT: %ptr.1bb: type = ptr_type %struct_type.a.ba9 [concrete] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %struct_type.a.ba9, (%Destroy.impl_witness.6d2) [concrete] -// CHECK:STDOUT: %.a8f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.16e [concrete] // CHECK:STDOUT: %Op.specific_fn.51b: = specific_function %Op.691, @Op.2(%struct_type.a.ba9) [concrete] // CHECK:STDOUT: %AddressOfCall.type: type = fn_type @AddressOfCall [concrete] // CHECK:STDOUT: %AddressOfCall: %AddressOfCall.type = struct_value () [concrete] @@ -165,12 +158,9 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %AddressOfParam.type: type = fn_type @AddressOfParam [concrete] // CHECK:STDOUT: %AddressOfParam: %AddressOfParam.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.711: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.type.ba2: type = fn_type @Op.2, @impl.49c(%ptr.235) [concrete] // CHECK:STDOUT: %Op.649: %Op.type.ba2 = struct_value () [concrete] // CHECK:STDOUT: %ptr.5d5: type = ptr_type %ptr.235 [concrete] -// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %ptr.235, (%Destroy.impl_witness.711) [concrete] -// CHECK:STDOUT: %.a79: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.2bf [concrete] // CHECK:STDOUT: %Op.specific_fn.829: = specific_function %Op.649, @Op.2(%ptr.235) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -183,8 +173,6 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -283,12 +271,11 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %true.loc67: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %.loc67: bool = not %true.loc67 [concrete = constants.%false] // CHECK:STDOUT: %addr.loc67: %ptr.bb2 = addr_of [concrete = ] -// CHECK:STDOUT: %impl.elem0: %.a8f = impl_witness_access constants.%Destroy.impl_witness.6d2, element0 [concrete = constants.%Op.691] -// CHECK:STDOUT: %bound_method.loc62_6.1: = bound_method %.loc62_6.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%struct_type.a.ba9) [concrete = constants.%Op.specific_fn.51b] -// CHECK:STDOUT: %bound_method.loc62_6.2: = bound_method %.loc62_6.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc62_6.1, constants.%Op.691 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.691, @Op.2(constants.%struct_type.a.ba9) [concrete = constants.%Op.specific_fn.51b] +// CHECK:STDOUT: %bound_method: = bound_method %.loc62_6.1, %Op.specific_fn // CHECK:STDOUT: %addr.loc62_6: %ptr.1bb = addr_of %.loc62_6.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc62_6.2(%addr.loc62_6) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr.loc62_6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -342,12 +329,11 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %ptr: type = ptr_type %i32.loc104 [concrete = constants.%ptr.235] // CHECK:STDOUT: } // CHECK:STDOUT: %param_addr: ref %ptr.235 = bind_name param_addr, %param_addr.var -// CHECK:STDOUT: %impl.elem0: %.a79 = impl_witness_access constants.%Destroy.impl_witness.711, element0 [concrete = constants.%Op.649] -// CHECK:STDOUT: %bound_method.loc104_3.1: = bound_method %param_addr.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] -// CHECK:STDOUT: %bound_method.loc104_3.2: = bound_method %param_addr.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %param_addr.var, constants.%Op.649 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.649, @Op.2(constants.%ptr.235) [concrete = constants.%Op.specific_fn.829] +// CHECK:STDOUT: %bound_method: = bound_method %param_addr.var, %Op.specific_fn // CHECK:STDOUT: %addr.loc104_3: %ptr.5d5 = addr_of %param_addr.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc104_3.2(%addr.loc104_3) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr.loc104_3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index acf112423ad4..28ad7827ae74 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -67,16 +67,9 @@ fn G() -> C { // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [concrete] @@ -109,8 +102,6 @@ fn G() -> C { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -166,10 +157,10 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc16_12.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_12.1: = bound_method %int_0, %impl.elem0.loc16_12.1 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc16_12.1: = specific_function %impl.elem0.loc16_12.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_12.2: = bound_method %int_0, %specific_fn.loc16_12.1 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_12.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_12: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %v.var, %.loc16_12 @@ -179,12 +170,11 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc16_12.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc16_12.3: = bound_method %v.var, %impl.elem0.loc16_12.2 -// CHECK:STDOUT: %specific_fn.loc16_12.2: = specific_function %impl.elem0.loc16_12.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_12.4: = bound_method %v.var, %specific_fn.loc16_12.2 +// CHECK:STDOUT: %Op.bound: = bound_method %v.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_12.3: = bound_method %v.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %v.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_12.4(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_12.3(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon index 4e9c9800a24f..66371ef8f5c8 100644 --- a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon @@ -57,16 +57,9 @@ fn ForgotReturnType() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -77,8 +70,6 @@ fn ForgotReturnType() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -106,12 +97,11 @@ fn ForgotReturnType() { // CHECK:STDOUT: %.loc12_20.3: type = converted %.loc12_20.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %empty_tuple.type = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc12_12.1: = bound_method %v.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_12.2: = bound_method %v.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %v.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %v.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc12_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -124,16 +114,9 @@ fn ForgotReturnType() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -144,8 +127,6 @@ fn ForgotReturnType() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -173,12 +154,11 @@ fn ForgotReturnType() { // CHECK:STDOUT: %.loc12_20.3: type = converted %.loc12_20.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %empty_tuple.type = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc12_12.1: = bound_method %v.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_12.2: = bound_method %v.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %v.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %v.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc12_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index 497747a1dd9b..245b46872e55 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -78,16 +78,9 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [concrete] // CHECK:STDOUT: %DifferentScopes: %DifferentScopes.type = struct_value () [concrete] @@ -106,8 +99,6 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -149,10 +140,10 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc17_14.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_14.1: = bound_method %int_0.loc17, %impl.elem0.loc17_14.1 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc17_14.1: = specific_function %impl.elem0.loc17_14.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %int_0.loc17, %specific_fn.loc17_14.1 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc17_14.1: = bound_method %int_0.loc17, %impl.elem0.loc17 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %int_0.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_14.2(%int_0.loc17) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc17_14: init %i32 = converted %int_0.loc17, %int.convert_checked.loc17 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %v.var, %.loc17_14 @@ -167,10 +158,10 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc25_14.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc25_14.1: = bound_method %int_1, %impl.elem0.loc25_14.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc25_14.1: = specific_function %impl.elem0.loc25_14.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc25_14.2: = bound_method %int_1, %specific_fn.loc25_14.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0.loc25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc25_14.1: = bound_method %int_1, %impl.elem0.loc25 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc25_14.2: = bound_method %int_1, %specific_fn.loc25 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %bound_method.loc25_14.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc25_14: init %i32 = converted %int_1, %int.convert_checked.loc25 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign %w.var, %.loc25_14 @@ -190,18 +181,16 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %bound_method.loc27_11.2(%int_0.loc27) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc27_11.1: %i32 = value_of_initializer %int.convert_checked.loc27 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc27_11.2: %i32 = converted %int_0.loc27, %.loc27_11.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc25_14.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc25_14.3: = bound_method %w.var, %impl.elem0.loc25_14.2 -// CHECK:STDOUT: %specific_fn.loc25_14.2: = specific_function %impl.elem0.loc25_14.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc25_14.4: = bound_method %w.var, %specific_fn.loc25_14.2 +// CHECK:STDOUT: %Op.bound.loc25: = bound_method %w.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc25_14.3: = bound_method %w.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc25: %ptr.235 = addr_of %w.var -// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25_14.4(%addr.loc25) -// CHECK:STDOUT: %impl.elem0.loc17_14.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc17_14.3: = bound_method %v.var, %impl.elem0.loc17_14.2 -// CHECK:STDOUT: %specific_fn.loc17_14.2: = specific_function %impl.elem0.loc17_14.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_14.4: = bound_method %v.var, %specific_fn.loc17_14.2 +// CHECK:STDOUT: %no_op.loc25: init %empty_tuple.type = call %bound_method.loc25_14.3(%addr.loc25) +// CHECK:STDOUT: %Op.bound.loc17: = bound_method %v.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc17_14.3: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc17: %ptr.235 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17_14.4(%addr.loc17) +// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17_14.3(%addr.loc17) // CHECK:STDOUT: return %.loc27_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -217,10 +206,10 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0.loc32: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc32_14.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc32_14.1: = bound_method %int_0.loc32, %impl.elem0.loc32_14.1 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc32_14.1: = specific_function %impl.elem0.loc32_14.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc32_14.2: = bound_method %int_0.loc32, %specific_fn.loc32_14.1 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc32_14.1: = bound_method %int_0.loc32, %impl.elem0.loc32 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc32_14.2: = bound_method %int_0.loc32, %specific_fn.loc32 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %bound_method.loc32_14.2(%int_0.loc32) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc32_14: init %i32 = converted %int_0.loc32, %int.convert_checked.loc32 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %v.var, %.loc32_14 @@ -239,10 +228,10 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc41_16.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc41_16.1: = bound_method %int_1, %impl.elem0.loc41_16.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc41_16.1: = specific_function %impl.elem0.loc41_16.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc41_16.2: = bound_method %int_1, %specific_fn.loc41_16.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0.loc41: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc41_16.1: = bound_method %int_1, %impl.elem0.loc41 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc41: = specific_function %impl.elem0.loc41, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc41_16.2: = bound_method %int_1, %specific_fn.loc41 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc41: init %i32 = call %bound_method.loc41_16.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc41_16: init %i32 = converted %int_1, %int.convert_checked.loc41 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign %w.var, %.loc41_16 @@ -265,18 +254,16 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int.convert_checked.loc44: init %i32 = call %bound_method.loc44_11.2(%int_0.loc44) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc44_11.1: %i32 = value_of_initializer %int.convert_checked.loc44 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc44_11.2: %i32 = converted %int_0.loc44, %.loc44_11.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc41_16.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc41_16.3: = bound_method %w.var, %impl.elem0.loc41_16.2 -// CHECK:STDOUT: %specific_fn.loc41_16.2: = specific_function %impl.elem0.loc41_16.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc41_16.4: = bound_method %w.var, %specific_fn.loc41_16.2 +// CHECK:STDOUT: %Op.bound.loc41: = bound_method %w.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc41_16.3: = bound_method %w.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc41: %ptr.235 = addr_of %w.var -// CHECK:STDOUT: %no_op.loc41: init %empty_tuple.type = call %bound_method.loc41_16.4(%addr.loc41) -// CHECK:STDOUT: %impl.elem0.loc32_14.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc32_14.3: = bound_method %v.var, %impl.elem0.loc32_14.2 -// CHECK:STDOUT: %specific_fn.loc32_14.2: = specific_function %impl.elem0.loc32_14.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc32_14.4: = bound_method %v.var, %specific_fn.loc32_14.2 +// CHECK:STDOUT: %no_op.loc41: init %empty_tuple.type = call %bound_method.loc41_16.3(%addr.loc41) +// CHECK:STDOUT: %Op.bound.loc32: = bound_method %v.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc32_14.3: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc32: %ptr.235 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc32: init %empty_tuple.type = call %bound_method.loc32_14.4(%addr.loc32) +// CHECK:STDOUT: %no_op.loc32: init %empty_tuple.type = call %bound_method.loc32_14.3(%addr.loc32) // CHECK:STDOUT: return %.loc44_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index d19cfa322cc9..90e52bd2f8ba 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -41,16 +41,9 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %pattern_type.3de: type = pattern_type f64 [concrete] // CHECK:STDOUT: %float: f64 = float_literal 0 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.add: = impl_witness imports.%Destroy.impl_witness_table, @impl(f64) [concrete] // CHECK:STDOUT: %Op.type.3ef: type = fn_type @Op.2, @impl(f64) [concrete] // CHECK:STDOUT: %Op.868: %Op.type.3ef = struct_value () [concrete] // CHECK:STDOUT: %ptr.ef1: type = ptr_type f64 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value f64, (%Destroy.impl_witness.add) [concrete] -// CHECK:STDOUT: %.e7e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.868, @Op.2(f64) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -65,8 +58,6 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/parts/float, Float, loaded [concrete = constants.%Float] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -103,12 +94,11 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref f64 = bind_name v, %v.var // CHECK:STDOUT: %.loc23_16: f64 = bind_value %v -// CHECK:STDOUT: %impl.elem0: %.e7e = impl_witness_access constants.%Destroy.impl_witness.add, element0 [concrete = constants.%Op.868] -// CHECK:STDOUT: %bound_method.loc23_12.1: = bound_method %v.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(f64) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc23_12.2: = bound_method %v.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %v.var, constants.%Op.868 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.868, @Op.2(f64) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %v.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ef1 = addr_of %v.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc23_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc23_16 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/import_convert_function.carbon b/toolchain/check/testdata/return/import_convert_function.carbon index 966fe6a71bfc..4dcaab6b8eeb 100644 --- a/toolchain/check/testdata/return/import_convert_function.carbon +++ b/toolchain/check/testdata/return/import_convert_function.carbon @@ -95,16 +95,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Convert.type.cd0: type = fn_type @Convert.7 [concrete] // CHECK:STDOUT: %Convert.b95: %Convert.type.cd0 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.45e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%D) [concrete] // CHECK:STDOUT: %Op.type.548: type = fn_type @Op.3, @impl.49c(%D) [concrete] // CHECK:STDOUT: %Op.2d4: %Op.type.548 = struct_value () [concrete] // CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %D, (%Destroy.impl_witness.45e) [concrete] -// CHECK:STDOUT: %.64e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.2d4, @Op.3(%D) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] @@ -184,8 +177,6 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -599,12 +590,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc8: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc8 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc8_60.1: = bound_method %.loc8, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_60.2: = bound_method %.loc8, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc8, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc8, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc8 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_60.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -613,12 +603,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc9: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc9 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc9_60.1: = bound_method %.loc9, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_60.2: = bound_method %.loc9, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc9, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc9, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc9 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc9_60.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -627,12 +616,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc10: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc10 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc10_60.1: = bound_method %.loc10, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_60.2: = bound_method %.loc10, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc10, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc10, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc10 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc10_60.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -641,12 +629,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc11: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc11 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc11_60.1: = bound_method %.loc11, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_60.2: = bound_method %.loc11, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc11, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc11, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc11 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc11_60.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -655,12 +642,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc12: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc12 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc12_60.1: = bound_method %.loc12, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_60.2: = bound_method %.loc12, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc12, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc12, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc12 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc12_60.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -669,12 +655,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc13: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc13 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc13_60.1: = bound_method %.loc13, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_60.2: = bound_method %.loc13, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc13, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc13, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc13 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13_60.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -683,12 +668,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc14: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc14 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc14_60.1: = bound_method %.loc14, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_60.2: = bound_method %.loc14, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc14, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc14, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc14 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc14_60.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -697,12 +681,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc15: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc15 -// CHECK:STDOUT: %impl.elem0: %.64e = impl_witness_access constants.%Destroy.impl_witness.45e, element0 [concrete = constants.%Op.2d4] -// CHECK:STDOUT: %bound_method.loc15_60.1: = bound_method %.loc15, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_60.2: = bound_method %.loc15, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc15, constants.%Op.2d4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.2d4, @Op.3(constants.%D) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc15, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.19c = addr_of %.loc15 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc15_60.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -801,9 +784,6 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %ImplicitAs.type.5f9: type = facet_type <@ImplicitAs, @ImplicitAs(%D)> [concrete] // CHECK:STDOUT: %Convert.type.334: type = fn_type @Convert.1, @ImplicitAs(%D) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.6ba: type = fn_type @Op.2, @impl.2b5(%T) [symbolic] -// CHECK:STDOUT: %Op.f4a: %Op.type.6ba = struct_value () [symbolic] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %C.674: type = class_type @C, @C(%int_1.5d2) [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] @@ -823,20 +803,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.a9c: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.014 [concrete] // CHECK:STDOUT: %Convert.type.971: type = fn_type @Convert.7 [concrete] // CHECK:STDOUT: %Convert.bf9: %Convert.type.971 = struct_value () [concrete] -// CHECK:STDOUT: %Op.type.625: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.a3f: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%D) [concrete] // CHECK:STDOUT: %Op.type.69c: type = fn_type @Op.2, @impl.2b5(%D) [concrete] // CHECK:STDOUT: %Op.f5a: %Op.type.69c = struct_value () [concrete] // CHECK:STDOUT: %ptr.f29: type = ptr_type %D [concrete] -// CHECK:STDOUT: %Destroy.facet.2d4: %Destroy.type = facet_value %D, (%Destroy.impl_witness.a3f) [concrete] -// CHECK:STDOUT: %.d1e: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.2d4 [concrete] // CHECK:STDOUT: %Op.specific_fn.bd1: = specific_function %Op.f5a, @Op.2(%D) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.ce3: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%C.b00) [concrete] // CHECK:STDOUT: %Op.type.94c: type = fn_type @Op.2, @impl.2b5(%C.b00) [concrete] // CHECK:STDOUT: %Op.ae6: %Op.type.94c = struct_value () [concrete] // CHECK:STDOUT: %ptr.697: type = ptr_type %C.b00 [concrete] -// CHECK:STDOUT: %Destroy.facet.f7c: %Destroy.type = facet_value %C.b00, (%Destroy.impl_witness.ce3) [concrete] -// CHECK:STDOUT: %.cde: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.f7c [concrete] // CHECK:STDOUT: %Op.specific_fn.e42: = specific_function %Op.ae6, @Op.2(%C.b00) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] @@ -847,12 +820,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.7d6: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.b8a [concrete] // CHECK:STDOUT: %Convert.type.bdd: type = fn_type @Convert.8 [concrete] // CHECK:STDOUT: %Convert.c82: %Convert.type.bdd = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.af9: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%C.674) [concrete] // CHECK:STDOUT: %Op.type.b6b: type = fn_type @Op.2, @impl.2b5(%C.674) [concrete] // CHECK:STDOUT: %Op.ad8: %Op.type.b6b = struct_value () [concrete] // CHECK:STDOUT: %ptr.625: type = ptr_type %C.674 [concrete] -// CHECK:STDOUT: %Destroy.facet.b44: %Destroy.type = facet_value %C.674, (%Destroy.impl_witness.af9) [concrete] -// CHECK:STDOUT: %.42d: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.b44 [concrete] // CHECK:STDOUT: %Op.specific_fn.6b6: = specific_function %Op.ad8, @Op.2(%C.674) [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -863,12 +833,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.987: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.d55 [concrete] // CHECK:STDOUT: %Convert.type.4c1: type = fn_type @Convert.9 [concrete] // CHECK:STDOUT: %Convert.08c: %Convert.type.4c1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.3a3: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%C.681) [concrete] // CHECK:STDOUT: %Op.type.a31: type = fn_type @Op.2, @impl.2b5(%C.681) [concrete] // CHECK:STDOUT: %Op.404: %Op.type.a31 = struct_value () [concrete] // CHECK:STDOUT: %ptr.3bd: type = ptr_type %C.681 [concrete] -// CHECK:STDOUT: %Destroy.facet.1fc: %Destroy.type = facet_value %C.681, (%Destroy.impl_witness.3a3) [concrete] -// CHECK:STDOUT: %.715: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.1fc [concrete] // CHECK:STDOUT: %Op.specific_fn.822: = specific_function %Op.404, @Op.2(%C.681) [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] @@ -879,12 +846,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.efa: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.aa1 [concrete] // CHECK:STDOUT: %Convert.type.f89: type = fn_type @Convert.10 [concrete] // CHECK:STDOUT: %Convert.2dd: %Convert.type.f89 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.4d8: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%C.7ac) [concrete] // CHECK:STDOUT: %Op.type.100: type = fn_type @Op.2, @impl.2b5(%C.7ac) [concrete] // CHECK:STDOUT: %Op.9cf: %Op.type.100 = struct_value () [concrete] // CHECK:STDOUT: %ptr.2b1: type = ptr_type %C.7ac [concrete] -// CHECK:STDOUT: %Destroy.facet.8c9: %Destroy.type = facet_value %C.7ac, (%Destroy.impl_witness.4d8) [concrete] -// CHECK:STDOUT: %.f23: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.8c9 [concrete] // CHECK:STDOUT: %Op.specific_fn.694: = specific_function %Op.9cf, @Op.2(%C.7ac) [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Convert.bound.ac3: = bound_method %int_4.0c1, %Convert.956 [concrete] @@ -895,12 +859,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.26e: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.750 [concrete] // CHECK:STDOUT: %Convert.type.2ce: type = fn_type @Convert.11 [concrete] // CHECK:STDOUT: %Convert.009: %Convert.type.2ce = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.f66: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%C.89d) [concrete] // CHECK:STDOUT: %Op.type.86c: type = fn_type @Op.2, @impl.2b5(%C.89d) [concrete] // CHECK:STDOUT: %Op.6b4: %Op.type.86c = struct_value () [concrete] // CHECK:STDOUT: %ptr.c28b: type = ptr_type %C.89d [concrete] -// CHECK:STDOUT: %Destroy.facet.fe4: %Destroy.type = facet_value %C.89d, (%Destroy.impl_witness.f66) [concrete] -// CHECK:STDOUT: %.6ca: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.fe4 [concrete] // CHECK:STDOUT: %Op.specific_fn.357: = specific_function %Op.6b4, @Op.2(%C.89d) [concrete] // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] @@ -911,12 +872,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.eaf: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.8cc [concrete] // CHECK:STDOUT: %Convert.type.e9d: type = fn_type @Convert.12 [concrete] // CHECK:STDOUT: %Convert.b66: %Convert.type.e9d = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.818: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%C.f0a) [concrete] // CHECK:STDOUT: %Op.type.4df: type = fn_type @Op.2, @impl.2b5(%C.f0a) [concrete] // CHECK:STDOUT: %Op.985: %Op.type.4df = struct_value () [concrete] // CHECK:STDOUT: %ptr.24c: type = ptr_type %C.f0a [concrete] -// CHECK:STDOUT: %Destroy.facet.7eb: %Destroy.type = facet_value %C.f0a, (%Destroy.impl_witness.818) [concrete] -// CHECK:STDOUT: %.89c: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.7eb [concrete] // CHECK:STDOUT: %Op.specific_fn.a66: = specific_function %Op.985, @Op.2(%C.f0a) [concrete] // CHECK:STDOUT: %int_6.462: Core.IntLiteral = int_value 6 [concrete] // CHECK:STDOUT: %Convert.bound.ce9: = bound_method %int_6.462, %Convert.956 [concrete] @@ -927,12 +885,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.874: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.a69 [concrete] // CHECK:STDOUT: %Convert.type.4b8: type = fn_type @Convert.13 [concrete] // CHECK:STDOUT: %Convert.f59: %Convert.type.4b8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.1e4: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%C.c60) [concrete] // CHECK:STDOUT: %Op.type.32d: type = fn_type @Op.2, @impl.2b5(%C.c60) [concrete] // CHECK:STDOUT: %Op.ca5: %Op.type.32d = struct_value () [concrete] // CHECK:STDOUT: %ptr.b5e: type = ptr_type %C.c60 [concrete] -// CHECK:STDOUT: %Destroy.facet.83d: %Destroy.type = facet_value %C.c60, (%Destroy.impl_witness.1e4) [concrete] -// CHECK:STDOUT: %.3d7: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.83d [concrete] // CHECK:STDOUT: %Op.specific_fn.8d0: = specific_function %Op.ca5, @Op.2(%C.c60) [concrete] // CHECK:STDOUT: %int_7.29f: Core.IntLiteral = int_value 7 [concrete] // CHECK:STDOUT: %Convert.bound.208: = bound_method %int_7.29f, %Convert.956 [concrete] @@ -943,12 +898,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.79b: type = fn_type_with_self_type %Convert.type.334, %ImplicitAs.facet.cca [concrete] // CHECK:STDOUT: %Convert.type.c7e: type = fn_type @Convert.14 [concrete] // CHECK:STDOUT: %Convert.6c1: %Convert.type.c7e = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.cc5: = impl_witness imports.%Destroy.impl_witness_table, @impl.2b5(%C.304) [concrete] // CHECK:STDOUT: %Op.type.986: type = fn_type @Op.2, @impl.2b5(%C.304) [concrete] // CHECK:STDOUT: %Op.6fc: %Op.type.986 = struct_value () [concrete] // CHECK:STDOUT: %ptr.dc3: type = ptr_type %C.304 [concrete] -// CHECK:STDOUT: %Destroy.facet.143: %Destroy.type = facet_value %C.304, (%Destroy.impl_witness.cc5) [concrete] -// CHECK:STDOUT: %.3a6: type = fn_type_with_self_type %Op.type.625, %Destroy.facet.143 [concrete] // CHECK:STDOUT: %Op.specific_fn.a08: = specific_function %Op.6fc, @Op.2(%C.304) [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] @@ -984,8 +936,6 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.import_ref.708: = import_ref P//library, loc8_33, loaded [concrete = constants.%ImplicitAs.impl_witness.f53] // CHECK:STDOUT: %P.import_ref.d2c: type = import_ref P//library, loc8_9, loaded [concrete = constants.%C.b00] // CHECK:STDOUT: %P.import_ref.b769fa.1: type = import_ref P//library, loc8_31, loaded [concrete = constants.%ImplicitAs.type.5f9] -// CHECK:STDOUT: %P.import_ref.544: @impl.2b5.%Op.type (%Op.type.6ba) = import_ref P//library, inst478 [indirect], loaded [symbolic = @impl.2b5.%Op (constants.%Op.f4a)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%P.import_ref.544), @impl.2b5 [concrete] // CHECK:STDOUT: %P.import_ref.ae8: = import_ref P//library, loc9_33, loaded [concrete = constants.%ImplicitAs.impl_witness.fcb] // CHECK:STDOUT: %P.import_ref.cf3: type = import_ref P//library, loc9_9, loaded [concrete = constants.%C.674] // CHECK:STDOUT: %P.import_ref.b769fa.2: type = import_ref P//library, loc9_31, loaded [concrete = constants.%ImplicitAs.type.5f9] @@ -1128,8 +1078,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc7_34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_34.1: = bound_method %int_0, %impl.elem0.loc7_34 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc7_34: = specific_function %impl.elem0.loc7_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_34.2: = bound_method %int_0, %specific_fn.loc7_34 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc7_34.2: = bound_method %int_0, %specific_fn.loc7 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %bound_method.loc7_34.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc7_34.1: %i32 = value_of_initializer %int.convert_checked.loc7 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc7_34.2: %i32 = converted %int_0, %.loc7_34.1 [concrete = constants.%int_0.6a9] @@ -1138,24 +1088,22 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc7_24.3: init %C.b00 = class_init (), %.loc7_24.2 [concrete = constants.%C.val.452] // CHECK:STDOUT: %.loc7_24.4: ref %C.b00 = temporary %.loc7_24.2, %.loc7_24.3 // CHECK:STDOUT: %.loc7_26.1: ref %C.b00 = converted %.loc7_24.1, %.loc7_24.4 -// CHECK:STDOUT: %impl.elem0.loc7_35.1: %.a9c = impl_witness_access constants.%ImplicitAs.impl_witness.f53, element0 [concrete = constants.%Convert.bf9] -// CHECK:STDOUT: %bound_method.loc7_35.1: = bound_method %.loc7_26.1, %impl.elem0.loc7_35.1 +// CHECK:STDOUT: %impl.elem0.loc7_35: %.a9c = impl_witness_access constants.%ImplicitAs.impl_witness.f53, element0 [concrete = constants.%Convert.bf9] +// CHECK:STDOUT: %bound_method.loc7_35.1: = bound_method %.loc7_26.1, %impl.elem0.loc7_35 // CHECK:STDOUT: %.loc7_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc7_26.2: %C.b00 = bind_value %.loc7_26.1 // CHECK:STDOUT: %Convert.call.loc7: init %D = call %bound_method.loc7_35.1(%.loc7_26.2) to %.loc7_35.1 // CHECK:STDOUT: %.loc7_35.2: init %D = converted %.loc7_26.1, %Convert.call.loc7 -// CHECK:STDOUT: %impl.elem0.loc7_35.2: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.2: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.2 -// CHECK:STDOUT: %specific_fn.loc7_35.1: = specific_function %impl.elem0.loc7_35.2, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.3: = bound_method %.loc7_35.1, %specific_fn.loc7_35.1 +// CHECK:STDOUT: %Op.bound.loc7_35.1: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.2: = bound_method %.loc7_35.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc7_35.1: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.1: init %empty_tuple.type = call %bound_method.loc7_35.3(%addr.loc7_35.1) -// CHECK:STDOUT: %impl.elem0.loc7_24.1: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.1: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.1 -// CHECK:STDOUT: %specific_fn.loc7_24.1: = specific_function %impl.elem0.loc7_24.1, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.2: = bound_method %.loc7_24.2, %specific_fn.loc7_24.1 +// CHECK:STDOUT: %no_op.loc7_35.1: init %empty_tuple.type = call %bound_method.loc7_35.2(%addr.loc7_35.1) +// CHECK:STDOUT: %Op.bound.loc7_24.1: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.1: = bound_method %.loc7_24.2, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7_24.1: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.1: init %empty_tuple.type = call %bound_method.loc7_24.2(%addr.loc7_24.1) +// CHECK:STDOUT: %no_op.loc7_24.1: init %empty_tuple.type = call %bound_method.loc7_24.1(%addr.loc7_24.1) // CHECK:STDOUT: return %.loc7_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc7: @@ -1169,8 +1117,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc8_34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_34.1: = bound_method %int_1, %impl.elem0.loc8_34 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc8_34: = specific_function %impl.elem0.loc8_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_34.2: = bound_method %int_1, %specific_fn.loc8_34 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_34.2: = bound_method %int_1, %specific_fn.loc8 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %bound_method.loc8_34.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %int.convert_checked.loc8 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_34.2: %i32 = converted %int_1, %.loc8_34.1 [concrete = constants.%int_1.5d2] @@ -1179,36 +1127,32 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc8_24.3: init %C.674 = class_init (), %.loc8_24.2 [concrete = constants.%C.val.678] // CHECK:STDOUT: %.loc8_24.4: ref %C.674 = temporary %.loc8_24.2, %.loc8_24.3 // CHECK:STDOUT: %.loc8_26.1: ref %C.674 = converted %.loc8_24.1, %.loc8_24.4 -// CHECK:STDOUT: %impl.elem0.loc8_35.1: %.7d6 = impl_witness_access constants.%ImplicitAs.impl_witness.fcb, element0 [concrete = constants.%Convert.c82] -// CHECK:STDOUT: %bound_method.loc8_35.1: = bound_method %.loc8_26.1, %impl.elem0.loc8_35.1 +// CHECK:STDOUT: %impl.elem0.loc8_35: %.7d6 = impl_witness_access constants.%ImplicitAs.impl_witness.fcb, element0 [concrete = constants.%Convert.c82] +// CHECK:STDOUT: %bound_method.loc8_35.1: = bound_method %.loc8_26.1, %impl.elem0.loc8_35 // CHECK:STDOUT: %.loc8_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc8_26.2: %C.674 = bind_value %.loc8_26.1 // CHECK:STDOUT: %Convert.call.loc8: init %D = call %bound_method.loc8_35.1(%.loc8_26.2) to %.loc8_35.1 // CHECK:STDOUT: %.loc8_35.2: init %D = converted %.loc8_26.1, %Convert.call.loc8 -// CHECK:STDOUT: %impl.elem0.loc8_35.2: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc8_35.2: = bound_method %.loc8_35.1, %impl.elem0.loc8_35.2 -// CHECK:STDOUT: %specific_fn.loc8_35.1: = specific_function %impl.elem0.loc8_35.2, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc8_35.3: = bound_method %.loc8_35.1, %specific_fn.loc8_35.1 +// CHECK:STDOUT: %Op.bound.loc8_35.1: = bound_method %.loc8_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc8_35.2: = bound_method %.loc8_35.1, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8_35.1: %ptr.f29 = addr_of %.loc8_35.1 -// CHECK:STDOUT: %no_op.loc8_35.1: init %empty_tuple.type = call %bound_method.loc8_35.3(%addr.loc8_35.1) -// CHECK:STDOUT: %impl.elem0.loc8_24.1: %.42d = impl_witness_access constants.%Destroy.impl_witness.af9, element0 [concrete = constants.%Op.ad8] -// CHECK:STDOUT: %bound_method.loc8_24.1: = bound_method %.loc8_24.2, %impl.elem0.loc8_24.1 -// CHECK:STDOUT: %specific_fn.loc8_24.1: = specific_function %impl.elem0.loc8_24.1, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] -// CHECK:STDOUT: %bound_method.loc8_24.2: = bound_method %.loc8_24.2, %specific_fn.loc8_24.1 +// CHECK:STDOUT: %no_op.loc8_35.1: init %empty_tuple.type = call %bound_method.loc8_35.2(%addr.loc8_35.1) +// CHECK:STDOUT: %Op.bound.loc8_24.1: = bound_method %.loc8_24.2, constants.%Op.ad8 +// CHECK:STDOUT: %Op.specific_fn.4: = specific_function constants.%Op.ad8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] +// CHECK:STDOUT: %bound_method.loc8_24.1: = bound_method %.loc8_24.2, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc8_24.1: %ptr.625 = addr_of %.loc8_24.2 -// CHECK:STDOUT: %no_op.loc8_24.1: init %empty_tuple.type = call %bound_method.loc8_24.2(%addr.loc8_24.1) -// CHECK:STDOUT: %impl.elem0.loc7_35.3: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.4: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.3 -// CHECK:STDOUT: %specific_fn.loc7_35.2: = specific_function %impl.elem0.loc7_35.3, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.5: = bound_method %.loc7_35.1, %specific_fn.loc7_35.2 +// CHECK:STDOUT: %no_op.loc8_24.1: init %empty_tuple.type = call %bound_method.loc8_24.1(%addr.loc8_24.1) +// CHECK:STDOUT: %Op.bound.loc7_35.2: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.5: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.3: = bound_method %.loc7_35.1, %Op.specific_fn.5 // CHECK:STDOUT: %addr.loc7_35.2: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.2: init %empty_tuple.type = call %bound_method.loc7_35.5(%addr.loc7_35.2) -// CHECK:STDOUT: %impl.elem0.loc7_24.2: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.3: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.2 -// CHECK:STDOUT: %specific_fn.loc7_24.2: = specific_function %impl.elem0.loc7_24.2, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.4: = bound_method %.loc7_24.2, %specific_fn.loc7_24.2 +// CHECK:STDOUT: %no_op.loc7_35.2: init %empty_tuple.type = call %bound_method.loc7_35.3(%addr.loc7_35.2) +// CHECK:STDOUT: %Op.bound.loc7_24.2: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.6: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.2: = bound_method %.loc7_24.2, %Op.specific_fn.6 // CHECK:STDOUT: %addr.loc7_24.2: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.2: init %empty_tuple.type = call %bound_method.loc7_24.4(%addr.loc7_24.2) +// CHECK:STDOUT: %no_op.loc7_24.2: init %empty_tuple.type = call %bound_method.loc7_24.2(%addr.loc7_24.2) // CHECK:STDOUT: return %.loc8_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc8: @@ -1222,8 +1166,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc9_34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_34.1: = bound_method %int_2, %impl.elem0.loc9_34 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc9_34: = specific_function %impl.elem0.loc9_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_34.2: = bound_method %int_2, %specific_fn.loc9_34 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc9_34.2: = bound_method %int_2, %specific_fn.loc9 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %bound_method.loc9_34.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_34.1: %i32 = value_of_initializer %int.convert_checked.loc9 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_34.2: %i32 = converted %int_2, %.loc9_34.1 [concrete = constants.%int_2.ef8] @@ -1232,48 +1176,42 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc9_24.3: init %C.681 = class_init (), %.loc9_24.2 [concrete = constants.%C.val.fb5] // CHECK:STDOUT: %.loc9_24.4: ref %C.681 = temporary %.loc9_24.2, %.loc9_24.3 // CHECK:STDOUT: %.loc9_26.1: ref %C.681 = converted %.loc9_24.1, %.loc9_24.4 -// CHECK:STDOUT: %impl.elem0.loc9_35.1: %.987 = impl_witness_access constants.%ImplicitAs.impl_witness.746, element0 [concrete = constants.%Convert.08c] -// CHECK:STDOUT: %bound_method.loc9_35.1: = bound_method %.loc9_26.1, %impl.elem0.loc9_35.1 +// CHECK:STDOUT: %impl.elem0.loc9_35: %.987 = impl_witness_access constants.%ImplicitAs.impl_witness.746, element0 [concrete = constants.%Convert.08c] +// CHECK:STDOUT: %bound_method.loc9_35.1: = bound_method %.loc9_26.1, %impl.elem0.loc9_35 // CHECK:STDOUT: %.loc9_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc9_26.2: %C.681 = bind_value %.loc9_26.1 // CHECK:STDOUT: %Convert.call.loc9: init %D = call %bound_method.loc9_35.1(%.loc9_26.2) to %.loc9_35.1 // CHECK:STDOUT: %.loc9_35.2: init %D = converted %.loc9_26.1, %Convert.call.loc9 -// CHECK:STDOUT: %impl.elem0.loc9_35.2: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc9_35.2: = bound_method %.loc9_35.1, %impl.elem0.loc9_35.2 -// CHECK:STDOUT: %specific_fn.loc9_35.1: = specific_function %impl.elem0.loc9_35.2, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc9_35.3: = bound_method %.loc9_35.1, %specific_fn.loc9_35.1 +// CHECK:STDOUT: %Op.bound.loc9_35.1: = bound_method %.loc9_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.7: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc9_35.2: = bound_method %.loc9_35.1, %Op.specific_fn.7 // CHECK:STDOUT: %addr.loc9_35.1: %ptr.f29 = addr_of %.loc9_35.1 -// CHECK:STDOUT: %no_op.loc9_35.1: init %empty_tuple.type = call %bound_method.loc9_35.3(%addr.loc9_35.1) -// CHECK:STDOUT: %impl.elem0.loc9_24.1: %.715 = impl_witness_access constants.%Destroy.impl_witness.3a3, element0 [concrete = constants.%Op.404] -// CHECK:STDOUT: %bound_method.loc9_24.1: = bound_method %.loc9_24.2, %impl.elem0.loc9_24.1 -// CHECK:STDOUT: %specific_fn.loc9_24.1: = specific_function %impl.elem0.loc9_24.1, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] -// CHECK:STDOUT: %bound_method.loc9_24.2: = bound_method %.loc9_24.2, %specific_fn.loc9_24.1 +// CHECK:STDOUT: %no_op.loc9_35.1: init %empty_tuple.type = call %bound_method.loc9_35.2(%addr.loc9_35.1) +// CHECK:STDOUT: %Op.bound.loc9_24.1: = bound_method %.loc9_24.2, constants.%Op.404 +// CHECK:STDOUT: %Op.specific_fn.8: = specific_function constants.%Op.404, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] +// CHECK:STDOUT: %bound_method.loc9_24.1: = bound_method %.loc9_24.2, %Op.specific_fn.8 // CHECK:STDOUT: %addr.loc9_24.1: %ptr.3bd = addr_of %.loc9_24.2 -// CHECK:STDOUT: %no_op.loc9_24.1: init %empty_tuple.type = call %bound_method.loc9_24.2(%addr.loc9_24.1) -// CHECK:STDOUT: %impl.elem0.loc8_35.3: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc8_35.4: = bound_method %.loc8_35.1, %impl.elem0.loc8_35.3 -// CHECK:STDOUT: %specific_fn.loc8_35.2: = specific_function %impl.elem0.loc8_35.3, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc8_35.5: = bound_method %.loc8_35.1, %specific_fn.loc8_35.2 +// CHECK:STDOUT: %no_op.loc9_24.1: init %empty_tuple.type = call %bound_method.loc9_24.1(%addr.loc9_24.1) +// CHECK:STDOUT: %Op.bound.loc8_35.2: = bound_method %.loc8_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.9: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc8_35.3: = bound_method %.loc8_35.1, %Op.specific_fn.9 // CHECK:STDOUT: %addr.loc8_35.2: %ptr.f29 = addr_of %.loc8_35.1 -// CHECK:STDOUT: %no_op.loc8_35.2: init %empty_tuple.type = call %bound_method.loc8_35.5(%addr.loc8_35.2) -// CHECK:STDOUT: %impl.elem0.loc8_24.2: %.42d = impl_witness_access constants.%Destroy.impl_witness.af9, element0 [concrete = constants.%Op.ad8] -// CHECK:STDOUT: %bound_method.loc8_24.3: = bound_method %.loc8_24.2, %impl.elem0.loc8_24.2 -// CHECK:STDOUT: %specific_fn.loc8_24.2: = specific_function %impl.elem0.loc8_24.2, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] -// CHECK:STDOUT: %bound_method.loc8_24.4: = bound_method %.loc8_24.2, %specific_fn.loc8_24.2 +// CHECK:STDOUT: %no_op.loc8_35.2: init %empty_tuple.type = call %bound_method.loc8_35.3(%addr.loc8_35.2) +// CHECK:STDOUT: %Op.bound.loc8_24.2: = bound_method %.loc8_24.2, constants.%Op.ad8 +// CHECK:STDOUT: %Op.specific_fn.10: = specific_function constants.%Op.ad8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] +// CHECK:STDOUT: %bound_method.loc8_24.2: = bound_method %.loc8_24.2, %Op.specific_fn.10 // CHECK:STDOUT: %addr.loc8_24.2: %ptr.625 = addr_of %.loc8_24.2 -// CHECK:STDOUT: %no_op.loc8_24.2: init %empty_tuple.type = call %bound_method.loc8_24.4(%addr.loc8_24.2) -// CHECK:STDOUT: %impl.elem0.loc7_35.4: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.6: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.4 -// CHECK:STDOUT: %specific_fn.loc7_35.3: = specific_function %impl.elem0.loc7_35.4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.7: = bound_method %.loc7_35.1, %specific_fn.loc7_35.3 +// CHECK:STDOUT: %no_op.loc8_24.2: init %empty_tuple.type = call %bound_method.loc8_24.2(%addr.loc8_24.2) +// CHECK:STDOUT: %Op.bound.loc7_35.3: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.11: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.4: = bound_method %.loc7_35.1, %Op.specific_fn.11 // CHECK:STDOUT: %addr.loc7_35.3: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.3: init %empty_tuple.type = call %bound_method.loc7_35.7(%addr.loc7_35.3) -// CHECK:STDOUT: %impl.elem0.loc7_24.3: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.5: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.3 -// CHECK:STDOUT: %specific_fn.loc7_24.3: = specific_function %impl.elem0.loc7_24.3, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.6: = bound_method %.loc7_24.2, %specific_fn.loc7_24.3 +// CHECK:STDOUT: %no_op.loc7_35.3: init %empty_tuple.type = call %bound_method.loc7_35.4(%addr.loc7_35.3) +// CHECK:STDOUT: %Op.bound.loc7_24.3: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.12: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.3: = bound_method %.loc7_24.2, %Op.specific_fn.12 // CHECK:STDOUT: %addr.loc7_24.3: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.3: init %empty_tuple.type = call %bound_method.loc7_24.6(%addr.loc7_24.3) +// CHECK:STDOUT: %no_op.loc7_24.3: init %empty_tuple.type = call %bound_method.loc7_24.3(%addr.loc7_24.3) // CHECK:STDOUT: return %.loc9_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc9: @@ -1287,8 +1225,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %impl.elem0.loc10_34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_34.1: = bound_method %int_3, %impl.elem0.loc10_34 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc10_34: = specific_function %impl.elem0.loc10_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_34.2: = bound_method %int_3, %specific_fn.loc10_34 [concrete = constants.%bound_method.047] +// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc10_34.2: = bound_method %int_3, %specific_fn.loc10 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %bound_method.loc10_34.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.convert_checked.loc10 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int_3, %.loc10_34.1 [concrete = constants.%int_3.822] @@ -1297,60 +1235,52 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc10_24.3: init %C.7ac = class_init (), %.loc10_24.2 [concrete = constants.%C.val.fe7] // CHECK:STDOUT: %.loc10_24.4: ref %C.7ac = temporary %.loc10_24.2, %.loc10_24.3 // CHECK:STDOUT: %.loc10_26.1: ref %C.7ac = converted %.loc10_24.1, %.loc10_24.4 -// CHECK:STDOUT: %impl.elem0.loc10_35.1: %.efa = impl_witness_access constants.%ImplicitAs.impl_witness.f79, element0 [concrete = constants.%Convert.2dd] -// CHECK:STDOUT: %bound_method.loc10_35.1: = bound_method %.loc10_26.1, %impl.elem0.loc10_35.1 +// CHECK:STDOUT: %impl.elem0.loc10_35: %.efa = impl_witness_access constants.%ImplicitAs.impl_witness.f79, element0 [concrete = constants.%Convert.2dd] +// CHECK:STDOUT: %bound_method.loc10_35.1: = bound_method %.loc10_26.1, %impl.elem0.loc10_35 // CHECK:STDOUT: %.loc10_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc10_26.2: %C.7ac = bind_value %.loc10_26.1 // CHECK:STDOUT: %Convert.call.loc10: init %D = call %bound_method.loc10_35.1(%.loc10_26.2) to %.loc10_35.1 // CHECK:STDOUT: %.loc10_35.2: init %D = converted %.loc10_26.1, %Convert.call.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_35.2: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc10_35.2: = bound_method %.loc10_35.1, %impl.elem0.loc10_35.2 -// CHECK:STDOUT: %specific_fn.loc10_35.1: = specific_function %impl.elem0.loc10_35.2, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc10_35.3: = bound_method %.loc10_35.1, %specific_fn.loc10_35.1 +// CHECK:STDOUT: %Op.bound.loc10_35.1: = bound_method %.loc10_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.13: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc10_35.2: = bound_method %.loc10_35.1, %Op.specific_fn.13 // CHECK:STDOUT: %addr.loc10_35.1: %ptr.f29 = addr_of %.loc10_35.1 -// CHECK:STDOUT: %no_op.loc10_35.1: init %empty_tuple.type = call %bound_method.loc10_35.3(%addr.loc10_35.1) -// CHECK:STDOUT: %impl.elem0.loc10_24.1: %.f23 = impl_witness_access constants.%Destroy.impl_witness.4d8, element0 [concrete = constants.%Op.9cf] -// CHECK:STDOUT: %bound_method.loc10_24.1: = bound_method %.loc10_24.2, %impl.elem0.loc10_24.1 -// CHECK:STDOUT: %specific_fn.loc10_24.1: = specific_function %impl.elem0.loc10_24.1, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] -// CHECK:STDOUT: %bound_method.loc10_24.2: = bound_method %.loc10_24.2, %specific_fn.loc10_24.1 +// CHECK:STDOUT: %no_op.loc10_35.1: init %empty_tuple.type = call %bound_method.loc10_35.2(%addr.loc10_35.1) +// CHECK:STDOUT: %Op.bound.loc10_24.1: = bound_method %.loc10_24.2, constants.%Op.9cf +// CHECK:STDOUT: %Op.specific_fn.14: = specific_function constants.%Op.9cf, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] +// CHECK:STDOUT: %bound_method.loc10_24.1: = bound_method %.loc10_24.2, %Op.specific_fn.14 // CHECK:STDOUT: %addr.loc10_24.1: %ptr.2b1 = addr_of %.loc10_24.2 -// CHECK:STDOUT: %no_op.loc10_24.1: init %empty_tuple.type = call %bound_method.loc10_24.2(%addr.loc10_24.1) -// CHECK:STDOUT: %impl.elem0.loc9_35.3: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc9_35.4: = bound_method %.loc9_35.1, %impl.elem0.loc9_35.3 -// CHECK:STDOUT: %specific_fn.loc9_35.2: = specific_function %impl.elem0.loc9_35.3, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc9_35.5: = bound_method %.loc9_35.1, %specific_fn.loc9_35.2 +// CHECK:STDOUT: %no_op.loc10_24.1: init %empty_tuple.type = call %bound_method.loc10_24.1(%addr.loc10_24.1) +// CHECK:STDOUT: %Op.bound.loc9_35.2: = bound_method %.loc9_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.15: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc9_35.3: = bound_method %.loc9_35.1, %Op.specific_fn.15 // CHECK:STDOUT: %addr.loc9_35.2: %ptr.f29 = addr_of %.loc9_35.1 -// CHECK:STDOUT: %no_op.loc9_35.2: init %empty_tuple.type = call %bound_method.loc9_35.5(%addr.loc9_35.2) -// CHECK:STDOUT: %impl.elem0.loc9_24.2: %.715 = impl_witness_access constants.%Destroy.impl_witness.3a3, element0 [concrete = constants.%Op.404] -// CHECK:STDOUT: %bound_method.loc9_24.3: = bound_method %.loc9_24.2, %impl.elem0.loc9_24.2 -// CHECK:STDOUT: %specific_fn.loc9_24.2: = specific_function %impl.elem0.loc9_24.2, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] -// CHECK:STDOUT: %bound_method.loc9_24.4: = bound_method %.loc9_24.2, %specific_fn.loc9_24.2 +// CHECK:STDOUT: %no_op.loc9_35.2: init %empty_tuple.type = call %bound_method.loc9_35.3(%addr.loc9_35.2) +// CHECK:STDOUT: %Op.bound.loc9_24.2: = bound_method %.loc9_24.2, constants.%Op.404 +// CHECK:STDOUT: %Op.specific_fn.16: = specific_function constants.%Op.404, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] +// CHECK:STDOUT: %bound_method.loc9_24.2: = bound_method %.loc9_24.2, %Op.specific_fn.16 // CHECK:STDOUT: %addr.loc9_24.2: %ptr.3bd = addr_of %.loc9_24.2 -// CHECK:STDOUT: %no_op.loc9_24.2: init %empty_tuple.type = call %bound_method.loc9_24.4(%addr.loc9_24.2) -// CHECK:STDOUT: %impl.elem0.loc8_35.4: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc8_35.6: = bound_method %.loc8_35.1, %impl.elem0.loc8_35.4 -// CHECK:STDOUT: %specific_fn.loc8_35.3: = specific_function %impl.elem0.loc8_35.4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc8_35.7: = bound_method %.loc8_35.1, %specific_fn.loc8_35.3 +// CHECK:STDOUT: %no_op.loc9_24.2: init %empty_tuple.type = call %bound_method.loc9_24.2(%addr.loc9_24.2) +// CHECK:STDOUT: %Op.bound.loc8_35.3: = bound_method %.loc8_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.17: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc8_35.4: = bound_method %.loc8_35.1, %Op.specific_fn.17 // CHECK:STDOUT: %addr.loc8_35.3: %ptr.f29 = addr_of %.loc8_35.1 -// CHECK:STDOUT: %no_op.loc8_35.3: init %empty_tuple.type = call %bound_method.loc8_35.7(%addr.loc8_35.3) -// CHECK:STDOUT: %impl.elem0.loc8_24.3: %.42d = impl_witness_access constants.%Destroy.impl_witness.af9, element0 [concrete = constants.%Op.ad8] -// CHECK:STDOUT: %bound_method.loc8_24.5: = bound_method %.loc8_24.2, %impl.elem0.loc8_24.3 -// CHECK:STDOUT: %specific_fn.loc8_24.3: = specific_function %impl.elem0.loc8_24.3, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] -// CHECK:STDOUT: %bound_method.loc8_24.6: = bound_method %.loc8_24.2, %specific_fn.loc8_24.3 +// CHECK:STDOUT: %no_op.loc8_35.3: init %empty_tuple.type = call %bound_method.loc8_35.4(%addr.loc8_35.3) +// CHECK:STDOUT: %Op.bound.loc8_24.3: = bound_method %.loc8_24.2, constants.%Op.ad8 +// CHECK:STDOUT: %Op.specific_fn.18: = specific_function constants.%Op.ad8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] +// CHECK:STDOUT: %bound_method.loc8_24.3: = bound_method %.loc8_24.2, %Op.specific_fn.18 // CHECK:STDOUT: %addr.loc8_24.3: %ptr.625 = addr_of %.loc8_24.2 -// CHECK:STDOUT: %no_op.loc8_24.3: init %empty_tuple.type = call %bound_method.loc8_24.6(%addr.loc8_24.3) -// CHECK:STDOUT: %impl.elem0.loc7_35.5: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.8: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.5 -// CHECK:STDOUT: %specific_fn.loc7_35.4: = specific_function %impl.elem0.loc7_35.5, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.9: = bound_method %.loc7_35.1, %specific_fn.loc7_35.4 +// CHECK:STDOUT: %no_op.loc8_24.3: init %empty_tuple.type = call %bound_method.loc8_24.3(%addr.loc8_24.3) +// CHECK:STDOUT: %Op.bound.loc7_35.4: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.19: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.5: = bound_method %.loc7_35.1, %Op.specific_fn.19 // CHECK:STDOUT: %addr.loc7_35.4: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.4: init %empty_tuple.type = call %bound_method.loc7_35.9(%addr.loc7_35.4) -// CHECK:STDOUT: %impl.elem0.loc7_24.4: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.7: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.4 -// CHECK:STDOUT: %specific_fn.loc7_24.4: = specific_function %impl.elem0.loc7_24.4, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.8: = bound_method %.loc7_24.2, %specific_fn.loc7_24.4 +// CHECK:STDOUT: %no_op.loc7_35.4: init %empty_tuple.type = call %bound_method.loc7_35.5(%addr.loc7_35.4) +// CHECK:STDOUT: %Op.bound.loc7_24.4: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.20: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.4: = bound_method %.loc7_24.2, %Op.specific_fn.20 // CHECK:STDOUT: %addr.loc7_24.4: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.4: init %empty_tuple.type = call %bound_method.loc7_24.8(%addr.loc7_24.4) +// CHECK:STDOUT: %no_op.loc7_24.4: init %empty_tuple.type = call %bound_method.loc7_24.4(%addr.loc7_24.4) // CHECK:STDOUT: return %.loc10_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc10: @@ -1364,8 +1294,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc11_34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_34.1: = bound_method %int_4, %impl.elem0.loc11_34 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc11_34: = specific_function %impl.elem0.loc11_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_34.2: = bound_method %int_4, %specific_fn.loc11_34 [concrete = constants.%bound_method.1da] +// CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc11_34.2: = bound_method %int_4, %specific_fn.loc11 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %bound_method.loc11_34.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc11_34.1: %i32 = value_of_initializer %int.convert_checked.loc11 [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc11_34.2: %i32 = converted %int_4, %.loc11_34.1 [concrete = constants.%int_4.940] @@ -1374,72 +1304,62 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc11_24.3: init %C.89d = class_init (), %.loc11_24.2 [concrete = constants.%C.val.1dd] // CHECK:STDOUT: %.loc11_24.4: ref %C.89d = temporary %.loc11_24.2, %.loc11_24.3 // CHECK:STDOUT: %.loc11_26.1: ref %C.89d = converted %.loc11_24.1, %.loc11_24.4 -// CHECK:STDOUT: %impl.elem0.loc11_35.1: %.26e = impl_witness_access constants.%ImplicitAs.impl_witness.16c, element0 [concrete = constants.%Convert.009] -// CHECK:STDOUT: %bound_method.loc11_35.1: = bound_method %.loc11_26.1, %impl.elem0.loc11_35.1 +// CHECK:STDOUT: %impl.elem0.loc11_35: %.26e = impl_witness_access constants.%ImplicitAs.impl_witness.16c, element0 [concrete = constants.%Convert.009] +// CHECK:STDOUT: %bound_method.loc11_35.1: = bound_method %.loc11_26.1, %impl.elem0.loc11_35 // CHECK:STDOUT: %.loc11_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc11_26.2: %C.89d = bind_value %.loc11_26.1 // CHECK:STDOUT: %Convert.call.loc11: init %D = call %bound_method.loc11_35.1(%.loc11_26.2) to %.loc11_35.1 // CHECK:STDOUT: %.loc11_35.2: init %D = converted %.loc11_26.1, %Convert.call.loc11 -// CHECK:STDOUT: %impl.elem0.loc11_35.2: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc11_35.2: = bound_method %.loc11_35.1, %impl.elem0.loc11_35.2 -// CHECK:STDOUT: %specific_fn.loc11_35.1: = specific_function %impl.elem0.loc11_35.2, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc11_35.3: = bound_method %.loc11_35.1, %specific_fn.loc11_35.1 +// CHECK:STDOUT: %Op.bound.loc11_35.1: = bound_method %.loc11_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.21: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc11_35.2: = bound_method %.loc11_35.1, %Op.specific_fn.21 // CHECK:STDOUT: %addr.loc11_35.1: %ptr.f29 = addr_of %.loc11_35.1 -// CHECK:STDOUT: %no_op.loc11_35.1: init %empty_tuple.type = call %bound_method.loc11_35.3(%addr.loc11_35.1) -// CHECK:STDOUT: %impl.elem0.loc11_24.1: %.6ca = impl_witness_access constants.%Destroy.impl_witness.f66, element0 [concrete = constants.%Op.6b4] -// CHECK:STDOUT: %bound_method.loc11_24.1: = bound_method %.loc11_24.2, %impl.elem0.loc11_24.1 -// CHECK:STDOUT: %specific_fn.loc11_24.1: = specific_function %impl.elem0.loc11_24.1, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] -// CHECK:STDOUT: %bound_method.loc11_24.2: = bound_method %.loc11_24.2, %specific_fn.loc11_24.1 +// CHECK:STDOUT: %no_op.loc11_35.1: init %empty_tuple.type = call %bound_method.loc11_35.2(%addr.loc11_35.1) +// CHECK:STDOUT: %Op.bound.loc11_24.1: = bound_method %.loc11_24.2, constants.%Op.6b4 +// CHECK:STDOUT: %Op.specific_fn.22: = specific_function constants.%Op.6b4, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] +// CHECK:STDOUT: %bound_method.loc11_24.1: = bound_method %.loc11_24.2, %Op.specific_fn.22 // CHECK:STDOUT: %addr.loc11_24.1: %ptr.c28b = addr_of %.loc11_24.2 -// CHECK:STDOUT: %no_op.loc11_24.1: init %empty_tuple.type = call %bound_method.loc11_24.2(%addr.loc11_24.1) -// CHECK:STDOUT: %impl.elem0.loc10_35.3: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc10_35.4: = bound_method %.loc10_35.1, %impl.elem0.loc10_35.3 -// CHECK:STDOUT: %specific_fn.loc10_35.2: = specific_function %impl.elem0.loc10_35.3, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc10_35.5: = bound_method %.loc10_35.1, %specific_fn.loc10_35.2 +// CHECK:STDOUT: %no_op.loc11_24.1: init %empty_tuple.type = call %bound_method.loc11_24.1(%addr.loc11_24.1) +// CHECK:STDOUT: %Op.bound.loc10_35.2: = bound_method %.loc10_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.23: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc10_35.3: = bound_method %.loc10_35.1, %Op.specific_fn.23 // CHECK:STDOUT: %addr.loc10_35.2: %ptr.f29 = addr_of %.loc10_35.1 -// CHECK:STDOUT: %no_op.loc10_35.2: init %empty_tuple.type = call %bound_method.loc10_35.5(%addr.loc10_35.2) -// CHECK:STDOUT: %impl.elem0.loc10_24.2: %.f23 = impl_witness_access constants.%Destroy.impl_witness.4d8, element0 [concrete = constants.%Op.9cf] -// CHECK:STDOUT: %bound_method.loc10_24.3: = bound_method %.loc10_24.2, %impl.elem0.loc10_24.2 -// CHECK:STDOUT: %specific_fn.loc10_24.2: = specific_function %impl.elem0.loc10_24.2, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] -// CHECK:STDOUT: %bound_method.loc10_24.4: = bound_method %.loc10_24.2, %specific_fn.loc10_24.2 +// CHECK:STDOUT: %no_op.loc10_35.2: init %empty_tuple.type = call %bound_method.loc10_35.3(%addr.loc10_35.2) +// CHECK:STDOUT: %Op.bound.loc10_24.2: = bound_method %.loc10_24.2, constants.%Op.9cf +// CHECK:STDOUT: %Op.specific_fn.24: = specific_function constants.%Op.9cf, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] +// CHECK:STDOUT: %bound_method.loc10_24.2: = bound_method %.loc10_24.2, %Op.specific_fn.24 // CHECK:STDOUT: %addr.loc10_24.2: %ptr.2b1 = addr_of %.loc10_24.2 -// CHECK:STDOUT: %no_op.loc10_24.2: init %empty_tuple.type = call %bound_method.loc10_24.4(%addr.loc10_24.2) -// CHECK:STDOUT: %impl.elem0.loc9_35.4: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc9_35.6: = bound_method %.loc9_35.1, %impl.elem0.loc9_35.4 -// CHECK:STDOUT: %specific_fn.loc9_35.3: = specific_function %impl.elem0.loc9_35.4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc9_35.7: = bound_method %.loc9_35.1, %specific_fn.loc9_35.3 +// CHECK:STDOUT: %no_op.loc10_24.2: init %empty_tuple.type = call %bound_method.loc10_24.2(%addr.loc10_24.2) +// CHECK:STDOUT: %Op.bound.loc9_35.3: = bound_method %.loc9_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.25: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc9_35.4: = bound_method %.loc9_35.1, %Op.specific_fn.25 // CHECK:STDOUT: %addr.loc9_35.3: %ptr.f29 = addr_of %.loc9_35.1 -// CHECK:STDOUT: %no_op.loc9_35.3: init %empty_tuple.type = call %bound_method.loc9_35.7(%addr.loc9_35.3) -// CHECK:STDOUT: %impl.elem0.loc9_24.3: %.715 = impl_witness_access constants.%Destroy.impl_witness.3a3, element0 [concrete = constants.%Op.404] -// CHECK:STDOUT: %bound_method.loc9_24.5: = bound_method %.loc9_24.2, %impl.elem0.loc9_24.3 -// CHECK:STDOUT: %specific_fn.loc9_24.3: = specific_function %impl.elem0.loc9_24.3, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] -// CHECK:STDOUT: %bound_method.loc9_24.6: = bound_method %.loc9_24.2, %specific_fn.loc9_24.3 +// CHECK:STDOUT: %no_op.loc9_35.3: init %empty_tuple.type = call %bound_method.loc9_35.4(%addr.loc9_35.3) +// CHECK:STDOUT: %Op.bound.loc9_24.3: = bound_method %.loc9_24.2, constants.%Op.404 +// CHECK:STDOUT: %Op.specific_fn.26: = specific_function constants.%Op.404, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] +// CHECK:STDOUT: %bound_method.loc9_24.3: = bound_method %.loc9_24.2, %Op.specific_fn.26 // CHECK:STDOUT: %addr.loc9_24.3: %ptr.3bd = addr_of %.loc9_24.2 -// CHECK:STDOUT: %no_op.loc9_24.3: init %empty_tuple.type = call %bound_method.loc9_24.6(%addr.loc9_24.3) -// CHECK:STDOUT: %impl.elem0.loc8_35.5: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc8_35.8: = bound_method %.loc8_35.1, %impl.elem0.loc8_35.5 -// CHECK:STDOUT: %specific_fn.loc8_35.4: = specific_function %impl.elem0.loc8_35.5, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc8_35.9: = bound_method %.loc8_35.1, %specific_fn.loc8_35.4 +// CHECK:STDOUT: %no_op.loc9_24.3: init %empty_tuple.type = call %bound_method.loc9_24.3(%addr.loc9_24.3) +// CHECK:STDOUT: %Op.bound.loc8_35.4: = bound_method %.loc8_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.27: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc8_35.5: = bound_method %.loc8_35.1, %Op.specific_fn.27 // CHECK:STDOUT: %addr.loc8_35.4: %ptr.f29 = addr_of %.loc8_35.1 -// CHECK:STDOUT: %no_op.loc8_35.4: init %empty_tuple.type = call %bound_method.loc8_35.9(%addr.loc8_35.4) -// CHECK:STDOUT: %impl.elem0.loc8_24.4: %.42d = impl_witness_access constants.%Destroy.impl_witness.af9, element0 [concrete = constants.%Op.ad8] -// CHECK:STDOUT: %bound_method.loc8_24.7: = bound_method %.loc8_24.2, %impl.elem0.loc8_24.4 -// CHECK:STDOUT: %specific_fn.loc8_24.4: = specific_function %impl.elem0.loc8_24.4, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] -// CHECK:STDOUT: %bound_method.loc8_24.8: = bound_method %.loc8_24.2, %specific_fn.loc8_24.4 +// CHECK:STDOUT: %no_op.loc8_35.4: init %empty_tuple.type = call %bound_method.loc8_35.5(%addr.loc8_35.4) +// CHECK:STDOUT: %Op.bound.loc8_24.4: = bound_method %.loc8_24.2, constants.%Op.ad8 +// CHECK:STDOUT: %Op.specific_fn.28: = specific_function constants.%Op.ad8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] +// CHECK:STDOUT: %bound_method.loc8_24.4: = bound_method %.loc8_24.2, %Op.specific_fn.28 // CHECK:STDOUT: %addr.loc8_24.4: %ptr.625 = addr_of %.loc8_24.2 -// CHECK:STDOUT: %no_op.loc8_24.4: init %empty_tuple.type = call %bound_method.loc8_24.8(%addr.loc8_24.4) -// CHECK:STDOUT: %impl.elem0.loc7_35.6: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.10: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.6 -// CHECK:STDOUT: %specific_fn.loc7_35.5: = specific_function %impl.elem0.loc7_35.6, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.11: = bound_method %.loc7_35.1, %specific_fn.loc7_35.5 +// CHECK:STDOUT: %no_op.loc8_24.4: init %empty_tuple.type = call %bound_method.loc8_24.4(%addr.loc8_24.4) +// CHECK:STDOUT: %Op.bound.loc7_35.5: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.29: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.6: = bound_method %.loc7_35.1, %Op.specific_fn.29 // CHECK:STDOUT: %addr.loc7_35.5: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.5: init %empty_tuple.type = call %bound_method.loc7_35.11(%addr.loc7_35.5) -// CHECK:STDOUT: %impl.elem0.loc7_24.5: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.9: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.5 -// CHECK:STDOUT: %specific_fn.loc7_24.5: = specific_function %impl.elem0.loc7_24.5, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.10: = bound_method %.loc7_24.2, %specific_fn.loc7_24.5 +// CHECK:STDOUT: %no_op.loc7_35.5: init %empty_tuple.type = call %bound_method.loc7_35.6(%addr.loc7_35.5) +// CHECK:STDOUT: %Op.bound.loc7_24.5: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.30: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.5: = bound_method %.loc7_24.2, %Op.specific_fn.30 // CHECK:STDOUT: %addr.loc7_24.5: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.5: init %empty_tuple.type = call %bound_method.loc7_24.10(%addr.loc7_24.5) +// CHECK:STDOUT: %no_op.loc7_24.5: init %empty_tuple.type = call %bound_method.loc7_24.5(%addr.loc7_24.5) // CHECK:STDOUT: return %.loc11_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc11: @@ -1453,8 +1373,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %impl.elem0.loc12_34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_34.1: = bound_method %int_5, %impl.elem0.loc12_34 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn.loc12_34: = specific_function %impl.elem0.loc12_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_34.2: = bound_method %int_5, %specific_fn.loc12_34 [concrete = constants.%bound_method.a25] +// CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc12_34.2: = bound_method %int_5, %specific_fn.loc12 [concrete = constants.%bound_method.a25] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %bound_method.loc12_34.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc12_34.1: %i32 = value_of_initializer %int.convert_checked.loc12 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc12_34.2: %i32 = converted %int_5, %.loc12_34.1 [concrete = constants.%int_5.0f6] @@ -1463,84 +1383,72 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc12_24.3: init %C.f0a = class_init (), %.loc12_24.2 [concrete = constants.%C.val.a4a] // CHECK:STDOUT: %.loc12_24.4: ref %C.f0a = temporary %.loc12_24.2, %.loc12_24.3 // CHECK:STDOUT: %.loc12_26.1: ref %C.f0a = converted %.loc12_24.1, %.loc12_24.4 -// CHECK:STDOUT: %impl.elem0.loc12_35.1: %.eaf = impl_witness_access constants.%ImplicitAs.impl_witness.aa9, element0 [concrete = constants.%Convert.b66] -// CHECK:STDOUT: %bound_method.loc12_35.1: = bound_method %.loc12_26.1, %impl.elem0.loc12_35.1 +// CHECK:STDOUT: %impl.elem0.loc12_35: %.eaf = impl_witness_access constants.%ImplicitAs.impl_witness.aa9, element0 [concrete = constants.%Convert.b66] +// CHECK:STDOUT: %bound_method.loc12_35.1: = bound_method %.loc12_26.1, %impl.elem0.loc12_35 // CHECK:STDOUT: %.loc12_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc12_26.2: %C.f0a = bind_value %.loc12_26.1 // CHECK:STDOUT: %Convert.call.loc12: init %D = call %bound_method.loc12_35.1(%.loc12_26.2) to %.loc12_35.1 // CHECK:STDOUT: %.loc12_35.2: init %D = converted %.loc12_26.1, %Convert.call.loc12 -// CHECK:STDOUT: %impl.elem0.loc12_35.2: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc12_35.2: = bound_method %.loc12_35.1, %impl.elem0.loc12_35.2 -// CHECK:STDOUT: %specific_fn.loc12_35.1: = specific_function %impl.elem0.loc12_35.2, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc12_35.3: = bound_method %.loc12_35.1, %specific_fn.loc12_35.1 +// CHECK:STDOUT: %Op.bound.loc12_35.1: = bound_method %.loc12_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.31: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc12_35.2: = bound_method %.loc12_35.1, %Op.specific_fn.31 // CHECK:STDOUT: %addr.loc12_35.1: %ptr.f29 = addr_of %.loc12_35.1 -// CHECK:STDOUT: %no_op.loc12_35.1: init %empty_tuple.type = call %bound_method.loc12_35.3(%addr.loc12_35.1) -// CHECK:STDOUT: %impl.elem0.loc12_24.1: %.89c = impl_witness_access constants.%Destroy.impl_witness.818, element0 [concrete = constants.%Op.985] -// CHECK:STDOUT: %bound_method.loc12_24.1: = bound_method %.loc12_24.2, %impl.elem0.loc12_24.1 -// CHECK:STDOUT: %specific_fn.loc12_24.1: = specific_function %impl.elem0.loc12_24.1, @Op.2(constants.%C.f0a) [concrete = constants.%Op.specific_fn.a66] -// CHECK:STDOUT: %bound_method.loc12_24.2: = bound_method %.loc12_24.2, %specific_fn.loc12_24.1 +// CHECK:STDOUT: %no_op.loc12_35.1: init %empty_tuple.type = call %bound_method.loc12_35.2(%addr.loc12_35.1) +// CHECK:STDOUT: %Op.bound.loc12_24.1: = bound_method %.loc12_24.2, constants.%Op.985 +// CHECK:STDOUT: %Op.specific_fn.32: = specific_function constants.%Op.985, @Op.2(constants.%C.f0a) [concrete = constants.%Op.specific_fn.a66] +// CHECK:STDOUT: %bound_method.loc12_24.1: = bound_method %.loc12_24.2, %Op.specific_fn.32 // CHECK:STDOUT: %addr.loc12_24.1: %ptr.24c = addr_of %.loc12_24.2 -// CHECK:STDOUT: %no_op.loc12_24.1: init %empty_tuple.type = call %bound_method.loc12_24.2(%addr.loc12_24.1) -// CHECK:STDOUT: %impl.elem0.loc11_35.3: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc11_35.4: = bound_method %.loc11_35.1, %impl.elem0.loc11_35.3 -// CHECK:STDOUT: %specific_fn.loc11_35.2: = specific_function %impl.elem0.loc11_35.3, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc11_35.5: = bound_method %.loc11_35.1, %specific_fn.loc11_35.2 +// CHECK:STDOUT: %no_op.loc12_24.1: init %empty_tuple.type = call %bound_method.loc12_24.1(%addr.loc12_24.1) +// CHECK:STDOUT: %Op.bound.loc11_35.2: = bound_method %.loc11_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.33: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc11_35.3: = bound_method %.loc11_35.1, %Op.specific_fn.33 // CHECK:STDOUT: %addr.loc11_35.2: %ptr.f29 = addr_of %.loc11_35.1 -// CHECK:STDOUT: %no_op.loc11_35.2: init %empty_tuple.type = call %bound_method.loc11_35.5(%addr.loc11_35.2) -// CHECK:STDOUT: %impl.elem0.loc11_24.2: %.6ca = impl_witness_access constants.%Destroy.impl_witness.f66, element0 [concrete = constants.%Op.6b4] -// CHECK:STDOUT: %bound_method.loc11_24.3: = bound_method %.loc11_24.2, %impl.elem0.loc11_24.2 -// CHECK:STDOUT: %specific_fn.loc11_24.2: = specific_function %impl.elem0.loc11_24.2, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] -// CHECK:STDOUT: %bound_method.loc11_24.4: = bound_method %.loc11_24.2, %specific_fn.loc11_24.2 +// CHECK:STDOUT: %no_op.loc11_35.2: init %empty_tuple.type = call %bound_method.loc11_35.3(%addr.loc11_35.2) +// CHECK:STDOUT: %Op.bound.loc11_24.2: = bound_method %.loc11_24.2, constants.%Op.6b4 +// CHECK:STDOUT: %Op.specific_fn.34: = specific_function constants.%Op.6b4, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] +// CHECK:STDOUT: %bound_method.loc11_24.2: = bound_method %.loc11_24.2, %Op.specific_fn.34 // CHECK:STDOUT: %addr.loc11_24.2: %ptr.c28b = addr_of %.loc11_24.2 -// CHECK:STDOUT: %no_op.loc11_24.2: init %empty_tuple.type = call %bound_method.loc11_24.4(%addr.loc11_24.2) -// CHECK:STDOUT: %impl.elem0.loc10_35.4: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc10_35.6: = bound_method %.loc10_35.1, %impl.elem0.loc10_35.4 -// CHECK:STDOUT: %specific_fn.loc10_35.3: = specific_function %impl.elem0.loc10_35.4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc10_35.7: = bound_method %.loc10_35.1, %specific_fn.loc10_35.3 +// CHECK:STDOUT: %no_op.loc11_24.2: init %empty_tuple.type = call %bound_method.loc11_24.2(%addr.loc11_24.2) +// CHECK:STDOUT: %Op.bound.loc10_35.3: = bound_method %.loc10_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.35: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc10_35.4: = bound_method %.loc10_35.1, %Op.specific_fn.35 // CHECK:STDOUT: %addr.loc10_35.3: %ptr.f29 = addr_of %.loc10_35.1 -// CHECK:STDOUT: %no_op.loc10_35.3: init %empty_tuple.type = call %bound_method.loc10_35.7(%addr.loc10_35.3) -// CHECK:STDOUT: %impl.elem0.loc10_24.3: %.f23 = impl_witness_access constants.%Destroy.impl_witness.4d8, element0 [concrete = constants.%Op.9cf] -// CHECK:STDOUT: %bound_method.loc10_24.5: = bound_method %.loc10_24.2, %impl.elem0.loc10_24.3 -// CHECK:STDOUT: %specific_fn.loc10_24.3: = specific_function %impl.elem0.loc10_24.3, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] -// CHECK:STDOUT: %bound_method.loc10_24.6: = bound_method %.loc10_24.2, %specific_fn.loc10_24.3 +// CHECK:STDOUT: %no_op.loc10_35.3: init %empty_tuple.type = call %bound_method.loc10_35.4(%addr.loc10_35.3) +// CHECK:STDOUT: %Op.bound.loc10_24.3: = bound_method %.loc10_24.2, constants.%Op.9cf +// CHECK:STDOUT: %Op.specific_fn.36: = specific_function constants.%Op.9cf, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] +// CHECK:STDOUT: %bound_method.loc10_24.3: = bound_method %.loc10_24.2, %Op.specific_fn.36 // CHECK:STDOUT: %addr.loc10_24.3: %ptr.2b1 = addr_of %.loc10_24.2 -// CHECK:STDOUT: %no_op.loc10_24.3: init %empty_tuple.type = call %bound_method.loc10_24.6(%addr.loc10_24.3) -// CHECK:STDOUT: %impl.elem0.loc9_35.5: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc9_35.8: = bound_method %.loc9_35.1, %impl.elem0.loc9_35.5 -// CHECK:STDOUT: %specific_fn.loc9_35.4: = specific_function %impl.elem0.loc9_35.5, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc9_35.9: = bound_method %.loc9_35.1, %specific_fn.loc9_35.4 +// CHECK:STDOUT: %no_op.loc10_24.3: init %empty_tuple.type = call %bound_method.loc10_24.3(%addr.loc10_24.3) +// CHECK:STDOUT: %Op.bound.loc9_35.4: = bound_method %.loc9_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.37: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc9_35.5: = bound_method %.loc9_35.1, %Op.specific_fn.37 // CHECK:STDOUT: %addr.loc9_35.4: %ptr.f29 = addr_of %.loc9_35.1 -// CHECK:STDOUT: %no_op.loc9_35.4: init %empty_tuple.type = call %bound_method.loc9_35.9(%addr.loc9_35.4) -// CHECK:STDOUT: %impl.elem0.loc9_24.4: %.715 = impl_witness_access constants.%Destroy.impl_witness.3a3, element0 [concrete = constants.%Op.404] -// CHECK:STDOUT: %bound_method.loc9_24.7: = bound_method %.loc9_24.2, %impl.elem0.loc9_24.4 -// CHECK:STDOUT: %specific_fn.loc9_24.4: = specific_function %impl.elem0.loc9_24.4, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] -// CHECK:STDOUT: %bound_method.loc9_24.8: = bound_method %.loc9_24.2, %specific_fn.loc9_24.4 +// CHECK:STDOUT: %no_op.loc9_35.4: init %empty_tuple.type = call %bound_method.loc9_35.5(%addr.loc9_35.4) +// CHECK:STDOUT: %Op.bound.loc9_24.4: = bound_method %.loc9_24.2, constants.%Op.404 +// CHECK:STDOUT: %Op.specific_fn.38: = specific_function constants.%Op.404, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] +// CHECK:STDOUT: %bound_method.loc9_24.4: = bound_method %.loc9_24.2, %Op.specific_fn.38 // CHECK:STDOUT: %addr.loc9_24.4: %ptr.3bd = addr_of %.loc9_24.2 -// CHECK:STDOUT: %no_op.loc9_24.4: init %empty_tuple.type = call %bound_method.loc9_24.8(%addr.loc9_24.4) -// CHECK:STDOUT: %impl.elem0.loc8_35.6: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc8_35.10: = bound_method %.loc8_35.1, %impl.elem0.loc8_35.6 -// CHECK:STDOUT: %specific_fn.loc8_35.5: = specific_function %impl.elem0.loc8_35.6, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc8_35.11: = bound_method %.loc8_35.1, %specific_fn.loc8_35.5 +// CHECK:STDOUT: %no_op.loc9_24.4: init %empty_tuple.type = call %bound_method.loc9_24.4(%addr.loc9_24.4) +// CHECK:STDOUT: %Op.bound.loc8_35.5: = bound_method %.loc8_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.39: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc8_35.6: = bound_method %.loc8_35.1, %Op.specific_fn.39 // CHECK:STDOUT: %addr.loc8_35.5: %ptr.f29 = addr_of %.loc8_35.1 -// CHECK:STDOUT: %no_op.loc8_35.5: init %empty_tuple.type = call %bound_method.loc8_35.11(%addr.loc8_35.5) -// CHECK:STDOUT: %impl.elem0.loc8_24.5: %.42d = impl_witness_access constants.%Destroy.impl_witness.af9, element0 [concrete = constants.%Op.ad8] -// CHECK:STDOUT: %bound_method.loc8_24.9: = bound_method %.loc8_24.2, %impl.elem0.loc8_24.5 -// CHECK:STDOUT: %specific_fn.loc8_24.5: = specific_function %impl.elem0.loc8_24.5, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] -// CHECK:STDOUT: %bound_method.loc8_24.10: = bound_method %.loc8_24.2, %specific_fn.loc8_24.5 +// CHECK:STDOUT: %no_op.loc8_35.5: init %empty_tuple.type = call %bound_method.loc8_35.6(%addr.loc8_35.5) +// CHECK:STDOUT: %Op.bound.loc8_24.5: = bound_method %.loc8_24.2, constants.%Op.ad8 +// CHECK:STDOUT: %Op.specific_fn.40: = specific_function constants.%Op.ad8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] +// CHECK:STDOUT: %bound_method.loc8_24.5: = bound_method %.loc8_24.2, %Op.specific_fn.40 // CHECK:STDOUT: %addr.loc8_24.5: %ptr.625 = addr_of %.loc8_24.2 -// CHECK:STDOUT: %no_op.loc8_24.5: init %empty_tuple.type = call %bound_method.loc8_24.10(%addr.loc8_24.5) -// CHECK:STDOUT: %impl.elem0.loc7_35.7: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.12: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.7 -// CHECK:STDOUT: %specific_fn.loc7_35.6: = specific_function %impl.elem0.loc7_35.7, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.13: = bound_method %.loc7_35.1, %specific_fn.loc7_35.6 +// CHECK:STDOUT: %no_op.loc8_24.5: init %empty_tuple.type = call %bound_method.loc8_24.5(%addr.loc8_24.5) +// CHECK:STDOUT: %Op.bound.loc7_35.6: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.41: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.7: = bound_method %.loc7_35.1, %Op.specific_fn.41 // CHECK:STDOUT: %addr.loc7_35.6: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.6: init %empty_tuple.type = call %bound_method.loc7_35.13(%addr.loc7_35.6) -// CHECK:STDOUT: %impl.elem0.loc7_24.6: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.11: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.6 -// CHECK:STDOUT: %specific_fn.loc7_24.6: = specific_function %impl.elem0.loc7_24.6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.12: = bound_method %.loc7_24.2, %specific_fn.loc7_24.6 +// CHECK:STDOUT: %no_op.loc7_35.6: init %empty_tuple.type = call %bound_method.loc7_35.7(%addr.loc7_35.6) +// CHECK:STDOUT: %Op.bound.loc7_24.6: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.42: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.6: = bound_method %.loc7_24.2, %Op.specific_fn.42 // CHECK:STDOUT: %addr.loc7_24.6: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.6: init %empty_tuple.type = call %bound_method.loc7_24.12(%addr.loc7_24.6) +// CHECK:STDOUT: %no_op.loc7_24.6: init %empty_tuple.type = call %bound_method.loc7_24.6(%addr.loc7_24.6) // CHECK:STDOUT: return %.loc12_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc12: @@ -1554,8 +1462,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %impl.elem0.loc13_34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_34.1: = bound_method %int_6, %impl.elem0.loc13_34 [concrete = constants.%Convert.bound.ce9] -// CHECK:STDOUT: %specific_fn.loc13_34: = specific_function %impl.elem0.loc13_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_34.2: = bound_method %int_6, %specific_fn.loc13_34 [concrete = constants.%bound_method.efa] +// CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc13_34.2: = bound_method %int_6, %specific_fn.loc13 [concrete = constants.%bound_method.efa] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %bound_method.loc13_34.2(%int_6) [concrete = constants.%int_6.e56] // CHECK:STDOUT: %.loc13_34.1: %i32 = value_of_initializer %int.convert_checked.loc13 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %.loc13_34.2: %i32 = converted %int_6, %.loc13_34.1 [concrete = constants.%int_6.e56] @@ -1564,96 +1472,82 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc13_24.3: init %C.c60 = class_init (), %.loc13_24.2 [concrete = constants.%C.val.a4b] // CHECK:STDOUT: %.loc13_24.4: ref %C.c60 = temporary %.loc13_24.2, %.loc13_24.3 // CHECK:STDOUT: %.loc13_26.1: ref %C.c60 = converted %.loc13_24.1, %.loc13_24.4 -// CHECK:STDOUT: %impl.elem0.loc13_35.1: %.874 = impl_witness_access constants.%ImplicitAs.impl_witness.e4d, element0 [concrete = constants.%Convert.f59] -// CHECK:STDOUT: %bound_method.loc13_35.1: = bound_method %.loc13_26.1, %impl.elem0.loc13_35.1 +// CHECK:STDOUT: %impl.elem0.loc13_35: %.874 = impl_witness_access constants.%ImplicitAs.impl_witness.e4d, element0 [concrete = constants.%Convert.f59] +// CHECK:STDOUT: %bound_method.loc13_35.1: = bound_method %.loc13_26.1, %impl.elem0.loc13_35 // CHECK:STDOUT: %.loc13_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc13_26.2: %C.c60 = bind_value %.loc13_26.1 // CHECK:STDOUT: %Convert.call.loc13: init %D = call %bound_method.loc13_35.1(%.loc13_26.2) to %.loc13_35.1 // CHECK:STDOUT: %.loc13_35.2: init %D = converted %.loc13_26.1, %Convert.call.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_35.2: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc13_35.2: = bound_method %.loc13_35.1, %impl.elem0.loc13_35.2 -// CHECK:STDOUT: %specific_fn.loc13_35.1: = specific_function %impl.elem0.loc13_35.2, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc13_35.3: = bound_method %.loc13_35.1, %specific_fn.loc13_35.1 +// CHECK:STDOUT: %Op.bound.loc13_35.1: = bound_method %.loc13_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.43: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc13_35.2: = bound_method %.loc13_35.1, %Op.specific_fn.43 // CHECK:STDOUT: %addr.loc13_35.1: %ptr.f29 = addr_of %.loc13_35.1 -// CHECK:STDOUT: %no_op.loc13_35.1: init %empty_tuple.type = call %bound_method.loc13_35.3(%addr.loc13_35.1) -// CHECK:STDOUT: %impl.elem0.loc13_24.1: %.3d7 = impl_witness_access constants.%Destroy.impl_witness.1e4, element0 [concrete = constants.%Op.ca5] -// CHECK:STDOUT: %bound_method.loc13_24.1: = bound_method %.loc13_24.2, %impl.elem0.loc13_24.1 -// CHECK:STDOUT: %specific_fn.loc13_24.1: = specific_function %impl.elem0.loc13_24.1, @Op.2(constants.%C.c60) [concrete = constants.%Op.specific_fn.8d0] -// CHECK:STDOUT: %bound_method.loc13_24.2: = bound_method %.loc13_24.2, %specific_fn.loc13_24.1 +// CHECK:STDOUT: %no_op.loc13_35.1: init %empty_tuple.type = call %bound_method.loc13_35.2(%addr.loc13_35.1) +// CHECK:STDOUT: %Op.bound.loc13_24.1: = bound_method %.loc13_24.2, constants.%Op.ca5 +// CHECK:STDOUT: %Op.specific_fn.44: = specific_function constants.%Op.ca5, @Op.2(constants.%C.c60) [concrete = constants.%Op.specific_fn.8d0] +// CHECK:STDOUT: %bound_method.loc13_24.1: = bound_method %.loc13_24.2, %Op.specific_fn.44 // CHECK:STDOUT: %addr.loc13_24.1: %ptr.b5e = addr_of %.loc13_24.2 -// CHECK:STDOUT: %no_op.loc13_24.1: init %empty_tuple.type = call %bound_method.loc13_24.2(%addr.loc13_24.1) -// CHECK:STDOUT: %impl.elem0.loc12_35.3: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc12_35.4: = bound_method %.loc12_35.1, %impl.elem0.loc12_35.3 -// CHECK:STDOUT: %specific_fn.loc12_35.2: = specific_function %impl.elem0.loc12_35.3, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc12_35.5: = bound_method %.loc12_35.1, %specific_fn.loc12_35.2 +// CHECK:STDOUT: %no_op.loc13_24.1: init %empty_tuple.type = call %bound_method.loc13_24.1(%addr.loc13_24.1) +// CHECK:STDOUT: %Op.bound.loc12_35.2: = bound_method %.loc12_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.45: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc12_35.3: = bound_method %.loc12_35.1, %Op.specific_fn.45 // CHECK:STDOUT: %addr.loc12_35.2: %ptr.f29 = addr_of %.loc12_35.1 -// CHECK:STDOUT: %no_op.loc12_35.2: init %empty_tuple.type = call %bound_method.loc12_35.5(%addr.loc12_35.2) -// CHECK:STDOUT: %impl.elem0.loc12_24.2: %.89c = impl_witness_access constants.%Destroy.impl_witness.818, element0 [concrete = constants.%Op.985] -// CHECK:STDOUT: %bound_method.loc12_24.3: = bound_method %.loc12_24.2, %impl.elem0.loc12_24.2 -// CHECK:STDOUT: %specific_fn.loc12_24.2: = specific_function %impl.elem0.loc12_24.2, @Op.2(constants.%C.f0a) [concrete = constants.%Op.specific_fn.a66] -// CHECK:STDOUT: %bound_method.loc12_24.4: = bound_method %.loc12_24.2, %specific_fn.loc12_24.2 +// CHECK:STDOUT: %no_op.loc12_35.2: init %empty_tuple.type = call %bound_method.loc12_35.3(%addr.loc12_35.2) +// CHECK:STDOUT: %Op.bound.loc12_24.2: = bound_method %.loc12_24.2, constants.%Op.985 +// CHECK:STDOUT: %Op.specific_fn.46: = specific_function constants.%Op.985, @Op.2(constants.%C.f0a) [concrete = constants.%Op.specific_fn.a66] +// CHECK:STDOUT: %bound_method.loc12_24.2: = bound_method %.loc12_24.2, %Op.specific_fn.46 // CHECK:STDOUT: %addr.loc12_24.2: %ptr.24c = addr_of %.loc12_24.2 -// CHECK:STDOUT: %no_op.loc12_24.2: init %empty_tuple.type = call %bound_method.loc12_24.4(%addr.loc12_24.2) -// CHECK:STDOUT: %impl.elem0.loc11_35.4: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc11_35.6: = bound_method %.loc11_35.1, %impl.elem0.loc11_35.4 -// CHECK:STDOUT: %specific_fn.loc11_35.3: = specific_function %impl.elem0.loc11_35.4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc11_35.7: = bound_method %.loc11_35.1, %specific_fn.loc11_35.3 +// CHECK:STDOUT: %no_op.loc12_24.2: init %empty_tuple.type = call %bound_method.loc12_24.2(%addr.loc12_24.2) +// CHECK:STDOUT: %Op.bound.loc11_35.3: = bound_method %.loc11_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.47: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc11_35.4: = bound_method %.loc11_35.1, %Op.specific_fn.47 // CHECK:STDOUT: %addr.loc11_35.3: %ptr.f29 = addr_of %.loc11_35.1 -// CHECK:STDOUT: %no_op.loc11_35.3: init %empty_tuple.type = call %bound_method.loc11_35.7(%addr.loc11_35.3) -// CHECK:STDOUT: %impl.elem0.loc11_24.3: %.6ca = impl_witness_access constants.%Destroy.impl_witness.f66, element0 [concrete = constants.%Op.6b4] -// CHECK:STDOUT: %bound_method.loc11_24.5: = bound_method %.loc11_24.2, %impl.elem0.loc11_24.3 -// CHECK:STDOUT: %specific_fn.loc11_24.3: = specific_function %impl.elem0.loc11_24.3, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] -// CHECK:STDOUT: %bound_method.loc11_24.6: = bound_method %.loc11_24.2, %specific_fn.loc11_24.3 +// CHECK:STDOUT: %no_op.loc11_35.3: init %empty_tuple.type = call %bound_method.loc11_35.4(%addr.loc11_35.3) +// CHECK:STDOUT: %Op.bound.loc11_24.3: = bound_method %.loc11_24.2, constants.%Op.6b4 +// CHECK:STDOUT: %Op.specific_fn.48: = specific_function constants.%Op.6b4, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] +// CHECK:STDOUT: %bound_method.loc11_24.3: = bound_method %.loc11_24.2, %Op.specific_fn.48 // CHECK:STDOUT: %addr.loc11_24.3: %ptr.c28b = addr_of %.loc11_24.2 -// CHECK:STDOUT: %no_op.loc11_24.3: init %empty_tuple.type = call %bound_method.loc11_24.6(%addr.loc11_24.3) -// CHECK:STDOUT: %impl.elem0.loc10_35.5: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc10_35.8: = bound_method %.loc10_35.1, %impl.elem0.loc10_35.5 -// CHECK:STDOUT: %specific_fn.loc10_35.4: = specific_function %impl.elem0.loc10_35.5, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc10_35.9: = bound_method %.loc10_35.1, %specific_fn.loc10_35.4 +// CHECK:STDOUT: %no_op.loc11_24.3: init %empty_tuple.type = call %bound_method.loc11_24.3(%addr.loc11_24.3) +// CHECK:STDOUT: %Op.bound.loc10_35.4: = bound_method %.loc10_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.49: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc10_35.5: = bound_method %.loc10_35.1, %Op.specific_fn.49 // CHECK:STDOUT: %addr.loc10_35.4: %ptr.f29 = addr_of %.loc10_35.1 -// CHECK:STDOUT: %no_op.loc10_35.4: init %empty_tuple.type = call %bound_method.loc10_35.9(%addr.loc10_35.4) -// CHECK:STDOUT: %impl.elem0.loc10_24.4: %.f23 = impl_witness_access constants.%Destroy.impl_witness.4d8, element0 [concrete = constants.%Op.9cf] -// CHECK:STDOUT: %bound_method.loc10_24.7: = bound_method %.loc10_24.2, %impl.elem0.loc10_24.4 -// CHECK:STDOUT: %specific_fn.loc10_24.4: = specific_function %impl.elem0.loc10_24.4, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] -// CHECK:STDOUT: %bound_method.loc10_24.8: = bound_method %.loc10_24.2, %specific_fn.loc10_24.4 +// CHECK:STDOUT: %no_op.loc10_35.4: init %empty_tuple.type = call %bound_method.loc10_35.5(%addr.loc10_35.4) +// CHECK:STDOUT: %Op.bound.loc10_24.4: = bound_method %.loc10_24.2, constants.%Op.9cf +// CHECK:STDOUT: %Op.specific_fn.50: = specific_function constants.%Op.9cf, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] +// CHECK:STDOUT: %bound_method.loc10_24.4: = bound_method %.loc10_24.2, %Op.specific_fn.50 // CHECK:STDOUT: %addr.loc10_24.4: %ptr.2b1 = addr_of %.loc10_24.2 -// CHECK:STDOUT: %no_op.loc10_24.4: init %empty_tuple.type = call %bound_method.loc10_24.8(%addr.loc10_24.4) -// CHECK:STDOUT: %impl.elem0.loc9_35.6: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc9_35.10: = bound_method %.loc9_35.1, %impl.elem0.loc9_35.6 -// CHECK:STDOUT: %specific_fn.loc9_35.5: = specific_function %impl.elem0.loc9_35.6, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc9_35.11: = bound_method %.loc9_35.1, %specific_fn.loc9_35.5 +// CHECK:STDOUT: %no_op.loc10_24.4: init %empty_tuple.type = call %bound_method.loc10_24.4(%addr.loc10_24.4) +// CHECK:STDOUT: %Op.bound.loc9_35.5: = bound_method %.loc9_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.51: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc9_35.6: = bound_method %.loc9_35.1, %Op.specific_fn.51 // CHECK:STDOUT: %addr.loc9_35.5: %ptr.f29 = addr_of %.loc9_35.1 -// CHECK:STDOUT: %no_op.loc9_35.5: init %empty_tuple.type = call %bound_method.loc9_35.11(%addr.loc9_35.5) -// CHECK:STDOUT: %impl.elem0.loc9_24.5: %.715 = impl_witness_access constants.%Destroy.impl_witness.3a3, element0 [concrete = constants.%Op.404] -// CHECK:STDOUT: %bound_method.loc9_24.9: = bound_method %.loc9_24.2, %impl.elem0.loc9_24.5 -// CHECK:STDOUT: %specific_fn.loc9_24.5: = specific_function %impl.elem0.loc9_24.5, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] -// CHECK:STDOUT: %bound_method.loc9_24.10: = bound_method %.loc9_24.2, %specific_fn.loc9_24.5 +// CHECK:STDOUT: %no_op.loc9_35.5: init %empty_tuple.type = call %bound_method.loc9_35.6(%addr.loc9_35.5) +// CHECK:STDOUT: %Op.bound.loc9_24.5: = bound_method %.loc9_24.2, constants.%Op.404 +// CHECK:STDOUT: %Op.specific_fn.52: = specific_function constants.%Op.404, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] +// CHECK:STDOUT: %bound_method.loc9_24.5: = bound_method %.loc9_24.2, %Op.specific_fn.52 // CHECK:STDOUT: %addr.loc9_24.5: %ptr.3bd = addr_of %.loc9_24.2 -// CHECK:STDOUT: %no_op.loc9_24.5: init %empty_tuple.type = call %bound_method.loc9_24.10(%addr.loc9_24.5) -// CHECK:STDOUT: %impl.elem0.loc8_35.7: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc8_35.12: = bound_method %.loc8_35.1, %impl.elem0.loc8_35.7 -// CHECK:STDOUT: %specific_fn.loc8_35.6: = specific_function %impl.elem0.loc8_35.7, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc8_35.13: = bound_method %.loc8_35.1, %specific_fn.loc8_35.6 +// CHECK:STDOUT: %no_op.loc9_24.5: init %empty_tuple.type = call %bound_method.loc9_24.5(%addr.loc9_24.5) +// CHECK:STDOUT: %Op.bound.loc8_35.6: = bound_method %.loc8_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.53: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc8_35.7: = bound_method %.loc8_35.1, %Op.specific_fn.53 // CHECK:STDOUT: %addr.loc8_35.6: %ptr.f29 = addr_of %.loc8_35.1 -// CHECK:STDOUT: %no_op.loc8_35.6: init %empty_tuple.type = call %bound_method.loc8_35.13(%addr.loc8_35.6) -// CHECK:STDOUT: %impl.elem0.loc8_24.6: %.42d = impl_witness_access constants.%Destroy.impl_witness.af9, element0 [concrete = constants.%Op.ad8] -// CHECK:STDOUT: %bound_method.loc8_24.11: = bound_method %.loc8_24.2, %impl.elem0.loc8_24.6 -// CHECK:STDOUT: %specific_fn.loc8_24.6: = specific_function %impl.elem0.loc8_24.6, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] -// CHECK:STDOUT: %bound_method.loc8_24.12: = bound_method %.loc8_24.2, %specific_fn.loc8_24.6 +// CHECK:STDOUT: %no_op.loc8_35.6: init %empty_tuple.type = call %bound_method.loc8_35.7(%addr.loc8_35.6) +// CHECK:STDOUT: %Op.bound.loc8_24.6: = bound_method %.loc8_24.2, constants.%Op.ad8 +// CHECK:STDOUT: %Op.specific_fn.54: = specific_function constants.%Op.ad8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] +// CHECK:STDOUT: %bound_method.loc8_24.6: = bound_method %.loc8_24.2, %Op.specific_fn.54 // CHECK:STDOUT: %addr.loc8_24.6: %ptr.625 = addr_of %.loc8_24.2 -// CHECK:STDOUT: %no_op.loc8_24.6: init %empty_tuple.type = call %bound_method.loc8_24.12(%addr.loc8_24.6) -// CHECK:STDOUT: %impl.elem0.loc7_35.8: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.14: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.8 -// CHECK:STDOUT: %specific_fn.loc7_35.7: = specific_function %impl.elem0.loc7_35.8, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.15: = bound_method %.loc7_35.1, %specific_fn.loc7_35.7 +// CHECK:STDOUT: %no_op.loc8_24.6: init %empty_tuple.type = call %bound_method.loc8_24.6(%addr.loc8_24.6) +// CHECK:STDOUT: %Op.bound.loc7_35.7: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.55: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.8: = bound_method %.loc7_35.1, %Op.specific_fn.55 // CHECK:STDOUT: %addr.loc7_35.7: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.7: init %empty_tuple.type = call %bound_method.loc7_35.15(%addr.loc7_35.7) -// CHECK:STDOUT: %impl.elem0.loc7_24.7: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.13: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.7 -// CHECK:STDOUT: %specific_fn.loc7_24.7: = specific_function %impl.elem0.loc7_24.7, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.14: = bound_method %.loc7_24.2, %specific_fn.loc7_24.7 +// CHECK:STDOUT: %no_op.loc7_35.7: init %empty_tuple.type = call %bound_method.loc7_35.8(%addr.loc7_35.7) +// CHECK:STDOUT: %Op.bound.loc7_24.7: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.56: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.7: = bound_method %.loc7_24.2, %Op.specific_fn.56 // CHECK:STDOUT: %addr.loc7_24.7: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.7: init %empty_tuple.type = call %bound_method.loc7_24.14(%addr.loc7_24.7) +// CHECK:STDOUT: %no_op.loc7_24.7: init %empty_tuple.type = call %bound_method.loc7_24.7(%addr.loc7_24.7) // CHECK:STDOUT: return %.loc13_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc13: @@ -1667,8 +1561,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] // CHECK:STDOUT: %impl.elem0.loc14_34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_34.1: = bound_method %int_7, %impl.elem0.loc14_34 [concrete = constants.%Convert.bound.208] -// CHECK:STDOUT: %specific_fn.loc14_34: = specific_function %impl.elem0.loc14_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_34.2: = bound_method %int_7, %specific_fn.loc14_34 [concrete = constants.%bound_method.3bd] +// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14_34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc14_34.2: = bound_method %int_7, %specific_fn.loc14 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %bound_method.loc14_34.2(%int_7) [concrete = constants.%int_7.0b1] // CHECK:STDOUT: %.loc14_34.1: %i32 = value_of_initializer %int.convert_checked.loc14 [concrete = constants.%int_7.0b1] // CHECK:STDOUT: %.loc14_34.2: %i32 = converted %int_7, %.loc14_34.1 [concrete = constants.%int_7.0b1] @@ -1677,108 +1571,92 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc14_24.3: init %C.304 = class_init (), %.loc14_24.2 [concrete = constants.%C.val.f9f] // CHECK:STDOUT: %.loc14_24.4: ref %C.304 = temporary %.loc14_24.2, %.loc14_24.3 // CHECK:STDOUT: %.loc14_26.1: ref %C.304 = converted %.loc14_24.1, %.loc14_24.4 -// CHECK:STDOUT: %impl.elem0.loc14_35.1: %.79b = impl_witness_access constants.%ImplicitAs.impl_witness.0ca, element0 [concrete = constants.%Convert.6c1] -// CHECK:STDOUT: %bound_method.loc14_35.1: = bound_method %.loc14_26.1, %impl.elem0.loc14_35.1 +// CHECK:STDOUT: %impl.elem0.loc14_35: %.79b = impl_witness_access constants.%ImplicitAs.impl_witness.0ca, element0 [concrete = constants.%Convert.6c1] +// CHECK:STDOUT: %bound_method.loc14_35.1: = bound_method %.loc14_26.1, %impl.elem0.loc14_35 // CHECK:STDOUT: %.loc14_35.1: ref %D = temporary_storage // CHECK:STDOUT: %.loc14_26.2: %C.304 = bind_value %.loc14_26.1 // CHECK:STDOUT: %Convert.call.loc14: init %D = call %bound_method.loc14_35.1(%.loc14_26.2) to %.loc14_35.1 // CHECK:STDOUT: %.loc14_35.2: init %D = converted %.loc14_26.1, %Convert.call.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_35.2: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc14_35.2: = bound_method %.loc14_35.1, %impl.elem0.loc14_35.2 -// CHECK:STDOUT: %specific_fn.loc14_35.1: = specific_function %impl.elem0.loc14_35.2, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc14_35.3: = bound_method %.loc14_35.1, %specific_fn.loc14_35.1 +// CHECK:STDOUT: %Op.bound.loc14_35.1: = bound_method %.loc14_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.57: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc14_35.2: = bound_method %.loc14_35.1, %Op.specific_fn.57 // CHECK:STDOUT: %addr.loc14_35.1: %ptr.f29 = addr_of %.loc14_35.1 -// CHECK:STDOUT: %no_op.loc14_35.1: init %empty_tuple.type = call %bound_method.loc14_35.3(%addr.loc14_35.1) -// CHECK:STDOUT: %impl.elem0.loc14_24.1: %.3a6 = impl_witness_access constants.%Destroy.impl_witness.cc5, element0 [concrete = constants.%Op.6fc] -// CHECK:STDOUT: %bound_method.loc14_24.1: = bound_method %.loc14_24.2, %impl.elem0.loc14_24.1 -// CHECK:STDOUT: %specific_fn.loc14_24.1: = specific_function %impl.elem0.loc14_24.1, @Op.2(constants.%C.304) [concrete = constants.%Op.specific_fn.a08] -// CHECK:STDOUT: %bound_method.loc14_24.2: = bound_method %.loc14_24.2, %specific_fn.loc14_24.1 +// CHECK:STDOUT: %no_op.loc14_35.1: init %empty_tuple.type = call %bound_method.loc14_35.2(%addr.loc14_35.1) +// CHECK:STDOUT: %Op.bound.loc14_24.1: = bound_method %.loc14_24.2, constants.%Op.6fc +// CHECK:STDOUT: %Op.specific_fn.58: = specific_function constants.%Op.6fc, @Op.2(constants.%C.304) [concrete = constants.%Op.specific_fn.a08] +// CHECK:STDOUT: %bound_method.loc14_24.1: = bound_method %.loc14_24.2, %Op.specific_fn.58 // CHECK:STDOUT: %addr.loc14_24.1: %ptr.dc3 = addr_of %.loc14_24.2 -// CHECK:STDOUT: %no_op.loc14_24.1: init %empty_tuple.type = call %bound_method.loc14_24.2(%addr.loc14_24.1) -// CHECK:STDOUT: %impl.elem0.loc13_35.3: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc13_35.4: = bound_method %.loc13_35.1, %impl.elem0.loc13_35.3 -// CHECK:STDOUT: %specific_fn.loc13_35.2: = specific_function %impl.elem0.loc13_35.3, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc13_35.5: = bound_method %.loc13_35.1, %specific_fn.loc13_35.2 +// CHECK:STDOUT: %no_op.loc14_24.1: init %empty_tuple.type = call %bound_method.loc14_24.1(%addr.loc14_24.1) +// CHECK:STDOUT: %Op.bound.loc13_35.2: = bound_method %.loc13_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.59: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc13_35.3: = bound_method %.loc13_35.1, %Op.specific_fn.59 // CHECK:STDOUT: %addr.loc13_35.2: %ptr.f29 = addr_of %.loc13_35.1 -// CHECK:STDOUT: %no_op.loc13_35.2: init %empty_tuple.type = call %bound_method.loc13_35.5(%addr.loc13_35.2) -// CHECK:STDOUT: %impl.elem0.loc13_24.2: %.3d7 = impl_witness_access constants.%Destroy.impl_witness.1e4, element0 [concrete = constants.%Op.ca5] -// CHECK:STDOUT: %bound_method.loc13_24.3: = bound_method %.loc13_24.2, %impl.elem0.loc13_24.2 -// CHECK:STDOUT: %specific_fn.loc13_24.2: = specific_function %impl.elem0.loc13_24.2, @Op.2(constants.%C.c60) [concrete = constants.%Op.specific_fn.8d0] -// CHECK:STDOUT: %bound_method.loc13_24.4: = bound_method %.loc13_24.2, %specific_fn.loc13_24.2 +// CHECK:STDOUT: %no_op.loc13_35.2: init %empty_tuple.type = call %bound_method.loc13_35.3(%addr.loc13_35.2) +// CHECK:STDOUT: %Op.bound.loc13_24.2: = bound_method %.loc13_24.2, constants.%Op.ca5 +// CHECK:STDOUT: %Op.specific_fn.60: = specific_function constants.%Op.ca5, @Op.2(constants.%C.c60) [concrete = constants.%Op.specific_fn.8d0] +// CHECK:STDOUT: %bound_method.loc13_24.2: = bound_method %.loc13_24.2, %Op.specific_fn.60 // CHECK:STDOUT: %addr.loc13_24.2: %ptr.b5e = addr_of %.loc13_24.2 -// CHECK:STDOUT: %no_op.loc13_24.2: init %empty_tuple.type = call %bound_method.loc13_24.4(%addr.loc13_24.2) -// CHECK:STDOUT: %impl.elem0.loc12_35.4: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc12_35.6: = bound_method %.loc12_35.1, %impl.elem0.loc12_35.4 -// CHECK:STDOUT: %specific_fn.loc12_35.3: = specific_function %impl.elem0.loc12_35.4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc12_35.7: = bound_method %.loc12_35.1, %specific_fn.loc12_35.3 +// CHECK:STDOUT: %no_op.loc13_24.2: init %empty_tuple.type = call %bound_method.loc13_24.2(%addr.loc13_24.2) +// CHECK:STDOUT: %Op.bound.loc12_35.3: = bound_method %.loc12_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.61: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc12_35.4: = bound_method %.loc12_35.1, %Op.specific_fn.61 // CHECK:STDOUT: %addr.loc12_35.3: %ptr.f29 = addr_of %.loc12_35.1 -// CHECK:STDOUT: %no_op.loc12_35.3: init %empty_tuple.type = call %bound_method.loc12_35.7(%addr.loc12_35.3) -// CHECK:STDOUT: %impl.elem0.loc12_24.3: %.89c = impl_witness_access constants.%Destroy.impl_witness.818, element0 [concrete = constants.%Op.985] -// CHECK:STDOUT: %bound_method.loc12_24.5: = bound_method %.loc12_24.2, %impl.elem0.loc12_24.3 -// CHECK:STDOUT: %specific_fn.loc12_24.3: = specific_function %impl.elem0.loc12_24.3, @Op.2(constants.%C.f0a) [concrete = constants.%Op.specific_fn.a66] -// CHECK:STDOUT: %bound_method.loc12_24.6: = bound_method %.loc12_24.2, %specific_fn.loc12_24.3 +// CHECK:STDOUT: %no_op.loc12_35.3: init %empty_tuple.type = call %bound_method.loc12_35.4(%addr.loc12_35.3) +// CHECK:STDOUT: %Op.bound.loc12_24.3: = bound_method %.loc12_24.2, constants.%Op.985 +// CHECK:STDOUT: %Op.specific_fn.62: = specific_function constants.%Op.985, @Op.2(constants.%C.f0a) [concrete = constants.%Op.specific_fn.a66] +// CHECK:STDOUT: %bound_method.loc12_24.3: = bound_method %.loc12_24.2, %Op.specific_fn.62 // CHECK:STDOUT: %addr.loc12_24.3: %ptr.24c = addr_of %.loc12_24.2 -// CHECK:STDOUT: %no_op.loc12_24.3: init %empty_tuple.type = call %bound_method.loc12_24.6(%addr.loc12_24.3) -// CHECK:STDOUT: %impl.elem0.loc11_35.5: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc11_35.8: = bound_method %.loc11_35.1, %impl.elem0.loc11_35.5 -// CHECK:STDOUT: %specific_fn.loc11_35.4: = specific_function %impl.elem0.loc11_35.5, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc11_35.9: = bound_method %.loc11_35.1, %specific_fn.loc11_35.4 +// CHECK:STDOUT: %no_op.loc12_24.3: init %empty_tuple.type = call %bound_method.loc12_24.3(%addr.loc12_24.3) +// CHECK:STDOUT: %Op.bound.loc11_35.4: = bound_method %.loc11_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.63: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc11_35.5: = bound_method %.loc11_35.1, %Op.specific_fn.63 // CHECK:STDOUT: %addr.loc11_35.4: %ptr.f29 = addr_of %.loc11_35.1 -// CHECK:STDOUT: %no_op.loc11_35.4: init %empty_tuple.type = call %bound_method.loc11_35.9(%addr.loc11_35.4) -// CHECK:STDOUT: %impl.elem0.loc11_24.4: %.6ca = impl_witness_access constants.%Destroy.impl_witness.f66, element0 [concrete = constants.%Op.6b4] -// CHECK:STDOUT: %bound_method.loc11_24.7: = bound_method %.loc11_24.2, %impl.elem0.loc11_24.4 -// CHECK:STDOUT: %specific_fn.loc11_24.4: = specific_function %impl.elem0.loc11_24.4, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] -// CHECK:STDOUT: %bound_method.loc11_24.8: = bound_method %.loc11_24.2, %specific_fn.loc11_24.4 +// CHECK:STDOUT: %no_op.loc11_35.4: init %empty_tuple.type = call %bound_method.loc11_35.5(%addr.loc11_35.4) +// CHECK:STDOUT: %Op.bound.loc11_24.4: = bound_method %.loc11_24.2, constants.%Op.6b4 +// CHECK:STDOUT: %Op.specific_fn.64: = specific_function constants.%Op.6b4, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] +// CHECK:STDOUT: %bound_method.loc11_24.4: = bound_method %.loc11_24.2, %Op.specific_fn.64 // CHECK:STDOUT: %addr.loc11_24.4: %ptr.c28b = addr_of %.loc11_24.2 -// CHECK:STDOUT: %no_op.loc11_24.4: init %empty_tuple.type = call %bound_method.loc11_24.8(%addr.loc11_24.4) -// CHECK:STDOUT: %impl.elem0.loc10_35.6: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc10_35.10: = bound_method %.loc10_35.1, %impl.elem0.loc10_35.6 -// CHECK:STDOUT: %specific_fn.loc10_35.5: = specific_function %impl.elem0.loc10_35.6, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc10_35.11: = bound_method %.loc10_35.1, %specific_fn.loc10_35.5 +// CHECK:STDOUT: %no_op.loc11_24.4: init %empty_tuple.type = call %bound_method.loc11_24.4(%addr.loc11_24.4) +// CHECK:STDOUT: %Op.bound.loc10_35.5: = bound_method %.loc10_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.65: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc10_35.6: = bound_method %.loc10_35.1, %Op.specific_fn.65 // CHECK:STDOUT: %addr.loc10_35.5: %ptr.f29 = addr_of %.loc10_35.1 -// CHECK:STDOUT: %no_op.loc10_35.5: init %empty_tuple.type = call %bound_method.loc10_35.11(%addr.loc10_35.5) -// CHECK:STDOUT: %impl.elem0.loc10_24.5: %.f23 = impl_witness_access constants.%Destroy.impl_witness.4d8, element0 [concrete = constants.%Op.9cf] -// CHECK:STDOUT: %bound_method.loc10_24.9: = bound_method %.loc10_24.2, %impl.elem0.loc10_24.5 -// CHECK:STDOUT: %specific_fn.loc10_24.5: = specific_function %impl.elem0.loc10_24.5, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] -// CHECK:STDOUT: %bound_method.loc10_24.10: = bound_method %.loc10_24.2, %specific_fn.loc10_24.5 +// CHECK:STDOUT: %no_op.loc10_35.5: init %empty_tuple.type = call %bound_method.loc10_35.6(%addr.loc10_35.5) +// CHECK:STDOUT: %Op.bound.loc10_24.5: = bound_method %.loc10_24.2, constants.%Op.9cf +// CHECK:STDOUT: %Op.specific_fn.66: = specific_function constants.%Op.9cf, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] +// CHECK:STDOUT: %bound_method.loc10_24.5: = bound_method %.loc10_24.2, %Op.specific_fn.66 // CHECK:STDOUT: %addr.loc10_24.5: %ptr.2b1 = addr_of %.loc10_24.2 -// CHECK:STDOUT: %no_op.loc10_24.5: init %empty_tuple.type = call %bound_method.loc10_24.10(%addr.loc10_24.5) -// CHECK:STDOUT: %impl.elem0.loc9_35.7: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc9_35.12: = bound_method %.loc9_35.1, %impl.elem0.loc9_35.7 -// CHECK:STDOUT: %specific_fn.loc9_35.6: = specific_function %impl.elem0.loc9_35.7, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc9_35.13: = bound_method %.loc9_35.1, %specific_fn.loc9_35.6 +// CHECK:STDOUT: %no_op.loc10_24.5: init %empty_tuple.type = call %bound_method.loc10_24.5(%addr.loc10_24.5) +// CHECK:STDOUT: %Op.bound.loc9_35.6: = bound_method %.loc9_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.67: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc9_35.7: = bound_method %.loc9_35.1, %Op.specific_fn.67 // CHECK:STDOUT: %addr.loc9_35.6: %ptr.f29 = addr_of %.loc9_35.1 -// CHECK:STDOUT: %no_op.loc9_35.6: init %empty_tuple.type = call %bound_method.loc9_35.13(%addr.loc9_35.6) -// CHECK:STDOUT: %impl.elem0.loc9_24.6: %.715 = impl_witness_access constants.%Destroy.impl_witness.3a3, element0 [concrete = constants.%Op.404] -// CHECK:STDOUT: %bound_method.loc9_24.11: = bound_method %.loc9_24.2, %impl.elem0.loc9_24.6 -// CHECK:STDOUT: %specific_fn.loc9_24.6: = specific_function %impl.elem0.loc9_24.6, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] -// CHECK:STDOUT: %bound_method.loc9_24.12: = bound_method %.loc9_24.2, %specific_fn.loc9_24.6 +// CHECK:STDOUT: %no_op.loc9_35.6: init %empty_tuple.type = call %bound_method.loc9_35.7(%addr.loc9_35.6) +// CHECK:STDOUT: %Op.bound.loc9_24.6: = bound_method %.loc9_24.2, constants.%Op.404 +// CHECK:STDOUT: %Op.specific_fn.68: = specific_function constants.%Op.404, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] +// CHECK:STDOUT: %bound_method.loc9_24.6: = bound_method %.loc9_24.2, %Op.specific_fn.68 // CHECK:STDOUT: %addr.loc9_24.6: %ptr.3bd = addr_of %.loc9_24.2 -// CHECK:STDOUT: %no_op.loc9_24.6: init %empty_tuple.type = call %bound_method.loc9_24.12(%addr.loc9_24.6) -// CHECK:STDOUT: %impl.elem0.loc8_35.8: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc8_35.14: = bound_method %.loc8_35.1, %impl.elem0.loc8_35.8 -// CHECK:STDOUT: %specific_fn.loc8_35.7: = specific_function %impl.elem0.loc8_35.8, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc8_35.15: = bound_method %.loc8_35.1, %specific_fn.loc8_35.7 +// CHECK:STDOUT: %no_op.loc9_24.6: init %empty_tuple.type = call %bound_method.loc9_24.6(%addr.loc9_24.6) +// CHECK:STDOUT: %Op.bound.loc8_35.7: = bound_method %.loc8_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.69: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc8_35.8: = bound_method %.loc8_35.1, %Op.specific_fn.69 // CHECK:STDOUT: %addr.loc8_35.7: %ptr.f29 = addr_of %.loc8_35.1 -// CHECK:STDOUT: %no_op.loc8_35.7: init %empty_tuple.type = call %bound_method.loc8_35.15(%addr.loc8_35.7) -// CHECK:STDOUT: %impl.elem0.loc8_24.7: %.42d = impl_witness_access constants.%Destroy.impl_witness.af9, element0 [concrete = constants.%Op.ad8] -// CHECK:STDOUT: %bound_method.loc8_24.13: = bound_method %.loc8_24.2, %impl.elem0.loc8_24.7 -// CHECK:STDOUT: %specific_fn.loc8_24.7: = specific_function %impl.elem0.loc8_24.7, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] -// CHECK:STDOUT: %bound_method.loc8_24.14: = bound_method %.loc8_24.2, %specific_fn.loc8_24.7 +// CHECK:STDOUT: %no_op.loc8_35.7: init %empty_tuple.type = call %bound_method.loc8_35.8(%addr.loc8_35.7) +// CHECK:STDOUT: %Op.bound.loc8_24.7: = bound_method %.loc8_24.2, constants.%Op.ad8 +// CHECK:STDOUT: %Op.specific_fn.70: = specific_function constants.%Op.ad8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] +// CHECK:STDOUT: %bound_method.loc8_24.7: = bound_method %.loc8_24.2, %Op.specific_fn.70 // CHECK:STDOUT: %addr.loc8_24.7: %ptr.625 = addr_of %.loc8_24.2 -// CHECK:STDOUT: %no_op.loc8_24.7: init %empty_tuple.type = call %bound_method.loc8_24.14(%addr.loc8_24.7) -// CHECK:STDOUT: %impl.elem0.loc7_35.9: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.16: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.9 -// CHECK:STDOUT: %specific_fn.loc7_35.8: = specific_function %impl.elem0.loc7_35.9, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.17: = bound_method %.loc7_35.1, %specific_fn.loc7_35.8 +// CHECK:STDOUT: %no_op.loc8_24.7: init %empty_tuple.type = call %bound_method.loc8_24.7(%addr.loc8_24.7) +// CHECK:STDOUT: %Op.bound.loc7_35.8: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.71: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.9: = bound_method %.loc7_35.1, %Op.specific_fn.71 // CHECK:STDOUT: %addr.loc7_35.8: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.8: init %empty_tuple.type = call %bound_method.loc7_35.17(%addr.loc7_35.8) -// CHECK:STDOUT: %impl.elem0.loc7_24.8: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.15: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.8 -// CHECK:STDOUT: %specific_fn.loc7_24.8: = specific_function %impl.elem0.loc7_24.8, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.16: = bound_method %.loc7_24.2, %specific_fn.loc7_24.8 +// CHECK:STDOUT: %no_op.loc7_35.8: init %empty_tuple.type = call %bound_method.loc7_35.9(%addr.loc7_35.8) +// CHECK:STDOUT: %Op.bound.loc7_24.8: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.72: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.8: = bound_method %.loc7_24.2, %Op.specific_fn.72 // CHECK:STDOUT: %addr.loc7_24.8: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.8: init %empty_tuple.type = call %bound_method.loc7_24.16(%addr.loc7_24.8) +// CHECK:STDOUT: %no_op.loc7_24.8: init %empty_tuple.type = call %bound_method.loc7_24.8(%addr.loc7_24.8) // CHECK:STDOUT: return %.loc14_35.2 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc14: @@ -1786,108 +1664,91 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, imports.%P.Make [concrete = constants.%Make] // CHECK:STDOUT: %.loc6_15: ref %D = splice_block %return {} // CHECK:STDOUT: %Make.call: init %D = call %Make.ref() to %.loc6_15 -// CHECK:STDOUT: %impl.elem0.loc6: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc6_15.1: = bound_method %.loc6_15, %impl.elem0.loc6 -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc6_15.2: = bound_method %.loc6_15, %specific_fn.loc6 +// CHECK:STDOUT: %Op.bound.loc6: = bound_method %.loc6_15, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.73: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc6: = bound_method %.loc6_15, %Op.specific_fn.73 // CHECK:STDOUT: %addr.loc6: %ptr.f29 = addr_of %.loc6_15 -// CHECK:STDOUT: %no_op.loc6: init %empty_tuple.type = call %bound_method.loc6_15.2(%addr.loc6) -// CHECK:STDOUT: %impl.elem0.loc14_35.3: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc14_35.4: = bound_method %.loc14_35.1, %impl.elem0.loc14_35.3 -// CHECK:STDOUT: %specific_fn.loc14_35.2: = specific_function %impl.elem0.loc14_35.3, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc14_35.5: = bound_method %.loc14_35.1, %specific_fn.loc14_35.2 +// CHECK:STDOUT: %no_op.loc6: init %empty_tuple.type = call %bound_method.loc6(%addr.loc6) +// CHECK:STDOUT: %Op.bound.loc14_35.2: = bound_method %.loc14_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.74: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc14_35.3: = bound_method %.loc14_35.1, %Op.specific_fn.74 // CHECK:STDOUT: %addr.loc14_35.2: %ptr.f29 = addr_of %.loc14_35.1 -// CHECK:STDOUT: %no_op.loc14_35.2: init %empty_tuple.type = call %bound_method.loc14_35.5(%addr.loc14_35.2) -// CHECK:STDOUT: %impl.elem0.loc14_24.2: %.3a6 = impl_witness_access constants.%Destroy.impl_witness.cc5, element0 [concrete = constants.%Op.6fc] -// CHECK:STDOUT: %bound_method.loc14_24.3: = bound_method %.loc14_24.2, %impl.elem0.loc14_24.2 -// CHECK:STDOUT: %specific_fn.loc14_24.2: = specific_function %impl.elem0.loc14_24.2, @Op.2(constants.%C.304) [concrete = constants.%Op.specific_fn.a08] -// CHECK:STDOUT: %bound_method.loc14_24.4: = bound_method %.loc14_24.2, %specific_fn.loc14_24.2 +// CHECK:STDOUT: %no_op.loc14_35.2: init %empty_tuple.type = call %bound_method.loc14_35.3(%addr.loc14_35.2) +// CHECK:STDOUT: %Op.bound.loc14_24.2: = bound_method %.loc14_24.2, constants.%Op.6fc +// CHECK:STDOUT: %Op.specific_fn.75: = specific_function constants.%Op.6fc, @Op.2(constants.%C.304) [concrete = constants.%Op.specific_fn.a08] +// CHECK:STDOUT: %bound_method.loc14_24.2: = bound_method %.loc14_24.2, %Op.specific_fn.75 // CHECK:STDOUT: %addr.loc14_24.2: %ptr.dc3 = addr_of %.loc14_24.2 -// CHECK:STDOUT: %no_op.loc14_24.2: init %empty_tuple.type = call %bound_method.loc14_24.4(%addr.loc14_24.2) -// CHECK:STDOUT: %impl.elem0.loc13_35.4: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc13_35.6: = bound_method %.loc13_35.1, %impl.elem0.loc13_35.4 -// CHECK:STDOUT: %specific_fn.loc13_35.3: = specific_function %impl.elem0.loc13_35.4, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc13_35.7: = bound_method %.loc13_35.1, %specific_fn.loc13_35.3 +// CHECK:STDOUT: %no_op.loc14_24.2: init %empty_tuple.type = call %bound_method.loc14_24.2(%addr.loc14_24.2) +// CHECK:STDOUT: %Op.bound.loc13_35.3: = bound_method %.loc13_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.76: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc13_35.4: = bound_method %.loc13_35.1, %Op.specific_fn.76 // CHECK:STDOUT: %addr.loc13_35.3: %ptr.f29 = addr_of %.loc13_35.1 -// CHECK:STDOUT: %no_op.loc13_35.3: init %empty_tuple.type = call %bound_method.loc13_35.7(%addr.loc13_35.3) -// CHECK:STDOUT: %impl.elem0.loc13_24.3: %.3d7 = impl_witness_access constants.%Destroy.impl_witness.1e4, element0 [concrete = constants.%Op.ca5] -// CHECK:STDOUT: %bound_method.loc13_24.5: = bound_method %.loc13_24.2, %impl.elem0.loc13_24.3 -// CHECK:STDOUT: %specific_fn.loc13_24.3: = specific_function %impl.elem0.loc13_24.3, @Op.2(constants.%C.c60) [concrete = constants.%Op.specific_fn.8d0] -// CHECK:STDOUT: %bound_method.loc13_24.6: = bound_method %.loc13_24.2, %specific_fn.loc13_24.3 +// CHECK:STDOUT: %no_op.loc13_35.3: init %empty_tuple.type = call %bound_method.loc13_35.4(%addr.loc13_35.3) +// CHECK:STDOUT: %Op.bound.loc13_24.3: = bound_method %.loc13_24.2, constants.%Op.ca5 +// CHECK:STDOUT: %Op.specific_fn.77: = specific_function constants.%Op.ca5, @Op.2(constants.%C.c60) [concrete = constants.%Op.specific_fn.8d0] +// CHECK:STDOUT: %bound_method.loc13_24.3: = bound_method %.loc13_24.2, %Op.specific_fn.77 // CHECK:STDOUT: %addr.loc13_24.3: %ptr.b5e = addr_of %.loc13_24.2 -// CHECK:STDOUT: %no_op.loc13_24.3: init %empty_tuple.type = call %bound_method.loc13_24.6(%addr.loc13_24.3) -// CHECK:STDOUT: %impl.elem0.loc12_35.5: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc12_35.8: = bound_method %.loc12_35.1, %impl.elem0.loc12_35.5 -// CHECK:STDOUT: %specific_fn.loc12_35.4: = specific_function %impl.elem0.loc12_35.5, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc12_35.9: = bound_method %.loc12_35.1, %specific_fn.loc12_35.4 +// CHECK:STDOUT: %no_op.loc13_24.3: init %empty_tuple.type = call %bound_method.loc13_24.3(%addr.loc13_24.3) +// CHECK:STDOUT: %Op.bound.loc12_35.4: = bound_method %.loc12_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.78: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc12_35.5: = bound_method %.loc12_35.1, %Op.specific_fn.78 // CHECK:STDOUT: %addr.loc12_35.4: %ptr.f29 = addr_of %.loc12_35.1 -// CHECK:STDOUT: %no_op.loc12_35.4: init %empty_tuple.type = call %bound_method.loc12_35.9(%addr.loc12_35.4) -// CHECK:STDOUT: %impl.elem0.loc12_24.4: %.89c = impl_witness_access constants.%Destroy.impl_witness.818, element0 [concrete = constants.%Op.985] -// CHECK:STDOUT: %bound_method.loc12_24.7: = bound_method %.loc12_24.2, %impl.elem0.loc12_24.4 -// CHECK:STDOUT: %specific_fn.loc12_24.4: = specific_function %impl.elem0.loc12_24.4, @Op.2(constants.%C.f0a) [concrete = constants.%Op.specific_fn.a66] -// CHECK:STDOUT: %bound_method.loc12_24.8: = bound_method %.loc12_24.2, %specific_fn.loc12_24.4 +// CHECK:STDOUT: %no_op.loc12_35.4: init %empty_tuple.type = call %bound_method.loc12_35.5(%addr.loc12_35.4) +// CHECK:STDOUT: %Op.bound.loc12_24.4: = bound_method %.loc12_24.2, constants.%Op.985 +// CHECK:STDOUT: %Op.specific_fn.79: = specific_function constants.%Op.985, @Op.2(constants.%C.f0a) [concrete = constants.%Op.specific_fn.a66] +// CHECK:STDOUT: %bound_method.loc12_24.4: = bound_method %.loc12_24.2, %Op.specific_fn.79 // CHECK:STDOUT: %addr.loc12_24.4: %ptr.24c = addr_of %.loc12_24.2 -// CHECK:STDOUT: %no_op.loc12_24.4: init %empty_tuple.type = call %bound_method.loc12_24.8(%addr.loc12_24.4) -// CHECK:STDOUT: %impl.elem0.loc11_35.6: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc11_35.10: = bound_method %.loc11_35.1, %impl.elem0.loc11_35.6 -// CHECK:STDOUT: %specific_fn.loc11_35.5: = specific_function %impl.elem0.loc11_35.6, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc11_35.11: = bound_method %.loc11_35.1, %specific_fn.loc11_35.5 +// CHECK:STDOUT: %no_op.loc12_24.4: init %empty_tuple.type = call %bound_method.loc12_24.4(%addr.loc12_24.4) +// CHECK:STDOUT: %Op.bound.loc11_35.5: = bound_method %.loc11_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.80: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc11_35.6: = bound_method %.loc11_35.1, %Op.specific_fn.80 // CHECK:STDOUT: %addr.loc11_35.5: %ptr.f29 = addr_of %.loc11_35.1 -// CHECK:STDOUT: %no_op.loc11_35.5: init %empty_tuple.type = call %bound_method.loc11_35.11(%addr.loc11_35.5) -// CHECK:STDOUT: %impl.elem0.loc11_24.5: %.6ca = impl_witness_access constants.%Destroy.impl_witness.f66, element0 [concrete = constants.%Op.6b4] -// CHECK:STDOUT: %bound_method.loc11_24.9: = bound_method %.loc11_24.2, %impl.elem0.loc11_24.5 -// CHECK:STDOUT: %specific_fn.loc11_24.5: = specific_function %impl.elem0.loc11_24.5, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] -// CHECK:STDOUT: %bound_method.loc11_24.10: = bound_method %.loc11_24.2, %specific_fn.loc11_24.5 +// CHECK:STDOUT: %no_op.loc11_35.5: init %empty_tuple.type = call %bound_method.loc11_35.6(%addr.loc11_35.5) +// CHECK:STDOUT: %Op.bound.loc11_24.5: = bound_method %.loc11_24.2, constants.%Op.6b4 +// CHECK:STDOUT: %Op.specific_fn.81: = specific_function constants.%Op.6b4, @Op.2(constants.%C.89d) [concrete = constants.%Op.specific_fn.357] +// CHECK:STDOUT: %bound_method.loc11_24.5: = bound_method %.loc11_24.2, %Op.specific_fn.81 // CHECK:STDOUT: %addr.loc11_24.5: %ptr.c28b = addr_of %.loc11_24.2 -// CHECK:STDOUT: %no_op.loc11_24.5: init %empty_tuple.type = call %bound_method.loc11_24.10(%addr.loc11_24.5) -// CHECK:STDOUT: %impl.elem0.loc10_35.7: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc10_35.12: = bound_method %.loc10_35.1, %impl.elem0.loc10_35.7 -// CHECK:STDOUT: %specific_fn.loc10_35.6: = specific_function %impl.elem0.loc10_35.7, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc10_35.13: = bound_method %.loc10_35.1, %specific_fn.loc10_35.6 +// CHECK:STDOUT: %no_op.loc11_24.5: init %empty_tuple.type = call %bound_method.loc11_24.5(%addr.loc11_24.5) +// CHECK:STDOUT: %Op.bound.loc10_35.6: = bound_method %.loc10_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.82: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc10_35.7: = bound_method %.loc10_35.1, %Op.specific_fn.82 // CHECK:STDOUT: %addr.loc10_35.6: %ptr.f29 = addr_of %.loc10_35.1 -// CHECK:STDOUT: %no_op.loc10_35.6: init %empty_tuple.type = call %bound_method.loc10_35.13(%addr.loc10_35.6) -// CHECK:STDOUT: %impl.elem0.loc10_24.6: %.f23 = impl_witness_access constants.%Destroy.impl_witness.4d8, element0 [concrete = constants.%Op.9cf] -// CHECK:STDOUT: %bound_method.loc10_24.11: = bound_method %.loc10_24.2, %impl.elem0.loc10_24.6 -// CHECK:STDOUT: %specific_fn.loc10_24.6: = specific_function %impl.elem0.loc10_24.6, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] -// CHECK:STDOUT: %bound_method.loc10_24.12: = bound_method %.loc10_24.2, %specific_fn.loc10_24.6 +// CHECK:STDOUT: %no_op.loc10_35.6: init %empty_tuple.type = call %bound_method.loc10_35.7(%addr.loc10_35.6) +// CHECK:STDOUT: %Op.bound.loc10_24.6: = bound_method %.loc10_24.2, constants.%Op.9cf +// CHECK:STDOUT: %Op.specific_fn.83: = specific_function constants.%Op.9cf, @Op.2(constants.%C.7ac) [concrete = constants.%Op.specific_fn.694] +// CHECK:STDOUT: %bound_method.loc10_24.6: = bound_method %.loc10_24.2, %Op.specific_fn.83 // CHECK:STDOUT: %addr.loc10_24.6: %ptr.2b1 = addr_of %.loc10_24.2 -// CHECK:STDOUT: %no_op.loc10_24.6: init %empty_tuple.type = call %bound_method.loc10_24.12(%addr.loc10_24.6) -// CHECK:STDOUT: %impl.elem0.loc9_35.8: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc9_35.14: = bound_method %.loc9_35.1, %impl.elem0.loc9_35.8 -// CHECK:STDOUT: %specific_fn.loc9_35.7: = specific_function %impl.elem0.loc9_35.8, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc9_35.15: = bound_method %.loc9_35.1, %specific_fn.loc9_35.7 +// CHECK:STDOUT: %no_op.loc10_24.6: init %empty_tuple.type = call %bound_method.loc10_24.6(%addr.loc10_24.6) +// CHECK:STDOUT: %Op.bound.loc9_35.7: = bound_method %.loc9_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.84: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc9_35.8: = bound_method %.loc9_35.1, %Op.specific_fn.84 // CHECK:STDOUT: %addr.loc9_35.7: %ptr.f29 = addr_of %.loc9_35.1 -// CHECK:STDOUT: %no_op.loc9_35.7: init %empty_tuple.type = call %bound_method.loc9_35.15(%addr.loc9_35.7) -// CHECK:STDOUT: %impl.elem0.loc9_24.7: %.715 = impl_witness_access constants.%Destroy.impl_witness.3a3, element0 [concrete = constants.%Op.404] -// CHECK:STDOUT: %bound_method.loc9_24.13: = bound_method %.loc9_24.2, %impl.elem0.loc9_24.7 -// CHECK:STDOUT: %specific_fn.loc9_24.7: = specific_function %impl.elem0.loc9_24.7, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] -// CHECK:STDOUT: %bound_method.loc9_24.14: = bound_method %.loc9_24.2, %specific_fn.loc9_24.7 +// CHECK:STDOUT: %no_op.loc9_35.7: init %empty_tuple.type = call %bound_method.loc9_35.8(%addr.loc9_35.7) +// CHECK:STDOUT: %Op.bound.loc9_24.7: = bound_method %.loc9_24.2, constants.%Op.404 +// CHECK:STDOUT: %Op.specific_fn.85: = specific_function constants.%Op.404, @Op.2(constants.%C.681) [concrete = constants.%Op.specific_fn.822] +// CHECK:STDOUT: %bound_method.loc9_24.7: = bound_method %.loc9_24.2, %Op.specific_fn.85 // CHECK:STDOUT: %addr.loc9_24.7: %ptr.3bd = addr_of %.loc9_24.2 -// CHECK:STDOUT: %no_op.loc9_24.7: init %empty_tuple.type = call %bound_method.loc9_24.14(%addr.loc9_24.7) -// CHECK:STDOUT: %impl.elem0.loc8_35.9: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc8_35.16: = bound_method %.loc8_35.1, %impl.elem0.loc8_35.9 -// CHECK:STDOUT: %specific_fn.loc8_35.8: = specific_function %impl.elem0.loc8_35.9, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc8_35.17: = bound_method %.loc8_35.1, %specific_fn.loc8_35.8 +// CHECK:STDOUT: %no_op.loc9_24.7: init %empty_tuple.type = call %bound_method.loc9_24.7(%addr.loc9_24.7) +// CHECK:STDOUT: %Op.bound.loc8_35.8: = bound_method %.loc8_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.86: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc8_35.9: = bound_method %.loc8_35.1, %Op.specific_fn.86 // CHECK:STDOUT: %addr.loc8_35.8: %ptr.f29 = addr_of %.loc8_35.1 -// CHECK:STDOUT: %no_op.loc8_35.8: init %empty_tuple.type = call %bound_method.loc8_35.17(%addr.loc8_35.8) -// CHECK:STDOUT: %impl.elem0.loc8_24.8: %.42d = impl_witness_access constants.%Destroy.impl_witness.af9, element0 [concrete = constants.%Op.ad8] -// CHECK:STDOUT: %bound_method.loc8_24.15: = bound_method %.loc8_24.2, %impl.elem0.loc8_24.8 -// CHECK:STDOUT: %specific_fn.loc8_24.8: = specific_function %impl.elem0.loc8_24.8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] -// CHECK:STDOUT: %bound_method.loc8_24.16: = bound_method %.loc8_24.2, %specific_fn.loc8_24.8 +// CHECK:STDOUT: %no_op.loc8_35.8: init %empty_tuple.type = call %bound_method.loc8_35.9(%addr.loc8_35.8) +// CHECK:STDOUT: %Op.bound.loc8_24.8: = bound_method %.loc8_24.2, constants.%Op.ad8 +// CHECK:STDOUT: %Op.specific_fn.87: = specific_function constants.%Op.ad8, @Op.2(constants.%C.674) [concrete = constants.%Op.specific_fn.6b6] +// CHECK:STDOUT: %bound_method.loc8_24.8: = bound_method %.loc8_24.2, %Op.specific_fn.87 // CHECK:STDOUT: %addr.loc8_24.8: %ptr.625 = addr_of %.loc8_24.2 -// CHECK:STDOUT: %no_op.loc8_24.8: init %empty_tuple.type = call %bound_method.loc8_24.16(%addr.loc8_24.8) -// CHECK:STDOUT: %impl.elem0.loc7_35.10: %.d1e = impl_witness_access constants.%Destroy.impl_witness.a3f, element0 [concrete = constants.%Op.f5a] -// CHECK:STDOUT: %bound_method.loc7_35.18: = bound_method %.loc7_35.1, %impl.elem0.loc7_35.10 -// CHECK:STDOUT: %specific_fn.loc7_35.9: = specific_function %impl.elem0.loc7_35.10, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] -// CHECK:STDOUT: %bound_method.loc7_35.19: = bound_method %.loc7_35.1, %specific_fn.loc7_35.9 +// CHECK:STDOUT: %no_op.loc8_24.8: init %empty_tuple.type = call %bound_method.loc8_24.8(%addr.loc8_24.8) +// CHECK:STDOUT: %Op.bound.loc7_35.9: = bound_method %.loc7_35.1, constants.%Op.f5a +// CHECK:STDOUT: %Op.specific_fn.88: = specific_function constants.%Op.f5a, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn.bd1] +// CHECK:STDOUT: %bound_method.loc7_35.10: = bound_method %.loc7_35.1, %Op.specific_fn.88 // CHECK:STDOUT: %addr.loc7_35.9: %ptr.f29 = addr_of %.loc7_35.1 -// CHECK:STDOUT: %no_op.loc7_35.9: init %empty_tuple.type = call %bound_method.loc7_35.19(%addr.loc7_35.9) -// CHECK:STDOUT: %impl.elem0.loc7_24.9: %.cde = impl_witness_access constants.%Destroy.impl_witness.ce3, element0 [concrete = constants.%Op.ae6] -// CHECK:STDOUT: %bound_method.loc7_24.17: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.9 -// CHECK:STDOUT: %specific_fn.loc7_24.9: = specific_function %impl.elem0.loc7_24.9, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] -// CHECK:STDOUT: %bound_method.loc7_24.18: = bound_method %.loc7_24.2, %specific_fn.loc7_24.9 +// CHECK:STDOUT: %no_op.loc7_35.9: init %empty_tuple.type = call %bound_method.loc7_35.10(%addr.loc7_35.9) +// CHECK:STDOUT: %Op.bound.loc7_24.9: = bound_method %.loc7_24.2, constants.%Op.ae6 +// CHECK:STDOUT: %Op.specific_fn.89: = specific_function constants.%Op.ae6, @Op.2(constants.%C.b00) [concrete = constants.%Op.specific_fn.e42] +// CHECK:STDOUT: %bound_method.loc7_24.9: = bound_method %.loc7_24.2, %Op.specific_fn.89 // CHECK:STDOUT: %addr.loc7_24.9: %ptr.697 = addr_of %.loc7_24.2 -// CHECK:STDOUT: %no_op.loc7_24.9: init %empty_tuple.type = call %bound_method.loc7_24.18(%addr.loc7_24.9) +// CHECK:STDOUT: %no_op.loc7_24.9: init %empty_tuple.type = call %bound_method.loc7_24.9(%addr.loc7_24.9) // CHECK:STDOUT: return %Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 7e587391cd4c..c62b55817c6d 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -73,16 +73,9 @@ fn G() -> i32 { // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -99,8 +92,6 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,10 +180,10 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %result.var: ref %i32 = var %result.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc26_12.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc26_12.1: = bound_method %int_0, %impl.elem0.loc26_12.1 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc26_12.1: = specific_function %impl.elem0.loc26_12.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_12.2: = bound_method %int_0, %specific_fn.loc26_12.1 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc26_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc26_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc26_12.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc26_12: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %result.var, %.loc26_12 @@ -202,12 +193,11 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %result: ref %i32 = bind_name result, %result.var // CHECK:STDOUT: %.loc26_16: %i32 = bind_value %result -// CHECK:STDOUT: %impl.elem0.loc26_12.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc26_12.3: = bound_method %result.var, %impl.elem0.loc26_12.2 -// CHECK:STDOUT: %specific_fn.loc26_12.2: = specific_function %impl.elem0.loc26_12.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_12.4: = bound_method %result.var, %specific_fn.loc26_12.2 +// CHECK:STDOUT: %Op.bound: = bound_method %result.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc26_12.3: = bound_method %result.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.235 = addr_of %result.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26_12.4(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc26_12.3(%addr) // CHECK:STDOUT: return %.loc26_16 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 35b19927f97a..39bf722a661e 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -65,16 +65,9 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.64e: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.type.a17: type = fn_type @Op.3, @impl.49c(%i32) [concrete] // CHECK:STDOUT: %Op.e6a: %Op.type.a17 = struct_value () [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%Destroy.impl_witness.64e) [concrete] -// CHECK:STDOUT: %.ab7: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.e6a, @Op.3(%i32) [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] @@ -97,8 +90,6 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -150,10 +141,10 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc17_14.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_14.1: = bound_method %int_0.loc17, %impl.elem0.loc17_14.1 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc17_14.1: = specific_function %impl.elem0.loc17_14.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %int_0.loc17, %specific_fn.loc17_14.1 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc17_14.1: = bound_method %int_0.loc17, %impl.elem0.loc17 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %int_0.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_14.2(%int_0.loc17) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc17_14: init %i32 = converted %int_0.loc17, %int.convert_checked.loc17 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %v.var, %.loc17_14 @@ -175,10 +166,10 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc20_14.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc20_14.1: = bound_method %int_1, %impl.elem0.loc20_14.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc20_14.1: = specific_function %impl.elem0.loc20_14.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_14.2: = bound_method %int_1, %specific_fn.loc20_14.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc20_14.1: = bound_method %int_1, %impl.elem0.loc20 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc20_14.2: = bound_method %int_1, %specific_fn.loc20 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %bound_method.loc20_14.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_14: init %i32 = converted %int_1, %int.convert_checked.loc20 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign %w.var, %.loc20_14 @@ -198,18 +189,16 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %bound_method.loc22_11.2(%int_0.loc22) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc22_11.1: %i32 = value_of_initializer %int.convert_checked.loc22 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc22_11.2: %i32 = converted %int_0.loc22, %.loc22_11.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc20_14.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc20_14.3: = bound_method %w.var, %impl.elem0.loc20_14.2 -// CHECK:STDOUT: %specific_fn.loc20_14.2: = specific_function %impl.elem0.loc20_14.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc20_14.4: = bound_method %w.var, %specific_fn.loc20_14.2 +// CHECK:STDOUT: %Op.bound.loc20: = bound_method %w.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc20_14.3: = bound_method %w.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc20: %ptr.235 = addr_of %w.var -// CHECK:STDOUT: %no_op.loc20: init %empty_tuple.type = call %bound_method.loc20_14.4(%addr.loc20) -// CHECK:STDOUT: %impl.elem0.loc17_14.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc17_14.3: = bound_method %v.var, %impl.elem0.loc17_14.2 -// CHECK:STDOUT: %specific_fn.loc17_14.2: = specific_function %impl.elem0.loc17_14.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_14.4: = bound_method %v.var, %specific_fn.loc17_14.2 +// CHECK:STDOUT: %no_op.loc20: init %empty_tuple.type = call %bound_method.loc20_14.3(%addr.loc20) +// CHECK:STDOUT: %Op.bound.loc17: = bound_method %v.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc17_14.3: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc17: %ptr.235 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17_14.4(%addr.loc17) +// CHECK:STDOUT: %no_op.loc17: init %empty_tuple.type = call %bound_method.loc17_14.3(%addr.loc17) // CHECK:STDOUT: return %.loc22_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -225,10 +214,10 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc27_14.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc27_14.1: = bound_method %int_0, %impl.elem0.loc27_14.1 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc27_14.1: = specific_function %impl.elem0.loc27_14.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_14.2: = bound_method %int_0, %specific_fn.loc27_14.1 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %impl.elem0.loc27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc27_14.1: = bound_method %int_0, %impl.elem0.loc27 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc27_14.2: = bound_method %int_0, %specific_fn.loc27 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %bound_method.loc27_14.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc27_14: init %i32 = converted %int_0, %int.convert_checked.loc27 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign %v.var, %.loc27_14 @@ -238,12 +227,11 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc27_18: %i32 = bind_value %v -// CHECK:STDOUT: %impl.elem0.loc27_14.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc27_14.3: = bound_method %v.var, %impl.elem0.loc27_14.2 -// CHECK:STDOUT: %specific_fn.loc27_14.2: = specific_function %impl.elem0.loc27_14.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_14.4: = bound_method %v.var, %specific_fn.loc27_14.2 +// CHECK:STDOUT: %Op.bound.loc27_14.1: = bound_method %v.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc27_14.3: = bound_method %v.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc27_14.1: %ptr.235 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc27_14.1: init %empty_tuple.type = call %bound_method.loc27_14.4(%addr.loc27_14.1) +// CHECK:STDOUT: %no_op.loc27_14.1: init %empty_tuple.type = call %bound_method.loc27_14.3(%addr.loc27_14.1) // CHECK:STDOUT: return %.loc27_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -253,10 +241,10 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc30_12.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc30_12.1: = bound_method %int_1, %impl.elem0.loc30_12.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc30_12.1: = specific_function %impl.elem0.loc30_12.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc30_12.2: = bound_method %int_1, %specific_fn.loc30_12.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %impl.elem0.loc30: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc30_12.1: = bound_method %int_1, %impl.elem0.loc30 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc30_12.2: = bound_method %int_1, %specific_fn.loc30 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %bound_method.loc30_12.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc30_12: init %i32 = converted %int_1, %int.convert_checked.loc30 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign %w.var, %.loc30_12 @@ -266,18 +254,16 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %.loc30_16: %i32 = bind_value %w -// CHECK:STDOUT: %impl.elem0.loc30_12.2: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc30_12.3: = bound_method %w.var, %impl.elem0.loc30_12.2 -// CHECK:STDOUT: %specific_fn.loc30_12.2: = specific_function %impl.elem0.loc30_12.2, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc30_12.4: = bound_method %w.var, %specific_fn.loc30_12.2 +// CHECK:STDOUT: %Op.bound.loc30: = bound_method %w.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc30_12.3: = bound_method %w.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc30: %ptr.235 = addr_of %w.var -// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30_12.4(%addr.loc30) -// CHECK:STDOUT: %impl.elem0.loc27_14.3: %.ab7 = impl_witness_access constants.%Destroy.impl_witness.64e, element0 [concrete = constants.%Op.e6a] -// CHECK:STDOUT: %bound_method.loc27_14.5: = bound_method %v.var, %impl.elem0.loc27_14.3 -// CHECK:STDOUT: %specific_fn.loc27_14.3: = specific_function %impl.elem0.loc27_14.3, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_14.6: = bound_method %v.var, %specific_fn.loc27_14.3 +// CHECK:STDOUT: %no_op.loc30: init %empty_tuple.type = call %bound_method.loc30_12.3(%addr.loc30) +// CHECK:STDOUT: %Op.bound.loc27_14.2: = bound_method %v.var, constants.%Op.e6a +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.e6a, @Op.3(constants.%i32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc27_14.4: = bound_method %v.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc27_14.2: %ptr.235 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc27_14.2: init %empty_tuple.type = call %bound_method.loc27_14.6(%addr.loc27_14.2) +// CHECK:STDOUT: %no_op.loc27_14.2: init %empty_tuple.type = call %bound_method.loc27_14.4(%addr.loc27_14.2) // CHECK:STDOUT: return %.loc30_16 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 9c7397a4ad11..9feb867f8c47 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -38,15 +38,8 @@ fn F() -> i32 { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %struct_type.a.b.c.4ca: type = struct_type {.a: Core.IntLiteral, .b: %struct_type.x.y.z, .c: Core.IntLiteral} [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.a8b: = impl_witness imports.%Destroy.impl_witness_table, @impl(%struct_type.x.y.z) [concrete] // CHECK:STDOUT: %Op.type.f60: type = fn_type @Op.2, @impl(%struct_type.x.y.z) [concrete] // CHECK:STDOUT: %Op.1a4: %Op.type.f60 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %struct_type.x.y.z, (%Destroy.impl_witness.a8b) [concrete] -// CHECK:STDOUT: %.483: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.1a4, @Op.2(%struct_type.x.y.z) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -59,8 +52,6 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -118,12 +109,11 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc18_35.3: %struct_type.a.b.c.4ca = converted %.loc18_35.1, %struct.loc18_35 // CHECK:STDOUT: %.loc18_36: %struct_type.x.y.z = struct_access %.loc18_35.3, element1 // CHECK:STDOUT: %.loc18_38: %i32 = struct_access %.loc18_36, element1 -// CHECK:STDOUT: %impl.elem0: %.483 = impl_witness_access constants.%Destroy.impl_witness.a8b, element0 [concrete = constants.%Op.1a4] -// CHECK:STDOUT: %bound_method.loc18_26.1: = bound_method %.loc18_26.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%struct_type.x.y.z) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc18_26.2: = bound_method %.loc18_26.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc18_26.1, constants.%Op.1a4 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.1a4, @Op.2(constants.%struct_type.x.y.z) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.loc18_26.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.6eb = addr_of %.loc18_26.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc18_26.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc18_38 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/nested_struct_in_place.carbon b/toolchain/check/testdata/struct/nested_struct_in_place.carbon index a8c7fa6af23e..a92a61a69640 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -37,22 +37,12 @@ fn G() { // CHECK:STDOUT: %ptr.7ae: type = ptr_type %tuple.type.189 [concrete] // CHECK:STDOUT: %pattern_type.3c2: type = pattern_type %struct_type.a.b.2f9 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.c0f: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.189) [concrete] // CHECK:STDOUT: %Op.type.19f: type = fn_type @Op.3, @impl.49c(%tuple.type.189) [concrete] // CHECK:STDOUT: %Op.672: %Op.type.19f = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.ba8: %Destroy.type = facet_value %tuple.type.189, (%Destroy.impl_witness.c0f) [concrete] -// CHECK:STDOUT: %.cce: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.ba8 [concrete] // CHECK:STDOUT: %Op.specific_fn.cf9: = specific_function %Op.672, @Op.3(%tuple.type.189) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.0dd: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%struct_type.a.b.2f9) [concrete] // CHECK:STDOUT: %Op.type.840: type = fn_type @Op.3, @impl.49c(%struct_type.a.b.2f9) [concrete] // CHECK:STDOUT: %Op.52b: %Op.type.840 = struct_value () [concrete] // CHECK:STDOUT: %ptr.c95: type = ptr_type %struct_type.a.b.2f9 [concrete] -// CHECK:STDOUT: %Destroy.facet.4f2: %Destroy.type = facet_value %struct_type.a.b.2f9, (%Destroy.impl_witness.0dd) [concrete] -// CHECK:STDOUT: %.1a1: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.4f2 [concrete] // CHECK:STDOUT: %Op.specific_fn.c7e: = specific_function %Op.52b, @Op.3(%struct_type.a.b.2f9) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -65,8 +55,6 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -133,24 +121,21 @@ fn G() { // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %tuple.type.189, .b: %tuple.type.189} [concrete = constants.%struct_type.a.b.2f9] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %struct_type.a.b.2f9 = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0.loc18_74.1: %.cce = impl_witness_access constants.%Destroy.impl_witness.c0f, element0 [concrete = constants.%Op.672] -// CHECK:STDOUT: %bound_method.loc18_74.1: = bound_method %.loc18_74.2, %impl.elem0.loc18_74.1 -// CHECK:STDOUT: %specific_fn.loc18_74.1: = specific_function %impl.elem0.loc18_74.1, @Op.3(constants.%tuple.type.189) [concrete = constants.%Op.specific_fn.cf9] -// CHECK:STDOUT: %bound_method.loc18_74.2: = bound_method %.loc18_74.2, %specific_fn.loc18_74.1 +// CHECK:STDOUT: %Op.bound.loc18_74.1: = bound_method %.loc18_74.2, constants.%Op.672 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.672, @Op.3(constants.%tuple.type.189) [concrete = constants.%Op.specific_fn.cf9] +// CHECK:STDOUT: %bound_method.loc18_74.1: = bound_method %.loc18_74.2, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc18_74.1: %ptr.7ae = addr_of %.loc18_74.2 -// CHECK:STDOUT: %no_op.loc18_74.1: init %empty_tuple.type = call %bound_method.loc18_74.2(%addr.loc18_74.1) -// CHECK:STDOUT: %impl.elem0.loc18_74.2: %.cce = impl_witness_access constants.%Destroy.impl_witness.c0f, element0 [concrete = constants.%Op.672] -// CHECK:STDOUT: %bound_method.loc18_74.3: = bound_method %.loc18_74.1, %impl.elem0.loc18_74.2 -// CHECK:STDOUT: %specific_fn.loc18_74.2: = specific_function %impl.elem0.loc18_74.2, @Op.3(constants.%tuple.type.189) [concrete = constants.%Op.specific_fn.cf9] -// CHECK:STDOUT: %bound_method.loc18_74.4: = bound_method %.loc18_74.1, %specific_fn.loc18_74.2 +// CHECK:STDOUT: %no_op.loc18_74.1: init %empty_tuple.type = call %bound_method.loc18_74.1(%addr.loc18_74.1) +// CHECK:STDOUT: %Op.bound.loc18_74.2: = bound_method %.loc18_74.1, constants.%Op.672 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.672, @Op.3(constants.%tuple.type.189) [concrete = constants.%Op.specific_fn.cf9] +// CHECK:STDOUT: %bound_method.loc18_74.2: = bound_method %.loc18_74.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc18_74.2: %ptr.7ae = addr_of %.loc18_74.1 -// CHECK:STDOUT: %no_op.loc18_74.2: init %empty_tuple.type = call %bound_method.loc18_74.4(%addr.loc18_74.2) -// CHECK:STDOUT: %impl.elem0.loc18_3: %.1a1 = impl_witness_access constants.%Destroy.impl_witness.0dd, element0 [concrete = constants.%Op.52b] -// CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %v.var, %impl.elem0.loc18_3 -// CHECK:STDOUT: %specific_fn.loc18_3: = specific_function %impl.elem0.loc18_3, @Op.3(constants.%struct_type.a.b.2f9) [concrete = constants.%Op.specific_fn.c7e] -// CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %v.var, %specific_fn.loc18_3 +// CHECK:STDOUT: %no_op.loc18_74.2: init %empty_tuple.type = call %bound_method.loc18_74.2(%addr.loc18_74.2) +// CHECK:STDOUT: %Op.bound.loc18_3: = bound_method %v.var, constants.%Op.52b +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.52b, @Op.3(constants.%struct_type.a.b.2f9) [concrete = constants.%Op.specific_fn.c7e] +// CHECK:STDOUT: %bound_method.loc18_3: = bound_method %v.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc18_3: %ptr.c95 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc18_3: init %empty_tuple.type = call %bound_method.loc18_3.2(%addr.loc18_3) +// CHECK:STDOUT: %no_op.loc18_3: init %empty_tuple.type = call %bound_method.loc18_3(%addr.loc18_3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/element_access.carbon b/toolchain/check/testdata/tuple/element_access.carbon index af0eaf286bc5..0592f34b89fd 100644 --- a/toolchain/check/testdata/tuple/element_access.carbon +++ b/toolchain/check/testdata/tuple/element_access.carbon @@ -354,23 +354,12 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.088: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.a1c) [concrete] // CHECK:STDOUT: %Op.type.438: type = fn_type @Op.3, @impl.49c(%tuple.type.a1c) [concrete] // CHECK:STDOUT: %Op.c8e: %Op.type.438 = struct_value () [concrete] // CHECK:STDOUT: %ptr.0b7: type = ptr_type %tuple.type.a1c [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type.a1c, (%Destroy.impl_witness.088) [concrete] -// CHECK:STDOUT: %.6a9: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c8e, @Op.3(%tuple.type.a1c) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> %i32 { @@ -382,12 +371,11 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %.loc7_12.2: ref %tuple.type.a1c = temporary %.loc7_12.1, %F.call // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc7_12.2, element0 // CHECK:STDOUT: %.loc7_13: %i32 = bind_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0: %.6a9 = impl_witness_access constants.%Destroy.impl_witness.088, element0 [concrete = constants.%Op.c8e] -// CHECK:STDOUT: %bound_method.loc7_12.1: = bound_method %.loc7_12.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%tuple.type.a1c) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_12.2: = bound_method %.loc7_12.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc7_12.1, constants.%Op.c8e +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc7_12.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.0b7 = addr_of %.loc7_12.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc7_13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon index 9f508b2262aa..74e22039a43f 100644 --- a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon @@ -60,23 +60,12 @@ fn H() { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.261: type = ptr_type %tuple.type.d07 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.5a7: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.d07) [concrete] // CHECK:STDOUT: %Op.type.a4a: type = fn_type @Op.3, @impl.49c(%tuple.type.d07) [concrete] // CHECK:STDOUT: %Op.7c6: %Op.type.a4a = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type.d07, (%Destroy.impl_witness.5a7) [concrete] -// CHECK:STDOUT: %.b68: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.7c6, @Op.3(%tuple.type.d07) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param: %tuple.type.d07 { @@ -108,24 +97,21 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: %F.call.loc9: init %tuple.type.d07 = call %F.ref.loc9() to %.loc5_8 // CHECK:STDOUT: -// CHECK:STDOUT: %impl.elem0.loc8: %.b68 = impl_witness_access constants.%Destroy.impl_witness.5a7, element0 [concrete = constants.%Op.7c6] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %.loc8, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.3(constants.%tuple.type.d07) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %.loc8, %specific_fn.loc8 +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %.loc8, constants.%Op.7c6 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.loc8, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8: %ptr.261 = addr_of %.loc8 -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc7_3.1: %.b68 = impl_witness_access constants.%Destroy.impl_witness.5a7, element0 [concrete = constants.%Op.7c6] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %.loc7_3, %impl.elem0.loc7_3.1 -// CHECK:STDOUT: %specific_fn.loc7_3.1: = specific_function %impl.elem0.loc7_3.1, @Op.3(constants.%tuple.type.d07) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %.loc7_3, %specific_fn.loc7_3.1 +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %Op.bound.loc7_3.1: = bound_method %.loc7_3, constants.%Op.7c6 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %.loc7_3, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc7_3.1: %ptr.261 = addr_of %.loc7_3 -// CHECK:STDOUT: %no_op.loc7_3.1: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7_3.1) -// CHECK:STDOUT: %impl.elem0.loc7_3.2: %.b68 = impl_witness_access constants.%Destroy.impl_witness.5a7, element0 [concrete = constants.%Op.7c6] -// CHECK:STDOUT: %bound_method.loc7_3.3: = bound_method %v.var, %impl.elem0.loc7_3.2 -// CHECK:STDOUT: %specific_fn.loc7_3.2: = specific_function %impl.elem0.loc7_3.2, @Op.3(constants.%tuple.type.d07) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.4: = bound_method %v.var, %specific_fn.loc7_3.2 +// CHECK:STDOUT: %no_op.loc7_3.1: init %empty_tuple.type = call %bound_method.loc7_3.1(%addr.loc7_3.1) +// CHECK:STDOUT: %Op.bound.loc7_3.2: = bound_method %v.var, constants.%Op.7c6 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %Op.specific_fn.4 // CHECK:STDOUT: %addr.loc7_3.2: %ptr.261 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc7_3.2: init %empty_tuple.type = call %bound_method.loc7_3.4(%addr.loc7_3.2) +// CHECK:STDOUT: %no_op.loc7_3.2: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7_3.2) // CHECK:STDOUT: return %F.call.loc9 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -138,12 +124,11 @@ fn H() { // CHECK:STDOUT: %.loc15_12.2: ref %tuple.type.d07 = temporary %.loc15_12.1, %G.call // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc15_12.2, element0 // CHECK:STDOUT: %.loc15_13: %i32 = bind_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0: %.b68 = impl_witness_access constants.%Destroy.impl_witness.5a7, element0 [concrete = constants.%Op.7c6] -// CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %.loc15_12.1, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.3(constants.%tuple.type.d07) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_12.2: = bound_method %.loc15_12.1, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.loc15_12.1, constants.%Op.7c6 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.loc15_12.1, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.261 = addr_of %.loc15_12.1 -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc15_12.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return %.loc15_13 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -161,27 +146,14 @@ fn H() { // CHECK:STDOUT: %tuple.type.99b: type = tuple_type (%tuple.type.189, %tuple.type.189) [concrete] // CHECK:STDOUT: %ptr.7ae: type = ptr_type %tuple.type.189 [concrete] // CHECK:STDOUT: %pattern_type.d88: type = pattern_type %tuple.type.99b [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.3, @impl.49c(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.c0f: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.189) [concrete] // CHECK:STDOUT: %Op.type.19f: type = fn_type @Op.3, @impl.49c(%tuple.type.189) [concrete] // CHECK:STDOUT: %Op.672: %Op.type.19f = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.ba8: %Destroy.type = facet_value %tuple.type.189, (%Destroy.impl_witness.c0f) [concrete] -// CHECK:STDOUT: %.cce: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.ba8 [concrete] -// CHECK:STDOUT: %Op.specific_fn.cf9: = specific_function %Op.672, @Op.3(%tuple.type.189) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.2c6: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.99b) [concrete] // CHECK:STDOUT: %Op.type.387: type = fn_type @Op.3, @impl.49c(%tuple.type.99b) [concrete] // CHECK:STDOUT: %Op.b09: %Op.type.387 = struct_value () [concrete] // CHECK:STDOUT: %ptr.8bc: type = ptr_type %tuple.type.99b [concrete] -// CHECK:STDOUT: %Destroy.facet.e74: %Destroy.type = facet_value %tuple.type.99b, (%Destroy.impl_witness.2c6) [concrete] -// CHECK:STDOUT: %.41d: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.e74 [concrete] -// CHECK:STDOUT: %Op.specific_fn.852: = specific_function %Op.b09, @Op.3(%tuple.type.99b) [concrete] // CHECK:STDOUT: %tuple.type.3a3: type = tuple_type (type, %tuple.type.ff9, type) [concrete] // CHECK:STDOUT: %tuple.type.516: type = tuple_type (%i32, %tuple.type.189, %i32) [concrete] // CHECK:STDOUT: %pattern_type.6b5: type = pattern_type %tuple.type.516 [concrete] @@ -202,20 +174,14 @@ fn H() { // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.78c: = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%tuple.type.516) [concrete] // CHECK:STDOUT: %Op.type.701: type = fn_type @Op.3, @impl.49c(%tuple.type.516) [concrete] // CHECK:STDOUT: %Op.dfb: %Op.type.701 = struct_value () [concrete] // CHECK:STDOUT: %ptr.12e: type = ptr_type %tuple.type.516 [concrete] -// CHECK:STDOUT: %Destroy.facet.d6c: %Destroy.type = facet_value %tuple.type.516, (%Destroy.impl_witness.78c) [concrete] -// CHECK:STDOUT: %.1fa: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.d6c [concrete] -// CHECK:STDOUT: %Op.specific_fn.922: = specific_function %Op.dfb, @Op.3(%tuple.type.516) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -256,24 +222,21 @@ fn H() { // CHECK:STDOUT: %.loc7_43.5: type = converted %.loc7_43.2, constants.%tuple.type.99b [concrete = constants.%tuple.type.99b] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %tuple.type.99b = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0.loc7_56.1: %.cce = impl_witness_access constants.%Destroy.impl_witness.c0f, element0 [concrete = constants.%Op.672] -// CHECK:STDOUT: %bound_method.loc7_56.1: = bound_method %tuple.elem1, %impl.elem0.loc7_56.1 -// CHECK:STDOUT: %specific_fn.loc7_56.1: = specific_function %impl.elem0.loc7_56.1, @Op.3(constants.%tuple.type.189) [concrete = constants.%Op.specific_fn.cf9] -// CHECK:STDOUT: %bound_method.loc7_56.2: = bound_method %tuple.elem1, %specific_fn.loc7_56.1 +// CHECK:STDOUT: %Op.bound.loc7_56.1: = bound_method %tuple.elem1, constants.%Op.672 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc7_56.1: = bound_method %tuple.elem1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc7_56.1: %ptr.7ae = addr_of %tuple.elem1 -// CHECK:STDOUT: %no_op.loc7_56.1: init %empty_tuple.type = call %bound_method.loc7_56.2(%addr.loc7_56.1) -// CHECK:STDOUT: %impl.elem0.loc7_56.2: %.cce = impl_witness_access constants.%Destroy.impl_witness.c0f, element0 [concrete = constants.%Op.672] -// CHECK:STDOUT: %bound_method.loc7_56.3: = bound_method %tuple.elem0, %impl.elem0.loc7_56.2 -// CHECK:STDOUT: %specific_fn.loc7_56.2: = specific_function %impl.elem0.loc7_56.2, @Op.3(constants.%tuple.type.189) [concrete = constants.%Op.specific_fn.cf9] -// CHECK:STDOUT: %bound_method.loc7_56.4: = bound_method %tuple.elem0, %specific_fn.loc7_56.2 +// CHECK:STDOUT: %no_op.loc7_56.1: init %empty_tuple.type = call %bound_method.loc7_56.1(%addr.loc7_56.1) +// CHECK:STDOUT: %Op.bound.loc7_56.2: = bound_method %tuple.elem0, constants.%Op.672 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc7_56.2: = bound_method %tuple.elem0, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7_56.2: %ptr.7ae = addr_of %tuple.elem0 -// CHECK:STDOUT: %no_op.loc7_56.2: init %empty_tuple.type = call %bound_method.loc7_56.4(%addr.loc7_56.2) -// CHECK:STDOUT: %impl.elem0.loc7_3: %.41d = impl_witness_access constants.%Destroy.impl_witness.2c6, element0 [concrete = constants.%Op.b09] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7_3 -// CHECK:STDOUT: %specific_fn.loc7_3: = specific_function %impl.elem0.loc7_3, @Op.3(constants.%tuple.type.99b) [concrete = constants.%Op.specific_fn.852] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_fn.loc7_3 +// CHECK:STDOUT: %no_op.loc7_56.2: init %empty_tuple.type = call %bound_method.loc7_56.2(%addr.loc7_56.2) +// CHECK:STDOUT: %Op.bound.loc7_3: = bound_method %v.var, constants.%Op.b09 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc7_3: = bound_method %v.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc7_3: %ptr.8bc = addr_of %v.var -// CHECK:STDOUT: %no_op.loc7_3: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7_3) +// CHECK:STDOUT: %no_op.loc7_3: init %empty_tuple.type = call %bound_method.loc7_3(%addr.loc7_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -326,18 +289,16 @@ fn H() { // CHECK:STDOUT: %.loc13_36.4: type = converted %.loc13_36.2, constants.%tuple.type.516 [concrete = constants.%tuple.type.516] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref %tuple.type.516 = bind_name v, %v.var -// CHECK:STDOUT: %impl.elem0.loc13_50.3: %.cce = impl_witness_access constants.%Destroy.impl_witness.c0f, element0 [concrete = constants.%Op.672] -// CHECK:STDOUT: %bound_method.loc13_50.5: = bound_method %tuple.elem1, %impl.elem0.loc13_50.3 -// CHECK:STDOUT: %specific_fn.loc13_50.3: = specific_function %impl.elem0.loc13_50.3, @Op.3(constants.%tuple.type.189) [concrete = constants.%Op.specific_fn.cf9] -// CHECK:STDOUT: %bound_method.loc13_50.6: = bound_method %tuple.elem1, %specific_fn.loc13_50.3 +// CHECK:STDOUT: %Op.bound.loc13_50: = bound_method %tuple.elem1, constants.%Op.672 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc13_50.5: = bound_method %tuple.elem1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc13_50: %ptr.7ae = addr_of %tuple.elem1 -// CHECK:STDOUT: %no_op.loc13_50: init %empty_tuple.type = call %bound_method.loc13_50.6(%addr.loc13_50) -// CHECK:STDOUT: %impl.elem0.loc13_3: %.1fa = impl_witness_access constants.%Destroy.impl_witness.78c, element0 [concrete = constants.%Op.dfb] -// CHECK:STDOUT: %bound_method.loc13_3.1: = bound_method %v.var, %impl.elem0.loc13_3 -// CHECK:STDOUT: %specific_fn.loc13_3: = specific_function %impl.elem0.loc13_3, @Op.3(constants.%tuple.type.516) [concrete = constants.%Op.specific_fn.922] -// CHECK:STDOUT: %bound_method.loc13_3.2: = bound_method %v.var, %specific_fn.loc13_3 +// CHECK:STDOUT: %no_op.loc13_50: init %empty_tuple.type = call %bound_method.loc13_50.5(%addr.loc13_50) +// CHECK:STDOUT: %Op.bound.loc13_3: = bound_method %v.var, constants.%Op.dfb +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc13_3: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc13_3: %ptr.12e = addr_of %v.var -// CHECK:STDOUT: %no_op.loc13_3: init %empty_tuple.type = call %bound_method.loc13_3.2(%addr.loc13_3) +// CHECK:STDOUT: %no_op.loc13_3: init %empty_tuple.type = call %bound_method.loc13_3(%addr.loc13_3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/tuple_pattern.carbon b/toolchain/check/testdata/tuple/tuple_pattern.carbon index c8a1a1837c02..d028647b9adc 100644 --- a/toolchain/check/testdata/tuple/tuple_pattern.carbon +++ b/toolchain/check/testdata/tuple/tuple_pattern.carbon @@ -129,23 +129,12 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %pattern_type.de4: type = pattern_type %tuple.type.b6b [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.9c2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.b6b) [concrete] // CHECK:STDOUT: %Op.type.72a: type = fn_type @Op.2, @impl(%tuple.type.b6b) [concrete] // CHECK:STDOUT: %Op.973: %Op.type.72a = struct_value () [concrete] // CHECK:STDOUT: %ptr.8fc: type = ptr_type %tuple.type.b6b [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type.b6b, (%Destroy.impl_witness.9c2) [concrete] -// CHECK:STDOUT: %.8ce: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.973, @Op.2(%tuple.type.b6b) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -222,18 +211,16 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc8_19.3: type = converted %.loc8_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %d: ref %empty_struct_type = bind_name d, %tuple.elem1.loc8_3 -// CHECK:STDOUT: %impl.elem0.loc8: %.8ce = impl_witness_access constants.%Destroy.impl_witness.9c2, element0 [concrete = constants.%Op.973] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %.var.loc8, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.2(constants.%tuple.type.b6b) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %.var.loc8, %specific_fn.loc8 +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %.var.loc8, constants.%Op.973 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc8: = bound_method %.var.loc8, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8: %ptr.8fc = addr_of %.var.loc8 -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc7: %.8ce = impl_witness_access constants.%Destroy.impl_witness.9c2, element0 [concrete = constants.%Op.973] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %.var.loc7, %impl.elem0.loc7 -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.2(constants.%tuple.type.b6b) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %.var.loc7, %specific_fn.loc7 +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %.var.loc7, constants.%Op.973 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc7: = bound_method %.var.loc7, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7: %ptr.8fc = addr_of %.var.loc7 -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -247,25 +234,14 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.9c2: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.b6b) [concrete] // CHECK:STDOUT: %Op.type.72a: type = fn_type @Op.2, @impl(%tuple.type.b6b) [concrete] // CHECK:STDOUT: %Op.973: %Op.type.72a = struct_value () [concrete] // CHECK:STDOUT: %ptr.8fc: type = ptr_type %tuple.type.b6b [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type.b6b, (%Destroy.impl_witness.9c2) [concrete] -// CHECK:STDOUT: %.8ce: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.973, @Op.2(%tuple.type.b6b) [concrete] // CHECK:STDOUT: %MakeTuple.type: type = fn_type @MakeTuple [concrete] // CHECK:STDOUT: %MakeTuple: %MakeTuple.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -327,18 +303,16 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1.loc7_3 -// CHECK:STDOUT: %impl.elem0.loc7: %.8ce = impl_witness_access constants.%Destroy.impl_witness.9c2, element0 [concrete = constants.%Op.973] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %.var, %impl.elem0.loc7 -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.2(constants.%tuple.type.b6b) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %.var, %specific_fn.loc7 +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %.var, constants.%Op.973 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc7: = bound_method %.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc7: %ptr.8fc = addr_of %.var -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) -// CHECK:STDOUT: %impl.elem0.loc6: %.8ce = impl_witness_access constants.%Destroy.impl_witness.9c2, element0 [concrete = constants.%Op.973] -// CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %tuple.var, %impl.elem0.loc6 -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Op.2(constants.%tuple.type.b6b) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %tuple.var, %specific_fn.loc6 +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) +// CHECK:STDOUT: %Op.bound.loc6: = bound_method %tuple.var, constants.%Op.973 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc6: = bound_method %tuple.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc6: %ptr.8fc = addr_of %tuple.var -// CHECK:STDOUT: %no_op.loc6: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6) +// CHECK:STDOUT: %no_op.loc6: init %empty_tuple.type = call %bound_method.loc6(%addr.loc6) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -396,12 +370,11 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc14_19.3: type = converted %.loc14_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1.loc14_3 -// CHECK:STDOUT: %impl.elem0: %.8ce = impl_witness_access constants.%Destroy.impl_witness.9c2, element0 [concrete = constants.%Op.973] -// CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%tuple.type.b6b) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.var, constants.%Op.973 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method: = bound_method %.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.8fc = addr_of %.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -430,18 +403,16 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc22_19.3: type = converted %.loc22_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1 -// CHECK:STDOUT: %impl.elem0.loc22_3.1: %.8ce = impl_witness_access constants.%Destroy.impl_witness.9c2, element0 [concrete = constants.%Op.973] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %.loc22_3, %impl.elem0.loc22_3.1 -// CHECK:STDOUT: %specific_fn.loc22_3.1: = specific_function %impl.elem0.loc22_3.1, @Op.2(constants.%tuple.type.b6b) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %.loc22_3, %specific_fn.loc22_3.1 +// CHECK:STDOUT: %Op.bound.loc22_3.1: = bound_method %.loc22_3, constants.%Op.973 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %.loc22_3, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc22_3.1: %ptr.8fc = addr_of %.loc22_3 -// CHECK:STDOUT: %no_op.loc22_3.1: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22_3.1) -// CHECK:STDOUT: %impl.elem0.loc22_3.2: %.8ce = impl_witness_access constants.%Destroy.impl_witness.9c2, element0 [concrete = constants.%Op.973] -// CHECK:STDOUT: %bound_method.loc22_3.3: = bound_method %.var, %impl.elem0.loc22_3.2 -// CHECK:STDOUT: %specific_fn.loc22_3.2: = specific_function %impl.elem0.loc22_3.2, @Op.2(constants.%tuple.type.b6b) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_3.4: = bound_method %.var, %specific_fn.loc22_3.2 +// CHECK:STDOUT: %no_op.loc22_3.1: init %empty_tuple.type = call %bound_method.loc22_3.1(%addr.loc22_3.1) +// CHECK:STDOUT: %Op.bound.loc22_3.2: = bound_method %.var, constants.%Op.973 +// CHECK:STDOUT: +// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc22_3.2: %ptr.8fc = addr_of %.var -// CHECK:STDOUT: %no_op.loc22_3.2: init %empty_tuple.type = call %bound_method.loc22_3.4(%addr.loc22_3.2) +// CHECK:STDOUT: %no_op.loc22_3.2: init %empty_tuple.type = call %bound_method.loc22_3.2(%addr.loc22_3.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/decl.carbon b/toolchain/check/testdata/var/decl.carbon index 97663ff77035..eb89d9dd8698 100644 --- a/toolchain/check/testdata/var/decl.carbon +++ b/toolchain/check/testdata/var/decl.carbon @@ -26,16 +26,9 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -46,8 +39,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -71,12 +62,11 @@ fn Main() { // CHECK:STDOUT: %.loc3_11.3: type = converted %.loc3_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc3_3.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc3_3.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc3_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/decl_with_init.carbon b/toolchain/check/testdata/var/decl_with_init.carbon index 51c8ba7989d0..bf27ce7cd68e 100644 --- a/toolchain/check/testdata/var/decl_with_init.carbon +++ b/toolchain/check/testdata/var/decl_with_init.carbon @@ -27,16 +27,9 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -47,8 +40,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,12 +67,11 @@ fn Main() { // CHECK:STDOUT: %.loc3_11.3: type = converted %.loc3_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc3_3.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc3_3.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc3_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_duplicate_decl.carbon b/toolchain/check/testdata/var/fail_duplicate_decl.carbon index cd24ec28c478..53d98c8613b5 100644 --- a/toolchain/check/testdata/var/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/fail_duplicate_decl.carbon @@ -35,16 +35,9 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -55,8 +48,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -98,18 +89,16 @@ fn Main() { // CHECK:STDOUT: %.loc11_11.3: type = converted %.loc11_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x.loc11: ref %empty_tuple.type = bind_name x, %x.var.loc11 -// CHECK:STDOUT: %impl.elem0.loc11: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc11_3.1: = bound_method %x.var.loc11, %impl.elem0.loc11 -// CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_3.2: = bound_method %x.var.loc11, %specific_fn.loc11 +// CHECK:STDOUT: %Op.bound.loc11: = bound_method %x.var.loc11, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc11: = bound_method %x.var.loc11, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc11: %ptr.843 = addr_of %x.var.loc11 -// CHECK:STDOUT: %no_op.loc11: init %empty_tuple.type = call %bound_method.loc11_3.2(%addr.loc11) -// CHECK:STDOUT: %impl.elem0.loc3: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc3_3.1: = bound_method %x.var.loc3, %impl.elem0.loc3 -// CHECK:STDOUT: %specific_fn.loc3: = specific_function %impl.elem0.loc3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc3_3.2: = bound_method %x.var.loc3, %specific_fn.loc3 +// CHECK:STDOUT: %no_op.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11) +// CHECK:STDOUT: %Op.bound.loc3: = bound_method %x.var.loc3, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc3: = bound_method %x.var.loc3, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc3: %ptr.843 = addr_of %x.var.loc3 -// CHECK:STDOUT: %no_op.loc3: init %empty_tuple.type = call %bound_method.loc3_3.2(%addr.loc3) +// CHECK:STDOUT: %no_op.loc3: init %empty_tuple.type = call %bound_method.loc3(%addr.loc3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_init_with_self.carbon b/toolchain/check/testdata/var/fail_init_with_self.carbon index dcd608907869..1b836f54629f 100644 --- a/toolchain/check/testdata/var/fail_init_with_self.carbon +++ b/toolchain/check/testdata/var/fail_init_with_self.carbon @@ -30,16 +30,9 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -50,8 +43,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,12 +68,11 @@ fn Main() { // CHECK:STDOUT: %.loc7_11.3: type = converted %.loc7_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon b/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon index 25d044bb9c37..e0cb98b02d8f 100644 --- a/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon +++ b/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon @@ -32,16 +32,9 @@ var y: () = x; // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -52,8 +45,6 @@ var y: () = x; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -89,12 +80,11 @@ var y: () = x; // CHECK:STDOUT: %.loc3_11.3: type = converted %.loc3_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc3_3.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc3_3.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc3_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_not_copyable.carbon b/toolchain/check/testdata/var/fail_not_copyable.carbon index c5934045be4c..9d3df07c0089 100644 --- a/toolchain/check/testdata/var/fail_not_copyable.carbon +++ b/toolchain/check/testdata/var/fail_not_copyable.carbon @@ -45,22 +45,12 @@ fn F(x: X) { // CHECK:STDOUT: %pattern_type.b05: type = pattern_type String [concrete] // CHECK:STDOUT: %str: String = string_literal "hello" [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.599: = impl_witness imports.%Destroy.impl_witness_table, @impl(%X) [concrete] // CHECK:STDOUT: %Op.type.9e1: type = fn_type @Op.2, @impl(%X) [concrete] // CHECK:STDOUT: %Op.33a: %Op.type.9e1 = struct_value () [concrete] // CHECK:STDOUT: %ptr.d17: type = ptr_type %X [concrete] -// CHECK:STDOUT: %Destroy.facet.177: %Destroy.type = facet_value %X, (%Destroy.impl_witness.599) [concrete] -// CHECK:STDOUT: %.bfc: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.177 [concrete] // CHECK:STDOUT: %Op.specific_fn.d1f: = specific_function %Op.33a, @Op.2(%X) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.35b: = impl_witness imports.%Destroy.impl_witness_table, @impl(String) [concrete] // CHECK:STDOUT: %Op.type.051: type = fn_type @Op.2, @impl(String) [concrete] // CHECK:STDOUT: %Op.5ef: %Op.type.051 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.71a: %Destroy.type = facet_value String, (%Destroy.impl_witness.35b) [concrete] -// CHECK:STDOUT: %.c94: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.71a [concrete] // CHECK:STDOUT: %Op.specific_fn.93f: = specific_function %Op.5ef, @Op.2(String) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -71,8 +61,6 @@ fn F(x: X) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/destroy, loc15_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -121,18 +109,16 @@ fn F(x: X) { // CHECK:STDOUT: assign %y.var, // CHECK:STDOUT: %X.ref.loc31: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %y: ref %X = bind_name y, %y.var -// CHECK:STDOUT: %impl.elem0.loc31: %.bfc = impl_witness_access constants.%Destroy.impl_witness.599, element0 [concrete = constants.%Op.33a] -// CHECK:STDOUT: %bound_method.loc31_3.1: = bound_method %y.var, %impl.elem0.loc31 -// CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Op.2(constants.%X) [concrete = constants.%Op.specific_fn.d1f] -// CHECK:STDOUT: %bound_method.loc31_3.2: = bound_method %y.var, %specific_fn.loc31 +// CHECK:STDOUT: %Op.bound.loc31: = bound_method %y.var, constants.%Op.33a +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.33a, @Op.2(constants.%X) [concrete = constants.%Op.specific_fn.d1f] +// CHECK:STDOUT: %bound_method.loc31: = bound_method %y.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc31: %ptr.d17 = addr_of %y.var -// CHECK:STDOUT: %no_op.loc31: init %empty_tuple.type = call %bound_method.loc31_3.2(%addr.loc31) -// CHECK:STDOUT: %impl.elem0.loc24: %.c94 = impl_witness_access constants.%Destroy.impl_witness.35b, element0 [concrete = constants.%Op.5ef] -// CHECK:STDOUT: %bound_method.loc24_3.1: = bound_method %s.var, %impl.elem0.loc24 -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Op.2(String) [concrete = constants.%Op.specific_fn.93f] -// CHECK:STDOUT: %bound_method.loc24_3.2: = bound_method %s.var, %specific_fn.loc24 +// CHECK:STDOUT: %no_op.loc31: init %empty_tuple.type = call %bound_method.loc31(%addr.loc31) +// CHECK:STDOUT: %Op.bound.loc24: = bound_method %s.var, constants.%Op.5ef +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.5ef, @Op.2(String) [concrete = constants.%Op.specific_fn.93f] +// CHECK:STDOUT: %bound_method.loc24: = bound_method %s.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc24: %ptr.a45 = addr_of %s.var -// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24_3.2(%addr.loc24) +// CHECK:STDOUT: %no_op.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index d7539d6cf8f8..e767a167282d 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -68,7 +68,6 @@ fn Main() { // CHECK:STDOUT: %.loc23: type = converted %int_1.loc23_10, [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: %x: = bind_name x, [concrete = ] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/global_lookup_in_scope.carbon b/toolchain/check/testdata/var/global_lookup_in_scope.carbon index 3be310b9ae4c..2e678a34d86e 100644 --- a/toolchain/check/testdata/var/global_lookup_in_scope.carbon +++ b/toolchain/check/testdata/var/global_lookup_in_scope.carbon @@ -32,16 +32,9 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [concrete] // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.148: = impl_witness imports.%Destroy.impl_witness_table, @impl(%struct_type.v) [concrete] // CHECK:STDOUT: %Op.type.7e5: type = fn_type @Op.2, @impl(%struct_type.v) [concrete] // CHECK:STDOUT: %Op.477: %Op.type.7e5 = struct_value () [concrete] // CHECK:STDOUT: %ptr.ef9: type = ptr_type %struct_type.v [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %struct_type.v, (%Destroy.impl_witness.148) [concrete] -// CHECK:STDOUT: %.d6c: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.477, @Op.2(%struct_type.v) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -52,8 +45,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -98,12 +89,11 @@ fn Main() { // CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [concrete = constants.%struct_type.v] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %struct_type.v = bind_name y, %y.var -// CHECK:STDOUT: %impl.elem0: %.d6c = impl_witness_access constants.%Destroy.impl_witness.148, element0 [concrete = constants.%Op.477] -// CHECK:STDOUT: %bound_method.loc5_3.1: = bound_method %y.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%struct_type.v) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_3.2: = bound_method %y.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %y.var, constants.%Op.477 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.477, @Op.2(constants.%struct_type.v) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %y.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.ef9 = addr_of %y.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc5_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/lookup.carbon b/toolchain/check/testdata/var/lookup.carbon index 5f91fcdcc898..869d3648215d 100644 --- a/toolchain/check/testdata/var/lookup.carbon +++ b/toolchain/check/testdata/var/lookup.carbon @@ -26,16 +26,9 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -46,8 +39,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,12 +67,11 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: %x.ref: ref %empty_tuple.type = name_ref x, %x -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc16_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/shadowing.carbon b/toolchain/check/testdata/var/shadowing.carbon index 626e95131b9f..64001a96be4a 100644 --- a/toolchain/check/testdata/var/shadowing.carbon +++ b/toolchain/check/testdata/var/shadowing.carbon @@ -39,16 +39,9 @@ fn Main() { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -59,8 +52,6 @@ fn Main() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -135,24 +126,21 @@ fn Main() { // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %impl.elem0.loc10: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %x.var.loc10, %impl.elem0.loc10 -// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc10_5.2: = bound_method %x.var.loc10, %specific_fn.loc10 +// CHECK:STDOUT: %Op.bound.loc10: = bound_method %x.var.loc10, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %x.var.loc10, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc10: %ptr.843 = addr_of %x.var.loc10 -// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10_5.2(%addr.loc10) -// CHECK:STDOUT: %impl.elem0.loc8: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %x.var.loc8, %impl.elem0.loc8 -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %x.var.loc8, %specific_fn.loc8 +// CHECK:STDOUT: %no_op.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10) +// CHECK:STDOUT: %Op.bound.loc8: = bound_method %x.var.loc8, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8: = bound_method %x.var.loc8, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8: %ptr.843 = addr_of %x.var.loc8 -// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8) -// CHECK:STDOUT: %impl.elem0.loc5: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc5_3.1: = bound_method %NS.var, %impl.elem0.loc5 -// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_3.2: = bound_method %NS.var, %specific_fn.loc5 +// CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8) +// CHECK:STDOUT: %Op.bound.loc5: = bound_method %NS.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc5: = bound_method %NS.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc5: %ptr.843 = addr_of %NS.var -// CHECK:STDOUT: %no_op.loc5: init %empty_tuple.type = call %bound_method.loc5_3.2(%addr.loc5) +// CHECK:STDOUT: %no_op.loc5: init %empty_tuple.type = call %bound_method.loc5(%addr.loc5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/var_pattern.carbon b/toolchain/check/testdata/var/var_pattern.carbon index 821517289455..ba5efc40e0b3 100644 --- a/toolchain/check/testdata/var/var_pattern.carbon +++ b/toolchain/check/testdata/var/var_pattern.carbon @@ -154,16 +154,9 @@ fn G() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -174,8 +167,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -203,12 +194,11 @@ fn G() { // CHECK:STDOUT: %.loc5_15.3: type = converted %.loc5_15.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc5_7.1: = bound_method %x.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_7.2: = bound_method %x.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %x.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %x.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %x.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc5_7.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -223,16 +213,9 @@ fn G() { // CHECK:STDOUT: %pattern_type.5b8: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -243,8 +226,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -283,12 +264,11 @@ fn G() { // CHECK:STDOUT: %.loc5_23.3: type = converted %.loc5_23.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %y.var -// CHECK:STDOUT: %impl.elem0: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc5_15.1: = bound_method %y.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_15.2: = bound_method %y.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %y.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %y.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.843 = addr_of %y.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc5_15.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,15 +285,8 @@ fn G() { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.585: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type) [concrete] // CHECK:STDOUT: %Op.type.4e8: type = fn_type @Op.2, @impl(%tuple.type) [concrete] // CHECK:STDOUT: %Op.166: %Op.type.4e8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness.585) [concrete] -// CHECK:STDOUT: %.b6c: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.166, @Op.2(%tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -324,8 +297,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -370,12 +341,11 @@ fn G() { // CHECK:STDOUT: %.loc5_19.3: type = converted %.loc5_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %tuple.elem1.loc5_3 -// CHECK:STDOUT: %impl.elem0: %.b6c = impl_witness_access constants.%Destroy.impl_witness.585, element0 [concrete = constants.%Op.166] -// CHECK:STDOUT: %bound_method.loc5_3.1: = bound_method %.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_3.2: = bound_method %.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.var, constants.%Op.166 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.166, @Op.2(constants.%tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.709 = addr_of %.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc5_3.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -392,15 +362,8 @@ fn G() { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.585: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type) [concrete] // CHECK:STDOUT: %Op.type.4e8: type = fn_type @Op.2, @impl(%tuple.type) [concrete] // CHECK:STDOUT: %Op.166: %Op.type.4e8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness.585) [concrete] -// CHECK:STDOUT: %.b6c: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.166, @Op.2(%tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -411,8 +374,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -457,12 +418,11 @@ fn G() { // CHECK:STDOUT: %.loc5_23.3: type = converted %.loc5_23.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %tuple.elem1.loc5_7 -// CHECK:STDOUT: %impl.elem0: %.b6c = impl_witness_access constants.%Destroy.impl_witness.585, element0 [concrete = constants.%Op.166] -// CHECK:STDOUT: %bound_method.loc5_7.1: = bound_method %.var, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Op.2(constants.%tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_7.2: = bound_method %.var, %specific_fn +// CHECK:STDOUT: %Op.bound: = bound_method %.var, constants.%Op.166 +// CHECK:STDOUT: %Op.specific_fn: = specific_function constants.%Op.166, @Op.2(constants.%tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method: = bound_method %.var, %Op.specific_fn // CHECK:STDOUT: %addr: %ptr.709 = addr_of %.var -// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc5_7.2(%addr) +// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method(%addr) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -477,16 +437,9 @@ fn G() { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -497,8 +450,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -559,18 +510,16 @@ fn G() { // CHECK:STDOUT: %.loc4_13.2: init %empty_tuple.type = converted %.loc8_9.1, %.loc8_9.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: assign %.loc4_13.1, %.loc4_13.2 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc8_5, %.loc4_13.1) -// CHECK:STDOUT: %impl.elem0.loc4: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc4_13.1: = bound_method %.loc4_13.1, %impl.elem0.loc4 -// CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc4_13.2: = bound_method %.loc4_13.1, %specific_fn.loc4 +// CHECK:STDOUT: %Op.bound.loc4: = bound_method %.loc4_13.1, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc4: = bound_method %.loc4_13.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc4: %ptr.843 = addr_of %.loc4_13.1 -// CHECK:STDOUT: %no_op.loc4: init %empty_tuple.type = call %bound_method.loc4_13.2(%addr.loc4) -// CHECK:STDOUT: %impl.elem0.loc7: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7 -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_fn.loc7 +// CHECK:STDOUT: %no_op.loc4: init %empty_tuple.type = call %bound_method.loc4(%addr.loc4) +// CHECK:STDOUT: %Op.bound.loc7: = bound_method %v.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc7: = bound_method %v.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc7: %ptr.843 = addr_of %v.var -// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7) +// CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7(%addr.loc7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -766,22 +715,12 @@ fn G() { // CHECK:STDOUT: %ptr.709: type = ptr_type %tuple.type.bcd [concrete] // CHECK:STDOUT: %tuple: %tuple.type.bcd = tuple_value (%empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.585: = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.bcd) [concrete] // CHECK:STDOUT: %Op.type.4e8: type = fn_type @Op.2, @impl(%tuple.type.bcd) [concrete] // CHECK:STDOUT: %Op.166: %Op.type.4e8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.65b: %Destroy.type = facet_value %tuple.type.bcd, (%Destroy.impl_witness.585) [concrete] -// CHECK:STDOUT: %.b6c: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.65b [concrete] // CHECK:STDOUT: %Op.specific_fn.48a: = specific_function %Op.166, @Op.2(%tuple.type.bcd) [concrete] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet.926: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.926 [concrete] // CHECK:STDOUT: %Op.specific_fn.393: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -792,8 +731,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -854,18 +791,16 @@ fn G() { // CHECK:STDOUT: %.loc9_35.3: type = converted %.loc9_35.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %z: ref %empty_tuple.type = bind_name z, %z.var -// CHECK:STDOUT: %impl.elem0.loc9_15: %.b6c = impl_witness_access constants.%Destroy.impl_witness.585, element0 [concrete = constants.%Op.166] -// CHECK:STDOUT: %bound_method.loc9_15.1: = bound_method %.var, %impl.elem0.loc9_15 -// CHECK:STDOUT: %specific_fn.loc9_15: = specific_function %impl.elem0.loc9_15, @Op.2(constants.%tuple.type.bcd) [concrete = constants.%Op.specific_fn.48a] -// CHECK:STDOUT: %bound_method.loc9_15.2: = bound_method %.var, %specific_fn.loc9_15 +// CHECK:STDOUT: %Op.bound.loc9_15: = bound_method %.var, constants.%Op.166 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.166, @Op.2(constants.%tuple.type.bcd) [concrete = constants.%Op.specific_fn.48a] +// CHECK:STDOUT: %bound_method.loc9_15: = bound_method %.var, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc9_15: %ptr.709 = addr_of %.var -// CHECK:STDOUT: %no_op.loc9_15: init %empty_tuple.type = call %bound_method.loc9_15.2(%addr.loc9_15) -// CHECK:STDOUT: %impl.elem0.loc9_27: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc9_27.1: = bound_method %z.var, %impl.elem0.loc9_27 -// CHECK:STDOUT: %specific_fn.loc9_27: = specific_function %impl.elem0.loc9_27, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] -// CHECK:STDOUT: %bound_method.loc9_27.2: = bound_method %z.var, %specific_fn.loc9_27 +// CHECK:STDOUT: %no_op.loc9_15: init %empty_tuple.type = call %bound_method.loc9_15(%addr.loc9_15) +// CHECK:STDOUT: %Op.bound.loc9_27: = bound_method %z.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn.393] +// CHECK:STDOUT: %bound_method.loc9_27: = bound_method %z.var, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc9_27: %ptr.843 = addr_of %z.var -// CHECK:STDOUT: %no_op.loc9_27: init %empty_tuple.type = call %bound_method.loc9_27.2(%addr.loc9_27) +// CHECK:STDOUT: %no_op.loc9_27: init %empty_tuple.type = call %bound_method.loc9_27(%addr.loc9_27) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -944,16 +879,9 @@ fn G() { // CHECK:STDOUT: %pattern_type.8c1: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic] -// CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.impl_witness.1dc: = impl_witness imports.%Destroy.impl_witness_table, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.type.a63: type = fn_type @Op.2, @impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %Op.ea3: %Op.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%Destroy.impl_witness.1dc) [concrete] -// CHECK:STDOUT: %.346: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete] // CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ea3, @Op.2(%empty_tuple.type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -964,8 +892,6 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)] -// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1030,24 +956,21 @@ fn G() { // CHECK:STDOUT: %tuple.loc8_48: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_48.3: %empty_tuple.type = converted %F.call.loc8_48, %tuple.loc8_48 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %z: %empty_tuple.type = bind_name z, %.loc8_48.3 -// CHECK:STDOUT: %impl.elem0.loc8_48: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc8_48.1: = bound_method %.loc8_48.1, %impl.elem0.loc8_48 -// CHECK:STDOUT: %specific_fn.loc8_48: = specific_function %impl.elem0.loc8_48, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_48.2: = bound_method %.loc8_48.1, %specific_fn.loc8_48 +// CHECK:STDOUT: %Op.bound.loc8_48: = bound_method %.loc8_48.1, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.1: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_48: = bound_method %.loc8_48.1, %Op.specific_fn.1 // CHECK:STDOUT: %addr.loc8_48: %ptr.843 = addr_of %.loc8_48.1 -// CHECK:STDOUT: %no_op.loc8_48: init %empty_tuple.type = call %bound_method.loc8_48.2(%addr.loc8_48) -// CHECK:STDOUT: %impl.elem0.loc8_38: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc8_38.1: = bound_method %.loc8_38.1, %impl.elem0.loc8_38 -// CHECK:STDOUT: %specific_fn.loc8_38: = specific_function %impl.elem0.loc8_38, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_38.2: = bound_method %.loc8_38.1, %specific_fn.loc8_38 +// CHECK:STDOUT: %no_op.loc8_48: init %empty_tuple.type = call %bound_method.loc8_48(%addr.loc8_48) +// CHECK:STDOUT: %Op.bound.loc8_38: = bound_method %.loc8_38.1, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.2: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_38: = bound_method %.loc8_38.1, %Op.specific_fn.2 // CHECK:STDOUT: %addr.loc8_38: %ptr.843 = addr_of %.loc8_38.1 -// CHECK:STDOUT: %no_op.loc8_38: init %empty_tuple.type = call %bound_method.loc8_38.2(%addr.loc8_38) -// CHECK:STDOUT: %impl.elem0.loc8_15: %.346 = impl_witness_access constants.%Destroy.impl_witness.1dc, element0 [concrete = constants.%Op.ea3] -// CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %y.var, %impl.elem0.loc8_15 -// CHECK:STDOUT: %specific_fn.loc8_15: = specific_function %impl.elem0.loc8_15, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %y.var, %specific_fn.loc8_15 +// CHECK:STDOUT: %no_op.loc8_38: init %empty_tuple.type = call %bound_method.loc8_38(%addr.loc8_38) +// CHECK:STDOUT: %Op.bound.loc8_15: = bound_method %y.var, constants.%Op.ea3 +// CHECK:STDOUT: %Op.specific_fn.3: = specific_function constants.%Op.ea3, @Op.2(constants.%empty_tuple.type) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc8_15: = bound_method %y.var, %Op.specific_fn.3 // CHECK:STDOUT: %addr.loc8_15: %ptr.843 = addr_of %y.var -// CHECK:STDOUT: %no_op.loc8_15: init %empty_tuple.type = call %bound_method.loc8_15.2(%addr.loc8_15) +// CHECK:STDOUT: %no_op.loc8_15: init %empty_tuple.type = call %bound_method.loc8_15(%addr.loc8_15) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/sem_ir/ids_test.cpp b/toolchain/sem_ir/ids_test.cpp index 67f88a591133..fece63a202de 100644 --- a/toolchain/sem_ir/ids_test.cpp +++ b/toolchain/sem_ir/ids_test.cpp @@ -27,10 +27,14 @@ TEST(IdsTest, LocIdValues) { auto min_node_id = static_cast(Parse::NodeId(0)); EXPECT_THAT(min_node_id.index, Eq(-2)); EXPECT_THAT(min_node_id.AsDesugared().index, Eq(-2 - (1 << 24))); + EXPECT_THAT(min_node_id.AsDesugared().index, + Eq(min_node_id.AsDesugared().AsDesugared().index)); auto max_node_id = static_cast(Parse::NodeId(Parse::NodeId::Max - 1)); EXPECT_THAT(max_node_id.index, Eq(-2 - (1 << 24) + 1)); EXPECT_THAT(max_node_id.AsDesugared().index, Eq(-2 - (1 << 25) + 1)); + EXPECT_THAT(max_node_id.AsDesugared().index, + Eq(max_node_id.AsDesugared().AsDesugared().index)); EXPECT_THAT(static_cast(ImportIRInstId(0)).index, Eq(-2 - (1 << 25))); EXPECT_THAT(static_cast(ImportIRInstId(ImportIRInstId::Max - 1)).index,