Add an interface-with-self generic to each interface and same for constraints (#6667)

Currently each interface has a `Self` facet internally that becomes a
binding to every entity inside the interface: associated constants,
functions, and require decls. Each of these has to be independently
generic as a result. This makes is challenging in extended name lookup
to move into an extended scope of an interface, as we have a specific
for the interface, but the names within require a different specific
that includes a `Self` facet value.

We generalize this relationship by adding a second generic to Interface,
called `generic_with_self`. When we want to work with entities inside
the interface, we move from the interface-without-specific to the
interface-with-self specific by adding a Self to the specific. This is
done independently of any particular entity inside the Interface, as
those entities are now all members of the interface-with-self generic.

Associated constants no longer need a generic of their own, as they do
not have separate generic bindings. Functions retain a generic, but if
the function has no generic arguments, it will have no bindings of its
own now.

Require decls retain a generic so that their specific can be
instantiated separately from the interface. Requiring the interface to
be complete does not require the types in a require decl to be complete
unless it is modified by `extend`. So we allow them to be completed
later by keeping them in a separate generic.

Named constraints look like interfaces and gain the additional inner
generic-with-self, with the same relationship to require decls.

This removes the need for name lookup to perform Substitution of a Self
facet into the extended scope instruction. Instead, the
`SpecificConstant` instruction inserted by a `require` decl is part of
the interface-with-self generic. When looking through a FacetType for
extended scopes, for each interface, we push the scope with the specific
for the interface-with-self. Then the constant value of the
`SpecificConstant` is correctly modified by the provided self
automatically through applying that specific.
This commit is contained in:
Dana Jansens
2026-02-19 16:24:07 +00:00
committed by GitHub
parent e5b094fdad
commit 917a6ea971
419 changed files with 18175 additions and 11940 deletions
+82 -70
View File
@@ -77,16 +77,16 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic]
// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic]
// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic]
// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic]
// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic]
// CHECK:STDOUT: %Function.type: type = fn_type @Function [concrete]
// CHECK:STDOUT: %Function: %Function.type = struct_value () [concrete]
// CHECK:STDOUT: %require_complete.67c: <witness> = require_complete_type %T.binding.as_type [symbolic]
// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
// CHECK:STDOUT: %Copy.lookup_impl_witness.58d: <witness> = lookup_impl_witness %T.035, @Copy [symbolic]
// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic]
// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.2c9: <specific function> = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic]
// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic]
// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.bdc: <specific function> = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic]
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic]
// CHECK:STDOUT: %require_complete.ef1: <witness> = require_complete_type %ptr.e8f [symbolic]
@@ -109,10 +109,12 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %complete_type.17a: <witness> = complete_type_witness %ptr.31e [concrete]
// CHECK:STDOUT: %Copy.facet.a7f: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete]
// CHECK:STDOUT: %Function.specific_fn.9da: <specific function> = specific_function %Function, @Function(%Copy.facet.a7f) [concrete]
// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic]
// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.b84: <specific function> = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic]
// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7f [concrete]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c25) [symbolic]
// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic]
// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.366: <specific function> = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7f) [concrete]
// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet.a7f [concrete]
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -130,15 +132,15 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: file {
// CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [concrete = constants.%Function] {
// CHECK:STDOUT: %T.patt: %pattern_type.ce2 = symbolic_binding_pattern T, 0 [concrete]
// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete]
// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc5_37: %Copy.type = name_ref T, %T.loc5_13.2 [symbolic = %T.loc5_13.1 (constants.%T.035)]
// CHECK:STDOUT: %T.as_type.loc5_37: type = facet_access_type %T.ref.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %.loc5_37.3: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.1)]
// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.2)]
// CHECK:STDOUT: %.loc5_21: type = splice_block %Copy.ref [concrete = constants.%Copy.type] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
@@ -160,26 +162,27 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: generic fn @Function(%T.loc5_13.2: %Copy.type) {
// CHECK:STDOUT: %T.loc5_13.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.035)]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc5_13.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)]
// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.1)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)]
// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.67c)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc5_13.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)]
// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.72e)]
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)]
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc5_13.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)]
// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.023)]
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.594)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.bdc)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Function.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: @Function.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)]
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.594)]
// CHECK:STDOUT: %bound_method.loc6_10.1: <bound method> = bound_method %x.ref, %impl.elem0.loc6_10.1
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.bdc)]
// CHECK:STDOUT: %bound_method.loc6_10.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc6_10.1
// CHECK:STDOUT: %.loc5_37.1: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {}
// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref)
// CHECK:STDOUT: return %Copy.Op.call to %return.param
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref)
// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -252,22 +255,23 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: specific @Function(constants.%T.035) {
// CHECK:STDOUT: %T.loc5_13.1 => constants.%T.035
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1
// CHECK:STDOUT: %.loc5_37.2 => constants.%.6c815b.1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2
// CHECK:STDOUT: %.loc5_37.2 => constants.%.6c815b.2
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete.67c
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.58d
// CHECK:STDOUT: %.loc6 => constants.%.72e
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.07b
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.2c9
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.735e75.2
// CHECK:STDOUT: %.loc6 => constants.%.023
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.594
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.bdc
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGeneric(constants.%T.035) {
// CHECK:STDOUT: %T.loc10_16.1 => constants.%T.035
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1
// CHECK:STDOUT: %.loc10_40.2 => constants.%.6c815b.1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2
// CHECK:STDOUT: %.loc10_40.2 => constants.%.6c815b.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGenericPtr(constants.%T.67d) {
@@ -286,9 +290,10 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete.ef1
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6
// CHECK:STDOUT: %.loc6 => constants.%.b46
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.201
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.b84
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.d82
// CHECK:STDOUT: %.loc6 => constants.%.299
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.1c7
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.366
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Function(constants.%Copy.facet.a7f) {
@@ -300,7 +305,8 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.17a
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.2c7
// CHECK:STDOUT: %.loc6 => constants.%.cda
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.259
// CHECK:STDOUT: %.loc6 => constants.%.64b
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.ed9
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
// CHECK:STDOUT: }
@@ -312,16 +318,16 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic]
// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic]
// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic]
// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic]
// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic]
// CHECK:STDOUT: %Function.type: type = fn_type @Function [concrete]
// CHECK:STDOUT: %Function: %Function.type = struct_value () [concrete]
// CHECK:STDOUT: %require_complete.67c: <witness> = require_complete_type %T.binding.as_type [symbolic]
// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
// CHECK:STDOUT: %Copy.lookup_impl_witness.58d: <witness> = lookup_impl_witness %T.035, @Copy [symbolic]
// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic]
// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.2c9: <specific function> = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic]
// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic]
// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.bdc: <specific function> = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic]
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic]
// CHECK:STDOUT: %require_complete.ef1: <witness> = require_complete_type %ptr.e8f [symbolic]
@@ -344,10 +350,12 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %complete_type.17a: <witness> = complete_type_witness %ptr.31e [concrete]
// CHECK:STDOUT: %Copy.facet.a7f: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete]
// CHECK:STDOUT: %Function.specific_fn.9da: <specific function> = specific_function %Function, @Function(%Copy.facet.a7f) [concrete]
// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic]
// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.b84: <specific function> = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic]
// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7f [concrete]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c25) [symbolic]
// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic]
// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.366: <specific function> = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7f) [concrete]
// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet.a7f [concrete]
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -365,15 +373,15 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: file {
// CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [concrete = constants.%Function] {
// CHECK:STDOUT: %T.patt: %pattern_type.ce2 = symbolic_binding_pattern T, 0 [concrete]
// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete]
// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc5_37: %Copy.type = name_ref T, %T.loc5_13.2 [symbolic = %T.loc5_13.1 (constants.%T.035)]
// CHECK:STDOUT: %T.as_type.loc5_37: type = facet_access_type %T.ref.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %.loc5_37.3: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.1)]
// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.2)]
// CHECK:STDOUT: %.loc5_21: type = splice_block %Copy.ref [concrete = constants.%Copy.type] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
@@ -395,26 +403,27 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: generic fn @Function(%T.loc5_13.2: %Copy.type) {
// CHECK:STDOUT: %T.loc5_13.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.035)]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc5_13.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)]
// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.1)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)]
// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.67c)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc5_13.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)]
// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.72e)]
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)]
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc5_13.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)]
// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.023)]
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.594)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.bdc)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Function.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: @Function.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)]
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.594)]
// CHECK:STDOUT: %bound_method.loc6_10.1: <bound method> = bound_method %x.ref, %impl.elem0.loc6_10.1
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.bdc)]
// CHECK:STDOUT: %bound_method.loc6_10.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc6_10.1
// CHECK:STDOUT: %.loc5_37.1: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {}
// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref)
// CHECK:STDOUT: return %Copy.Op.call to %return.param
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref)
// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -478,22 +487,23 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: specific @Function(constants.%T.035) {
// CHECK:STDOUT: %T.loc5_13.1 => constants.%T.035
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1
// CHECK:STDOUT: %.loc5_37.2 => constants.%.6c815b.1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2
// CHECK:STDOUT: %.loc5_37.2 => constants.%.6c815b.2
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete.67c
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.58d
// CHECK:STDOUT: %.loc6 => constants.%.72e
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.07b
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.2c9
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.735e75.2
// CHECK:STDOUT: %.loc6 => constants.%.023
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.594
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.bdc
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGeneric(constants.%T.035) {
// CHECK:STDOUT: %T.loc10_16.1 => constants.%T.035
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1
// CHECK:STDOUT: %.loc10_40.2 => constants.%.6c815b.1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2
// CHECK:STDOUT: %.loc10_40.2 => constants.%.6c815b.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGenericPtr(constants.%T.67d) {
@@ -512,9 +522,10 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete.ef1
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6
// CHECK:STDOUT: %.loc6 => constants.%.b46
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.201
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.b84
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.d82
// CHECK:STDOUT: %.loc6 => constants.%.299
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.1c7
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.366
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Function(constants.%Copy.facet.a7f) {
@@ -526,7 +537,8 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.17a
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.2c7
// CHECK:STDOUT: %.loc6 => constants.%.cda
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.259
// CHECK:STDOUT: %.loc6 => constants.%.64b
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.ed9
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
// CHECK:STDOUT: }
@@ -50,10 +50,10 @@ fn G() {
// CHECK:STDOUT: %Generic.generic: %Generic.type.835 = struct_value () [concrete]
// CHECK:STDOUT: %Generic.type.03dff7.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic]
// CHECK:STDOUT: %Self.15d2d5.1: %Generic.type.03dff7.1 = symbolic_binding Self, 1 [symbolic]
// CHECK:STDOUT: %Generic.F.type.8aacdf.1: type = fn_type @Generic.F, @Generic(%Scalar) [symbolic]
// CHECK:STDOUT: %Generic.F.673760.1: %Generic.F.type.8aacdf.1 = struct_value () [symbolic]
// CHECK:STDOUT: %Generic.WithSelf.F.type.74390a.1: type = fn_type @Generic.WithSelf.F, @Generic(%Scalar, %Self.15d2d5.1) [symbolic]
// CHECK:STDOUT: %Generic.WithSelf.F.baf95a.1: %Generic.WithSelf.F.type.74390a.1 = struct_value () [symbolic]
// CHECK:STDOUT: %Generic.assoc_type.22afda.1: type = assoc_entity_type @Generic, @Generic(%Scalar) [symbolic]
// CHECK:STDOUT: %assoc0.6ba576.1: %Generic.assoc_type.22afda.1 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic]
// CHECK:STDOUT: %assoc0.e0dc00.1: %Generic.assoc_type.22afda.1 = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic]
// CHECK:STDOUT: %GenericParam: type = class_type @GenericParam [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
@@ -61,23 +61,27 @@ fn G() {
// CHECK:STDOUT: %Generic.type.498: type = facet_type <@Generic, @Generic(%GenericParam)> [concrete]
// CHECK:STDOUT: %Generic.impl_witness: <witness> = impl_witness @ImplsGeneric.as.Generic.impl.%Generic.impl_witness_table [concrete]
// CHECK:STDOUT: %Self.1f5: %Generic.type.498 = symbolic_binding Self, 1 [symbolic]
// CHECK:STDOUT: %Generic.F.type.0a1: type = fn_type @Generic.F, @Generic(%GenericParam) [concrete]
// CHECK:STDOUT: %Generic.F.edf: %Generic.F.type.0a1 = struct_value () [concrete]
// CHECK:STDOUT: %Generic.WithSelf.F.type.a23: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Self.15d2d5.1) [symbolic]
// CHECK:STDOUT: %Generic.WithSelf.F.fe0: %Generic.WithSelf.F.type.a23 = struct_value () [symbolic]
// CHECK:STDOUT: %Generic.assoc_type.6dc: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete]
// CHECK:STDOUT: %assoc0.d01: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.F.decl [concrete]
// CHECK:STDOUT: %assoc0.717: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [concrete]
// CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F.type: type = fn_type @ImplsGeneric.as.Generic.impl.F [concrete]
// CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F: %ImplsGeneric.as.Generic.impl.F.type = struct_value () [concrete]
// CHECK:STDOUT: %Generic.facet: %Generic.type.498 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete]
// CHECK:STDOUT: %Generic.WithSelf.F.type.c86: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Generic.facet) [concrete]
// CHECK:STDOUT: %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete]
// CHECK:STDOUT: %Other.type: type = facet_type <@Other> [concrete]
// CHECK:STDOUT: %Self.8c4: %Other.type = symbolic_binding Self, 0 [symbolic]
// CHECK:STDOUT: %Other.G.type: type = fn_type @Other.G [concrete]
// CHECK:STDOUT: %Other.G: %Other.G.type = struct_value () [concrete]
// CHECK:STDOUT: %Other.WithSelf.G.type.acd: type = fn_type @Other.WithSelf.G, @Other(%Self.8c4) [symbolic]
// CHECK:STDOUT: %Other.WithSelf.G.63d: %Other.WithSelf.G.type.acd = struct_value () [symbolic]
// CHECK:STDOUT: %Other.assoc_type: type = assoc_entity_type @Other [concrete]
// CHECK:STDOUT: %assoc0.96c: %Other.assoc_type = assoc_entity element0, @Other.%Other.G.decl [concrete]
// CHECK:STDOUT: %assoc0.205: %Other.assoc_type = assoc_entity element0, @Other.%Other.WithSelf.G.decl [concrete]
// CHECK:STDOUT: %Other.impl_witness: <witness> = impl_witness @ImplsGeneric.as.Other.impl.%Other.impl_witness_table [concrete]
// CHECK:STDOUT: %ImplsGeneric.as.Other.impl.G.type: type = fn_type @ImplsGeneric.as.Other.impl.G [concrete]
// CHECK:STDOUT: %ImplsGeneric.as.Other.impl.G: %ImplsGeneric.as.Other.impl.G.type = struct_value () [concrete]
// CHECK:STDOUT: %Other.facet: %Other.type = facet_value %ImplsGeneric, (%Other.impl_witness) [concrete]
// CHECK:STDOUT: %Other.WithSelf.G.type.1df: type = fn_type @Other.WithSelf.G, @Other(%Other.facet) [concrete]
// CHECK:STDOUT: %Other.WithSelf.G.13d: %Other.WithSelf.G.type.1df = struct_value () [concrete]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic]
// CHECK:STDOUT: %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
@@ -85,22 +89,24 @@ fn G() {
// CHECK:STDOUT: %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete]
// CHECK:STDOUT: %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete]
// CHECK:STDOUT: %Self.15d2d5.2: %Generic.type.03dff7.2 = symbolic_binding Self, 1 [symbolic]
// CHECK:STDOUT: %Generic.F.type.8aacdf.2: type = fn_type @Generic.F, @Generic(%T) [symbolic]
// CHECK:STDOUT: %Generic.F.673760.2: %Generic.F.type.8aacdf.2 = struct_value () [symbolic]
// CHECK:STDOUT: %Generic.WithSelf.F.type.74390a.2: type = fn_type @Generic.WithSelf.F, @Generic(%T, %Self.15d2d5.1) [symbolic]
// CHECK:STDOUT: %Generic.WithSelf.F.baf95a.2: %Generic.WithSelf.F.type.74390a.2 = struct_value () [symbolic]
// CHECK:STDOUT: %Generic.assoc_type.22afda.2: type = assoc_entity_type @Generic, @Generic(%T) [symbolic]
// CHECK:STDOUT: %assoc0.6ba576.2: %Generic.assoc_type.22afda.2 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic]
// CHECK:STDOUT: %assoc0.e0dc00.2: %Generic.assoc_type.22afda.2 = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Generic.type.03dff7.2 [symbolic]
// CHECK:STDOUT: %Generic.WithSelf.F.type.56e: type = fn_type @Generic.WithSelf.F, @Generic(%T, %U) [symbolic]
// CHECK:STDOUT: %Generic.WithSelf.F.a99: %Generic.WithSelf.F.type.56e = struct_value () [symbolic]
// CHECK:STDOUT: %U.binding.as_type: type = symbolic_binding_type U, 1, %U [symbolic]
// CHECK:STDOUT: %Generic.lookup_impl_witness: <witness> = lookup_impl_witness %U, @Generic, @Generic(%T) [symbolic]
// CHECK:STDOUT: %.c48: type = fn_type_with_self_type %Generic.F.type.8aacdf.2, %U [symbolic]
// CHECK:STDOUT: %impl.elem0: %.c48 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Generic.F(%T, %U) [symbolic]
// CHECK:STDOUT: %.ab3: type = fn_type_with_self_type %Generic.WithSelf.F.type.56e, %U [symbolic]
// CHECK:STDOUT: %impl.elem0: %.ab3 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Generic.WithSelf.F(%T, %U) [symbolic]
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
// CHECK:STDOUT: %pattern_type.cba: type = pattern_type %Generic.type.498 [concrete]
// CHECK:STDOUT: %CallGenericMethod.specific_fn: <specific function> = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet) [concrete]
// CHECK:STDOUT: %complete_type.57a: <witness> = complete_type_witness %Generic.type.498 [concrete]
// CHECK:STDOUT: %.b07: type = fn_type_with_self_type %Generic.F.type.0a1, %Generic.facet [concrete]
// CHECK:STDOUT: %.fcf: type = fn_type_with_self_type %Generic.WithSelf.F.type.c86, %Generic.facet [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -161,36 +167,38 @@ fn G() {
// CHECK:STDOUT: %Scalar.loc15_19.1: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc15_19.1 (constants.%Scalar)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc15_19.1)> [symbolic = %Generic.type (constants.%Generic.type.03dff7.1)]
// CHECK:STDOUT: %Self.loc15_34.2: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d2d5.1)]
// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%Scalar.loc15_19.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aacdf.1)]
// CHECK:STDOUT: %Generic.F: @Generic.%Generic.F.type (%Generic.F.type.8aacdf.1) = struct_value () [symbolic = %Generic.F (constants.%Generic.F.673760.1)]
// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%Scalar.loc15_19.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22afda.1)]
// CHECK:STDOUT: %assoc0.loc16_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.6ba576.1)]
// CHECK:STDOUT: %Generic.type.loc15: type = facet_type <@Generic, @Generic(%Scalar.loc15_19.1)> [symbolic = %Generic.type.loc15 (constants.%Generic.type.03dff7.1)]
// CHECK:STDOUT: %Self.loc15_34.2: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d2d5.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d2d5.1)]
// CHECK:STDOUT: %Generic.F.decl: @Generic.%Generic.F.type (%Generic.F.type.8aacdf.1) = fn_decl @Generic.F [symbolic = @Generic.%Generic.F (constants.%Generic.F.673760.1)] {} {}
// CHECK:STDOUT: %assoc0.loc16_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.6ba576.1)]
// CHECK:STDOUT: %Self.loc15_34.1: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d2d5.1)]
// CHECK:STDOUT: interface_with_self_decl @Generic [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
// CHECK:STDOUT: %Generic.WithSelf.F.decl: @Generic.%Generic.WithSelf.F.type (%Generic.WithSelf.F.type.74390a.1) = fn_decl @Generic.WithSelf.F [symbolic = @Generic.%Generic.WithSelf.F (constants.%Generic.WithSelf.F.baf95a.1)] {} {}
// CHECK:STDOUT: %assoc0.loc16_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.e0dc00.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc15_34.1
// CHECK:STDOUT: .F = %assoc0.loc16_9.1
// CHECK:STDOUT: witness = (%Generic.F.decl)
// CHECK:STDOUT: witness = (%Generic.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @Other {
// CHECK:STDOUT: %Self: %Other.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8c4]
// CHECK:STDOUT: %Other.G.decl: %Other.G.type = fn_decl @Other.G [concrete = constants.%Other.G] {} {}
// CHECK:STDOUT: %assoc0: %Other.assoc_type = assoc_entity element0, %Other.G.decl [concrete = constants.%assoc0.96c]
// CHECK:STDOUT: %Self.loc26: %Other.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8c4]
// CHECK:STDOUT: interface_with_self_decl @Other [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
// CHECK:STDOUT: %Other.WithSelf.G.decl: @Other.%Other.WithSelf.G.type (%Other.WithSelf.G.type.acd) = fn_decl @Other.WithSelf.G [symbolic = @Other.%Other.WithSelf.G (constants.%Other.WithSelf.G.63d)] {} {}
// CHECK:STDOUT: %assoc0: %Other.assoc_type = assoc_entity element0, %Other.WithSelf.G.decl [concrete = constants.%assoc0.205]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .Self = %Self.loc26
// CHECK:STDOUT: .G = %assoc0
// CHECK:STDOUT: witness = (%Other.G.decl)
// CHECK:STDOUT: witness = (%Other.WithSelf.G.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
// CHECK:STDOUT: }
@@ -231,7 +239,7 @@ fn G() {
// CHECK:STDOUT: .Self = constants.%ImplsGeneric
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Generic.F(@Generic.%Scalar.loc15_19.2: type, @Generic.%Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1)) {
// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc15_19.2: type, @Generic.%Self.loc15_34.1: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1)) {
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -240,7 +248,7 @@ fn G() {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Other.G(@Other.%Self: %Other.type) {
// CHECK:STDOUT: generic fn @Other.WithSelf.G(@Other.%Self.loc26: %Other.type) {
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -256,23 +264,23 @@ fn G() {
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Generic.type.loc33_45.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT: %U.binding.as_type: type = symbolic_binding_type U, 1, %U.loc33_32.1 [symbolic = %U.binding.as_type (constants.%U.binding.as_type)]
// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc33_22.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22afda.2)]
// CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = assoc_entity element0, @Generic.%Generic.F.decl [symbolic = %assoc0 (constants.%assoc0.6ba576.2)]
// CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)]
// CHECK:STDOUT: %Generic.lookup_impl_witness: <witness> = lookup_impl_witness %U.loc33_32.1, @Generic, @Generic(%T.loc33_22.1) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)]
// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%T.loc33_22.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aacdf.2)]
// CHECK:STDOUT: %.loc34_4.3: type = fn_type_with_self_type %Generic.F.type, %U.loc33_32.1 [symbolic = %.loc34_4.3 (constants.%.c48)]
// CHECK:STDOUT: %impl.elem0.loc34_4.2: @CallGenericMethod.%.loc34_4.3 (%.c48) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: <specific function> = specific_impl_function %impl.elem0.loc34_4.2, @Generic.F(%T.loc33_22.1, %U.loc33_32.1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %Generic.WithSelf.F.type: type = fn_type @Generic.WithSelf.F, @Generic(%T.loc33_22.1, %U.loc33_32.1) [symbolic = %Generic.WithSelf.F.type (constants.%Generic.WithSelf.F.type.56e)]
// CHECK:STDOUT: %.loc34_4.3: type = fn_type_with_self_type %Generic.WithSelf.F.type, %U.loc33_32.1 [symbolic = %.loc34_4.3 (constants.%.ab3)]
// CHECK:STDOUT: %impl.elem0.loc34_4.2: @CallGenericMethod.%.loc34_4.3 (%.ab3) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: <specific function> = specific_impl_function %impl.elem0.loc34_4.2, @Generic.WithSelf.F(%T.loc33_22.1, %U.loc33_32.1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %U.ref: @CallGenericMethod.%Generic.type.loc33_45.1 (%Generic.type.03dff7.2) = name_ref U, %U.loc33_32.2 [symbolic = %U.loc33_32.1 (constants.%U)]
// CHECK:STDOUT: %U.as_type: type = facet_access_type %U.ref [symbolic = %U.binding.as_type (constants.%U.binding.as_type)]
// CHECK:STDOUT: %.loc34_4.1: type = converted %U.ref, %U.as_type [symbolic = %U.binding.as_type (constants.%U.binding.as_type)]
// CHECK:STDOUT: %.loc34_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = specific_constant @Generic.%assoc0.loc16_9.1, @Generic(constants.%T) [symbolic = %assoc0 (constants.%assoc0.6ba576.2)]
// CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = name_ref F, %.loc34_4.2 [symbolic = %assoc0 (constants.%assoc0.6ba576.2)]
// CHECK:STDOUT: %impl.elem0.loc34_4.1: @CallGenericMethod.%.loc34_4.3 (%.c48) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: <specific function> = specific_impl_function %impl.elem0.loc34_4.1, @Generic.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %Generic.F.call: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1()
// CHECK:STDOUT: %.loc34_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = specific_constant @Generic.%assoc0.loc16_9.1, @Generic(constants.%T, constants.%U) [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)]
// CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = name_ref F, %.loc34_4.2 [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)]
// CHECK:STDOUT: %impl.elem0.loc34_4.1: @CallGenericMethod.%.loc34_4.3 (%.ab3) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: <specific function> = specific_impl_function %impl.elem0.loc34_4.1, @Generic.WithSelf.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %Generic.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1()
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -293,36 +301,66 @@ fn G() {
// CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%Scalar
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic.F(constants.%Scalar, constants.%Self.15d2d5.1) {}
// CHECK:STDOUT: specific @Generic(constants.%Scalar, constants.%Self.15d2d5.1) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%Scalar, constants.%Self.15d2d5.1) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic(constants.%GenericParam) {
// CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%GenericParam
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Generic.type => constants.%Generic.type.498
// CHECK:STDOUT: %Generic.type.loc15 => constants.%Generic.type.498
// CHECK:STDOUT: %Self.loc15_34.2 => constants.%Self.1f5
// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1
// CHECK:STDOUT: %Generic.F => constants.%Generic.F.edf
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc
// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.d01
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic.F(constants.%GenericParam, constants.%Generic.facet) {}
// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Self.15d2d5.1) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Scalar.loc16 => constants.%GenericParam
// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.498
// CHECK:STDOUT: %Self.loc16 => constants.%Self.15d2d5.1
// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.a23
// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.fe0
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc
// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.717
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Other.G(constants.%Self.8c4) {}
// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Generic.facet) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Scalar.loc16 => constants.%GenericParam
// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.498
// CHECK:STDOUT: %Self.loc16 => constants.%Generic.facet
// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86
// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.1fd
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc
// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.717
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Other.G(constants.%Other.facet) {}
// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%GenericParam, constants.%Generic.facet) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Other(constants.%Self.8c4) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Self.loc27 => constants.%Self.8c4
// CHECK:STDOUT: %Other.WithSelf.G.type => constants.%Other.WithSelf.G.type.acd
// CHECK:STDOUT: %Other.WithSelf.G => constants.%Other.WithSelf.G.63d
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Other.WithSelf.G(constants.%Self.8c4) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Other(constants.%Other.facet) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Self.loc27 => constants.%Other.facet
// CHECK:STDOUT: %Other.WithSelf.G.type => constants.%Other.WithSelf.G.type.1df
// CHECK:STDOUT: %Other.WithSelf.G => constants.%Other.WithSelf.G.13d
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Other.WithSelf.G(constants.%Other.facet) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic(constants.%T) {
// CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%T
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Generic.type => constants.%Generic.type.03dff7.2
// CHECK:STDOUT: %Generic.type.loc15 => constants.%Generic.type.03dff7.2
// CHECK:STDOUT: %Self.loc15_34.2 => constants.%Self.15d2d5.2
// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.8aacdf.2
// CHECK:STDOUT: %Generic.F => constants.%Generic.F.673760.2
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2
// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.6ba576.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) {
@@ -332,7 +370,29 @@ fn G() {
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c49
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic.F(constants.%T, constants.%U) {}
// CHECK:STDOUT: specific @Generic(constants.%T, constants.%Self.15d2d5.1) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Scalar.loc16 => constants.%T
// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.03dff7.2
// CHECK:STDOUT: %Self.loc16 => constants.%Self.15d2d5.1
// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.74390a.2
// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.baf95a.2
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2
// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.e0dc00.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic(constants.%T, constants.%U) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Scalar.loc16 => constants.%T
// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.03dff7.2
// CHECK:STDOUT: %Self.loc16 => constants.%U
// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.56e
// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.a99
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2
// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.e0dc00.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%T, constants.%U) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) {
// CHECK:STDOUT: %T.loc33_22.1 => constants.%GenericParam
@@ -344,10 +404,10 @@ fn G() {
// CHECK:STDOUT: %require_complete => constants.%complete_type.57a
// CHECK:STDOUT: %U.binding.as_type => constants.%ImplsGeneric
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc
// CHECK:STDOUT: %assoc0 => constants.%assoc0.d01
// CHECK:STDOUT: %assoc0 => constants.%assoc0.717
// CHECK:STDOUT: %Generic.lookup_impl_witness => constants.%Generic.impl_witness
// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1
// CHECK:STDOUT: %.loc34_4.3 => constants.%.b07
// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86
// CHECK:STDOUT: %.loc34_4.3 => constants.%.fcf
// CHECK:STDOUT: %impl.elem0.loc34_4.2 => constants.%ImplsGeneric.as.Generic.impl.F
// CHECK:STDOUT: %specific_impl_fn.loc34_4.2 => constants.%ImplsGeneric.as.Generic.impl.F
// CHECK:STDOUT: }
+26 -6
View File
@@ -857,7 +857,6 @@ fn F() {
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
@@ -865,7 +864,8 @@ fn F() {
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete]
// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete]
// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
@@ -936,7 +936,7 @@ fn F() {
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
// CHECK:STDOUT: %.loc7_19.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) [concrete = constants.%tuple.ad8]
// CHECK:STDOUT: %TupleParam.specific_fn: <specific function> = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [concrete = constants.%TupleParam.specific_fn]
// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc7_19.1: <bound method> = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_19.2: <bound method> = bound_method %int_2, %specific_fn [concrete = constants.%bound_method]
@@ -995,7 +995,6 @@ fn F() {
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
@@ -1003,7 +1002,8 @@ fn F() {
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete]
// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete]
// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
@@ -1072,7 +1072,7 @@ fn F() {
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
// CHECK:STDOUT: %.loc7_30.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct.4aa]
// CHECK:STDOUT: %StructParam.specific_fn: <specific function> = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [concrete = constants.%StructParam.specific_fn]
// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc7_30.1: <bound method> = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_30.2: <bound method> = bound_method %int_2, %specific_fn [concrete = constants.%bound_method]
@@ -1626,6 +1626,7 @@ fn F() {
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %Z.impl_witness.c05: <witness> = impl_witness @EE.as.Z.impl.%Z.impl_witness_table [concrete]
// CHECK:STDOUT: %Z.facet.5dc: %Z.type = facet_value %EE, (%Z.impl_witness.c05) [concrete]
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %E: type = symbolic_binding E, 0 [symbolic]
@@ -1634,6 +1635,7 @@ fn F() {
// CHECK:STDOUT: %DD.generic: %DD.type = struct_value () [concrete]
// CHECK:STDOUT: %DD.a29: type = class_type @DD, @DD(%E) [symbolic]
// CHECK:STDOUT: %Z.impl_witness.437: <witness> = impl_witness @DD.as.Z.impl.%Z.impl_witness_table, @DD.as.Z.impl(%E) [symbolic]
// CHECK:STDOUT: %Z.facet.dc0: %Z.type = facet_value %DD.a29, (%Z.impl_witness.437) [symbolic]
// CHECK:STDOUT: %D: %Z.type = symbolic_binding D, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.22b: type = pattern_type %Z.type [concrete]
// CHECK:STDOUT: %CC.type: type = generic_class_type @CC [concrete]
@@ -1644,6 +1646,7 @@ fn F() {
// CHECK:STDOUT: %Z.facet.892: %Z.type = facet_value %DD.a29, (%Z.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %CC.4e1: type = class_type @CC, @CC(%Z.facet.892) [symbolic]
// CHECK:STDOUT: %Z.impl_witness.40e: <witness> = impl_witness @CC.as.Z.impl.%Z.impl_witness_table, @CC.as.Z.impl(%E) [symbolic]
// CHECK:STDOUT: %Z.facet.b7b: %Z.type = facet_value %CC.4e1, (%Z.impl_witness.40e) [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %DD.2e1: type = class_type @DD, @DD(%EE) [concrete]
@@ -1722,6 +1725,7 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: interface @Z {
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: interface_with_self_decl @Z [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -1825,6 +1829,14 @@ fn F() {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Self) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Z.facet.5dc) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @DD(constants.%E) {
// CHECK:STDOUT: %E.loc8_10.1 => constants.%E
// CHECK:STDOUT: }
@@ -1837,6 +1849,10 @@ fn F() {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Z.facet.dc0) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CC(constants.%D) {
// CHECK:STDOUT: %D.loc11_10.1 => constants.%D
// CHECK:STDOUT: }
@@ -1855,6 +1871,10 @@ fn F() {
// CHECK:STDOUT: %Z.impl_witness.loc12_39.2 => constants.%Z.impl_witness.40e
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Z.facet.b7b) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @DD(constants.%EE) {
// CHECK:STDOUT: %E.loc8_10.1 => constants.%EE
// CHECK:STDOUT: }
@@ -48,7 +48,9 @@ fn F() {
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness @DD.as.Y.impl.%Y.impl_witness_table [concrete]
// CHECK:STDOUT: %Y.facet.215: %Y.type = facet_value %DD, (%Y.impl_witness) [concrete]
// CHECK:STDOUT: %W.impl_witness: <witness> = impl_witness @DD.as.W.impl.%W.impl_witness_table [concrete]
// CHECK:STDOUT: %W.facet: %W.type = facet_value %DD, (%W.impl_witness) [concrete]
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %D: %Y.type = symbolic_binding D, 0 [symbolic]
@@ -61,10 +63,10 @@ fn F() {
// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
// CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete]
// CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete]
// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete]
// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete]
// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %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: <bound method> = bound_method %Y.type, %type.as.BitAndWith.impl.Op [concrete]
@@ -76,13 +78,13 @@ fn F() {
// CHECK:STDOUT: %Y.facet.9df: %Y.type = facet_value %E.binding.as_type, (%Y.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %CC.dc2: type = class_type @CC, @CC(%Y.facet.9df) [symbolic]
// CHECK:STDOUT: %Z.impl_witness.506: <witness> = impl_witness @CC.as.Z.impl.%Z.impl_witness_table, @CC.as.Z.impl(%E) [symbolic]
// CHECK:STDOUT: %Z.facet.8c4: %Z.type = facet_value %CC.dc2, (%Z.impl_witness.506) [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %Y.facet.215: %Y.type = facet_value %DD, (%Y.impl_witness) [concrete]
// CHECK:STDOUT: %CC.062: type = class_type @CC, @CC(%Y.facet.215) [concrete]
// CHECK:STDOUT: %facet_value: %facet_type = facet_value %DD, (%Y.impl_witness, %W.impl_witness) [concrete]
// CHECK:STDOUT: %Z.impl_witness.c39: <witness> = impl_witness @CC.as.Z.impl.%Z.impl_witness_table, @CC.as.Z.impl(%facet_value) [concrete]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC.062, (%Z.impl_witness.c39) [concrete]
// CHECK:STDOUT: %Z.facet.d22: %Z.type = facet_value %CC.062, (%Z.impl_witness.c39) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -142,7 +144,7 @@ fn F() {
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
// CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type]
// CHECK:STDOUT: %impl.elem0: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
// CHECK:STDOUT: %impl.elem0: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %Y.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Y.ref, %W.ref) [concrete = constants.%facet_type]
// CHECK:STDOUT: %.loc19_20.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type]
@@ -155,6 +157,7 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: interface @Y {
// CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self.162]
// CHECK:STDOUT: interface_with_self_decl @Y [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -165,6 +168,7 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: interface @W {
// CHECK:STDOUT: %Self: %W.type = symbolic_binding Self, 0 [symbolic = constants.%Self.62a]
// CHECK:STDOUT: interface_with_self_decl @W [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -175,6 +179,7 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: interface @Z {
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59]
// CHECK:STDOUT: interface_with_self_decl @Z [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -248,15 +253,35 @@ fn F() {
// CHECK:STDOUT: %.loc22_9: %Y.type = converted %DD.ref, %Y.facet [concrete = constants.%Y.facet.215]
// CHECK:STDOUT: %CC: type = class_type @CC, @CC(constants.%Y.facet.215) [concrete = constants.%CC.062]
// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC, (constants.%Z.impl_witness.c39) [concrete = constants.%Z.facet]
// CHECK:STDOUT: %.loc22_12: %Z.type = converted %CC, %Z.facet [concrete = constants.%Z.facet]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC, (constants.%Z.impl_witness.c39) [concrete = constants.%Z.facet.d22]
// CHECK:STDOUT: %.loc22_12: %Z.type = converted %CC, %Z.facet [concrete = constants.%Z.facet.d22]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Y(constants.%Self.162) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @W(constants.%Self.62a) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Y(constants.%Y.facet.215) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @W(constants.%W.facet) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CC(constants.%D) {
// CHECK:STDOUT: %D.loc12_10.1 => constants.%D
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Self.c59) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CC(constants.%Y.facet.9df) {
// CHECK:STDOUT: %D.loc12_10.1 => constants.%Y.facet.9df
// CHECK:STDOUT: }
@@ -270,6 +295,10 @@ fn F() {
// CHECK:STDOUT: %Z.impl_witness.loc19_36.2 => constants.%Z.impl_witness.506
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Z.facet.8c4) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CC(constants.%Y.facet.215) {
// CHECK:STDOUT: %D.loc12_10.1 => constants.%Y.facet.215
// CHECK:STDOUT: }
@@ -91,6 +91,7 @@ fn B() {
// CHECK:STDOUT:
// CHECK:STDOUT: interface @Z {
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: interface_with_self_decl @Z [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -114,6 +115,10 @@ fn B() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Self) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A(constants.%T) {
// CHECK:STDOUT: %T.loc4_6.1 => constants.%T
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
@@ -127,6 +132,7 @@ fn B() {
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic]
// CHECK:STDOUT: %T: %Z.type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.e5e: type = pattern_type %Z.type [concrete]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
@@ -234,6 +240,10 @@ fn B() {
// CHECK:STDOUT: fn;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Self) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.loc4(constants.%T) {
// CHECK:STDOUT: %T.loc4_6.1 => constants.%T
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
@@ -30,13 +30,13 @@ fn F(T:! type, p: T**) -> T* {
// CHECK:STDOUT: %.4fe: Core.Form = init_form %ptr.e8f, call_param1 [symbolic]
// CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic]
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
// CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic]
// CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: <witness> = lookup_impl_witness %ptr.e8f, @Copy [symbolic]
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.2e6) [symbolic]
// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic]
// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.b84: <specific function> = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet) [symbolic]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic]
// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [symbolic]
// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.366: <specific function> = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -50,21 +50,22 @@ fn F(T:! type, p: T**) -> T* {
// CHECK:STDOUT: %.loc6_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_6.1) [symbolic = %.loc6_10.3 (constants.%.2f2)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc4_20.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)]
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc4_20.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)]
// CHECK:STDOUT: %.loc6_10.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc6_10.4 (constants.%.b46)]
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.201)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b84)]
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)]
// CHECK:STDOUT: %.loc6_10.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc6_10.4 (constants.%.299)]
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.1c7)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.366)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc4_21.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc4_20.1 (%ptr.e8f) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %p.ref: @F.%ptr.loc4_21.1 (%ptr.125) = name_ref p, %p
// CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc4_20.1 (%ptr.e8f) = deref %p.ref
// CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc4_20.1 (%ptr.e8f) = acquire_value %.loc6_10.1
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.4 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.201)]
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.4 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.1c7)]
// CHECK:STDOUT: %bound_method.loc6_10.1: <bound method> = bound_method %.loc6_10.2, %impl.elem0.loc6_10.1
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b84)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.366)]
// CHECK:STDOUT: %bound_method.loc6_10.2: <bound method> = bound_method %.loc6_10.2, %specific_impl_fn.loc6_10.1
// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr.loc4_20.1 (%ptr.e8f) = call %bound_method.loc6_10.2(%.loc6_10.2)
// CHECK:STDOUT: return %Copy.Op.call
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc4_20.1 (%ptr.e8f) = call %bound_method.loc6_10.2(%.loc6_10.2)
// CHECK:STDOUT: return %Copy.WithSelf.Op.call
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -28,7 +28,6 @@ fn F(N:! i32, a: array(i32, N)*);
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
// CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic]
@@ -36,7 +35,8 @@ fn F(N:! i32, a: array(i32, N)*);
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete]
// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet) [concrete]
// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.dd4 [symbolic]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic]
@@ -83,7 +83,7 @@ fn F(N:! i32, a: array(i32, N)*);
// CHECK:STDOUT: %int_32.loc15_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc15_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc15_6.2 [symbolic = %N.loc15_6.1 (constants.%N.5de)]
// CHECK:STDOUT: %impl.elem0: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4]
// CHECK:STDOUT: %impl.elem0: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4]
// CHECK:STDOUT: %bound_method.loc15_29.2: <bound method> = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc15_29.3: <bound method> = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc15_29.1 (constants.%bound_method)]
+15 -12
View File
@@ -56,12 +56,12 @@ fn CallNegative() {
// CHECK:STDOUT: %require_complete.901: <witness> = require_complete_type %Int [symbolic]
// CHECK:STDOUT: %pattern_type.764: type = pattern_type %Int [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Int, @Destroy [symbolic]
// CHECK:STDOUT: %Destroy.facet.1c0: %Destroy.type = facet_value %Int, (%Destroy.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %.3e7: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.1c0 [symbolic]
// CHECK:STDOUT: %impl.elem0: %.3e7 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.1c0) [symbolic]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.297: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.1c0) [symbolic]
// CHECK:STDOUT: %.e63: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.297, %Destroy.facet.1c0 [symbolic]
// CHECK:STDOUT: %impl.elem0: %.e63 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet.1c0) [symbolic]
// CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [concrete]
// CHECK:STDOUT: %CallNegative: %CallNegative.type = struct_value () [concrete]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
@@ -73,7 +73,8 @@ fn CallNegative() {
// CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.809: <witness> = custom_witness (%DestroyOp), @Destroy [concrete]
// CHECK:STDOUT: %Destroy.facet.7e1: %Destroy.type = facet_value %i0, (%custom_witness.809) [concrete]
// CHECK:STDOUT: %.918: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.7e1 [concrete]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.e5a: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.7e1) [concrete]
// CHECK:STDOUT: %.011: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.e5a, %Destroy.facet.7e1 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -121,9 +122,10 @@ fn CallNegative() {
// CHECK:STDOUT: %pattern_type: type = pattern_type %Int.loc15_20.2 [symbolic = %pattern_type (constants.%pattern_type.764)]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc15_20.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Int.loc15_20.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.1c0)]
// CHECK:STDOUT: %.loc15_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc15_3 (constants.%.3e7)]
// CHECK:STDOUT: %impl.elem0.loc15_3.2: @ErrorIfNIsZero.%.loc15_3 (%.3e7) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc15_3.2: <specific function> = specific_impl_function %impl.elem0.loc15_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.297)]
// CHECK:STDOUT: %.loc15_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc15_3 (constants.%.e63)]
// CHECK:STDOUT: %impl.elem0.loc15_3.2: @ErrorIfNIsZero.%.loc15_3 (%.e63) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc15_3.2: <specific function> = specific_impl_function %impl.elem0.loc15_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
@@ -139,11 +141,11 @@ fn CallNegative() {
// CHECK:STDOUT: %Int.loc15_20.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc15_20.2 (constants.%Int)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = ref_binding v, %v.var
// CHECK:STDOUT: %impl.elem0.loc15_3.1: @ErrorIfNIsZero.%.loc15_3 (%.3e7) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %impl.elem0.loc15_3.1: @ErrorIfNIsZero.%.loc15_3 (%.e63) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %bound_method.loc15_3.1: <bound method> = bound_method %v.var, %impl.elem0.loc15_3.1
// CHECK:STDOUT: %specific_impl_fn.loc15_3.1: <specific function> = specific_impl_function %impl.elem0.loc15_3.1, @Destroy.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %specific_impl_fn.loc15_3.1: <specific function> = specific_impl_function %impl.elem0.loc15_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %bound_method.loc15_3.2: <bound method> = bound_method %v.var, %specific_impl_fn.loc15_3.1
// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc15_3.2(%v.var)
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc15_3.2(%v.var)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -172,7 +174,8 @@ fn CallNegative() {
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.47b
// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.809
// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.7e1
// CHECK:STDOUT: %.loc15_3 => constants.%.918
// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.e5a
// CHECK:STDOUT: %.loc15_3 => constants.%.011
// CHECK:STDOUT: %impl.elem0.loc15_3.2 => constants.%DestroyOp
// CHECK:STDOUT: %specific_impl_fn.loc15_3.2 => constants.%DestroyOp
// CHECK:STDOUT: }
+11 -10
View File
@@ -33,12 +33,12 @@ fn F(T:! type) {
// CHECK:STDOUT: %require_complete.944: <witness> = require_complete_type %T [symbolic]
// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr, @Destroy [symbolic]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%Destroy.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %.655: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic]
// CHECK:STDOUT: %impl.elem0: %.655 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.bb2: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic]
// CHECK:STDOUT: %.c3f: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.bb2, %Destroy.facet [symbolic]
// CHECK:STDOUT: %impl.elem0: %.c3f = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -75,9 +75,10 @@ fn F(T:! type) {
// CHECK:STDOUT: %pattern_type.loc17: type = pattern_type %T.loc15_6.1 [symbolic = %pattern_type.loc17 (constants.%pattern_type.51d)]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc16_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc16_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)]
// CHECK:STDOUT: %.loc16_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc16_3 (constants.%.655)]
// CHECK:STDOUT: %impl.elem0.loc16_3.2: @F.%.loc16_3 (%.655) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc16_3.2: <specific function> = specific_impl_function %impl.elem0.loc16_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.bb2)]
// CHECK:STDOUT: %.loc16_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc16_3 (constants.%.c3f)]
// CHECK:STDOUT: %impl.elem0.loc16_3.2: @F.%.loc16_3 (%.c3f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc16_3.2: <specific function> = specific_impl_function %impl.elem0.loc16_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
@@ -100,11 +101,11 @@ fn F(T:! type) {
// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, %T.loc15_6.2 [symbolic = %T.loc15_6.1 (constants.%T)]
// CHECK:STDOUT: %.loc17_14.2: @F.%T.loc15_6.1 (%T) = acquire_value %.loc17_14.1
// CHECK:STDOUT: %n: @F.%T.loc15_6.1 (%T) = value_binding n, %.loc17_14.2
// CHECK:STDOUT: %impl.elem0.loc16_3.1: @F.%.loc16_3 (%.655) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %impl.elem0.loc16_3.1: @F.%.loc16_3 (%.c3f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %bound_method.loc16_3.1: <bound method> = bound_method %p.var, %impl.elem0.loc16_3.1
// CHECK:STDOUT: %specific_impl_fn.loc16_3.1: <specific function> = specific_impl_function %impl.elem0.loc16_3.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %specific_impl_fn.loc16_3.1: <specific function> = specific_impl_function %impl.elem0.loc16_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %bound_method.loc16_3.2: <bound method> = bound_method %p.var, %specific_impl_fn.loc16_3.1
// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc16_3.2(%p.var)
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc16_3.2(%p.var)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -29,13 +29,13 @@ fn F(T:! type, n: T*) -> T* {
// CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr [symbolic]
// CHECK:STDOUT: %.4fe: Core.Form = init_form %ptr, call_param1 [symbolic]
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
// CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic]
// CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: <witness> = lookup_impl_witness %ptr, @Copy [symbolic]
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness.2e6) [symbolic]
// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic]
// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.b84: <specific function> = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet) [symbolic]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic]
// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [symbolic]
// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.366: <specific function> = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -49,9 +49,10 @@ fn F(T:! type, n: T*) -> T* {
// CHECK:STDOUT: %.loc7_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_6.1) [symbolic = %.loc7_10.1 (constants.%.2f2)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc4_20.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)]
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc4_20.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)]
// CHECK:STDOUT: %.loc7_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc7_10.2 (constants.%.b46)]
// CHECK:STDOUT: %impl.elem0.loc7_10.2: @F.%.loc7_10.2 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.201)]
// CHECK:STDOUT: %specific_impl_fn.loc7_10.2: <specific function> = specific_impl_function %impl.elem0.loc7_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.b84)]
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)]
// CHECK:STDOUT: %.loc7_10.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc7_10.2 (constants.%.299)]
// CHECK:STDOUT: %impl.elem0.loc7_10.2: @F.%.loc7_10.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.1c7)]
// CHECK:STDOUT: %specific_impl_fn.loc7_10.2: <specific function> = specific_impl_function %impl.elem0.loc7_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.366)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%n.param: @F.%ptr.loc4_20.1 (%ptr)) -> out %return.param: @F.%ptr.loc4_20.1 (%ptr) {
// CHECK:STDOUT: !entry:
@@ -65,12 +66,12 @@ fn F(T:! type, n: T*) -> T* {
// CHECK:STDOUT: }
// CHECK:STDOUT: %m: @F.%ptr.loc4_20.1 (%ptr) = value_binding m, %n.ref
// CHECK:STDOUT: %m.ref: @F.%ptr.loc4_20.1 (%ptr) = name_ref m, %m
// CHECK:STDOUT: %impl.elem0.loc7_10.1: @F.%.loc7_10.2 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.201)]
// CHECK:STDOUT: %impl.elem0.loc7_10.1: @F.%.loc7_10.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.1c7)]
// CHECK:STDOUT: %bound_method.loc7_10.1: <bound method> = bound_method %m.ref, %impl.elem0.loc7_10.1
// CHECK:STDOUT: %specific_impl_fn.loc7_10.1: <specific function> = specific_impl_function %impl.elem0.loc7_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.b84)]
// CHECK:STDOUT: %specific_impl_fn.loc7_10.1: <specific function> = specific_impl_function %impl.elem0.loc7_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.366)]
// CHECK:STDOUT: %bound_method.loc7_10.2: <bound method> = bound_method %m.ref, %specific_impl_fn.loc7_10.1
// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr.loc4_20.1 (%ptr) = call %bound_method.loc7_10.2(%m.ref)
// CHECK:STDOUT: return %Copy.Op.call
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc4_20.1 (%ptr) = call %bound_method.loc7_10.2(%m.ref)
// CHECK:STDOUT: return %Copy.WithSelf.Op.call
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: