mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
co-authored by
Geoff Romer
parent
a5a5e381be
commit
7209ad7c9f
+374
-94
@@ -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: }
|
||||
|
||||
Reference in New Issue
Block a user