|
@@ -10,50 +10,36 @@
|
|
|
// TIP: To dump output, run:
|
|
// TIP: To dump output, run:
|
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/destroy_calls.carbon
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/destroy_calls.carbon
|
|
|
|
|
|
|
|
-// --- types.carbon
|
|
|
|
|
-
|
|
|
|
|
-library "[[@TEST_NAME]]";
|
|
|
|
|
-
|
|
|
|
|
-class NoAddr {
|
|
|
|
|
- fn Make() -> NoAddr;
|
|
|
|
|
- fn destroy[self: Self]();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-class ExplicitReturn {
|
|
|
|
|
- fn Make() -> ExplicitReturn;
|
|
|
|
|
- fn destroy[self: Self]() -> ();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-class WithAddr {
|
|
|
|
|
- fn Make() -> WithAddr;
|
|
|
|
|
- fn destroy[addr self: Self*]();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
// --- implicit_return.carbon
|
|
// --- implicit_return.carbon
|
|
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
library "[[@TEST_NAME]]";
|
|
|
-import library "types";
|
|
|
|
|
|
|
+
|
|
|
|
|
+class A {}
|
|
|
|
|
+class B {}
|
|
|
|
|
+class C {}
|
|
|
|
|
|
|
|
//@dump-sem-ir-begin
|
|
//@dump-sem-ir-begin
|
|
|
fn F() {
|
|
fn F() {
|
|
|
- var no_addr: NoAddr;
|
|
|
|
|
- var explicit_return: ExplicitReturn;
|
|
|
|
|
- var with_addr: WithAddr;
|
|
|
|
|
|
|
+ var a: A;
|
|
|
|
|
+ var b: B;
|
|
|
|
|
+ var c: C;
|
|
|
}
|
|
}
|
|
|
//@dump-sem-ir-end
|
|
//@dump-sem-ir-end
|
|
|
|
|
|
|
|
// --- nested_scope.carbon
|
|
// --- nested_scope.carbon
|
|
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
library "[[@TEST_NAME]]";
|
|
|
-import library "types";
|
|
|
|
|
|
|
+
|
|
|
|
|
+class A {}
|
|
|
|
|
+class B {}
|
|
|
|
|
+class C {}
|
|
|
|
|
|
|
|
//@dump-sem-ir-begin
|
|
//@dump-sem-ir-begin
|
|
|
fn F() {
|
|
fn F() {
|
|
|
- var no_addr: NoAddr;
|
|
|
|
|
- var explicit_return: ExplicitReturn;
|
|
|
|
|
- var with_addr: WithAddr;
|
|
|
|
|
|
|
+ var a: A;
|
|
|
|
|
+ var b: B;
|
|
|
if (true) {
|
|
if (true) {
|
|
|
- var in_scope: NoAddr;
|
|
|
|
|
|
|
+ var c: C;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//@dump-sem-ir-end
|
|
//@dump-sem-ir-end
|
|
@@ -61,43 +47,21 @@ fn F() {
|
|
|
// --- temp.carbon
|
|
// --- temp.carbon
|
|
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
library "[[@TEST_NAME]]";
|
|
|
-import library "types";
|
|
|
|
|
|
|
+
|
|
|
|
|
+class A { fn Make() -> A; }
|
|
|
|
|
+class B { fn Make() -> B; }
|
|
|
|
|
+class C { fn Make() -> C; }
|
|
|
|
|
|
|
|
//@dump-sem-ir-begin
|
|
//@dump-sem-ir-begin
|
|
|
fn F() {
|
|
fn F() {
|
|
|
// TODO: The scoping of these destroy calls is incorrect. Maybe we need to
|
|
// TODO: The scoping of these destroy calls is incorrect. Maybe we need to
|
|
|
// establish statement scopes?
|
|
// establish statement scopes?
|
|
|
- NoAddr.Make();
|
|
|
|
|
- ExplicitReturn.Make();
|
|
|
|
|
- WithAddr.Make();
|
|
|
|
|
|
|
+ A.Make();
|
|
|
|
|
+ B.Make();
|
|
|
|
|
+ C.Make();
|
|
|
}
|
|
}
|
|
|
//@dump-sem-ir-end
|
|
//@dump-sem-ir-end
|
|
|
|
|
|
|
|
-// --- fail_recovery.carbon
|
|
|
|
|
-
|
|
|
|
|
-library "[[@TEST_NAME]]";
|
|
|
|
|
-
|
|
|
|
|
-class NoSelf {
|
|
|
|
|
- // CHECK:STDERR: fail_recovery.carbon:[[@LINE+4]]:3: error: missing implicit `self` parameter [DestroyFunctionMissingSelf]
|
|
|
|
|
- // CHECK:STDERR: fn destroy();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
- fn destroy();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-class Args {
|
|
|
|
|
- // CHECK:STDERR: fail_recovery.carbon:[[@LINE+4]]:26: error: unexpected parameter [DestroyFunctionNonEmptyExplicitParams]
|
|
|
|
|
- // CHECK:STDERR: fn destroy[self: Self](x: ());
|
|
|
|
|
- // CHECK:STDERR: ^~~~~
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
- fn destroy[self: Self](x: ());
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-fn F() {
|
|
|
|
|
- var a: NoSelf;
|
|
|
|
|
- var b: Args;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
// --- generic_class.carbon
|
|
// --- generic_class.carbon
|
|
|
library "[[@TEST_NAME]]";
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
|
@@ -127,30 +91,27 @@ fn G() { F({}); }
|
|
|
// CHECK:STDOUT: --- implicit_return.carbon
|
|
// CHECK:STDOUT: --- implicit_return.carbon
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %A: type = class_type @A [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
|
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B: type = class_type @B [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %NoAddr: type = class_type @NoAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %pattern_type.88f: type = pattern_type %NoAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn: type = class_type @ExplicitReturn [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %pattern_type.611: type = pattern_type %ExplicitReturn [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr: type = class_type @WithAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %pattern_type.f93: type = pattern_type %WithAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.type: type = fn_type @WithAddr.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op: %WithAddr.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.b4e: type = ptr_type %WithAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.type: type = fn_type @ExplicitReturn.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op: %ExplicitReturn.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.b0a: type = ptr_type %ExplicitReturn [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.type: type = fn_type @NoAddr.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op: %NoAddr.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.4b8: type = ptr_type %NoAddr [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %pattern_type.049: type = pattern_type %B [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Main.NoAddr: type = import_ref Main//types, NoAddr, loaded [concrete = constants.%NoAddr]
|
|
|
|
|
-// CHECK:STDOUT: %Main.ExplicitReturn: type = import_ref Main//types, ExplicitReturn, loaded [concrete = constants.%ExplicitReturn]
|
|
|
|
|
-// CHECK:STDOUT: %Main.WithAddr: type = import_ref Main//types, WithAddr, loaded [concrete = constants.%WithAddr]
|
|
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: file {
|
|
@@ -160,66 +121,63 @@ fn G() { F({}); }
|
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: fn @F() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %no_addr.patt: %pattern_type.88f = binding_pattern no_addr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %no_addr.var_patt: %pattern_type.88f = var_pattern %no_addr.patt [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %a.patt: %pattern_type.c10 = binding_pattern a [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %a.var_patt: %pattern_type.c10 = var_pattern %a.patt [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %no_addr.var: ref %NoAddr = var %no_addr.var_patt
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.ref: type = name_ref NoAddr, imports.%Main.NoAddr [concrete = constants.%NoAddr]
|
|
|
|
|
-// CHECK:STDOUT: %no_addr: ref %NoAddr = bind_name no_addr, %no_addr.var
|
|
|
|
|
|
|
+// CHECK:STDOUT: %a.var: ref %A = var %a.var_patt
|
|
|
|
|
+// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
|
|
|
+// CHECK:STDOUT: %a: ref %A = bind_name a, %a.var
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %explicit_return.patt: %pattern_type.611 = binding_pattern explicit_return [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %explicit_return.var_patt: %pattern_type.611 = var_pattern %explicit_return.patt [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %b.patt: %pattern_type.049 = binding_pattern b [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %b.var_patt: %pattern_type.049 = var_pattern %b.patt [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %explicit_return.var: ref %ExplicitReturn = var %explicit_return.var_patt
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.ref: type = name_ref ExplicitReturn, imports.%Main.ExplicitReturn [concrete = constants.%ExplicitReturn]
|
|
|
|
|
-// CHECK:STDOUT: %explicit_return: ref %ExplicitReturn = bind_name explicit_return, %explicit_return.var
|
|
|
|
|
|
|
+// CHECK:STDOUT: %b.var: ref %B = var %b.var_patt
|
|
|
|
|
+// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
|
|
|
|
+// CHECK:STDOUT: %b: ref %B = bind_name b, %b.var
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %with_addr.patt: %pattern_type.f93 = binding_pattern with_addr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %with_addr.var_patt: %pattern_type.f93 = var_pattern %with_addr.patt [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %c.patt: %pattern_type.c48 = binding_pattern c [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %c.var_patt: %pattern_type.c48 = var_pattern %c.patt [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %with_addr.var: ref %WithAddr = var %with_addr.var_patt
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.ref: type = name_ref WithAddr, imports.%Main.WithAddr [concrete = constants.%WithAddr]
|
|
|
|
|
-// CHECK:STDOUT: %with_addr: ref %WithAddr = bind_name with_addr, %with_addr.var
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.bound: <bound method> = bound_method %with_addr.var, constants.%WithAddr.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc9: %ptr.b4e = addr_of %with_addr.var
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %WithAddr.as.Destroy.impl.Op.bound(%addr.loc9)
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.bound: <bound method> = bound_method %explicit_return.var, constants.%ExplicitReturn.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc8: %ptr.b0a = addr_of %explicit_return.var
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.call: init %empty_tuple.type = call %ExplicitReturn.as.Destroy.impl.Op.bound(%addr.loc8)
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.bound: <bound method> = bound_method %no_addr.var, constants.%NoAddr.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc7: %ptr.4b8 = addr_of %no_addr.var
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %NoAddr.as.Destroy.impl.Op.bound(%addr.loc7)
|
|
|
|
|
|
|
+// CHECK:STDOUT: %c.var: ref %C = var %c.var_patt
|
|
|
|
|
+// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
|
|
|
+// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.bound: <bound method> = bound_method %c.var, constants.%C.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc12: %ptr.019 = addr_of %c.var
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.call: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound(%addr.loc12)
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.bound: <bound method> = bound_method %b.var, constants.%B.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc11: %ptr.e79 = addr_of %b.var
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.call: init %empty_tuple.type = call %B.as.Destroy.impl.Op.bound(%addr.loc11)
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.bound: <bound method> = bound_method %a.var, constants.%A.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc10: %ptr.6db = addr_of %a.var
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.call: init %empty_tuple.type = call %A.as.Destroy.impl.Op.bound(%addr.loc10)
|
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- nested_scope.carbon
|
|
// CHECK:STDOUT: --- nested_scope.carbon
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %A: type = class_type @A [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
|
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B: type = class_type @B [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %ptr.e79: type = ptr_type %B [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %NoAddr: type = class_type @NoAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %pattern_type.88f: type = pattern_type %NoAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn: type = class_type @ExplicitReturn [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %pattern_type.611: type = pattern_type %ExplicitReturn [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr: type = class_type @WithAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %pattern_type.f93: type = pattern_type %WithAddr [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %pattern_type.049: type = pattern_type %B [concrete]
|
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.type: type = fn_type @NoAddr.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op: %NoAddr.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.4b8: type = ptr_type %NoAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.type: type = fn_type @WithAddr.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op: %WithAddr.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.b4e: type = ptr_type %WithAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.type: type = fn_type @ExplicitReturn.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op: %ExplicitReturn.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.b0a: type = ptr_type %ExplicitReturn [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Main.NoAddr: type = import_ref Main//types, NoAddr, loaded [concrete = constants.%NoAddr]
|
|
|
|
|
-// CHECK:STDOUT: %Main.ExplicitReturn: type = import_ref Main//types, ExplicitReturn, loaded [concrete = constants.%ExplicitReturn]
|
|
|
|
|
-// CHECK:STDOUT: %Main.WithAddr: type = import_ref Main//types, WithAddr, loaded [concrete = constants.%WithAddr]
|
|
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: file {
|
|
@@ -229,88 +187,72 @@ fn G() { F({}); }
|
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: fn @F() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %no_addr.patt: %pattern_type.88f = binding_pattern no_addr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %no_addr.var_patt: %pattern_type.88f = var_pattern %no_addr.patt [concrete]
|
|
|
|
|
-// CHECK:STDOUT: }
|
|
|
|
|
-// CHECK:STDOUT: %no_addr.var: ref %NoAddr = var %no_addr.var_patt
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.ref.loc7: type = name_ref NoAddr, imports.%Main.NoAddr [concrete = constants.%NoAddr]
|
|
|
|
|
-// CHECK:STDOUT: %no_addr: ref %NoAddr = bind_name no_addr, %no_addr.var
|
|
|
|
|
-// CHECK:STDOUT: name_binding_decl {
|
|
|
|
|
-// CHECK:STDOUT: %explicit_return.patt: %pattern_type.611 = binding_pattern explicit_return [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %explicit_return.var_patt: %pattern_type.611 = var_pattern %explicit_return.patt [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %a.patt: %pattern_type.c10 = binding_pattern a [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %a.var_patt: %pattern_type.c10 = var_pattern %a.patt [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %explicit_return.var: ref %ExplicitReturn = var %explicit_return.var_patt
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.ref: type = name_ref ExplicitReturn, imports.%Main.ExplicitReturn [concrete = constants.%ExplicitReturn]
|
|
|
|
|
-// CHECK:STDOUT: %explicit_return: ref %ExplicitReturn = bind_name explicit_return, %explicit_return.var
|
|
|
|
|
|
|
+// CHECK:STDOUT: %a.var: ref %A = var %a.var_patt
|
|
|
|
|
+// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
|
|
|
+// CHECK:STDOUT: %a: ref %A = bind_name a, %a.var
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %with_addr.patt: %pattern_type.f93 = binding_pattern with_addr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %with_addr.var_patt: %pattern_type.f93 = var_pattern %with_addr.patt [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %b.patt: %pattern_type.049 = binding_pattern b [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %b.var_patt: %pattern_type.049 = var_pattern %b.patt [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %with_addr.var: ref %WithAddr = var %with_addr.var_patt
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.ref: type = name_ref WithAddr, imports.%Main.WithAddr [concrete = constants.%WithAddr]
|
|
|
|
|
-// CHECK:STDOUT: %with_addr: ref %WithAddr = bind_name with_addr, %with_addr.var
|
|
|
|
|
|
|
+// CHECK:STDOUT: %b.var: ref %B = var %b.var_patt
|
|
|
|
|
+// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
|
|
|
|
+// CHECK:STDOUT: %b: ref %B = bind_name b, %b.var
|
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
|
|
// CHECK:STDOUT: if %true br !if.then else br !if.else
|
|
// CHECK:STDOUT: if %true br !if.then else br !if.else
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !if.then:
|
|
// CHECK:STDOUT: !if.then:
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %in_scope.patt: %pattern_type.88f = binding_pattern in_scope [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %in_scope.var_patt: %pattern_type.88f = var_pattern %in_scope.patt [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %c.patt: %pattern_type.c48 = binding_pattern c [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %c.var_patt: %pattern_type.c48 = var_pattern %c.patt [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %in_scope.var: ref %NoAddr = var %in_scope.var_patt
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.ref.loc11: type = name_ref NoAddr, imports.%Main.NoAddr [concrete = constants.%NoAddr]
|
|
|
|
|
-// CHECK:STDOUT: %in_scope: ref %NoAddr = bind_name in_scope, %in_scope.var
|
|
|
|
|
|
|
+// CHECK:STDOUT: %c.var: ref %C = var %c.var_patt
|
|
|
|
|
+// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
|
|
|
+// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
|
|
|
// CHECK:STDOUT: br !if.else
|
|
// CHECK:STDOUT: br !if.else
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !if.else:
|
|
// CHECK:STDOUT: !if.else:
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.bound.loc11: <bound method> = bound_method %in_scope.var, constants.%NoAddr.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc11: %ptr.4b8 = addr_of %in_scope.var
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %NoAddr.as.Destroy.impl.Op.bound.loc11(%addr.loc11)
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.bound: <bound method> = bound_method %with_addr.var, constants.%WithAddr.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc9: %ptr.b4e = addr_of %with_addr.var
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %WithAddr.as.Destroy.impl.Op.bound(%addr.loc9)
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.bound: <bound method> = bound_method %explicit_return.var, constants.%ExplicitReturn.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc8: %ptr.b0a = addr_of %explicit_return.var
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.call: init %empty_tuple.type = call %ExplicitReturn.as.Destroy.impl.Op.bound(%addr.loc8)
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.bound.loc7: <bound method> = bound_method %no_addr.var, constants.%NoAddr.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc7: %ptr.4b8 = addr_of %no_addr.var
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %NoAddr.as.Destroy.impl.Op.bound.loc7(%addr.loc7)
|
|
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.bound: <bound method> = bound_method %c.var, constants.%C.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc13: %ptr.019 = addr_of %c.var
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.call: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound(%addr.loc13)
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.bound: <bound method> = bound_method %b.var, constants.%B.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc11: %ptr.e79 = addr_of %b.var
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.call: init %empty_tuple.type = call %B.as.Destroy.impl.Op.bound(%addr.loc11)
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.bound: <bound method> = bound_method %a.var, constants.%A.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc10: %ptr.6db = addr_of %a.var
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.call: init %empty_tuple.type = call %A.as.Destroy.impl.Op.bound(%addr.loc10)
|
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- temp.carbon
|
|
// CHECK:STDOUT: --- temp.carbon
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %A: type = class_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: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %A.Make: %A.Make.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B: type = class_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: %ptr.e79: type = ptr_type %B [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C: type = class_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: %ptr.019: type = ptr_type %C [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
+// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %NoAddr: type = class_type @NoAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.Make.type: type = fn_type @NoAddr.Make [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.Make: %NoAddr.Make.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn: type = class_type @ExplicitReturn [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.Make.type: type = fn_type @ExplicitReturn.Make [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.Make: %ExplicitReturn.Make.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr: type = class_type @WithAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.Make.type: type = fn_type @WithAddr.Make [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.Make: %WithAddr.Make.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.type: type = fn_type @WithAddr.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op: %WithAddr.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.b4e: type = ptr_type %WithAddr [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.type: type = fn_type @ExplicitReturn.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op: %ExplicitReturn.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.b0a: type = ptr_type %ExplicitReturn [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.type: type = fn_type @NoAddr.as.Destroy.impl.Op [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op: %NoAddr.as.Destroy.impl.Op.type = struct_value () [concrete]
|
|
|
|
|
-// CHECK:STDOUT: %ptr.4b8: type = ptr_type %NoAddr [concrete]
|
|
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Main.NoAddr: type = import_ref Main//types, NoAddr, loaded [concrete = constants.%NoAddr]
|
|
|
|
|
-// CHECK:STDOUT: %Main.ExplicitReturn: type = import_ref Main//types, ExplicitReturn, loaded [concrete = constants.%ExplicitReturn]
|
|
|
|
|
-// CHECK:STDOUT: %Main.WithAddr: type = import_ref Main//types, WithAddr, loaded [concrete = constants.%WithAddr]
|
|
|
|
|
-// CHECK:STDOUT: %Main.import_ref.784: %NoAddr.Make.type = import_ref Main//types, loc5_22, loaded [concrete = constants.%NoAddr.Make]
|
|
|
|
|
-// CHECK:STDOUT: %Main.import_ref.8e0: %ExplicitReturn.Make.type = import_ref Main//types, loc10_30, loaded [concrete = constants.%ExplicitReturn.Make]
|
|
|
|
|
-// CHECK:STDOUT: %Main.import_ref.974: %WithAddr.Make.type = import_ref Main//types, loc15_24, loaded [concrete = constants.%WithAddr.Make]
|
|
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: file {
|
|
@@ -319,30 +261,30 @@ fn G() { F({}); }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: fn @F() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %NoAddr.ref: type = name_ref NoAddr, imports.%Main.NoAddr [concrete = constants.%NoAddr]
|
|
|
|
|
-// CHECK:STDOUT: %Make.ref.loc9: %NoAddr.Make.type = name_ref Make, imports.%Main.import_ref.784 [concrete = constants.%NoAddr.Make]
|
|
|
|
|
-// CHECK:STDOUT: %.loc9_15.1: ref %NoAddr = temporary_storage
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.Make.call: init %NoAddr = call %Make.ref.loc9() to %.loc9_15.1
|
|
|
|
|
-// CHECK:STDOUT: %.loc9_15.2: ref %NoAddr = temporary %.loc9_15.1, %NoAddr.Make.call
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.ref: type = name_ref ExplicitReturn, imports.%Main.ExplicitReturn [concrete = constants.%ExplicitReturn]
|
|
|
|
|
-// CHECK:STDOUT: %Make.ref.loc10: %ExplicitReturn.Make.type = name_ref Make, imports.%Main.import_ref.8e0 [concrete = constants.%ExplicitReturn.Make]
|
|
|
|
|
-// CHECK:STDOUT: %.loc10_23.1: ref %ExplicitReturn = temporary_storage
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.Make.call: init %ExplicitReturn = call %Make.ref.loc10() to %.loc10_23.1
|
|
|
|
|
-// CHECK:STDOUT: %.loc10_23.2: ref %ExplicitReturn = temporary %.loc10_23.1, %ExplicitReturn.Make.call
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.ref: type = name_ref WithAddr, imports.%Main.WithAddr [concrete = constants.%WithAddr]
|
|
|
|
|
-// CHECK:STDOUT: %Make.ref.loc11: %WithAddr.Make.type = name_ref Make, imports.%Main.import_ref.974 [concrete = constants.%WithAddr.Make]
|
|
|
|
|
-// CHECK:STDOUT: %.loc11_17.1: ref %WithAddr = temporary_storage
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.Make.call: init %WithAddr = call %Make.ref.loc11() to %.loc11_17.1
|
|
|
|
|
-// CHECK:STDOUT: %.loc11_17.2: ref %WithAddr = temporary %.loc11_17.1, %WithAddr.Make.call
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc11_17.2, constants.%WithAddr.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc11: %ptr.b4e = addr_of %.loc11_17.2
|
|
|
|
|
-// CHECK:STDOUT: %WithAddr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %WithAddr.as.Destroy.impl.Op.bound(%addr.loc11)
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc10_23.2, constants.%ExplicitReturn.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc10: %ptr.b0a = addr_of %.loc10_23.2
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitReturn.as.Destroy.impl.Op.call: init %empty_tuple.type = call %ExplicitReturn.as.Destroy.impl.Op.bound(%addr.loc10)
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc9_15.2, constants.%NoAddr.as.Destroy.impl.Op
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc9: %ptr.4b8 = addr_of %.loc9_15.2
|
|
|
|
|
-// CHECK:STDOUT: %NoAddr.as.Destroy.impl.Op.call: init %empty_tuple.type = call %NoAddr.as.Destroy.impl.Op.bound(%addr.loc9)
|
|
|
|
|
|
|
+// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
|
|
|
|
+// CHECK:STDOUT: %Make.ref.loc12: %A.Make.type = name_ref Make, @A.%A.Make.decl [concrete = constants.%A.Make]
|
|
|
|
|
+// CHECK:STDOUT: %.loc12_10.1: ref %A = temporary_storage
|
|
|
|
|
+// CHECK:STDOUT: %A.Make.call: init %A = call %Make.ref.loc12() to %.loc12_10.1
|
|
|
|
|
+// CHECK:STDOUT: %.loc12_10.2: ref %A = temporary %.loc12_10.1, %A.Make.call
|
|
|
|
|
+// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
|
|
|
|
+// CHECK:STDOUT: %Make.ref.loc13: %B.Make.type = name_ref Make, @B.%B.Make.decl [concrete = constants.%B.Make]
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_10.1: ref %B = temporary_storage
|
|
|
|
|
+// CHECK:STDOUT: %B.Make.call: init %B = call %Make.ref.loc13() to %.loc13_10.1
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_10.2: ref %B = temporary %.loc13_10.1, %B.Make.call
|
|
|
|
|
+// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
|
|
|
|
+// CHECK:STDOUT: %Make.ref.loc14: %C.Make.type = name_ref Make, @C.%C.Make.decl [concrete = constants.%C.Make]
|
|
|
|
|
+// CHECK:STDOUT: %.loc14_10.1: ref %C = temporary_storage
|
|
|
|
|
+// CHECK:STDOUT: %C.Make.call: init %C = call %Make.ref.loc14() to %.loc14_10.1
|
|
|
|
|
+// CHECK:STDOUT: %.loc14_10.2: ref %C = temporary %.loc14_10.1, %C.Make.call
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc14_10.2, constants.%C.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc14: %ptr.019 = addr_of %.loc14_10.2
|
|
|
|
|
+// CHECK:STDOUT: %C.as.Destroy.impl.Op.call: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound(%addr.loc14)
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc13_10.2, constants.%B.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc13: %ptr.e79 = addr_of %.loc13_10.2
|
|
|
|
|
+// CHECK:STDOUT: %B.as.Destroy.impl.Op.call: init %empty_tuple.type = call %B.as.Destroy.impl.Op.bound(%addr.loc13)
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc12_10.2, constants.%A.as.Destroy.impl.Op
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc12: %ptr.6db = addr_of %.loc12_10.2
|
|
|
|
|
+// CHECK:STDOUT: %A.as.Destroy.impl.Op.call: init %empty_tuple.type = call %A.as.Destroy.impl.Op.bound(%addr.loc12)
|
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|