Form-aware textual format for return parameters and arguments (#6588)

The key changes are:
- Function output parameters are now prefixed with `out`, and more
consistently formatted as named parameters.
- Function and inst output arguments are now written as part of the inst
form, rather than as one of the inst arguments.

As a drive-by fix, this also changes `Temporary::storage_id` from
`DestInstId` to `InstId`, because it doesn't represent an output
parameter of the `Temporary` inst itself.

See the review of
[#6532](https://github.com/carbon-language/carbon-lang/pull/6532) and
[this Discord
discussion](https://discord.com/channels/655572317891461132/999638000126394370/1458268977020141589)
for additional background.
This commit is contained in:
Geoff Romer
2026-01-14 23:27:21 +00:00
committed by GitHub
parent 9861c31476
commit 4329a83e4c
353 changed files with 1779 additions and 1721 deletions
@@ -207,13 +207,13 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: .Make = %MyInt32.Make.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type";
// CHECK:STDOUT: fn @IntLiteral() -> out %return.param: type = "int_literal.make_type";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int(%N.param: %MyIntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: fn @Int(%N.param: %MyIntLiteral) -> out %return.param: type = "int.make_type_signed";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @MyInt32.Make(%a.param.loc18: %MyIntLiteral) -> %MyInt32 = "int.convert_checked";
// CHECK:STDOUT: fn @MyInt32.Make(%a.param.loc18: %MyIntLiteral) -> out %return.param.loc18: %MyInt32 = "int.convert_checked";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @MyAdd(%a.param: %MyInt32, %b.param: %MyInt32) -> %MyInt32 = "int.sadd";
// CHECK:STDOUT: fn @MyAdd(%a.param: %MyInt32, %b.param: %MyInt32) -> out %return.param: %MyInt32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
@@ -287,5 +287,5 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: .Self = constants.%MyIntLiteral
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int(%N.param: %MyIntLiteral) -> type;
// CHECK:STDOUT: fn @Int(%N.param: %MyIntLiteral) -> out %return.param: type;
// CHECK:STDOUT:
+2 -2
View File
@@ -188,9 +188,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Add(%a.param: %i32, %b.param: %i32) -> %i32 = "int.sadd";
// CHECK:STDOUT: fn @Add(%a.param: %i32, %b.param: %i32) -> out %return.param: %i32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @RuntimeCall(%a.param: %i32, %b.param: %i32) -> %i32 {
// CHECK:STDOUT: fn @RuntimeCall(%a.param: %i32, %b.param: %i32) -> out %return.param: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [concrete = constants.%Add]
// CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a
@@ -501,9 +501,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: witness = %ImplicitAs.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type";
// CHECK:STDOUT: fn @IntLiteral() -> out %return.param: type = "int_literal.make_type";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed";
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @AddWith.Op(@AddWith.%T.loc7_19.2: type, @AddWith.%Self.loc7_29.1: @AddWith.%AddWith.type (%AddWith.type.26b)) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
@@ -513,7 +513,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.1f3)]
// CHECK:STDOUT: %.loc8_37.1: form = init_form %Self.binding.as_type, call_param2 [symbolic = %.loc8_37.1 (constants.%.e4b)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e), %other.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e)) -> @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e);
// CHECK:STDOUT: fn(%self.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e), %other.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e)) -> out %return.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @As.Convert(@As.%T.loc11_14.2: type, @As.%Self.loc11_24.1: @As.%As.type (%As.type.b54)) {
@@ -525,7 +525,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %.loc12_31.1: form = init_form %T, call_param1 [symbolic = %.loc12_31.1 (constants.%.e5f)]
// CHECK:STDOUT: %pattern_type.loc12_28: type = pattern_type %T [symbolic = %pattern_type.loc12_28 (constants.%pattern_type.51d)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @As.Convert.%Self.binding.as_type (%Self.binding.as_type.69d)) -> @As.Convert.%T (%T);
// CHECK:STDOUT: fn(%self.param: @As.Convert.%Self.binding.as_type (%Self.binding.as_type.69d)) -> out %return.param: @As.Convert.%T (%T);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @ImplicitAs.Convert(@ImplicitAs.%T.loc15_22.2: type, @ImplicitAs.%Self.loc15_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe)) {
@@ -537,16 +537,16 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %.loc16_31.1: form = init_form %T, call_param1 [symbolic = %.loc16_31.1 (constants.%.e5f)]
// CHECK:STDOUT: %pattern_type.loc16_28: type = pattern_type %T [symbolic = %pattern_type.loc16_28 (constants.%pattern_type.51d)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type.984)) -> @ImplicitAs.Convert.%T (%T);
// CHECK:STDOUT: fn(%self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type.984)) -> out %return.param: @ImplicitAs.Convert.%T (%T);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @i32.builtin.as.AddWith.impl.Op(%self.param: %i32.builtin, %other.param: %i32.builtin) -> %i32.builtin = "int.sadd";
// CHECK:STDOUT: fn @i32.builtin.as.AddWith.impl.Op(%self.param: %i32.builtin, %other.param: %i32.builtin) -> out %return.param: %i32.builtin = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Core.IntLiteral.as.As.impl.Convert(%self.param: Core.IntLiteral) -> %i32.builtin = "int.convert_checked";
// CHECK:STDOUT: fn @Core.IntLiteral.as.As.impl.Convert(%self.param: Core.IntLiteral) -> out %return.param: %i32.builtin = "int.convert_checked";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Core.IntLiteral.as.ImplicitAs.impl.Convert(%self.param: Core.IntLiteral) -> %i32.builtin = "int.convert_checked";
// CHECK:STDOUT: fn @Core.IntLiteral.as.ImplicitAs.impl.Convert(%self.param: Core.IntLiteral) -> out %return.param: %i32.builtin = "int.convert_checked";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @i32.builtin.as.ImplicitAs.impl.Convert(%self.param: %i32.builtin) -> Core.IntLiteral = "int.convert_checked";
// CHECK:STDOUT: fn @i32.builtin.as.ImplicitAs.impl.Convert(%self.param: %i32.builtin) -> out %return.param: Core.IntLiteral = "int.convert_checked";
// CHECK:STDOUT:
// CHECK:STDOUT: specific @AddWith(constants.%T) {
// CHECK:STDOUT: %T.loc7_19.1 => constants.%T
@@ -1062,18 +1062,18 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %.loc4_78.2: init %i32.builtin = converted %int_3.loc4_49, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.1 [concrete = constants.%int_3.a0f]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc4_78.3: ref %i32.builtin = array_index file.%arr.var, %int_0
// CHECK:STDOUT: %.loc4_78.4: init %i32.builtin = initialize_from %.loc4_78.2 to %.loc4_78.3 [concrete = constants.%int_3.a0f]
// CHECK:STDOUT: %.loc4_78.4: init %i32.builtin to %.loc4_78.3 = initialize_from %.loc4_78.2 [concrete = constants.%int_3.a0f]
// CHECK:STDOUT: %impl.elem0.loc4_78.2: %.7de = impl_witness_access constants.%ImplicitAs.impl_witness.586, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
// CHECK:STDOUT: %bound_method.loc4_78.2: <bound method> = bound_method %int_4.loc4_52, %impl.elem0.loc4_78.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.762]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.2: init %i32.builtin = call %bound_method.loc4_78.2(%int_4.loc4_52) [concrete = constants.%int_4.4f1]
// CHECK:STDOUT: %.loc4_78.5: init %i32.builtin = converted %int_4.loc4_52, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.2 [concrete = constants.%int_4.4f1]
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc4_78.6: ref %i32.builtin = array_index file.%arr.var, %int_1
// CHECK:STDOUT: %.loc4_78.7: init %i32.builtin = initialize_from %.loc4_78.5 to %.loc4_78.6 [concrete = constants.%int_4.4f1]
// CHECK:STDOUT: %.loc4_78.7: init %i32.builtin to %.loc4_78.6 = initialize_from %.loc4_78.5 [concrete = constants.%int_4.4f1]
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
// CHECK:STDOUT: %.loc4_78.8: ref %i32.builtin = array_index file.%arr.var, %int_2
// CHECK:STDOUT: %.loc4_78.9: init %i32.builtin = initialize_from %i32.builtin.as.AddWith.impl.Op.call to %.loc4_78.8 [concrete = constants.%int_7]
// CHECK:STDOUT: %.loc4_78.10: init %array_type = array_init (%.loc4_78.4, %.loc4_78.7, %.loc4_78.9) to file.%arr.var [concrete = constants.%array]
// CHECK:STDOUT: %.loc4_78.9: init %i32.builtin to %.loc4_78.8 = initialize_from %i32.builtin.as.AddWith.impl.Op.call [concrete = constants.%int_7]
// CHECK:STDOUT: %.loc4_78.10: init %array_type to file.%arr.var = array_init (%.loc4_78.4, %.loc4_78.7, %.loc4_78.9) [concrete = constants.%array]
// CHECK:STDOUT: %.loc4_1: init %array_type = converted %.loc4_78.1, %.loc4_78.10 [concrete = constants.%array]
// CHECK:STDOUT: assign file.%arr.var, %.loc4_1
// CHECK:STDOUT: return
@@ -70,5 +70,5 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Add(%a.param: %i32, %b.param: %i32) -> %i32 = "int.sadd";
// CHECK:STDOUT: fn @Add(%a.param: %i32, %b.param: %i32) -> out %return.param: %i32 = "int.sadd";
// CHECK:STDOUT:
@@ -255,9 +255,9 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.loc15(%n.param: %i32, %m.param: %i32) -> %i32 = "int.sadd";
// CHECK:STDOUT: fn @A.loc15(%n.param: %i32, %m.param: %i32) -> out %return.param: %i32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.loc23(%n.param: %i32, %m.param: %i32) -> %i32 {
// CHECK:STDOUT: fn @A.loc23(%n.param: %i32, %m.param: %i32) -> out %return.param: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664]
@@ -268,7 +268,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B.loc25(%n.param: %i32, %m.param: %i32) -> %i32 {
// CHECK:STDOUT: fn @B.loc25(%n.param: %i32, %m.param: %i32) -> out %return.param: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664]
@@ -279,9 +279,9 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B.loc33(%n.param: %i32, %m.param: %i32) -> %i32 = "int.sadd";
// CHECK:STDOUT: fn @B.loc33(%n.param: %i32, %m.param: %i32) -> out %return.param: %i32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.loc35(%n.param: %i32, %m.param: %i32) -> %i32 = "int.sadd";
// CHECK:STDOUT: fn @C.loc35(%n.param: %i32, %m.param: %i32) -> out %return.param: %i32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.loc43(%n.param: %i32, %m.param: %i32) -> %i32 = "int.sadd";
// CHECK:STDOUT: fn @C.loc43(%n.param: %i32, %m.param: %i32) -> out %return.param: %i32 = "int.sadd";
// CHECK:STDOUT:
+9 -9
View File
@@ -168,15 +168,15 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2))
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type";
// CHECK:STDOUT: fn @IntLiteral() -> out %return.param: type = "int_literal.make_type";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @AsI32(%a.param: Core.IntLiteral) -> %i32.builtin = "int.convert_checked";
// CHECK:STDOUT: fn @AsI32(%a.param: Core.IntLiteral) -> out %return.param: %i32.builtin = "int.convert_checked";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @AsIntLiteral(%a.param: %i32.builtin) -> Core.IntLiteral = "int.convert_checked";
// CHECK:STDOUT: fn @AsIntLiteral(%a.param: %i32.builtin) -> out %return.param: Core.IntLiteral = "int.convert_checked";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @TestAdd(%a.param: %i32.builtin, %b.param: %i32.builtin) -> %i32.builtin = "int.sadd";
// CHECK:STDOUT: fn @TestAdd(%a.param: %i32.builtin, %b.param: %i32.builtin) -> out %return.param: %i32.builtin = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: --- use.carbon
// CHECK:STDOUT:
@@ -287,14 +287,14 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2))
// CHECK:STDOUT: %.loc4_130.1: %tuple.type = tuple_literal (%AsI32.call.loc4_99, %AsI32.call.loc4_114, %AsI32.call.loc4_129) [concrete = constants.%tuple]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc4_130.2: ref %i32.builtin = array_index file.%arr.var, %int_0
// CHECK:STDOUT: %.loc4_130.3: init %i32.builtin = initialize_from %AsI32.call.loc4_99 to %.loc4_130.2 [concrete = constants.%int_1.f38]
// CHECK:STDOUT: %.loc4_130.3: init %i32.builtin to %.loc4_130.2 = initialize_from %AsI32.call.loc4_99 [concrete = constants.%int_1.f38]
// CHECK:STDOUT: %int_1.loc4_130: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc4_130.4: ref %i32.builtin = array_index file.%arr.var, %int_1.loc4_130
// CHECK:STDOUT: %.loc4_130.5: init %i32.builtin = initialize_from %AsI32.call.loc4_114 to %.loc4_130.4 [concrete = constants.%int_2.5a1]
// CHECK:STDOUT: %.loc4_130.5: init %i32.builtin to %.loc4_130.4 = initialize_from %AsI32.call.loc4_114 [concrete = constants.%int_2.5a1]
// CHECK:STDOUT: %int_2.loc4_130: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
// CHECK:STDOUT: %.loc4_130.6: ref %i32.builtin = array_index file.%arr.var, %int_2.loc4_130
// CHECK:STDOUT: %.loc4_130.7: init %i32.builtin = initialize_from %AsI32.call.loc4_129 to %.loc4_130.6 [concrete = constants.%int_3.a0f]
// CHECK:STDOUT: %.loc4_130.8: init %array_type = array_init (%.loc4_130.3, %.loc4_130.5, %.loc4_130.7) to file.%arr.var [concrete = constants.%array]
// CHECK:STDOUT: %.loc4_130.7: init %i32.builtin to %.loc4_130.6 = initialize_from %AsI32.call.loc4_129 [concrete = constants.%int_3.a0f]
// CHECK:STDOUT: %.loc4_130.8: init %array_type to file.%arr.var = array_init (%.loc4_130.3, %.loc4_130.5, %.loc4_130.7) [concrete = constants.%array]
// CHECK:STDOUT: %.loc4_1: init %array_type = converted %.loc4_130.1, %.loc4_130.8 [concrete = constants.%array]
// CHECK:STDOUT: assign file.%arr.var, %.loc4_1
// CHECK:STDOUT: return
+2 -2
View File
@@ -257,10 +257,10 @@ var arr: array(i32, (1 as i32).(I.F)(2));
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.fa0)]
// CHECK:STDOUT: %.loc16_36.1: form = init_form %Self.binding.as_type, call_param2 [symbolic = %.loc16_36.1 (constants.%.1fc)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31), %other.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31)) -> @I.F.%Self.binding.as_type (%Self.binding.as_type.d31);
// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31), %other.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31)) -> out %return.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @i32.as.I.impl.F(%self.param: %i32, %other.param: %i32) -> %i32 = "int.sadd";
// CHECK:STDOUT: fn @i32.as.I.impl.F(%self.param: %i32, %other.param: %i32) -> out %return.param: %i32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.F(constants.%Self.ab9) {
// CHECK:STDOUT: %Self => constants.%Self.ab9
@@ -78,7 +78,7 @@ fn Mul = "int.smul";
// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [concrete = constants.%Mul] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Add() -> %i32;
// CHECK:STDOUT: fn @Add() -> out %return.param: %i32;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Mul;
// CHECK:STDOUT:
+1 -1
View File
@@ -68,7 +68,7 @@ fn Main() {
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [concrete = constants.%Main] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() -> %empty_tuple.type {
// CHECK:STDOUT: fn @A() -> out %return.param: %empty_tuple.type {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc15_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc15_24.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple]
+1 -1
View File
@@ -59,7 +59,7 @@ fn Main() {
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [concrete = constants.%Main] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Echo(%a.param: %empty_struct_type) -> %empty_struct_type {
// CHECK:STDOUT: fn @Echo(%a.param: %empty_struct_type) -> out %return.param: %empty_struct_type {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.ref: %empty_struct_type = name_ref a, %a
// CHECK:STDOUT: %.loc16_10: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
+1 -1
View File
@@ -59,7 +59,7 @@ fn Main() {
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [concrete = constants.%Main] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Echo(%a.param: %empty_tuple.type) -> %empty_tuple.type {
// CHECK:STDOUT: fn @Echo(%a.param: %empty_tuple.type) -> out %return.param: %empty_tuple.type {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, %a
// CHECK:STDOUT: %.loc16_10: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple]
@@ -103,7 +103,7 @@ fn Run() {
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [concrete = constants.%Run] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Foo() -> %f64.d77 {
// CHECK:STDOUT: fn @Foo() -> out %return.param: %f64.d77 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %impl.elem0: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239]
+1 -1
View File
@@ -114,7 +114,7 @@ fn Main() {
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [concrete = constants.%Main] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Echo(%a.param: %i32) -> %i32 {
// CHECK:STDOUT: fn @Echo(%a.param: %i32) -> out %return.param: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a
// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664]
@@ -168,7 +168,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); }
// CHECK:STDOUT: generic fn @Inner.F(@Class.%F.loc5_13.2: type) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> %i32 {
// CHECK:STDOUT: fn() -> out %return.param: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
@@ -188,7 +188,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); }
// CHECK:STDOUT: %Inner.F: @Inner.G.%Inner.F.type (%Inner.F.type) = struct_value () [symbolic = %Inner.F (constants.%Inner.F)]
// CHECK:STDOUT: %Inner.F.specific_fn.loc13_46.2: <specific function> = specific_function %Inner.F, @Inner.F(%F.loc13_46) [symbolic = %Inner.F.specific_fn.loc13_46.2 (constants.%Inner.F.specific_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> %i32 {
// CHECK:STDOUT: fn() -> out %return.param.loc13: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc13_46: @Inner.G.%Inner.F.type (%Inner.F.type) = specific_constant @Inner.%Inner.F.decl, @Inner(constants.%F) [symbolic = %Inner.F (constants.%Inner.F)]
// CHECK:STDOUT: %F.ref: @Inner.G.%Inner.F.type (%Inner.F.type) = name_ref F, %.loc13_46 [symbolic = %Inner.F (constants.%Inner.F)]
@@ -182,20 +182,20 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: .Self = constants.%D
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnCUnused() -> %C;
// CHECK:STDOUT: fn @ReturnCUnused() -> out %return.param: %C;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnCUsed() -> %C;
// CHECK:STDOUT: fn @ReturnCUsed() -> out %return.param: %C;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnDUnused() -> %D;
// CHECK:STDOUT: fn @ReturnDUnused() -> out %return.param: %D;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnDUsed() -> %D;
// CHECK:STDOUT: fn @ReturnDUsed() -> out %return.param: %D;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Call() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, file.%ReturnCUsed.decl [concrete = constants.%ReturnCUsed]
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref(<invalid return info>)
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref()
// CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, file.%ReturnDUsed.decl [concrete = constants.%ReturnDUsed]
// CHECK:STDOUT: %ReturnDUsed.call: init <error> = call %ReturnDUsed.ref(<invalid return info>)
// CHECK:STDOUT: %ReturnDUsed.call: init <error> = call %ReturnDUsed.ref()
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -268,16 +268,16 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: fn @CallFAndGIncomplete() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ReturnCUnused.ref: %ReturnCUnused.type = name_ref ReturnCUnused, imports.%Main.ReturnCUnused [concrete = constants.%ReturnCUnused]
// CHECK:STDOUT: %ReturnCUnused.call: init <error> = call %ReturnCUnused.ref(<invalid return info>)
// CHECK:STDOUT: %ReturnCUnused.call: init <error> = call %ReturnCUnused.ref()
// CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, imports.%Main.ReturnCUsed [concrete = constants.%ReturnCUsed]
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref(<invalid return info>)
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref()
// CHECK:STDOUT: %ReturnDUnused.ref: %ReturnDUnused.type = name_ref ReturnDUnused, imports.%Main.ReturnDUnused [concrete = constants.%ReturnDUnused]
// CHECK:STDOUT: %.loc33_17.1: ref %D = temporary_storage
// CHECK:STDOUT: %ReturnDUnused.call: init %D = call %ReturnDUnused.ref() to %.loc33_17.1
// CHECK:STDOUT: %ReturnDUnused.call: init %D to %.loc33_17.1 = call %ReturnDUnused.ref()
// CHECK:STDOUT: %.loc33_17.2: ref %D = temporary %.loc33_17.1, %ReturnDUnused.call
// CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, imports.%Main.ReturnDUsed [concrete = constants.%ReturnDUsed]
// CHECK:STDOUT: %.loc34_15.1: ref %D = temporary_storage
// CHECK:STDOUT: %ReturnDUsed.call: init %D = call %ReturnDUsed.ref() to %.loc34_15.1
// CHECK:STDOUT: %ReturnDUsed.call: init %D to %.loc34_15.1 = call %ReturnDUsed.ref()
// CHECK:STDOUT: %.loc34_15.2: ref %D = temporary %.loc34_15.1, %ReturnDUsed.call
// CHECK:STDOUT: %DestroyOp.bound.loc34: <bound method> = bound_method %.loc34_15.2, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc34: init %empty_tuple.type = call %DestroyOp.bound.loc34(%.loc34_15.2)
@@ -143,7 +143,7 @@ fn A {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() -> %empty_tuple.type;
// CHECK:STDOUT: fn @A() -> out %return.param: %empty_tuple.type;
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_todo_implicit_only.carbon
// CHECK:STDOUT:
@@ -172,7 +172,7 @@ fn A {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() -> %empty_tuple.type;
// CHECK:STDOUT: fn @A() -> out %return.param: %empty_tuple.type;
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_todo_arrow_body.carbon
// CHECK:STDOUT:
@@ -356,9 +356,9 @@ import library "extern_api";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B(%b.param: %i32) -> %i32;
// CHECK:STDOUT: fn @B(%b.param: %i32) -> out %return.param: %i32;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C(%c.param: %tuple.type.a1c) -> %struct_type.c;
// CHECK:STDOUT: fn @C(%c.param: %tuple.type.a1c) -> out %return.param: %struct_type.c;
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @D();
// CHECK:STDOUT:
@@ -460,9 +460,9 @@ import library "extern_api";
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @A();
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @B(%b.param: %i32) -> %i32;
// CHECK:STDOUT: extern fn @B(%b.param: %i32) -> out %return.param: %i32;
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @C(%c.param: %tuple.type.a1c) -> %struct_type.c;
// CHECK:STDOUT: extern fn @C(%c.param: %tuple.type.a1c) -> out %return.param: %struct_type.c;
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @D();
// CHECK:STDOUT:
+1 -1
View File
@@ -61,7 +61,7 @@ fn G() {
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
// CHECK:STDOUT: fn @F() -> ref %i32;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @G() {
// CHECK:STDOUT: !entry:
@@ -224,7 +224,7 @@ fn K() -> {} { return {}; }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @I.loc42();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @I.loc50() -> %empty_tuple.type {
// CHECK:STDOUT: fn @I.loc50() -> out %return.param: %empty_tuple.type {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc50_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc50_24.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple]
@@ -232,16 +232,16 @@ fn K() -> {} { return {}; }
// CHECK:STDOUT: return %.loc50_25
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @J.loc52() -> %empty_tuple.type;
// CHECK:STDOUT: fn @J.loc52() -> out %return.param: %empty_tuple.type;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @J.loc60() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @K.loc62() -> %empty_tuple.type;
// CHECK:STDOUT: fn @K.loc62() -> out %return.param: %empty_tuple.type;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @K.loc70() -> %empty_struct_type {
// CHECK:STDOUT: fn @K.loc70() -> out %return.param: %empty_struct_type {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc70_24.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc70_24.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
+2 -2
View File
@@ -222,7 +222,7 @@ fn D() {}
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B(%b.param: %i32) -> %i32 {
// CHECK:STDOUT: fn @B(%b.param: %i32) -> out %return.param: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b
// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664]
@@ -233,7 +233,7 @@ fn D() {}
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C(%c.param: %tuple.type.a1c) -> %struct_type.c {
// CHECK:STDOUT: fn @C(%c.param: %tuple.type.a1c) -> out %return.param: %struct_type.c {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %c.ref: %tuple.type.a1c = name_ref c, %c
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
@@ -814,10 +814,10 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Foo() -> %return.param.loc8: %C {
// CHECK:STDOUT: fn @Foo() -> out %return.param.loc8: %C {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc8_25.2: init %C = class_init (), %return.param.loc8 [concrete = constants.%C.val]
// CHECK:STDOUT: %.loc8_25.2: init %C to %return.param.loc8 = class_init () [concrete = constants.%C.val]
// CHECK:STDOUT: %.loc8_26: init %C = converted %.loc8_25.1, %.loc8_25.2 [concrete = constants.%C.val]
// CHECK:STDOUT: return %.loc8_26 to %return.param.loc8
// CHECK:STDOUT: }
+12 -12
View File
@@ -170,7 +170,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Function.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Function.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: @Function.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)]
@@ -178,7 +178,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)]
// CHECK:STDOUT: %bound_method.loc6_10.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc6_10.1
// CHECK:STDOUT: %.loc5_37.1: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {}
// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_37.1
// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref)
// CHECK:STDOUT: return %Copy.Op.call to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -190,7 +190,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Function.specific_fn.loc12_10.2: <specific function> = specific_function constants.%Function, @Function(%T.loc10_16.1) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.a87)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function]
// CHECK:STDOUT: %T.ref.loc12: %Copy.type = name_ref T, %T.loc10_16.2 [symbolic = %T.loc10_16.1 (constants.%T.035)]
@@ -199,7 +199,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %.loc12_23.2: %Copy.type = converted constants.%T.binding.as_type, constants.%T.035 [symbolic = %T.loc10_16.1 (constants.%T.035)]
// CHECK:STDOUT: %Function.specific_fn.loc12_10.1: <specific function> = specific_function %Function.ref, @Function(constants.%T.035) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.a87)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.binding.as_type (%T.binding.as_type) = call %Function.specific_fn.loc12_10.1(%x.ref) to %.loc10_40.1
// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc10_40.1 = call %Function.specific_fn.loc12_10.1(%x.ref)
// CHECK:STDOUT: return %Function.call to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -214,7 +214,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %Copy.facet.loc18_24.4: %Copy.type = facet_value %ptr.loc16_33.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc18_24.4 (constants.%Copy.facet.c25)]
// CHECK:STDOUT: %Function.specific_fn.loc18_10.2: <specific function> = specific_function constants.%Function, @Function(%Copy.facet.loc18_24.4) [symbolic = %Function.specific_fn.loc18_10.2 (constants.%Function.specific_fn.919)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f)) -> @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) {
// CHECK:STDOUT: fn(%x.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f)) -> out %return.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function]
// CHECK:STDOUT: %T.ref.loc18: type = name_ref T, %T.loc16_19.2 [symbolic = %T.loc16_19.1 (constants.%T.67d)]
@@ -232,7 +232,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallSpecific(%x.param: %ptr.31e) -> %ptr.31e {
// CHECK:STDOUT: fn @CallSpecific(%x.param: %ptr.31e) -> out %return.param: %ptr.31e {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function]
// CHECK:STDOUT: %C.ref.loc26: type = name_ref C, file.%C.decl [concrete = constants.%C]
@@ -405,7 +405,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Function.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Function.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: @Function.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)]
@@ -413,7 +413,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)]
// CHECK:STDOUT: %bound_method.loc6_10.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc6_10.1
// CHECK:STDOUT: %.loc5_37.1: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {}
// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_37.1
// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref)
// CHECK:STDOUT: return %Copy.Op.call to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -425,7 +425,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Function.specific_fn.loc12_10.2: <specific function> = specific_function constants.%Function, @Function(%T.loc10_16.1) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.a87)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @CallGeneric.%T.binding.as_type (%T.binding.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function]
// CHECK:STDOUT: %x.ref: @CallGeneric.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
@@ -433,7 +433,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %.loc12_20.2: %Copy.type = converted constants.%T.binding.as_type, constants.%T.035 [symbolic = %T.loc10_16.1 (constants.%T.035)]
// CHECK:STDOUT: %Function.specific_fn.loc12_10.1: <specific function> = specific_function %Function.ref, @Function(constants.%T.035) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.a87)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.binding.as_type (%T.binding.as_type) = call %Function.specific_fn.loc12_10.1(%x.ref) to %.loc10_40.1
// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc10_40.1 = call %Function.specific_fn.loc12_10.1(%x.ref)
// CHECK:STDOUT: return %Function.call to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -448,7 +448,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: %Copy.facet.loc18_20.3: %Copy.type = facet_value %ptr.loc16_33.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc18_20.3 (constants.%Copy.facet.c25)]
// CHECK:STDOUT: %Function.specific_fn.loc18_10.2: <specific function> = specific_function constants.%Function, @Function(%Copy.facet.loc18_20.3) [symbolic = %Function.specific_fn.loc18_10.2 (constants.%Function.specific_fn.919)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f)) -> @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) {
// CHECK:STDOUT: fn(%x.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f)) -> out %return.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function]
// CHECK:STDOUT: %x.ref: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) = name_ref x, %x
@@ -462,7 +462,7 @@ fn CallSpecific(x: C*) -> C* {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallSpecific(%x.param: %ptr.31e) -> %ptr.31e {
// CHECK:STDOUT: fn @CallSpecific(%x.param: %ptr.31e) -> out %return.param: %ptr.31e {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function]
// CHECK:STDOUT: %x.ref: %ptr.31e = name_ref x, %x
+11 -11
View File
@@ -315,7 +315,7 @@ fn F() {
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc4_39.1 [symbolic = %require_complete (constants.%require_complete.ef1)]
// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2: <specific function> = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.1) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn.409)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr.e8f) {
// CHECK:STDOUT: fn() -> out %return.param: @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr.e8f) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [concrete = constants.%ExplicitGenericParam]
// CHECK:STDOUT: %T.ref.loc4_71: type = name_ref T, %T.loc4_25.2 [symbolic = %T.loc4_25.1 (constants.%T)]
@@ -325,7 +325,7 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallExplicitGenericParam() -> %ptr.235 {
// CHECK:STDOUT: fn @CallExplicitGenericParam() -> out %return.param: %ptr.235 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [concrete = constants.%ExplicitGenericParam]
// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
@@ -346,7 +346,7 @@ fn F() {
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc10_63.1 [symbolic = %require_complete (constants.%require_complete.61f)]
// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc11_10.2: <specific function> = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%struct_type.a.loc10_62.1) [symbolic = %ExplicitGenericParam.specific_fn.loc11_10.2 (constants.%ExplicitGenericParam.specific_fn.55c)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.1 (%ptr.88d) {
// CHECK:STDOUT: fn() -> out %return.param: @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.1 (%ptr.88d) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [concrete = constants.%ExplicitGenericParam]
// CHECK:STDOUT: %T.ref.loc11: type = name_ref T, %T.loc10_43.2 [symbolic = %T.loc10_43.1 (constants.%T)]
@@ -471,7 +471,7 @@ fn F() {
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc4_39.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2: <specific function> = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.1) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr) {
// CHECK:STDOUT: fn() -> out %return.param: @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [concrete = constants.%ExplicitGenericParam]
// CHECK:STDOUT: %T.ref.loc4_71: type = name_ref T, %T.loc4_25.2 [symbolic = %T.loc4_25.1 (constants.%T)]
@@ -625,7 +625,7 @@ fn F() {
// CHECK:STDOUT: %require_complete.loc6_38: <witness> = require_complete_type %T.loc6_27.1 [symbolic = %require_complete.loc6_38 (constants.%require_complete.944)]
// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2: <specific function> = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_27.1) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.7e7)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.1 (%T)) -> @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.e8f) {
// CHECK:STDOUT: fn(%x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.1 (%T)) -> out %return.param: @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.e8f) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [concrete = constants.%ExplicitAndAlsoDeduced]
// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_27.2 [symbolic = %T.loc6_27.1 (constants.%T)]
@@ -636,14 +636,14 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallExplicitAndAlsoDeduced() -> %ptr.643 {
// CHECK:STDOUT: fn @CallExplicitAndAlsoDeduced() -> out %return.param: %ptr.643 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [concrete = constants.%ExplicitAndAlsoDeduced]
// CHECK:STDOUT: %A.ref.loc11: type = name_ref A, file.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %.loc11_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn: <specific function> = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%A) [concrete = constants.%ExplicitAndAlsoDeduced.specific_fn.1f3]
// CHECK:STDOUT: %.loc11_37.2: ref %A = temporary_storage
// CHECK:STDOUT: %.loc11_37.3: init %A = class_init (), %.loc11_37.2 [concrete = constants.%A.val]
// CHECK:STDOUT: %.loc11_37.3: init %A to %.loc11_37.2 = class_init () [concrete = constants.%A.val]
// CHECK:STDOUT: %.loc11_37.4: ref %A = temporary %.loc11_37.2, %.loc11_37.3
// CHECK:STDOUT: %.loc11_37.5: ref %A = converted %.loc11_37.1, %.loc11_37.4
// CHECK:STDOUT: %.loc11_37.6: %A = acquire_value %.loc11_37.5
@@ -780,7 +780,7 @@ fn F() {
// CHECK:STDOUT: %require_complete.loc4_36: <witness> = require_complete_type %T.loc4_25.1 [symbolic = %require_complete.loc4_36 (constants.%require_complete.944)]
// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2: <specific function> = specific_function constants.%ImplicitGenericParam, @ImplicitGenericParam(%T.loc4_25.1) [symbolic = %ImplicitGenericParam.specific_fn.loc4_56.2 (constants.%ImplicitGenericParam.specific_fn.7cc)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @ImplicitGenericParam.%T.loc4_25.1 (%T)) -> @ImplicitGenericParam.%ptr.loc4_45.1 (%ptr.e8f) {
// CHECK:STDOUT: fn(%x.param: @ImplicitGenericParam.%T.loc4_25.1 (%T)) -> out %return.param: @ImplicitGenericParam.%ptr.loc4_45.1 (%ptr.e8f) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ImplicitGenericParam.ref: %ImplicitGenericParam.type = name_ref ImplicitGenericParam, file.%ImplicitGenericParam.decl [concrete = constants.%ImplicitGenericParam]
// CHECK:STDOUT: %x.ref: @ImplicitGenericParam.%T.loc4_25.1 (%T) = name_ref x, %x
@@ -790,7 +790,7 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallImplicitGenericParam(%n.param: %i32) -> %ptr.235 {
// CHECK:STDOUT: fn @CallImplicitGenericParam(%n.param: %i32) -> out %return.param: %ptr.235 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ImplicitGenericParam.ref: %ImplicitGenericParam.type = name_ref ImplicitGenericParam, file.%ImplicitGenericParam.decl [concrete = constants.%ImplicitGenericParam]
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
@@ -1518,7 +1518,7 @@ fn F() {
// CHECK:STDOUT: %.loc6_54.1: form = init_form %U.loc6_35.1, call_param1 [symbolic = %.loc6_54.1 (constants.%.ead)]
// CHECK:STDOUT: %pattern_type.loc6_51: type = pattern_type %U.loc6_35.1 [symbolic = %pattern_type.loc6_51 (constants.%pattern_type.946)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @ImplicitNotDeducible.%T.loc6_25.1 (%T)) -> @ImplicitNotDeducible.%U.loc6_35.1 (%U);
// CHECK:STDOUT: fn(%x.param: @ImplicitNotDeducible.%T.loc6_25.1 (%T)) -> out %return.param: @ImplicitNotDeducible.%U.loc6_35.1 (%U);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallImplicitNotDeducible() {
@@ -1599,7 +1599,7 @@ fn F() {
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_25.1 [symbolic = %pattern_type (constants.%pattern_type.51d)]
// CHECK:STDOUT: %.loc4_50.1: form = init_form %T.loc4_25.1, call_param2 [symbolic = %.loc4_50.1 (constants.%.6d4)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @ImplicitNotDeducible.%T.loc4_25.1 (%T), %y.param: @ImplicitNotDeducible.%T.loc4_25.1 (%T)) -> @ImplicitNotDeducible.%T.loc4_25.1 (%T);
// CHECK:STDOUT: fn(%x.param: @ImplicitNotDeducible.%T.loc4_25.1 (%T), %y.param: @ImplicitNotDeducible.%T.loc4_25.1 (%T)) -> out %return.param: @ImplicitNotDeducible.%T.loc4_25.1 (%T);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallImplicitNotDeducible() {
@@ -54,7 +54,7 @@ fn F(T:! type, p: T**) -> T* {
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.201)]
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b84)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc4_21.1 (%ptr.125)) -> @F.%ptr.loc4_20.1 (%ptr.e8f) {
// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc4_21.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc4_20.1 (%ptr.e8f) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %p.ref: @F.%ptr.loc4_21.1 (%ptr.125) = name_ref p, %p
// CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc4_20.1 (%ptr.e8f) = deref %p.ref
+7 -7
View File
@@ -161,7 +161,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc4_20.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT: %F.specific_fn.loc7_10.2: <specific function> = specific_function constants.%F, @F(%T.loc4_6.1) [symbolic = %F.specific_fn.loc7_10.2 (constants.%F.specific_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @F.%ptr.loc4_20.1 (%ptr) {
// CHECK:STDOUT: fn() -> out %return.param.loc6: @F.%ptr.loc4_20.1 (%ptr) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc4 [concrete = constants.%F]
// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6 [symbolic = %T.loc4_6.1 (constants.%T)]
@@ -257,7 +257,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: %.loc4_30.1: form = init_form %ptr.loc4_30.1, call_param0 [symbolic = %.loc4_30.1 (constants.%.9e5)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_30.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @F.loc4.%ptr.loc4_30.1 (%ptr.e8f);
// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_30.1 (%ptr.e8f);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F.loc13(%T.loc13_6.2: type, %U.loc13_16.2: type) {
@@ -270,7 +270,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc13_30.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @F.loc13.%ptr.loc13_30.1 (%ptr.18e) {
// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_30.1 (%ptr.18e) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %F.type.117dbc.1 = name_ref F, file.%F.decl.loc4 [concrete = constants.%F.d98bd5.1]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_6.2 [symbolic = %T.loc13_6.1 (constants.%T)]
@@ -371,7 +371,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: %.loc4_30.1: form = init_form %ptr.loc4_30.1, call_param0 [symbolic = %.loc4_30.1 (constants.%.9e5)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_30.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @F.loc4.%ptr.loc4_30.1 (%ptr.e8f);
// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_30.1 (%ptr.e8f);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F.loc13(%U.loc13_6.2: type, %T.loc13_16.2: type) {
@@ -384,7 +384,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc13_30.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @F.loc13.%ptr.loc13_30.1 (%ptr.18e) {
// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_30.1 (%ptr.18e) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %F.type.117dbc.1 = name_ref F, file.%F.decl.loc4 [concrete = constants.%F.d98bd5.1]
// CHECK:STDOUT: %T.ref.loc21: type = name_ref T, %T.loc13_16.2 [symbolic = %T.loc13_16.1 (constants.%T.091)]
@@ -485,7 +485,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: %.loc4_30.1: form = init_form %ptr.loc4_30.1, call_param0 [symbolic = %.loc4_30.1 (constants.%.9e525d.1)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_30.1 [symbolic = %pattern_type (constants.%pattern_type.4f4b84.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @F.loc4.%ptr.loc4_30.1 (%ptr.e8f8f9.1);
// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_30.1 (%ptr.e8f8f9.1);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F.loc13(%U.loc13_6.2: type, %T.loc13_16.2: type) {
@@ -498,7 +498,7 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc13_30.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> @F.loc13.%ptr.loc13_30.1 (%ptr.e8f8f9.2) {
// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_30.1 (%ptr.e8f8f9.2) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %F.type.117dbc.1 = name_ref F, file.%F.decl.loc4 [concrete = constants.%F.d98bd5.1]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_16.2 [symbolic = %T.loc13_16.1 (constants.%T.091)]
@@ -167,13 +167,13 @@ fn G() {
// CHECK:STDOUT: %Wrap.Make: @Wrap.Make.%Wrap.Make.type (%Wrap.Make.type.6e9) = struct_value () [symbolic = %Wrap.Make (constants.%Wrap.Make.e25)]
// CHECK:STDOUT: %Wrap.Make.specific_fn.loc16_27.2: <specific function> = specific_function %Wrap.Make, @Wrap.Make(%T) [symbolic = %Wrap.Make.specific_fn.loc16_27.2 (constants.%Wrap.Make.specific_fn.5c8)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> %return.param: @Wrap.Make.%T (%T) {
// CHECK:STDOUT: fn() -> out %return.param: @Wrap.Make.%T (%T) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc16_27: @Wrap.Make.%Wrap.Make.type (%Wrap.Make.type.6e9) = specific_constant @Wrap.%Wrap.Make.decl, @Wrap(constants.%T) [symbolic = %Wrap.Make (constants.%Wrap.Make.e25)]
// CHECK:STDOUT: %Make.ref: @Wrap.Make.%Wrap.Make.type (%Wrap.Make.type.6e9) = name_ref Make, %.loc16_27 [symbolic = %Wrap.Make (constants.%Wrap.Make.e25)]
// CHECK:STDOUT: %Wrap.Make.specific_fn.loc16_27.1: <specific function> = specific_function %Make.ref, @Wrap.Make(constants.%T) [symbolic = %Wrap.Make.specific_fn.loc16_27.2 (constants.%Wrap.Make.specific_fn.5c8)]
// CHECK:STDOUT: %.loc16_16.1: ref @Wrap.Make.%T (%T) = splice_block %return.param {}
// CHECK:STDOUT: %Wrap.Make.call: init @Wrap.Make.%T (%T) = call %Wrap.Make.specific_fn.loc16_27.1() to %.loc16_16.1
// CHECK:STDOUT: %Wrap.Make.call: init @Wrap.Make.%T (%T) to %.loc16_16.1 = call %Wrap.Make.specific_fn.loc16_27.1()
// CHECK:STDOUT: return %Wrap.Make.call to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -230,7 +230,7 @@ fn G() {
// CHECK:STDOUT: %Make.ref.loc24: %Wrap.Make.type.a8f = name_ref Make, %.loc24_21 [concrete = constants.%Wrap.Make.62a]
// CHECK:STDOUT: %Wrap.Make.specific_fn.loc24: <specific function> = specific_function %Make.ref.loc24, @Wrap.Make(constants.%C) [concrete = constants.%Wrap.Make.specific_fn.cb9]
// CHECK:STDOUT: %.loc24_3: ref %C = splice_block %c.var {}
// CHECK:STDOUT: %Wrap.Make.call.loc24: init %C = call %Wrap.Make.specific_fn.loc24() to %.loc24_3
// CHECK:STDOUT: %Wrap.Make.call.loc24: init %C to %.loc24_3 = call %Wrap.Make.specific_fn.loc24()
// CHECK:STDOUT: assign %c.var, %Wrap.Make.call.loc24
// CHECK:STDOUT: %C.ref.loc24_10: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %c: ref %C = ref_binding c, %c.var
@@ -53,7 +53,7 @@ fn F(T:! type, n: T*) -> T* {
// CHECK:STDOUT: %impl.elem0.loc7_10.2: @F.%.loc7_10.2 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.201)]
// CHECK:STDOUT: %specific_impl_fn.loc7_10.2: <specific function> = specific_impl_function %impl.elem0.loc7_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.b84)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%n.param: @F.%ptr.loc4_20.1 (%ptr)) -> @F.%ptr.loc4_20.1 (%ptr) {
// CHECK:STDOUT: fn(%n.param: @F.%ptr.loc4_20.1 (%ptr)) -> out %return.param: @F.%ptr.loc4_20.1 (%ptr) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %m.patt: @F.%pattern_type (%pattern_type.4f4) = value_binding_pattern m [concrete]