mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-10 12:38:28 +00:00
Determining that a type has trivial destruction requires checking whether all of its subobjects have trivial destruction and whether its type has a custom witness for `Destroy.Op`. This isn't possible when `Destroy` is the custodian for `Destroy.Op` and `SubobjectDestroy.Op`, so we need to make `SubobjectDestroy` its own interface. `Destroy.SelfDestruct` becomes a standalone function because it depends on `SubobjectDestroy` and `Destroy` being implemented, and is also responsible for generating any custom witnesses for both interfaces. Making `SelfDestruct` an interface was experimented with, but this required a blanket impl that caused issues for facet types. `Destroy` depends on `SubobjectDestroy` to be implemented. We'd ideally use `require impls SubobjectDestroy`, but it isn't complete yet, and it also causes problems when `Destroy` is implemented inside the class definition. We work around this by temporarily renaming the `Destroy` interface to `DestroyImpl`, and introducing a constraint called `Destroy` so that user code doesn't need to write `Core.SubobjectDestroy & Core.Destroy`.
552 lines
40 KiB
Plaintext
552 lines
40 KiB
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
|
|
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
|
|
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/facet/call_combined_impl_witness.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/facet/call_combined_impl_witness.carbon
|
|
|
|
interface Empty {
|
|
}
|
|
interface A {
|
|
fn AA();
|
|
}
|
|
interface B {
|
|
fn BB();
|
|
}
|
|
|
|
class C {}
|
|
impl C as Empty {}
|
|
impl C as A {
|
|
fn AA() {}
|
|
}
|
|
impl C as B {
|
|
fn BB() {}
|
|
}
|
|
|
|
fn G[T: A & Empty & B](t: T) {
|
|
t.AA();
|
|
t.BB();
|
|
|
|
T.AA();
|
|
T.BB();
|
|
|
|
T.(A.AA)();
|
|
T.(B.BB)();
|
|
}
|
|
|
|
fn F() {
|
|
G({} as C);
|
|
}
|
|
|
|
// CHECK:STDOUT: --- call_combined_impl_witness.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %Empty.type: type = facet_type <@Empty> [concrete]
|
|
// CHECK:STDOUT: %Self.d44: %Empty.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
|
|
// CHECK:STDOUT: %Self.d0c: %A.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type.ec6: type = fn_type @A.WithSelf.AA, @A.WithSelf(%Self.d0c) [symbolic]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.4ee: %A.WithSelf.AA.type.ec6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete]
|
|
// CHECK:STDOUT: %assoc0.f3a: %A.assoc_type = assoc_entity element0, @A.WithSelf.%A.WithSelf.AA.decl [concrete]
|
|
// CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete]
|
|
// CHECK:STDOUT: %Self.b45: %B.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type.85c: type = fn_type @B.WithSelf.BB, @B.WithSelf(%Self.b45) [symbolic]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.6ba: %B.WithSelf.BB.type.85c = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %B.assoc_type: type = assoc_entity_type @B [concrete]
|
|
// CHECK:STDOUT: %assoc0.7c3: %B.assoc_type = assoc_entity element0, @B.WithSelf.%B.WithSelf.BB.decl [concrete]
|
|
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %.6ee: <witness> = impl_self_witness %C, @Empty [concrete]
|
|
// CHECK:STDOUT: %Empty.impl_witness: <witness> = impl_witness @C.as.Empty.impl.%Empty.impl_witness_table [concrete]
|
|
// CHECK:STDOUT: %Empty.facet: %Empty.type = facet_value %C, (%Empty.impl_witness) [concrete]
|
|
// CHECK:STDOUT: %.4e8: <witness> = impl_self_witness %C, @A [concrete]
|
|
// CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness @C.as.A.impl.%A.impl_witness_table [concrete]
|
|
// CHECK:STDOUT: %C.as.A.impl.AA.type: type = fn_type @C.as.A.impl.AA [concrete]
|
|
// CHECK:STDOUT: %C.as.A.impl.AA: %C.as.A.impl.AA.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %A.facet.7ce: %A.type = facet_value %C, (%A.impl_witness) [concrete]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type.5ec: type = fn_type @A.WithSelf.AA, @A.WithSelf(%A.facet.7ce) [concrete]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.b2c: %A.WithSelf.AA.type.5ec = struct_value () [concrete]
|
|
// CHECK:STDOUT: %.827: <witness> = impl_self_witness %C, @B [concrete]
|
|
// CHECK:STDOUT: %B.impl_witness: <witness> = impl_witness @C.as.B.impl.%B.impl_witness_table [concrete]
|
|
// CHECK:STDOUT: %C.as.B.impl.BB.type: type = fn_type @C.as.B.impl.BB [concrete]
|
|
// CHECK:STDOUT: %C.as.B.impl.BB: %C.as.B.impl.BB.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %B.facet.a13: %B.type = facet_value %C, (%B.impl_witness) [concrete]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type.0e4: type = fn_type @B.WithSelf.BB, @B.WithSelf(%B.facet.a13) [concrete]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.be3: %B.WithSelf.BB.type.0e4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %BitAndWith.type.a06: type = generic_interface_type @BitAndWith [concrete]
|
|
// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.a06 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %BitAndWith.type.7f7: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
|
|
// CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
|
|
// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.7f7 = facet_value type, (%BitAndWith.impl_witness) [concrete]
|
|
// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.1a6: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith.WithSelf(type, %BitAndWith.facet) [concrete]
|
|
// CHECK:STDOUT: %.b4e: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.1a6, %BitAndWith.facet [concrete]
|
|
// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete]
|
|
// CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound.36e: <bound method> = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete]
|
|
// CHECK:STDOUT: %facet_type.b34: type = facet_type <@Empty & @A> [concrete]
|
|
// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound.188: <bound method> = bound_method %facet_type.b34, %type.as.BitAndWith.impl.Op [concrete]
|
|
// CHECK:STDOUT: %facet_type.22e: type = facet_type <@Empty & @A & @B> [concrete]
|
|
// CHECK:STDOUT: %pattern_type.a67: type = pattern_type %facet_type.22e [concrete]
|
|
// CHECK:STDOUT: %T.patt.2ab: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.b3c: %facet_type.22e = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as_type.3d8: type = facet_access_type %T.b3c [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.653: type = pattern_type %T.as_type.3d8 [symbolic]
|
|
// CHECK:STDOUT: %t.param_patt.4f9: %pattern_type.653 = value_param_pattern [symbolic]
|
|
// CHECK:STDOUT: %t.patt.00d: %pattern_type.653 = wrapper_binding_pattern t, %t.param_patt.4f9 [symbolic]
|
|
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
|
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %require_complete.632: <witness> = require_complete_type %T.as_type.3d8 [symbolic]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type.4e6: type = fn_type @A.WithSelf.AA, @A.WithSelf(%T.b3c) [symbolic]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.775: %A.WithSelf.AA.type.4e6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type.6fb: type = fn_type @B.WithSelf.BB, @B.WithSelf(%T.b3c) [symbolic]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.b81: %B.WithSelf.BB.type.6fb = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.b3c, @A [symbolic]
|
|
// CHECK:STDOUT: %A.facet.7b4: %A.type = facet_value %T.as_type.3d8, (%A.lookup_impl_witness) [symbolic]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type.bb4: type = fn_type @A.WithSelf.AA, @A.WithSelf(%A.facet.7b4) [symbolic]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.e48: %A.WithSelf.AA.type.bb4 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.31e: type = fn_type_with_self_type %A.WithSelf.AA.type.bb4, %A.facet.7b4 [symbolic]
|
|
// CHECK:STDOUT: %impl.elem0.333: %.31e = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
|
|
// CHECK:STDOUT: %specific_impl_fn.67a: <specific function> = specific_impl_function %impl.elem0.333, @A.WithSelf.AA(%A.facet.7b4) [symbolic]
|
|
// CHECK:STDOUT: %B.lookup_impl_witness: <witness> = lookup_impl_witness %T.b3c, @B [symbolic]
|
|
// CHECK:STDOUT: %B.facet.746: %B.type = facet_value %T.as_type.3d8, (%B.lookup_impl_witness) [symbolic]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type.4db: type = fn_type @B.WithSelf.BB, @B.WithSelf(%B.facet.746) [symbolic]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.4e4: %B.WithSelf.BB.type.4db = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.770: type = fn_type_with_self_type %B.WithSelf.BB.type.4db, %B.facet.746 [symbolic]
|
|
// CHECK:STDOUT: %impl.elem0.1ce: %.770 = impl_witness_access %B.lookup_impl_witness, element0 [symbolic]
|
|
// CHECK:STDOUT: %specific_impl_fn.05f: <specific function> = specific_impl_function %impl.elem0.1ce, @B.WithSelf.BB(%B.facet.746) [symbolic]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
|
|
// CHECK:STDOUT: %facet_value: %facet_type.22e = facet_value %C, (%Empty.impl_witness, %A.impl_witness, %B.impl_witness) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete]
|
|
// CHECK:STDOUT: %t.param_patt.5f9: %pattern_type.98b = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %t.patt.429: %pattern_type.98b = wrapper_binding_pattern t, %t.param_patt.5f9 [concrete]
|
|
// CHECK:STDOUT: %G.specific_fn: <specific function> = specific_function %G, @G(%facet_value) [concrete]
|
|
// CHECK:STDOUT: %.115: ref %C = temporary invalid, %C.val [concrete]
|
|
// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete]
|
|
// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
|
|
// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete]
|
|
// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic]
|
|
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc45_8.2 [concrete]
|
|
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %custom_witness.b80ef6.2: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete]
|
|
// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete]
|
|
// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete]
|
|
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete]
|
|
// CHECK:STDOUT: %SelfDestruct.specific_fn: <specific function> = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete]
|
|
// CHECK:STDOUT: %.be9: type = fn_type_with_self_type %A.WithSelf.AA.type.5ec, %A.facet.7ce [concrete]
|
|
// CHECK:STDOUT: %.3d4: type = fn_type_with_self_type %B.WithSelf.BB.type.0e4, %B.facet.a13 [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
|
|
// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.a06 = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
|
|
// CHECK:STDOUT: %Core.import_ref.9c3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
|
|
// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.9c3), @type.as.BitAndWith.impl [concrete]
|
|
// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct]
|
|
// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)]
|
|
// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .Empty = %Empty.decl
|
|
// CHECK:STDOUT: .A = %A.decl
|
|
// CHECK:STDOUT: .B = %B.decl
|
|
// CHECK:STDOUT: .C = %C.decl
|
|
// CHECK:STDOUT: .G = %G.decl
|
|
// CHECK:STDOUT: .F = %F.decl
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [concrete = constants.%Empty.type] {} {}
|
|
// CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
|
|
// CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {}
|
|
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
|
|
// CHECK:STDOUT: impl_decl @C.as.Empty.impl [concrete] {} {
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %.loc25: <witness> = impl_self_witness @C.as.Empty.impl.%C.ref, @Empty [concrete = constants.%.6ee]
|
|
// CHECK:STDOUT: impl_decl @C.as.A.impl [concrete] {} {
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %.loc26: <witness> = impl_self_witness @C.as.A.impl.%C.ref, @A [concrete = constants.%.4e8]
|
|
// CHECK:STDOUT: impl_decl @C.as.B.impl [concrete] {} {
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %.loc29: <witness> = impl_self_witness @C.as.B.impl.%C.ref, @B [concrete = constants.%.827]
|
|
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
|
// CHECK:STDOUT: %T.patt.loc33_7.1: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_7.2 (constants.%T.patt.2ab)]
|
|
// CHECK:STDOUT: %t.param_patt.loc33_25.1: @G.%pattern_type (%pattern_type.653) = value_param_pattern [symbolic = %t.param_patt.loc33_25.2 (constants.%t.param_patt.4f9)]
|
|
// CHECK:STDOUT: %t.patt.loc33_25.1: @G.%pattern_type (%pattern_type.653) = wrapper_binding_pattern t, %t.param_patt.loc33_25.1 [symbolic = %t.patt.loc33_25.2 (constants.%t.patt.00d)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc33_19.1: type = splice_block %.loc33_19.3 [concrete = constants.%facet_type.22e] {
|
|
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %A.ref.loc33: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
|
|
// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type]
|
|
// CHECK:STDOUT: %impl.elem0.loc33_11: %.b4e = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
|
|
// CHECK:STDOUT: %bound_method.loc33_11: <bound method> = bound_method %A.ref.loc33, %impl.elem0.loc33_11 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.36e]
|
|
// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc33_11: init type = call %bound_method.loc33_11(%A.ref.loc33, %Empty.ref) [concrete = constants.%facet_type.b34]
|
|
// CHECK:STDOUT: %B.ref.loc33: type = name_ref B, file.%B.decl [concrete = constants.%B.type]
|
|
// CHECK:STDOUT: %impl.elem0.loc33_19: %.b4e = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
|
|
// CHECK:STDOUT: %bound_method.loc33_19: <bound method> = bound_method %type.as.BitAndWith.impl.Op.call.loc33_11, %impl.elem0.loc33_19 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.188]
|
|
// CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_11 [concrete = constants.%facet_type.b34]
|
|
// CHECK:STDOUT: %.loc33_11.2: type = converted %type.as.BitAndWith.impl.Op.call.loc33_11, %.loc33_11.1 [concrete = constants.%facet_type.b34]
|
|
// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc33_19: init type = call %bound_method.loc33_19(%.loc33_11.2, %B.ref.loc33) [concrete = constants.%facet_type.22e]
|
|
// CHECK:STDOUT: %.loc33_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_19 [concrete = constants.%facet_type.22e]
|
|
// CHECK:STDOUT: %.loc33_19.3: type = converted %type.as.BitAndWith.impl.Op.call.loc33_19, %.loc33_19.2 [concrete = constants.%facet_type.22e]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc33_7.2: %facet_type.22e = symbolic_binding T, 0 [symbolic = %T.loc33_7.1 (constants.%T.b3c)]
|
|
// CHECK:STDOUT: %t.param: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8) = value_param call_param0
|
|
// CHECK:STDOUT: %.loc33_27.1: type = splice_block %.loc33_27.2 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] {
|
|
// CHECK:STDOUT: %T.ref.loc33: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)]
|
|
// CHECK:STDOUT: %T.as_type.loc33_27.2: type = facet_access_type %T.ref.loc33 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: %.loc33_27.2: type = converted %T.ref.loc33, %T.as_type.loc33_27.2 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %t: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8) = wrapper_binding t, %t.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface @Empty {
|
|
// CHECK:STDOUT: %Self: %Empty.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d44]
|
|
// CHECK:STDOUT: %Empty.WithSelf.decl = interface_with_self_decl @Empty [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .AA = <poisoned>
|
|
// CHECK:STDOUT: .BB = <poisoned>
|
|
// CHECK:STDOUT: witness = ()
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface @A {
|
|
// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d0c]
|
|
// CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %A.WithSelf.AA.decl: @A.WithSelf.%A.WithSelf.AA.type (%A.WithSelf.AA.type.ec6) = fn_decl @A.WithSelf.AA [symbolic = @A.WithSelf.%A.WithSelf.AA (constants.%A.WithSelf.AA.4ee)] {} {}
|
|
// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.WithSelf.AA.decl [concrete = constants.%assoc0.f3a]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .AA = @A.WithSelf.%assoc0
|
|
// CHECK:STDOUT: .BB = <poisoned>
|
|
// CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.AA.decl)
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface @B {
|
|
// CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic = constants.%Self.b45]
|
|
// CHECK:STDOUT: %B.WithSelf.decl = interface_with_self_decl @B [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %B.WithSelf.BB.decl: @B.WithSelf.%B.WithSelf.BB.type (%B.WithSelf.BB.type.85c) = fn_decl @B.WithSelf.BB [symbolic = @B.WithSelf.%B.WithSelf.BB (constants.%B.WithSelf.BB.6ba)] {} {}
|
|
// CHECK:STDOUT: %assoc0: %B.assoc_type = assoc_entity element0, %B.WithSelf.BB.decl [concrete = constants.%assoc0.7c3]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .BB = @B.WithSelf.%assoc0
|
|
// CHECK:STDOUT: .AA = <poisoned>
|
|
// CHECK:STDOUT: witness = (@B.WithSelf.%B.WithSelf.BB.decl)
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @C.as.Empty.impl: %C.ref as %Empty.ref {
|
|
// CHECK:STDOUT: %Empty.impl_witness_table = impl_witness_table (), @C.as.Empty.impl [concrete]
|
|
// CHECK:STDOUT: %Empty.impl_witness: <witness> = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: extend %Empty.ref
|
|
// CHECK:STDOUT: witness = %Empty.impl_witness
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @C.as.A.impl: %C.ref as %A.ref {
|
|
// CHECK:STDOUT: %C.as.A.impl.AA.decl: %C.as.A.impl.AA.type = fn_decl @C.as.A.impl.AA [concrete = constants.%C.as.A.impl.AA] {} {}
|
|
// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (%C.as.A.impl.AA.decl), @C.as.A.impl [concrete]
|
|
// CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .AA = %C.as.A.impl.AA.decl
|
|
// CHECK:STDOUT: extend %A.ref
|
|
// CHECK:STDOUT: witness = %A.impl_witness
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @C.as.B.impl: %C.ref as %B.ref {
|
|
// CHECK:STDOUT: %C.as.B.impl.BB.decl: %C.as.B.impl.BB.type = fn_decl @C.as.B.impl.BB [concrete = constants.%C.as.B.impl.BB] {} {}
|
|
// CHECK:STDOUT: %B.impl_witness_table = impl_witness_table (%C.as.B.impl.BB.decl), @C.as.B.impl [concrete]
|
|
// CHECK:STDOUT: %B.impl_witness: <witness> = impl_witness %B.impl_witness_table [concrete = constants.%B.impl_witness]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .BB = %C.as.B.impl.BB.decl
|
|
// CHECK:STDOUT: extend %B.ref
|
|
// CHECK:STDOUT: witness = %B.impl_witness
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @C {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%C
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @A.WithSelf.AA(@A.%Self: %A.type) {
|
|
// CHECK:STDOUT: fn();
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @B.WithSelf.BB(@B.%Self: %B.type) {
|
|
// CHECK:STDOUT: fn();
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @C.as.A.impl.AA() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @C.as.B.impl.BB() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @G(%T.loc33_7.2: %facet_type.22e) {
|
|
// CHECK:STDOUT: %T.patt.loc33_7.2: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_7.2 (constants.%T.patt.2ab)]
|
|
// CHECK:STDOUT: %T.loc33_7.1: %facet_type.22e = symbolic_binding T, 0 [symbolic = %T.loc33_7.1 (constants.%T.b3c)]
|
|
// CHECK:STDOUT: %T.as_type.loc33_27.1: type = facet_access_type %T.loc33_7.1 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc33_27.1 [symbolic = %pattern_type (constants.%pattern_type.653)]
|
|
// CHECK:STDOUT: %t.param_patt.loc33_25.2: @G.%pattern_type (%pattern_type.653) = value_param_pattern [symbolic = %t.param_patt.loc33_25.2 (constants.%t.param_patt.4f9)]
|
|
// CHECK:STDOUT: %t.patt.loc33_25.2: @G.%pattern_type (%pattern_type.653) = wrapper_binding_pattern t, %t.param_patt.loc33_25.2 [symbolic = %t.patt.loc33_25.2 (constants.%t.patt.00d)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc33_27.1 [symbolic = %require_complete (constants.%require_complete.632)]
|
|
// CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc33_7.1, @A [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
|
|
// CHECK:STDOUT: %A.facet.loc34: %A.type = facet_value %T.as_type.loc33_27.1, (%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type: type = fn_type @A.WithSelf.AA, @A.WithSelf(%A.facet.loc34) [symbolic = %A.WithSelf.AA.type (constants.%A.WithSelf.AA.type.bb4)]
|
|
// CHECK:STDOUT: %.loc34: type = fn_type_with_self_type %A.WithSelf.AA.type, %A.facet.loc34 [symbolic = %.loc34 (constants.%.31e)]
|
|
// CHECK:STDOUT: %impl.elem0.loc34_4.2: @G.%.loc34 (%.31e) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.333)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: <specific function> = specific_impl_function %impl.elem0.loc34_4.2, @A.WithSelf.AA(%A.facet.loc34) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.67a)]
|
|
// CHECK:STDOUT: %B.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc33_7.1, @B [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness)]
|
|
// CHECK:STDOUT: %B.facet.loc35: %B.type = facet_value %T.as_type.loc33_27.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.746)]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type: type = fn_type @B.WithSelf.BB, @B.WithSelf(%B.facet.loc35) [symbolic = %B.WithSelf.BB.type (constants.%B.WithSelf.BB.type.4db)]
|
|
// CHECK:STDOUT: %.loc35: type = fn_type_with_self_type %B.WithSelf.BB.type, %B.facet.loc35 [symbolic = %.loc35 (constants.%.770)]
|
|
// CHECK:STDOUT: %impl.elem0.loc35_4.2: @G.%.loc35 (%.770) = impl_witness_access %B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.1ce)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc35_4.2: <specific function> = specific_impl_function %impl.elem0.loc35_4.2, @B.WithSelf.BB(%B.facet.loc35) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.05f)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8)) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %t.ref.loc34: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8) = name_ref t, %t
|
|
// CHECK:STDOUT: %AA.ref.loc34: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.f3a]
|
|
// CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34 (%.31e) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.333)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: <specific function> = specific_impl_function %impl.elem0.loc34_4.1, @A.WithSelf.AA(constants.%A.facet.7b4) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.67a)]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.call.loc34: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1()
|
|
// CHECK:STDOUT: %t.ref.loc35: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8) = name_ref t, %t
|
|
// CHECK:STDOUT: %BB.ref.loc35: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.7c3]
|
|
// CHECK:STDOUT: %impl.elem0.loc35_4.1: @G.%.loc35 (%.770) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.1ce)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc35_4.1: <specific function> = specific_impl_function %impl.elem0.loc35_4.1, @B.WithSelf.BB(constants.%B.facet.746) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.05f)]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.call.loc35: init %empty_tuple.type = call %specific_impl_fn.loc35_4.1()
|
|
// CHECK:STDOUT: %T.ref.loc37: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)]
|
|
// CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: %.loc37: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: %AA.ref.loc37: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.f3a]
|
|
// CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34 (%.31e) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.333)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc37: <specific function> = specific_impl_function %impl.elem0.loc37, @A.WithSelf.AA(constants.%A.facet.7b4) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.67a)]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.call.loc37: init %empty_tuple.type = call %specific_impl_fn.loc37()
|
|
// CHECK:STDOUT: %T.ref.loc38: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)]
|
|
// CHECK:STDOUT: %T.as_type.loc38: type = facet_access_type %T.ref.loc38 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: %.loc38: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: %BB.ref.loc38: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.7c3]
|
|
// CHECK:STDOUT: %impl.elem0.loc38: @G.%.loc35 (%.770) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.1ce)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc38: <specific function> = specific_impl_function %impl.elem0.loc38, @B.WithSelf.BB(constants.%B.facet.746) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.05f)]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.call.loc38: init %empty_tuple.type = call %specific_impl_fn.loc38()
|
|
// CHECK:STDOUT: %T.ref.loc40: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)]
|
|
// CHECK:STDOUT: %A.ref.loc40: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
|
|
// CHECK:STDOUT: %AA.ref.loc40: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.f3a]
|
|
// CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type %T.ref.loc40 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: %A.facet.loc40: %A.type = facet_value %T.as_type.loc40, (constants.%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)]
|
|
// CHECK:STDOUT: %.loc40: %A.type = converted %T.ref.loc40, %A.facet.loc40 [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)]
|
|
// CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34 (%.31e) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.333)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc40: <specific function> = specific_impl_function %impl.elem0.loc40, @A.WithSelf.AA(constants.%A.facet.7b4) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.67a)]
|
|
// CHECK:STDOUT: %A.WithSelf.AA.call.loc40: init %empty_tuple.type = call %specific_impl_fn.loc40()
|
|
// CHECK:STDOUT: %T.ref.loc41: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)]
|
|
// CHECK:STDOUT: %B.ref.loc41: type = name_ref B, file.%B.decl [concrete = constants.%B.type]
|
|
// CHECK:STDOUT: %BB.ref.loc41: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.7c3]
|
|
// CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type %T.ref.loc41 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)]
|
|
// CHECK:STDOUT: %B.facet.loc41: %B.type = facet_value %T.as_type.loc41, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.746)]
|
|
// CHECK:STDOUT: %.loc41: %B.type = converted %T.ref.loc41, %B.facet.loc41 [symbolic = %B.facet.loc35 (constants.%B.facet.746)]
|
|
// CHECK:STDOUT: %impl.elem0.loc41: @G.%.loc35 (%.770) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.1ce)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc41: <specific function> = specific_impl_function %impl.elem0.loc41, @B.WithSelf.BB(constants.%B.facet.746) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.05f)]
|
|
// CHECK:STDOUT: %B.WithSelf.BB.call.loc41: init %empty_tuple.type = call %specific_impl_fn.loc41()
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G]
|
|
// CHECK:STDOUT: %.loc45_6.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
// CHECK:STDOUT: %.loc45_6.2: ref %C = temporary_storage
|
|
// CHECK:STDOUT: %.loc45_6.3: init %C to %.loc45_6.2 = class_init () [concrete = constants.%C.val]
|
|
// CHECK:STDOUT: %.loc45_8.1: init %C = converted %.loc45_6.1, %.loc45_6.3 [concrete = constants.%C.val]
|
|
// CHECK:STDOUT: %facet_value.loc45_12.1: %facet_type.22e = facet_value constants.%C, (constants.%Empty.impl_witness, constants.%A.impl_witness, constants.%B.impl_witness) [concrete = constants.%facet_value]
|
|
// CHECK:STDOUT: %.loc45_12.1: %facet_type.22e = converted constants.%C, %facet_value.loc45_12.1 [concrete = constants.%facet_value]
|
|
// CHECK:STDOUT: %facet_value.loc45_12.2: %facet_type.22e = facet_value constants.%C, (constants.%Empty.impl_witness, constants.%A.impl_witness, constants.%B.impl_witness) [concrete = constants.%facet_value]
|
|
// CHECK:STDOUT: %.loc45_12.2: %facet_type.22e = converted constants.%C, %facet_value.loc45_12.2 [concrete = constants.%facet_value]
|
|
// CHECK:STDOUT: %G.specific_fn: <specific function> = specific_function %G.ref, @G(constants.%facet_value) [concrete = constants.%G.specific_fn]
|
|
// CHECK:STDOUT: %.loc45_8.2: ref %C = temporary %.loc45_6.2, %.loc45_8.1 [concrete = constants.%.115]
|
|
// CHECK:STDOUT: %.loc45_8.3: %C = acquire_value %.loc45_8.2 [concrete = constants.%C.val]
|
|
// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn(%.loc45_8.3)
|
|
// CHECK:STDOUT: %Destroy.facet.loc45_8.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet]
|
|
// CHECK:STDOUT: %.loc45_8.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc45_8.1 [concrete = constants.%Destroy.facet]
|
|
// CHECK:STDOUT: %Destroy.facet.loc45_8.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet]
|
|
// CHECK:STDOUT: %.loc45_8.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc45_8.2 [concrete = constants.%Destroy.facet]
|
|
// CHECK:STDOUT: %SelfDestruct.specific_fn: <specific function> = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn]
|
|
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc45_8.2)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc45_8.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc45_8.2(%self.param: ref %C) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Empty.WithSelf(constants.%Self.d44) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @A.WithSelf(constants.%Self.d0c) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%Self.d0c
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.ec6
|
|
// CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.4ee
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @A.WithSelf.AA(constants.%Self.d0c) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.WithSelf(constants.%Self.b45) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%Self.b45
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.85c
|
|
// CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.6ba
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.WithSelf.BB(constants.%Self.b45) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Empty.WithSelf(constants.%Empty.facet) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @A.WithSelf(constants.%A.facet.7ce) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%A.facet.7ce
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.5ec
|
|
// CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.b2c
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @A.WithSelf.AA(constants.%A.facet.7ce) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.WithSelf(constants.%B.facet.a13) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%B.facet.a13
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.0e4
|
|
// CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.be3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.WithSelf.BB(constants.%B.facet.a13) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @G(constants.%T.b3c) {
|
|
// CHECK:STDOUT: %T.patt.loc33_7.2 => constants.%T.patt.2ab
|
|
// CHECK:STDOUT: %T.loc33_7.1 => constants.%T.b3c
|
|
// CHECK:STDOUT: %T.as_type.loc33_27.1 => constants.%T.as_type.3d8
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.653
|
|
// CHECK:STDOUT: %t.param_patt.loc33_25.2 => constants.%t.param_patt.4f9
|
|
// CHECK:STDOUT: %t.patt.loc33_25.2 => constants.%t.patt.00d
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.b3c) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @A.WithSelf(constants.%T.b3c) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%T.b3c
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.4e6
|
|
// CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.775
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.WithSelf(constants.%T.b3c) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%T.b3c
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.6fb
|
|
// CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.b81
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @A.WithSelf(constants.%A.facet.7b4) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%A.facet.7b4
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.bb4
|
|
// CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.e48
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @A.WithSelf.AA(constants.%A.facet.7b4) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.WithSelf(constants.%B.facet.746) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%B.facet.746
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.4db
|
|
// CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.4e4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @B.WithSelf.BB(constants.%B.facet.746) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @G(constants.%facet_value) {
|
|
// CHECK:STDOUT: %T.patt.loc33_7.2 => constants.%T.patt.2ab
|
|
// CHECK:STDOUT: %T.loc33_7.1 => constants.%facet_value
|
|
// CHECK:STDOUT: %T.as_type.loc33_27.1 => constants.%C
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b
|
|
// CHECK:STDOUT: %t.param_patt.loc33_25.2 => constants.%t.param_patt.5f9
|
|
// CHECK:STDOUT: %t.patt.loc33_25.2 => constants.%t.patt.429
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete => constants.%complete_type
|
|
// CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness
|
|
// CHECK:STDOUT: %A.facet.loc34 => constants.%A.facet.7ce
|
|
// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.5ec
|
|
// CHECK:STDOUT: %.loc34 => constants.%.be9
|
|
// CHECK:STDOUT: %impl.elem0.loc34_4.2 => constants.%C.as.A.impl.AA
|
|
// CHECK:STDOUT: %specific_impl_fn.loc34_4.2 => constants.%C.as.A.impl.AA
|
|
// CHECK:STDOUT: %B.lookup_impl_witness => constants.%B.impl_witness
|
|
// CHECK:STDOUT: %B.facet.loc35 => constants.%B.facet.a13
|
|
// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.0e4
|
|
// CHECK:STDOUT: %.loc35 => constants.%.3d4
|
|
// CHECK:STDOUT: %impl.elem0.loc35_4.2 => constants.%C.as.B.impl.BB
|
|
// CHECK:STDOUT: %specific_impl_fn.loc35_4.2 => constants.%C.as.B.impl.BB
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|