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 authored and GitHub committed 2025-06-28 00:50:47 +00:00
1 parent 21762f4003
commit 4aa62bf5cd
146 files changed
+1701 -2113

No files matched your search

@@ -1758,6 +1758,7 @@ fn F() {
// CHECK:STDOUT: %Destroy.impl_witness.64e: <witness> = 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: %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> = specific_function %Op.e6a, @Op.96(%i32) [concrete]
@@ -1780,7 +1781,7 @@ fn F() {
// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_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/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_23, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)]
// 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:
@@ -1810,8 +1811,8 @@ fn F() {
// CHECK:STDOUT: %specific_fn.loc7_3.1: <specific function> = specific_function %impl.elem0.loc7_3.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %int_1, %specific_fn.loc7_3.1 [concrete = constants.%bound_method]
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc7_3.1: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: assign %a.var, %.loc7_3.1
// CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: assign %a.var, %.loc7_3
// CHECK:STDOUT: %.loc7_10: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
@@ -1824,8 +1825,8 @@ fn F() {
// CHECK:STDOUT: %bound_method.loc7_3.3: <bound method> = bound_method %a.var, %impl.elem0.loc7_3.2
// CHECK:STDOUT: %specific_fn.loc7_3.2: <specific function> = specific_function %impl.elem0.loc7_3.2, @Op.96(constants.%i32) [concrete = constants.%Op.specific_fn.014]
// CHECK:STDOUT: %bound_method.loc7_3.4: <bound method> = bound_method %a.var, %specific_fn.loc7_3.2
// CHECK:STDOUT: %.loc7_3.2: %i32 = bind_value %a.var
// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.4(%.loc7_3.2)
// CHECK:STDOUT: %addr: %ptr.235 = addr_of %a.var
// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.4(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1865,6 +1866,7 @@ fn F() {
// CHECK:STDOUT: %Destroy.impl_witness.64e: <witness> = 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: %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> = specific_function %Op.e6a, @Op.96(%i32) [concrete]
@@ -1887,7 +1889,7 @@ fn F() {
// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_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/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_23, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)]
// 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:
@@ -1917,8 +1919,8 @@ fn F() {
// CHECK:STDOUT: %specific_fn.loc7_3.1: <specific function> = specific_function %impl.elem0.loc7_3.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %int_1, %specific_fn.loc7_3.1 [concrete = constants.%bound_method]
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc7_3.1: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: assign %a.var, %.loc7_3.1
// CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: assign %a.var, %.loc7_3
// CHECK:STDOUT: %.loc7_11: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
@@ -1931,8 +1933,8 @@ fn F() {
// CHECK:STDOUT: %bound_method.loc7_3.3: <bound method> = bound_method %a.var, %impl.elem0.loc7_3.2
// CHECK:STDOUT: %specific_fn.loc7_3.2: <specific function> = specific_function %impl.elem0.loc7_3.2, @Op.96(constants.%i32) [concrete = constants.%Op.specific_fn.014]
// CHECK:STDOUT: %bound_method.loc7_3.4: <bound method> = bound_method %a.var, %specific_fn.loc7_3.2
// CHECK:STDOUT: %.loc7_3.2: %i32 = bind_value %a.var
// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.4(%.loc7_3.2)
// CHECK:STDOUT: %addr: %ptr.235 = addr_of %a.var
// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.4(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1995,7 +1997,7 @@ fn F() {
// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_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/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_23, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)]
// 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:
@@ -2025,8 +2027,8 @@ fn F() {
// CHECK:STDOUT: %specific_fn.loc7_3.1: <specific function> = specific_function %impl.elem0.loc7_3.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %int_1, %specific_fn.loc7_3.1 [concrete = constants.%bound_method]
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc7_3.1: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: assign %a.var, %.loc7_3.1
// CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: assign %a.var, %.loc7_3
// CHECK:STDOUT: %.loc7_10: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
@@ -2035,13 +2037,13 @@ fn F() {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
// CHECK:STDOUT: %a.ref: ref %i32 = name_ref a, %a
// CHECK:STDOUT: %addr: %ptr.235 = addr_of %a.ref
// CHECK:STDOUT: %addr.loc15: %ptr.235 = addr_of %a.ref
// 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> = bound_method %a.var, %impl.elem0.loc7_3.2
// CHECK:STDOUT: %specific_fn.loc7_3.2: <specific function> = specific_function %impl.elem0.loc7_3.2, @Op.96(constants.%i32) [concrete = constants.%Op.specific_fn.014]
// CHECK:STDOUT: %bound_method.loc7_3.4: <bound method> = bound_method %a.var, %specific_fn.loc7_3.2
// CHECK:STDOUT: %.loc7_3.2: %i32 = bind_value %a.var
// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.4(%.loc7_3.2)
// CHECK:STDOUT: %addr.loc7: %ptr.235 = addr_of %a.var
// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.4(%addr.loc7)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2104,7 +2106,7 @@ fn F() {
// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_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/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_23, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)]
// 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:
@@ -2134,8 +2136,8 @@ fn F() {
// CHECK:STDOUT: %specific_fn.loc7_3.1: <specific function> = specific_function %impl.elem0.loc7_3.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %int_1, %specific_fn.loc7_3.1 [concrete = constants.%bound_method]
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc7_3.1: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: assign %a.var, %.loc7_3.1
// CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: assign %a.var, %.loc7_3
// CHECK:STDOUT: %.loc7_11: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
@@ -2144,13 +2146,13 @@ fn F() {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
// CHECK:STDOUT: %a.ref: ref %i32 = name_ref a, %a
// CHECK:STDOUT: %addr: %ptr.235 = addr_of %a.ref
// CHECK:STDOUT: %addr.loc15: %ptr.235 = addr_of %a.ref
// 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> = bound_method %a.var, %impl.elem0.loc7_3.2
// CHECK:STDOUT: %specific_fn.loc7_3.2: <specific function> = specific_function %impl.elem0.loc7_3.2, @Op.96(constants.%i32) [concrete = constants.%Op.specific_fn.014]
// CHECK:STDOUT: %bound_method.loc7_3.4: <bound method> = bound_method %a.var, %specific_fn.loc7_3.2
// CHECK:STDOUT: %.loc7_3.2: %i32 = bind_value %a.var
// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.4(%.loc7_3.2)
// CHECK:STDOUT: %addr.loc7: %ptr.235 = addr_of %a.var
// CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc7_3.4(%addr.loc7)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: