Model type expressions as regions (#4698)

This is a precondition for enabling the new pattern-matching subsystem
to support binding patterns that have `if` expressions in the type
position.

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Geoff Romer
2024-12-19 21:41:06 +00:00
committed by GitHub
co-authored by Richard Smith
parent 95c9634c60
commit a112cbde5c
504 changed files with 5699 additions and 8719 deletions
+8 -50
View File
@@ -19,25 +19,6 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
// CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template]
// CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [template]
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template]
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template]
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
// CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.11) [template]
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.11 [template]
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.3(%int_32) [template]
// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template]
// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template]
// CHECK:STDOUT: }
@@ -66,46 +47,23 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add]
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
// CHECK:STDOUT: %impl.elem0.loc13_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
// CHECK:STDOUT: %Convert.bound.loc13_20: <bound method> = bound_method %int_1, %impl.elem0.loc13_20 [template = constants.%Convert.bound.1]
// CHECK:STDOUT: %Convert.specific_fn.loc13_20: <specific function> = specific_function %Convert.bound.loc13_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
// CHECK:STDOUT: %int.convert_checked.loc13_20: init %i32 = call %Convert.specific_fn.loc13_20(%int_1) [template = constants.%int_1.2]
// CHECK:STDOUT: %.loc13_20.1: %i32 = value_of_initializer %int.convert_checked.loc13_20 [template = constants.%int_1.2]
// CHECK:STDOUT: %.loc13_20.2: %i32 = converted %int_1, %.loc13_20.1 [template = constants.%int_1.2]
// CHECK:STDOUT: %impl.elem0.loc13_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
// CHECK:STDOUT: %Convert.bound.loc13_23: <bound method> = bound_method %int_2, %impl.elem0.loc13_23 [template = constants.%Convert.bound.2]
// CHECK:STDOUT: %Convert.specific_fn.loc13_23: <specific function> = specific_function %Convert.bound.loc13_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
// CHECK:STDOUT: %int.convert_checked.loc13_23: init %i32 = call %Convert.specific_fn.loc13_23(%int_2) [template = constants.%int_2.2]
// CHECK:STDOUT: %.loc13_23.1: %i32 = value_of_initializer %int.convert_checked.loc13_23 [template = constants.%int_2.2]
// CHECK:STDOUT: %.loc13_23.2: %i32 = converted %int_2, %.loc13_23.1 [template = constants.%int_2.2]
// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_20.2, %.loc13_23.2) [template = constants.%int_3.1]
// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11]
// CHECK:STDOUT: %Convert.bound.loc13_24: <bound method> = bound_method %int.sadd, %impl.elem0.loc13_24 [template = constants.%Convert.bound.3]
// CHECK:STDOUT: %Convert.specific_fn.loc13_24: <specific function> = specific_function %Convert.bound.loc13_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3]
// CHECK:STDOUT: %.loc13_24.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1]
// CHECK:STDOUT: %.loc13_24.2: %i32 = converted %int.sadd, %.loc13_24.1 [template = constants.%int_3.1]
// CHECK:STDOUT: %int.convert_checked.loc13_24: init Core.IntLiteral = call %Convert.specific_fn.loc13_24(%.loc13_24.2) [template = constants.%int_3.2]
// CHECK:STDOUT: %.loc13_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%int_3.2]
// CHECK:STDOUT: %.loc13_24.4: Core.IntLiteral = converted %int.sadd, %.loc13_24.3 [template = constants.%int_3.2]
// CHECK:STDOUT: %array_type: type = array_type %.loc13_24.4, %i32 [template = constants.%array_type]
// CHECK:STDOUT: %arr.var: ref %array_type = var arr
// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var
// CHECK:STDOUT: }
@@ -41,15 +41,19 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
@@ -74,15 +74,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.param.loc11: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11_9: type = splice_block %i32.loc11_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc11: %i32 = bind_name n, %n.param.loc11
// CHECK:STDOUT: %m.param.loc11: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc11_17: type = splice_block %i32.loc11_17 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %m.loc11: %i32 = bind_name m, %m.param.loc11
// CHECK:STDOUT: %return.param.loc11: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return.loc11: ref %i32 = return_slot %return.param.loc11
@@ -95,15 +99,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc19_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc19_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.param.loc19: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc19_9: type = splice_block %i32.loc19_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc19_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc19_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc19: %i32 = bind_name n, %n.param.loc19
// CHECK:STDOUT: %m.param.loc19: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc19_17: type = splice_block %i32.loc19_17 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %m.loc19: %i32 = bind_name m, %m.param.loc19
// CHECK:STDOUT: %return.param.loc19: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return.loc19: ref %i32 = return_slot %return.param.loc19
@@ -116,15 +124,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc21_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc21_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc21_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc21_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc21_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc21_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.param.loc21: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc21_9: type = splice_block %i32.loc21_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc21_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc21_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc21: %i32 = bind_name n, %n.param.loc21
// CHECK:STDOUT: %m.param.loc21: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc21_17: type = splice_block %i32.loc21_17 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc21_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc21_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %m.loc21: %i32 = bind_name m, %m.param.loc21
// CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return.loc21: ref %i32 = return_slot %return.param.loc21
@@ -137,15 +149,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc29_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc29_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc29_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc29_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc29_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc29_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.param.loc29: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc29_9: type = splice_block %i32.loc29_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc29_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc29_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc29: %i32 = bind_name n, %n.param.loc29
// CHECK:STDOUT: %m.param.loc29: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc29_17: type = splice_block %i32.loc29_17 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc29_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc29_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %m.loc29: %i32 = bind_name m, %m.param.loc29
// CHECK:STDOUT: %return.param.loc29: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return.loc29: ref %i32 = return_slot %return.param.loc29
@@ -158,15 +174,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc31_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc31_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc31_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc31_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc31_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc31_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.param.loc31: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc31_9: type = splice_block %i32.loc31_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc31_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc31_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc31: %i32 = bind_name n, %n.param.loc31
// CHECK:STDOUT: %m.param.loc31: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc31_17: type = splice_block %i32.loc31_17 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc31_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc31_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %m.loc31: %i32 = bind_name m, %m.param.loc31
// CHECK:STDOUT: %return.param.loc31: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return.loc31: ref %i32 = return_slot %return.param.loc31
@@ -179,15 +199,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc38_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc38_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc38_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc38_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc38_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc38_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.param.loc38: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc38_9: type = splice_block %i32.loc38_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc38_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc38_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc38: %i32 = bind_name n, %n.param.loc38
// CHECK:STDOUT: %m.param.loc38: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc38_17: type = splice_block %i32.loc38_17 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc38_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc38_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %m.loc38: %i32 = bind_name m, %m.param.loc38
// CHECK:STDOUT: %return.param.loc38: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return.loc38: ref %i32 = return_slot %return.param.loc38
+18 -66
View File
@@ -34,30 +34,6 @@ var arr: [i32; (1 as i32).(I.F)(2)];
// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, %i32 [template]
// CHECK:STDOUT: %interface.1: <witness> = interface_witness (%F.2) [template]
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template]
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template]
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.4(%int_32) [template]
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
// CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.10) [template]
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.5(%int_32) [template]
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
// CHECK:STDOUT: %F.bound: <bound method> = bound_method %int_1.2, %F.2 [template]
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @ImplicitAs(%i32) [template]
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.3, @impl.2(%int_32) [template]
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template]
// CHECK:STDOUT: %interface.7: <witness> = interface_witness (%Convert.12) [template]
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.12 [template]
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.3(%int_32) [template]
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template]
// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template]
// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template]
// CHECK:STDOUT: %interface.8: <witness> = interface_witness (%Convert.13) [template]
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.13 [template]
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.4(%int_32) [template]
// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template]
// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template]
// CHECK:STDOUT: }
@@ -85,38 +61,6 @@ var arr: [i32; (1 as i32).(I.F)(2)];
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %int_32.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc19_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
// CHECK:STDOUT: %int_32.loc19_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc19_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %impl.elem0.loc19_19: %Convert.type.2 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.10]
// CHECK:STDOUT: %Convert.bound.loc19_19: <bound method> = bound_method %int_1, %impl.elem0.loc19_19 [template = constants.%Convert.bound.1]
// CHECK:STDOUT: %Convert.specific_fn.loc19_19: <specific function> = specific_function %Convert.bound.loc19_19, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.1]
// CHECK:STDOUT: %int.convert_checked.loc19_19: init %i32 = call %Convert.specific_fn.loc19_19(%int_1) [template = constants.%int_1.2]
// CHECK:STDOUT: %.loc19_19.1: %i32 = value_of_initializer %int.convert_checked.loc19_19 [template = constants.%int_1.2]
// CHECK:STDOUT: %.loc19_19.2: %i32 = converted %int_1, %.loc19_19.1 [template = constants.%int_1.2]
// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type]
// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @I.%assoc0 [template = constants.%assoc0.1]
// CHECK:STDOUT: %impl.elem0.loc19_26: %F.type.1 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.2]
// CHECK:STDOUT: %F.bound: <bound method> = bound_method %.loc19_19.2, %impl.elem0.loc19_26 [template = constants.%F.bound]
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
// CHECK:STDOUT: %impl.elem0.loc19_33: %Convert.type.11 = interface_witness_access constants.%interface.7, element0 [template = constants.%Convert.12]
// CHECK:STDOUT: %Convert.bound.loc19_33: <bound method> = bound_method %int_2, %impl.elem0.loc19_33 [template = constants.%Convert.bound.2]
// CHECK:STDOUT: %Convert.specific_fn.loc19_33: <specific function> = specific_function %Convert.bound.loc19_33, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2]
// CHECK:STDOUT: %int.convert_checked.loc19_33: init %i32 = call %Convert.specific_fn.loc19_33(%int_2) [template = constants.%int_2.2]
// CHECK:STDOUT: %.loc19_33.1: %i32 = value_of_initializer %int.convert_checked.loc19_33 [template = constants.%int_2.2]
// CHECK:STDOUT: %.loc19_33.2: %i32 = converted %int_2, %.loc19_33.1 [template = constants.%int_2.2]
// CHECK:STDOUT: %int.sadd: init %i32 = call %F.bound(%.loc19_19.2, %.loc19_33.2) [template = constants.%int_3.1]
// CHECK:STDOUT: %impl.elem0.loc19_34: %Convert.type.6 = interface_witness_access constants.%interface.8, element0 [template = constants.%Convert.13]
// CHECK:STDOUT: %Convert.bound.loc19_34: <bound method> = bound_method %int.sadd, %impl.elem0.loc19_34 [template = constants.%Convert.bound.3]
// CHECK:STDOUT: %Convert.specific_fn.loc19_34: <specific function> = specific_function %Convert.bound.loc19_34, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3]
// CHECK:STDOUT: %.loc19_34.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1]
// CHECK:STDOUT: %.loc19_34.2: %i32 = converted %int.sadd, %.loc19_34.1 [template = constants.%int_3.1]
// CHECK:STDOUT: %int.convert_checked.loc19_34: init Core.IntLiteral = call %Convert.specific_fn.loc19_34(%.loc19_34.2) [template = constants.%int_3.2]
// CHECK:STDOUT: %.loc19_34.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_34 [template = constants.%int_3.2]
// CHECK:STDOUT: %.loc19_34.4: Core.IntLiteral = converted %int.sadd, %.loc19_34.3 [template = constants.%int_3.2]
// CHECK:STDOUT: %array_type: type = array_type %.loc19_34.4, %i32 [template = constants.%array_type]
// CHECK:STDOUT: %arr.var: ref %array_type = var arr
// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var
// CHECK:STDOUT: }
@@ -131,18 +75,22 @@ var arr: [i32; (1 as i32).(I.F)(2)];
// CHECK:STDOUT: %return.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.ref.loc12_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc12_14: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %Self.ref.loc12_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc12_27: type = facet_access_type %Self.ref.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc12_27: type = converted %Self.ref.loc12_27, %Self.as_type.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %Self.ref.loc12_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc12_36: type = facet_access_type %Self.ref.loc12_36 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc12_36: type = converted %Self.ref.loc12_36, %Self.as_type.loc12_36 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param0
// CHECK:STDOUT: %.loc12_14.2: type = splice_block %.loc12_14.1 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] {
// CHECK:STDOUT: %Self.ref.loc12_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc12_14.1: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name self, %self.param
// CHECK:STDOUT: %other.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param1
// CHECK:STDOUT: %.loc12_27.2: type = splice_block %.loc12_27.1 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] {
// CHECK:STDOUT: %Self.ref.loc12_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc12_27: type = facet_access_type %Self.ref.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc12_27.1: type = converted %Self.ref.loc12_27, %Self.as_type.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %other: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name other, %other.param
// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param runtime_param2
// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot %return.param
@@ -164,15 +112,19 @@ var arr: [i32; (1 as i32).(I.F)(2)];
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc16_14: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc16_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc16_26: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc16_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc16_34: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc16_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc16_14: type = splice_block %i32.loc16_14 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc16_14: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc16_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: %i32 = bind_name self, %self.param
// CHECK:STDOUT: %other.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc16_26: type = splice_block %i32.loc16_26 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc16_26: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc16_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %other: %i32 = bind_name other, %other.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
@@ -92,8 +92,8 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: %return.patt: type = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral]
// CHECK:STDOUT: %N.param: %MyIntLiteral = value_param runtime_param0
// CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral]
// CHECK:STDOUT: %N: %MyIntLiteral = bind_name N, %N.param
// CHECK:STDOUT: %return.param: ref type = out_param runtime_param1
// CHECK:STDOUT: %return: ref type = return_slot %return.param
@@ -105,9 +105,9 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: %return.patt: %MyInt32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %MyInt32 = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %MyIntLiteral.ref.loc18: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral]
// CHECK:STDOUT: %MyInt32.ref.loc18: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32]
// CHECK:STDOUT: %a.param.loc18: %MyIntLiteral = value_param runtime_param0
// CHECK:STDOUT: %MyIntLiteral.ref.loc18: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral]
// CHECK:STDOUT: %a.loc18: %MyIntLiteral = bind_name a, %a.param.loc18
// CHECK:STDOUT: %return.param.loc18: ref %MyInt32 = out_param runtime_param1
// CHECK:STDOUT: %return.loc18: ref %MyInt32 = return_slot %return.param.loc18
@@ -120,17 +120,16 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: %return.patt: %MyInt32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %MyInt32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %MyInt32.ref.loc20_13: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32]
// CHECK:STDOUT: %MyInt32.ref.loc20_25: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32]
// CHECK:STDOUT: %MyInt32.ref.loc20_37: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32]
// CHECK:STDOUT: %a.param: %MyInt32 = value_param runtime_param0
// CHECK:STDOUT: %MyInt32.ref.loc20_13: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32]
// CHECK:STDOUT: %a: %MyInt32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %MyInt32 = value_param runtime_param1
// CHECK:STDOUT: %MyInt32.ref.loc20_25: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32]
// CHECK:STDOUT: %b: %MyInt32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %MyInt32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref %MyInt32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %MyInt32.ref: type = name_ref MyInt32, %MyInt32.decl [template = constants.%MyInt32]
// CHECK:STDOUT: %v.var: ref %MyInt32 = var v
// CHECK:STDOUT: %v: ref %MyInt32 = bind_name v, %v.var
// CHECK:STDOUT: }
@@ -164,9 +163,9 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: %return.patt: %MyInt32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %MyInt32 = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %MyIntLiteral.ref.loc15: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral]
// CHECK:STDOUT: %MyInt32.ref.loc15: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32]
// CHECK:STDOUT: %a.param.loc15: %MyIntLiteral = value_param runtime_param0
// CHECK:STDOUT: %MyIntLiteral.ref.loc15: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral]
// CHECK:STDOUT: %a.loc15: %MyIntLiteral = bind_name a, %a.param.loc15
// CHECK:STDOUT: %return.param.loc15: ref %MyInt32 = out_param runtime_param1
// CHECK:STDOUT: %return.loc15: ref %MyInt32 = return_slot %return.param.loc15
@@ -235,8 +234,8 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed";
// CHECK:STDOUT: %return.patt: type = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral]
// CHECK:STDOUT: %N.param: %MyIntLiteral = value_param runtime_param0
// CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral]
// CHECK:STDOUT: %N: %MyIntLiteral = bind_name N, %N.param
// CHECK:STDOUT: %return.param: ref type = out_param runtime_param1
// CHECK:STDOUT: %return: ref type = return_slot %return.param
@@ -139,11 +139,13 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.patt: type = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc5_22.2: type = converted %int_literal.make_type, %.loc5_22.1 [template = Core.IntLiteral]
// CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param0
// CHECK:STDOUT: %.loc5_22.3: type = splice_block %.loc5_22.2 [template = Core.IntLiteral] {
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc5_22.2: type = converted %int_literal.make_type, %.loc5_22.1 [template = Core.IntLiteral]
// CHECK:STDOUT: }
// CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param
// CHECK:STDOUT: %return.param: ref type = out_param runtime_param1
// CHECK:STDOUT: %return: ref type = return_slot %return.param
@@ -218,18 +220,22 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.ref.loc8_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc8_15: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %Self.ref.loc8_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc8_28: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %Self.ref.loc8_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc8_37: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = value_param runtime_param0
// CHECK:STDOUT: %.loc8_15.2: type = splice_block %.loc8_15.1 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] {
// CHECK:STDOUT: %Self.ref.loc8_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc8_15.1: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = bind_name self, %self.param
// CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = value_param runtime_param1
// CHECK:STDOUT: %.loc8_28.2: type = splice_block %.loc8_28.1 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] {
// CHECK:STDOUT: %Self.ref.loc8_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)]
// CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: %.loc8_28.1: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = bind_name other, %other.param
// CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = out_param runtime_param2
// CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = return_slot %return.param
@@ -262,12 +268,14 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.patt: @Convert.1.%T (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @Convert.1.%T (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc12_20.1: @Convert.1.%As.type (%As.type.2) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.2) = name_ref Self, %.loc12_20.1 [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT: %Self.as_type.loc12_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)]
// CHECK:STDOUT: %.loc12_20.2: type = converted %Self.ref, %Self.as_type.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)]
// CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc11_14.1 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2) = value_param runtime_param0
// CHECK:STDOUT: %.loc12_20.3: type = splice_block %.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] {
// CHECK:STDOUT: %.loc12_20.1: @Convert.1.%As.type (%As.type.2) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.2) = name_ref Self, %.loc12_20.1 [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT: %Self.as_type.loc12_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)]
// CHECK:STDOUT: %.loc12_20.2: type = converted %Self.ref, %Self.as_type.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2) = bind_name self, %self.param
// CHECK:STDOUT: %return.param: ref @Convert.1.%T (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @Convert.1.%T (%T) = return_slot %return.param
@@ -301,12 +309,14 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.patt: @Convert.2.%T (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @Convert.2.%T (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc16_20.1: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.3)]
// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc16_20.1 [symbolic = %Self (constants.%Self.3)]
// CHECK:STDOUT: %Self.as_type.loc16_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)]
// CHECK:STDOUT: %.loc16_20.2: type = converted %Self.ref, %Self.as_type.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)]
// CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc15_22.1 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %self.param: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3) = value_param runtime_param0
// CHECK:STDOUT: %.loc16_20.3: type = splice_block %.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] {
// CHECK:STDOUT: %.loc16_20.1: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.3)]
// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc16_20.1 [symbolic = %Self (constants.%Self.3)]
// CHECK:STDOUT: %Self.as_type.loc16_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)]
// CHECK:STDOUT: %.loc16_20.2: type = converted %Self.ref, %Self.as_type.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3) = bind_name self, %self.param
// CHECK:STDOUT: %return.param: ref @Convert.2.%T (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @Convert.2.%T (%T) = return_slot %return.param
@@ -329,12 +339,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin]
// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin]
// CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin]
// CHECK:STDOUT: %self.param: %i32.builtin = value_param runtime_param0
// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin]
// CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param
// CHECK:STDOUT: %other.param: %i32.builtin = value_param runtime_param1
// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin]
// CHECK:STDOUT: %other: %i32.builtin = bind_name other, %other.param
// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param2
// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
@@ -353,12 +363,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%.loc23_17.2 [template = Core.IntLiteral]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc24_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc24_31.2: type = converted %int.make_type_signed, %.loc24_31.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%.loc23_17.2 [template = Core.IntLiteral]
// CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param
// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
@@ -377,12 +387,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%.loc27_17.2 [template = Core.IntLiteral]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc28_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc28_31.2: type = converted %int.make_type_signed, %.loc28_31.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%.loc27_17.2 [template = Core.IntLiteral]
// CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param
// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
@@ -401,12 +411,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%.loc31_6.2 [template = constants.%i32.builtin]
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc32_42.2: type = converted %int_literal.make_type, %.loc32_42.1 [template = Core.IntLiteral]
// CHECK:STDOUT: %self.param: %i32.builtin = value_param runtime_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%.loc31_6.2 [template = constants.%i32.builtin]
// CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param
// CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1
// CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
@@ -602,11 +612,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.3 [template]
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template]
// CHECK:STDOUT: %interface.1: <witness> = interface_witness (%Convert.6) [template]
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.6 [template]
// CHECK:STDOUT: %int_1.2: %i32.builtin = int_value 1 [template]
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.6 [template]
// CHECK:STDOUT: %int_2.2: %i32.builtin = int_value 2 [template]
// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template]
// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.2 [symbolic]
// CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type %Add.type, %Op.type.1 [template]
@@ -614,13 +620,11 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template]
// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template]
// CHECK:STDOUT: %interface.2: <witness> = interface_witness (%Op.2) [template]
// CHECK:STDOUT: %Op.bound.1: <bound method> = bound_method %int_1.2, %Op.2 [template]
// CHECK:STDOUT: %int_3.1: %i32.builtin = int_value 3 [template]
// CHECK:STDOUT: %assoc0.8: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.32 [symbolic]
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.4 [template]
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template]
// CHECK:STDOUT: %interface.3: <witness> = interface_witness (%Convert.7) [template]
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.7 [template]
// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template]
// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32.builtin [template]
// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template]
@@ -647,11 +651,11 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: .ImplicitAs = %import_ref.31
// CHECK:STDOUT: import Core//default
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst82 [no loc], unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst85 [no loc], unloaded
// CHECK:STDOUT: %import_ref.4: @As.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.3)]
// CHECK:STDOUT: %import_ref.5 = import_ref Core//default, Convert, unloaded
// CHECK:STDOUT: %import_ref.6 = import_ref Core//default, loc12_32, unloaded
// CHECK:STDOUT: %import_ref.8 = import_ref Core//default, inst38 [no loc], unloaded
// CHECK:STDOUT: %import_ref.8 = import_ref Core//default, inst39 [no loc], unloaded
// CHECK:STDOUT: %import_ref.9: %Op.assoc_type = import_ref Core//default, loc8_41, loaded [template = constants.%assoc0.7]
// CHECK:STDOUT: %import_ref.10 = import_ref Core//default, Op, unloaded
// CHECK:STDOUT: %import_ref.11: type = import_ref Core//default, loc19_6, loaded [template = constants.%i32.builtin]
@@ -660,7 +664,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %import_ref.14: type = import_ref Core//default, loc23_17, loaded [template = Core.IntLiteral]
// CHECK:STDOUT: %import_ref.15: type = import_ref Core//default, loc23_28, loaded [template = constants.%As.type.3]
// CHECK:STDOUT: %import_ref.16: <witness> = import_ref Core//default, loc23_30, loaded [template = constants.%interface.1]
// CHECK:STDOUT: %import_ref.17 = import_ref Core//default, inst124 [no loc], unloaded
// CHECK:STDOUT: %import_ref.17 = import_ref Core//default, inst128 [no loc], unloaded
// CHECK:STDOUT: %import_ref.18: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.3) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.8)]
// CHECK:STDOUT: %import_ref.19 = import_ref Core//default, Convert, unloaded
// CHECK:STDOUT: %import_ref.20: type = import_ref Core//default, loc27_17, loaded [template = Core.IntLiteral]
@@ -678,41 +682,6 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: .arr = %arr
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32.builtin]
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
// CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %impl.elem0.loc4_19: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6]
// CHECK:STDOUT: %Convert.bound.loc4_19: <bound method> = bound_method %int_1, %impl.elem0.loc4_19 [template = constants.%Convert.bound.1]
// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32.builtin = call %Convert.bound.loc4_19(%int_1) [template = constants.%int_1.2]
// CHECK:STDOUT: %.loc4_19.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%int_1.2]
// CHECK:STDOUT: %.loc4_19.2: %i32.builtin = converted %int_1, %.loc4_19.1 [template = constants.%int_1.2]
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
// CHECK:STDOUT: %int_32.loc4_35: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%int_32.loc4_35) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc4_35.2: type = converted %int.make_type_signed.loc4_35, %.loc4_35.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %impl.elem0.loc4_32: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6]
// CHECK:STDOUT: %Convert.bound.loc4_32: <bound method> = bound_method %int_2, %impl.elem0.loc4_32 [template = constants.%Convert.bound.2]
// CHECK:STDOUT: %int.convert_checked.loc4_32: init %i32.builtin = call %Convert.bound.loc4_32(%int_2) [template = constants.%int_2.2]
// CHECK:STDOUT: %.loc4_32.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%int_2.2]
// CHECK:STDOUT: %.loc4_32.2: %i32.builtin = converted %int_2, %.loc4_32.1 [template = constants.%int_2.2]
// CHECK:STDOUT: %impl.elem0.loc4_27.1: %Op.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.2]
// CHECK:STDOUT: %Op.bound: <bound method> = bound_method %.loc4_19.2, %impl.elem0.loc4_27.1 [template = constants.%Op.bound.1]
// CHECK:STDOUT: %int.sadd: init %i32.builtin = call %Op.bound(%.loc4_19.2, %.loc4_32.2) [template = constants.%int_3.1]
// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %impl.elem0.loc4_27.2: %Convert.type.5 = interface_witness_access constants.%interface.3, element0 [template = constants.%Convert.7]
// CHECK:STDOUT: %Convert.bound.loc4_27: <bound method> = bound_method %int.sadd, %impl.elem0.loc4_27.2 [template = constants.%Convert.bound.3]
// CHECK:STDOUT: %.loc4_27.1: %i32.builtin = value_of_initializer %int.sadd [template = constants.%int_3.1]
// CHECK:STDOUT: %.loc4_27.2: %i32.builtin = converted %int.sadd, %.loc4_27.1 [template = constants.%int_3.1]
// CHECK:STDOUT: %int.convert_checked.loc4_27: init Core.IntLiteral = call %Convert.bound.loc4_27(%.loc4_27.2) [template = constants.%int_3.2]
// CHECK:STDOUT: %.loc4_27.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%int_3.2]
// CHECK:STDOUT: %.loc4_27.4: Core.IntLiteral = converted %int.sadd, %.loc4_27.3 [template = constants.%int_3.2]
// CHECK:STDOUT: %array_type: type = array_type %.loc4_27.4, %i32.builtin [template = constants.%array_type]
// CHECK:STDOUT: %arr.var: ref %array_type = var arr
// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var
// CHECK:STDOUT: }
@@ -65,11 +65,13 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] =
// CHECK:STDOUT: %return.patt: type = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc6_22.2: type = converted %int_literal.make_type, %.loc6_22.1 [template = Core.IntLiteral]
// CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param0
// CHECK:STDOUT: %.loc6_22.3: type = splice_block %.loc6_22.2 [template = Core.IntLiteral] {
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc6_22.2: type = converted %int_literal.make_type, %.loc6_22.1 [template = Core.IntLiteral]
// CHECK:STDOUT: }
// CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param
// CHECK:STDOUT: %return.param: ref type = out_param runtime_param1
// CHECK:STDOUT: %return: ref type = return_slot %return.param
@@ -80,15 +82,17 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] =
// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc8_24.2: type = converted %int_literal.make_type, %.loc8_24.1 [template = Core.IntLiteral]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc8_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc8_30.2: type = converted %int.make_type_signed, %.loc8_30.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0
// CHECK:STDOUT: %.loc8_24.3: type = splice_block %.loc8_24.2 [template = Core.IntLiteral] {
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc8_24.2: type = converted %int_literal.make_type, %.loc8_24.1 [template = Core.IntLiteral]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param
// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
@@ -99,15 +103,17 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] =
// CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc9_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc9_39.2: type = converted %int_literal.make_type, %.loc9_39.1 [template = Core.IntLiteral]
// CHECK:STDOUT: %a.param: %i32.builtin = value_param runtime_param0
// CHECK:STDOUT: %.loc9_20.3: type = splice_block %.loc9_20.2 [template = constants.%i32.builtin] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32.builtin = bind_name a, %a.param
// CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1
// CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
@@ -120,21 +126,25 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] =
// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed.loc11_15, %.loc11_15.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %int_32.loc11_31: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%int_32.loc11_31) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_31.1: type = value_of_initializer %int.make_type_signed.loc11_31 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_31.2: type = converted %int.make_type_signed.loc11_31, %.loc11_31.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %a.param: %i32.builtin = value_param runtime_param0
// CHECK:STDOUT: %.loc11_15.3: type = splice_block %.loc11_15.2 [template = constants.%i32.builtin] {
// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed.loc11_15, %.loc11_15.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32.builtin = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32.builtin = value_param runtime_param1
// CHECK:STDOUT: %.loc11_23.3: type = splice_block %.loc11_23.2 [template = constants.%i32.builtin] {
// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32.builtin = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param2
// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
@@ -155,13 +165,7 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] =
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template]
// CHECK:STDOUT: %AsIntLiteral.type: type = fn_type @AsIntLiteral [template]
// CHECK:STDOUT: %AsIntLiteral: %AsIntLiteral.type = struct_value () [template]
// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template]
// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template]
// CHECK:STDOUT: %AsI32.type: type = fn_type @AsI32 [template]
// CHECK:STDOUT: %AsI32: %AsI32.type = struct_value () [template]
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
@@ -184,8 +188,6 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] =
// CHECK:STDOUT: .AsI32 = %import_ref.4
// CHECK:STDOUT: import Core//core
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.2: %AsIntLiteral.type = import_ref Core//core, AsIntLiteral, loaded [template = constants.%AsIntLiteral]
// CHECK:STDOUT: %import_ref.3: %TestAdd.type = import_ref Core//core, TestAdd, loaded [template = constants.%TestAdd]
// CHECK:STDOUT: %import_ref.4: %AsI32.type = import_ref Core//core, AsI32, loaded [template = constants.%AsI32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -195,33 +197,6 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] =
// CHECK:STDOUT: .arr = %arr
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin]
// CHECK:STDOUT: %Core.ref.loc4_16: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %AsIntLiteral.ref: %AsIntLiteral.type = name_ref AsIntLiteral, imports.%import_ref.2 [template = constants.%AsIntLiteral]
// CHECK:STDOUT: %Core.ref.loc4_34: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %TestAdd.ref: %TestAdd.type = name_ref TestAdd, imports.%import_ref.3 [template = constants.%TestAdd]
// CHECK:STDOUT: %Core.ref.loc4_47: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %AsI32.ref.loc4_51: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32]
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
// CHECK:STDOUT: %int.convert_checked.loc4_59: init %i32.builtin = call %AsI32.ref.loc4_51(%int_1) [template = constants.%int_1.2]
// CHECK:STDOUT: %Core.ref.loc4_62: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %AsI32.ref.loc4_66: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32]
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
// CHECK:STDOUT: %int.convert_checked.loc4_74: init %i32.builtin = call %AsI32.ref.loc4_66(%int_2) [template = constants.%int_2.2]
// CHECK:STDOUT: %.loc4_59.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_59 [template = constants.%int_1.2]
// CHECK:STDOUT: %.loc4_59.2: %i32.builtin = converted %int.convert_checked.loc4_59, %.loc4_59.1 [template = constants.%int_1.2]
// CHECK:STDOUT: %.loc4_74.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_74 [template = constants.%int_2.2]
// CHECK:STDOUT: %.loc4_74.2: %i32.builtin = converted %int.convert_checked.loc4_74, %.loc4_74.1 [template = constants.%int_2.2]
// CHECK:STDOUT: %int.sadd: init %i32.builtin = call %TestAdd.ref(%.loc4_59.2, %.loc4_74.2) [template = constants.%int_3.1]
// CHECK:STDOUT: %.loc4_75.1: %i32.builtin = value_of_initializer %int.sadd [template = constants.%int_3.1]
// CHECK:STDOUT: %.loc4_75.2: %i32.builtin = converted %int.sadd, %.loc4_75.1 [template = constants.%int_3.1]
// CHECK:STDOUT: %int.convert_checked.loc4_76: init Core.IntLiteral = call %AsIntLiteral.ref(%.loc4_75.2) [template = constants.%int_3.2]
// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32.builtin]
// CHECK:STDOUT: %.loc4_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_76 [template = constants.%int_3.2]
// CHECK:STDOUT: %.loc4_76.2: Core.IntLiteral = converted %int.convert_checked.loc4_76, %.loc4_76.1 [template = constants.%int_3.2]
// CHECK:STDOUT: %array_type: type = array_type %.loc4_76.2, %i32.builtin [template = constants.%array_type]
// CHECK:STDOUT: %arr.var: ref %array_type = var arr
// CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var
// CHECK:STDOUT: }
@@ -44,8 +44,6 @@ fn Run() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %x.var: ref %i32 = var x
// CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var
// CHECK:STDOUT: %str: String = string_literal "hello" [template = constants.%str]
@@ -103,9 +103,11 @@ fn Main() {
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc12: type = splice_block %i32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Run2.decl: %Run2.type = fn_decl @Run2 [template = constants.%Run2] {
@@ -114,13 +116,17 @@ fn Main() {
// CHECK:STDOUT: %b.patt: %i32 = binding_pattern b
// CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc13_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc13_20: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc13_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc13_12: type = splice_block %i32.loc13_12 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc13_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc13_20: type = splice_block %i32.loc13_20 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc13_20: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc13_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {}
@@ -56,9 +56,11 @@ fn F() {
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {}
@@ -74,8 +74,6 @@ fn Run() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %x.var: ref %i32 = var x
// CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
+4 -4
View File
@@ -57,11 +57,13 @@ fn Main() {
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_20: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_12 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
@@ -77,8 +79,6 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.var: ref %i32 = var b
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
@@ -26,7 +26,6 @@ fn Main() {
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template]
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template]
@@ -67,13 +66,17 @@ fn Main() {
// CHECK:STDOUT: %b.patt: %i32 = binding_pattern b
// CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {}
@@ -86,10 +89,6 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc14_15.1: %tuple.type.1 = tuple_literal (%i32)
// CHECK:STDOUT: %.loc14_15.2: type = converted %.loc14_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x
// CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
@@ -57,8 +57,6 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc16_11.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b
// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var
// CHECK:STDOUT: %B.ref: %A.type = name_ref B, file.%B [template = constants.%A]
@@ -38,11 +38,13 @@ fn Main() {
// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc11_13.1: %empty_struct_type = struct_literal ()
// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
// CHECK:STDOUT: %.loc11_20.1: %empty_struct_type = struct_literal ()
// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
// CHECK:STDOUT: %a.param: %empty_struct_type = value_param runtime_param0
// CHECK:STDOUT: %.loc11_13.3: type = splice_block %.loc11_13.2 [template = constants.%empty_struct_type] {
// CHECK:STDOUT: %.loc11_13.1: %empty_struct_type = struct_literal ()
// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %empty_struct_type = bind_name a, %a.param
// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param1
// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
@@ -38,11 +38,13 @@ fn Main() {
// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc11_13.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %.loc11_20.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %a.param: %empty_tuple.type = value_param runtime_param0
// CHECK:STDOUT: %.loc11_13.3: type = splice_block %.loc11_13.2 [template = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc11_13.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %empty_tuple.type = bind_name a, %a.param
// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1
// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param
@@ -37,9 +37,11 @@ fn Run() {
// CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self
// CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc14_13.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0
// CHECK:STDOUT: %.loc14_13.3: type = splice_block %.loc14_13.2 [template = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc14_13.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {}
@@ -32,10 +32,7 @@ fn Run() {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: .Run = %Run.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {
// CHECK:STDOUT: %.loc14_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc14_10.2: type = converted %.loc14_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {}
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -41,8 +41,6 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc15_11.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b
// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var
// CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: %MakeImplicitEmptyTuple.type = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple]
+4 -2
View File
@@ -54,9 +54,11 @@ fn Main() {
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {}
@@ -55,9 +55,11 @@ fn Main() {
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {}
+8 -4
View File
@@ -60,13 +60,17 @@ fn Main() {
// CHECK:STDOUT: %b.patt: %i32 = binding_pattern b
// CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {}
@@ -61,13 +61,17 @@ fn Main() {
// CHECK:STDOUT: %b.patt: %i32 = binding_pattern b
// CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {}
@@ -42,15 +42,19 @@ fn F(n: i32, a: [i32; n]*);
// CHECK:STDOUT: %a.patt: <error> = binding_pattern a
// CHECK:STDOUT: %a.param_patt: <error> = value_param_pattern %a.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc14_18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
// CHECK:STDOUT: %ptr: type = ptr_type <error> [template = <error>]
// CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc14_9: type = splice_block %i32.loc14_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n: %i32 = bind_name n, %n.param
// CHECK:STDOUT: %a.param: <error> = value_param runtime_param1
// CHECK:STDOUT: %.loc14_25: type = splice_block %ptr [template = <error>] {
// CHECK:STDOUT: %int_32.loc14_18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
// CHECK:STDOUT: %ptr: type = ptr_type <error> [template = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: <error> = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -45,13 +45,17 @@ fn F(n: i32, n: i32);
// CHECK:STDOUT: %n.patt.loc17_14: %i32 = binding_pattern n
// CHECK:STDOUT: %n.param_patt.loc17_15: %i32 = value_param_pattern %n.patt.loc17_14, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc17_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc17_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %n.param.loc17_7: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc17_9: type = splice_block %i32.loc17_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc17_6: %i32 = bind_name n, %n.param.loc17_7
// CHECK:STDOUT: %n.param.loc17_15: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc17_17: type = splice_block %i32.loc17_17 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc17_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc17_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc17_14: %i32 = bind_name n, %n.param.loc17_15
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+40 -79
View File
@@ -300,11 +300,13 @@ import library "extern_api";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
@@ -315,14 +317,16 @@ import library "extern_api";
// CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10)
// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %int_32.loc6_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0
// CHECK:STDOUT: %.loc6_14.3: type = splice_block %.loc6_14.2 [template = constants.%tuple.type.2] {
// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10)
// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param
// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1
// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param
@@ -389,11 +393,13 @@ import library "extern_api";
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc5_52: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_52: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_44 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
@@ -404,14 +410,16 @@ import library "extern_api";
// CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc6_45: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_45: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc6_49.1: %tuple.type.1 = tuple_literal (%i32.loc6_45)
// CHECK:STDOUT: %.loc6_49.2: type = converted %.loc6_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %int_32.loc6_60: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_60: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0
// CHECK:STDOUT: %.loc6_49.3: type = splice_block %.loc6_49.2 [template = constants.%tuple.type.2] {
// CHECK:STDOUT: %int_32.loc6_45: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_45: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc6_49.1: %tuple.type.1 = tuple_literal (%i32.loc6_45)
// CHECK:STDOUT: %.loc6_49.2: type = converted %.loc6_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param
// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1
// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param
@@ -497,25 +505,14 @@ import library "extern_api";
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a
// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var
// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.var: ref %i32 = var b
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.var: ref %struct_type.c = var c
// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var
// CHECK:STDOUT: %.loc9_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d
// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var
// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e
// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var
// CHECK:STDOUT: }
@@ -630,49 +627,42 @@ import library "extern_api";
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} {
// CHECK:STDOUT: %int_32.loc23_16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc23_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc23_24: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc23_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc23: type = splice_block %i32.loc23_16 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc23_16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc23_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {
// CHECK:STDOUT: %int_32.loc32_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc32_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc32_21.1: %tuple.type.1 = tuple_literal (%i32.loc32_17)
// CHECK:STDOUT: %.loc32_21.2: type = converted %.loc32_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %int_32.loc32_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc32_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0
// CHECK:STDOUT: %.loc32_21.3: type = splice_block %.loc32_21.2 [template = constants.%tuple.type.2] {
// CHECK:STDOUT: %int_32.loc32_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc32_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc32_21.1: %tuple.type.1 = tuple_literal (%i32.loc32_17)
// CHECK:STDOUT: %.loc32_21.2: type = converted %.loc32_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param
// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1
// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {}
// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {}
// CHECK:STDOUT: %.loc52_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a
// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var
// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.var: ref %i32 = var b
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
// CHECK:STDOUT: %int_32.loc54: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc54: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.var: ref %struct_type.c = var c
// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var
// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d
// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var
// CHECK:STDOUT: %.loc56_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc56_9.2: type = converted %.loc56_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e
// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var
// CHECK:STDOUT: }
@@ -787,49 +777,42 @@ import library "extern_api";
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} {
// CHECK:STDOUT: %int_32.loc7_16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc7_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc7_24: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc7_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc7: type = splice_block %i32.loc7_16 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc7_16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc7_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {
// CHECK:STDOUT: %int_32.loc8_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc8_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc8_21.1: %tuple.type.1 = tuple_literal (%i32.loc8_17)
// CHECK:STDOUT: %.loc8_21.2: type = converted %.loc8_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %int_32.loc8_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc8_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0
// CHECK:STDOUT: %.loc8_21.3: type = splice_block %.loc8_21.2 [template = constants.%tuple.type.2] {
// CHECK:STDOUT: %int_32.loc8_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc8_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc8_21.1: %tuple.type.1 = tuple_literal (%i32.loc8_17)
// CHECK:STDOUT: %.loc8_21.2: type = converted %.loc8_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param
// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1
// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {}
// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {}
// CHECK:STDOUT: %.loc12_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a
// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var
// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.var: ref %i32 = var b
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.var: ref %struct_type.c = var c
// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var
// CHECK:STDOUT: %.loc15_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc15_9.2: type = converted %.loc15_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d
// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var
// CHECK:STDOUT: %.loc16_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc16_9.2: type = converted %.loc16_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e
// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var
// CHECK:STDOUT: }
@@ -946,25 +929,14 @@ import library "extern_api";
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc52_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a
// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var
// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.var: ref %i32 = var b
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
// CHECK:STDOUT: %int_32.loc54: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc54: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.var: ref %struct_type.c = var c
// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var
// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d
// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var
// CHECK:STDOUT: %.loc56_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc56_9.2: type = converted %.loc56_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e
// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var
// CHECK:STDOUT: }
@@ -1081,25 +1053,14 @@ import library "extern_api";
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc51_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc51_9.2: type = converted %.loc51_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a
// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var
// CHECK:STDOUT: %int_32.loc52: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc52: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.var: ref %i32 = var b
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.var: ref %struct_type.c = var c
// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var
// CHECK:STDOUT: %.loc54_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc54_9.2: type = converted %.loc54_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d
// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var
// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e
// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var
// CHECK:STDOUT: }
@@ -93,8 +93,6 @@ var f: () = F();
// CHECK:STDOUT: .f = %f
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -114,8 +114,6 @@ extern library "basic" fn F();
// CHECK:STDOUT: .x = %x
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x
// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var
// CHECK:STDOUT: }
@@ -189,8 +187,8 @@ extern library "basic" fn F();
// CHECK:STDOUT: %self.patt: %C = binding_pattern self
// CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C]
// CHECK:STDOUT: %self.param: %C = value_param runtime_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C]
// CHECK:STDOUT: %self: %C = bind_name self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
@@ -89,18 +89,22 @@ fn E() {}
// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %x.param.loc21: %empty_tuple.type = value_param runtime_param0
// CHECK:STDOUT: %.loc21_10.3: type = splice_block %.loc21_10.2 [template = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x.loc21: %empty_tuple.type = bind_name x, %x.param.loc21
// CHECK:STDOUT: }
// CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc29_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %x.param.loc29: %empty_tuple.type = value_param runtime_param0
// CHECK:STDOUT: %.loc29_10.3: type = splice_block %.loc29_10.2 [template = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc29_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x.loc29: %empty_tuple.type = bind_name x, %x.param.loc29
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {}
@@ -108,9 +112,11 @@ fn E() {}
// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc39_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0
// CHECK:STDOUT: %.loc39_10.3: type = splice_block %.loc39_10.2 [template = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc39_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %D.decl.loc41: %D.type = fn_decl @D [template = constants.%D] {} {}
@@ -135,8 +141,5 @@ fn E() {}
// CHECK:STDOUT: fn @E() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT:
// CHECK:STDOUT: !.loc58:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -112,8 +112,6 @@ fn A {
// CHECK:STDOUT: .x = %x
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc8_10.2: type = converted %.loc8_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x
// CHECK:STDOUT: %x: %empty_tuple.type = bind_symbolic_name x, %x.var [symbolic = constants.%x]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
@@ -289,16 +289,16 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C.2 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C.2 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2]
// CHECK:STDOUT: %x.param: %C.2 = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2]
// CHECK:STDOUT: %x: %C.2 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [template = constants.%F2] {
// CHECK:STDOUT: %x.patt: %C.2 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C.2 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2]
// CHECK:STDOUT: %x.param: %C.2 = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2]
// CHECK:STDOUT: %x: %C.2 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -353,8 +353,8 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -393,8 +393,8 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {}
@@ -442,8 +442,8 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %I.type = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %I.type = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
// CHECK:STDOUT: %x.param: %I.type = value_param runtime_param0
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
// CHECK:STDOUT: %x: %I.type = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.type] {} {}
@@ -490,8 +490,8 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc17: <namespace> = namespace [template] {}
@@ -544,12 +544,11 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C1 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C1 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C1.ref: type = name_ref C1, file.%C1.decl [template = constants.%C1]
// CHECK:STDOUT: %x.param: %C1 = value_param runtime_param0
// CHECK:STDOUT: %C1.ref: type = name_ref C1, file.%C1.decl [template = constants.%C1]
// CHECK:STDOUT: %x: %C1 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C2.decl: type = class_decl @C2 [template = constants.%C2] {} {}
// CHECK:STDOUT: %C2.ref: type = name_ref C2, %C2.decl [template = constants.%C2]
// CHECK:STDOUT: %.loc18: %D.elem = field_decl C1, element0 [template]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.C1 [template = constants.%complete_type.2]
// CHECK:STDOUT:
@@ -595,8 +594,8 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {}
@@ -695,8 +694,8 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {}
@@ -704,8 +703,8 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -831,8 +830,8 @@ class N.C {}
// CHECK:STDOUT: %x.patt: %C = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {}
@@ -42,18 +42,22 @@ fn G(a: i32);
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc13: type = splice_block %i32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+14 -15
View File
@@ -152,11 +152,13 @@ fn D() {}
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
@@ -167,14 +169,16 @@ fn D() {}
// CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10)
// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %int_32.loc6_25: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0
// CHECK:STDOUT: %.loc6_14.3: type = splice_block %.loc6_14.2 [template = constants.%tuple.type.2] {
// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10)
// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param
// CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1
// CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param
@@ -283,17 +287,10 @@ fn D() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a
// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var
// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.var: ref %i32 = var b
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c]
// CHECK:STDOUT: %c.var: ref %struct_type.c = var c
// CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var
// CHECK:STDOUT: }
@@ -368,11 +365,13 @@ fn D() {}
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} {
// CHECK:STDOUT: %int_32.loc23_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc23_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc23_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc23_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc23: type = splice_block %i32.loc23_9 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc23_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc23_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
@@ -242,8 +242,6 @@ private fn Redecl() {}
// CHECK:STDOUT: %Test.import = import Test
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -278,8 +276,6 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -315,8 +311,6 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %Test.import = import Test
// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -354,8 +348,6 @@ private fn Redecl() {}
// CHECK:STDOUT: %Test.import = import Test
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -390,8 +382,6 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -427,8 +417,6 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %Test.import = import Test
// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -466,8 +454,6 @@ private fn Redecl() {}
// CHECK:STDOUT: %Test.import = import Test
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: %Forward.decl: %Forward.type = fn_decl @Forward [template = constants.%Forward] {} {}
@@ -506,8 +492,6 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %default.import = import <invalid>
// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -543,8 +527,6 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %Test.import = import Test
// CHECK:STDOUT: %.loc9_9.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f
// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var
// CHECK:STDOUT: }
@@ -39,8 +39,8 @@ fn F(n: C) {}
// CHECK:STDOUT: %n.patt: %C = binding_pattern n
// CHECK:STDOUT: %n.param_patt: %C = value_param_pattern %n.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %n.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %n: %C = bind_name n, %n.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -111,18 +111,22 @@ fn K() -> {} { return {}; }
// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc19_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0
// CHECK:STDOUT: %.loc19_10.3: type = splice_block %.loc19_10.2 [template = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc19_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0
// CHECK:STDOUT: %.loc21_10.3: type = splice_block %.loc21_10.2 [template = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl.loc29: %.type.2 = fn_decl @.2 [template = constants.%.2] {} {}
@@ -130,9 +134,11 @@ fn K() -> {} { return {}; }
// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc31_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0
// CHECK:STDOUT: %.loc31_10.3: type = splice_block %.loc31_10.2 [template = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc31_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl.loc36: %.type.3 = fn_decl @.3 [template = constants.%.3] {
@@ -35,8 +35,5 @@ fn F() {}
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT:
// CHECK:STDOUT: !.loc18:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -194,32 +194,32 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7
// CHECK:STDOUT: }
// CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param.loc8: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.loc8: %C = bind_name a, %a.param.loc8
// CHECK:STDOUT: }
// CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = fn_decl @Bar [template = constants.%Bar] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.param.loc10: %C = value_param runtime_param0
// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.loc10: %C = bind_name a, %a.param.loc10
// CHECK:STDOUT: }
// CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = fn_decl @Bar [template = constants.%Bar] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.param.loc11: %C = value_param runtime_param0
// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.loc11: %C = bind_name a, %a.param.loc11
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -262,16 +262,16 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.loc6: %C = bind_name a, %a.param.loc6
// CHECK:STDOUT: }
// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -311,16 +311,16 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -360,16 +360,16 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.loc6: %C = bind_name a, %a.param.loc6
// CHECK:STDOUT: }
// CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -413,16 +413,16 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -471,16 +471,16 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -526,16 +526,16 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {
// CHECK:STDOUT: %b.patt: %C = binding_pattern b
// CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %b.param: %C = value_param runtime_param0
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %b: %C = bind_name b, %b.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -580,16 +580,16 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -636,16 +636,16 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt.loc7_8.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_8.2 (constants.%a.patt)]
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_8.1, runtime_param<invalid> [symbolic = %a.patt.loc7_8.2 (constants.%a.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param<invalid>
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.loc7_8.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_8.2 (constants.%a)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {
// CHECK:STDOUT: %a.patt.loc15_8.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)]
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_8.1, runtime_param<invalid> [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param<invalid>
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.loc15_8.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_8.2 (constants.%a)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -761,8 +761,8 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -807,8 +807,8 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %C = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a.param: %C = value_param runtime_param0
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C]
// CHECK:STDOUT: %a: %C = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -847,19 +847,23 @@ fn Foo(a: const (const C)) {}
// CHECK:STDOUT: %a.patt: %const = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const]
// CHECK:STDOUT: %a.param: %const = value_param runtime_param0
// CHECK:STDOUT: %.loc6: type = splice_block %const [template = constants.%const] {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %const = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {
// CHECK:STDOUT: %a.patt: %const = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %const.loc17_18: type = const_type %C [template = constants.%const]
// CHECK:STDOUT: %const.loc17_11: type = const_type %const [template = constants.%const]
// CHECK:STDOUT: %a.param: %const = value_param runtime_param0
// CHECK:STDOUT: %.loc17: type = splice_block %const.loc17_11 [template = constants.%const] {
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %const.loc17_18: type = const_type %C [template = constants.%const]
// CHECK:STDOUT: %const.loc17_11: type = const_type %const [template = constants.%const]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %const = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -37,9 +37,11 @@ fn Foo(a: i32) {}
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -37,9 +37,11 @@ fn Foo(a: i32,) {}
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -39,13 +39,17 @@ fn Foo(a: i32, b: i32) {}
// CHECK:STDOUT: %b.patt: %i32 = binding_pattern b
// CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -39,13 +39,17 @@ fn Foo(a: i32, b: i32,) {}
// CHECK:STDOUT: %b.patt: %i32 = binding_pattern b
// CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+48 -34
View File
@@ -539,12 +539,12 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %return.patt: @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc6_46: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc6_47.1: type = ptr_type %T [symbolic = %ptr.loc6_47.2 (constants.%ptr.1)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc6_27.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_27.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)]
// CHECK:STDOUT: %x: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = return_slot %return.param
@@ -677,12 +677,12 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %return.patt: @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc4_45.1: type = ptr_type %T [symbolic = %ptr.loc4_45.2 (constants.%ptr.1)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @ImplicitGenericParam.%T.loc4_25.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %x: @ImplicitGenericParam.%T.loc4_25.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = return_slot %return.param
@@ -693,12 +693,14 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc6_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc6_40: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2]
// CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0
// CHECK:STDOUT: %.loc6: type = splice_block %i32.loc6_32 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc6_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc6_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n: %i32 = bind_name n, %n.param
// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1
// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param
@@ -815,14 +817,16 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %x.patt: @TupleParam.%tuple.type (%tuple.type.2) = binding_pattern x
// CHECK:STDOUT: %x.param_patt: @TupleParam.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc4_35.1: %tuple.type.1 = tuple_literal (%T.ref, %i32)
// CHECK:STDOUT: %.loc4_35.2: type = converted %.loc4_35.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @TupleParam.%tuple.type (%tuple.type.2) = value_param runtime_param0
// CHECK:STDOUT: %.loc4_35.3: type = splice_block %.loc4_35.2 [symbolic = %tuple.type (constants.%tuple.type.2)] {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %.loc4_35.1: %tuple.type.1 = tuple_literal (%T.ref, %i32)
// CHECK:STDOUT: %.loc4_35.2: type = converted %.loc4_35.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @TupleParam.%tuple.type (%tuple.type.2) = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %CallTupleParam.decl: %CallTupleParam.type = fn_decl @CallTupleParam [template = constants.%CallTupleParam] {} {}
@@ -928,13 +932,15 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %x.patt: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = binding_pattern x
// CHECK:STDOUT: %x.param_patt: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.a.b.loc4_44.1: type = struct_type {.a: %T, .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_16.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = value_param runtime_param0
// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.a.b.loc4_44.1 [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)] {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.a.b.loc4_44.1: type = struct_type {.a: %T, .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %CallStructParam.decl: %CallStructParam.type = fn_decl @CallStructParam [template = constants.%CallStructParam] {} {}
@@ -1027,15 +1033,17 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %x.patt: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = binding_pattern x
// CHECK:STDOUT: %x.param_patt: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_19.1 [symbolic = %T.loc4_19.2 (constants.%T)]
// CHECK:STDOUT: %int_32.loc4_44: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc4_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc4_53: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc4_53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c.d.e.loc4_56.1: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_19.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = value_param runtime_param0
// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.c.d.e.loc4_56.1 [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)] {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_19.1 [symbolic = %T.loc4_19.2 (constants.%T)]
// CHECK:STDOUT: %int_32.loc4_44: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc4_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc4_53: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc4_53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.c.d.e.loc4_56.1: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %CallBigStructParam.decl: %CallBigStructParam.type = fn_decl @CallBigStructParam [template = constants.%CallBigStructParam] {} {}
@@ -1110,13 +1118,15 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %x.patt: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = binding_pattern x
// CHECK:STDOUT: %x.param_patt: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.f.g.loc4_49.1: type = struct_type {.f: %T, .g: %i32} [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_21.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = value_param runtime_param0
// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.f.g.loc4_49.1 [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)] {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.f.g.loc4_49.1: type = struct_type {.f: %T, .g: %i32} [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %CallSmallStructParam.decl: %CallSmallStructParam.type = fn_decl @CallSmallStructParam [template = constants.%CallSmallStructParam] {} {}
@@ -1191,13 +1201,15 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %x.patt: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = binding_pattern x
// CHECK:STDOUT: %x.param_patt: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.i.different.loc4_61.1: type = struct_type {.i: %T, .different: %i32} [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = value_param runtime_param0
// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.i.different.loc4_61.1 [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)] {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.i.different.loc4_61.1: type = struct_type {.i: %T, .different: %i32} [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %CallWrongNameStructParam.decl: %CallWrongNameStructParam.type = fn_decl @CallWrongNameStructParam [template = constants.%CallWrongNameStructParam] {} {}
@@ -1271,13 +1283,15 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %x.patt: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = binding_pattern x
// CHECK:STDOUT: %x.param_patt: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_26.1 [symbolic = %T.loc4_26.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.first.second.loc4_63.1: type = struct_type {.first: %T, .second: %i32} [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_26.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_26.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = value_param runtime_param0
// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.first.second.loc4_63.1 [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)] {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_26.1 [symbolic = %T.loc4_26.2 (constants.%T)]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %struct_type.first.second.loc4_63.1: type = struct_type {.first: %T, .second: %i32} [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %CallWrongOrderStructParam.decl: %CallWrongOrderStructParam.type = fn_decl @CallWrongOrderStructParam [template = constants.%CallWrongOrderStructParam] {} {}
@@ -1350,13 +1364,13 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %return.patt: @ImplicitNotDeducible.%U.loc6_35.2 (%U) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @ImplicitNotDeducible.%U.loc6_35.2 (%U) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_25.1 [symbolic = %T.loc6_25.2 (constants.%T)]
// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc6_35.1 [symbolic = %U.loc6_35.2 (constants.%U)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc6_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_25.2 (constants.%T)]
// CHECK:STDOUT: %U.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %U.loc6_35.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc6_35.2 (constants.%U)]
// CHECK:STDOUT: %x.param: @ImplicitNotDeducible.%T.loc6_25.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_25.1 [symbolic = %T.loc6_25.2 (constants.%T)]
// CHECK:STDOUT: %x: @ImplicitNotDeducible.%T.loc6_25.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @ImplicitNotDeducible.%U.loc6_35.2 (%U) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @ImplicitNotDeducible.%U.loc6_35.2 (%U) = return_slot %return.param
@@ -1425,14 +1439,14 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %return.patt: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc4_50: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %x: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %y.param: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = value_param runtime_param1
// CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)]
// CHECK:STDOUT: %y: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = bind_name y, %y.param
// CHECK:STDOUT: %return.param: ref @ImplicitNotDeducible.%T.loc4_25.2 (%T) = out_param runtime_param2
// CHECK:STDOUT: %return: ref @ImplicitNotDeducible.%T.loc4_25.2 (%T) = return_slot %return.param
@@ -52,22 +52,26 @@ fn F(N:! i32, a: [i32; N]*);
// CHECK:STDOUT: %a.patt: <error> = binding_pattern a
// CHECK:STDOUT: %a.param_patt: <error> = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc14_6.1 [symbolic = %N.loc14_6.2 (constants.%N.2)]
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9]
// CHECK:STDOUT: %Convert.bound.loc14_24.1: <bound method> = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)]
// CHECK:STDOUT: %Convert.specific_fn.loc14_24.1: <specific function> = specific_function %Convert.bound.loc14_24.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)]
// CHECK:STDOUT: %int.convert_checked.loc14_24.1: init Core.IntLiteral = call %Convert.specific_fn.loc14_24.1(%N.ref) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)]
// CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)]
// CHECK:STDOUT: %.loc14_24.2: Core.IntLiteral = converted %N.ref, %.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)]
// CHECK:STDOUT: %array_type: type = array_type %.loc14_24.2, %i32 [template = <error>]
// CHECK:STDOUT: %ptr: type = ptr_type <error> [template = <error>]
// CHECK:STDOUT: %N.param: %i32 = value_param runtime_param<invalid>
// CHECK:STDOUT: %.loc14_10: type = splice_block %i32.loc14_10 [template = constants.%i32] {
// CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %N.loc14_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_6.2 (constants.%N.2)]
// CHECK:STDOUT: %a.param: <error> = value_param runtime_param0
// CHECK:STDOUT: %.loc14_26: type = splice_block %ptr [template = <error>] {
// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc14_6.1 [symbolic = %N.loc14_6.2 (constants.%N.2)]
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9]
// CHECK:STDOUT: %Convert.bound.loc14_24.1: <bound method> = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)]
// CHECK:STDOUT: %Convert.specific_fn.loc14_24.1: <specific function> = specific_function %Convert.bound.loc14_24.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)]
// CHECK:STDOUT: %int.convert_checked.loc14_24.1: init Core.IntLiteral = call %Convert.specific_fn.loc14_24.1(%N.ref) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)]
// CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)]
// CHECK:STDOUT: %.loc14_24.2: Core.IntLiteral = converted %N.ref, %.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)]
// CHECK:STDOUT: %array_type: type = array_type %.loc14_24.2, %i32 [template = <error>]
// CHECK:STDOUT: %ptr: type = ptr_type <error> [template = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: <error> = bind_name a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -92,11 +92,11 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: %return.patt: @Function.%T.loc4_13.2 (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @Function.%T.loc4_13.2 (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc4_32: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @Function.%T.loc4_13.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
// CHECK:STDOUT: %x: @Function.%T.loc4_13.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @Function.%T.loc4_13.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @Function.%T.loc4_13.2 (%T) = return_slot %return.param
@@ -109,11 +109,11 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: %return.patt: @CallGeneric.%T.loc8_16.2 (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @CallGeneric.%T.loc8_16.2 (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc8_35: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc8_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_16.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @CallGeneric.%T.loc8_16.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)]
// CHECK:STDOUT: %x: @CallGeneric.%T.loc8_16.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @CallGeneric.%T.loc8_16.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @CallGeneric.%T.loc8_16.2 (%T) = return_slot %return.param
@@ -126,13 +126,15 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: %return.patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)]
// CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc12_40: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc12_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_19.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_param runtime_param0
// CHECK:STDOUT: %.loc12: type = splice_block %ptr.loc12_33.1 [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] {
// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot %return.param
@@ -144,9 +146,9 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: %return.patt: %C = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %C.ref.loc18_26: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1
// CHECK:STDOUT: %return: ref %C = return_slot %return.param
@@ -309,11 +311,11 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: %return.patt: @Function.%T.loc4_13.2 (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @Function.%T.loc4_13.2 (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc4_32: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @Function.%T.loc4_13.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)]
// CHECK:STDOUT: %x: @Function.%T.loc4_13.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @Function.%T.loc4_13.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @Function.%T.loc4_13.2 (%T) = return_slot %return.param
@@ -326,11 +328,11 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: %return.patt: @CallGeneric.%T.loc8_16.2 (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @CallGeneric.%T.loc8_16.2 (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc8_35: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc8_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_16.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @CallGeneric.%T.loc8_16.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)]
// CHECK:STDOUT: %x: @CallGeneric.%T.loc8_16.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @CallGeneric.%T.loc8_16.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @CallGeneric.%T.loc8_16.2 (%T) = return_slot %return.param
@@ -343,13 +345,15 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: %return.patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)]
// CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc12_40: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc12_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_19.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_param runtime_param0
// CHECK:STDOUT: %.loc12: type = splice_block %ptr.loc12_33.1 [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] {
// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot %return.param
@@ -361,9 +365,9 @@ fn CallSpecific(x: C) -> C {
// CHECK:STDOUT: %return.patt: %C = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %C.ref.loc18_26: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x.param: %C = value_param runtime_param0
// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1
// CHECK:STDOUT: %return: ref %C = return_slot %return.param
@@ -54,19 +54,16 @@ fn F(T:! type, U:! type) {
// CHECK:STDOUT: %U.patt.loc11_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc11_16.2 (constants.%U.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %ptr.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr.loc12_11.2 (constants.%ptr)]
// CHECK:STDOUT: %require_complete.loc12: <witness> = require_complete_type @F.%ptr.loc12_11.2 (%ptr) [symbolic = %require_complete.loc12 (constants.%require_complete.1)]
// CHECK:STDOUT: %ptr: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr (constants.%ptr)]
// CHECK:STDOUT: %require_complete.loc12: <witness> = require_complete_type @F.%ptr (%ptr) [symbolic = %require_complete.loc12 (constants.%require_complete.1)]
// CHECK:STDOUT: %require_complete.loc16: <witness> = require_complete_type @F.%U.loc11_16.2 (%U) [symbolic = %require_complete.loc16 (constants.%require_complete.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc12_11.1: type = ptr_type %T [symbolic = %ptr.loc12_11.2 (constants.%ptr)]
// CHECK:STDOUT: %p.var: ref @F.%ptr.loc12_11.2 (%ptr) = var p
// CHECK:STDOUT: %p: ref @F.%ptr.loc12_11.2 (%ptr) = bind_name p, %p.var
// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc11_16.1 [symbolic = %U.loc11_16.2 (constants.%U)]
// CHECK:STDOUT: %p.ref: ref @F.%ptr.loc12_11.2 (%ptr) = name_ref p, %p
// CHECK:STDOUT: %.loc16_15: @F.%ptr.loc12_11.2 (%ptr) = bind_value %p.ref
// CHECK:STDOUT: %p.var: ref @F.%ptr (%ptr) = var p
// CHECK:STDOUT: %p: ref @F.%ptr (%ptr) = bind_name p, %p.var
// CHECK:STDOUT: %p.ref: ref @F.%ptr (%ptr) = name_ref p, %p
// CHECK:STDOUT: %.loc16_15: @F.%ptr (%ptr) = bind_value %p.ref
// CHECK:STDOUT: %.loc16_14: ref @F.%T.loc11_6.2 (%T) = deref %.loc16_15
// CHECK:STDOUT: %.loc16_16: @F.%U.loc11_16.2 (%U) = converted %.loc16_14, <error> [template = <error>]
// CHECK:STDOUT: %n: @F.%U.loc11_16.2 (%U) = bind_name n, <error>
@@ -37,14 +37,16 @@ fn F(T:! type, p: T**) -> T* {
// CHECK:STDOUT: %return.patt: @F.%ptr.loc11_20.2 (%ptr.1) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @F.%ptr.loc11_20.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc11_20.1: type = ptr_type %T [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)]
// CHECK:STDOUT: %ptr.loc11_21.1: type = ptr_type %ptr.1 [symbolic = %ptr.loc11_21.2 (constants.%ptr.2)]
// CHECK:STDOUT: %T.ref.loc11_27: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc11_28: type = ptr_type %T [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc11_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %p.param: @F.%ptr.loc11_21.2 (%ptr.2) = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %ptr.loc11_21.1 [symbolic = %ptr.loc11_21.2 (constants.%ptr.2)] {
// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc11_20.1: type = ptr_type %T [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)]
// CHECK:STDOUT: %ptr.loc11_21.1: type = ptr_type %ptr.1 [symbolic = %ptr.loc11_21.2 (constants.%ptr.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: @F.%ptr.loc11_21.2 (%ptr.2) = bind_name p, %p.param
// CHECK:STDOUT: %return.param: ref @F.%ptr.loc11_20.2 (%ptr.1) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @F.%ptr.loc11_20.2 (%ptr.1) = return_slot %return.param
@@ -43,19 +43,16 @@ fn F(T:! type) {
// CHECK:STDOUT: %T.patt.loc11_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %ptr.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr.loc12_11.2 (constants.%ptr)]
// CHECK:STDOUT: %require_complete.loc12: <witness> = require_complete_type @F.%ptr.loc12_11.2 (%ptr) [symbolic = %require_complete.loc12 (constants.%require_complete.1)]
// CHECK:STDOUT: %ptr: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr (constants.%ptr)]
// CHECK:STDOUT: %require_complete.loc12: <witness> = require_complete_type @F.%ptr (%ptr) [symbolic = %require_complete.loc12 (constants.%require_complete.1)]
// CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type @F.%T.loc11_6.2 (%T) [symbolic = %require_complete.loc13 (constants.%require_complete.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%T.param_patt: type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %ptr.loc12_11.1: type = ptr_type %T [symbolic = %ptr.loc12_11.2 (constants.%ptr)]
// CHECK:STDOUT: %p.var: ref @F.%ptr.loc12_11.2 (%ptr) = var p
// CHECK:STDOUT: %p: ref @F.%ptr.loc12_11.2 (%ptr) = bind_name p, %p.var
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %p.ref: ref @F.%ptr.loc12_11.2 (%ptr) = name_ref p, %p
// CHECK:STDOUT: %.loc13_15: @F.%ptr.loc12_11.2 (%ptr) = bind_value %p.ref
// CHECK:STDOUT: %p.var: ref @F.%ptr (%ptr) = var p
// CHECK:STDOUT: %p: ref @F.%ptr (%ptr) = bind_name p, %p.var
// CHECK:STDOUT: %p.ref: ref @F.%ptr (%ptr) = name_ref p, %p
// CHECK:STDOUT: %.loc13_15: @F.%ptr (%ptr) = bind_value %p.ref
// CHECK:STDOUT: %.loc13_14.1: ref @F.%T.loc11_6.2 (%T) = deref %.loc13_15
// CHECK:STDOUT: %.loc13_14.2: @F.%T.loc11_6.2 (%T) = bind_value %.loc13_14.1
// CHECK:STDOUT: %n: @F.%T.loc11_6.2 (%T) = bind_name n, %.loc13_14.2
@@ -35,11 +35,11 @@ fn F(T:! type, n: T) -> T {
// CHECK:STDOUT: %return.patt: @F.%T.loc11_6.2 (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @F.%T.loc11_6.2 (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc11_25: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc11_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %n.param: @F.%T.loc11_6.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %n: @F.%T.loc11_6.2 (%T) = bind_name n, %n.param
// CHECK:STDOUT: %return.param: ref @F.%T.loc11_6.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @F.%T.loc11_6.2 (%T) = return_slot %return.param
@@ -55,7 +55,6 @@ fn F(T:! type, n: T) -> T {
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%T.param_patt: type, %n.param_patt: @F.%T.loc11_6.2 (%T)) -> @F.%T.loc11_6.2 (%T) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %n.ref: @F.%T.loc11_6.2 (%T) = name_ref n, %n
// CHECK:STDOUT: %m: @F.%T.loc11_6.2 (%T) = bind_name m, %n.ref
// CHECK:STDOUT: %m.ref: @F.%T.loc11_6.2 (%T) = name_ref m, %m
+12 -17
View File
@@ -43,8 +43,6 @@ fn CallNegative() {
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
// CHECK:STDOUT: %ErrorIfNIsZero.type: type = fn_type @ErrorIfNIsZero [template]
// CHECK:STDOUT: %ErrorIfNIsZero: %ErrorIfNIsZero.type = struct_value () [template]
// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [template]
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [template]
// CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic]
// CHECK:STDOUT: %require_complete.2: <witness> = require_complete_type %Int [symbolic]
// CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [template]
@@ -63,7 +61,6 @@ fn CallNegative() {
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [template = constants.%IntLiteral]
// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types/int, Int, loaded [template = constants.%Int.generic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -77,12 +74,14 @@ fn CallNegative() {
// CHECK:STDOUT: %N.patt.loc4_19.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)]
// CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc4_19.1, runtime_param<invalid> [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Core.ref.loc4: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc4_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc4_39.2: type = converted %int_literal.make_type, %.loc4_39.1 [template = Core.IntLiteral]
// CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param<invalid>
// CHECK:STDOUT: %.loc4_39.3: type = splice_block %.loc4_39.2 [template = Core.IntLiteral] {
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc4_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
// CHECK:STDOUT: %.loc4_39.2: type = converted %int_literal.make_type, %.loc4_39.1 [template = Core.IntLiteral]
// CHECK:STDOUT: }
// CHECK:STDOUT: %N.loc4_19.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_19.2 (constants.%N)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %CallNegative.decl: %CallNegative.type = fn_decl @CallNegative [template = constants.%CallNegative] {} {}
@@ -93,17 +92,13 @@ fn CallNegative() {
// CHECK:STDOUT: %N.patt.loc4_19.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Int.loc15_20.2: type = class_type @Int, @Int(%N.loc4_19.2) [symbolic = %Int.loc15_20.2 (constants.%Int)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) [symbolic = %require_complete (constants.%require_complete.2)]
// CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N.loc4_19.2) [symbolic = %Int (constants.%Int)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type @ErrorIfNIsZero.%Int (%Int) [symbolic = %require_complete (constants.%require_complete.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Core.ref.loc15: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int.generic]
// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc4_19.1 [symbolic = %N.loc4_19.2 (constants.%N)]
// CHECK:STDOUT: %Int.loc15_20.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc15_20.2 (constants.%Int)]
// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = var v
// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = bind_name v, %v.var
// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%Int (%Int) = var v
// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int (%Int) = bind_name v, %v.var
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -127,7 +122,7 @@ fn CallNegative() {
// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%int_0
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Int.loc15_20.2 => constants.%i0
// CHECK:STDOUT: %Int => constants.%i0
// CHECK:STDOUT: %require_complete => constants.%complete_type.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -116,10 +116,6 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template = constants.%int_100]
// CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [template = constants.%array_type]
// CHECK:STDOUT: %.loc15: %C.elem = field_decl arr, element0 [template]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.arr.1 [template = constants.%complete_type.4]
// CHECK:STDOUT:
@@ -152,21 +148,17 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @G() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int_32.loc18_10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc18_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %a.var: ref %i32 = var a
// CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var
// CHECK:STDOUT: %Wrap.ref.loc18: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic]
// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
// CHECK:STDOUT: %Wrap.loc18: type = class_type @Wrap, @Wrap(constants.%i32) [template = constants.%Wrap.2]
// CHECK:STDOUT: %.loc18: %Make.type.2 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%i32) [template = constants.%Make.2]
// CHECK:STDOUT: %Make.ref.loc18: %Make.type.2 = name_ref Make, %.loc18 [template = constants.%Make.2]
// CHECK:STDOUT: %Make.specific_fn.loc18: <specific function> = specific_function %Make.ref.loc18, @Make(constants.%i32) [template = constants.%Make.specific_fn.2]
// CHECK:STDOUT: %Make.call.loc18: init %i32 = call %Make.specific_fn.loc18()
// CHECK:STDOUT: assign %a.var, %Make.call.loc18
// CHECK:STDOUT: %.loc19_11.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc19_11.2: type = converted %.loc19_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b
// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var
// CHECK:STDOUT: %Wrap.ref.loc19: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic]
@@ -178,11 +170,10 @@ fn G() {
// CHECK:STDOUT: %Make.specific_fn.loc19: <specific function> = specific_function %Make.ref.loc19, @Make(constants.%empty_tuple.type) [template = constants.%Make.specific_fn.3]
// CHECK:STDOUT: %Make.call.loc19: init %empty_tuple.type = call %Make.specific_fn.loc19()
// CHECK:STDOUT: assign %b.var, %Make.call.loc19
// CHECK:STDOUT: %C.ref.loc20_10: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %c.var: ref %C = var c
// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
// CHECK:STDOUT: %Wrap.ref.loc20: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic]
// CHECK:STDOUT: %C.ref.loc20_19: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %Wrap.loc20: type = class_type @Wrap, @Wrap(constants.%C) [template = constants.%Wrap.4]
// CHECK:STDOUT: %.loc20_21: %Make.type.4 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%C) [template = constants.%Make.4]
// CHECK:STDOUT: %Make.ref.loc20: %Make.type.4 = name_ref Make, %.loc20_21 [template = constants.%Make.4]
+4 -4
View File
@@ -99,11 +99,11 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %return.patt: @Defined.%T.loc4_12.2 (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @Defined.%T.loc4_12.2 (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_12.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_12.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @Defined.%T.loc4_12.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)]
// CHECK:STDOUT: %x: @Defined.%T.loc4_12.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @Defined.%T.loc4_12.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param
@@ -214,11 +214,11 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %return.patt: %T = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %T = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)]
// CHECK:STDOUT: %T.param.loc4: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_12.1: type = bind_symbolic_name T, 0, %T.param.loc4 [symbolic = %T.loc4_12.2 (constants.%T)]
// CHECK:STDOUT: %x.param.loc4: @Defined.%T.loc4_12.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)]
// CHECK:STDOUT: %x.loc4: @Defined.%T.loc4_12.2 (%T) = bind_name x, %x.param.loc4
// CHECK:STDOUT: %return.param.loc4: ref @Defined.%T.loc4_12.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %return.loc4: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param.loc4
@@ -240,11 +240,11 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %return.patt: %T = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %T = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = constants.%T]
// CHECK:STDOUT: %T.ref.loc10_31: type = name_ref T, %T.loc10 [symbolic = constants.%T]
// CHECK:STDOUT: %T.param.loc10: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0, %T.param.loc10 [symbolic = constants.%T]
// CHECK:STDOUT: %x.param.loc10: %T = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = constants.%T]
// CHECK:STDOUT: %x.loc10: %T = bind_name x, %x.param.loc10
// CHECK:STDOUT: %return.param.loc10: ref %T = out_param runtime_param1
// CHECK:STDOUT: %return.loc10: ref %T = return_slot %return.param.loc10
@@ -343,11 +343,11 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %return.patt: @Undefined.%T.loc4_14.2 (%T) = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: @Undefined.%T.loc4_14.2 (%T) = out_param_pattern %return.patt, runtime_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc4_27: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc4_33: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T)]
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
// CHECK:STDOUT: %T.loc4_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_14.2 (constants.%T)]
// CHECK:STDOUT: %x.param: @Undefined.%T.loc4_14.2 (%T) = value_param runtime_param0
// CHECK:STDOUT: %T.ref.loc4_27: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T)]
// CHECK:STDOUT: %x: @Undefined.%T.loc4_14.2 (%T) = bind_name x, %x.param
// CHECK:STDOUT: %return.param: ref @Undefined.%T.loc4_14.2 (%T) = out_param runtime_param1
// CHECK:STDOUT: %return: ref @Undefined.%T.loc4_14.2 (%T) = return_slot %return.param