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
@@ -110,10 +110,10 @@ fn F() {
// CHECK:STDOUT: %Destroy.impl_witness.eb8: <witness> = 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> = specific_function %Op.d5a, @Op.2(%empty_struct_type) [concrete]
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -123,7 +123,7 @@ 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_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:
@@ -162,16 +162,14 @@ fn F() {
// CHECK:STDOUT: %bound_method.loc14_13.1: <bound method> = bound_method %w.var, %impl.elem0.loc14
// CHECK:STDOUT: %specific_fn.loc14: <specific function> = 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> = bound_method %w.var, %specific_fn.loc14
// CHECK:STDOUT: %empty_struct.loc14: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc14_13: %empty_struct_type = converted %w.var, %empty_struct.loc14 [concrete = constants.%empty_struct]
// CHECK:STDOUT: %no_op.loc14: init %empty_tuple.type = call %bound_method.loc14_13.2(%.loc14_13)
// 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> = bound_method %v.var, %impl.elem0.loc9
// CHECK:STDOUT: %specific_fn.loc9: <specific function> = 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> = bound_method %v.var, %specific_fn.loc9
// CHECK:STDOUT: %empty_struct.loc9: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc9_11: %empty_struct_type = converted %v.var, %empty_struct.loc9 [concrete = constants.%empty_struct]
// CHECK:STDOUT: %no_op.loc9: init %empty_tuple.type = call %bound_method.loc9_11.2(%.loc9_11)
// 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: return
// CHECK:STDOUT: }
// CHECK:STDOUT: