mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
+70
-70
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user