mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 13:02:41 +00:00
Add the storage access block to `InitializeAction`, and then insert that block when performing the action.
1250 lines
94 KiB
Plaintext
1250 lines
94 KiB
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/destroy_calls.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/destroy_calls.carbon
|
|
|
|
// --- implicit_return.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class A {}
|
|
class B {}
|
|
class C {}
|
|
|
|
//@dump-sem-ir-begin
|
|
fn F() {
|
|
var unused a: A = {};
|
|
var unused b: B = {};
|
|
var unused c: C = {};
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- nested_scope.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class A {}
|
|
class B {}
|
|
class C {}
|
|
|
|
//@dump-sem-ir-begin
|
|
fn F() {
|
|
var unused a: A = {};
|
|
var unused b: B = {};
|
|
if (true) {
|
|
var unused c: C = {};
|
|
}
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- temp.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class A { fn Make() -> A; }
|
|
class B { fn Make() -> B; }
|
|
class C { fn Make() -> C; }
|
|
|
|
//@dump-sem-ir-begin
|
|
fn F() {
|
|
A.Make();
|
|
B.Make();
|
|
C.Make();
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- generic_class.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class C {}
|
|
|
|
class D(template T: type) {}
|
|
|
|
//@dump-sem-ir-begin
|
|
fn F() {
|
|
var unused a: D(C) = {};
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- generic_use_inside_generic.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class C(T: type) {}
|
|
|
|
//@dump-sem-ir-begin
|
|
fn F(generic T: type) {
|
|
var unused v: C(T) = {};
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
fn G() { F({}); }
|
|
|
|
// --- generic_use_inside_template.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class C(template T: type) {}
|
|
|
|
//@dump-sem-ir-begin
|
|
fn F(template T: type) {
|
|
var unused v: C(T) = {};
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
fn G() { F({}); }
|
|
|
|
// CHECK:STDOUT: --- implicit_return.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %A: type = class_type @A [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %B: type = class_type @B [concrete]
|
|
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.9ef = ref_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %a.var_patt: %pattern_type.9ef = var_pattern %a.patt [concrete]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %A.val: %A = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e39: type = pattern_type %B [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.e39 = ref_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %b.var_patt: %pattern_type.e39 = var_pattern %b.patt [concrete]
|
|
// CHECK:STDOUT: %B.val: %B = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete]
|
|
// CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete]
|
|
// CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete]
|
|
// CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12_3.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generated {
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.3] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403171.4] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %a.var: ref %A = var_storage %a.var_patt
|
|
// CHECK:STDOUT: %.loc10_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc10_22.2: init %A to %a.var = class_init () [concrete = constants.%A.val]
|
|
// CHECK:STDOUT: %.loc10_3: init %A = converted %.loc10_22.1, %.loc10_22.2 [concrete = constants.%A.val]
|
|
// CHECK:STDOUT: assign %a.var, %.loc10_3
|
|
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
// CHECK:STDOUT: %a: ref %A = wrapper_binding a, %a.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.9ef = ref_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %a.var_patt: %pattern_type.9ef = var_pattern %a.patt [concrete = constants.%a.var_patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %b.var: ref %B = var_storage %b.var_patt
|
|
// CHECK:STDOUT: %.loc11_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc11_22.2: init %B to %b.var = class_init () [concrete = constants.%B.val]
|
|
// CHECK:STDOUT: %.loc11_3: init %B = converted %.loc11_22.1, %.loc11_22.2 [concrete = constants.%B.val]
|
|
// CHECK:STDOUT: assign %b.var, %.loc11_3
|
|
// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
|
// CHECK:STDOUT: %b: ref %B = wrapper_binding b, %b.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.e39 = ref_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %b.var_patt: %pattern_type.e39 = var_pattern %b.patt [concrete = constants.%b.var_patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %c.var: ref %C = var_storage %c.var_patt
|
|
// CHECK:STDOUT: %.loc12_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc12_22.2: init %C to %c.var = class_init () [concrete = constants.%C.val]
|
|
// CHECK:STDOUT: %.loc12_3: init %C = converted %.loc12_22.1, %.loc12_22.2 [concrete = constants.%C.val]
|
|
// CHECK:STDOUT: assign %c.var, %.loc12_3
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
// CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete = constants.%c.patt]
|
|
// CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete = constants.%c.var_patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: <bound method> = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%c.var)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: <bound method> = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%b.var)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: <bound method> = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%a.var)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.1(%self.param: ref %empty_struct_type) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %C) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.2(%self.param: ref %C) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.2(%self.param: ref %C) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %B) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %A) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %A) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %A) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- nested_scope.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %A: type = class_type @A [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %B: type = class_type @B [concrete]
|
|
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.9ef = ref_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %a.var_patt: %pattern_type.9ef = var_pattern %a.patt [concrete]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %A.val: %A = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e39: type = pattern_type %B [concrete]
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.e39 = ref_binding_pattern b [concrete]
|
|
// CHECK:STDOUT: %b.var_patt: %pattern_type.e39 = var_pattern %b.patt [concrete]
|
|
// CHECK:STDOUT: %B.val: %B = struct_value () [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete]
|
|
// CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete]
|
|
// CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete]
|
|
// CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_5.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_5.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_5.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_5.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_5.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generated {
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.3] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403171.4] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %a.var: ref %A = var_storage %a.var_patt
|
|
// CHECK:STDOUT: %.loc10_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc10_22.2: init %A to %a.var = class_init () [concrete = constants.%A.val]
|
|
// CHECK:STDOUT: %.loc10_3: init %A = converted %.loc10_22.1, %.loc10_22.2 [concrete = constants.%A.val]
|
|
// CHECK:STDOUT: assign %a.var, %.loc10_3
|
|
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
// CHECK:STDOUT: %a: ref %A = wrapper_binding a, %a.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.9ef = ref_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %a.var_patt: %pattern_type.9ef = var_pattern %a.patt [concrete = constants.%a.var_patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %b.var: ref %B = var_storage %b.var_patt
|
|
// CHECK:STDOUT: %.loc11_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc11_22.2: init %B to %b.var = class_init () [concrete = constants.%B.val]
|
|
// CHECK:STDOUT: %.loc11_3: init %B = converted %.loc11_22.1, %.loc11_22.2 [concrete = constants.%B.val]
|
|
// CHECK:STDOUT: assign %b.var, %.loc11_3
|
|
// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
|
// CHECK:STDOUT: %b: ref %B = wrapper_binding b, %b.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %b.patt: %pattern_type.e39 = ref_binding_pattern b [concrete = constants.%b.patt]
|
|
// CHECK:STDOUT: %b.var_patt: %pattern_type.e39 = var_pattern %b.patt [concrete = constants.%b.var_patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: if %true br !if.then else br !if.else
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !if.then:
|
|
// CHECK:STDOUT: %c.var: ref %C = var_storage %c.var_patt
|
|
// CHECK:STDOUT: %.loc13_24.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc13_24.2: init %C to %c.var = class_init () [concrete = constants.%C.val]
|
|
// CHECK:STDOUT: %.loc13_5: init %C = converted %.loc13_24.1, %.loc13_24.2 [concrete = constants.%C.val]
|
|
// CHECK:STDOUT: assign %c.var, %.loc13_5
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
// CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete = constants.%c.patt]
|
|
// CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete = constants.%c.var_patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: <bound method> = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%c.var)
|
|
// CHECK:STDOUT: br !if.else
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !if.else:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: <bound method> = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%b.var)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: <bound method> = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%a.var)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_5.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_5.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_5.1(%self.param: ref %empty_struct_type) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_5.2(%self.param: ref %C) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_5.2(%self.param: ref %C) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_5.2(%self.param: ref %C) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %B) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %A) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %A) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %A) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- temp.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %A: type = class_type @A [concrete]
|
|
// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete]
|
|
// CHECK:STDOUT: %A.Make.type: type = fn_type @A.Make [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %A.Make: %A.Make.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %B: type = class_type @B [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e39: type = pattern_type %B [concrete]
|
|
// CHECK:STDOUT: %B.Make.type: type = fn_type @B.Make [concrete]
|
|
// CHECK:STDOUT: %B.Make: %B.Make.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete]
|
|
// CHECK:STDOUT: %C.Make.type: type = fn_type @C.Make [concrete]
|
|
// CHECK:STDOUT: %C.Make: %C.Make.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_10.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_10.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_10.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_10.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_10.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generated {
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_10.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_10.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_10.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_10.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.3] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403171.4] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
// CHECK:STDOUT: %Make.ref.loc10: %A.Make.type = name_ref Make, @A.%A.Make.decl [concrete = constants.%A.Make]
|
|
// CHECK:STDOUT: %.loc10_10.1: ref %A = temporary_storage
|
|
// CHECK:STDOUT: %A.Make.call: init %A to %.loc10_10.1 = call %Make.ref.loc10()
|
|
// CHECK:STDOUT: %.loc10_10.2: ref %A = temporary %.loc10_10.1, %A.Make.call
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: <bound method> = bound_method %.loc10_10.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_10.2)
|
|
// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
|
// CHECK:STDOUT: %Make.ref.loc11: %B.Make.type = name_ref Make, @B.%B.Make.decl [concrete = constants.%B.Make]
|
|
// CHECK:STDOUT: %.loc11_10.1: ref %B = temporary_storage
|
|
// CHECK:STDOUT: %B.Make.call: init %B to %.loc11_10.1 = call %Make.ref.loc11()
|
|
// CHECK:STDOUT: %.loc11_10.2: ref %B = temporary %.loc11_10.1, %B.Make.call
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: <bound method> = bound_method %.loc11_10.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_10.2)
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
// CHECK:STDOUT: %Make.ref.loc12: %C.Make.type = name_ref Make, @C.%C.Make.decl [concrete = constants.%C.Make]
|
|
// CHECK:STDOUT: %.loc12_10.1: ref %C = temporary_storage
|
|
// CHECK:STDOUT: %C.Make.call: init %C to %.loc12_10.1 = call %Make.ref.loc12()
|
|
// CHECK:STDOUT: %.loc12_10.2: ref %C = temporary %.loc12_10.1, %C.Make.call
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: <bound method> = bound_method %.loc12_10.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%.loc12_10.2)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_10.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_10.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_10.1(%self.param: ref %empty_struct_type) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_10.2(%self.param: ref %A) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_10.2(%self.param: ref %A) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_10.2(%self.param: ref %A) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %B) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12(%self.param: ref %C) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %C) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %C) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- generic_class.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: %D.type: type = generic_class_type @D [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %D.generic: %D.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %D.dee: type = class_type @D, @D(%C) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.6fa: type = pattern_type %D.dee [concrete]
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.6fa = ref_binding_pattern a [concrete]
|
|
// CHECK:STDOUT: %a.var_patt: %pattern_type.6fa = var_pattern %a.patt [concrete]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %D.val: %D.dee = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.555: %pattern_type.6fa = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.0a8: %pattern_type.6fa = wrapper_binding_pattern self, %self.param_patt.555 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generated {
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.6fa = ref_param_pattern [concrete = constants.%self.param_patt.555]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.6fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0a8]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %D.dee = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %D.dee = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.6fa = ref_param_pattern [concrete = constants.%self.param_patt.555]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.6fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0a8]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %D.dee = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %D.dee = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %a.var: ref %D.dee = var_storage %a.var_patt
|
|
// CHECK:STDOUT: %.loc9_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc9_25.2: init %D.dee to %a.var = class_init () [concrete = constants.%D.val]
|
|
// CHECK:STDOUT: %.loc9_3: init %D.dee = converted %.loc9_25.1, %.loc9_25.2 [concrete = constants.%D.val]
|
|
// CHECK:STDOUT: assign %a.var, %.loc9_3
|
|
// CHECK:STDOUT: %.loc9_20: type = splice_block %D [concrete = constants.%D.dee] {
|
|
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [concrete = constants.%D.generic]
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
// CHECK:STDOUT: %D: type = class_type @D, @D(constants.%C) [concrete = constants.%D.dee]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %a: ref %D.dee = wrapper_binding a, %a.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %a.patt: %pattern_type.6fa = ref_binding_pattern a [concrete = constants.%a.patt]
|
|
// CHECK:STDOUT: %a.var_patt: %pattern_type.6fa = var_pattern %a.patt [concrete = constants.%a.var_patt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: <bound method> = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %empty_struct_type) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %D.dee) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %D.dee) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %D.dee) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- generic_use_inside_generic.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
|
|
// 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.1d0: type = class_type @C, @C(%T) [symbolic]
|
|
// CHECK:STDOUT: %empty_struct_type: type = 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: %require_complete.74a: <witness> = require_complete_type %C.1d0 [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.ebe: type = pattern_type %C.1d0 [symbolic]
|
|
// CHECK:STDOUT: %v.patt.f9d: %pattern_type.ebe = ref_binding_pattern v [symbolic]
|
|
// CHECK:STDOUT: %v.var_patt.ca3: %pattern_type.ebe = var_pattern %v.patt.f9d [symbolic]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %C.val.d4f: %C.1d0 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
|
|
// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_3.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.lookup_impl_witness.64e: <witness> = lookup_impl_witness %C.1d0, @Destroy [symbolic]
|
|
// CHECK:STDOUT: %Destroy.facet.19f: %Destroy.type = facet_value %C.1d0, (%Destroy.lookup_impl_witness.64e) [symbolic]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.bd6: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.19f) [symbolic]
|
|
// CHECK:STDOUT: %.6bd: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.bd6, %Destroy.facet.19f [symbolic]
|
|
// CHECK:STDOUT: %impl.elem2: %.6bd = impl_witness_access %Destroy.lookup_impl_witness.64e, element2 [symbolic]
|
|
// CHECK:STDOUT: %specific_impl_fn.d42: <specific function> = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.19f) [symbolic]
|
|
// CHECK:STDOUT: %C.d8e: type = class_type @C, @C(%empty_struct_type) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.2fd: type = pattern_type %C.d8e [concrete]
|
|
// CHECK:STDOUT: %v.patt.0e7: %pattern_type.2fd = ref_binding_pattern v [concrete]
|
|
// CHECK:STDOUT: %v.var_patt.259: %pattern_type.2fd = var_pattern %v.patt.0e7 [concrete]
|
|
// CHECK:STDOUT: %C.val.58e: %C.d8e = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.1d7: %pattern_type.2fd = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.b54: %pattern_type.2fd = wrapper_binding_pattern self, %self.param_patt.1d7 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %custom_witness.f8f19d.2: <witness> = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete]
|
|
// CHECK:STDOUT: %Destroy.facet.097: %Destroy.type = facet_value %C.d8e, (%custom_witness.f8f19d.2) [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.3da: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.097) [concrete]
|
|
// CHECK:STDOUT: %.cbc: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.3da, %Destroy.facet.097 [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generated {
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.2fd = ref_param_pattern [concrete = constants.%self.param_patt.1d7]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.2fd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b54]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C.d8e = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C.d8e = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.2fd = ref_param_pattern [concrete = constants.%self.param_patt.1d7]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.2fd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b54]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C.d8e = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C.d8e = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
|
// CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc6_17.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc6_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @F(%T.loc6_15.2: type) {
|
|
// CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %T.loc6_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %C.loc7_20.2: type = class_type @C, @C(%T.loc6_15.1) [symbolic = %C.loc7_20.2 (constants.%C.1d0)]
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %C.loc7_20.2 [symbolic = %require_complete (constants.%require_complete.74a)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %C.loc7_20.2 [symbolic = %pattern_type (constants.%pattern_type.ebe)]
|
|
// CHECK:STDOUT: %v.patt.loc7_15.2: @F.%pattern_type (%pattern_type.ebe) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt.f9d)]
|
|
// CHECK:STDOUT: %v.var_patt.loc7_3.2: @F.%pattern_type (%pattern_type.ebe) = var_pattern %v.patt.loc7_15.2 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt.ca3)]
|
|
// CHECK:STDOUT: %C.val: @F.%C.loc7_20.2 (%C.1d0) = struct_value () [symbolic = %C.val (constants.%C.val.d4f)]
|
|
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %C.loc7_20.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.64e)]
|
|
// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %C.loc7_20.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.19f)]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc7_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.bd6)]
|
|
// CHECK:STDOUT: %.loc7_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc7_3.3 [symbolic = %.loc7_3.4 (constants.%.6bd)]
|
|
// CHECK:STDOUT: %impl.elem2.loc7_3.2: @F.%.loc7_3.4 (%.6bd) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: <specific function> = specific_impl_function %impl.elem2.loc7_3.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc7_3.3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.d42)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %v.var: ref @F.%C.loc7_20.2 (%C.1d0) = var_storage %v.var_patt.loc7_3.1
|
|
// CHECK:STDOUT: %.loc7_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc7_25.2: init @F.%C.loc7_20.2 (%C.1d0) to %v.var = class_init () [symbolic = %C.val (constants.%C.val.d4f)]
|
|
// CHECK:STDOUT: %.loc7_3.1: init @F.%C.loc7_20.2 (%C.1d0) = converted %.loc7_25.1, %.loc7_25.2 [symbolic = %C.val (constants.%C.val.d4f)]
|
|
// CHECK:STDOUT: assign %v.var, %.loc7_3.1
|
|
// CHECK:STDOUT: %.loc7_20: type = splice_block %C.loc7_20.1 [symbolic = %C.loc7_20.2 (constants.%C.1d0)] {
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
|
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)]
|
|
// CHECK:STDOUT: %C.loc7_20.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_20.2 (constants.%C.1d0)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %v: ref @F.%C.loc7_20.2 (%C.1d0) = wrapper_binding v, %v.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %v.patt.loc7_15.1: @F.%pattern_type (%pattern_type.ebe) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt.f9d)]
|
|
// CHECK:STDOUT: %v.var_patt.loc7_3.1: @F.%pattern_type (%pattern_type.ebe) = var_pattern %v.patt.loc7_15.1 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt.ca3)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %impl.elem2.loc7_3.1: @F.%.loc7_3.4 (%.6bd) = impl_witness_access constants.%Destroy.lookup_impl_witness.64e, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)]
|
|
// CHECK:STDOUT: %bound_method.loc7_3.1: <bound method> = bound_method %v.var, %impl.elem2.loc7_3.1
|
|
// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%C.1d0, (constants.%Destroy.lookup_impl_witness.64e) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.19f)]
|
|
// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%C.1d0, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.19f)]
|
|
// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%C.1d0, (constants.%Destroy.lookup_impl_witness.64e) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.19f)]
|
|
// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%C.1d0, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.19f)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: <specific function> = specific_impl_function %impl.elem2.loc7_3.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.19f) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.d42)]
|
|
// CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %v.var, %specific_impl_fn.loc7_3.1
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.1(%self.param: ref %empty_struct_type) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %C.d8e) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %C.d8e) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.2(%self.param: ref %C.d8e) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @F(constants.%T) {
|
|
// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc6_15.1 => constants.%T
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @F(constants.%empty_struct_type) {
|
|
// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc6_15.1 => constants.%empty_struct_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %C.loc7_20.2 => constants.%C.d8e
|
|
// CHECK:STDOUT: %require_complete => constants.%complete_type
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2fd
|
|
// CHECK:STDOUT: %v.patt.loc7_15.2 => constants.%v.patt.0e7
|
|
// CHECK:STDOUT: %v.var_patt.loc7_3.2 => constants.%v.var_patt.259
|
|
// CHECK:STDOUT: %C.val => constants.%C.val.58e
|
|
// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.2
|
|
// CHECK:STDOUT: %Destroy.facet.loc7_3.3 => constants.%Destroy.facet.097
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.3da
|
|
// CHECK:STDOUT: %.loc7_3.4 => constants.%.cbc
|
|
// CHECK:STDOUT: %impl.elem2.loc7_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2
|
|
// CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- generic_use_inside_template.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template]
|
|
// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template]
|
|
// 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: %empty_struct_type: type = 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: %.c44: type = type_of_inst @F.%.loc7_20.5 [template]
|
|
// CHECK:STDOUT: %.d24: %.c44 = splice_inst @F.%.loc7_20.5 [template]
|
|
// CHECK:STDOUT: %.537: type = splice_inst @F.%.loc7_20.8 [template]
|
|
// CHECK:STDOUT: %require_complete.cb0: <witness> = require_complete_type %.537 [template]
|
|
// CHECK:STDOUT: %pattern_type.fcb: type = pattern_type %.537 [template]
|
|
// CHECK:STDOUT: %v.patt.126: %pattern_type.fcb = ref_binding_pattern v [template]
|
|
// CHECK:STDOUT: %v.var_patt.768: %pattern_type.fcb = var_pattern %v.patt.126 [template]
|
|
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %tuple.type: type = tuple_type (<instruction>) [concrete]
|
|
// CHECK:STDOUT: %.5d6: %.537 = splice_inst @F.%tuple.elem0 [template]
|
|
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
|
|
// CHECK:STDOUT: %Self: %Destroy.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.4e5: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self) [symbolic]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.4a0: %Destroy.WithSelf.SelfDestruct.type.4e5 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete]
|
|
// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.71d [concrete]
|
|
// CHECK:STDOUT: %.8cb: type = type_of_inst @F.%.loc7_3.8 [template]
|
|
// CHECK:STDOUT: %.c23: %.8cb = splice_inst @F.%.loc7_3.8 [template]
|
|
// CHECK:STDOUT: %.57c: type = type_of_inst @F.%.loc7_3.11 [template]
|
|
// CHECK:STDOUT: %.e63: %.57c = splice_inst @F.%.loc7_3.11 [template]
|
|
// CHECK:STDOUT: %C.d8efcc.1: type = class_type @C, @C(%empty_struct_type) [concrete]
|
|
// CHECK:STDOUT: %inst.class_type: <instruction> = inst_value [concrete] {
|
|
// CHECK:STDOUT: %C.d8efcc.2: type = class_type @C, @C(%empty_struct_type) [concrete = %C.d8efcc.1]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %inst.splice_block.426619.1: <instruction> = inst_value [concrete] {
|
|
// CHECK:STDOUT: %.6eb: type = splice_block %C.d8efcc.1 [concrete = %C.d8efcc.1] {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %pattern_type.2fd: type = pattern_type %C.d8efcc.1 [concrete]
|
|
// CHECK:STDOUT: %v.patt.0e7: %pattern_type.2fd = ref_binding_pattern v [concrete]
|
|
// CHECK:STDOUT: %v.var_patt.259: %pattern_type.2fd = var_pattern %v.patt.0e7 [concrete]
|
|
// CHECK:STDOUT: %C.val: %C.d8efcc.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %inst.splice_block.426619.2: <instruction> = inst_value [concrete] {
|
|
// CHECK:STDOUT: %.895: init %C.d8efcc.1 = splice_block %.57d [concrete = %C.val] {
|
|
// CHECK:STDOUT: %.711900.2: ref %C.d8efcc.1 = specific_inst @F.%v.var, @F(%empty_struct_type)
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%inst.splice_block.426619.2) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_3.1 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %self.param_patt.1d7: %pattern_type.2fd = ref_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt.b54: %pattern_type.2fd = wrapper_binding_pattern self, %self.param_patt.1d7 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.2 [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %custom_witness.f8f19d.2: <witness> = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete]
|
|
// CHECK:STDOUT: %Destroy.facet.097: %Destroy.type = facet_value %C.d8efcc.1, (%custom_witness.f8f19d.2) [concrete]
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.3da: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.097) [concrete]
|
|
// CHECK:STDOUT: %.cbc: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.3da, %Destroy.facet.097 [concrete]
|
|
// CHECK:STDOUT: %inst.splice_block.426619.3: <instruction> = inst_value [concrete] {
|
|
// CHECK:STDOUT: %.42e: <bound method> = splice_block %bound_method {
|
|
// CHECK:STDOUT: %.711900.1: ref %C.d8efcc.1 = specific_inst @F.%v.var, @F(%empty_struct_type)
|
|
// CHECK:STDOUT: %impl.elem2: %.cbc = impl_witness_access %custom_witness.f8f19d.2, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.2]
|
|
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.711900.1, %impl.elem2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %inst.call: <instruction> = inst_value [concrete] {
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.42e(%.711900.1)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core.import_ref.71d: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.4e5) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.4a0)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generated {
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.2fd = ref_param_pattern [concrete = constants.%self.param_patt.1d7]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.2fd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b54]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C.d8efcc.1 = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C.d8efcc.1 = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.2fd = ref_param_pattern [concrete = constants.%self.param_patt.1d7]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.2fd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b54]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %self.param: ref %C.d8efcc.1 = ref_param call_param0
|
|
// CHECK:STDOUT: %self: ref %C.d8efcc.1 = wrapper_binding self, %self.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
|
// CHECK:STDOUT: %T.patt.loc6_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [concrete = type] {
|
|
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.loc6_18.2: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %T.loc6_16.2: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @F(%T.loc6_16.2: type) {
|
|
// CHECK:STDOUT: %T.patt.loc6_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: %T.loc6_16.1: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %.loc7_20.5: <instruction> = call_action (%C.ref, %T.ref), false [template]
|
|
// CHECK:STDOUT: %.loc7_20.6: type = type_of_inst %.loc7_20.5 [template = %.loc7_20.6 (constants.%.c44)]
|
|
// CHECK:STDOUT: %.loc7_20.7: @F.%.loc7_20.6 (%.c44) = splice_inst %.loc7_20.5 [template = %.loc7_20.7 (constants.%.d24)]
|
|
// CHECK:STDOUT: %.loc7_20.8: <instruction> = convert_to_value_action %.loc7_20.3, type [template]
|
|
// CHECK:STDOUT: %.loc7_20.9: type = splice_inst %.loc7_20.8 [template = %.loc7_20.9 (constants.%.537)]
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc7_20.9 [template = %require_complete (constants.%require_complete.cb0)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc7_20.9 [template = %pattern_type (constants.%pattern_type.fcb)]
|
|
// CHECK:STDOUT: %v.patt.loc7_15.2: @F.%pattern_type (%pattern_type.fcb) = ref_binding_pattern v [template = %v.patt.loc7_15.2 (constants.%v.patt.126)]
|
|
// CHECK:STDOUT: %v.var_patt.loc7_3.2: @F.%pattern_type (%pattern_type.fcb) = var_pattern %v.patt.loc7_15.2 [template = %v.var_patt.loc7_3.2 (constants.%v.var_patt.768)]
|
|
// CHECK:STDOUT: %.loc7_3.6: %tuple.type = initialize_action %.loc7_25, %.loc7_20.9, %v.var, none, false [template]
|
|
// CHECK:STDOUT: %tuple.elem0: <instruction> = tuple_access %.loc7_3.6, element0 [template]
|
|
// CHECK:STDOUT: %.loc7_3.7: @F.%.loc7_20.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc7_3.7 (constants.%.5d6)]
|
|
// CHECK:STDOUT: %.loc7_3.8: <instruction> = compound_member_access_action %v.var, constants.%assoc2 [template]
|
|
// CHECK:STDOUT: %.loc7_3.9: type = type_of_inst %.loc7_3.8 [template = %.loc7_3.9 (constants.%.8cb)]
|
|
// CHECK:STDOUT: %.loc7_3.10: @F.%.loc7_3.9 (%.8cb) = splice_inst %.loc7_3.8 [template = %.loc7_3.10 (constants.%.c23)]
|
|
// CHECK:STDOUT: %.loc7_3.11: <instruction> = call_action (%.loc7_3.3), true [template]
|
|
// CHECK:STDOUT: %.loc7_3.12: type = type_of_inst %.loc7_3.11 [template = %.loc7_3.12 (constants.%.57c)]
|
|
// CHECK:STDOUT: %.loc7_3.13: @F.%.loc7_3.12 (%.57c) = splice_inst %.loc7_3.11 [template = %.loc7_3.13 (constants.%.e63)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %v.var: ref @F.%.loc7_20.9 (%.537) = var_storage %v.var_patt.loc7_3.1
|
|
// CHECK:STDOUT: %.loc7_25: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
|
// CHECK:STDOUT: %.loc7_3.1: @F.%.loc7_20.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc7_3.7 (constants.%.5d6)]
|
|
// CHECK:STDOUT: assign %v.var, %.loc7_3.1
|
|
// CHECK:STDOUT: %.loc7_20.1: type = splice_block %.loc7_20.4 [template = %.loc7_20.9 (constants.%.537)] {
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
|
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_16.2 [template = %T.loc6_16.1 (constants.%T)]
|
|
// CHECK:STDOUT: %.loc7_20.2: type = type_of_inst %.loc7_20.5 [template = %.loc7_20.6 (constants.%.c44)]
|
|
// CHECK:STDOUT: %.loc7_20.3: @F.%.loc7_20.6 (%.c44) = splice_inst %.loc7_20.5 [template = %.loc7_20.7 (constants.%.d24)]
|
|
// CHECK:STDOUT: %.loc7_20.4: type = splice_inst %.loc7_20.8 [template = %.loc7_20.9 (constants.%.537)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %v: ref @F.%.loc7_20.9 (%.537) = wrapper_binding v, %v.var
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %v.patt.loc7_15.1: @F.%pattern_type (%pattern_type.fcb) = ref_binding_pattern v [template = %v.patt.loc7_15.2 (constants.%v.patt.126)]
|
|
// CHECK:STDOUT: %v.var_patt.loc7_3.1: @F.%pattern_type (%pattern_type.fcb) = var_pattern %v.patt.loc7_15.1 [template = %v.var_patt.loc7_3.2 (constants.%v.var_patt.768)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %.loc7_3.2: type = type_of_inst %.loc7_3.8 [template = %.loc7_3.9 (constants.%.8cb)]
|
|
// CHECK:STDOUT: %.loc7_3.3: @F.%.loc7_3.9 (%.8cb) = splice_inst %.loc7_3.8 [template = %.loc7_3.10 (constants.%.c23)]
|
|
// CHECK:STDOUT: %.loc7_3.4: type = type_of_inst %.loc7_3.11 [template = %.loc7_3.12 (constants.%.57c)]
|
|
// CHECK:STDOUT: %.loc7_3.5: @F.%.loc7_3.12 (%.57c) = splice_inst %.loc7_3.11 [template = %.loc7_3.13 (constants.%.e63)]
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.1(%self.param: ref %empty_struct_type) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %C.d8efcc.1) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %C.d8efcc.1) = "no_op";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.2(%self.param: ref %C.d8efcc.1) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param)
|
|
// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param)
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @F(constants.%T) {
|
|
// CHECK:STDOUT: %T.patt.loc6_16.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc6_16.1 => constants.%T
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @F(constants.%empty_struct_type) {
|
|
// CHECK:STDOUT: %T.patt.loc6_16.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc6_16.1 => constants.%empty_struct_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %.loc7_20.5 => constants.%inst.class_type
|
|
// CHECK:STDOUT: %.loc7_20.6 => type
|
|
// CHECK:STDOUT: %.loc7_20.7 => constants.%C.d8efcc.1
|
|
// CHECK:STDOUT: %.loc7_20.8 => constants.%inst.splice_block.426619.1
|
|
// CHECK:STDOUT: %.loc7_20.9 => constants.%C.d8efcc.1
|
|
// CHECK:STDOUT: %require_complete => constants.%complete_type
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2fd
|
|
// CHECK:STDOUT: %v.patt.loc7_15.2 => constants.%v.patt.0e7
|
|
// CHECK:STDOUT: %v.var_patt.loc7_3.2 => constants.%v.var_patt.259
|
|
// CHECK:STDOUT: %.loc7_3.6 => constants.%tuple
|
|
// CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.2
|
|
// CHECK:STDOUT: %.loc7_3.7 => constants.%C.val
|
|
// CHECK:STDOUT: %.loc7_3.8 => constants.%inst.splice_block.426619.3
|
|
// CHECK:STDOUT: %.loc7_3.9 => <bound method>
|
|
// CHECK:STDOUT: %.loc7_3.10 => <not constant>
|
|
// CHECK:STDOUT: %.loc7_3.11 => constants.%inst.call
|
|
// CHECK:STDOUT: %.loc7_3.12 => constants.%empty_tuple.type
|
|
// CHECK:STDOUT: %.loc7_3.13 => <not constant>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|