Generate Destroy impls for classes (#5873)

Although this focused on `Destroy` support, some choices here around
`implicit_type_impls` are because copy/move will likely follow a similar
approach. I'm trying not to predict too much about how we'll structure
those, but I'm putting `Destroy` impl logic in a file that could perhaps
be shared with those. They'd likely be interested in similar things,
e.g. traversing members of types (particularly class, struct literal,
tuple literal).

At present this sets the destroy function as `no_op` which is consistent
with current logic, but has a TODO to correctly define.

Constant importing for functions changes slightly due to some issues I
was having with `GetFunctionType`. zygoloid suggested this approach to
avoid `EvalInst` logic.

Adds a flag for controlling whether to generating these impls. While
this does generation for `class`, as noted above this'll also need to be
done for tuples and struct literals, which would leave the `none.carbon`
min_prelude unable to use any types. Note if destruction *would* occur,
it'll still look up `Core.Destroy` for that and fail, but that's already
true of any test using `none.carbon`. I'm trying to use the flag to see
if we can keep `none.carbon` working mostly-consistently.

I'd tried separating out the flag to #5852, but that got a lot of
pushback over whether the behavior was appropriate. I'm hoping that the
interactions here make it clearer why the particular approach -- the
goal is not to enable advanced testing, or create some new end-user
behavior that we really support, it's just to keep no-prelude tests
functional. The main question raised there was why not just keep
generating `impl T as Core.Destroy` if `fn destroy` is present -- but I
think here it should be apparent that would require additional
complexity, as the generation of `impl T as Core.Destroy` is not
currently conditioned based on the implementation of `fn destroy`. I'd
rather add complexity to this flag only if it's enabling interesting
test functionality.

---------

Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
Jon Ross-Perkins
2025-08-04 19:39:22 +00:00
committed by GitHub
co-authored by Geoff Romer
parent a5a5e381be
commit 7209ad7c9f
215 changed files with 22244 additions and 2727 deletions
+31 -1
View File
@@ -385,9 +385,16 @@ fn CallF() {
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
// CHECK:STDOUT: %assoc0.45f: %I.assoc_type = assoc_entity element0, @I.%V [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.type.15e: type = facet_type <@ImplicitAs, @ImplicitAs(%C)> [concrete]
@@ -415,10 +422,12 @@ fn CallF() {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: import Core//prelude
// 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.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -489,6 +498,22 @@ fn CallF() {
// CHECK:STDOUT: assoc_const V:! @V.%Self.as_type (%Self.as_type.b70);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc8: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @empty_tuple.type.as.ImplicitAs.impl: %.loc10_7.2 as %ImplicitAs.type {
// CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert.decl: %empty_tuple.type.as.ImplicitAs.impl.Convert.type = fn_decl @empty_tuple.type.as.ImplicitAs.impl.Convert [concrete = constants.%empty_tuple.type.as.ImplicitAs.impl.Convert] {
// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete]
@@ -519,6 +544,9 @@ fn CallF() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -527,6 +555,8 @@ fn CallF() {
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @empty_tuple.type.as.ImplicitAs.impl.Convert(%self.param: %empty_tuple.type) -> %return.param: %C {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_41.1: %empty_struct_type = struct_literal ()
+138 -30
View File
@@ -72,6 +72,13 @@ class X(U:! type) {
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %Param.elem: type = unbound_element_type %Param, %i32 [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.2b9: <witness> = impl_witness @Param.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.756: type = ptr_type %Param [concrete]
// CHECK:STDOUT: %pattern_type.fae: type = pattern_type %ptr.756 [concrete]
// CHECK:STDOUT: %Param.as.Destroy.impl.Op.type: type = fn_type @Param.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %Param.as.Destroy.impl.Op: %Param.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %struct_type.x.ed6: type = struct_type {.x: %i32} [concrete]
// CHECK:STDOUT: %complete_type.1ec: <witness> = complete_type_witness %struct_type.x.ed6 [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
@@ -86,6 +93,11 @@ class X(U:! type) {
// CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F [concrete]
// CHECK:STDOUT: %C.as.HasF.impl.F: %C.as.HasF.impl.F.type = struct_value () [concrete]
// CHECK:STDOUT: %HasF.facet: %HasF.type.b18 = facet_value %C, (%HasF.impl_witness) [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.edd: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
@@ -112,30 +124,25 @@ class X(U:! type) {
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
// CHECK:STDOUT: %.22c: type = fn_type_with_self_type %HasF.F.type.7f1, %HasF.facet [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.70d: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%Param) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.e46: %T.as.Destroy.impl.Op.type.70d = struct_value () [concrete]
// CHECK:STDOUT: %ptr.756: type = ptr_type %Param [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.022: <specific function> = specific_function %T.as.Destroy.impl.Op.e46, @T.as.Destroy.impl.Op(%Param) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.a17: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%i32) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.e6a: %T.as.Destroy.impl.Op.type.a17 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.014: <specific function> = specific_function %T.as.Destroy.impl.Op.e6a, @T.as.Destroy.impl.Op(%i32) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.e6a, @T.as.Destroy.impl.Op(%i32) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// 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.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
// CHECK:STDOUT: %Core.import_ref.a5b: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -196,6 +203,22 @@ class X(U:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @Param.as.Destroy.impl: constants.%Param as constants.%Destroy.type {
// CHECK:STDOUT: %Param.as.Destroy.impl.Op.decl: %Param.as.Destroy.impl.Op.type = fn_decl @Param.as.Destroy.impl.Op [concrete = constants.%Param.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.fae = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.fae = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc8: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.756 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Param [concrete = constants.%Param]
// CHECK:STDOUT: %self: %ptr.756 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %Param.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @Param.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.HasF.impl: %Self.ref as %HasF.type {
// CHECK:STDOUT: %C.as.HasF.impl.F.decl: %C.as.HasF.impl.F.type = fn_decl @C.as.HasF.impl.F [concrete = constants.%C.as.HasF.impl.F] {
// CHECK:STDOUT: %return.patt: %pattern_type.b01 = return_slot_pattern [concrete]
@@ -212,10 +235,29 @@ class X(U:! type) {
// CHECK:STDOUT: witness = @C.%HasF.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc12: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Param {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: %.loc9: %Param.elem = field_decl x, element0 [concrete]
// CHECK:STDOUT: impl_decl @Param.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Param.as.Destroy.impl.%Param.as.Destroy.impl.Op.decl), @Param.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.2b9]
// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [concrete = constants.%struct_type.x.ed6]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.x [concrete = constants.%complete_type.1ec]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -234,6 +276,9 @@ class X(U:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@C.as.HasF.impl.%C.as.HasF.impl.F.decl), @C.as.HasF.impl [concrete]
// CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness]
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.edd]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -253,6 +298,8 @@ class X(U:! type) {
// CHECK:STDOUT: fn() -> @HasF.F.%T (%T);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Param.as.Destroy.impl.Op(%self.param: %ptr.756) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.HasF.impl.F() -> %return.param: %Param {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
@@ -270,6 +317,8 @@ class X(U:! type) {
// CHECK:STDOUT: return %.loc15_22 to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @G(%c.param: %C) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: name_binding_decl {
@@ -311,21 +360,17 @@ class X(U:! type) {
// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc22_20: <bound method> = bound_method %.loc22_20.1, constants.%T.as.Destroy.impl.Op.e46
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.e46, @T.as.Destroy.impl.Op(constants.%Param) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.022]
// CHECK:STDOUT: %bound_method.loc22_20: <bound method> = bound_method %.loc22_20.1, %T.as.Destroy.impl.Op.specific_fn.1
// CHECK:STDOUT: %Param.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %.loc22_20.1, constants.%Param.as.Destroy.impl.Op
// CHECK:STDOUT: %addr.loc22_20: %ptr.756 = addr_of %.loc22_20.1
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc22_20: init %empty_tuple.type = call %bound_method.loc22_20(%addr.loc22_20)
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc22_3: <bound method> = bound_method %b.var, constants.%T.as.Destroy.impl.Op.e6a
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.e6a, @T.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.014]
// CHECK:STDOUT: %bound_method.loc22_3: <bound method> = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn.2
// CHECK:STDOUT: %Param.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %Param.as.Destroy.impl.Op.bound.loc22(%addr.loc22_20)
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %b.var, constants.%T.as.Destroy.impl.Op.e6a
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.e6a, @T.as.Destroy.impl.Op(constants.%i32) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %b.var, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %addr.loc22_3: %ptr.235 = addr_of %b.var
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc22_3: init %empty_tuple.type = call %bound_method.loc22_3(%addr.loc22_3)
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc21: <bound method> = bound_method %.loc21_20.1, constants.%T.as.Destroy.impl.Op.e46
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.3: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.e46, @T.as.Destroy.impl.Op(constants.%Param) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.022]
// CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %.loc21_20.1, %T.as.Destroy.impl.Op.specific_fn.3
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc22_3)
// CHECK:STDOUT: %Param.as.Destroy.impl.Op.bound.loc21: <bound method> = bound_method %.loc21_20.1, constants.%Param.as.Destroy.impl.Op
// CHECK:STDOUT: %addr.loc21: %ptr.756 = addr_of %.loc21_20.1
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21)
// CHECK:STDOUT: %Param.as.Destroy.impl.Op.call.loc21: init %empty_tuple.type = call %Param.as.Destroy.impl.Op.bound.loc21(%addr.loc21)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -364,8 +409,8 @@ class X(U:! type) {
// CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete]
// CHECK:STDOUT: %I.type.325e65.1: type = facet_type <@I, @I(%T)> [symbolic]
// CHECK:STDOUT: %Self.209206.1: %I.type.325e65.1 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.209206.1 [symbolic]
// CHECK:STDOUT: %pattern_type.4be: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.as_type.928: type = facet_access_type %Self.209206.1 [symbolic]
// CHECK:STDOUT: %pattern_type.4be: type = pattern_type %Self.as_type.928 [symbolic]
// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic]
// CHECK:STDOUT: %I.F.type.2aef59.1: type = fn_type @I.F, @I(%T) [symbolic]
// CHECK:STDOUT: %I.F.bb2dd4.1: %I.F.type.2aef59.1 = struct_value () [symbolic]
@@ -388,6 +433,13 @@ class X(U:! type) {
// CHECK:STDOUT: %X.as.I.impl.F.type: type = fn_type @X.as.I.impl.F, @X.as.I.impl(%U) [symbolic]
// CHECK:STDOUT: %X.as.I.impl.F: %X.as.I.impl.F.type = struct_value () [symbolic]
// CHECK:STDOUT: %I.facet: %I.type.325e65.2 = facet_value %X, (%I.impl_witness) [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @X.%Destroy.impl_witness_table, @X.as.Destroy.impl(%U) [symbolic]
// CHECK:STDOUT: %ptr.428: type = ptr_type %X [symbolic]
// CHECK:STDOUT: %pattern_type.d72: type = pattern_type %ptr.428 [symbolic]
// CHECK:STDOUT: %X.as.Destroy.impl.Op.type: type = fn_type @X.as.Destroy.impl.Op, @X.as.Destroy.impl(%U) [symbolic]
// CHECK:STDOUT: %X.as.Destroy.impl.Op: %X.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %require_complete.441: <witness> = require_complete_type %X [symbolic]
@@ -396,9 +448,11 @@ class X(U:! type) {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -439,14 +493,14 @@ class X(U:! type) {
// CHECK:STDOUT: %t.patt: @I.F.%pattern_type.loc5_20 (%pattern_type.7dcd0a.1) = binding_pattern t [concrete]
// CHECK:STDOUT: %t.param_patt: @I.F.%pattern_type.loc5_20 (%pattern_type.7dcd0a.1) = value_param_pattern %t.patt, call_param1 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @I.F.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %self.param: @I.F.%Self.as_type.loc5_14.1 (%Self.as_type.928) = value_param call_param0
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.928)] {
// CHECK:STDOUT: %.loc5_14.2: @I.F.%I.type (%I.type.325e65.1) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self.209206.1)]
// CHECK:STDOUT: %Self.ref: @I.F.%I.type (%I.type.325e65.1) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.209206.1)]
// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.928)]
// CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.928)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @I.F.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param
// CHECK:STDOUT: %self: @I.F.%Self.as_type.loc5_14.1 (%Self.as_type.928) = bind_name self, %self.param
// CHECK:STDOUT: %t.param: @I.F.%T (%T) = value_param call_param1
// CHECK:STDOUT: %T.ref: type = name_ref T, @I.%T.loc4_13.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %t: @I.F.%T (%T) = bind_name t, %t.param
@@ -498,6 +552,34 @@ class X(U:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @X.as.Destroy.impl(@X.%U.loc8_9.2: type) {
// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @X.%Destroy.impl_witness_table, @X.as.Destroy.impl(%U) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %X.as.Destroy.impl.Op.type: type = fn_type @X.as.Destroy.impl.Op, @X.as.Destroy.impl(%U) [symbolic = %X.as.Destroy.impl.Op.type (constants.%X.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %X.as.Destroy.impl.Op: @X.as.Destroy.impl.%X.as.Destroy.impl.Op.type (%X.as.Destroy.impl.Op.type) = struct_value () [symbolic = %X.as.Destroy.impl.Op (constants.%X.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%X as constants.%Destroy.type {
// CHECK:STDOUT: %X.as.Destroy.impl.Op.decl: @X.as.Destroy.impl.%X.as.Destroy.impl.Op.type (%X.as.Destroy.impl.Op.type) = fn_decl @X.as.Destroy.impl.Op [symbolic = @X.as.Destroy.impl.%X.as.Destroy.impl.Op (constants.%X.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @X.as.Destroy.impl.Op.%pattern_type (%pattern_type.d72) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @X.as.Destroy.impl.Op.%pattern_type (%pattern_type.d72) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc8_19.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @X.as.Destroy.impl.Op.%ptr (%ptr.428) = value_param call_param0
// CHECK:STDOUT: %.loc8_19.2: type = splice_block %Self.ref [symbolic = %X (constants.%X)] {
// CHECK:STDOUT: %.loc8_19.3: type = specific_constant constants.%X, @X(constants.%U) [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc8_19.3 [symbolic = %X (constants.%X)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @X.as.Destroy.impl.Op.%ptr (%ptr.428) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %X.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @X.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic class @X(%U.loc8_9.2: type) {
// CHECK:STDOUT: %U.loc8_9.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc8_9.1 (constants.%U)]
// CHECK:STDOUT:
@@ -515,6 +597,9 @@ class X(U:! type) {
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@X.as.I.impl.%X.as.I.impl.F.decl), @X.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table, @X.as.I.impl(constants.%U) [symbolic = @X.as.I.impl.%I.impl_witness (constants.%I.impl_witness)]
// CHECK:STDOUT: %.loc9: type = specific_constant @X.as.I.impl.%I.type.loc9_21.2, @X.as.I.impl(constants.%U) [symbolic = %I.type (constants.%I.type.325e65.2)]
// CHECK:STDOUT: impl_decl @X.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@X.as.Destroy.impl.%X.as.Destroy.impl.Op.decl), @X.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @X.as.Destroy.impl(constants.%U) [symbolic = @X.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -531,11 +616,11 @@ class X(U:! type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.325e65.1)]
// CHECK:STDOUT: %Self: @I.F.%I.type (%I.type.325e65.1) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.209206.1)]
// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.928)]
// CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.4be)]
// CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %T [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.7dcd0a.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @I.F.%Self.as_type.loc5_14.1 (%Self.as_type), %t.param: @I.F.%T (%T));
// CHECK:STDOUT: fn(%self.param: @I.F.%Self.as_type.loc5_14.1 (%Self.as_type.928), %t.param: @I.F.%T (%T));
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @X.as.I.impl.F(@X.%U.loc8_9.2: type) {
@@ -556,6 +641,17 @@ class X(U:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @X.as.Destroy.impl.Op(@X.%U.loc8_9.2: type) {
// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %ptr: type = ptr_type %X [symbolic = %ptr (constants.%ptr.428)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.d72)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @X.as.Destroy.impl.Op.%ptr (%ptr.428)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I(constants.%T) {
// CHECK:STDOUT: %T.loc4_13.1 => constants.%T
// CHECK:STDOUT: }
@@ -564,7 +660,7 @@ class X(U:! type) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %I.type => constants.%I.type.325e65.1
// CHECK:STDOUT: %Self => constants.%Self.209206.1
// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type
// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.928
// CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.4be
// CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.7dcd0a.1
// CHECK:STDOUT: }
@@ -619,3 +715,15 @@ class X(U:! type) {
// CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.7dcd0a.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @X.as.Destroy.impl(constants.%U) {
// CHECK:STDOUT: %U => constants.%U
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @X.as.Destroy.impl.Op(constants.%U) {
// CHECK:STDOUT: %U => constants.%U
// CHECK:STDOUT: %X => constants.%X
// CHECK:STDOUT: %ptr => constants.%ptr.428
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d72
// CHECK:STDOUT: }
// CHECK:STDOUT:
+32 -11
View File
@@ -180,17 +180,19 @@ fn F() {
// CHECK:STDOUT: %Point.as.Z.impl.Zero.type: type = fn_type @Point.as.Z.impl.Zero [concrete]
// CHECK:STDOUT: %Point.as.Z.impl.Zero: %Point.as.Z.impl.Zero.type = struct_value () [concrete]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point, (%Z.impl_witness) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.e19: <witness> = impl_witness @Point.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.536: type = ptr_type %Point [concrete]
// CHECK:STDOUT: %pattern_type.bbc: type = pattern_type %ptr.536 [concrete]
// CHECK:STDOUT: %Point.as.Destroy.impl.Op.type: type = fn_type @Point.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %Point.as.Destroy.impl.Op: %Point.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %Point.val: %Point = struct_value () [concrete]
// CHECK:STDOUT: %.766: type = fn_type_with_self_type %Z.Zero.type, %Z.facet [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.003: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%Point) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.d2d: %T.as.Destroy.impl.Op.type.003 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.536: type = ptr_type %Point [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.d2d, @T.as.Destroy.impl.Op(%Point) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -253,6 +255,22 @@ fn F() {
// CHECK:STDOUT: witness = @Point.%Z.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @Point.as.Destroy.impl: constants.%Point as constants.%Destroy.type {
// CHECK:STDOUT: %Point.as.Destroy.impl.Op.decl: %Point.as.Destroy.impl.Op.type = fn_decl @Point.as.Destroy.impl.Op [concrete = constants.%Point.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.bbc = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.bbc = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc15: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.536 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Point [concrete = constants.%Point]
// CHECK:STDOUT: %self: %ptr.536 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %Point.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @Point.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Point {
// CHECK:STDOUT: impl_decl @Point.as.Z.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Point [concrete = constants.%Point]
@@ -260,8 +278,11 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (@Point.as.Z.impl.%Point.as.Z.impl.Zero.decl), @Point.as.Z.impl [concrete]
// CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table [concrete = constants.%Z.impl_witness]
// CHECK:STDOUT: impl_decl @Point.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Point.as.Destroy.impl.%Point.as.Destroy.impl.Op.decl), @Point.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e19]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
@@ -289,6 +310,8 @@ fn F() {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Point.as.Destroy.impl.Op(%self.param: %ptr.536) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc25_5.1: %empty_struct_type = struct_literal ()
@@ -300,11 +323,9 @@ fn F() {
// CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0.534]
// CHECK:STDOUT: %impl.elem0: %.766 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Point.as.Z.impl.Zero]
// CHECK:STDOUT: %Point.as.Z.impl.Zero.call: init %empty_tuple.type = call %impl.elem0()
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc25_5.2, constants.%T.as.Destroy.impl.Op.d2d
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.d2d, @T.as.Destroy.impl.Op(constants.%Point) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc25_5.2, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %Point.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc25_5.2, constants.%Point.as.Destroy.impl.Op
// CHECK:STDOUT: %addr: %ptr.536 = addr_of %.loc25_5.2
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: %Point.as.Destroy.impl.Op.call: init %empty_tuple.type = call %Point.as.Destroy.impl.Op.bound(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -52,28 +52,47 @@ class E {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %I.impl_witness.bf7: <witness> = impl_witness @C.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.edd: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %D: type = class_type @D [concrete]
// CHECK:STDOUT: %I.impl_witness.fa5: <witness> = impl_witness @D.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.73d: <witness> = impl_witness @D.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete]
// CHECK:STDOUT: %pattern_type.a94: type = pattern_type %ptr.19c [concrete]
// CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %E: type = class_type @E [concrete]
// CHECK:STDOUT: %I.impl_witness.7f3: <witness> = impl_witness @E.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.c1f: <witness> = impl_witness @E.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.742: type = ptr_type %E [concrete]
// CHECK:STDOUT: %pattern_type.88c: type = pattern_type %ptr.742 [concrete]
// CHECK:STDOUT: %E.as.Destroy.impl.Op.type: type = fn_type @E.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %E.as.Destroy.impl.Op: %E.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -92,7 +111,7 @@ class E {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -104,13 +123,61 @@ class E {
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc17: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @D.as.I.impl: %D.ref as %I.ref;
// CHECK:STDOUT:
// CHECK:STDOUT: impl @D.as.Destroy.impl: constants.%D as constants.%Destroy.type {
// CHECK:STDOUT: %D.as.Destroy.impl.Op.decl: %D.as.Destroy.impl.Op.type = fn_decl @D.as.Destroy.impl.Op [concrete = constants.%D.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.a94 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.a94 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc25: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.19c = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D [concrete = constants.%D]
// CHECK:STDOUT: %self: %ptr.19c = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %D.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @D.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @E.as.I.impl: %Self.ref as %I.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = @E.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @E.as.Destroy.impl: constants.%E as constants.%Destroy.type {
// CHECK:STDOUT: %E.as.Destroy.impl.Op.decl: %E.as.Destroy.impl.Op.type = fn_decl @E.as.Destroy.impl.Op [concrete = constants.%E.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.88c = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.88c = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc36: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.742 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
// CHECK:STDOUT: %self: %ptr.742 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %E.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @E.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @i32.as.I.impl [concrete] {} {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
@@ -119,6 +186,9 @@ class E {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @i32.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.bf7]
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.edd]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -136,6 +206,9 @@ class E {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @D.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.fa5]
// CHECK:STDOUT: impl_decl @D.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@D.as.Destroy.impl.%D.as.Destroy.impl.Op.decl), @D.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.73d]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -154,6 +227,9 @@ class E {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @E.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.7f3]
// CHECK:STDOUT: impl_decl @E.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@E.as.Destroy.impl.%E.as.Destroy.impl.Op.decl), @E.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.c1f]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -164,3 +240,9 @@ class E {
// CHECK:STDOUT: extend @E.as.I.impl.%I.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @D.as.Destroy.impl.Op(%self.param: %ptr.19c) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @E.as.Destroy.impl.Op(%self.param: %ptr.742) = "no_op";
// CHECK:STDOUT:
@@ -28,6 +28,13 @@ class C {
// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
@@ -35,10 +42,12 @@ class C {
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -52,12 +61,31 @@ class C {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.<error>.impl: %Self.ref as %i32;
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc15: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.<error>.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -68,3 +96,5 @@ class C {
// CHECK:STDOUT: has_error
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
+64 -13
View File
@@ -247,18 +247,20 @@ class X {
// CHECK:STDOUT: %Point.as.Z.impl.Method.type: type = fn_type @Point.as.Z.impl.Method [concrete]
// CHECK:STDOUT: %Point.as.Z.impl.Method: %Point.as.Z.impl.Method.type = struct_value () [concrete]
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point, (%Z.impl_witness) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.e19: <witness> = impl_witness @Point.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.536: type = ptr_type %Point [concrete]
// CHECK:STDOUT: %pattern_type.bbc: type = pattern_type %ptr.536 [concrete]
// CHECK:STDOUT: %Point.as.Destroy.impl.Op.type: type = fn_type @Point.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %Point.as.Destroy.impl.Op: %Point.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %.d52: type = fn_type_with_self_type %Z.Zero.type, %Z.facet [concrete]
// CHECK:STDOUT: %Point.val: %Point = struct_value () [concrete]
// CHECK:STDOUT: %.462: type = fn_type_with_self_type %Z.Method.type, %Z.facet [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.003: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%Point) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.d2d: %T.as.Destroy.impl.Op.type.003 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.536: type = ptr_type %Point [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.d2d, @T.as.Destroy.impl.Op(%Point) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -359,6 +361,22 @@ class X {
// CHECK:STDOUT: witness = @Point.%Z.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @Point.as.Destroy.impl: constants.%Point as constants.%Destroy.type {
// CHECK:STDOUT: %Point.as.Destroy.impl.Op.decl: %Point.as.Destroy.impl.Op.type = fn_decl @Point.as.Destroy.impl.Op [concrete = constants.%Point.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.bbc = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.bbc = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc17: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.536 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Point [concrete = constants.%Point]
// CHECK:STDOUT: %self: %ptr.536 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %Point.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @Point.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Point {
// CHECK:STDOUT: impl_decl @Point.as.Z.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Point [concrete = constants.%Point]
@@ -366,8 +384,11 @@ class X {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (@Point.as.Z.impl.%Point.as.Z.impl.Zero.decl, @Point.as.Z.impl.%Point.as.Z.impl.Method.decl), @Point.as.Z.impl [concrete]
// CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table [concrete = constants.%Z.impl_witness]
// CHECK:STDOUT: impl_decl @Point.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Point.as.Destroy.impl.%Point.as.Destroy.impl.Op.decl), @Point.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.e19]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
@@ -420,6 +441,8 @@ class X {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Point.as.Destroy.impl.Op(%self.param: %ptr.536) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Point.ref.loc28: type = name_ref Point, file.%Point.decl [concrete = constants.%Point]
@@ -438,14 +461,12 @@ class X {
// CHECK:STDOUT: %Z.ref.loc29: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
// CHECK:STDOUT: %Method.ref: %Z.assoc_type = name_ref Method, @Z.%assoc1 [concrete = constants.%assoc1]
// CHECK:STDOUT: %impl.elem1: %.462 = impl_witness_access constants.%Z.impl_witness, element1 [concrete = constants.%Point.as.Z.impl.Method]
// CHECK:STDOUT: %bound_method.loc29_16: <bound method> = bound_method %.loc29_7.1, %impl.elem1
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc29_7.1, %impl.elem1
// CHECK:STDOUT: %.loc29_7.2: %Point = bind_value %.loc29_7.1
// CHECK:STDOUT: %Point.as.Z.impl.Method.call: init %empty_tuple.type = call %bound_method.loc29_16(%.loc29_7.2)
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc29_5.2, constants.%T.as.Destroy.impl.Op.d2d
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.d2d, @T.as.Destroy.impl.Op(constants.%Point) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc29_5: <bound method> = bound_method %.loc29_5.2, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %Point.as.Z.impl.Method.call: init %empty_tuple.type = call %bound_method(%.loc29_7.2)
// CHECK:STDOUT: %Point.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc29_5.2, constants.%Point.as.Destroy.impl.Op
// CHECK:STDOUT: %addr: %ptr.536 = addr_of %.loc29_5.2
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc29_5(%addr)
// CHECK:STDOUT: %Point.as.Destroy.impl.Op.call: init %empty_tuple.type = call %Point.as.Destroy.impl.Op.bound(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -501,15 +522,24 @@ class X {
// CHECK:STDOUT: %X.as.A.impl.B.type: type = fn_type @X.as.A.impl.B [concrete]
// CHECK:STDOUT: %X.as.A.impl.B: %X.as.A.impl.B.type = struct_value () [concrete]
// CHECK:STDOUT: %A.facet: %A.type = facet_value %X, (%A.impl_witness) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @X.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.d17: type = ptr_type %X [concrete]
// CHECK:STDOUT: %pattern_type.1c6: type = pattern_type %ptr.d17 [concrete]
// CHECK:STDOUT: %X.as.Destroy.impl.Op.type: type = fn_type @X.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %X.as.Destroy.impl.Op: %X.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -564,6 +594,22 @@ class X {
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @X.as.Destroy.impl: constants.%X as constants.%Destroy.type {
// CHECK:STDOUT: %X.as.Destroy.impl.Op.decl: %X.as.Destroy.impl.Op.type = fn_decl @X.as.Destroy.impl.Op [concrete = constants.%X.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.1c6 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.1c6 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc11: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.d17 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X [concrete = constants.%X]
// CHECK:STDOUT: %self: %ptr.d17 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %X.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @X.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @X {
// CHECK:STDOUT: impl_decl @X.as.A.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X [concrete = constants.%X]
@@ -571,6 +617,9 @@ class X {
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@X.as.A.impl.%X.as.A.impl.B.decl), @X.as.A.impl [concrete]
// CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
// CHECK:STDOUT: impl_decl @X.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@X.as.Destroy.impl.%X.as.Destroy.impl.Op.decl), @X.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -598,6 +647,8 @@ class X {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @X.as.Destroy.impl.Op(%self.param: %ptr.d17) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.B(constants.%Self.31d) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.B(constants.%A.facet) {}
+370 -13
View File
@@ -252,15 +252,32 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %assoc0.82e: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete]
// CHECK:STDOUT: %NoF: type = class_type @NoF [concrete]
// CHECK:STDOUT: %I.impl_witness.901: <witness> = impl_witness @NoF.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.9b3: <witness> = impl_witness @NoF.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.0f9: type = ptr_type %NoF [concrete]
// CHECK:STDOUT: %pattern_type.7b5: type = pattern_type %ptr.0f9 [concrete]
// CHECK:STDOUT: %NoF.as.Destroy.impl.Op.type: type = fn_type @NoF.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %NoF.as.Destroy.impl.Op: %NoF.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %FNotFunction: type = class_type @FNotFunction [concrete]
// CHECK:STDOUT: %I.impl_witness.44e: <witness> = impl_witness @FNotFunction.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %F: type = class_type @F [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.f9b: <witness> = impl_witness @FNotFunction.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.2b2: type = ptr_type %FNotFunction [concrete]
// CHECK:STDOUT: %pattern_type.27c: type = pattern_type %ptr.2b2 [concrete]
// CHECK:STDOUT: %FNotFunction.as.Destroy.impl.Op.type: type = fn_type @FNotFunction.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FNotFunction.as.Destroy.impl.Op: %FNotFunction.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [concrete]
// CHECK:STDOUT: %PossiblyF: %PossiblyF.type = struct_value () [concrete]
// CHECK:STDOUT: %FAlias: type = class_type @FAlias [concrete]
// CHECK:STDOUT: %I.impl_witness.c80: <witness> = impl_witness @FAlias.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.740: <witness> = impl_witness @FAlias.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.4bf: type = ptr_type %FAlias [concrete]
// CHECK:STDOUT: %pattern_type.310: type = pattern_type %ptr.4bf [concrete]
// CHECK:STDOUT: %FAlias.as.Destroy.impl.Op.type: type = fn_type @FAlias.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FAlias.as.Destroy.impl.Op: %FAlias.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %FExtraParam: type = class_type @FExtraParam [concrete]
// CHECK:STDOUT: %I.impl_witness.1f3: <witness> = impl_witness @FExtraParam.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
@@ -271,6 +288,11 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %I.facet.fa4: %I.type = facet_value %FExtraParam, (%I.impl_witness.1f3) [concrete]
// CHECK:STDOUT: %FExtraParam.as.I.impl.F.type.44ef8c.2: type = fn_type @FExtraParam.as.I.impl.F.loc69_18.2 [concrete]
// CHECK:STDOUT: %FExtraParam.as.I.impl.F.424e9e.2: %FExtraParam.as.I.impl.F.type.44ef8c.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.44a: <witness> = impl_witness @FExtraParam.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.0f2: type = ptr_type %FExtraParam [concrete]
// CHECK:STDOUT: %pattern_type.8d3: type = pattern_type %ptr.0f2 [concrete]
// CHECK:STDOUT: %FExtraParam.as.Destroy.impl.Op.type: type = fn_type @FExtraParam.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FExtraParam.as.Destroy.impl.Op: %FExtraParam.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [concrete]
// CHECK:STDOUT: %I.impl_witness.a7b: <witness> = impl_witness @FExtraImplicitParam.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %pattern_type.8ae: type = pattern_type %FExtraImplicitParam [concrete]
@@ -279,11 +301,21 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %I.facet.ee5: %I.type = facet_value %FExtraImplicitParam, (%I.impl_witness.a7b) [concrete]
// CHECK:STDOUT: %FExtraImplicitParam.as.I.impl.F.type.e1abdd.2: type = fn_type @FExtraImplicitParam.as.I.impl.F.loc85_23.2 [concrete]
// CHECK:STDOUT: %FExtraImplicitParam.as.I.impl.F.6ff574.2: %FExtraImplicitParam.as.I.impl.F.type.e1abdd.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.a05: <witness> = impl_witness @FExtraImplicitParam.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.8c7: type = ptr_type %FExtraImplicitParam [concrete]
// CHECK:STDOUT: %pattern_type.ab8: type = pattern_type %ptr.8c7 [concrete]
// CHECK:STDOUT: %FExtraImplicitParam.as.Destroy.impl.Op.type: type = fn_type @FExtraImplicitParam.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FExtraImplicitParam.as.Destroy.impl.Op: %FExtraImplicitParam.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [concrete]
// CHECK:STDOUT: %I.impl_witness.59a: <witness> = impl_witness @FExtraReturnType.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %FExtraReturnType.as.I.impl.F.type: type = fn_type @FExtraReturnType.as.I.impl.F [concrete]
// CHECK:STDOUT: %FExtraReturnType.as.I.impl.F: %FExtraReturnType.as.I.impl.F.type = struct_value () [concrete]
// CHECK:STDOUT: %I.facet.d5c: %I.type = facet_value %FExtraReturnType, (%I.impl_witness.59a) [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.3ea: <witness> = impl_witness @FExtraReturnType.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.147: type = ptr_type %FExtraReturnType [concrete]
// CHECK:STDOUT: %pattern_type.f1c: type = pattern_type %ptr.147 [concrete]
// CHECK:STDOUT: %FExtraReturnType.as.Destroy.impl.Op.type: type = fn_type @FExtraReturnType.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FExtraReturnType.as.Destroy.impl.Op: %FExtraReturnType.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
// CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
@@ -297,6 +329,11 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %J.facet.94c: %J.type = facet_value %FMissingParam, (%J.impl_witness.4e9) [concrete]
// CHECK:STDOUT: %FMissingParam.as.J.impl.F.type.69596c.2: type = fn_type @FMissingParam.as.J.impl.F.loc117_31.2 [concrete]
// CHECK:STDOUT: %FMissingParam.as.J.impl.F.738f31.2: %FMissingParam.as.J.impl.F.type.69596c.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.672: <witness> = impl_witness @FMissingParam.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.fc8: type = ptr_type %FMissingParam [concrete]
// CHECK:STDOUT: %pattern_type.c8f: type = pattern_type %ptr.fc8 [concrete]
// CHECK:STDOUT: %FMissingParam.as.Destroy.impl.Op.type: type = fn_type @FMissingParam.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FMissingParam.as.Destroy.impl.Op: %FMissingParam.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [concrete]
// CHECK:STDOUT: %J.impl_witness.841: <witness> = impl_witness @FMissingImplicitParam.%J.impl_witness_table [concrete]
// CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.type.d97cef.1: type = fn_type @FMissingImplicitParam.as.J.impl.F.loc130_26.1 [concrete]
@@ -304,6 +341,11 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %J.facet.e7e: %J.type = facet_value %FMissingImplicitParam, (%J.impl_witness.841) [concrete]
// CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.type.d97cef.2: type = fn_type @FMissingImplicitParam.as.J.impl.F.loc130_26.2 [concrete]
// CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.01de92.2: %FMissingImplicitParam.as.J.impl.F.type.d97cef.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.ae6: <witness> = impl_witness @FMissingImplicitParam.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.c3c: type = ptr_type %FMissingImplicitParam [concrete]
// CHECK:STDOUT: %pattern_type.575: type = pattern_type %ptr.c3c [concrete]
// CHECK:STDOUT: %FMissingImplicitParam.as.Destroy.impl.Op.type: type = fn_type @FMissingImplicitParam.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FMissingImplicitParam.as.Destroy.impl.Op: %FMissingImplicitParam.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [concrete]
// CHECK:STDOUT: %J.impl_witness.e75: <witness> = impl_witness @FMissingReturnType.%J.impl_witness_table [concrete]
// CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.type.123d7a.1: type = fn_type @FMissingReturnType.as.J.impl.F.loc152_30.1 [concrete]
@@ -311,6 +353,11 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %J.facet.974: %J.type = facet_value %FMissingReturnType, (%J.impl_witness.e75) [concrete]
// CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.type.123d7a.2: type = fn_type @FMissingReturnType.as.J.impl.F.loc152_30.2 [concrete]
// CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.c7d02d.2: %FMissingReturnType.as.J.impl.F.type.123d7a.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.8d8: <witness> = impl_witness @FMissingReturnType.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.41e: type = ptr_type %FMissingReturnType [concrete]
// CHECK:STDOUT: %pattern_type.585: type = pattern_type %ptr.41e [concrete]
// CHECK:STDOUT: %FMissingReturnType.as.Destroy.impl.Op.type: type = fn_type @FMissingReturnType.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FMissingReturnType.as.Destroy.impl.Op: %FMissingReturnType.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
// CHECK:STDOUT: %FDifferentParamType: type = class_type @FDifferentParamType [concrete]
@@ -321,6 +368,11 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %J.facet.37e: %J.type = facet_value %FDifferentParamType, (%J.impl_witness.cbe) [concrete]
// CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.type.6b537d.2: type = fn_type @FDifferentParamType.as.J.impl.F.loc171_38.2 [concrete]
// CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.04313a.2: %FDifferentParamType.as.J.impl.F.type.6b537d.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.443: <witness> = impl_witness @FDifferentParamType.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.f1f: type = ptr_type %FDifferentParamType [concrete]
// CHECK:STDOUT: %pattern_type.e0c: type = pattern_type %ptr.f1f [concrete]
// CHECK:STDOUT: %FDifferentParamType.as.Destroy.impl.Op.type: type = fn_type @FDifferentParamType.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FDifferentParamType.as.Destroy.impl.Op: %FDifferentParamType.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [concrete]
// CHECK:STDOUT: %J.impl_witness.af2: <witness> = impl_witness @FDifferentImplicitParamType.%J.impl_witness_table [concrete]
// CHECK:STDOUT: %pattern_type.9cc: type = pattern_type %FDifferentImplicitParamType [concrete]
@@ -329,6 +381,11 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %J.facet.bf1: %J.type = facet_value %FDifferentImplicitParamType, (%J.impl_witness.af2) [concrete]
// CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.type.d6232a.2: type = fn_type @FDifferentImplicitParamType.as.J.impl.F.loc184_38.2 [concrete]
// CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.886f70.2: %FDifferentImplicitParamType.as.J.impl.F.type.d6232a.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.c2a: <witness> = impl_witness @FDifferentImplicitParamType.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.dc5: type = ptr_type %FDifferentImplicitParamType [concrete]
// CHECK:STDOUT: %pattern_type.986: type = pattern_type %ptr.dc5 [concrete]
// CHECK:STDOUT: %FDifferentImplicitParamType.as.Destroy.impl.Op.type: type = fn_type @FDifferentImplicitParamType.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FDifferentImplicitParamType.as.Destroy.impl.Op: %FDifferentImplicitParamType.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [concrete]
// CHECK:STDOUT: %J.impl_witness.bc1: <witness> = impl_witness @FDifferentReturnType.%J.impl_witness_table [concrete]
// CHECK:STDOUT: %pattern_type.8ee: type = pattern_type %FDifferentReturnType [concrete]
@@ -337,11 +394,11 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %J.facet.67f: %J.type = facet_value %FDifferentReturnType, (%J.impl_witness.bc1) [concrete]
// CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.type.d3b58f.2: type = fn_type @FDifferentReturnType.as.J.impl.F.loc200_38.2 [concrete]
// CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.be86c9.2: %FDifferentReturnType.as.J.impl.F.type.d3b58f.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.3d3: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%FDifferentReturnType) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.ddd: %T.as.Destroy.impl.Op.type.3d3 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.6d2: <witness> = impl_witness @FDifferentReturnType.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.954: type = ptr_type %FDifferentReturnType [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.b4b: <specific function> = specific_function %T.as.Destroy.impl.Op.ddd, @T.as.Destroy.impl.Op(%FDifferentReturnType) [concrete]
// CHECK:STDOUT: %pattern_type.246: type = pattern_type %ptr.954 [concrete]
// CHECK:STDOUT: %FDifferentReturnType.as.Destroy.impl.Op.type: type = fn_type @FDifferentReturnType.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %FDifferentReturnType.as.Destroy.impl.Op: %FDifferentReturnType.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete]
// CHECK:STDOUT: %Self.2ff: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.as_type.e1e: type = facet_access_type %Self.2ff [symbolic]
@@ -377,10 +434,14 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %pattern_type.a5c: type = pattern_type %tuple.type.9c9 [concrete]
// CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.type.f90165.2: type = fn_type @SelfNestedBadParam.as.SelfNested.impl.F.loc223_87.2 [concrete]
// CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.fa8d04.2: %SelfNestedBadParam.as.SelfNested.impl.F.type.f90165.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.908: <witness> = impl_witness @SelfNestedBadParam.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %pattern_type.2a7: type = pattern_type %ptr.4cd [concrete]
// CHECK:STDOUT: %SelfNestedBadParam.as.Destroy.impl.Op.type: type = fn_type @SelfNestedBadParam.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %SelfNestedBadParam.as.Destroy.impl.Op: %SelfNestedBadParam.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %ptr.f40: type = ptr_type %array_type.a41 [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.ba3: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%array_type.a41) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.d25: %T.as.Destroy.impl.Op.type.ba3 = struct_value () [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.235: <specific function> = specific_function %T.as.Destroy.impl.Op.d25, @T.as.Destroy.impl.Op(%array_type.a41) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.d25, @T.as.Destroy.impl.Op(%array_type.a41) [concrete]
// CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [concrete]
// CHECK:STDOUT: %SelfNested.impl_witness.d5e: <witness> = impl_witness @SelfNestedBadReturnType.%SelfNested.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.612: type = ptr_type %SelfNestedBadReturnType [concrete]
@@ -394,20 +455,24 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %pattern_type.f56: type = pattern_type %array_type.126 [concrete]
// CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.0e7d1d.2: type = fn_type @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.2 [concrete]
// CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.0bc78a.2: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.0e7d1d.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.9f5: <witness> = impl_witness @SelfNestedBadReturnType.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %pattern_type.4de: type = pattern_type %ptr.612 [concrete]
// CHECK:STDOUT: %SelfNestedBadReturnType.as.Destroy.impl.Op.type: type = fn_type @SelfNestedBadReturnType.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %SelfNestedBadReturnType.as.Destroy.impl.Op: %SelfNestedBadReturnType.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .Bool = %Core.Bool
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: import Core//prelude
// 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.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool]
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -549,6 +614,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @NoF.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @NoF.as.Destroy.impl: constants.%NoF as constants.%Destroy.type {
// CHECK:STDOUT: %NoF.as.Destroy.impl.Op.decl: %NoF.as.Destroy.impl.Op.type = fn_decl @NoF.as.Destroy.impl.Op [concrete = constants.%NoF.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.7b5 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.7b5 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc17: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.0f9 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [concrete = constants.%NoF]
// CHECK:STDOUT: %self: %ptr.0f9 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %NoF.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @NoF.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FNotFunction.as.I.impl: %Self.ref as %I.ref {
// CHECK:STDOUT: %F.decl: type = class_decl @F [concrete = constants.%F] {} {}
// CHECK:STDOUT:
@@ -557,6 +638,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FNotFunction.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FNotFunction.as.Destroy.impl: constants.%FNotFunction as constants.%Destroy.type {
// CHECK:STDOUT: %FNotFunction.as.Destroy.impl.Op.decl: %FNotFunction.as.Destroy.impl.Op.type = fn_decl @FNotFunction.as.Destroy.impl.Op [concrete = constants.%FNotFunction.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.27c = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.27c = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc28: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.2b2 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FNotFunction [concrete = constants.%FNotFunction]
// CHECK:STDOUT: %self: %ptr.2b2 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FNotFunction.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FNotFunction.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FAlias.as.I.impl: %Self.ref as %I.ref {
// CHECK:STDOUT: %PossiblyF.ref: %PossiblyF.type = name_ref PossiblyF, file.%PossiblyF.decl [concrete = constants.%PossiblyF]
// CHECK:STDOUT: %F: %PossiblyF.type = bind_alias F, file.%PossiblyF.decl [concrete = constants.%PossiblyF]
@@ -567,6 +664,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FAlias.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FAlias.as.Destroy.impl: constants.%FAlias as constants.%Destroy.type {
// CHECK:STDOUT: %FAlias.as.Destroy.impl.Op.decl: %FAlias.as.Destroy.impl.Op.type = fn_decl @FAlias.as.Destroy.impl.Op [concrete = constants.%FAlias.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.310 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.310 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc44: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.4bf = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FAlias [concrete = constants.%FAlias]
// CHECK:STDOUT: %self: %ptr.4bf = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FAlias.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FAlias.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FExtraParam.as.I.impl: %Self.ref as %I.ref {
// CHECK:STDOUT: %FExtraParam.as.I.impl.F.decl.loc69_18.1: %FExtraParam.as.I.impl.F.type.44ef8c.1 = fn_decl @FExtraParam.as.I.impl.F.loc69_18.1 [concrete = constants.%FExtraParam.as.I.impl.F.424e9e.1] {
// CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
@@ -587,6 +700,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FExtraParam.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FExtraParam.as.Destroy.impl: constants.%FExtraParam as constants.%Destroy.type {
// CHECK:STDOUT: %FExtraParam.as.Destroy.impl.Op.decl: %FExtraParam.as.Destroy.impl.Op.type = fn_decl @FExtraParam.as.Destroy.impl.Op [concrete = constants.%FExtraParam.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.8d3 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.8d3 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc57: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.0f2 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [concrete = constants.%FExtraParam]
// CHECK:STDOUT: %self: %ptr.0f2 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FExtraParam.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FExtraParam.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FExtraImplicitParam.as.I.impl: %Self.ref as %I.ref {
// CHECK:STDOUT: %FExtraImplicitParam.as.I.impl.F.decl.loc85_23.1: %FExtraImplicitParam.as.I.impl.F.type.e1abdd.1 = fn_decl @FExtraImplicitParam.as.I.impl.F.loc85_23.1 [concrete = constants.%FExtraImplicitParam.as.I.impl.F.6ff574.1] {
// CHECK:STDOUT: %self.patt: %pattern_type.8ae = binding_pattern self [concrete]
@@ -603,6 +732,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FExtraImplicitParam.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FExtraImplicitParam.as.Destroy.impl: constants.%FExtraImplicitParam as constants.%Destroy.type {
// CHECK:STDOUT: %FExtraImplicitParam.as.Destroy.impl.Op.decl: %FExtraImplicitParam.as.Destroy.impl.Op.type = fn_decl @FExtraImplicitParam.as.Destroy.impl.Op [concrete = constants.%FExtraImplicitParam.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.ab8 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.ab8 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc73: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.8c7 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [concrete = constants.%FExtraImplicitParam]
// CHECK:STDOUT: %self: %ptr.8c7 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FExtraImplicitParam.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FExtraImplicitParam.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FExtraReturnType.as.I.impl: %Self.ref as %I.ref {
// CHECK:STDOUT: %FExtraReturnType.as.I.impl.F.decl: %FExtraReturnType.as.I.impl.F.type = fn_decl @FExtraReturnType.as.I.impl.F [concrete = constants.%FExtraReturnType.as.I.impl.F] {
// CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
@@ -620,6 +765,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FExtraReturnType.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FExtraReturnType.as.Destroy.impl: constants.%FExtraReturnType as constants.%Destroy.type {
// CHECK:STDOUT: %FExtraReturnType.as.Destroy.impl.Op.decl: %FExtraReturnType.as.Destroy.impl.Op.type = fn_decl @FExtraReturnType.as.Destroy.impl.Op [concrete = constants.%FExtraReturnType.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.f1c = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.f1c = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc90: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.147 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraReturnType [concrete = constants.%FExtraReturnType]
// CHECK:STDOUT: %self: %ptr.147 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FExtraReturnType.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FExtraReturnType.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FMissingParam.as.J.impl: %Self.ref as %J.ref {
// CHECK:STDOUT: %FMissingParam.as.J.impl.F.decl.loc117_31.1: %FMissingParam.as.J.impl.F.type.69596c.1 = fn_decl @FMissingParam.as.J.impl.F.loc117_31.1 [concrete = constants.%FMissingParam.as.J.impl.F.738f31.1] {
// CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
@@ -661,6 +822,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FMissingParam.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FMissingParam.as.Destroy.impl: constants.%FMissingParam as constants.%Destroy.type {
// CHECK:STDOUT: %FMissingParam.as.Destroy.impl.Op.decl: %FMissingParam.as.Destroy.impl.Op.type = fn_decl @FMissingParam.as.Destroy.impl.Op [concrete = constants.%FMissingParam.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.c8f = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.c8f = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc105: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.fc8 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [concrete = constants.%FMissingParam]
// CHECK:STDOUT: %self: %ptr.fc8 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FMissingParam.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FMissingParam.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FMissingImplicitParam.as.J.impl: %Self.ref as %J.ref {
// CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.decl.loc130_26.1: %FMissingImplicitParam.as.J.impl.F.type.d97cef.1 = fn_decl @FMissingImplicitParam.as.J.impl.F.loc130_26.1 [concrete = constants.%FMissingImplicitParam.as.J.impl.F.01de92.1] {
// CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
@@ -702,6 +879,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FMissingImplicitParam.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FMissingImplicitParam.as.Destroy.impl: constants.%FMissingImplicitParam as constants.%Destroy.type {
// CHECK:STDOUT: %FMissingImplicitParam.as.Destroy.impl.Op.decl: %FMissingImplicitParam.as.Destroy.impl.Op.type = fn_decl @FMissingImplicitParam.as.Destroy.impl.Op [concrete = constants.%FMissingImplicitParam.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.575 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.575 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc121: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.c3c = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [concrete = constants.%FMissingImplicitParam]
// CHECK:STDOUT: %self: %ptr.c3c = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FMissingImplicitParam.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FMissingImplicitParam.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FMissingReturnType.as.J.impl: %Self.ref as %J.ref {
// CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.decl.loc152_30.1: %FMissingReturnType.as.J.impl.F.type.123d7a.1 = fn_decl @FMissingReturnType.as.J.impl.F.loc152_30.1 [concrete = constants.%FMissingReturnType.as.J.impl.F.c7d02d.1] {
// CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
@@ -745,6 +938,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FMissingReturnType.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FMissingReturnType.as.Destroy.impl: constants.%FMissingReturnType as constants.%Destroy.type {
// CHECK:STDOUT: %FMissingReturnType.as.Destroy.impl.Op.decl: %FMissingReturnType.as.Destroy.impl.Op.type = fn_decl @FMissingReturnType.as.Destroy.impl.Op [concrete = constants.%FMissingReturnType.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.585 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.585 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc134: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.41e = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [concrete = constants.%FMissingReturnType]
// CHECK:STDOUT: %self: %ptr.41e = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FMissingReturnType.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FMissingReturnType.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FDifferentParamType.as.J.impl: %Self.ref as %J.ref {
// CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.decl.loc171_38.1: %FDifferentParamType.as.J.impl.F.type.6b537d.1 = fn_decl @FDifferentParamType.as.J.impl.F.loc171_38.1 [concrete = constants.%FDifferentParamType.as.J.impl.F.04313a.1] {
// CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
@@ -791,6 +1000,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FDifferentParamType.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FDifferentParamType.as.Destroy.impl: constants.%FDifferentParamType as constants.%Destroy.type {
// CHECK:STDOUT: %FDifferentParamType.as.Destroy.impl.Op.decl: %FDifferentParamType.as.Destroy.impl.Op.type = fn_decl @FDifferentParamType.as.Destroy.impl.Op [concrete = constants.%FDifferentParamType.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.e0c = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.e0c = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc156: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.f1f = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [concrete = constants.%FDifferentParamType]
// CHECK:STDOUT: %self: %ptr.f1f = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FDifferentParamType.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FDifferentParamType.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FDifferentImplicitParamType.as.J.impl: %Self.ref as %J.ref {
// CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.1: %FDifferentImplicitParamType.as.J.impl.F.type.d6232a.1 = fn_decl @FDifferentImplicitParamType.as.J.impl.F.loc184_38.1 [concrete = constants.%FDifferentImplicitParamType.as.J.impl.F.886f70.1] {
// CHECK:STDOUT: %self.patt: %pattern_type.9cc = binding_pattern self [concrete]
@@ -837,6 +1062,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FDifferentImplicitParamType.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FDifferentImplicitParamType.as.Destroy.impl: constants.%FDifferentImplicitParamType as constants.%Destroy.type {
// CHECK:STDOUT: %FDifferentImplicitParamType.as.Destroy.impl.Op.decl: %FDifferentImplicitParamType.as.Destroy.impl.Op.type = fn_decl @FDifferentImplicitParamType.as.Destroy.impl.Op [concrete = constants.%FDifferentImplicitParamType.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.986 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.986 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc175: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.dc5 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType]
// CHECK:STDOUT: %self: %ptr.dc5 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FDifferentImplicitParamType.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FDifferentImplicitParamType.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FDifferentReturnType.as.J.impl: %Self.ref as %J.ref {
// CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.decl.loc200_38.1: %FDifferentReturnType.as.J.impl.F.type.d3b58f.1 = fn_decl @FDifferentReturnType.as.J.impl.F.loc200_38.1 [concrete = constants.%FDifferentReturnType.as.J.impl.F.be86c9.1] {
// CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
@@ -885,6 +1126,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @FDifferentReturnType.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @FDifferentReturnType.as.Destroy.impl: constants.%FDifferentReturnType as constants.%Destroy.type {
// CHECK:STDOUT: %FDifferentReturnType.as.Destroy.impl.Op.decl: %FDifferentReturnType.as.Destroy.impl.Op.type = fn_decl @FDifferentReturnType.as.Destroy.impl.Op [concrete = constants.%FDifferentReturnType.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.246 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.246 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc188: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.954 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [concrete = constants.%FDifferentReturnType]
// CHECK:STDOUT: %self: %ptr.954 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %FDifferentReturnType.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @FDifferentReturnType.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @SelfNestedBadParam.as.SelfNested.impl: %Self.ref as %SelfNested.ref {
// CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.decl.loc223_87.1: %SelfNestedBadParam.as.SelfNested.impl.F.type.f90165.1 = fn_decl @SelfNestedBadParam.as.SelfNested.impl.F.loc223_87.1 [concrete = constants.%SelfNestedBadParam.as.SelfNested.impl.F.fa8d04.1] {
// CHECK:STDOUT: %x.patt: %pattern_type.714 = binding_pattern x [concrete]
@@ -929,6 +1186,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @SelfNestedBadParam.%SelfNested.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @SelfNestedBadParam.as.Destroy.impl: constants.%SelfNestedBadParam as constants.%Destroy.type {
// CHECK:STDOUT: %SelfNestedBadParam.as.Destroy.impl.Op.decl: %SelfNestedBadParam.as.Destroy.impl.Op.type = fn_decl @SelfNestedBadParam.as.Destroy.impl.Op [concrete = constants.%SelfNestedBadParam.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.2a7 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.2a7 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc214: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.4cd = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [concrete = constants.%SelfNestedBadParam]
// CHECK:STDOUT: %self: %ptr.4cd = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %SelfNestedBadParam.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @SelfNestedBadParam.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @SelfNestedBadReturnType.as.SelfNested.impl: %Self.ref as %SelfNested.ref {
// CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.1: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.0e7d1d.1 = fn_decl @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.1 [concrete = constants.%SelfNestedBadReturnType.as.SelfNested.impl.F.0bc78a.1] {
// CHECK:STDOUT: %x.patt: %pattern_type.23f = binding_pattern x [concrete]
@@ -973,6 +1246,22 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: witness = @SelfNestedBadReturnType.%SelfNested.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @SelfNestedBadReturnType.as.Destroy.impl: constants.%SelfNestedBadReturnType as constants.%Destroy.type {
// CHECK:STDOUT: %SelfNestedBadReturnType.as.Destroy.impl.Op.decl: %SelfNestedBadReturnType.as.Destroy.impl.Op.type = fn_decl @SelfNestedBadReturnType.as.Destroy.impl.Op [concrete = constants.%SelfNestedBadReturnType.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.4de = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.4de = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc227: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.612 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [concrete = constants.%SelfNestedBadReturnType]
// CHECK:STDOUT: %self: %ptr.612 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %SelfNestedBadReturnType.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @SelfNestedBadReturnType.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @NoF {
// CHECK:STDOUT: impl_decl @NoF.as.I.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [concrete = constants.%NoF]
@@ -980,6 +1269,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @NoF.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.901]
// CHECK:STDOUT: impl_decl @NoF.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@NoF.as.Destroy.impl.%NoF.as.Destroy.impl.Op.decl), @NoF.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.9b3]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -996,6 +1288,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @FNotFunction.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.44e]
// CHECK:STDOUT: impl_decl @FNotFunction.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FNotFunction.as.Destroy.impl.%FNotFunction.as.Destroy.impl.Op.decl), @FNotFunction.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.f9b]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1014,6 +1309,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @FAlias.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.c80]
// CHECK:STDOUT: impl_decl @FAlias.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FAlias.as.Destroy.impl.%FAlias.as.Destroy.impl.Op.decl), @FAlias.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.740]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1031,6 +1329,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@FExtraParam.as.I.impl.%FExtraParam.as.I.impl.F.decl.loc69_18.2), @FExtraParam.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.1f3]
// CHECK:STDOUT: impl_decl @FExtraParam.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FExtraParam.as.Destroy.impl.%FExtraParam.as.Destroy.impl.Op.decl), @FExtraParam.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.44a]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1047,6 +1348,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@FExtraImplicitParam.as.I.impl.%FExtraImplicitParam.as.I.impl.F.decl.loc85_23.2), @FExtraImplicitParam.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.a7b]
// CHECK:STDOUT: impl_decl @FExtraImplicitParam.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FExtraImplicitParam.as.Destroy.impl.%FExtraImplicitParam.as.Destroy.impl.Op.decl), @FExtraImplicitParam.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.a05]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1063,6 +1367,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @FExtraReturnType.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.59a]
// CHECK:STDOUT: impl_decl @FExtraReturnType.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FExtraReturnType.as.Destroy.impl.%FExtraReturnType.as.Destroy.impl.Op.decl), @FExtraReturnType.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.3ea]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1079,6 +1386,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@FMissingParam.as.J.impl.%FMissingParam.as.J.impl.F.decl.loc117_31.2), @FMissingParam.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.4e9]
// CHECK:STDOUT: impl_decl @FMissingParam.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FMissingParam.as.Destroy.impl.%FMissingParam.as.Destroy.impl.Op.decl), @FMissingParam.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.672]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1095,6 +1405,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@FMissingImplicitParam.as.J.impl.%FMissingImplicitParam.as.J.impl.F.decl.loc130_26.2), @FMissingImplicitParam.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.841]
// CHECK:STDOUT: impl_decl @FMissingImplicitParam.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FMissingImplicitParam.as.Destroy.impl.%FMissingImplicitParam.as.Destroy.impl.Op.decl), @FMissingImplicitParam.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.ae6]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1111,6 +1424,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@FMissingReturnType.as.J.impl.%FMissingReturnType.as.J.impl.F.decl.loc152_30.2), @FMissingReturnType.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.e75]
// CHECK:STDOUT: impl_decl @FMissingReturnType.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FMissingReturnType.as.Destroy.impl.%FMissingReturnType.as.Destroy.impl.Op.decl), @FMissingReturnType.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.8d8]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1127,6 +1443,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@FDifferentParamType.as.J.impl.%FDifferentParamType.as.J.impl.F.decl.loc171_38.2), @FDifferentParamType.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.cbe]
// CHECK:STDOUT: impl_decl @FDifferentParamType.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FDifferentParamType.as.Destroy.impl.%FDifferentParamType.as.Destroy.impl.Op.decl), @FDifferentParamType.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.443]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1143,6 +1462,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@FDifferentImplicitParamType.as.J.impl.%FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.2), @FDifferentImplicitParamType.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.af2]
// CHECK:STDOUT: impl_decl @FDifferentImplicitParamType.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FDifferentImplicitParamType.as.Destroy.impl.%FDifferentImplicitParamType.as.Destroy.impl.Op.decl), @FDifferentImplicitParamType.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.c2a]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1159,6 +1481,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@FDifferentReturnType.as.J.impl.%FDifferentReturnType.as.J.impl.F.decl.loc200_38.2), @FDifferentReturnType.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.bc1]
// CHECK:STDOUT: impl_decl @FDifferentReturnType.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@FDifferentReturnType.as.Destroy.impl.%FDifferentReturnType.as.Destroy.impl.Op.decl), @FDifferentReturnType.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.6d2]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1175,6 +1500,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (@SelfNestedBadParam.as.SelfNested.impl.%SelfNestedBadParam.as.SelfNested.impl.F.decl.loc223_87.2), @SelfNestedBadParam.as.SelfNested.impl [concrete]
// CHECK:STDOUT: %SelfNested.impl_witness: <witness> = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.e31]
// CHECK:STDOUT: impl_decl @SelfNestedBadParam.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@SelfNestedBadParam.as.Destroy.impl.%SelfNestedBadParam.as.Destroy.impl.Op.decl), @SelfNestedBadParam.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.908]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1192,6 +1520,9 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: }
// CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (@SelfNestedBadReturnType.as.SelfNested.impl.%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.2), @SelfNestedBadReturnType.as.SelfNested.impl [concrete]
// CHECK:STDOUT: %SelfNested.impl_witness: <witness> = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.d5e]
// CHECK:STDOUT: impl_decl @SelfNestedBadReturnType.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@SelfNestedBadReturnType.as.Destroy.impl.%SelfNestedBadReturnType.as.Destroy.impl.Op.decl), @SelfNestedBadReturnType.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.9f5]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1207,8 +1538,14 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @NoF.as.Destroy.impl.Op(%self.param: %ptr.0f9) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FNotFunction.as.Destroy.impl.Op(%self.param: %ptr.2b2) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @PossiblyF();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FAlias.as.Destroy.impl.Op(%self.param: %ptr.4bf) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FExtraParam.as.I.impl.F.loc69_18.1(%b.param: bool);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FExtraParam.as.I.impl.F.loc69_18.2() [thunk @FExtraParam.as.I.impl.%FExtraParam.as.I.impl.F.decl.loc69_18.1] {
@@ -1217,6 +1554,8 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FExtraParam.as.Destroy.impl.Op(%self.param: %ptr.0f2) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FExtraImplicitParam.as.I.impl.F.loc85_23.1(%self.param: %FExtraImplicitParam);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FExtraImplicitParam.as.I.impl.F.loc85_23.2() [thunk @FExtraImplicitParam.as.I.impl.%FExtraImplicitParam.as.I.impl.F.decl.loc85_23.1] {
@@ -1226,8 +1565,12 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FExtraImplicitParam.as.Destroy.impl.Op(%self.param: %ptr.8c7) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FExtraReturnType.as.I.impl.F() -> bool;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FExtraReturnType.as.Destroy.impl.Op(%self.param: %ptr.147) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
// CHECK:STDOUT: fn(%self.param: bool, %b.param: bool) -> bool;
// CHECK:STDOUT: }
@@ -1244,6 +1587,8 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FMissingParam.as.Destroy.impl.Op(%self.param: %ptr.fc8) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FMissingImplicitParam.as.J.impl.F.loc130_26.1(%b.param: bool) -> bool;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FMissingImplicitParam.as.J.impl.F.loc130_26.2(%self.param: bool, %b.param: bool) -> bool [thunk @FMissingImplicitParam.as.J.impl.%FMissingImplicitParam.as.J.impl.F.decl.loc130_26.1] {
@@ -1258,6 +1603,8 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: return %.loc130_26.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FMissingImplicitParam.as.Destroy.impl.Op(%self.param: %ptr.c3c) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FMissingReturnType.as.J.impl.F.loc152_30.1(%self.param: bool, %b.param: bool);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FMissingReturnType.as.J.impl.F.loc152_30.2(%self.param: bool, %b.param: bool) -> bool [thunk @FMissingReturnType.as.J.impl.%FMissingReturnType.as.J.impl.F.decl.loc152_30.1] {
@@ -1272,6 +1619,8 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FMissingReturnType.as.Destroy.impl.Op(%self.param: %ptr.41e) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentParamType.as.J.impl.F.loc171_38.1(%self.param: bool, %b.param: %FDifferentParamType) -> bool;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentParamType.as.J.impl.F.loc171_38.2(%self.param: bool, %b.param: bool) -> bool [thunk @FDifferentParamType.as.J.impl.%FDifferentParamType.as.J.impl.F.decl.loc171_38.1] {
@@ -1288,6 +1637,8 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: return %.loc171_38.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentParamType.as.Destroy.impl.Op(%self.param: %ptr.f1f) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentImplicitParamType.as.J.impl.F.loc184_38.1(%self.param: %FDifferentImplicitParamType, %b.param: bool) -> bool;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentImplicitParamType.as.J.impl.F.loc184_38.2(%self.param: bool, %b.param: bool) -> bool [thunk @FDifferentImplicitParamType.as.J.impl.%FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.1] {
@@ -1304,6 +1655,8 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: return %.loc184_38.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentImplicitParamType.as.Destroy.impl.Op(%self.param: %ptr.dc5) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentReturnType.as.J.impl.F.loc200_38.1(%self.param: bool, %b.param: bool) -> %return.param: %FDifferentReturnType;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentReturnType.as.J.impl.F.loc200_38.2(%self.param: bool, %b.param: bool) -> bool [thunk @FDifferentReturnType.as.J.impl.%FDifferentReturnType.as.J.impl.F.decl.loc200_38.1] {
@@ -1316,14 +1669,14 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %.loc200_38.1: ref %FDifferentReturnType = temporary_storage
// CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.call: init %FDifferentReturnType = call %FDifferentReturnType.as.J.impl.F.bound(%self.ref, %b.ref) to %.loc200_38.1
// CHECK:STDOUT: %.loc200_38.2: bool = converted %FDifferentReturnType.as.J.impl.F.call, <error> [concrete = <error>]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc200_38.1, constants.%T.as.Destroy.impl.Op.ddd
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.ddd, @T.as.Destroy.impl.Op(constants.%FDifferentReturnType) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.b4b]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc200_38.1, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %FDifferentReturnType.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc200_38.1, constants.%FDifferentReturnType.as.Destroy.impl.Op
// CHECK:STDOUT: %addr: %ptr.954 = addr_of %.loc200_38.1
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: %FDifferentReturnType.as.Destroy.impl.Op.call: init %empty_tuple.type = call %FDifferentReturnType.as.Destroy.impl.Op.bound(%addr)
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @FDifferentReturnType.as.Destroy.impl.Op(%self.param: %ptr.954) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @SelfNested.F(@SelfNested.%Self: %SelfNested.type) {
// CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2ff)]
// CHECK:STDOUT: %Self.as_type.loc211_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc211_16.1 (constants.%Self.as_type.e1e)]
@@ -1351,13 +1704,15 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %.loc211_9.2: %i32 = converted %.loc211_9.1, <error> [concrete = <error>]
// CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.call: init %array_type.a41 = call %F.ref(<error>) to %.loc211_41
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc211_41, constants.%T.as.Destroy.impl.Op.d25
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.d25, @T.as.Destroy.impl.Op(constants.%array_type.a41) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.235]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.d25, @T.as.Destroy.impl.Op(constants.%array_type.a41) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc211_41, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %addr: %ptr.f40 = addr_of %.loc211_41
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: return %SelfNestedBadParam.as.SelfNested.impl.F.call to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SelfNestedBadParam.as.Destroy.impl.Op(%self.param: %ptr.4cd) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.1(%x.param: %tuple.type.eb9) -> %return.param: %array_type.a41;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.2(%x.param: %tuple.type.eb9) -> %return.param: %array_type.126 [thunk @SelfNestedBadReturnType.as.SelfNested.impl.%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.1] {
@@ -1369,13 +1724,15 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.call: init %array_type.a41 = call %F.ref(%x.ref) to %.loc239_112.1
// CHECK:STDOUT: %.loc239_112.2: %array_type.126 = converted %SelfNestedBadReturnType.as.SelfNested.impl.F.call, <error> [concrete = <error>]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc239_112.1, constants.%T.as.Destroy.impl.Op.d25
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.d25, @T.as.Destroy.impl.Op(constants.%array_type.a41) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn.235]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.d25, @T.as.Destroy.impl.Op(constants.%array_type.a41) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc239_112.1, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %addr: %ptr.f40 = addr_of %.loc239_112.1
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: return <error> to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.Destroy.impl.Op(%self.param: %ptr.612) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.F(constants.%Self.826) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.F(constants.%I.facet.fa4) {}
@@ -54,6 +54,14 @@ impl i32 as I {
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
// CHECK:STDOUT: %C.b36: type = class_type @C, @C(%T, %X) [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.e7a: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T, %X) [symbolic]
// CHECK:STDOUT: %require_complete.4ae: <witness> = require_complete_type %T [symbolic]
// CHECK:STDOUT: %ptr.555: type = ptr_type %C.b36 [symbolic]
// CHECK:STDOUT: %pattern_type.7e5: type = pattern_type %ptr.555 [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T, %X) [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
@@ -87,18 +95,22 @@ impl i32 as I {
// CHECK:STDOUT: %pattern_type.c65: type = pattern_type %C.d88 [concrete]
// CHECK:STDOUT: %i32.as.I.impl.F.type.066a53.2: type = fn_type @i32.as.I.impl.F.loc43_18.2 [concrete]
// CHECK:STDOUT: %i32.as.I.impl.F.9ec58f.2: %i32.as.I.impl.F.type.066a53.2 = struct_value () [concrete]
// CHECK:STDOUT: %complete_type.acb: <witness> = complete_type_witness %I.type [concrete]
// CHECK:STDOUT: %complete_type.473: <witness> = complete_type_witness type [concrete]
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .Bool = %Core.Bool
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: import Core//prelude
// 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.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool]
// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
@@ -160,6 +172,35 @@ impl i32 as I {
// CHECK:STDOUT: witness = (%I.F.decl)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.Destroy.impl(@C.%T.loc15_9.2: type, @C.%X.loc15_19.2: @C.%T.loc15_9.1 (%T)) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %X: @C.as.Destroy.impl.%T (%T) = bind_symbolic_name X, 1 [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T, %X) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.e7a)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T, %X) [symbolic = %C.as.Destroy.impl.Op.type (constants.%C.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = struct_value () [symbolic = %C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%C.b36 as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = fn_decl @C.as.Destroy.impl.Op [symbolic = @C.as.Destroy.impl.%C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.7e5) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.7e5) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc15_26.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.555) = value_param call_param0
// CHECK:STDOUT: %.loc15_26.2: type = splice_block %Self.ref [symbolic = %C (constants.%C.b36)] {
// CHECK:STDOUT: %.loc15_26.3: type = specific_constant constants.%C.b36, @C(constants.%T, constants.%X) [symbolic = %C (constants.%C.b36)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc15_26.3 [symbolic = %C (constants.%C.b36)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @C.as.Destroy.impl.Op.%ptr (%ptr.555) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @bool.as.I.impl: %.loc28_6.2 as %I.ref {
// CHECK:STDOUT: %bool.as.I.impl.F.decl: %bool.as.I.impl.F.type = fn_decl @bool.as.I.impl.F [concrete = constants.%bool.as.I.impl.F] {
// CHECK:STDOUT: %c.patt: %pattern_type.225 = binding_pattern c [concrete]
@@ -218,8 +259,12 @@ impl i32 as I {
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc15_9.1 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc15_9.1 [symbolic = %require_complete (constants.%require_complete.4ae)]
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @C.as.Destroy.impl(constants.%T, constants.%X) [symbolic = @C.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.e7a)]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -229,6 +274,18 @@ impl i32 as I {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(@C.%T.loc15_9.2: type, @C.%X.loc15_19.2: @C.%T.loc15_9.1 (%T)) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %X: @C.as.Destroy.impl.Op.%T (%T) = bind_symbolic_name X, 1 [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%T, %X) [symbolic = %C (constants.%C.b36)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.555)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.7e5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.555)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
// CHECK:STDOUT: %C.loc25_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc25_17.1 (constants.%C.dbb)]
@@ -256,6 +313,20 @@ impl i32 as I {
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%T, constants.%X) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %X => constants.%X
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.e7a
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl.Op(constants.%T, constants.%X) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %X => constants.%X
// CHECK:STDOUT: %C => constants.%C.b36
// CHECK:STDOUT: %ptr => constants.%ptr.555
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7e5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C(constants.%I.type, constants.%Self.826) {
// CHECK:STDOUT: %T.loc15_9.1 => constants.%I.type
// CHECK:STDOUT: %X.loc15_19.1 => constants.%Self.826
@@ -286,6 +357,7 @@ impl i32 as I {
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98f
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.473
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.F(constants.%I.facet.118) {
@@ -300,5 +372,6 @@ impl i32 as I {
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2b5
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.acb
// CHECK:STDOUT: }
// CHECK:STDOUT:
File diff suppressed because it is too large Load Diff
+32 -11
View File
@@ -40,15 +40,17 @@ class C {
// CHECK:STDOUT: %C.as.Simple.impl.F.type: type = fn_type @C.as.Simple.impl.F [concrete]
// CHECK:STDOUT: %C.as.Simple.impl.F: %C.as.Simple.impl.F.type = struct_value () [concrete]
// CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %C, (%Simple.impl_witness) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.edd: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
// CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.153: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.5d7: %T.as.Destroy.impl.Op.type.153 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.5d7, @T.as.Destroy.impl.Op(%C) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -91,6 +93,22 @@ class C {
// CHECK:STDOUT: witness = @C.%Simple.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc19: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.Simple.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
@@ -98,8 +116,11 @@ class C {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (@C.as.Simple.impl.%C.as.Simple.impl.F.decl), @C.as.Simple.impl [concrete]
// CHECK:STDOUT: %Simple.impl_witness: <witness> = impl_witness %Simple.impl_witness_table [concrete = constants.%Simple.impl_witness]
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.edd]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
@@ -125,14 +146,14 @@ class C {
// CHECK:STDOUT: assign %c.var, %.loc23_7
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %c.var, constants.%T.as.Destroy.impl.Op.5d7
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.5d7, @T.as.Destroy.impl.Op(constants.%C) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.var, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %C.as.Destroy.impl.Op.bound: <bound method> = bound_method %c.var, constants.%C.as.Destroy.impl.Op
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.var
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: %C.as.Destroy.impl.Op.call: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Simple.F(constants.%Self.3c9) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Simple.F(constants.%Simple.facet) {}
+13 -15
View File
@@ -404,16 +404,16 @@ impl () as I({}) {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
// CHECK:STDOUT: %pattern_type.5f8: type = pattern_type %ptr.6db [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.type.f1b0b1.1: type = fn_type @B.as.X.impl.F.loc14_39.1 [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.5161e9.1: %B.as.X.impl.F.type.f1b0b1.1 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.type.f1b0b1.2: type = fn_type @B.as.X.impl.F.loc14_39.2 [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.5161e9.2: %B.as.X.impl.F.type.f1b0b1.2 = struct_value () [concrete]
// CHECK:STDOUT: }
@@ -483,8 +483,8 @@ impl () as I({}) {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.type.f1b0b1.1: type = fn_type @B.as.X.impl.F.loc13_26.1 [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.5161e9.1: %B.as.X.impl.F.type.f1b0b1.1 = struct_value () [concrete]
@@ -537,16 +537,16 @@ impl () as I({}) {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
// CHECK:STDOUT: %pattern_type.5f8: type = pattern_type %ptr.6db [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.type.f1b0b1.1: type = fn_type @B.as.X.impl.F.loc14_39.1 [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.5161e9.1: %B.as.X.impl.F.type.f1b0b1.1 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.type.f1b0b1.2: type = fn_type @B.as.X.impl.F.loc14_39.2 [concrete]
// CHECK:STDOUT: %B.as.X.impl.F.5161e9.2: %B.as.X.impl.F.type.f1b0b1.2 = struct_value () [concrete]
// CHECK:STDOUT: }
@@ -616,16 +616,16 @@ impl () as I({}) {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %pattern_type.049: type = pattern_type %B [concrete]
// CHECK:STDOUT: %A.as.X.impl.F.type.b24d6f.1: type = fn_type @A.as.X.impl.F.loc20_14.1 [concrete]
// CHECK:STDOUT: %A.as.X.impl.F.77e9d5.1: %A.as.X.impl.F.type.b24d6f.1 = struct_value () [concrete]
// CHECK:STDOUT: %A.as.X.impl.F.type.b24d6f.2: type = fn_type @A.as.X.impl.F.loc20_14.2 [concrete]
// CHECK:STDOUT: %A.as.X.impl.F.77e9d5.2: %A.as.X.impl.F.type.b24d6f.2 = struct_value () [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.1a6: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%B) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.3c2: %T.as.Destroy.impl.Op.type.1a6 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -664,11 +664,9 @@ impl () as I({}) {
// CHECK:STDOUT: %.loc20_14.3: ref %A = class_element_access %.loc20_14.2, element0
// CHECK:STDOUT: %.loc20_14.4: ref %A = converted %A.as.X.impl.F.call, %.loc20_14.3
// CHECK:STDOUT: %.loc20_14.5: %A = bind_value %.loc20_14.4
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc20_14.1, constants.%T.as.Destroy.impl.Op.3c2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc20_14.1, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %B.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc20_14.1, constants.%B.as.Destroy.impl.Op
// CHECK:STDOUT: %addr: %ptr.e79 = addr_of %.loc20_14.1
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: %B.as.Destroy.impl.Op.call: init %empty_tuple.type = call %B.as.Destroy.impl.Op.bound(%addr)
// CHECK:STDOUT: return <error> to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+151 -29
View File
@@ -106,6 +106,15 @@ fn G() {
// CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
// CHECK:STDOUT: %C.13320f.1: type = class_type @C, @C(%X) [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
// CHECK:STDOUT: %Destroy.Op: %Destroy.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.35ec57.1: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%X) [symbolic]
// CHECK:STDOUT: %ptr.40dc71.1: type = ptr_type %C.13320f.1 [symbolic]
// CHECK:STDOUT: %pattern_type.2a1e48.1: type = pattern_type %ptr.40dc71.1 [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%X) [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %Y: %empty_tuple.type = bind_symbolic_name Y, 0 [symbolic]
@@ -125,18 +134,16 @@ fn G() {
// CHECK:STDOUT: %require_complete.a35: <witness> = require_complete_type %C.13320f.2 [symbolic]
// CHECK:STDOUT: %C.as.I.impl.F.specific_fn: <specific function> = specific_function %C.as.I.impl.F.49c1ac.1, @C.as.I.impl.F.loc8_17.1(%Y) [symbolic]
// CHECK:STDOUT: %C.val: %C.13320f.2 = struct_value () [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete]
// CHECK:STDOUT: %assoc0: %Destroy.assoc_type = assoc_entity element0, imports.%Core.import_ref.725 [concrete]
// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
// CHECK:STDOUT: %Destroy.Op: %Destroy.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %ptr.40d: type = ptr_type %C.13320f.2 [symbolic]
// CHECK:STDOUT: %require_complete.0b0: <witness> = require_complete_type %ptr.40d [symbolic]
// CHECK:STDOUT: %Destroy.impl_witness.35ec57.2: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%Y) [symbolic]
// CHECK:STDOUT: %ptr.40dc71.2: type = ptr_type %C.13320f.2 [symbolic]
// CHECK:STDOUT: %require_complete.0b0: <witness> = require_complete_type %ptr.40dc71.2 [symbolic]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %C.13320f.2, @Destroy [symbolic]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.13320f.2, (%Destroy.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %.97f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic]
// CHECK:STDOUT: %Destroy.facet.6e0: %Destroy.type = facet_value %C.13320f.2, (%Destroy.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %.97f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.6e0 [symbolic]
// CHECK:STDOUT: %impl.elem0: %.97f = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.6e0) [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -146,12 +153,12 @@ fn G() {
// CHECK:STDOUT: import Core//prelude
// 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.f99: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%assoc0]
// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//a, inst19 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.507 = import_ref Main//a, loc5_14, unloaded
// CHECK:STDOUT: %Main.F: %I.F.type = import_ref Main//a, F, loaded [concrete = constants.%I.F]
// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//a, inst19 [no loc], loaded [symbolic = constants.%Self.826]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Core.import_ref.f99: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%assoc0]
// CHECK:STDOUT: %Core.import_ref.725: %Destroy.Op.type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%Destroy.Op]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -196,6 +203,34 @@ fn G() {
// CHECK:STDOUT: witness = (imports.%Main.F)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.Destroy.impl(@C.%X.loc5_9.2: %empty_tuple.type) {
// CHECK:STDOUT: %X: %empty_tuple.type = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%X) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.35ec57.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%X) [symbolic = %C.as.Destroy.impl.Op.type (constants.%C.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = struct_value () [symbolic = %C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%C.13320f.1 as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = fn_decl @C.as.Destroy.impl.Op [symbolic = @C.as.Destroy.impl.%C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.2a1e48.1) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.2a1e48.1) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc5_17.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.40dc71.1) = value_param call_param0
// CHECK:STDOUT: %.loc5_17.2: type = splice_block %Self.ref [symbolic = %C (constants.%C.13320f.1)] {
// CHECK:STDOUT: %.loc5_17.3: type = specific_constant constants.%C.13320f.1, @C(constants.%X) [symbolic = %C (constants.%C.13320f.1)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc5_17.3 [symbolic = %C (constants.%C.13320f.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @C.as.Destroy.impl.Op.%ptr (%ptr.40dc71.1) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.I.impl(%Y.loc7_14.2: %empty_tuple.type) {
// CHECK:STDOUT: %Y.loc7_14.1: %empty_tuple.type = bind_symbolic_name Y, 0 [symbolic = %Y.loc7_14.1 (constants.%Y)]
// CHECK:STDOUT: %C.loc7_25.1: type = class_type @C, @C(%Y.loc7_14.1) [symbolic = %C.loc7_25.1 (constants.%C.13320f.2)]
@@ -242,6 +277,9 @@ fn G() {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @C.as.Destroy.impl(constants.%X) [symbolic = @C.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.35ec57.1)]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -251,6 +289,17 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(@C.%X.loc5_9.2: %empty_tuple.type) {
// CHECK:STDOUT: %X: %empty_tuple.type = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%X) [symbolic = %C (constants.%C.13320f.1)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.40dc71.1)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.2a1e48.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.40dc71.1)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.5dd: %I.type) [from "a.carbon"] {
// CHECK:STDOUT: fn;
// CHECK:STDOUT: }
@@ -279,11 +328,11 @@ fn G() {
// CHECK:STDOUT: %require_complete.1: <witness> = require_complete_type %C [symbolic = %require_complete.1 (constants.%require_complete.a35)]
// CHECK:STDOUT: %C.val: @C.as.I.impl.F.loc8_17.2.%C (%C.13320f.2) = struct_value () [symbolic = %C.val (constants.%C.val)]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %C, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.6e0)]
// CHECK:STDOUT: %.7: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.7 (constants.%.97f)]
// CHECK:STDOUT: %impl.elem0.2: @C.as.I.impl.F.loc8_17.2.%.7 (%.97f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.2: <specific function> = specific_impl_function %impl.elem0.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.40d)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.40dc71.2)]
// CHECK:STDOUT: %require_complete.2: <witness> = require_complete_type %ptr [symbolic = %require_complete.2 (constants.%require_complete.0b0)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: %empty_struct_type) [thunk @C.as.I.impl.%C.as.I.impl.F.decl.loc8_17.1] {
@@ -301,9 +350,9 @@ fn G() {
// CHECK:STDOUT: %Op.ref: %Destroy.assoc_type = name_ref Op, imports.%Core.import_ref.f99 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.1: @C.as.I.impl.F.loc8_17.2.%.7 (%.97f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %bound_method.1: <bound method> = bound_method %.1, %impl.elem0.1
// CHECK:STDOUT: %specific_impl_fn.1: <specific function> = specific_impl_function %impl.elem0.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %specific_impl_fn.1: <specific function> = specific_impl_function %impl.elem0.1, @Destroy.Op(constants.%Destroy.facet.6e0) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %bound_method.2: <bound method> = bound_method %.1, %specific_impl_fn.1
// CHECK:STDOUT: %addr: @C.as.I.impl.F.loc8_17.2.%ptr (%ptr.40d) = addr_of %.1
// CHECK:STDOUT: %addr: @C.as.I.impl.F.loc8_17.2.%ptr (%ptr.40dc71.2) = addr_of %.1
// CHECK:STDOUT: %.6: init %empty_tuple.type = call %bound_method.2(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -313,6 +362,18 @@ fn G() {
// CHECK:STDOUT: %X.loc5_9.1 => constants.%X
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%X) {
// CHECK:STDOUT: %X => constants.%X
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.35ec57.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl.Op(constants.%X) {
// CHECK:STDOUT: %X => constants.%X
// CHECK:STDOUT: %C => constants.%C.13320f.1
// CHECK:STDOUT: %ptr => constants.%ptr.40dc71.1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2a1e48.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C(constants.%Y) {
// CHECK:STDOUT: %X.loc5_9.1 => constants.%Y
// CHECK:STDOUT:
@@ -346,6 +407,11 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.I.impl.F.loc8_17.2(constants.%Y) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%Y) {
// CHECK:STDOUT: %X => constants.%Y
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.35ec57.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- c.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
@@ -357,6 +423,7 @@ fn G() {
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %X: %empty_tuple.type = bind_symbolic_name X, 0 [symbolic]
// CHECK:STDOUT: %C.13320f.1: type = class_type @C, @C(%X) [symbolic]
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
// CHECK:STDOUT: %C.607: type = class_type @C, @C(%empty_tuple) [concrete]
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
@@ -365,6 +432,12 @@ fn G() {
// CHECK:STDOUT: %assoc0.3f3: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e03 [concrete]
// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete]
// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.763: <witness> = impl_witness imports.%Destroy.impl_witness_table.629, @C.as.Destroy.impl(%X) [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%X) [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %ptr.40dc71.1: type = ptr_type %C.13320f.1 [symbolic]
// CHECK:STDOUT: %pattern_type.2a1: type = pattern_type %ptr.40dc71.1 [symbolic]
// CHECK:STDOUT: %Y: %empty_tuple.type = bind_symbolic_name Y, 0 [symbolic]
// CHECK:STDOUT: %C.13320f.2: type = class_type @C, @C(%Y) [symbolic]
// CHECK:STDOUT: %I.impl_witness.7d9: <witness> = impl_witness imports.%I.impl_witness_table, @C.as.I.impl(%Y) [symbolic]
@@ -376,15 +449,14 @@ fn G() {
// CHECK:STDOUT: %require_complete.a35: <witness> = require_complete_type %C.13320f.2 [symbolic]
// CHECK:STDOUT: %C.as.I.impl.F.specific_fn.8d9: <specific function> = specific_function %C.as.I.impl.F.49c1ac.1, @C.as.I.impl.F.1(%Y) [symbolic]
// CHECK:STDOUT: %C.val.56a: %C.13320f.2 = struct_value () [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %C.13320f.2, @Destroy [symbolic]
// CHECK:STDOUT: %Destroy.facet.666: %Destroy.type = facet_value %C.13320f.2, (%Destroy.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
// CHECK:STDOUT: %.5fd: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.666 [symbolic]
// CHECK:STDOUT: %impl.elem0: %.5fd = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.666) [symbolic]
// CHECK:STDOUT: %ptr.40d: type = ptr_type %C.13320f.2 [symbolic]
// CHECK:STDOUT: %require_complete.0b0: <witness> = require_complete_type %ptr.40d [symbolic]
// CHECK:STDOUT: %ptr.40dc71.2: type = ptr_type %C.13320f.2 [symbolic]
// CHECK:STDOUT: %require_complete.0b0: <witness> = require_complete_type %ptr.40dc71.2 [symbolic]
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.ed4: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.486: %T.as.Destroy.impl.Op.type.ed4 = struct_value () [symbolic]
@@ -400,7 +472,8 @@ fn G() {
// CHECK:STDOUT: %pattern_type.186: type = pattern_type %C.607 [concrete]
// CHECK:STDOUT: %C.as.I.impl.F.specific_fn.4832e8.2: <specific function> = specific_function %C.as.I.impl.F.5fa954.1, @C.as.I.impl.F.1(%empty_tuple) [concrete]
// CHECK:STDOUT: %C.val.12f: %C.607 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.ce0: <witness> = impl_witness imports.%Destroy.impl_witness_table, @T.as.Destroy.impl(%C.607) [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.880: <witness> = impl_witness imports.%Destroy.impl_witness_table.629, @C.as.Destroy.impl(%empty_tuple) [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.ce0: <witness> = impl_witness imports.%Destroy.impl_witness_table.18d, @T.as.Destroy.impl(%C.607) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.ea0: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C.607) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.ac0: %T.as.Destroy.impl.Op.type.ea0 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.2ce: type = ptr_type %C.607 [concrete]
@@ -426,17 +499,24 @@ fn G() {
// CHECK:STDOUT: %Main.F.8b9 = import_ref Main//a, F, unloaded
// CHECK:STDOUT: %Main.import_ref.e03: %I.F.type = import_ref Main//a, loc5_14, loaded [concrete = constants.%I.F]
// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//a, inst19 [no loc], loaded [symbolic = constants.%Self.826]
// CHECK:STDOUT: %Main.import_ref.404 = import_ref Main//b, loc5_17, unloaded
// CHECK:STDOUT: %Main.import_ref.eb1c17.2: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)]
// CHECK:STDOUT: %Main.import_ref.dbf7cd.1: type = import_ref Main//b, inst31 [no loc], loaded [symbolic = constants.%C.13320f.1]
// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//b, inst34 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.7dd = import_ref Main//b, loc5_17, unloaded
// CHECK:STDOUT: %Destroy.impl_witness_table.629 = impl_witness_table (%Main.import_ref.7dd), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Main.import_ref.eb1c17.3: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)]
// CHECK:STDOUT: %Main.import_ref.f89: <witness> = import_ref Main//b, loc7_32, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.7d9)]
// CHECK:STDOUT: %Main.import_ref.eb1c17.2: %empty_tuple.type = import_ref Main//b, loc7_14, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
// CHECK:STDOUT: %Main.import_ref.dbf: type = import_ref Main//b, loc7_25, loaded [symbolic = @C.as.I.impl.%C (constants.%C.13320f.2)]
// CHECK:STDOUT: %Main.import_ref.eb1c17.4: %empty_tuple.type = import_ref Main//b, loc7_14, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
// CHECK:STDOUT: %Main.import_ref.dbf7cd.2: type = import_ref Main//b, loc7_25, loaded [symbolic = @C.as.I.impl.%C (constants.%C.13320f.2)]
// CHECK:STDOUT: %Main.import_ref.f50: type = import_ref Main//b, loc7_30, loaded [concrete = constants.%I.type]
// CHECK:STDOUT: %Main.import_ref.047: @C.as.I.impl.%C.as.I.impl.F.type.2 (%C.as.I.impl.F.type.0daaa1.2) = import_ref Main//b, loc8_17, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.2 (constants.%C.as.I.impl.F.49c1ac.2)]
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.047), @C.as.I.impl [concrete]
// CHECK:STDOUT: %Main.import_ref.eb1c17.3: %empty_tuple.type = import_ref Main//b, loc7_14, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
// CHECK:STDOUT: %Main.import_ref.eb1c17.4: %empty_tuple.type = import_ref Main//b, loc7_14, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
// CHECK:STDOUT: %Main.import_ref.eb1c17.5: %empty_tuple.type = import_ref Main//b, loc7_14, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
// CHECK:STDOUT: %Main.import_ref.eb1c17.6: %empty_tuple.type = import_ref Main//b, loc7_14, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
// CHECK:STDOUT: %Main.F.5a8: @C.as.I.impl.%C.as.I.impl.F.type.1 (%C.as.I.impl.F.type.0daaa1.1) = import_ref Main//b, F, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.1 (constants.%C.as.I.impl.F.49c1ac.1)]
// CHECK:STDOUT: %Main.import_ref.fcc: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.ed4) = import_ref Main//b, inst153 [indirect], loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.486)]
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Main.import_ref.fcc), @T.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Main.import_ref.fcc: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.ed4) = import_ref Main//b, inst179 [indirect], loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.486)]
// CHECK:STDOUT: %Destroy.impl_witness_table.18d = impl_witness_table (%Main.import_ref.fcc), @T.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -459,7 +539,21 @@ fn G() {
// CHECK:STDOUT: witness = (imports.%Main.F.8b9)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.I.impl(imports.%Main.import_ref.eb1c17.2: %empty_tuple.type) [from "b.carbon"] {
// CHECK:STDOUT: generic impl @C.as.Destroy.impl(imports.%Main.import_ref.eb1c17.2: %empty_tuple.type) [from "b.carbon"] {
// CHECK:STDOUT: %X: %empty_tuple.type = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table.629, @C.as.Destroy.impl(%X) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.763)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%X) [symbolic = %C.as.Destroy.impl.Op.type (constants.%C.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = struct_value () [symbolic = %C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%Main.import_ref.dbf7cd.1 as imports.%Main.import_ref.cb9 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%Main.import_ref.404
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.I.impl(imports.%Main.import_ref.eb1c17.4: %empty_tuple.type) [from "b.carbon"] {
// CHECK:STDOUT: %Y: %empty_tuple.type = bind_symbolic_name Y, 0 [symbolic = %Y (constants.%Y)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%Y) [symbolic = %C (constants.%C.13320f.2)]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table, @C.as.I.impl(%Y) [symbolic = %I.impl_witness (constants.%I.impl_witness.7d9)]
@@ -470,7 +564,7 @@ fn G() {
// CHECK:STDOUT: %C.as.I.impl.F.type.2: type = fn_type @C.as.I.impl.F.2, @C.as.I.impl(%Y) [symbolic = %C.as.I.impl.F.type.2 (constants.%C.as.I.impl.F.type.0daaa1.2)]
// CHECK:STDOUT: %C.as.I.impl.F.2: @C.as.I.impl.%C.as.I.impl.F.type.2 (%C.as.I.impl.F.type.0daaa1.2) = struct_value () [symbolic = %C.as.I.impl.F.2 (constants.%C.as.I.impl.F.49c1ac.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%Main.import_ref.dbf as imports.%Main.import_ref.f50 {
// CHECK:STDOUT: impl: imports.%Main.import_ref.dbf7cd.2 as imports.%Main.import_ref.f50 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%Main.import_ref.f89
// CHECK:STDOUT: }
@@ -528,7 +622,18 @@ fn G() {
// CHECK:STDOUT: fn;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.I.impl.F.1(imports.%Main.import_ref.eb1c17.3: %empty_tuple.type) [from "b.carbon"] {
// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(imports.%Main.import_ref.eb1c17.3: %empty_tuple.type) [from "b.carbon"] {
// CHECK:STDOUT: %X: %empty_tuple.type = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%X) [symbolic = %C (constants.%C.13320f.1)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.40dc71.1)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.2a1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.I.impl.F.1(imports.%Main.import_ref.eb1c17.5: %empty_tuple.type) [from "b.carbon"] {
// CHECK:STDOUT: %Y: %empty_tuple.type = bind_symbolic_name Y, 0 [symbolic = %Y (constants.%Y)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%Y) [symbolic = %C (constants.%C.13320f.2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %C [symbolic = %pattern_type (constants.%pattern_type.ccc)]
@@ -539,7 +644,7 @@ fn G() {
// CHECK:STDOUT: fn;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.I.impl.F.2(imports.%Main.import_ref.eb1c17.4: %empty_tuple.type) [from "b.carbon"] {
// CHECK:STDOUT: generic fn @C.as.I.impl.F.2(imports.%Main.import_ref.eb1c17.6: %empty_tuple.type) [from "b.carbon"] {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Y: %empty_tuple.type = bind_symbolic_name Y, 0 [symbolic = %Y (constants.%Y)]
// CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F.1, @C.as.I.impl(%Y) [symbolic = %C.as.I.impl.F.type (constants.%C.as.I.impl.F.type.0daaa1.1)]
@@ -553,7 +658,7 @@ fn G() {
// CHECK:STDOUT: %.1: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.1 (constants.%.5fd)]
// CHECK:STDOUT: %impl.elem0: @C.as.I.impl.F.2.%.1 (%.5fd) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.40d)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.40dc71.2)]
// CHECK:STDOUT: %require_complete.2: <witness> = require_complete_type %ptr [symbolic = %require_complete.2 (constants.%require_complete.0b0)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn [thunk imports.%Main.F.5a8];
@@ -571,6 +676,18 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.F(constants.%Self.826) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%X) {
// CHECK:STDOUT: %X => constants.%X
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.763
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl.Op(constants.%X) {
// CHECK:STDOUT: %X => constants.%X
// CHECK:STDOUT: %C => constants.%C.13320f.1
// CHECK:STDOUT: %ptr => constants.%ptr.40dc71.1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2a1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C(constants.%Y) {
// CHECK:STDOUT: %X => constants.%Y
// CHECK:STDOUT:
@@ -639,3 +756,8 @@ fn G() {
// CHECK:STDOUT: %require_complete => constants.%complete_type.357
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%empty_tuple) {
// CHECK:STDOUT: %X => constants.%empty_tuple
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.880
// CHECK:STDOUT: }
// CHECK:STDOUT:
+374 -94
View File
@@ -211,17 +211,34 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Action.generic: %Action.type.29c = struct_value () [concrete]
// CHECK:STDOUT: %Action.type.cca: type = facet_type <@Action, @Action(%T)> [symbolic]
// CHECK:STDOUT: %Self.e98: %Action.type.cca = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.e98 [symbolic]
// CHECK:STDOUT: %pattern_type.8db: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.as_type.566: type = facet_access_type %Self.e98 [symbolic]
// CHECK:STDOUT: %pattern_type.8db: type = pattern_type %Self.as_type.566 [symbolic]
// CHECK:STDOUT: %Action.Op.type.036: type = fn_type @Action.Op, @Action(%T) [symbolic]
// CHECK:STDOUT: %Action.Op.6ed: %Action.Op.type.036 = struct_value () [symbolic]
// CHECK:STDOUT: %Action.assoc_type.32e: type = assoc_entity_type @Action, @Action(%T) [symbolic]
// CHECK:STDOUT: %assoc0.268: %Action.assoc_type.32e = assoc_entity element0, @Action.%Action.Op.decl [symbolic]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.b44: <witness> = impl_witness @A.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
// CHECK:STDOUT: %pattern_type.5f8: type = pattern_type %ptr.6db [concrete]
// CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.40d: <witness> = impl_witness @B.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %pattern_type.960: type = pattern_type %ptr.e79 [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.edd: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %Action.type.cb0: type = facet_type <@Action, @Action(%B)> [concrete]
// CHECK:STDOUT: %Self.0d1: %Action.type.cb0 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Action.Op.type.54d: type = fn_type @Action.Op, @Action(%B) [concrete]
@@ -240,9 +257,11 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -298,14 +317,14 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %self.patt: @Action.Op.%pattern_type (%pattern_type.8db) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @Action.Op.%pattern_type (%pattern_type.8db) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @Action.Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %self.param: @Action.Op.%Self.as_type.loc5_15.1 (%Self.as_type.566) = value_param call_param0
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type.566)] {
// CHECK:STDOUT: %.loc5_15.2: @Action.Op.%Action.type (%Action.type.cca) = specific_constant @Action.%Self.1, @Action(constants.%T) [symbolic = %Self (constants.%Self.e98)]
// CHECK:STDOUT: %Self.ref: @Action.Op.%Action.type (%Action.type.cca) = name_ref Self, %.loc5_15.2 [symbolic = %Self (constants.%Self.e98)]
// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc5_15.3: type = converted %Self.ref, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type.566)]
// CHECK:STDOUT: %.loc5_15.3: type = converted %Self.ref, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type.566)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @Action.Op.%Self.as_type.loc5_15.1 (%Self.as_type) = bind_name self, %self.param
// CHECK:STDOUT: %self: @Action.Op.%Self.as_type.loc5_15.1 (%Self.as_type.566) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0.loc5_22.1: @Action.%Action.assoc_type (%Action.assoc_type.32e) = assoc_entity element0, %Action.Op.decl [symbolic = %assoc0.loc5_22.2 (constants.%assoc0.268)]
// CHECK:STDOUT:
@@ -316,6 +335,54 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Destroy.impl: constants.%A as constants.%Destroy.type {
// CHECK:STDOUT: %A.as.Destroy.impl.Op.decl: %A.as.Destroy.impl.Op.type = fn_decl @A.as.Destroy.impl.Op [concrete = constants.%A.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.5f8 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.5f8 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc8: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.6db = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
// CHECK:STDOUT: %self: %ptr.6db = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %A.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @A.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @B.as.Destroy.impl: constants.%B as constants.%Destroy.type {
// CHECK:STDOUT: %B.as.Destroy.impl.Op.decl: %B.as.Destroy.impl.Op.type = fn_decl @B.as.Destroy.impl.Op [concrete = constants.%B.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.960 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.960 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.e79 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [concrete = constants.%B]
// CHECK:STDOUT: %self: %ptr.e79 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %B.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @B.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc10: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Action.impl: %A.ref as %Action.type {
// CHECK:STDOUT: %A.as.Action.impl.Op.decl: %A.as.Action.impl.Op.type = fn_decl @A.as.Action.impl.Op [concrete = constants.%A.as.Action.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.c10 = binding_pattern self [concrete]
@@ -332,6 +399,9 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @A {
// CHECK:STDOUT: impl_decl @A.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A.as.Destroy.impl.%A.as.Destroy.impl.Op.decl), @A.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.b44]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -341,6 +411,9 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B {
// CHECK:STDOUT: impl_decl @B.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@B.as.Destroy.impl.%B.as.Destroy.impl.Op.decl), @B.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.40d]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -350,6 +423,9 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.edd]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -362,12 +438,18 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T)> [symbolic = %Action.type (constants.%Action.type.cca)]
// CHECK:STDOUT: %Self: @Action.Op.%Action.type (%Action.type.cca) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.e98)]
// CHECK:STDOUT: %Self.as_type.loc5_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc5_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type.566)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_15.1 [symbolic = %pattern_type (constants.%pattern_type.8db)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @Action.Op.%Self.as_type.loc5_15.1 (%Self.as_type));
// CHECK:STDOUT: fn(%self.param: @Action.Op.%Self.as_type.loc5_15.1 (%Self.as_type.566));
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.as.Destroy.impl.Op(%self.param: %ptr.6db) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B.as.Destroy.impl.Op(%self.param: %ptr.e79) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.as.Action.impl.Op(%self.param: %A) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
@@ -395,7 +477,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %Action.type => constants.%Action.type.cca
// CHECK:STDOUT: %Self => constants.%Self.e98
// CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%Self.as_type
// CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%Self.as_type.566
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.8db
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -422,9 +504,12 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: --- action.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %Action.type.29c: type = generic_interface_type @Action [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %Action.generic: %Action.type.29c = struct_value () [concrete]
@@ -432,7 +517,6 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Action.type.cca: type = facet_type <@Action, @Action(%T)> [symbolic]
// CHECK:STDOUT: %Self.e98: %Action.type.cca = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Action.type.cb0: type = facet_type <@Action, @Action(%B)> [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %Action.Op.type.036: type = fn_type @Action.Op, @Action(%T) [symbolic]
// CHECK:STDOUT: %Action.Op.6ed: %Action.Op.type.036 = struct_value () [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.e98 [symbolic]
@@ -461,19 +545,33 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.B: type = import_ref Main//action, B, loaded [concrete = constants.%B]
// CHECK:STDOUT: %Main.C = import_ref Main//action, C, unloaded
// CHECK:STDOUT: %Main.F = import_ref Main//action, F, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst64 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//action, loc8_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst58 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//action, inst58 [no loc], loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//action, loc8_9, unloaded
// CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//action, loc9_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst102 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//action, inst102 [no loc], loaded [concrete = constants.%B]
// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//action, loc9_9, unloaded
// CHECK:STDOUT: %Main.import_ref.34c = import_ref Main//action, loc10_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.3: <witness> = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst122 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//action, inst122 [no loc], loaded [concrete = constants.%C]
// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.b3d = import_ref Main//action, loc10_9, unloaded
// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)]
// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst27 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.c55: @Action.%Action.assoc_type (%Action.assoc_type.32e) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.f18741.2)]
// CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded
// CHECK:STDOUT: %Main.Op.ae2 = import_ref Main//action, Op, unloaded
// CHECK:STDOUT: %Main.import_ref.995: <witness> = import_ref Main//action, loc12_21, loaded [concrete = constants.%Action.impl_witness]
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst58 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.984: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.bb2: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.cb0]
// CHECK:STDOUT: %Main.import_ref.7b5 = import_ref Main//action, loc13_23, unloaded
@@ -493,7 +591,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: .B = imports.%Main.B
// CHECK:STDOUT: .C = imports.%Main.C
// CHECK:STDOUT: .F = imports.%Main.F
// CHECK:STDOUT: .Core = imports.%Core
// CHECK:STDOUT: .Core = imports.%Core.ece
// CHECK:STDOUT: .G = %G.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import.loc2_22.1 = import <none>
@@ -524,28 +622,53 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.ddc
// CHECK:STDOUT: .Op = imports.%Main.import_ref.c55
// CHECK:STDOUT: witness = (imports.%Main.Op)
// CHECK:STDOUT: witness = (imports.%Main.Op.ae2)
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Destroy.impl: imports.%Main.import_ref.93c as imports.%Main.import_ref.cb9298.1 [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.2d5
// CHECK:STDOUT: witness = imports.%Main.import_ref.7b0
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @B.as.Destroy.impl: imports.%Main.import_ref.bfe as imports.%Main.import_ref.cb9298.2 [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.fc3
// CHECK:STDOUT: witness = imports.%Main.import_ref.ae7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: imports.%Main.import_ref.c0c as imports.%Main.import_ref.cb9298.3 [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.b3d
// CHECK:STDOUT: witness = imports.%Main.import_ref.34c
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Action.impl: imports.%Main.import_ref.984 as imports.%Main.import_ref.bb2 [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.7b5
// CHECK:STDOUT: witness = imports.%Main.import_ref.995
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B [from "action.carbon"] {
// CHECK:STDOUT: class @A [from "action.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.1
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.da3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B [from "action.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.2
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.54a
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @A [from "action.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.2
// CHECK:STDOUT: class @C [from "action.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.3
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.da3
// CHECK:STDOUT: .Self = imports.%Main.import_ref.2c4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Action.Op(imports.%Main.import_ref.5ab3ec.2: type, imports.%Main.import_ref.835: @Action.%Action.type (%Action.type.cca)) [from "action.carbon"] {
@@ -601,16 +724,18 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: --- fail_action.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %Action.type.29c: type = generic_interface_type @Action [concrete]
// CHECK:STDOUT: %Action.generic: %Action.type.29c = struct_value () [concrete]
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %Action.type.cca: type = facet_type <@Action, @Action(%T)> [symbolic]
// CHECK:STDOUT: %Self.e98: %Action.type.cca = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Action.type.cb0: type = facet_type <@Action, @Action(%B)> [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %Action.Op.type.036: type = fn_type @Action.Op, @Action(%T) [symbolic]
// CHECK:STDOUT: %Action.Op.6ed: %Action.Op.type.036 = struct_value () [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.e98 [symbolic]
@@ -625,7 +750,6 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %Action.type.e2b: type = facet_type <@Action, @Action(%C)> [concrete]
// CHECK:STDOUT: %Self.4bb: %Action.type.e2b = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Action.Op.type.5ad: type = fn_type @Action.Op, @Action(%C) [concrete]
@@ -641,19 +765,33 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.B = import_ref Main//action, B, unloaded
// CHECK:STDOUT: %Main.C: type = import_ref Main//action, C, loaded [concrete = constants.%C]
// CHECK:STDOUT: %Main.F = import_ref Main//action, F, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst64 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//action, loc8_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst58 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//action, inst58 [no loc], loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//action, loc8_9, unloaded
// CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//action, loc9_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst102 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//action, inst102 [no loc], loaded [concrete = constants.%B]
// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//action, loc9_9, unloaded
// CHECK:STDOUT: %Main.import_ref.34c = import_ref Main//action, loc10_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.3: <witness> = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst122 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//action, inst122 [no loc], loaded [concrete = constants.%C]
// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.b3d = import_ref Main//action, loc10_9, unloaded
// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)]
// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst27 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.c55: @Action.%Action.assoc_type (%Action.assoc_type.32e) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.f18)]
// CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded
// CHECK:STDOUT: %Main.Op.ae2 = import_ref Main//action, Op, unloaded
// CHECK:STDOUT: %Main.import_ref.19c = import_ref Main//action, loc12_21, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst58 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.984: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.bb2: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.cb0]
// CHECK:STDOUT: %Main.import_ref.7b5 = import_ref Main//action, loc13_23, unloaded
@@ -661,8 +799,6 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst27 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)]
// CHECK:STDOUT: %Main.import_ref.1f6: @Action.%Action.Op.type (%Action.Op.type.036) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.Op (constants.%Action.Op.6ed)]
// CHECK:STDOUT: %Main.import_ref.0e3753.1 = import_ref Main//action, loc5_22, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.3: <witness> = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst68 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.0e3753.2 = import_ref Main//action, loc5_22, unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -673,7 +809,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: .B = imports.%Main.B
// CHECK:STDOUT: .C = imports.%Main.C
// CHECK:STDOUT: .F = imports.%Main.F
// CHECK:STDOUT: .Core = imports.%Core
// CHECK:STDOUT: .Core = imports.%Core.ece
// CHECK:STDOUT: .G = %G.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import.loc2_22.1 = import <none>
@@ -704,28 +840,46 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.ddc
// CHECK:STDOUT: .Op = imports.%Main.import_ref.c55
// CHECK:STDOUT: witness = (imports.%Main.Op)
// CHECK:STDOUT: witness = (imports.%Main.Op.ae2)
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Destroy.impl: imports.%Main.import_ref.93c as imports.%Main.import_ref.cb9298.1 [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.2d5
// CHECK:STDOUT: witness = imports.%Main.import_ref.7b0
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @B.as.Destroy.impl: imports.%Main.import_ref.bfe as imports.%Main.import_ref.cb9298.2 [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.fc3
// CHECK:STDOUT: witness = imports.%Main.import_ref.ae7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: imports.%Main.import_ref.c0c as imports.%Main.import_ref.cb9298.3 [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.b3d
// CHECK:STDOUT: witness = imports.%Main.import_ref.34c
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Action.impl: imports.%Main.import_ref.984 as imports.%Main.import_ref.bb2 [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.7b5
// CHECK:STDOUT: witness = imports.%Main.import_ref.19c
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B [from "action.carbon"] {
// CHECK:STDOUT: class @A [from "action.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.1
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.54a
// CHECK:STDOUT: .Self = imports.%Main.import_ref.da3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @A [from "action.carbon"] {
// CHECK:STDOUT: class @B [from "action.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.2
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.da3
// CHECK:STDOUT: .Self = imports.%Main.import_ref.54a
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "action.carbon"] {
@@ -806,15 +960,27 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Factory.Make.737: %Factory.Make.type.598 = struct_value () [symbolic]
// CHECK:STDOUT: %Factory.assoc_type.207: type = assoc_entity_type @Factory, @Factory(%T) [symbolic]
// CHECK:STDOUT: %assoc0.b3c: %Factory.assoc_type.207 = assoc_entity element0, @Factory.%Factory.Make.decl [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.9ba [symbolic]
// CHECK:STDOUT: %pattern_type.5ea: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.as_type.56c: type = facet_access_type %Self.9ba [symbolic]
// CHECK:STDOUT: %pattern_type.5ea: type = pattern_type %Self.as_type.56c [symbolic]
// CHECK:STDOUT: %Factory.Method.type.7ee: type = fn_type @Factory.Method, @Factory(%T) [symbolic]
// CHECK:STDOUT: %Factory.Method.a71: %Factory.Method.type.7ee = struct_value () [symbolic]
// CHECK:STDOUT: %assoc1.e30: %Factory.assoc_type.207 = assoc_entity element1, @Factory.%Factory.Method.decl [symbolic]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.b44: <witness> = impl_witness @A.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
// CHECK:STDOUT: %pattern_type.5f8: type = pattern_type %ptr.6db [concrete]
// CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.40d: <witness> = impl_witness @B.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %pattern_type.960: type = pattern_type %ptr.e79 [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %Factory.type.a5d: type = facet_type <@Factory, @Factory(%B)> [concrete]
// CHECK:STDOUT: %Self.187: %Factory.type.a5d = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Factory.Make.type.c59: type = fn_type @Factory.Make, @Factory(%B) [concrete]
@@ -836,9 +1002,11 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -898,14 +1066,14 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %return.param_patt: @Factory.Method.%pattern_type.loc8_27 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Factory.%T.loc4_19.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %self.param: @Factory.Method.%Self.as_type.loc8_19.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.3 [symbolic = %Self.as_type.loc8_19.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %self.param: @Factory.Method.%Self.as_type.loc8_19.1 (%Self.as_type.56c) = value_param call_param0
// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.3 [symbolic = %Self.as_type.loc8_19.1 (constants.%Self.as_type.56c)] {
// CHECK:STDOUT: %.loc8_19.2: @Factory.Method.%Factory.type (%Factory.type.c96) = specific_constant @Factory.%Self.1, @Factory(constants.%T) [symbolic = %Self (constants.%Self.9ba)]
// CHECK:STDOUT: %Self.ref: @Factory.Method.%Factory.type (%Factory.type.c96) = name_ref Self, %.loc8_19.2 [symbolic = %Self (constants.%Self.9ba)]
// CHECK:STDOUT: %Self.as_type.loc8_19.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_19.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc8_19.3: type = converted %Self.ref, %Self.as_type.loc8_19.2 [symbolic = %Self.as_type.loc8_19.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc8_19.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_19.1 (constants.%Self.as_type.56c)]
// CHECK:STDOUT: %.loc8_19.3: type = converted %Self.ref, %Self.as_type.loc8_19.2 [symbolic = %Self.as_type.loc8_19.1 (constants.%Self.as_type.56c)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @Factory.Method.%Self.as_type.loc8_19.1 (%Self.as_type) = bind_name self, %self.param
// CHECK:STDOUT: %self: @Factory.Method.%Self.as_type.loc8_19.1 (%Self.as_type.56c) = bind_name self, %self.param
// CHECK:STDOUT: %return.param: ref @Factory.Method.%T (%T) = out_param call_param1
// CHECK:STDOUT: %return: ref @Factory.Method.%T (%T) = return_slot %return.param
// CHECK:STDOUT: }
@@ -920,6 +1088,38 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Destroy.impl: constants.%A as constants.%Destroy.type {
// CHECK:STDOUT: %A.as.Destroy.impl.Op.decl: %A.as.Destroy.impl.Op.type = fn_decl @A.as.Destroy.impl.Op [concrete = constants.%A.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.5f8 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.5f8 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc11: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.6db = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
// CHECK:STDOUT: %self: %ptr.6db = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %A.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @A.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @B.as.Destroy.impl: constants.%B as constants.%Destroy.type {
// CHECK:STDOUT: %B.as.Destroy.impl.Op.decl: %B.as.Destroy.impl.Op.type = fn_decl @B.as.Destroy.impl.Op [concrete = constants.%B.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.960 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.960 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc12: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.e79 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [concrete = constants.%B]
// CHECK:STDOUT: %self: %ptr.e79 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %B.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @B.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Factory.impl: %A.ref as %Factory.type {
// CHECK:STDOUT: %A.as.Factory.impl.Make.decl: %A.as.Factory.impl.Make.type = fn_decl @A.as.Factory.impl.Make [concrete = constants.%A.as.Factory.impl.Make] {
// CHECK:STDOUT: %return.patt: %pattern_type.049 = return_slot_pattern [concrete]
@@ -951,6 +1151,9 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @A {
// CHECK:STDOUT: impl_decl @A.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A.as.Destroy.impl.%A.as.Destroy.impl.Op.decl), @A.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.b44]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -960,6 +1163,9 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B {
// CHECK:STDOUT: impl_decl @B.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@B.as.Destroy.impl.%B.as.Destroy.impl.Op.decl), @B.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.40d]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -979,13 +1185,17 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.c96)]
// CHECK:STDOUT: %Self: @Factory.Method.%Factory.type (%Factory.type.c96) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.9ba)]
// CHECK:STDOUT: %Self.as_type.loc8_19.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_19.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc8_19.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_19.1 (constants.%Self.as_type.56c)]
// CHECK:STDOUT: %pattern_type.loc8_13: type = pattern_type %Self.as_type.loc8_19.1 [symbolic = %pattern_type.loc8_13 (constants.%pattern_type.5ea)]
// CHECK:STDOUT: %pattern_type.loc8_27: type = pattern_type %T [symbolic = %pattern_type.loc8_27 (constants.%pattern_type.7dc)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @Factory.Method.%Self.as_type.loc8_19.1 (%Self.as_type)) -> @Factory.Method.%T (%T);
// CHECK:STDOUT: fn(%self.param: @Factory.Method.%Self.as_type.loc8_19.1 (%Self.as_type.56c)) -> @Factory.Method.%T (%T);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.as.Destroy.impl.Op(%self.param: %ptr.6db) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B.as.Destroy.impl.Op(%self.param: %ptr.e79) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.as.Factory.impl.Make() -> %B;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.as.Factory.impl.Method(%self.param: %A) -> %B;
@@ -1003,7 +1213,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %Factory.type => constants.%Factory.type.c96
// CHECK:STDOUT: %Self => constants.%Self.9ba
// CHECK:STDOUT: %Self.as_type.loc8_19.1 => constants.%Self.as_type
// CHECK:STDOUT: %Self.as_type.loc8_19.1 => constants.%Self.as_type.56c
// CHECK:STDOUT: %pattern_type.loc8_13 => constants.%pattern_type.5ea
// CHECK:STDOUT: %pattern_type.loc8_27 => constants.%pattern_type.7dc
// CHECK:STDOUT: }
@@ -1040,9 +1250,11 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: --- factory.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Factory.type.1a8: type = generic_interface_type @Factory [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %Factory.generic: %Factory.type.1a8 = struct_value () [concrete]
@@ -1050,7 +1262,6 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Factory.type.c96: type = facet_type <@Factory, @Factory(%T)> [symbolic]
// CHECK:STDOUT: %Self.9ba: %Factory.type.c96 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Factory.type.a5d: type = facet_type <@Factory, @Factory(%B)> [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %Factory.Make.type.598: type = fn_type @Factory.Make, @Factory(%T) [symbolic]
// CHECK:STDOUT: %Factory.Make.737: %Factory.Make.type.598 = struct_value () [symbolic]
// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
@@ -1078,11 +1289,10 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %.711: type = fn_type_with_self_type %Factory.Make.type.c59, %Factory.facet [concrete]
// CHECK:STDOUT: %A.as.Factory.impl.Make.type: type = fn_type @A.as.Factory.impl.Make [concrete]
// CHECK:STDOUT: %A.as.Factory.impl.Make: %A.as.Factory.impl.Make.type = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.1a6: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%B) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.3c2: %T.as.Destroy.impl.Op.type.1a6 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.5cf: <witness> = impl_witness imports.%Destroy.impl_witness_table.f6b [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.3c2, @T.as.Destroy.impl.Op(%B) [concrete]
// CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
// CHECK:STDOUT: %InstanceB.type: type = fn_type @InstanceB [concrete]
// CHECK:STDOUT: %InstanceB: %InstanceB.type = struct_value () [concrete]
@@ -1096,13 +1306,23 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.Factory: %Factory.type.1a8 = import_ref Main//factory, Factory, loaded [concrete = constants.%Factory.generic]
// CHECK:STDOUT: %Main.A: type = import_ref Main//factory, A, loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.B: type = import_ref Main//factory, B, loaded [concrete = constants.%B]
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type.357]
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst86 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//factory, loc11_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst80 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//factory, inst80 [no loc], loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst83 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//factory, loc11_9, unloaded
// CHECK:STDOUT: %Main.import_ref.6c7: <witness> = import_ref Main//factory, loc12_9, loaded [concrete = constants.%Destroy.impl_witness.5cf]
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst124 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//factory, inst124 [no loc], loaded [concrete = constants.%B]
// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst83 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//factory, loc12_9, unloaded
// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)]
// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst27 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.46c: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.46d25f.2)]
@@ -1110,8 +1330,6 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded
// CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded
// CHECK:STDOUT: %Main.import_ref.6fd: <witness> = import_ref Main//factory, loc14_22, loaded [concrete = constants.%Factory.impl_witness]
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type.357]
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst80 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.984: type = import_ref Main//factory, loc14_6, loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.bd2: type = import_ref Main//factory, loc14_20, loaded [concrete = constants.%Factory.type.a5d]
// CHECK:STDOUT: %Main.import_ref.a27 = import_ref Main//factory, loc15_17, unloaded
@@ -1129,6 +1347,8 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.import_ref.7dd: %A.as.Factory.impl.Method.type = import_ref Main//factory, loc16_31, loaded [concrete = constants.%A.as.Factory.impl.Method]
// CHECK:STDOUT: %Factory.impl_witness_table = impl_witness_table (%Main.import_ref.9ec, %Main.import_ref.7dd), @A.as.Factory.impl [concrete]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.82a: %B.as.Destroy.impl.Op.type = import_ref Main//factory, loc12_9, loaded [concrete = constants.%B.as.Destroy.impl.Op]
// CHECK:STDOUT: %Destroy.impl_witness_table.f6b = impl_witness_table (%Main.import_ref.82a), @B.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Main.import_ref.46fc3c.2 = import_ref Main//factory, loc8_31, unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1137,7 +1357,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: .Factory = imports.%Main.Factory
// CHECK:STDOUT: .A = imports.%Main.A
// CHECK:STDOUT: .B = imports.%Main.B
// CHECK:STDOUT: .Core = imports.%Core
// CHECK:STDOUT: .Core = imports.%Core.ece
// CHECK:STDOUT: .MakeB = %MakeB.decl
// CHECK:STDOUT: .InstanceB = %InstanceB.decl
// CHECK:STDOUT: }
@@ -1190,6 +1410,18 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Destroy.impl: imports.%Main.import_ref.93c as imports.%Main.import_ref.cb9298.1 [from "factory.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.2d5
// CHECK:STDOUT: witness = imports.%Main.import_ref.7b0
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @B.as.Destroy.impl: imports.%Main.import_ref.bfe as imports.%Main.import_ref.cb9298.2 [from "factory.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.fc3
// CHECK:STDOUT: witness = imports.%Main.import_ref.6c7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Factory.impl: imports.%Main.import_ref.984 as imports.%Main.import_ref.bd2 [from "factory.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Make = imports.%Main.import_ref.a27
@@ -1197,18 +1429,18 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: witness = imports.%Main.import_ref.6fd
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B [from "factory.carbon"] {
// CHECK:STDOUT: class @A [from "factory.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.1
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.54a
// CHECK:STDOUT: .Self = imports.%Main.import_ref.da3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @A [from "factory.carbon"] {
// CHECK:STDOUT: class @B [from "factory.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.2
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.da3
// CHECK:STDOUT: .Self = imports.%Main.import_ref.54a
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Factory.Make(imports.%Main.import_ref.5ab3ec.2: type, imports.%Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96)) [from "factory.carbon"] {
@@ -1242,16 +1474,16 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %impl.elem0: %.711 = impl_witness_access constants.%Factory.impl_witness, element0 [concrete = constants.%A.as.Factory.impl.Make]
// CHECK:STDOUT: %.loc4: ref %B = splice_block %return {}
// CHECK:STDOUT: %A.as.Factory.impl.Make.call: init %B = call %impl.elem0() to %.loc4
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc4, constants.%T.as.Destroy.impl.Op.3c2
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.3c2, @T.as.Destroy.impl.Op(constants.%B) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc4, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %B.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc4, constants.%B.as.Destroy.impl.Op
// CHECK:STDOUT: %addr: %ptr.e79 = addr_of %.loc4
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr)
// CHECK:STDOUT: %B.as.Destroy.impl.Op.call: init %empty_tuple.type = call %B.as.Destroy.impl.Op.bound(%addr)
// CHECK:STDOUT: return %A.as.Factory.impl.Make.call to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.as.Factory.impl.Make [from "factory.carbon"];
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B.as.Destroy.impl.Op = "no_op" [from "factory.carbon"];
// CHECK:STDOUT:
// CHECK:STDOUT: fn @InstanceB(%a.param: %A) -> %return.param: %B {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.ref: %A = name_ref a, %a
@@ -1261,14 +1493,12 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %.loc8: %Factory.assoc_type.579 = specific_constant imports.%Main.import_ref.2e4, @Factory(constants.%B) [concrete = constants.%assoc1.a48]
// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.579 = name_ref Method, %.loc8 [concrete = constants.%assoc1.a48]
// CHECK:STDOUT: %impl.elem1: %.fed = impl_witness_access constants.%Factory.impl_witness, element1 [concrete = constants.%A.as.Factory.impl.Method]
// CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %a.ref, %impl.elem1
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %a.ref, %impl.elem1
// CHECK:STDOUT: %.loc7: ref %B = splice_block %return {}
// CHECK:STDOUT: %A.as.Factory.impl.Method.call: init %B = call %bound_method.loc8(%a.ref) to %.loc7
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc7, constants.%T.as.Destroy.impl.Op.3c2
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.3c2, @T.as.Destroy.impl.Op(constants.%B) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc7: <bound method> = bound_method %.loc7, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %A.as.Factory.impl.Method.call: init %B = call %bound_method(%a.ref) to %.loc7
// CHECK:STDOUT: %B.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc7, constants.%B.as.Destroy.impl.Op
// CHECK:STDOUT: %addr: %ptr.e79 = addr_of %.loc7
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc7(%addr)
// CHECK:STDOUT: %B.as.Destroy.impl.Op.call: init %empty_tuple.type = call %B.as.Destroy.impl.Op.bound(%addr)
// CHECK:STDOUT: return %A.as.Factory.impl.Method.call to %return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1310,16 +1540,17 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: --- fail_factory.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Factory.type.1a8: type = generic_interface_type @Factory [concrete]
// CHECK:STDOUT: %Factory.generic: %Factory.type.1a8 = struct_value () [concrete]
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %Factory.type.c96: type = facet_type <@Factory, @Factory(%T)> [symbolic]
// CHECK:STDOUT: %Self.9ba: %Factory.type.c96 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Factory.type.a5d: type = facet_type <@Factory, @Factory(%B)> [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %Factory.Make.type.598: type = fn_type @Factory.Make, @Factory(%T) [symbolic]
// CHECK:STDOUT: %Factory.Make.737: %Factory.Make.type.598 = struct_value () [symbolic]
// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
@@ -1327,8 +1558,8 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %assoc0.fe4: %Factory.assoc_type.207 = assoc_entity element0, imports.%Main.import_ref.1aa [symbolic]
// CHECK:STDOUT: %Factory.Method.type.7ee: type = fn_type @Factory.Method, @Factory(%T) [symbolic]
// CHECK:STDOUT: %Factory.Method.a71: %Factory.Method.type.7ee = struct_value () [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.9ba [symbolic]
// CHECK:STDOUT: %pattern_type.5ea: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.as_type.56c: type = facet_access_type %Self.9ba [symbolic]
// CHECK:STDOUT: %pattern_type.5ea: type = pattern_type %Self.as_type.56c [symbolic]
// CHECK:STDOUT: %assoc1.ea6: %Factory.assoc_type.207 = assoc_entity element1, imports.%Main.import_ref.5be [symbolic]
// CHECK:STDOUT: %Self.187: %Factory.type.a5d = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Factory.Make.type.c59: type = fn_type @Factory.Make, @Factory(%B) [concrete]
@@ -1339,6 +1570,12 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Factory.Method.ea9: %Factory.Method.type.117 = struct_value () [concrete]
// CHECK:STDOUT: %assoc1.535: %Factory.assoc_type.579 = assoc_entity element1, imports.%Main.import_ref.46fc3c.1 [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
// CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [concrete]
// CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [concrete]
@@ -1362,13 +1599,24 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.Factory: %Factory.type.1a8 = import_ref Main//factory, Factory, loaded [concrete = constants.%Factory.generic]
// CHECK:STDOUT: %Main.A: type = import_ref Main//factory, A, loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.B = import_ref Main//factory, B, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//default
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst86 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//factory, loc11_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst80 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//factory, inst80 [no loc], loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst83 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//factory, loc11_9, unloaded
// CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//factory, loc12_9, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst124 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//factory, inst124 [no loc], loaded [concrete = constants.%B]
// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst83 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//factory, loc12_9, unloaded
// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)]
// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst27 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.46c: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.46d)]
@@ -1376,8 +1624,6 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded
// CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded
// CHECK:STDOUT: %Main.import_ref.4c3 = import_ref Main//factory, loc14_22, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst80 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.984: type = import_ref Main//factory, loc14_6, loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.bd2: type = import_ref Main//factory, loc14_20, loaded [concrete = constants.%Factory.type.a5d]
// CHECK:STDOUT: %Main.import_ref.a27 = import_ref Main//factory, loc15_17, unloaded
@@ -1390,6 +1636,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.import_ref.5be: @Factory.%Factory.Method.type (%Factory.Method.type.7ee) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.Method (constants.%Factory.Method.a71)]
// CHECK:STDOUT: %Main.import_ref.21018a.1 = import_ref Main//factory, loc6_17, unloaded
// CHECK:STDOUT: %Main.import_ref.46fc3c.1 = import_ref Main//factory, loc8_31, unloaded
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.21018a.2 = import_ref Main//factory, loc6_17, unloaded
// CHECK:STDOUT: %Main.import_ref.46fc3c.2 = import_ref Main//factory, loc8_31, unloaded
// CHECK:STDOUT: }
@@ -1399,7 +1646,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: .Factory = imports.%Main.Factory
// CHECK:STDOUT: .A = imports.%Main.A
// CHECK:STDOUT: .B = imports.%Main.B
// CHECK:STDOUT: .Core = imports.%Core
// CHECK:STDOUT: .Core = imports.%Core.ece
// CHECK:STDOUT: .C = %C.decl
// CHECK:STDOUT: .MakeC = %MakeC.decl
// CHECK:STDOUT: .InstanceC = %InstanceC.decl
@@ -1454,6 +1701,18 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Destroy.impl: imports.%Main.import_ref.93c as imports.%Main.import_ref.cb9298.1 [from "factory.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.2d5
// CHECK:STDOUT: witness = imports.%Main.import_ref.7b0
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @B.as.Destroy.impl: imports.%Main.import_ref.bfe as imports.%Main.import_ref.cb9298.2 [from "factory.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.fc3
// CHECK:STDOUT: witness = imports.%Main.import_ref.ae7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Factory.impl: imports.%Main.import_ref.984 as imports.%Main.import_ref.bd2 [from "factory.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Make = imports.%Main.import_ref.a27
@@ -1461,21 +1720,40 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: witness = imports.%Main.import_ref.4c3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B [from "factory.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.1
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc6: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.54a
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @A [from "factory.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.2
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.1
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.da3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B [from "factory.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.2
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.54a
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1495,13 +1773,15 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.c96)]
// CHECK:STDOUT: %Self: @Factory.Method.%Factory.type (%Factory.type.c96) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.9ba)]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.56c)]
// CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.5ea)]
// CHECK:STDOUT: %pattern_type.2: type = pattern_type %T [symbolic = %pattern_type.2 (constants.%pattern_type.7dc)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @MakeC() -> %return.param: %C {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%Main.A [concrete = constants.%A]
@@ -1552,7 +1832,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %Factory.type => constants.%Factory.type.c96
// CHECK:STDOUT: %Self => constants.%Self.9ba
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.56c
// CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.5ea
// CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.7dc
// CHECK:STDOUT: }
@@ -103,17 +103,19 @@ fn G() {
// CHECK:STDOUT: %C.as.J.impl.JJ.type: type = fn_type @C.as.J.impl.JJ [concrete]
// CHECK:STDOUT: %C.as.J.impl.JJ: %C.as.J.impl.JJ.type = struct_value () [concrete]
// CHECK:STDOUT: %J.facet.5df: %J.type = facet_value %C, (%J.impl_witness) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.bd5: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.8e6: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.663: type = pattern_type %ptr.8e6 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
// CHECK:STDOUT: %.638: type = fn_type_with_self_type %J.JJ.type, %J.facet.5df [concrete]
// CHECK:STDOUT: %facet_value: %facet_type = facet_value %C, (%I.impl_witness, %J.impl_witness) [concrete]
// CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F, @F(%facet_value) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.8e9: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.ddb: %T.as.Destroy.impl.Op.type.8e9 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.8e6: type = ptr_type %C [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.ddb, @T.as.Destroy.impl.Op(%C) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -242,6 +244,22 @@ fn G() {
// CHECK:STDOUT: witness = @C.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.663 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.663 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc30: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.8e6 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.8e6 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
@@ -255,8 +273,11 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@C.as.J.impl.%C.as.J.impl.JJ.decl), @C.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.bd5]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
@@ -368,9 +389,9 @@ fn G() {
// CHECK:STDOUT: %.loc40_75: type = converted %.loc40_71, %as_type.loc40_75 [concrete = constants.%C]
// CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c]
// CHECK:STDOUT: %impl.elem0: %.638 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%C.as.J.impl.JJ]
// CHECK:STDOUT: %bound_method.loc40_77: <bound method> = bound_method %.loc40_8.1, %impl.elem0
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc40_8.1, %impl.elem0
// CHECK:STDOUT: %.loc40_8.2: %C = bind_value %.loc40_8.1
// CHECK:STDOUT: %C.as.J.impl.JJ.call: init %empty_tuple.type = call %bound_method.loc40_77(%.loc40_8.2)
// CHECK:STDOUT: %C.as.J.impl.JJ.call: init %empty_tuple.type = call %bound_method(%.loc40_8.2)
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
// CHECK:STDOUT: %C.ref.loc46_5: type = name_ref C, %C.decl [concrete = constants.%C]
// CHECK:STDOUT: %.loc46_9.1: %empty_struct_type = struct_literal ()
@@ -388,16 +409,12 @@ fn G() {
// CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F.ref, @F(constants.%facet_value) [concrete = constants.%F.specific_fn]
// CHECK:STDOUT: %.loc46_11.2: %C = bind_value %.loc46_11.1
// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc46_11.2)
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc46: <bound method> = bound_method %.loc46_9.2, constants.%T.as.Destroy.impl.Op.ddb
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.ddb, @T.as.Destroy.impl.Op(constants.%C) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc46: <bound method> = bound_method %.loc46_9.2, %T.as.Destroy.impl.Op.specific_fn.1
// CHECK:STDOUT: %C.as.Destroy.impl.Op.bound.loc46: <bound method> = bound_method %.loc46_9.2, constants.%C.as.Destroy.impl.Op
// CHECK:STDOUT: %addr.loc46: %ptr.8e6 = addr_of %.loc46_9.2
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc46: init %empty_tuple.type = call %bound_method.loc46(%addr.loc46)
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound.loc40: <bound method> = bound_method %.loc40_6.2, constants.%T.as.Destroy.impl.Op.ddb
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.ddb, @T.as.Destroy.impl.Op(constants.%C) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc40_6: <bound method> = bound_method %.loc40_6.2, %T.as.Destroy.impl.Op.specific_fn.2
// CHECK:STDOUT: %C.as.Destroy.impl.Op.call.loc46: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound.loc46(%addr.loc46)
// CHECK:STDOUT: %C.as.Destroy.impl.Op.bound.loc40: <bound method> = bound_method %.loc40_6.2, constants.%C.as.Destroy.impl.Op
// CHECK:STDOUT: %addr.loc40: %ptr.8e6 = addr_of %.loc40_6.2
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call.loc40: init %empty_tuple.type = call %bound_method.loc40_6(%addr.loc40)
// CHECK:STDOUT: %C.as.Destroy.impl.Op.call.loc40: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound.loc40(%addr.loc40)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -411,6 +428,8 @@ fn G() {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.8e6) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.II(constants.%Self.826) {
// CHECK:STDOUT: %Self => constants.%Self.826
// CHECK:STDOUT: %Self.as_type.loc16_15.1 => constants.%Self.as_type.b70
@@ -453,7 +472,7 @@ fn G() {
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.893
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.357
// CHECK:STDOUT: %require_complete => constants.%complete_type
// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness
// CHECK:STDOUT: %I.facet.loc26_18.2 => constants.%I.facet.98f
// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
+145 -26
View File
@@ -554,9 +554,9 @@ fn G(x: A) {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
// CHECK:STDOUT: %pattern_type.28f: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.f0c: %HasF.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.as_type.308: type = facet_access_type %Self.f0c [symbolic]
// CHECK:STDOUT: %pattern_type.28f: type = pattern_type %Self.as_type.308 [symbolic]
// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
@@ -567,6 +567,13 @@ fn G(x: A) {
// CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %ptr.7d2: type = ptr_type %C.f2e [symbolic]
// CHECK:STDOUT: %pattern_type.1d2: type = pattern_type %ptr.7d2 [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %HasF.impl_witness.834: <witness> = impl_witness file.%HasF.impl_witness_table, @C.as.HasF.impl(%T) [symbolic]
@@ -589,9 +596,11 @@ fn G(x: A) {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -635,18 +644,18 @@ fn G(x: A) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @HasF {
// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.f0c]
// CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.28f) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.28f) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %self.param: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type.308) = value_param call_param0
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.308)] {
// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.f0c)]
// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.308)]
// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.308)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param
// CHECK:STDOUT: %self: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type.308) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0]
// CHECK:STDOUT:
@@ -656,6 +665,34 @@ fn G(x: A) {
// CHECK:STDOUT: witness = (%HasF.F.decl)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.Destroy.impl(@C.%T.loc8_9.2: type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T) [symbolic = %C.as.Destroy.impl.Op.type (constants.%C.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = struct_value () [symbolic = %C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%C.f2e as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = fn_decl @C.as.Destroy.impl.Op [symbolic = @C.as.Destroy.impl.%C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.1d2) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.1d2) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc8_19.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2) = value_param call_param0
// CHECK:STDOUT: %.loc8_19.2: type = splice_block %Self.ref [symbolic = %C (constants.%C.f2e)] {
// CHECK:STDOUT: %.loc8_19.3: type = specific_constant constants.%C.f2e, @C(constants.%T) [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc8_19.3 [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.HasF.impl(%T.loc10_14.2: type) {
// CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.1 (constants.%T)]
// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(%T.loc10_14.1) [symbolic = %C.loc10_27.1 (constants.%C.f2e)]
@@ -687,6 +724,9 @@ fn G(x: A) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @C.as.Destroy.impl(constants.%T) [symbolic = @C.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -697,11 +737,22 @@ fn G(x: A) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.f0c)]
// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.308)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type (constants.%pattern_type.28f)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type));
// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type.308));
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(@C.%T.loc8_9.2: type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.7d2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.1d2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.HasF.impl.F(@C.as.HasF.impl.%T.loc10_14.2: type) {
@@ -731,9 +782,9 @@ fn G(x: A) {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @HasF.F(constants.%Self) {
// CHECK:STDOUT: %Self => constants.%Self
// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type
// CHECK:STDOUT: specific @HasF.F(constants.%Self.f0c) {
// CHECK:STDOUT: %Self => constants.%Self.f0c
// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.308
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.28f
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -743,6 +794,18 @@ fn G(x: A) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl.Op(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %C => constants.%C.f2e
// CHECK:STDOUT: %ptr => constants.%ptr.7d2
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.1d2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.HasF.impl(constants.%T) {
// CHECK:STDOUT: %T.loc10_14.1 => constants.%T
// CHECK:STDOUT: %C.loc10_27.1 => constants.%C.f2e
@@ -1209,8 +1272,8 @@ fn G(x: A) {
// CHECK:STDOUT: %HasF.generic: %HasF.type.fe3 = struct_value () [concrete]
// CHECK:STDOUT: %HasF.type.901: type = facet_type <@HasF, @HasF(%T)> [symbolic]
// CHECK:STDOUT: %Self.322: %HasF.type.901 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.322 [symbolic]
// CHECK:STDOUT: %pattern_type.dfb: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.as_type.859: type = facet_access_type %Self.322 [symbolic]
// CHECK:STDOUT: %pattern_type.dfb: type = pattern_type %Self.as_type.859 [symbolic]
// CHECK:STDOUT: %HasF.F.type.46c: type = fn_type @HasF.F, @HasF(%T) [symbolic]
// CHECK:STDOUT: %HasF.F.823: %HasF.F.type.46c = struct_value () [symbolic]
// CHECK:STDOUT: %HasF.assoc_type.dd8: type = assoc_entity_type @HasF, @HasF(%T) [symbolic]
@@ -1223,9 +1286,21 @@ fn G(x: A) {
// CHECK:STDOUT: %HasF.facet: %HasF.type.901 = facet_value %T, (%HasF.impl_witness) [symbolic]
// CHECK:STDOUT: %require_complete.4ae: <witness> = require_complete_type %T [symbolic]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.b44: <witness> = impl_witness @A.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
// CHECK:STDOUT: %pattern_type.5f8: type = pattern_type %ptr.6db [concrete]
// CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %B: type = class_type @B [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.40d: <witness> = impl_witness @B.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
// CHECK:STDOUT: %pattern_type.960: type = pattern_type %ptr.e79 [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
@@ -1239,9 +1314,11 @@ fn G(x: A) {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -1298,14 +1375,14 @@ fn G(x: A) {
// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.dfb) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.dfb) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %self.param: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type.859) = value_param call_param0
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.859)] {
// CHECK:STDOUT: %.loc5_14.2: @HasF.F.%HasF.type (%HasF.type.901) = specific_constant @HasF.%Self.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.322)]
// CHECK:STDOUT: %Self.ref: @HasF.F.%HasF.type (%HasF.type.901) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.322)]
// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.859)]
// CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.859)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param
// CHECK:STDOUT: %self: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type.859) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.dd8) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.d31)]
// CHECK:STDOUT:
@@ -1342,7 +1419,42 @@ fn G(x: A) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @A.as.Destroy.impl: constants.%A as constants.%Destroy.type {
// CHECK:STDOUT: %A.as.Destroy.impl.Op.decl: %A.as.Destroy.impl.Op.type = fn_decl @A.as.Destroy.impl.Op [concrete = constants.%A.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.5f8 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.5f8 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc12: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.6db = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
// CHECK:STDOUT: %self: %ptr.6db = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %A.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @A.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @B.as.Destroy.impl: constants.%B as constants.%Destroy.type {
// CHECK:STDOUT: %B.as.Destroy.impl.Op.decl: %B.as.Destroy.impl.Op.type = fn_decl @B.as.Destroy.impl.Op [concrete = constants.%B.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.960 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.960 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc13: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.e79 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [concrete = constants.%B]
// CHECK:STDOUT: %self: %ptr.e79 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %B.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @B.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @A {
// CHECK:STDOUT: impl_decl @A.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A.as.Destroy.impl.%A.as.Destroy.impl.Op.decl), @A.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.b44]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1352,6 +1464,9 @@ fn G(x: A) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B {
// CHECK:STDOUT: impl_decl @B.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@B.as.Destroy.impl.%B.as.Destroy.impl.Op.decl), @B.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.40d]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1364,10 +1479,10 @@ fn G(x: A) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.901)]
// CHECK:STDOUT: %Self: @HasF.F.%HasF.type (%HasF.type.901) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.322)]
// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.859)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type (constants.%pattern_type.dfb)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type));
// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.as_type.loc5_14.1 (%Self.as_type.859));
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) {
@@ -1383,6 +1498,10 @@ fn G(x: A) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.as.Destroy.impl.Op(%self.param: %ptr.6db) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B.as.Destroy.impl.Op(%self.param: %ptr.e79) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @G(%x.param: %A) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: %A = name_ref x, %x
@@ -1410,7 +1529,7 @@ fn G(x: A) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %HasF.type => constants.%HasF.type.901
// CHECK:STDOUT: %Self => constants.%Self.322
// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type
// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.859
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.dfb
// CHECK:STDOUT: }
// CHECK:STDOUT:
+61 -1
View File
@@ -48,6 +48,13 @@ fn TestSpecific(a: A({})) -> {} {
// CHECK:STDOUT: %A.13025a.1: type = class_type @A, @A(%T) [symbolic]
// CHECK:STDOUT: %require_complete.4aeca8.1: <witness> = require_complete_type %T [symbolic]
// CHECK:STDOUT: %A.elem.1ceb36.1: type = unbound_element_type %A.13025a.1, %T [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.d93: <witness> = impl_witness @A.%Destroy.impl_witness_table, @A.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %ptr.ca9: type = ptr_type %A.13025a.1 [symbolic]
// CHECK:STDOUT: %pattern_type.09b: type = pattern_type %ptr.ca9 [symbolic]
// CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op, @A.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %struct_type.n.848971.1: type = struct_type {.n: %T} [symbolic]
// CHECK:STDOUT: %complete_type.84bb3d.1: <witness> = complete_type_witness %struct_type.n.848971.1 [symbolic]
// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
@@ -132,7 +139,6 @@ fn TestSpecific(a: A({})) -> {} {
// CHECK:STDOUT: %.8fd: type = fn_type_with_self_type %I.F.type.684, %I.facet.bd5 [concrete]
// CHECK:STDOUT: %A.as.I.impl.F.specific_fn: <specific function> = specific_function %A.as.I.impl.F.158, @A.as.I.impl.F(%empty_struct_type) [concrete]
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.069: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%empty_struct_type) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.d5a: %T.as.Destroy.impl.Op.type.069 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete]
@@ -261,6 +267,34 @@ fn TestSpecific(a: A({})) -> {} {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @A.as.Destroy.impl(@A.%T.loc3_9.2: type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @A.%Destroy.impl_witness_table, @A.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.d93)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op, @A.as.Destroy.impl(%T) [symbolic = %A.as.Destroy.impl.Op.type (constants.%A.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %A.as.Destroy.impl.Op: @A.as.Destroy.impl.%A.as.Destroy.impl.Op.type (%A.as.Destroy.impl.Op.type) = struct_value () [symbolic = %A.as.Destroy.impl.Op (constants.%A.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%A.13025a.1 as constants.%Destroy.type {
// CHECK:STDOUT: %A.as.Destroy.impl.Op.decl: @A.as.Destroy.impl.%A.as.Destroy.impl.Op.type (%A.as.Destroy.impl.Op.type) = fn_decl @A.as.Destroy.impl.Op [symbolic = @A.as.Destroy.impl.%A.as.Destroy.impl.Op (constants.%A.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @A.as.Destroy.impl.Op.%pattern_type (%pattern_type.09b) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @A.as.Destroy.impl.Op.%pattern_type (%pattern_type.09b) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc3_19.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @A.as.Destroy.impl.Op.%ptr (%ptr.ca9) = value_param call_param0
// CHECK:STDOUT: %.loc3_19.2: type = splice_block %Self.ref [symbolic = %A (constants.%A.13025a.1)] {
// CHECK:STDOUT: %.loc3_19.3: type = specific_constant constants.%A.13025a.1, @A(constants.%T) [symbolic = %A (constants.%A.13025a.1)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc3_19.3 [symbolic = %A (constants.%A.13025a.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @A.as.Destroy.impl.Op.%ptr (%ptr.ca9) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %A.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @A.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @A.as.I.impl(%V.loc11_14.2: type) {
// CHECK:STDOUT: %V.loc11_14.1: type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.1 (constants.%V)]
// CHECK:STDOUT: %A.loc11_27.1: type = class_type @A, @A(%V.loc11_14.1) [symbolic = %A.loc11_27.1 (constants.%A.13025a.2)]
@@ -307,6 +341,9 @@ fn TestSpecific(a: A({})) -> {} {
// CHECK:STDOUT: class {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc3_9.2 [symbolic = %T.loc3_9.1 (constants.%T)]
// CHECK:STDOUT: %.loc4: @A.%A.elem (%A.elem.1ceb36.1) = field_decl n, element0 [concrete]
// CHECK:STDOUT: impl_decl @A.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A.as.Destroy.impl.%A.as.Destroy.impl.Op.decl), @A.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @A.as.Destroy.impl(constants.%T) [symbolic = @A.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.d93)]
// CHECK:STDOUT: %struct_type.n.loc5_1.1: type = struct_type {.n: %T} [symbolic = %struct_type.n.loc5_1.2 (constants.%struct_type.n.848971.1)]
// CHECK:STDOUT: %complete_type.loc5_1.1: <witness> = complete_type_witness %struct_type.n.loc5_1.1 [symbolic = %complete_type.loc5_1.2 (constants.%complete_type.84bb3d.1)]
// CHECK:STDOUT: complete_type_witness = %complete_type.loc5_1.1
@@ -318,6 +355,17 @@ fn TestSpecific(a: A({})) -> {} {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @A.as.Destroy.impl.Op(@A.%T.loc3_9.2: type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %A: type = class_type @A, @A(%T) [symbolic = %A (constants.%A.13025a.1)]
// CHECK:STDOUT: %ptr: type = ptr_type %A [symbolic = %ptr (constants.%ptr.ca9)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.09b)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @A.as.Destroy.impl.Op.%ptr (%ptr.ca9)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.F(@I.%U.loc7_13.2: type, @I.%Self.1: @I.%I.type (%I.type.325e65.1)) {
// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U)> [symbolic = %I.type (constants.%I.type.325e65.1)]
@@ -419,6 +467,18 @@ fn TestSpecific(a: A({})) -> {} {
// CHECK:STDOUT: %T.loc3_9.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.as.Destroy.impl(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.d93
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.as.Destroy.impl.Op(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %A => constants.%A.13025a.1
// CHECK:STDOUT: %ptr => constants.%ptr.ca9
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.09b
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I(constants.%U) {
// CHECK:STDOUT: %U.loc7_13.1 => constants.%U
// CHECK:STDOUT: }
File diff suppressed because it is too large Load Diff
+46 -16
View File
@@ -33,9 +33,9 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
// CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
// CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type.b70 [symbolic]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
@@ -50,6 +50,13 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete]
// CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete]
// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
@@ -60,10 +67,12 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -94,7 +103,7 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {
// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type.6de) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type.6de) = value_param_pattern %self.patt, call_param0 [concrete]
@@ -103,13 +112,13 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: %self.param: @I.F.%Self.as_type.loc18_14.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc18_14.1: type = splice_block %.loc18_14.2 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc18_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc18_14.2: type = converted %Self.ref, %Self.as_type.loc18_14.2 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %self.param: @I.F.%Self.as_type.loc18_14.1 (%Self.as_type.b70) = value_param call_param0
// CHECK:STDOUT: %.loc18_14.1: type = splice_block %.loc18_14.2 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.b70)] {
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)]
// CHECK:STDOUT: %Self.as_type.loc18_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.b70)]
// CHECK:STDOUT: %.loc18_14.2: type = converted %Self.ref, %Self.as_type.loc18_14.2 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.b70)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @I.F.%Self.as_type.loc18_14.1 (%Self.as_type) = bind_name self, %self.param
// CHECK:STDOUT: %self: @I.F.%Self.as_type.loc18_14.1 (%Self.as_type.b70) = bind_name self, %self.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
// CHECK:STDOUT: }
@@ -142,6 +151,22 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: witness = @C.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc21: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
@@ -149,6 +174,9 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@C.as.I.impl.%C.as.I.impl.F.decl), @C.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -161,15 +189,17 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc18_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
// CHECK:STDOUT: %Self.as_type.loc18_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.b70)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc18_14.1 [symbolic = %pattern_type (constants.%pattern_type.6de)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @I.F.%Self.as_type.loc18_14.1 (%Self.as_type)) -> %i32;
// CHECK:STDOUT: fn(%self.param: @I.F.%Self.as_type.loc18_14.1 (%Self.as_type.b70)) -> %i32;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.I.impl.F(%self.param: %C) -> %i32;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%c.param: %C) -> %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %c.ref: %C = name_ref c, %c
@@ -182,9 +212,9 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT: return %.loc28_15.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.F(constants.%Self) {
// CHECK:STDOUT: %Self => constants.%Self
// CHECK:STDOUT: %Self.as_type.loc18_14.1 => constants.%Self.as_type
// CHECK:STDOUT: specific @I.F(constants.%Self.826) {
// CHECK:STDOUT: %Self => constants.%Self.826
// CHECK:STDOUT: %Self.as_type.loc18_14.1 => constants.%Self.as_type.b70
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -124,6 +124,13 @@ fn F() {
// CHECK:STDOUT: %pattern_type.f71: type = pattern_type %Y_where.type.324 [symbolic]
// CHECK:STDOUT: %Outer.G.type.d49: type = fn_type @Outer.G, @Outer(%OuterParam) [symbolic]
// CHECK:STDOUT: %Outer.G.f3c: %Outer.G.type.d49 = struct_value () [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @Outer.%Destroy.impl_witness_table, @Outer.as.Destroy.impl(%OuterParam) [symbolic]
// CHECK:STDOUT: %ptr.6ff: type = ptr_type %Outer.9d6 [symbolic]
// CHECK:STDOUT: %pattern_type.07e: type = pattern_type %ptr.6ff [symbolic]
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op.type: type = fn_type @Outer.as.Destroy.impl.Op, @Outer.as.Destroy.impl(%OuterParam) [symbolic]
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op: %Outer.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
@@ -151,9 +158,11 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -222,6 +231,34 @@ fn F() {
// CHECK:STDOUT: assoc_const T:! type;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @Outer.as.Destroy.impl(@Outer.%OuterParam.loc49_13.2: type) {
// CHECK:STDOUT: %OuterParam: type = bind_symbolic_name OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @Outer.%Destroy.impl_witness_table, @Outer.as.Destroy.impl(%OuterParam) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op.type: type = fn_type @Outer.as.Destroy.impl.Op, @Outer.as.Destroy.impl(%OuterParam) [symbolic = %Outer.as.Destroy.impl.Op.type (constants.%Outer.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op: @Outer.as.Destroy.impl.%Outer.as.Destroy.impl.Op.type (%Outer.as.Destroy.impl.Op.type) = struct_value () [symbolic = %Outer.as.Destroy.impl.Op (constants.%Outer.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%Outer.9d6 as constants.%Destroy.type {
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op.decl: @Outer.as.Destroy.impl.%Outer.as.Destroy.impl.Op.type (%Outer.as.Destroy.impl.Op.type) = fn_decl @Outer.as.Destroy.impl.Op [symbolic = @Outer.as.Destroy.impl.%Outer.as.Destroy.impl.Op (constants.%Outer.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @Outer.as.Destroy.impl.Op.%pattern_type (%pattern_type.07e) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @Outer.as.Destroy.impl.Op.%pattern_type (%pattern_type.07e) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc49_32.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @Outer.as.Destroy.impl.Op.%ptr (%ptr.6ff) = value_param call_param0
// CHECK:STDOUT: %.loc49_32.2: type = splice_block %Self.ref [symbolic = %Outer (constants.%Outer.9d6)] {
// CHECK:STDOUT: %.loc49_32.3: type = specific_constant constants.%Outer.9d6, @Outer(constants.%OuterParam) [symbolic = %Outer (constants.%Outer.9d6)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc49_32.3 [symbolic = %Outer (constants.%Outer.9d6)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @Outer.as.Destroy.impl.Op.%ptr (%ptr.6ff) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %Outer.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @Outer.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Y.impl: %C.ref as %.loc58_23 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = file.%Y.impl_witness
@@ -258,6 +295,9 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %H.loc54_8.2: @Outer.G.%Y_where.type (%Y_where.type.324) = bind_symbolic_name H, 1 [symbolic = %H.loc54_8.1 (constants.%H)]
// CHECK:STDOUT: }
// CHECK:STDOUT: impl_decl @Outer.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Outer.as.Destroy.impl.%Outer.as.Destroy.impl.Op.decl), @Outer.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @Outer.as.Destroy.impl(constants.%OuterParam) [symbolic = @Outer.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -293,6 +333,17 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Outer.as.Destroy.impl.Op(@Outer.%OuterParam.loc49_13.2: type) {
// CHECK:STDOUT: %OuterParam: type = bind_symbolic_name OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)]
// CHECK:STDOUT: %Outer: type = class_type @Outer, @Outer(%OuterParam) [symbolic = %Outer (constants.%Outer.9d6)]
// CHECK:STDOUT: %ptr: type = ptr_type %Outer [symbolic = %ptr (constants.%ptr.6ff)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.07e)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @Outer.as.Destroy.impl.Op.%ptr (%ptr.6ff)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic]
@@ -346,6 +397,18 @@ fn F() {
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f71
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Outer.as.Destroy.impl(constants.%OuterParam) {
// CHECK:STDOUT: %OuterParam => constants.%OuterParam
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Outer.as.Destroy.impl.Op(constants.%OuterParam) {
// CHECK:STDOUT: %OuterParam => constants.%OuterParam
// CHECK:STDOUT: %Outer => constants.%Outer.9d6
// CHECK:STDOUT: %ptr => constants.%ptr.6ff
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.07e
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Outer(constants.%empty_tuple.type) {
// CHECK:STDOUT: %OuterParam.loc49_13.1 => constants.%empty_tuple.type
// CHECK:STDOUT:
@@ -414,6 +477,13 @@ fn F() {
// CHECK:STDOUT: %C.4b0: type = class_type @C, @C(%OuterParam) [symbolic]
// CHECK:STDOUT: %require_complete.1fd: <witness> = require_complete_type %Y_where.type.fee [symbolic]
// CHECK:STDOUT: %Y.impl_witness.f45: <witness> = impl_witness @Outer.%Y.impl_witness_table, @C.as.Y.impl(%OuterParam) [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @Outer.%Destroy.impl_witness_table, @Outer.as.Destroy.impl(%OuterParam) [symbolic]
// CHECK:STDOUT: %ptr.00b: type = ptr_type %Outer.fea [symbolic]
// CHECK:STDOUT: %pattern_type.f97: type = pattern_type %ptr.00b [symbolic]
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op.type: type = fn_type @Outer.as.Destroy.impl.Op, @Outer.as.Destroy.impl(%OuterParam) [symbolic]
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op: %Outer.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %Z1.impl_witness: <witness> = impl_witness file.%Z1.impl_witness_table [concrete]
@@ -456,10 +526,12 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
// CHECK:STDOUT: import Core//prelude
// 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.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
// CHECK:STDOUT: %Core.import_ref.012: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @type.as.BitAndWith.impl [concrete]
@@ -563,6 +635,34 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @Outer.as.Destroy.impl(@Outer.%OuterParam.loc6_13.2: %Z1.type) {
// CHECK:STDOUT: %OuterParam: %Z1.type = bind_symbolic_name OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @Outer.%Destroy.impl_witness_table, @Outer.as.Destroy.impl(%OuterParam) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op.type: type = fn_type @Outer.as.Destroy.impl.Op, @Outer.as.Destroy.impl(%OuterParam) [symbolic = %Outer.as.Destroy.impl.Op.type (constants.%Outer.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op: @Outer.as.Destroy.impl.%Outer.as.Destroy.impl.Op.type (%Outer.as.Destroy.impl.Op.type) = struct_value () [symbolic = %Outer.as.Destroy.impl.Op (constants.%Outer.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%Outer.fea as constants.%Destroy.type {
// CHECK:STDOUT: %Outer.as.Destroy.impl.Op.decl: @Outer.as.Destroy.impl.%Outer.as.Destroy.impl.Op.type (%Outer.as.Destroy.impl.Op.type) = fn_decl @Outer.as.Destroy.impl.Op [symbolic = @Outer.as.Destroy.impl.%Outer.as.Destroy.impl.Op (constants.%Outer.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @Outer.as.Destroy.impl.Op.%pattern_type (%pattern_type.f97) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @Outer.as.Destroy.impl.Op.%pattern_type (%pattern_type.f97) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc6_30.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @Outer.as.Destroy.impl.Op.%ptr (%ptr.00b) = value_param call_param0
// CHECK:STDOUT: %.loc6_30.2: type = splice_block %Self.ref [symbolic = %Outer (constants.%Outer.fea)] {
// CHECK:STDOUT: %.loc6_30.3: type = specific_constant constants.%Outer.fea, @Outer(constants.%OuterParam) [symbolic = %Outer (constants.%Outer.fea)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6_30.3 [symbolic = %Outer (constants.%Outer.fea)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @Outer.as.Destroy.impl.Op.%ptr (%ptr.00b) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %Outer.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @Outer.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @empty_tuple.type.as.Z1.impl: %.loc17_7.2 as %Z1.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = file.%Z1.impl_witness
@@ -627,6 +727,9 @@ fn F() {
// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C.as.Y.impl [concrete]
// CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness %Y.impl_witness_table, @C.as.Y.impl(constants.%OuterParam) [symbolic = @C.as.Y.impl.%Y.impl_witness (constants.%Y.impl_witness.f45)]
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT: impl_decl @Outer.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Outer.as.Destroy.impl.%Outer.as.Destroy.impl.Op.decl), @Outer.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @Outer.as.Destroy.impl(constants.%OuterParam) [symbolic = @Outer.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -665,6 +768,17 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Outer.as.Destroy.impl.Op(@Outer.%OuterParam.loc6_13.2: %Z1.type) {
// CHECK:STDOUT: %OuterParam: %Z1.type = bind_symbolic_name OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)]
// CHECK:STDOUT: %Outer: type = class_type @Outer, @Outer(%OuterParam) [symbolic = %Outer (constants.%Outer.fea)]
// CHECK:STDOUT: %ptr: type = ptr_type %Outer [symbolic = %ptr (constants.%ptr.00b)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.f97)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @Outer.as.Destroy.impl.Op.%ptr (%ptr.00b)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Outer.ref.loc21_3: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic]
@@ -764,6 +878,18 @@ fn F() {
// CHECK:STDOUT: %Y.impl_witness => constants.%Y.impl_witness.f45
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Outer.as.Destroy.impl(constants.%OuterParam) {
// CHECK:STDOUT: %OuterParam => constants.%OuterParam
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Outer.as.Destroy.impl.Op(constants.%OuterParam) {
// CHECK:STDOUT: %OuterParam => constants.%OuterParam
// CHECK:STDOUT: %Outer => constants.%Outer.fea
// CHECK:STDOUT: %ptr => constants.%ptr.00b
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f97
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Outer(constants.%Z1.facet) {
// CHECK:STDOUT: %OuterParam.loc6_13.1 => constants.%Z1.facet
// CHECK:STDOUT:
@@ -107,6 +107,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %Z.assoc_type.26e: type = assoc_entity_type @Z, @Z(%T.8b3) [symbolic]
// CHECK:STDOUT: %assoc0.1cd: %Z.assoc_type.26e = assoc_entity element0, @Z.%X [symbolic]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %S: type = bind_symbolic_name S, 1 [symbolic]
@@ -150,9 +157,11 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -265,6 +274,22 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: assoc_const X:! type;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc7: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @T.as.Z.impl.119(%T.loc9_14.1: type, %S.loc9_24.1: type) {
// CHECK:STDOUT: %T.loc9_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T.8b3)]
// CHECK:STDOUT: %S.loc9_24.2: type = bind_symbolic_name S, 1 [symbolic = %S.loc9_24.2 (constants.%S)]
@@ -303,6 +328,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -311,6 +339,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%T.loc13_6.2: %Z.type.049) {
// CHECK:STDOUT: %T.loc13_6.1: %Z.type.049 = bind_symbolic_name T, 0 [symbolic = %T.loc13_6.1 (constants.%T.62d)]
// CHECK:STDOUT: %T.as_type.loc13_19.1: type = facet_access_type %T.loc13_6.1 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)]
@@ -426,6 +456,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
// CHECK:STDOUT: %Self.b29: %Y.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %S: type = bind_symbolic_name S, 1 [symbolic]
@@ -481,10 +518,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: import Core//prelude
// 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.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
// CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//prelude/parts/as, loc12_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)]
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.275) = import_ref Core//prelude/parts/as, loc12_35, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.42e)]
@@ -611,6 +650,22 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: assoc_const X:! type;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc8: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @T.as.Z.impl.119(%T.loc10_14.1: type, %S.loc10_24.1: type) {
// CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T.8b3)]
// CHECK:STDOUT: %S.loc10_24.2: type = bind_symbolic_name S, 1 [symbolic = %S.loc10_24.2 (constants.%S)]
@@ -649,6 +704,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -657,6 +715,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%T.loc14_6.2: %Z.type.049) {
// CHECK:STDOUT: %T.loc14_6.1: %Z.type.049 = bind_symbolic_name T, 0 [symbolic = %T.loc14_6.1 (constants.%T.62d)]
// CHECK:STDOUT: %T.as_type.loc14_19.1: type = facet_access_type %T.loc14_6.1 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)]
+63 -23
View File
@@ -116,14 +116,21 @@ fn Call() {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete]
// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
// CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
// CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type.b70 [symbolic]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
// CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete]
@@ -134,13 +141,15 @@ fn Call() {
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.I: type = import_ref Main//i, I, loaded [concrete = constants.%I.type]
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: %Main.import_ref.e5d = import_ref Main//i, inst19 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.507 = import_ref Main//i, loc4_33, unloaded
// CHECK:STDOUT: %Main.F: %I.F.type = import_ref Main//i, F, loaded [concrete = constants.%I.F]
// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst19 [no loc], loaded [symbolic = constants.%Self]
// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst19 [no loc], loaded [symbolic = constants.%Self.826]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -167,6 +176,22 @@ fn Call() {
// CHECK:STDOUT: witness = (imports.%Main.F)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc6: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.I.impl: %C.ref as %I.ref {
// CHECK:STDOUT: %C.as.I.impl.F.decl: %C.as.I.impl.F.type = fn_decl @C.as.I.impl.F [concrete = constants.%C.as.I.impl.F] {
// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete]
@@ -183,6 +208,9 @@ fn Call() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -191,9 +219,11 @@ fn Call() {
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.5dd: %I.type) [from "i.carbon"] {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.b70)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.6de)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn;
@@ -204,9 +234,9 @@ fn Call() {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.F(constants.%Self) {
// CHECK:STDOUT: %Self => constants.%Self
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
// CHECK:STDOUT: specific @I.F(constants.%Self.826) {
// CHECK:STDOUT: %Self => constants.%Self.826
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.b70
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -274,7 +304,7 @@ fn Call() {
// CHECK:STDOUT: %Get: %Get.type = struct_value () [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
@@ -283,46 +313,51 @@ fn Call() {
// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete]
// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
// CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type.b70 [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete]
// CHECK:STDOUT: %.1b3: type = fn_type_with_self_type %I.F.type, %I.facet [concrete]
// CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete]
// CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.153: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.5d7: %T.as.Destroy.impl.Op.type.153 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.0cc: <witness> = impl_witness imports.%Destroy.impl_witness_table.170 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %T.as.Destroy.impl.Op.5d7, @T.as.Destroy.impl.Op(%C) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.Get: %Get.type = import_ref Main//get, Get, loaded [concrete = constants.%Get]
// CHECK:STDOUT: %Main.I: type = import_ref Main//i, I, loaded [concrete = constants.%I.type]
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.import_ref.8db: <witness> = import_ref Main//get, inst23 [indirect], loaded [concrete = constants.%complete_type.357]
// CHECK:STDOUT: %Main.import_ref.8db: <witness> = import_ref Main//get, inst23 [indirect], loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//get, inst24 [indirect], unloaded
// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//i, inst19 [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//i, loc4_33, loaded [concrete = constants.%assoc0.3f3]
// CHECK:STDOUT: %Main.F = import_ref Main//i, F, unloaded
// CHECK:STDOUT: %Main.import_ref.e03: %I.F.type = import_ref Main//i, loc4_33, loaded [concrete = constants.%I.F]
// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst19 [no loc], loaded [symbolic = constants.%Self.826]
// CHECK:STDOUT: %Main.import_ref.4c7: <witness> = import_ref Main//c, loc6_9, loaded [concrete = constants.%Destroy.impl_witness.0cc]
// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//c, inst20 [no loc], loaded [concrete = constants.%C]
// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//c, inst23 [no loc], loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.f0d: <witness> = import_ref Main//c, loc7_13, loaded [concrete = constants.%I.impl_witness]
// CHECK:STDOUT: %Main.import_ref.29a: type = import_ref Main//c, loc7_6, loaded [concrete = constants.%C]
// CHECK:STDOUT: %Main.import_ref.f50: type = import_ref Main//c, loc7_11, loaded [concrete = constants.%I.type]
// CHECK:STDOUT: %Main.import_ref.742: %C.as.I.impl.F.type = import_ref Main//c, loc7_34, loaded [concrete = constants.%C.as.I.impl.F]
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.742), @C.as.I.impl [concrete]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Main.import_ref.2e8: %C.as.Destroy.impl.Op.type = import_ref Main//c, loc6_9, loaded [concrete = constants.%C.as.Destroy.impl.Op]
// CHECK:STDOUT: %Destroy.impl_witness_table.170 = impl_witness_table (%Main.import_ref.2e8), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .Get = imports.%Main.Get
// CHECK:STDOUT: .I = imports.%Main.I
// CHECK:STDOUT: .Core = imports.%Core
// CHECK:STDOUT: .Core = imports.%Core.ece
// CHECK:STDOUT: .Call = %Call.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
@@ -337,6 +372,11 @@ fn Call() {
// CHECK:STDOUT: witness = (imports.%Main.F)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: imports.%Main.import_ref.c0c as imports.%Main.import_ref.cb9 [from "c.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%Main.import_ref.4c7
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.I.impl: imports.%Main.import_ref.29a as imports.%Main.import_ref.f50 [from "c.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = imports.%Main.import_ref.f0d
@@ -357,15 +397,13 @@ fn Call() {
// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.c44 [concrete = constants.%assoc0.3f3]
// CHECK:STDOUT: %impl.elem0: %.1b3 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F]
// CHECK:STDOUT: %bound_method.loc9_8: <bound method> = bound_method %Get.call, %impl.elem0
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %Get.call, %impl.elem0
// CHECK:STDOUT: %.loc9_7.2: ref %C = temporary %.loc9_7.1, %Get.call
// CHECK:STDOUT: %.loc9_7.3: %C = bind_value %.loc9_7.2
// CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %bound_method.loc9_8(%.loc9_7.3)
// CHECK:STDOUT: %T.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc9_7.1, constants.%T.as.Destroy.impl.Op.5d7
// CHECK:STDOUT: %T.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.Destroy.impl.Op.5d7, @T.as.Destroy.impl.Op(constants.%C) [concrete = constants.%T.as.Destroy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_7: <bound method> = bound_method %.loc9_7.1, %T.as.Destroy.impl.Op.specific_fn
// CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %bound_method(%.loc9_7.3)
// CHECK:STDOUT: %C.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc9_7.1, constants.%C.as.Destroy.impl.Op
// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc9_7.1
// CHECK:STDOUT: %T.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9_7(%addr)
// CHECK:STDOUT: %C.as.Destroy.impl.Op.call: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound(%addr)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -381,6 +419,8 @@ fn Call() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.I.impl.F [from "c.carbon"];
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op = "no_op" [from "c.carbon"];
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.F(constants.%Self.826) {
// CHECK:STDOUT: %Self => constants.%Self.826
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.b70
+32 -2
View File
@@ -26,13 +26,20 @@ impl i32 as I {}
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
// CHECK:STDOUT: %X: type = class_type @X [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @X.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.d17: type = ptr_type %X [concrete]
// CHECK:STDOUT: %pattern_type.1c6: type = pattern_type %ptr.d17 [concrete]
// CHECK:STDOUT: %X.as.Destroy.impl.Op.type: type = fn_type @X.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %X.as.Destroy.impl.Op: %X.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
@@ -40,10 +47,12 @@ impl i32 as I {}
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -70,7 +79,7 @@ impl i32 as I {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -82,12 +91,31 @@ impl i32 as I {}
// CHECK:STDOUT: witness = file.%I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @X.as.Destroy.impl: constants.%X as constants.%Destroy.type {
// CHECK:STDOUT: %X.as.Destroy.impl.Op.decl: %X.as.Destroy.impl.Op.type = fn_decl @X.as.Destroy.impl.Op [concrete = constants.%X.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.1c6 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.1c6 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc19: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.d17 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X [concrete = constants.%X]
// CHECK:STDOUT: %self: %ptr.d17 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %X.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @X.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @X {
// CHECK:STDOUT: impl_decl @i32.as.I.impl [concrete] {} {
// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: %I.ref.loc20: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: impl_decl @X.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@X.as.Destroy.impl.%X.as.Destroy.impl.Op.decl), @X.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -97,3 +125,5 @@ impl i32 as I {}
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @X.as.Destroy.impl.Op(%self.param: %ptr.d17) = "no_op";
// CHECK:STDOUT:
+337 -32
View File
@@ -321,6 +321,8 @@ fn F() {
// CHECK:STDOUT: %J.facet.ecc: %J.type = facet_value %empty_tuple.type, (%J.impl_witness.e42) [concrete]
// CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete]
// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
@@ -351,6 +353,11 @@ fn F() {
// CHECK:STDOUT: %int_40.518: %i32 = int_value 40 [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.edd: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %J_where.type.0bc: type = facet_type <@J where %impl.elem0.83f = %C> [concrete]
// CHECK:STDOUT: %J.impl_witness.12d: <witness> = impl_witness file.%J.impl_witness_table.loc21 [concrete]
@@ -365,6 +372,7 @@ fn F() {
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .Negate = %Core.Negate
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
@@ -376,6 +384,7 @@ fn F() {
// CHECK:STDOUT: %Core.import_ref.ff2: @Int.as.Negate.impl.%Int.as.Negate.impl.Op.type (%Int.as.Negate.impl.Op.type.fc5) = import_ref Core//prelude/parts/int, loc36_31, loaded [symbolic = @Int.as.Negate.impl.%Int.as.Negate.impl.Op (constants.%Int.as.Negate.impl.Op.8d0)]
// CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.5f5, %Core.import_ref.ff2), @Int.as.Negate.impl [concrete]
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -516,6 +525,22 @@ fn F() {
// CHECK:STDOUT: witness = file.%J.impl_witness.loc8
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.Destroy.impl: constants.%C as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc16: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.J.impl: %C.ref.loc21_6 as %.loc21_13 {
// CHECK:STDOUT: %C.as.J.impl.F.decl: %C.as.J.impl.F.type = fn_decl @C.as.J.impl.F [concrete = constants.%C.as.J.impl.F] {
// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete]
@@ -546,6 +571,9 @@ fn F() {
// CHECK:STDOUT: %.loc18_10: %empty_struct_type = struct_literal ()
// CHECK:STDOUT: %.loc18_11: type = converted %.loc18_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: adapt_decl %.loc18_11 [concrete]
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.edd]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
@@ -598,6 +626,8 @@ fn F() {
// CHECK:STDOUT: return %.loc13_21.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.as.J.impl.F(%self.param: %C, %u.param: %C) -> %C {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %self.ref: %C = name_ref self, %self
@@ -653,6 +683,13 @@ fn F() {
// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
// CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete]
// CHECK:STDOUT: %D: type = class_type @D [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.73d: <witness> = impl_witness @D.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete]
// CHECK:STDOUT: %pattern_type.a94: type = pattern_type %ptr.19c [concrete]
// CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %.Self.968: %J.type = bind_symbolic_name .Self [symbolic_self]
@@ -705,12 +742,14 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .Negate = %Core.Negate
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: import Core//prelude
// 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.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type]
// CHECK:STDOUT: %Core.import_ref.a5b: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)]
@@ -795,6 +834,22 @@ fn F() {
// CHECK:STDOUT: assoc_const U:! type;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @D.as.Destroy.impl: constants.%D as constants.%Destroy.type {
// CHECK:STDOUT: %D.as.Destroy.impl.Op.decl: %D.as.Destroy.impl.Op.type = fn_decl @D.as.Destroy.impl.Op [concrete = constants.%D.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.a94 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.a94 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc8: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.19c = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D [concrete = constants.%D]
// CHECK:STDOUT: %self: %ptr.19c = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %D.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @D.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @D.as.J.impl: %D.ref as %.loc10_13 {
// CHECK:STDOUT: %D.as.J.impl.F.decl: %D.as.J.impl.F.type = fn_decl @D.as.J.impl.F [concrete = constants.%D.as.J.impl.F] {
// CHECK:STDOUT: %u.patt: %pattern_type.7ce = binding_pattern u [concrete]
@@ -820,6 +875,9 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @D {
// CHECK:STDOUT: impl_decl @D.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@D.as.Destroy.impl.%D.as.Destroy.impl.Op.decl), @D.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.73d]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -837,6 +895,8 @@ fn F() {
// CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.11f)) -> @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.11f);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @D.as.Destroy.impl.Op(%self.param: %ptr.19c) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @D.as.J.impl.F(%u.param: %i32) -> %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u
@@ -931,6 +991,13 @@ fn F() {
// CHECK:STDOUT: %E.as.J.impl.G.type: type = fn_type @E.as.J.impl.G [concrete]
// CHECK:STDOUT: %E.as.J.impl.G: %E.as.J.impl.G.type = struct_value () [concrete]
// CHECK:STDOUT: %J.facet.ee5: %J.type = facet_value %E, (%J.impl_witness) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.c1f: <witness> = impl_witness @E.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.742: type = ptr_type %E [concrete]
// CHECK:STDOUT: %pattern_type.88c: type = pattern_type %ptr.742 [concrete]
// CHECK:STDOUT: %E.as.Destroy.impl.Op.type: type = fn_type @E.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %E.as.Destroy.impl.Op: %E.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
@@ -1005,12 +1072,14 @@ fn F() {
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: .Negate = %Core.Negate
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// 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.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type]
// CHECK:STDOUT: %Core.import_ref.a5b: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
@@ -1201,6 +1270,22 @@ fn F() {
// CHECK:STDOUT: witness = @E.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @E.as.Destroy.impl: constants.%E as constants.%Destroy.type {
// CHECK:STDOUT: %E.as.Destroy.impl.Op.decl: %E.as.Destroy.impl.Op.type = fn_decl @E.as.Destroy.impl.Op [concrete = constants.%E.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.88c = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.88c = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.742 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
// CHECK:STDOUT: %self: %ptr.742 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %E.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @E.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @E {
// CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
@@ -1220,6 +1305,9 @@ fn F() {
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @E.as.J.impl.%E.as.J.impl.F.decl, @E.as.J.impl.%E.as.J.impl.G.decl), @E.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: impl_decl @E.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@E.as.Destroy.impl.%E.as.Destroy.impl.Op.decl), @E.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.c1f]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -1278,6 +1366,8 @@ fn F() {
// CHECK:STDOUT: return %.loc15_16.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @E.as.Destroy.impl.Op(%self.param: %ptr.742) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallBoth(%e.param: %E) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: name_binding_decl {
@@ -2295,6 +2385,13 @@ fn F() {
// CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
// CHECK:STDOUT: %E.as.J.impl.F.type.b842fd.2: type = fn_type @E.as.J.impl.F.loc24_21.2 [concrete]
// CHECK:STDOUT: %E.as.J.impl.F.b07d12.2: %E.as.J.impl.F.type.b842fd.2 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @E.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.742: type = ptr_type %E [concrete]
// CHECK:STDOUT: %pattern_type.88c: type = pattern_type %ptr.742 [concrete]
// CHECK:STDOUT: %E.as.Destroy.impl.Op.type: type = fn_type @E.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %E.as.Destroy.impl.Op: %E.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
@@ -2303,11 +2400,13 @@ fn F() {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Int = %Core.Int
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -2392,6 +2491,22 @@ fn F() {
// CHECK:STDOUT: witness = @E.%J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @E.as.Destroy.impl: constants.%E as constants.%Destroy.type {
// CHECK:STDOUT: %E.as.Destroy.impl.Op.decl: %E.as.Destroy.impl.Op.type = fn_decl @E.as.Destroy.impl.Op [concrete = constants.%E.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.88c = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.88c = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc8: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.742 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
// CHECK:STDOUT: %self: %ptr.742 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %E.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @E.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @E {
// CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
@@ -2411,6 +2526,9 @@ fn F() {
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @E.as.J.impl.%E.as.J.impl.F.decl.loc24_21.2), @E.as.J.impl [concrete]
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: impl_decl @E.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@E.as.Destroy.impl.%E.as.Destroy.impl.Op.decl), @E.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -2446,6 +2564,8 @@ fn F() {
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @E.as.Destroy.impl.Op(%self.param: %ptr.742) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: specific @U(constants.%Self.ccd) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @U(constants.%J.facet.521) {}
@@ -2470,11 +2590,11 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %J2.type: type = facet_type <@J2> [concrete]
// CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.541: %J2.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %J2.assoc_type: type = assoc_entity_type @J2 [concrete]
// CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, @J2.%U2 [concrete]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
// CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.as_type [symbolic]
// CHECK:STDOUT: %Self.as_type.f5c: type = facet_access_type %Self.541 [symbolic]
// CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.as_type.f5c [symbolic]
// CHECK:STDOUT: %J2.F.type: type = fn_type @J2.F [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %J2.F: %J2.F.type = struct_value () [concrete]
@@ -2495,6 +2615,13 @@ fn F() {
// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.type.f405c5.2: type = fn_type @empty_tuple.type.as.J2.impl.F.loc30_33.2 [concrete]
// CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.214a71.2: %empty_tuple.type.as.J2.impl.F.type.f405c5.2 = struct_value () [concrete]
// CHECK:STDOUT: %C2: type = class_type @C2 [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C2.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.0d6: type = ptr_type %C2 [concrete]
// CHECK:STDOUT: %pattern_type.191: type = pattern_type %ptr.0d6 [concrete]
// CHECK:STDOUT: %C2.as.Destroy.impl.Op.type: type = fn_type @C2.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %C2.as.Destroy.impl.Op: %C2.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %J2_where.type.df9: type = facet_type <@J2 where %impl.elem0 = %C2> [concrete]
// CHECK:STDOUT: %J2.impl_witness.267: <witness> = impl_witness file.%J2.impl_witness_table.loc38 [concrete]
@@ -2508,9 +2635,11 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -2561,7 +2690,7 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @J2 {
// CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.541]
// CHECK:STDOUT: %U2: type = assoc_const_decl @U2 [concrete] {
// CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, @J2.%U2 [concrete = constants.%assoc0]
// CHECK:STDOUT: }
@@ -2573,16 +2702,16 @@ fn F() {
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param2 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.ref.loc19_35: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %self.param: @J2.F.%Self.as_type.loc19_14.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc19_14.1: type = splice_block %.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %Self.ref.loc19_14: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc19_14.2: type = facet_access_type %Self.ref.loc19_14 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc19_14.2: type = converted %Self.ref.loc19_14, %Self.as_type.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.ref.loc19_35: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self.541)]
// CHECK:STDOUT: %self.param: @J2.F.%Self.as_type.loc19_14.1 (%Self.as_type.f5c) = value_param call_param0
// CHECK:STDOUT: %.loc19_14.1: type = splice_block %.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type.f5c)] {
// CHECK:STDOUT: %Self.ref.loc19_14: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self.541)]
// CHECK:STDOUT: %Self.as_type.loc19_14.2: type = facet_access_type %Self.ref.loc19_14 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type.f5c)]
// CHECK:STDOUT: %.loc19_14.2: type = converted %Self.ref.loc19_14, %Self.as_type.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type.f5c)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @J2.F.%Self.as_type.loc19_14.1 (%Self.as_type) = bind_name self, %self.param
// CHECK:STDOUT: %self: @J2.F.%Self.as_type.loc19_14.1 (%Self.as_type.f5c) = bind_name self, %self.param
// CHECK:STDOUT: %z.param: <error> = value_param call_param1
// CHECK:STDOUT: %Self.ref.loc19_23: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.ref.loc19_23: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self.541)]
// CHECK:STDOUT: %z: <error> = bind_name z, %z.param
// CHECK:STDOUT: %return.param: ref <error> = out_param call_param2
// CHECK:STDOUT: %return: ref <error> = return_slot %return.param
@@ -2642,6 +2771,22 @@ fn F() {
// CHECK:STDOUT: witness = file.%J2.impl_witness.loc22
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C2.as.Destroy.impl: constants.%C2 as constants.%Destroy.type {
// CHECK:STDOUT: %C2.as.Destroy.impl.Op.decl: %C2.as.Destroy.impl.Op.type = fn_decl @C2.as.Destroy.impl.Op [concrete = constants.%C2.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.191 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.191 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc33: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.0d6 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C2 [concrete = constants.%C2]
// CHECK:STDOUT: %self: %ptr.0d6 = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C2.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C2.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C2.as.J2.impl: %C2.ref.loc38_6 as %.loc38_15 {
// CHECK:STDOUT: %C2.as.J2.impl.F.decl.loc39_33.1: %C2.as.J2.impl.F.type.05d6a0.1 = fn_decl @C2.as.J2.impl.F.loc39_33.1 [concrete = constants.%C2.as.J2.impl.F.bfa759.1] {
// CHECK:STDOUT: %self.patt: %pattern_type.838 = binding_pattern self [concrete]
@@ -2685,6 +2830,9 @@ fn F() {
// CHECK:STDOUT: %.loc35_10: %empty_struct_type = struct_literal ()
// CHECK:STDOUT: %.loc35_11: type = converted %.loc35_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: adapt_decl %.loc35_11 [concrete]
// CHECK:STDOUT: impl_decl @C2.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C2.as.Destroy.impl.%C2.as.Destroy.impl.Op.decl), @C2.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
@@ -2693,11 +2841,11 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @J2.F(@J2.%Self: %J2.type) {
// CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc19_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.541)]
// CHECK:STDOUT: %Self.as_type.loc19_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type.f5c)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc19_14.1 [symbolic = %pattern_type (constants.%pattern_type.969)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @J2.F.%Self.as_type.loc19_14.1 (%Self.as_type), %z.param: <error>) -> <error>;
// CHECK:STDOUT: fn(%self.param: @J2.F.%Self.as_type.loc19_14.1 (%Self.as_type.f5c), %z.param: <error>) -> <error>;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @empty_tuple.type.as.J2.impl.F.loc30_33.1(%self.param: %empty_tuple.type, %z.param: %empty_struct_type) -> %empty_struct_type {
@@ -2715,6 +2863,8 @@ fn F() {
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C2.as.Destroy.impl.Op(%self.param: %ptr.0d6) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C2.as.J2.impl.F.loc39_33.1(%self.param: %C2, %z.param: %C2) -> %C2 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %self.ref: %C2 = name_ref self, %self
@@ -2732,11 +2882,11 @@ fn F() {
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @U2(constants.%Self) {}
// CHECK:STDOUT: specific @U2(constants.%Self.541) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @J2.F(constants.%Self) {
// CHECK:STDOUT: %Self => constants.%Self
// CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%Self.as_type
// CHECK:STDOUT: specific @J2.F(constants.%Self.541) {
// CHECK:STDOUT: %Self => constants.%Self.541
// CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%Self.as_type.f5c
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.969
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -3109,15 +3259,22 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
// CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %ptr.7d2: type = ptr_type %C.f2e [symbolic]
// CHECK:STDOUT: %pattern_type.1d2: type = pattern_type %ptr.7d2 [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete]
// CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.bcc: %M.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %struct_type.b.86f: type = struct_type {.b: type} [concrete]
// CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type @M [concrete]
// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete]
@@ -3149,9 +3306,11 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: .Destroy = %Core.Destroy
// CHECK:STDOUT: import Core//prelude
// 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: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -3162,7 +3321,7 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
// CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.loc3_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_9.1 (constants.%T)]
// CHECK:STDOUT: }
@@ -3218,13 +3377,13 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @M {
// CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.bcc]
// CHECK:STDOUT: %Z: %struct_type.b.86f = assoc_const_decl @Z [concrete] {
// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete = constants.%assoc0]
// CHECK:STDOUT: }
// CHECK:STDOUT: %M.G.decl: %M.G.type = fn_decl @M.G [concrete = constants.%M.G] {
// CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %return.param: ref type = out_param call_param0
// CHECK:STDOUT: %return: ref type = return_slot %return.param
@@ -3242,10 +3401,38 @@ fn F() {
// CHECK:STDOUT: assoc_const Z:! %struct_type.b.86f;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.Destroy.impl(@C.%T.loc3_9.2: type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T) [symbolic = %C.as.Destroy.impl.Op.type (constants.%C.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = struct_value () [symbolic = %C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%C.f2e as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = fn_decl @C.as.Destroy.impl.Op [symbolic = @C.as.Destroy.impl.%C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.1d2) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.1d2) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc3_19.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2) = value_param call_param0
// CHECK:STDOUT: %.loc3_19.2: type = splice_block %Self.ref [symbolic = %C (constants.%C.f2e)] {
// CHECK:STDOUT: %.loc3_19.3: type = specific_constant constants.%C.f2e, @C(constants.%T) [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc3_19.3 [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.M.impl.8b4: %C as %.loc10_17 {
// CHECK:STDOUT: %C.as.M.impl.G.decl: %C.as.M.impl.G.type.d92 = fn_decl @C.as.M.impl.G.loc11 [concrete = constants.%C.as.M.impl.G.eac] {
// CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %return.param: ref type = out_param call_param0
// CHECK:STDOUT: %return: ref type = return_slot %return.param
@@ -3259,8 +3446,8 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.M.impl.d97: %C as %.loc16_17 {
// CHECK:STDOUT: %C.as.M.impl.G.decl: %C.as.M.impl.G.type.b29 = fn_decl @C.as.M.impl.G.loc17 [concrete = constants.%C.as.M.impl.G.f3b] {
// CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %return.param: ref type = out_param call_param0
// CHECK:STDOUT: %return: ref type = return_slot %return.param
@@ -3278,6 +3465,9 @@ fn F() {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @C.as.Destroy.impl(constants.%T) [symbolic = @C.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -3287,6 +3477,17 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(@C.%T.loc3_9.2: type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.7d2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.1d2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @M.G(@M.%Self: %M.type) {
// CHECK:STDOUT: fn() -> type;
// CHECK:STDOUT: }
@@ -3323,9 +3524,21 @@ fn F() {
// CHECK:STDOUT: %T.loc3_9.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Self) {}
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @M.G(constants.%Self) {}
// CHECK:STDOUT: specific @C.as.Destroy.impl.Op(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %C => constants.%C.f2e
// CHECK:STDOUT: %ptr => constants.%ptr.7d2
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.1d2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Z(constants.%Self.bcc) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @M.G(constants.%Self.bcc) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C(constants.%empty_struct_type) {
// CHECK:STDOUT: %T.loc3_9.1 => constants.%empty_struct_type
@@ -3621,9 +3834,21 @@ fn F() {
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.a08: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %ptr.7d2: type = ptr_type %C.f2e [symbolic]
// CHECK:STDOUT: %pattern_type.1d2: type = pattern_type %ptr.7d2 [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T) [symbolic]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %D: type = class_type @D [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.73d: <witness> = impl_witness @D.%Destroy.impl_witness_table [concrete]
// CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete]
// CHECK:STDOUT: %pattern_type.a94: type = pattern_type %ptr.19c [concrete]
// CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op [concrete]
// CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [concrete]
// CHECK:STDOUT: %.Self: %Z.type = bind_symbolic_name .Self [symbolic_self]
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
// CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @Z [symbolic_self]
@@ -3641,7 +3866,7 @@ fn F() {
// CHECK:STDOUT: %Z.facet.f2a: %Z.type = facet_value %D, (%Z.impl_witness.19e) [concrete]
// CHECK:STDOUT: %pattern_type.7f8: type = pattern_type %C.131 [concrete]
// CHECK:STDOUT: %C.val: %C.131 = struct_value () [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Destroy.impl_witness.d44: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%D) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.type.b84: type = fn_type @T.as.Destroy.impl.Op, @T.as.Destroy.impl(%C.131) [concrete]
// CHECK:STDOUT: %T.as.Destroy.impl.Op.e16: %T.as.Destroy.impl.Op.type.b84 = struct_value () [concrete]
// CHECK:STDOUT: %ptr.aaa: type = ptr_type %C.131 [concrete]
@@ -3714,6 +3939,50 @@ fn F() {
// CHECK:STDOUT: assoc_const X:! type;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @C.as.Destroy.impl(@C.%T.loc6_9.2: type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.a08)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T) [symbolic = %C.as.Destroy.impl.Op.type (constants.%C.as.Destroy.impl.Op.type)]
// CHECK:STDOUT: %C.as.Destroy.impl.Op: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = struct_value () [symbolic = %C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: constants.%C.f2e as constants.%Destroy.type {
// CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = fn_decl @C.as.Destroy.impl.Op [symbolic = @C.as.Destroy.impl.%C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)] {
// CHECK:STDOUT: %self.patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.1d2) = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.1d2) = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc6_19.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2) = value_param call_param0
// CHECK:STDOUT: %.loc6_19.2: type = splice_block %Self.ref [symbolic = %C (constants.%C.f2e)] {
// CHECK:STDOUT: %.loc6_19.3: type = specific_constant constants.%C.f2e, @C(constants.%T) [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6_19.3 [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2) = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @C.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @D.as.Destroy.impl: constants.%D as constants.%Destroy.type {
// CHECK:STDOUT: %D.as.Destroy.impl.Op.decl: %D.as.Destroy.impl.Op.type = fn_decl @D.as.Destroy.impl.Op [concrete = constants.%D.as.Destroy.impl.Op] {
// CHECK:STDOUT: %self.patt: %pattern_type.a94 = binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.a94 = value_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: %.loc7: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %ptr.19c = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D [concrete = constants.%D]
// CHECK:STDOUT: %self: %ptr.19c = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %D.as.Destroy.impl.Op.decl
// CHECK:STDOUT: witness = @D.%Destroy.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @T.as.Z.impl(%T.loc9_14.1: type) {
// CHECK:STDOUT: %T.loc9_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T)]
// CHECK:STDOUT: %C.loc9_45.2: type = class_type @C, @C(%T.loc9_14.2) [symbolic = %C.loc9_45.2 (constants.%C.f2e)]
@@ -3735,6 +4004,9 @@ fn F() {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @C.as.Destroy.impl(constants.%T) [symbolic = @C.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.a08)]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -3745,6 +4017,9 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @D {
// CHECK:STDOUT: impl_decl @D.as.Destroy.impl [concrete] {} {}
// CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@D.as.Destroy.impl.%D.as.Destroy.impl.Op.decl), @D.as.Destroy.impl [concrete]
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.73d]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -3753,6 +4028,19 @@ fn F() {
// CHECK:STDOUT: .Self = constants.%D
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(@C.%T.loc6_9.2: type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.f2e)]
// CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.7d2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.1d2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.7d2)) = "no_op";
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @D.as.Destroy.impl.Op(%self.param: %ptr.19c) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: name_binding_decl {
@@ -3790,6 +4078,18 @@ fn F() {
// CHECK:STDOUT: %T.loc6_9.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.a08
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl.Op(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %C => constants.%C.f2e
// CHECK:STDOUT: %ptr => constants.%ptr.7d2
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.1d2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @X(constants.%Z.facet.2a2) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @T.as.Z.impl(constants.%T) {
@@ -3818,3 +4118,8 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: specific @X(constants.%Z.facet.f2a) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%D) {
// CHECK:STDOUT: %T => constants.%D
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.d44
// CHECK:STDOUT: }
// CHECK:STDOUT: