Switch Destroy to addr self (#5748)

Pointed out by zygoloid on #toolchain, just taking care of this now.
This commit is contained in:
Jon Ross-Perkins
2025-06-28 00:50:47 +00:00
committed by GitHub
parent 21762f4003
commit 4aa62bf5cd
146 changed files with 1701 additions and 2113 deletions
@@ -208,7 +208,7 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [concrete]
// CHECK:STDOUT: %D: type = class_type @D [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// 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]
@@ -219,6 +219,7 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: %Destroy.impl_witness.45e: <witness> = 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> = specific_function %Op.2d4, @Op.2(%D) [concrete]
@@ -237,10 +238,10 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//incomplete_return, loc37_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.8f2: <witness> = 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_23, loaded [symbolic = @impl.%Op (constants.%Op.46f)]
// 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:
@@ -288,14 +289,14 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: %bound_method.loc34_15.1: <bound method> = bound_method %.loc34_15.1, %impl.elem0.loc34
// CHECK:STDOUT: %specific_fn.loc34: <specific function> = specific_function %impl.elem0.loc34, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc34_15.2: <bound method> = bound_method %.loc34_15.1, %specific_fn.loc34
// CHECK:STDOUT: %.loc34_15.3: %D = bind_value %.loc34_15.1
// CHECK:STDOUT: %no_op.loc34: init %empty_tuple.type = call %bound_method.loc34_15.2(%.loc34_15.3)
// 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> = bound_method %.loc33_17.1, %impl.elem0.loc33
// CHECK:STDOUT: %specific_fn.loc33: <specific function> = specific_function %impl.elem0.loc33, @Op.2(constants.%D) [concrete = constants.%Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc33_17.2: <bound method> = bound_method %.loc33_17.1, %specific_fn.loc33
// CHECK:STDOUT: %.loc33_17.3: %D = bind_value %.loc33_17.1
// CHECK:STDOUT: %no_op.loc33: init %empty_tuple.type = call %bound_method.loc33_17.2(%.loc33_17.3)
// 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: return
// CHECK:STDOUT: }
// CHECK:STDOUT: