Make FacetAccessType evaluate to SymbolicBindingType for type-of a BindSymbolicName (#6115)

The SymbolicBindingType refers to the type value that will be
substituted in for the BindSymbolicName, but holds onto the EntityNameId
from the BindSymbolicName instead of (or in addition to, for now) the
instruction.

The EntityNameId will be used to look in the ScopeStack to find the
witnesses either from the BindSymbolicName instruction, or other
instructions that specify `impls` constraints against the EntityName.

This will allow us to have the `T` in `I(T)` resolve to a `.Self`
reference in the type so that we get type equality with the binding's
type: `T:! I(.Self)`.
This commit is contained in:
Dana Jansens
2025-10-06 18:56:43 +00:00
committed by GitHub
parent bd4d5805dd
commit fe020ee08b
237 changed files with 7827 additions and 7586 deletions
+70 -70
View File
@@ -76,11 +76,11 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
// CHECK:STDOUT: %T.be8: %Copy.type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.322: type = pattern_type %Copy.type [concrete]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.be8 [symbolic]
// CHECK:STDOUT: %pattern_type.965801.1: type = pattern_type %T.as_type [symbolic]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.be8 [symbolic]
// CHECK:STDOUT: %pattern_type.17e4b7.1: type = pattern_type %T.binding.as_type [symbolic]
// CHECK:STDOUT: %Function.type: type = fn_type @Function [concrete]
// CHECK:STDOUT: %Function: %Function.type = struct_value () [concrete]
// CHECK:STDOUT: %require_complete.07c: <witness> = require_complete_type %T.as_type [symbolic]
// CHECK:STDOUT: %require_complete.1cd: <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.e15: <witness> = lookup_impl_witness %T.be8, @Copy [symbolic]
// CHECK:STDOUT: %.427: type = fn_type_with_self_type %Copy.Op.type, %T.be8 [symbolic]
@@ -126,53 +126,53 @@ 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.322 = symbolic_binding_pattern T, 0 [concrete]
// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.965801.1) = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.965801.1) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.965801.1) = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.965801.1) = out_param_pattern %return.patt, call_param1 [concrete]
// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.17e4b7.1) = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.17e4b7.1) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.17e4b7.1) = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.17e4b7.1) = 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.be8)]
// CHECK:STDOUT: %T.as_type.loc5_37: type = facet_access_type %T.ref.loc5_37 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc5_37: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// 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: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// 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]
// CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc5_13.2: %Copy.type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.be8)]
// CHECK:STDOUT: %x.param: @Function.%T.as_type.loc5_31.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_31.1: type = splice_block %.loc5_31.2 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %x.param: @Function.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_31.1: type = splice_block %.loc5_31.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
// CHECK:STDOUT: %T.ref.loc5_31: %Copy.type = name_ref T, %T.loc5_13.2 [symbolic = %T.loc5_13.1 (constants.%T.be8)]
// CHECK:STDOUT: %T.as_type.loc5_31.2: type = facet_access_type %T.ref.loc5_31 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc5_31.2: type = converted %T.ref.loc5_31, %T.as_type.loc5_31.2 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %T.as_type.loc5_31: type = facet_access_type %T.ref.loc5_31 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %.loc5_31.2: type = converted %T.ref.loc5_31, %T.as_type.loc5_31 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @Function.%T.as_type.loc5_31.1 (%T.as_type) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = out_param call_param1
// CHECK:STDOUT: %return: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = return_slot %return.param
// CHECK:STDOUT: %x: @Function.%T.binding.as_type (%T.binding.as_type) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @Function.%T.binding.as_type (%T.binding.as_type) = out_param call_param1
// CHECK:STDOUT: %return: ref @Function.%T.binding.as_type (%T.binding.as_type) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Function(%T.loc5_13.2: %Copy.type) {
// CHECK:STDOUT: %T.loc5_13.1: %Copy.type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.be8)]
// CHECK:STDOUT: %T.as_type.loc5_31.1: type = facet_access_type %T.loc5_13.1 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc5_31.1 [symbolic = %pattern_type (constants.%pattern_type.965801.1)]
// 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.17e4b7.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc5_31.1 [symbolic = %require_complete (constants.%require_complete.07c)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.1cd)]
// 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.e15)]
// CHECK:STDOUT: %.loc6_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6_10.2 (constants.%.427)]
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6_10.2 (%.427) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.168)]
// 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.2ce)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @Function.%T.as_type.loc5_31.1 (%T.as_type)) -> %return.param: @Function.%T.as_type.loc5_31.1 (%T.as_type) {
// CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Function.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: @Function.%T.as_type.loc5_31.1 (%T.as_type) = name_ref x, %x
// 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_10.2 (%.427) = impl_witness_access constants.%Copy.lookup_impl_witness.e15, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.168)]
// 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.be8) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2ce)]
// CHECK:STDOUT: %bound_method.loc6_10.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc6_10.1
// CHECK:STDOUT: %.loc5_34: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = splice_block %return {}
// CHECK:STDOUT: %.loc6_10.1: init @Function.%T.as_type.loc5_31.1 (%T.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_34
// CHECK:STDOUT: %.loc5_34: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return {}
// CHECK:STDOUT: %.loc6_10.1: init @Function.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_34
// CHECK:STDOUT: return %.loc6_10.1 to %return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -184,16 +184,16 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Function.specific_fn.loc12_10.2: <specific function> = specific_function constants.%Function, @Function(%T.loc10_16.1) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.8cd)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type)) -> %return.param: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) {
// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function]
// CHECK:STDOUT: %T.ref.loc12: %Copy.type = name_ref T, %T.loc10_16.2 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %x.ref: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) = name_ref x, %x
// CHECK:STDOUT: %.loc12_23.1: %Copy.type = converted constants.%T.as_type, constants.%T.be8 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %.loc12_23.2: %Copy.type = converted constants.%T.as_type, constants.%T.be8 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %x.ref: @CallGeneric.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
// CHECK:STDOUT: %.loc12_23.1: %Copy.type = converted constants.%T.binding.as_type, constants.%T.be8 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %.loc12_23.2: %Copy.type = converted constants.%T.binding.as_type, constants.%T.be8 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %Function.specific_fn.loc12_10.1: <specific function> = specific_function %Function.ref, @Function(constants.%T.be8) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.8cd)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) = call %Function.specific_fn.loc12_10.1(%x.ref) to %.loc10_37
// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.binding.as_type (%T.binding.as_type) = call %Function.specific_fn.loc12_10.1(%x.ref) to %.loc10_37
// CHECK:STDOUT: return %Function.call to %return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -244,11 +244,11 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Function(constants.%T.be8) {
// CHECK:STDOUT: %T.loc5_13.1 => constants.%T.be8
// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%T.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.965801.1
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.17e4b7.1
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete.07c
// CHECK:STDOUT: %require_complete => constants.%require_complete.1cd
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.e15
// CHECK:STDOUT: %.loc6_10.2 => constants.%.427
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.168
@@ -257,8 +257,8 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGeneric(constants.%T.be8) {
// CHECK:STDOUT: %T.loc10_16.1 => constants.%T.be8
// CHECK:STDOUT: %T.as_type.loc10_34.1 => constants.%T.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.965801.1
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.17e4b7.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGenericPtr(constants.%T.8b3) {
@@ -269,7 +269,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Function(constants.%Copy.facet.2d1) {
// CHECK:STDOUT: %T.loc5_13.1 => constants.%Copy.facet.2d1
// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%ptr.79f
// CHECK:STDOUT: %T.binding.as_type => constants.%ptr.79f
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.afe
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -282,7 +282,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Function(constants.%Copy.facet.9e3) {
// CHECK:STDOUT: %T.loc5_13.1 => constants.%Copy.facet.9e3
// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%ptr.019
// CHECK:STDOUT: %T.binding.as_type => constants.%ptr.019
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.44a
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -299,11 +299,11 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
// CHECK:STDOUT: %T.be8: %Copy.type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.322: type = pattern_type %Copy.type [concrete]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.be8 [symbolic]
// CHECK:STDOUT: %pattern_type.965801.1: type = pattern_type %T.as_type [symbolic]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.be8 [symbolic]
// CHECK:STDOUT: %pattern_type.17e4b7.1: type = pattern_type %T.binding.as_type [symbolic]
// CHECK:STDOUT: %Function.type: type = fn_type @Function [concrete]
// CHECK:STDOUT: %Function: %Function.type = struct_value () [concrete]
// CHECK:STDOUT: %require_complete.07c: <witness> = require_complete_type %T.as_type [symbolic]
// CHECK:STDOUT: %require_complete.1cd: <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.e15: <witness> = lookup_impl_witness %T.be8, @Copy [symbolic]
// CHECK:STDOUT: %.427: type = fn_type_with_self_type %Copy.Op.type, %T.be8 [symbolic]
@@ -349,53 +349,53 @@ 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.322 = symbolic_binding_pattern T, 0 [concrete]
// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.965801.1) = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.965801.1) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.965801.1) = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.965801.1) = out_param_pattern %return.patt, call_param1 [concrete]
// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.17e4b7.1) = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.17e4b7.1) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.17e4b7.1) = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.17e4b7.1) = 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.be8)]
// CHECK:STDOUT: %T.as_type.loc5_37: type = facet_access_type %T.ref.loc5_37 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc5_37: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// 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: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// 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]
// CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc5_13.2: %Copy.type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.be8)]
// CHECK:STDOUT: %x.param: @Function.%T.as_type.loc5_31.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_31.1: type = splice_block %.loc5_31.2 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %x.param: @Function.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_31.1: type = splice_block %.loc5_31.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
// CHECK:STDOUT: %T.ref.loc5_31: %Copy.type = name_ref T, %T.loc5_13.2 [symbolic = %T.loc5_13.1 (constants.%T.be8)]
// CHECK:STDOUT: %T.as_type.loc5_31.2: type = facet_access_type %T.ref.loc5_31 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc5_31.2: type = converted %T.ref.loc5_31, %T.as_type.loc5_31.2 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %T.as_type.loc5_31: type = facet_access_type %T.ref.loc5_31 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %.loc5_31.2: type = converted %T.ref.loc5_31, %T.as_type.loc5_31 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @Function.%T.as_type.loc5_31.1 (%T.as_type) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = out_param call_param1
// CHECK:STDOUT: %return: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = return_slot %return.param
// CHECK:STDOUT: %x: @Function.%T.binding.as_type (%T.binding.as_type) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @Function.%T.binding.as_type (%T.binding.as_type) = out_param call_param1
// CHECK:STDOUT: %return: ref @Function.%T.binding.as_type (%T.binding.as_type) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Function(%T.loc5_13.2: %Copy.type) {
// CHECK:STDOUT: %T.loc5_13.1: %Copy.type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.be8)]
// CHECK:STDOUT: %T.as_type.loc5_31.1: type = facet_access_type %T.loc5_13.1 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc5_31.1 [symbolic = %pattern_type (constants.%pattern_type.965801.1)]
// 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.17e4b7.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc5_31.1 [symbolic = %require_complete (constants.%require_complete.07c)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.1cd)]
// 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.e15)]
// CHECK:STDOUT: %.loc6_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6_10.2 (constants.%.427)]
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6_10.2 (%.427) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.168)]
// 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.2ce)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @Function.%T.as_type.loc5_31.1 (%T.as_type)) -> %return.param: @Function.%T.as_type.loc5_31.1 (%T.as_type) {
// CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Function.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: @Function.%T.as_type.loc5_31.1 (%T.as_type) = name_ref x, %x
// 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_10.2 (%.427) = impl_witness_access constants.%Copy.lookup_impl_witness.e15, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.168)]
// 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.be8) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2ce)]
// CHECK:STDOUT: %bound_method.loc6_10.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc6_10.1
// CHECK:STDOUT: %.loc5_34: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = splice_block %return {}
// CHECK:STDOUT: %.loc6_10.1: init @Function.%T.as_type.loc5_31.1 (%T.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_34
// CHECK:STDOUT: %.loc5_34: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return {}
// CHECK:STDOUT: %.loc6_10.1: init @Function.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_34
// CHECK:STDOUT: return %.loc6_10.1 to %return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -407,15 +407,15 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Function.specific_fn.loc12_10.2: <specific function> = specific_function constants.%Function, @Function(%T.loc10_16.1) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.8cd)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type)) -> %return.param: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) {
// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function]
// CHECK:STDOUT: %x.ref: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) = name_ref x, %x
// CHECK:STDOUT: %.loc12_20.1: %Copy.type = converted constants.%T.as_type, constants.%T.be8 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %.loc12_20.2: %Copy.type = converted constants.%T.as_type, constants.%T.be8 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %x.ref: @CallGeneric.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
// CHECK:STDOUT: %.loc12_20.1: %Copy.type = converted constants.%T.binding.as_type, constants.%T.be8 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %.loc12_20.2: %Copy.type = converted constants.%T.binding.as_type, constants.%T.be8 [symbolic = %T.loc10_16.1 (constants.%T.be8)]
// CHECK:STDOUT: %Function.specific_fn.loc12_10.1: <specific function> = specific_function %Function.ref, @Function(constants.%T.be8) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.8cd)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) = call %Function.specific_fn.loc12_10.1(%x.ref) to %.loc10_37
// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.binding.as_type (%T.binding.as_type) = call %Function.specific_fn.loc12_10.1(%x.ref) to %.loc10_37
// CHECK:STDOUT: return %Function.call to %return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -458,11 +458,11 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Function(constants.%T.be8) {
// CHECK:STDOUT: %T.loc5_13.1 => constants.%T.be8
// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%T.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.965801.1
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.17e4b7.1
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete.07c
// CHECK:STDOUT: %require_complete => constants.%require_complete.1cd
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.e15
// CHECK:STDOUT: %.loc6_10.2 => constants.%.427
// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.168
@@ -471,8 +471,8 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGeneric(constants.%T.be8) {
// CHECK:STDOUT: %T.loc10_16.1 => constants.%T.be8
// CHECK:STDOUT: %T.as_type.loc10_34.1 => constants.%T.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.965801.1
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.17e4b7.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CallGenericPtr(constants.%T.8b3) {
@@ -483,7 +483,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Function(constants.%Copy.facet.2d1) {
// CHECK:STDOUT: %T.loc5_13.1 => constants.%Copy.facet.2d1
// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%ptr.79f
// CHECK:STDOUT: %T.binding.as_type => constants.%ptr.79f
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.afe
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -496,7 +496,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Function(constants.%Copy.facet.9e3) {
// CHECK:STDOUT: %T.loc5_13.1 => constants.%Copy.facet.9e3
// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%ptr.019
// CHECK:STDOUT: %T.binding.as_type => constants.%ptr.019
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.44a
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -90,7 +90,7 @@ fn G() {
// CHECK:STDOUT: %Generic.assoc_type.0fd877.2: type = assoc_entity_type @Generic, @Generic(%T) [symbolic]
// CHECK:STDOUT: %assoc0.2966cb.2: %Generic.assoc_type.0fd877.2 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Generic.type.2db63e.2 [symbolic]
// CHECK:STDOUT: %U.as_type: type = facet_access_type %U [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: %.468: type = fn_type_with_self_type %Generic.F.type.f439a9.2, %U [symbolic]
// CHECK:STDOUT: %impl.elem0: %.468 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic]
@@ -252,7 +252,7 @@ fn G() {
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Generic.type.loc33_45.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc33_22.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.0fd877.2)]
// CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.0fd877.2) = assoc_entity element0, @Generic.%Generic.F.decl [symbolic = %assoc0 (constants.%assoc0.2966cb.2)]
// CHECK:STDOUT: %U.as_type.loc34_4.2: type = facet_access_type %U.loc33_32.1 [symbolic = %U.as_type.loc34_4.2 (constants.%U.as_type)]
// 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.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.f439a9.2)]
// CHECK:STDOUT: %.loc34_4.3: type = fn_type_with_self_type %Generic.F.type, %U.loc33_32.1 [symbolic = %.loc34_4.3 (constants.%.468)]
@@ -264,8 +264,8 @@ fn G() {
// CHECK:STDOUT: %U.ref: @CallGenericMethod.%Generic.type.loc33_45.1 (%Generic.type.2db63e.2) = name_ref U, %U.loc33_32.2 [symbolic = %U.loc33_32.1 (constants.%U)]
// CHECK:STDOUT: %.loc34_4.1: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.0fd877.2) = specific_constant @Generic.%assoc0.loc16_9.1, @Generic(constants.%T) [symbolic = %assoc0 (constants.%assoc0.2966cb.2)]
// CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.0fd877.2) = name_ref F, %.loc34_4.1 [symbolic = %assoc0 (constants.%assoc0.2966cb.2)]
// CHECK:STDOUT: %U.as_type.loc34_4.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc34_4.2 (constants.%U.as_type)]
// CHECK:STDOUT: %.loc34_4.2: type = converted %U.ref, %U.as_type.loc34_4.1 [symbolic = %U.as_type.loc34_4.2 (constants.%U.as_type)]
// 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.2: type = converted %U.ref, %U.as_type [symbolic = %U.binding.as_type (constants.%U.binding.as_type)]
// CHECK:STDOUT: %impl.elem0.loc34_4.1: @CallGenericMethod.%.loc34_4.3 (%.468) = 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: %.loc34_7: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1()
@@ -340,7 +340,7 @@ fn G() {
// CHECK:STDOUT: %require_complete => constants.%complete_type.ca2
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.713
// CHECK:STDOUT: %assoc0 => constants.%assoc0.9b7
// CHECK:STDOUT: %U.as_type.loc34_4.2 => constants.%ImplsGeneric
// CHECK:STDOUT: %U.binding.as_type => constants.%ImplsGeneric
// CHECK:STDOUT: %Generic.lookup_impl_witness => constants.%Generic.impl_witness
// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.4cf
// CHECK:STDOUT: %.loc34_4.3 => constants.%.573
+7 -7
View File
@@ -534,10 +534,10 @@ fn F() {
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
// CHECK:STDOUT: %facet_value: %type_where = facet_value %A, () [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.d35: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value) [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.900: %DestroyT.as_type.as.Destroy.impl.Op.type.d35 = struct_value () [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.61e: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.8ee: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.61e = struct_value () [concrete]
// CHECK:STDOUT: %complete_type.7ea: <witness> = complete_type_witness %ptr.6db [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.900, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.8ee, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -630,11 +630,11 @@ fn F() {
// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init %ptr.6db = call %ExplicitAndAlsoDeduced.specific_fn(%.loc11_37.6)
// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%A, () [concrete = constants.%facet_value]
// CHECK:STDOUT: %.loc11_37.7: %type_where = converted constants.%A, %facet_value [concrete = constants.%facet_value]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc11_37.4, constants.%DestroyT.as_type.as.Destroy.impl.Op.900
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.900, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc11_37.4, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc11_37.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8ee
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8ee, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc11_37.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %addr: %ptr.6db = addr_of %.loc11_37.4
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: return %ExplicitAndAlsoDeduced.call to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -71,18 +71,18 @@ fn F() {
// CHECK:STDOUT: %facet_type: type = facet_type <@Y & @W> [concrete]
// CHECK:STDOUT: %E: %facet_type = bind_symbolic_name E, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.50c: type = pattern_type %facet_type [concrete]
// CHECK:STDOUT: %E.as_type: type = facet_access_type %E [symbolic]
// CHECK:STDOUT: %E.binding.as_type: type = symbolic_binding_type E, 0, %E [symbolic]
// CHECK:STDOUT: %Y.lookup_impl_witness: <witness> = lookup_impl_witness %E, @Y [symbolic]
// CHECK:STDOUT: %Y.facet.682: %Y.type = facet_value %E.as_type, (%Y.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %CC.6f9: type = class_type @CC, @CC(%Y.facet.682) [symbolic]
// CHECK:STDOUT: %Z.impl_witness.3fa: <witness> = impl_witness file.%Z.impl_witness_table, @CC.as.Z.impl(%E) [symbolic]
// CHECK:STDOUT: %Y.facet.8d8: %Y.type = facet_value %E.binding.as_type, (%Y.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %CC.f67: type = class_type @CC, @CC(%Y.facet.8d8) [symbolic]
// CHECK:STDOUT: %Z.impl_witness.62d: <witness> = impl_witness file.%Z.impl_witness_table, @CC.as.Z.impl(%E) [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %Y.facet.4e8: %Y.type = facet_value %DD, (%Y.impl_witness) [concrete]
// CHECK:STDOUT: %CC.3b3: type = class_type @CC, @CC(%Y.facet.4e8) [concrete]
// CHECK:STDOUT: %facet_value: %facet_type = facet_value %DD, (%Y.impl_witness, %W.impl_witness) [concrete]
// CHECK:STDOUT: %Z.impl_witness.8f8: <witness> = impl_witness file.%Z.impl_witness_table, @CC.as.Z.impl(%facet_value) [concrete]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC.3b3, (%Z.impl_witness.8f8) [concrete]
// CHECK:STDOUT: %Z.impl_witness.23f: <witness> = impl_witness file.%Z.impl_witness_table, @CC.as.Z.impl(%facet_value) [concrete]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC.3b3, (%Z.impl_witness.23f) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -137,10 +137,10 @@ fn F() {
// CHECK:STDOUT: } {
// CHECK:STDOUT: %CC.ref: %CC.type = name_ref CC, file.%CC.decl [concrete = constants.%CC.generic]
// CHECK:STDOUT: %E.ref: %facet_type = name_ref E, %E.loc19_14.1 [symbolic = %E.loc19_14.2 (constants.%E)]
// CHECK:STDOUT: %E.as_type.loc19_29.1: type = facet_access_type %E.ref [symbolic = %E.as_type.loc19_29.2 (constants.%E.as_type)]
// CHECK:STDOUT: %Y.facet.loc19_29.1: %Y.type = facet_value %E.as_type.loc19_29.1, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.682)]
// CHECK:STDOUT: %.loc19_29: %Y.type = converted %E.ref, %Y.facet.loc19_29.1 [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.682)]
// CHECK:STDOUT: %CC.loc19_29.1: type = class_type @CC, @CC(constants.%Y.facet.682) [symbolic = %CC.loc19_29.2 (constants.%CC.6f9)]
// CHECK:STDOUT: %E.as_type: type = facet_access_type %E.ref [symbolic = %E.binding.as_type (constants.%E.binding.as_type)]
// CHECK:STDOUT: %Y.facet.loc19_29.1: %Y.type = facet_value %E.as_type, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.8d8)]
// CHECK:STDOUT: %.loc19_29: %Y.type = converted %E.ref, %Y.facet.loc19_29.1 [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.8d8)]
// CHECK:STDOUT: %CC.loc19_29.1: type = class_type @CC, @CC(constants.%Y.facet.8d8) [symbolic = %CC.loc19_29.2 (constants.%CC.f67)]
// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
// CHECK:STDOUT: %.loc19_20.1: type = splice_block %.loc19_20.3 [concrete = constants.%facet_type] {
// CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
@@ -155,7 +155,7 @@ fn F() {
// CHECK:STDOUT: %E.loc19_14.1: %facet_type = bind_symbolic_name E, 0 [symbolic = %E.loc19_14.2 (constants.%E)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @CC.as.Z.impl [concrete]
// CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = @CC.as.Z.impl.%Z.impl_witness (constants.%Z.impl_witness.3fa)]
// CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = @CC.as.Z.impl.%Z.impl_witness (constants.%Z.impl_witness.62d)]
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -195,11 +195,11 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @CC.as.Z.impl(%E.loc19_14.1: %facet_type) {
// CHECK:STDOUT: %E.loc19_14.2: %facet_type = bind_symbolic_name E, 0 [symbolic = %E.loc19_14.2 (constants.%E)]
// CHECK:STDOUT: %E.as_type.loc19_29.2: type = facet_access_type %E.loc19_14.2 [symbolic = %E.as_type.loc19_29.2 (constants.%E.as_type)]
// CHECK:STDOUT: %E.binding.as_type: type = symbolic_binding_type E, 0, %E.loc19_14.2 [symbolic = %E.binding.as_type (constants.%E.binding.as_type)]
// CHECK:STDOUT: %Y.lookup_impl_witness: <witness> = lookup_impl_witness %E.loc19_14.2, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)]
// CHECK:STDOUT: %Y.facet.loc19_29.2: %Y.type = facet_value %E.as_type.loc19_29.2, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.682)]
// CHECK:STDOUT: %CC.loc19_29.2: type = class_type @CC, @CC(%Y.facet.loc19_29.2) [symbolic = %CC.loc19_29.2 (constants.%CC.6f9)]
// CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness file.%Z.impl_witness_table, @CC.as.Z.impl(%E.loc19_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.3fa)]
// CHECK:STDOUT: %Y.facet.loc19_29.2: %Y.type = facet_value %E.binding.as_type, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.8d8)]
// CHECK:STDOUT: %CC.loc19_29.2: type = class_type @CC, @CC(%Y.facet.loc19_29.2) [symbolic = %CC.loc19_29.2 (constants.%CC.f67)]
// CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness file.%Z.impl_witness_table, @CC.as.Z.impl(%E.loc19_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.62d)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
@@ -241,7 +241,7 @@ fn F() {
// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
// CHECK:STDOUT: %facet_value: %facet_type = facet_value constants.%DD, (constants.%Y.impl_witness, constants.%W.impl_witness) [concrete = constants.%facet_value]
// CHECK:STDOUT: %.loc22_12.1: %facet_type = converted constants.%DD, %facet_value [concrete = constants.%facet_value]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC, (constants.%Z.impl_witness.8f8) [concrete = constants.%Z.facet]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC, (constants.%Z.impl_witness.23f) [concrete = constants.%Z.facet]
// CHECK:STDOUT: %.loc22_12.2: %Z.type = converted %CC, %Z.facet [concrete = constants.%Z.facet]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -250,17 +250,17 @@ fn F() {
// CHECK:STDOUT: %D.loc12_10.1 => constants.%D
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CC(constants.%Y.facet.682) {
// CHECK:STDOUT: %D.loc12_10.1 => constants.%Y.facet.682
// CHECK:STDOUT: specific @CC(constants.%Y.facet.8d8) {
// CHECK:STDOUT: %D.loc12_10.1 => constants.%Y.facet.8d8
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CC.as.Z.impl(constants.%E) {
// CHECK:STDOUT: %E.loc19_14.2 => constants.%E
// CHECK:STDOUT: %E.as_type.loc19_29.2 => constants.%E.as_type
// CHECK:STDOUT: %E.binding.as_type => constants.%E.binding.as_type
// CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness
// CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.682
// CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.6f9
// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.3fa
// CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.8d8
// CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.f67
// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.62d
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CC(constants.%Y.facet.4e8) {
@@ -269,11 +269,11 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @CC.as.Z.impl(constants.%facet_value) {
// CHECK:STDOUT: %E.loc19_14.2 => constants.%facet_value
// CHECK:STDOUT: %E.as_type.loc19_29.2 => constants.%DD
// CHECK:STDOUT: %E.binding.as_type => constants.%DD
// CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.impl_witness
// CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.4e8
// CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.3b3
// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.8f8
// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.23f
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
@@ -54,9 +54,9 @@ fn B() {
// CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
// CHECK:STDOUT: %T: %Z.type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.4a0: type = pattern_type %Z.type [concrete]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T.as_type} [symbolic]
// CHECK:STDOUT: %pattern_type.ba1: type = pattern_type %struct_type.a [symbolic]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T.binding.as_type} [symbolic]
// CHECK:STDOUT: %pattern_type.86d: type = pattern_type %struct_type.a [symbolic]
// CHECK:STDOUT: %A.type: type = fn_type @A [concrete]
// CHECK:STDOUT: %A: %A.type = struct_value () [concrete]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %struct_type.a [symbolic]
@@ -70,8 +70,8 @@ fn B() {
// CHECK:STDOUT: %Z.decl: type = interface_decl @Z [concrete = constants.%Z.type] {} {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] {
// CHECK:STDOUT: %T.patt: %pattern_type.4a0 = symbolic_binding_pattern T, 0 [concrete]
// CHECK:STDOUT: %x.patt: @A.%pattern_type (%pattern_type.ba1) = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @A.%pattern_type (%pattern_type.ba1) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %x.patt: @A.%pattern_type (%pattern_type.86d) = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @A.%pattern_type (%pattern_type.86d) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4_10: type = splice_block %Z.ref [concrete = constants.%Z.type] {
// CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
@@ -81,9 +81,9 @@ fn B() {
// CHECK:STDOUT: %x.param: @A.%struct_type.a.loc4_22.1 (%struct_type.a) = value_param call_param0
// CHECK:STDOUT: %.loc4_22: type = splice_block %struct_type.a.loc4_22.2 [symbolic = %struct_type.a.loc4_22.1 (constants.%struct_type.a)] {
// CHECK:STDOUT: %T.ref: %Z.type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc4_21.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc4_21.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc4_21: type = converted %T.ref, %T.as_type.loc4_21.2 [symbolic = %T.as_type.loc4_21.1 (constants.%T.as_type)]
// CHECK:STDOUT: %struct_type.a.loc4_22.2: type = struct_type {.a: @A.%T.as_type.loc4_21.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_22.1 (constants.%struct_type.a)]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %.loc4_21: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %struct_type.a.loc4_22.2: type = struct_type {.a: @A.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.a.loc4_22.1 (constants.%struct_type.a)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @A.%struct_type.a.loc4_22.1 (%struct_type.a) = bind_name x, %x.param
// CHECK:STDOUT: }
@@ -99,9 +99,9 @@ fn B() {
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @A(%T.loc4_6.2: %Z.type) {
// CHECK:STDOUT: %T.loc4_6.1: %Z.type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc4_21.1: type = facet_access_type %T.loc4_6.1 [symbolic = %T.as_type.loc4_21.1 (constants.%T.as_type)]
// CHECK:STDOUT: %struct_type.a.loc4_22.1: type = struct_type {.a: @A.%T.as_type.loc4_21.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_22.1 (constants.%struct_type.a)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.loc4_22.1 [symbolic = %pattern_type (constants.%pattern_type.ba1)]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc4_6.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %struct_type.a.loc4_22.1: type = struct_type {.a: @A.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.a.loc4_22.1 (constants.%struct_type.a)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.loc4_22.1 [symbolic = %pattern_type (constants.%pattern_type.86d)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %struct_type.a.loc4_22.1 [symbolic = %require_complete (constants.%require_complete)]
@@ -114,9 +114,9 @@ fn B() {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A(constants.%T) {
// CHECK:STDOUT: %T.loc4_6.1 => constants.%T
// CHECK:STDOUT: %T.as_type.loc4_21.1 => constants.%T.as_type
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %struct_type.a.loc4_22.1 => constants.%struct_type.a
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.ba1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.86d
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_deduce_imported_function.carbon
@@ -127,9 +127,9 @@ fn B() {
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
// CHECK:STDOUT: %T: %Z.type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.819: type = pattern_type %Z.type [concrete]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T.as_type} [symbolic]
// CHECK:STDOUT: %pattern_type.143: type = pattern_type %struct_type.a [symbolic]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T.binding.as_type} [symbolic]
// CHECK:STDOUT: %pattern_type.0cc: type = pattern_type %struct_type.a [symbolic]
// CHECK:STDOUT: %A.type.00d: type = fn_type @A.loc4 [concrete]
// CHECK:STDOUT: %A.1db: %A.type.00d = struct_value () [concrete]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %struct_type.a [symbolic]
@@ -162,8 +162,8 @@ fn B() {
// CHECK:STDOUT: %Lib.import = import Lib
// CHECK:STDOUT: %A.decl: %A.type.00d = fn_decl @A.loc4 [concrete = constants.%A.1db] {
// CHECK:STDOUT: %T.patt: %pattern_type.819 = symbolic_binding_pattern T, 0 [concrete]
// CHECK:STDOUT: %x.patt: @A.loc4.%pattern_type (%pattern_type.143) = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @A.loc4.%pattern_type (%pattern_type.143) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: %x.patt: @A.loc4.%pattern_type (%pattern_type.0cc) = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: @A.loc4.%pattern_type (%pattern_type.0cc) = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4_13: type = splice_block %Z.ref [concrete = constants.%Z.type] {
// CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
@@ -174,9 +174,9 @@ fn B() {
// CHECK:STDOUT: %x.param: @A.loc4.%struct_type.a.loc4_26.1 (%struct_type.a) = value_param call_param0
// CHECK:STDOUT: %.loc4_26: type = splice_block %struct_type.a.loc4_26.2 [symbolic = %struct_type.a.loc4_26.1 (constants.%struct_type.a)] {
// CHECK:STDOUT: %T.ref: %Z.type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc4_25.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc4_25.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc4_25: type = converted %T.ref, %T.as_type.loc4_25.2 [symbolic = %T.as_type.loc4_25.1 (constants.%T.as_type)]
// CHECK:STDOUT: %struct_type.a.loc4_26.2: type = struct_type {.a: @A.loc4.%T.as_type.loc4_25.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_26.1 (constants.%struct_type.a)]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %.loc4_25: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %struct_type.a.loc4_26.2: type = struct_type {.a: @A.loc4.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.a.loc4_26.1 (constants.%struct_type.a)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @A.loc4.%struct_type.a.loc4_26.1 (%struct_type.a) = bind_name x, %x.param
// CHECK:STDOUT: }
@@ -191,9 +191,9 @@ fn B() {
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @A.loc4(%T.loc4_6.2: %Z.type) {
// CHECK:STDOUT: %T.loc4_6.1: %Z.type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc4_25.1: type = facet_access_type %T.loc4_6.1 [symbolic = %T.as_type.loc4_25.1 (constants.%T.as_type)]
// CHECK:STDOUT: %struct_type.a.loc4_26.1: type = struct_type {.a: @A.loc4.%T.as_type.loc4_25.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_26.1 (constants.%struct_type.a)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.loc4_26.1 [symbolic = %pattern_type (constants.%pattern_type.143)]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc4_6.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %struct_type.a.loc4_26.1: type = struct_type {.a: @A.loc4.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.a.loc4_26.1 (constants.%struct_type.a)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.loc4_26.1 [symbolic = %pattern_type (constants.%pattern_type.0cc)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %struct_type.a.loc4_26.1 [symbolic = %require_complete (constants.%require_complete)]
@@ -218,9 +218,9 @@ fn B() {
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @A.1(imports.%Lib.import_ref.c90: %Z.type) [from "lib.carbon"] {
// CHECK:STDOUT: %T: %Z.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic = %T.as_type (constants.%T.as_type)]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @A.1.%T.as_type (%T.as_type)} [symbolic = %struct_type.a (constants.%struct_type.a)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a [symbolic = %pattern_type (constants.%pattern_type.143)]
// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @A.1.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.a (constants.%struct_type.a)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a [symbolic = %pattern_type (constants.%pattern_type.0cc)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %struct_type.a [symbolic = %require_complete (constants.%require_complete)]
@@ -230,15 +230,15 @@ fn B() {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.loc4(constants.%T) {
// CHECK:STDOUT: %T.loc4_6.1 => constants.%T
// CHECK:STDOUT: %T.as_type.loc4_25.1 => constants.%T.as_type
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %struct_type.a.loc4_26.1 => constants.%struct_type.a
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.143
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.0cc
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.1(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %T.as_type => constants.%T.as_type
// CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
// CHECK:STDOUT: %struct_type.a => constants.%struct_type.a
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.143
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.0cc
// CHECK:STDOUT: }
// CHECK:STDOUT:
+31 -31
View File
@@ -59,17 +59,17 @@ fn CallNegative() {
// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
// CHECK:STDOUT: %DestroyT: %type_where = bind_symbolic_name DestroyT, 0 [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%DestroyT) [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.8a0: %DestroyT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%DestroyT) [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.544: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d = struct_value () [symbolic]
// CHECK:STDOUT: %facet_value.818: %type_where = facet_value %Int, () [symbolic]
// CHECK:STDOUT: %Destroy.impl_witness.920: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.818) [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.16a: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.818) [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.35f: %DestroyT.as_type.as.Destroy.impl.Op.type.16a = struct_value () [symbolic]
// CHECK:STDOUT: %Destroy.impl_witness.47b: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.818) [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.c3b: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.818) [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.db2: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.c3b = struct_value () [symbolic]
// CHECK:STDOUT: %ptr.784: type = ptr_type %Int [symbolic]
// CHECK:STDOUT: %require_complete.0f5: <witness> = require_complete_type %ptr.784 [symbolic]
// CHECK:STDOUT: %Destroy.facet.e38: %Destroy.type = facet_value %Int, (%Destroy.impl_witness.920) [symbolic]
// CHECK:STDOUT: %.4ec: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.e38 [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.9f5: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.35f, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.818) [symbolic]
// CHECK:STDOUT: %Destroy.facet.141: %Destroy.type = facet_value %Int, (%Destroy.impl_witness.47b) [symbolic]
// CHECK:STDOUT: %.944: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.141 [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.a72: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.db2, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.818) [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]
@@ -78,13 +78,13 @@ fn CallNegative() {
// CHECK:STDOUT: %complete_type.d94: <witness> = complete_type_witness <error> [concrete]
// CHECK:STDOUT: %pattern_type.47b: type = pattern_type %i0 [concrete]
// CHECK:STDOUT: %facet_value.5b4: %type_where = facet_value %i0, () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.20d: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.5b4) [concrete]
// CHECK:STDOUT: %Destroy.facet.168: %Destroy.type = facet_value %i0, (%Destroy.impl_witness.20d) [concrete]
// CHECK:STDOUT: %.6d5: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.168 [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.59e: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.5b4) [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.701: %DestroyT.as_type.as.Destroy.impl.Op.type.59e = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.7f4: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.5b4) [concrete]
// CHECK:STDOUT: %Destroy.facet.00a: %Destroy.type = facet_value %i0, (%Destroy.impl_witness.7f4) [concrete]
// CHECK:STDOUT: %.1c9: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.00a [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.d1c: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.5b4) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.aeb: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.d1c = struct_value () [concrete]
// CHECK:STDOUT: %ptr.3f1: type = ptr_type %i0 [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.8e8: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.701, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.5b4) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.026: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.aeb, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.5b4) [concrete]
// CHECK:STDOUT: %complete_type.588: <witness> = complete_type_witness %ptr.3f1 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -99,8 +99,8 @@ fn CallNegative() {
// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral]
// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Core.import_ref.d51: @DestroyT.as_type.as.Destroy.impl.%DestroyT.as_type.as.Destroy.impl.Op.type (%DestroyT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @DestroyT.as_type.as.Destroy.impl.%DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.8a0)]
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.d51), @DestroyT.as_type.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Core.import_ref.950: @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.544)]
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.950), @DestroyT.binding.as_type.as.Destroy.impl [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -134,12 +134,12 @@ fn CallNegative() {
// CHECK:STDOUT: %require_complete.loc15_20: <witness> = require_complete_type %Int.loc15_20.2 [symbolic = %require_complete.loc15_20 (constants.%require_complete.b4f)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %Int.loc15_20.2 [symbolic = %pattern_type (constants.%pattern_type.896)]
// CHECK:STDOUT: %facet_value.loc15_3.2: %type_where = facet_value %Int.loc15_20.2, () [symbolic = %facet_value.loc15_3.2 (constants.%facet_value.818)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.loc15_3.2) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.920)]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Int.loc15_20.2, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.e38)]
// CHECK:STDOUT: %.loc15_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc15_3.2 (constants.%.4ec)]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.loc15_3.2) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.as_type.as.Destroy.impl.Op.type.16a)]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op: @ErrorIfNIsZero.%DestroyT.as_type.as.Destroy.impl.Op.type (%DestroyT.as_type.as.Destroy.impl.Op.type.16a) = struct_value () [symbolic = %DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.35f)]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.loc15_3.2) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.9f5)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.loc15_3.2) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.47b)]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Int.loc15_20.2, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.141)]
// CHECK:STDOUT: %.loc15_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc15_3.2 (constants.%.944)]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.loc15_3.2) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.c3b)]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @ErrorIfNIsZero.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.c3b) = struct_value () [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.db2)]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.loc15_3.2) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.a72)]
// CHECK:STDOUT: %ptr: type = ptr_type %Int.loc15_20.2 [symbolic = %ptr (constants.%ptr.784)]
// CHECK:STDOUT: %require_complete.loc15_3: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc15_3 (constants.%require_complete.0f5)]
// CHECK:STDOUT:
@@ -159,12 +159,12 @@ fn CallNegative() {
// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = bind_name v, %v.var
// CHECK:STDOUT: %facet_value.loc15_3.1: %type_where = facet_value constants.%Int, () [symbolic = %facet_value.loc15_3.2 (constants.%facet_value.818)]
// CHECK:STDOUT: %.loc15_3.1: %type_where = converted constants.%Int, %facet_value.loc15_3.1 [symbolic = %facet_value.loc15_3.2 (constants.%facet_value.818)]
// CHECK:STDOUT: %impl.elem0: @ErrorIfNIsZero.%.loc15_3.2 (%.4ec) = impl_witness_access constants.%Destroy.impl_witness.920, element0 [symbolic = %DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.35f)]
// CHECK:STDOUT: %impl.elem0: @ErrorIfNIsZero.%.loc15_3.2 (%.944) = impl_witness_access constants.%Destroy.impl_witness.47b, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.db2)]
// CHECK:STDOUT: %bound_method.loc15_3.1: <bound method> = bound_method %v.var, %impl.elem0
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.818) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.9f5)]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.818) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.a72)]
// CHECK:STDOUT: %bound_method.loc15_3.2: <bound method> = bound_method %v.var, %specific_fn
// CHECK:STDOUT: %addr: @ErrorIfNIsZero.%ptr (%ptr.784) = addr_of %v.var
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc15_3.2(%addr)
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc15_3.2(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -190,12 +190,12 @@ fn CallNegative() {
// CHECK:STDOUT: %require_complete.loc15_20 => constants.%complete_type.d94
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.47b
// CHECK:STDOUT: %facet_value.loc15_3.2 => constants.%facet_value.5b4
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.20d
// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.168
// CHECK:STDOUT: %.loc15_3.2 => constants.%.6d5
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.as_type.as.Destroy.impl.Op.type.59e
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op => constants.%DestroyT.as_type.as.Destroy.impl.Op.701
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn => constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.8e8
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.7f4
// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.00a
// CHECK:STDOUT: %.loc15_3.2 => constants.%.1c9
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.d1c
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.aeb
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.026
// CHECK:STDOUT: %ptr => constants.%ptr.3f1
// CHECK:STDOUT: %require_complete.loc15_3 => constants.%complete_type.588
// CHECK:STDOUT: }
+21 -21
View File
@@ -74,20 +74,20 @@ fn G() {
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
// CHECK:STDOUT: %facet_value.be8: %type_where = facet_value %C, () [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.075: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.be8) [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.b80: %DestroyT.as_type.as.Destroy.impl.Op.type.075 = struct_value () [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.ed8: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.be8) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.f93: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.ed8 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.003: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.b80, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.be8) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.315: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.f93, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.be8) [concrete]
// CHECK:STDOUT: %facet_value.ff9: %type_where = facet_value %empty_tuple.type, () [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.4e0: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.ff9) [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.c00: %DestroyT.as_type.as.Destroy.impl.Op.type.4e0 = struct_value () [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.789: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.ff9) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.93e: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.789 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.843: type = ptr_type %empty_tuple.type [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.a54: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.c00, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.ff9) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1ba: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.93e, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.ff9) [concrete]
// CHECK:STDOUT: %facet_value.d23: %type_where = facet_value %i32, () [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.cb3: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.d23) [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.cad: %DestroyT.as_type.as.Destroy.impl.Op.type.cb3 = struct_value () [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.a12: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.d23) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.a57: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.a12 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.5a0: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.cad, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.d23) [concrete]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.8ab: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.a57, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.d23) [concrete]
// CHECK:STDOUT: %complete_type.782: <witness> = complete_type_witness %empty_tuple.type [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -239,25 +239,25 @@ fn G() {
// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
// CHECK:STDOUT: %facet_value.loc24: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value.be8]
// CHECK:STDOUT: %.loc24_3.2: %type_where = converted constants.%C, %facet_value.loc24 [concrete = constants.%facet_value.be8]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound.loc24: <bound method> = bound_method %c.var, constants.%DestroyT.as_type.as.Destroy.impl.Op.b80
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.b80, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.be8) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.003]
// CHECK:STDOUT: %bound_method.loc24: <bound method> = bound_method %c.var, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.1
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc24: <bound method> = bound_method %c.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.f93
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.f93, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.be8) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.315]
// CHECK:STDOUT: %bound_method.loc24: <bound method> = bound_method %c.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
// CHECK:STDOUT: %addr.loc24: %ptr.019 = addr_of %c.var
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24)
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24(%addr.loc24)
// CHECK:STDOUT: %facet_value.loc23: %type_where = facet_value constants.%empty_tuple.type, () [concrete = constants.%facet_value.ff9]
// CHECK:STDOUT: %.loc23_3: %type_where = converted constants.%empty_tuple.type, %facet_value.loc23 [concrete = constants.%facet_value.ff9]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound.loc23: <bound method> = bound_method %b.var, constants.%DestroyT.as_type.as.Destroy.impl.Op.c00
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.c00, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.ff9) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.a54]
// CHECK:STDOUT: %bound_method.loc23: <bound method> = bound_method %b.var, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.2
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc23: <bound method> = bound_method %b.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.93e
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.93e, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.ff9) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1ba]
// CHECK:STDOUT: %bound_method.loc23: <bound method> = bound_method %b.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
// CHECK:STDOUT: %addr.loc23: %ptr.843 = addr_of %b.var
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23)
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23)
// CHECK:STDOUT: %facet_value.loc22: %type_where = facet_value constants.%i32, () [concrete = constants.%facet_value.d23]
// CHECK:STDOUT: %.loc22_3: %type_where = converted constants.%i32, %facet_value.loc22 [concrete = constants.%facet_value.d23]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %a.var, constants.%DestroyT.as_type.as.Destroy.impl.Op.cad
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.3: <specific function> = specific_function constants.%DestroyT.as_type.as.Destroy.impl.Op.cad, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value.d23) [concrete = constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn.5a0]
// CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %a.var, %DestroyT.as_type.as.Destroy.impl.Op.specific_fn.3
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %a.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.a57
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.a57, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.d23) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.8ab]
// CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %a.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3
// CHECK:STDOUT: %addr.loc22: %ptr.235 = addr_of %a.var
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22)
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+18 -18
View File
@@ -36,17 +36,17 @@ fn F(T:! type) {
// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
// CHECK:STDOUT: %DestroyT: %type_where = bind_symbolic_name DestroyT, 0 [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.190: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%DestroyT) [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.8a0: %DestroyT.as_type.as.Destroy.impl.Op.type.190 = struct_value () [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%DestroyT) [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.544: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d = struct_value () [symbolic]
// CHECK:STDOUT: %facet_value: %type_where = facet_value %ptr.79f, () [symbolic]
// CHECK:STDOUT: %Destroy.impl_witness.71a: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value) [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type.13f: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value) [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.b86: %DestroyT.as_type.as.Destroy.impl.Op.type.13f = struct_value () [symbolic]
// CHECK:STDOUT: %Destroy.impl_witness.5e2: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.ca5: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.7c0: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.ca5 = struct_value () [symbolic]
// CHECK:STDOUT: %ptr.a13: type = ptr_type %ptr.79f [symbolic]
// CHECK:STDOUT: %require_complete.132: <witness> = require_complete_type %ptr.a13 [symbolic]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.79f, (%Destroy.impl_witness.71a) [symbolic]
// CHECK:STDOUT: %.280: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op.b86, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value) [symbolic]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.79f, (%Destroy.impl_witness.5e2) [symbolic]
// CHECK:STDOUT: %.0f0: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.7c0, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -56,8 +56,8 @@ fn F(T:! type) {
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Core.import_ref.d51: @DestroyT.as_type.as.Destroy.impl.%DestroyT.as_type.as.Destroy.impl.Op.type (%DestroyT.as_type.as.Destroy.impl.Op.type.190) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @DestroyT.as_type.as.Destroy.impl.%DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.8a0)]
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.d51), @DestroyT.as_type.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Core.import_ref.950: @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.544)]
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.950), @DestroyT.binding.as_type.as.Destroy.impl [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -84,12 +84,12 @@ fn F(T:! type) {
// CHECK:STDOUT: %require_complete.loc17: <witness> = require_complete_type %T.loc15_6.1 [symbolic = %require_complete.loc17 (constants.%require_complete.4ae)]
// CHECK:STDOUT: %pattern_type.loc17: type = pattern_type %T.loc15_6.1 [symbolic = %pattern_type.loc17 (constants.%pattern_type.7dc)]
// CHECK:STDOUT: %facet_value.loc16_3.2: %type_where = facet_value %ptr.loc16_11.2, () [symbolic = %facet_value.loc16_3.2 (constants.%facet_value)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.as_type.as.Destroy.impl(%facet_value.loc16_3.2) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.71a)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.loc16_3.2) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.5e2)]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc16_11.2, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)]
// CHECK:STDOUT: %.loc16_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc16_3.2 (constants.%.280)]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl(%facet_value.loc16_3.2) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.as_type.as.Destroy.impl.Op.type.13f)]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op: @F.%DestroyT.as_type.as.Destroy.impl.Op.type (%DestroyT.as_type.as.Destroy.impl.Op.type.13f) = struct_value () [symbolic = %DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.b86)]
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.as_type.as.Destroy.impl.Op, @DestroyT.as_type.as.Destroy.impl.Op(%facet_value.loc16_3.2) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn)]
// CHECK:STDOUT: %.loc16_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc16_3.2 (constants.%.0f0)]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.loc16_3.2) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.ca5)]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @F.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.ca5) = struct_value () [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.7c0)]
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.loc16_3.2) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn)]
// CHECK:STDOUT: %ptr.loc16_3: type = ptr_type %ptr.loc16_11.2 [symbolic = %ptr.loc16_3 (constants.%ptr.a13)]
// CHECK:STDOUT: %require_complete.loc16_3: <witness> = require_complete_type %ptr.loc16_3 [symbolic = %require_complete.loc16_3 (constants.%require_complete.132)]
// CHECK:STDOUT:
@@ -116,12 +116,12 @@ fn F(T:! type) {
// CHECK:STDOUT: %n: @F.%T.loc15_6.1 (%T) = bind_name n, %.loc17_14.2
// CHECK:STDOUT: %facet_value.loc16_3.1: %type_where = facet_value constants.%ptr.79f, () [symbolic = %facet_value.loc16_3.2 (constants.%facet_value)]
// CHECK:STDOUT: %.loc16_3.1: %type_where = converted constants.%ptr.79f, %facet_value.loc16_3.1 [symbolic = %facet_value.loc16_3.2 (constants.%facet_value)]
// CHECK:STDOUT: %impl.elem0: @F.%.loc16_3.2 (%.280) = impl_witness_access constants.%Destroy.impl_witness.71a, element0 [symbolic = %DestroyT.as_type.as.Destroy.impl.Op (constants.%DestroyT.as_type.as.Destroy.impl.Op.b86)]
// CHECK:STDOUT: %impl.elem0: @F.%.loc16_3.2 (%.0f0) = impl_witness_access constants.%Destroy.impl_witness.5e2, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.7c0)]
// CHECK:STDOUT: %bound_method.loc16_3.1: <bound method> = bound_method %p.var, %impl.elem0
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @DestroyT.as_type.as.Destroy.impl.Op(constants.%facet_value) [symbolic = %DestroyT.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.as_type.as.Destroy.impl.Op.specific_fn)]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn)]
// CHECK:STDOUT: %bound_method.loc16_3.2: <bound method> = bound_method %p.var, %specific_fn
// CHECK:STDOUT: %addr: @F.%ptr.loc16_3 (%ptr.a13) = addr_of %p.var
// CHECK:STDOUT: %DestroyT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc16_3.2(%addr)
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc16_3.2(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }