|
|
@@ -106,23 +106,30 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %.3: i32 = int_value 3 [template]
|
|
|
-// CHECK:STDOUT: %.4: type = array_type %.3, %T [symbolic]
|
|
|
+// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
|
+// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
|
|
|
+// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %.27: <witness> = interface_witness (%Convert.15) [template]
|
|
|
+// CHECK:STDOUT: %.28: <bound method> = bound_method %.3, %Convert.15 [template]
|
|
|
+// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.30: type = array_type %.29, %T [symbolic]
|
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.6: i32 = int_value 0 [template]
|
|
|
+// CHECK:STDOUT: %.32: i32 = int_value 0 [template]
|
|
|
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
|
|
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.8: type = array_type %.3, %C [template]
|
|
|
+// CHECK:STDOUT: %.34: type = array_type %.29, %C [template]
|
|
|
// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template]
|
|
|
// CHECK:STDOUT: %struct: %C = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.10: i32 = int_value 1 [template]
|
|
|
-// CHECK:STDOUT: %.11: i32 = int_value 2 [template]
|
|
|
-// CHECK:STDOUT: %array: %.8 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
-// CHECK:STDOUT: %.12: <specific function> = specific_function %F, @F(%C) [template]
|
|
|
+// CHECK:STDOUT: %.36: i32 = int_value 1 [template]
|
|
|
+// CHECK:STDOUT: %.37: i32 = int_value 2 [template]
|
|
|
+// CHECK:STDOUT: %array: %.34 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
+// CHECK:STDOUT: %.38: <specific function> = specific_function %F, @F(%C) [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
+// CHECK:STDOUT: .ImplicitAs = %import_ref.1
|
|
|
// CHECK:STDOUT: import Core//prelude
|
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -140,19 +147,24 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
|
|
// CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)]
|
|
|
// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param<invalid> [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %a.patt: @F.%.loc6_24.2 (%.4) = binding_pattern a
|
|
|
-// CHECK:STDOUT: %a.param_patt: @F.%.loc6_24.2 (%.4) = value_param_pattern %a.patt, runtime_param0
|
|
|
+// CHECK:STDOUT: %a.patt: @F.%.loc6_24.2 (%.30) = binding_pattern a
|
|
|
+// CHECK:STDOUT: %a.param_patt: @F.%.loc6_24.2 (%.30) = value_param_pattern %a.patt, runtime_param0
|
|
|
// CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern
|
|
|
// CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %T.ref.loc6_20: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %.loc6_23: i32 = int_value 3 [template = constants.%.3]
|
|
|
-// CHECK:STDOUT: %.loc6_24.1: type = array_type %.loc6_23, %T [symbolic = %.loc6_24.2 (constants.%.4)]
|
|
|
+// CHECK:STDOUT: %.loc6_23.1: i32 = int_value 3 [template = constants.%.3]
|
|
|
+// CHECK:STDOUT: %.loc6_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc6_23.3: <bound method> = bound_method %.loc6_23.1, %.loc6_23.2 [template = constants.%.28]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.loc6_23.3(%.loc6_23.1) [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc6_23.4: Core.IntLiteral = value_of_initializer %int.convert_checked [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc6_23.5: Core.IntLiteral = converted %.loc6_23.1, %.loc6_23.4 [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc6_24.1: type = array_type %.loc6_23.5, %T [symbolic = %.loc6_24.2 (constants.%.30)]
|
|
|
// CHECK:STDOUT: %T.ref.loc6_30: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %a.param: @F.%.loc6_24.2 (%.4) = value_param runtime_param0
|
|
|
-// CHECK:STDOUT: %a: @F.%.loc6_24.2 (%.4) = bind_name a, %a.param
|
|
|
+// CHECK:STDOUT: %a.param: @F.%.loc6_24.2 (%.30) = value_param runtime_param0
|
|
|
+// CHECK:STDOUT: %a: @F.%.loc6_24.2 (%.30) = bind_name a, %a.param
|
|
|
// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1
|
|
|
// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -176,15 +188,15 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) {
|
|
|
// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %.loc6_24.2: type = array_type constants.%.3, @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_24.2 (constants.%.4)]
|
|
|
+// CHECK:STDOUT: %.loc6_24.2: type = array_type constants.%.29, @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_24.2 (constants.%.30)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%.loc6_24.2 (%.4)) -> @F.%T.loc6_6.2 (%T) {
|
|
|
+// CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%.loc6_24.2 (%.30)) -> @F.%T.loc6_6.2 (%T) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.4) = name_ref a, %a
|
|
|
-// CHECK:STDOUT: %.loc6_43: i32 = int_value 0 [template = constants.%.6]
|
|
|
-// CHECK:STDOUT: %.loc6_44.1: ref @F.%.loc6_24.2 (%.4) = value_as_ref %a.ref
|
|
|
+// CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.30) = name_ref a, %a
|
|
|
+// CHECK:STDOUT: %.loc6_43: i32 = int_value 0 [template = constants.%.32]
|
|
|
+// CHECK:STDOUT: %.loc6_44.1: ref @F.%.loc6_24.2 (%.30) = value_as_ref %a.ref
|
|
|
// CHECK:STDOUT: %.loc6_44.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.1, %.loc6_43
|
|
|
// CHECK:STDOUT: %.loc6_44.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.2
|
|
|
// CHECK:STDOUT: return %.loc6_44.3
|
|
|
@@ -194,34 +206,39 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: fn @G() -> %return: %C {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %.loc9_14: i32 = int_value 3 [template = constants.%.3]
|
|
|
-// CHECK:STDOUT: %.loc9_15: type = array_type %.loc9_14, %C [template = constants.%.8]
|
|
|
-// CHECK:STDOUT: %a.var: ref %.8 = var a
|
|
|
-// CHECK:STDOUT: %a: ref %.8 = bind_name a, %a.var
|
|
|
+// CHECK:STDOUT: %.loc9_14.1: i32 = int_value 3 [template = constants.%.3]
|
|
|
+// CHECK:STDOUT: %.loc9_14.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc9_14.3: <bound method> = bound_method %.loc9_14.1, %.loc9_14.2 [template = constants.%.28]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.loc9_14.3(%.loc9_14.1) [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc9_14.4: Core.IntLiteral = value_of_initializer %int.convert_checked [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc9_14.5: Core.IntLiteral = converted %.loc9_14.1, %.loc9_14.4 [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc9_15: type = array_type %.loc9_14.5, %C [template = constants.%.34]
|
|
|
+// CHECK:STDOUT: %a.var: ref %.34 = var a
|
|
|
+// CHECK:STDOUT: %a: ref %.34 = bind_name a, %a.var
|
|
|
// CHECK:STDOUT: %.loc9_21.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc9_25.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc9_29.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc9_30.1: %tuple.type = tuple_literal (%.loc9_21.1, %.loc9_25.1, %.loc9_29.1)
|
|
|
-// CHECK:STDOUT: %.loc9_30.2: i32 = int_value 0 [template = constants.%.6]
|
|
|
+// CHECK:STDOUT: %.loc9_30.2: i32 = int_value 0 [template = constants.%.32]
|
|
|
// CHECK:STDOUT: %.loc9_30.3: ref %C = array_index %a.var, %.loc9_30.2
|
|
|
// CHECK:STDOUT: %.loc9_21.2: init %C = class_init (), %.loc9_30.3 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc9_30.4: init %C = converted %.loc9_21.1, %.loc9_21.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc9_30.5: i32 = int_value 1 [template = constants.%.10]
|
|
|
+// CHECK:STDOUT: %.loc9_30.5: i32 = int_value 1 [template = constants.%.36]
|
|
|
// CHECK:STDOUT: %.loc9_30.6: ref %C = array_index %a.var, %.loc9_30.5
|
|
|
// CHECK:STDOUT: %.loc9_25.2: init %C = class_init (), %.loc9_30.6 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc9_30.7: init %C = converted %.loc9_25.1, %.loc9_25.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc9_30.8: i32 = int_value 2 [template = constants.%.11]
|
|
|
+// CHECK:STDOUT: %.loc9_30.8: i32 = int_value 2 [template = constants.%.37]
|
|
|
// CHECK:STDOUT: %.loc9_30.9: ref %C = array_index %a.var, %.loc9_30.8
|
|
|
// CHECK:STDOUT: %.loc9_29.2: init %C = class_init (), %.loc9_30.9 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc9_30.10: init %C = converted %.loc9_29.1, %.loc9_29.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc9_30.11: init %.8 = array_init (%.loc9_30.4, %.loc9_30.7, %.loc9_30.10) to %a.var [template = constants.%array]
|
|
|
-// CHECK:STDOUT: %.loc9_31: init %.8 = converted %.loc9_30.1, %.loc9_30.11 [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc9_30.11: init %.34 = array_init (%.loc9_30.4, %.loc9_30.7, %.loc9_30.10) to %a.var [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc9_31: init %.34 = converted %.loc9_30.1, %.loc9_30.11 [template = constants.%array]
|
|
|
// CHECK:STDOUT: assign %a.var, %.loc9_31
|
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
|
|
-// CHECK:STDOUT: %a.ref: ref %.8 = name_ref a, %a
|
|
|
-// CHECK:STDOUT: %.loc10_10: <specific function> = specific_function %F.ref, @F(constants.%C) [template = constants.%.12]
|
|
|
+// CHECK:STDOUT: %a.ref: ref %.34 = name_ref a, %a
|
|
|
+// CHECK:STDOUT: %.loc10_10: <specific function> = specific_function %F.ref, @F(constants.%C) [template = constants.%.38]
|
|
|
// CHECK:STDOUT: %.loc8_8.2: ref %C = splice_block %return {}
|
|
|
-// CHECK:STDOUT: %.loc10_12: %.8 = bind_value %a.ref
|
|
|
+// CHECK:STDOUT: %.loc10_12: %.34 = bind_value %a.ref
|
|
|
// CHECK:STDOUT: %F.call: init %C = call %.loc10_10(%.loc10_12) to %.loc8_8.2
|
|
|
// CHECK:STDOUT: return %F.call to %return
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -229,13 +246,13 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: specific @F(constants.%T) {
|
|
|
// CHECK:STDOUT: %T.loc6_6.2 => constants.%T
|
|
|
// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %.loc6_24.2 => constants.%.4
|
|
|
+// CHECK:STDOUT: %.loc6_24.2 => constants.%.30
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @F(constants.%C) {
|
|
|
// CHECK:STDOUT: %T.loc6_6.2 => constants.%C
|
|
|
// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C
|
|
|
-// CHECK:STDOUT: %.loc6_24.2 => constants.%.8
|
|
|
+// CHECK:STDOUT: %.loc6_24.2 => constants.%.34
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -248,25 +265,34 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
|
|
|
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
|
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %N.1: i32 = bind_symbolic_name N, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %N.patt.1: i32 = symbolic_binding_pattern N, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
|
+// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
|
|
|
+// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %.26: <witness> = interface_witness (%Convert.15) [template]
|
|
|
+// CHECK:STDOUT: %.27: <bound method> = bound_method %N.1, %Convert.15 [symbolic]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic]
|
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
|
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
|
|
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.4: i32 = int_value 3 [template]
|
|
|
-// CHECK:STDOUT: %.5: type = array_type %.4, %C [template]
|
|
|
+// CHECK:STDOUT: %.29: i32 = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.30: <bound method> = bound_method %.29, %Convert.15 [template]
|
|
|
+// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.32: type = array_type %.31, %C [template]
|
|
|
// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template]
|
|
|
-// CHECK:STDOUT: %.7: i32 = int_value 0 [template]
|
|
|
+// CHECK:STDOUT: %.34: i32 = int_value 0 [template]
|
|
|
// CHECK:STDOUT: %struct: %C = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.8: i32 = int_value 1 [template]
|
|
|
-// CHECK:STDOUT: %.9: i32 = int_value 2 [template]
|
|
|
-// CHECK:STDOUT: %array: %.5 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
+// CHECK:STDOUT: %.35: i32 = int_value 1 [template]
|
|
|
+// CHECK:STDOUT: %.36: i32 = int_value 2 [template]
|
|
|
+// CHECK:STDOUT: %array: %.32 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
-// CHECK:STDOUT: .Int32 = %import_ref
|
|
|
+// CHECK:STDOUT: .Int32 = %import_ref.1
|
|
|
+// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
|
|
// CHECK:STDOUT: import Core//prelude
|
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -282,8 +308,8 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
|
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
|
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_6.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt)]
|
|
|
-// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc10_6.1, runtime_param<invalid> [symbolic = %N.patt.loc10_6.2 (constants.%N.patt)]
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_6.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)]
|
|
|
+// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc10_6.1, runtime_param<invalid> [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)]
|
|
|
// CHECK:STDOUT: %a.patt: <error> = binding_pattern a
|
|
|
// CHECK:STDOUT: %a.param_patt: <error> = value_param_pattern %a.patt, runtime_param0
|
|
|
// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern
|
|
|
@@ -293,13 +319,18 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_32.loc10_10 [template = i32]
|
|
|
// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_32.loc10_10, %.loc10_10.1 [template = i32]
|
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %N.ref.loc10_22: i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N)]
|
|
|
-// CHECK:STDOUT: %.loc10_23: type = array_type %N.ref.loc10_22, %C [template = <error>]
|
|
|
+// CHECK:STDOUT: %N.ref.loc10_22: i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)]
|
|
|
+// CHECK:STDOUT: %.loc10_22.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc10_22.2: <bound method> = bound_method %N.ref.loc10_22, %.loc10_22.1 [symbolic = %.loc10_22.5 (constants.%.27)]
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %.loc10_22.2(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_22.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_22.4: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.3 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_23: type = array_type %.loc10_22.4, %C [template = <error>]
|
|
|
// CHECK:STDOUT: %int.make_type_32.loc10_29: init type = call constants.%Int32() [template = i32]
|
|
|
// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_32.loc10_29 [template = i32]
|
|
|
// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_32.loc10_29, %.loc10_29.1 [template = i32]
|
|
|
// CHECK:STDOUT: %N.param: i32 = value_param runtime_param<invalid>
|
|
|
-// CHECK:STDOUT: %N.loc10_6.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N)]
|
|
|
+// CHECK:STDOUT: %N.loc10_6.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.1)]
|
|
|
// CHECK:STDOUT: %a.param: <error> = value_param runtime_param0
|
|
|
// CHECK:STDOUT: %a: <error> = bind_name a, %a.param
|
|
|
// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1
|
|
|
@@ -323,14 +354,16 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: generic fn @F(%N.loc10_6.1: i32) {
|
|
|
-// CHECK:STDOUT: %N.loc10_6.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N)]
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_6.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt)]
|
|
|
+// CHECK:STDOUT: %N.loc10_6.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.1)]
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_6.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)]
|
|
|
+// CHECK:STDOUT: %.loc10_22.5: <bound method> = bound_method %N.loc10_6.2, constants.%Convert.15 [symbolic = %.loc10_22.5 (constants.%.27)]
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %.loc10_22.5(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn[%N.param_patt: i32](%a.param_patt: <error>) -> i32 {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %N.ref.loc10_42: i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N)]
|
|
|
+// CHECK:STDOUT: %N.ref.loc10_42: i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)]
|
|
|
// CHECK:STDOUT: return %N.ref.loc10_42
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -338,37 +371,44 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: fn @G() -> %return: %C {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.4]
|
|
|
-// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.5]
|
|
|
-// CHECK:STDOUT: %a.var: ref %.5 = var a
|
|
|
-// CHECK:STDOUT: %a: ref %.5 = bind_name a, %a.var
|
|
|
+// CHECK:STDOUT: %.loc13_14.1: i32 = int_value 3 [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc13_14.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc13_14.3: <bound method> = bound_method %.loc13_14.1, %.loc13_14.2 [template = constants.%.30]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.loc13_14.3(%.loc13_14.1) [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_14.4: Core.IntLiteral = value_of_initializer %int.convert_checked [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_14.5: Core.IntLiteral = converted %.loc13_14.1, %.loc13_14.4 [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14.5, %C [template = constants.%.32]
|
|
|
+// CHECK:STDOUT: %a.var: ref %.32 = var a
|
|
|
+// CHECK:STDOUT: %a: ref %.32 = bind_name a, %a.var
|
|
|
// CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1)
|
|
|
-// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.7]
|
|
|
+// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.34]
|
|
|
// CHECK:STDOUT: %.loc13_30.3: ref %C = array_index %a.var, %.loc13_30.2
|
|
|
// CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.3 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.4: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.8]
|
|
|
+// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.35]
|
|
|
// CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %.loc13_30.5
|
|
|
// CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.6 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.9]
|
|
|
+// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.36]
|
|
|
// CHECK:STDOUT: %.loc13_30.9: ref %C = array_index %a.var, %.loc13_30.8
|
|
|
// CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.9 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.10: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.11: init %.5 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array]
|
|
|
-// CHECK:STDOUT: %.loc13_31: init %.5 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc13_30.11: init %.32 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc13_31: init %.32 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array]
|
|
|
// CHECK:STDOUT: assign %a.var, %.loc13_31
|
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
|
|
-// CHECK:STDOUT: %a.ref: ref %.5 = name_ref a, %a
|
|
|
+// CHECK:STDOUT: %a.ref: ref %.32 = name_ref a, %a
|
|
|
// CHECK:STDOUT: return <error> to %return
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @F(constants.%N) {
|
|
|
-// CHECK:STDOUT: %N.loc10_6.2 => constants.%N
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N
|
|
|
+// CHECK:STDOUT: specific @F(constants.%N.1) {
|
|
|
+// CHECK:STDOUT: %N.loc10_6.2 => constants.%N.1
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.1
|
|
|
+// CHECK:STDOUT: %.loc10_22.5 => constants.%.27
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_22.2 => constants.%int.convert_checked
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- fail_todo_type_and_bound.carbon
|
|
|
@@ -381,25 +421,34 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
|
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 1 [symbolic]
|
|
|
-// CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %N.1: i32 = bind_symbolic_name N, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %N.patt.1: i32 = symbolic_binding_pattern N, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
|
+// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
|
|
|
+// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %.26: <witness> = interface_witness (%Convert.15) [template]
|
|
|
+// CHECK:STDOUT: %.27: <bound method> = bound_method %N.1, %Convert.15 [symbolic]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic]
|
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
|
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
|
|
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.4: i32 = int_value 3 [template]
|
|
|
-// CHECK:STDOUT: %.5: type = array_type %.4, %C [template]
|
|
|
+// CHECK:STDOUT: %.29: i32 = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.30: <bound method> = bound_method %.29, %Convert.15 [template]
|
|
|
+// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.32: type = array_type %.31, %C [template]
|
|
|
// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template]
|
|
|
-// CHECK:STDOUT: %.7: i32 = int_value 0 [template]
|
|
|
+// CHECK:STDOUT: %.34: i32 = int_value 0 [template]
|
|
|
// CHECK:STDOUT: %struct: %C = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.8: i32 = int_value 1 [template]
|
|
|
-// CHECK:STDOUT: %.9: i32 = int_value 2 [template]
|
|
|
-// CHECK:STDOUT: %array: %.5 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
+// CHECK:STDOUT: %.35: i32 = int_value 1 [template]
|
|
|
+// CHECK:STDOUT: %.36: i32 = int_value 2 [template]
|
|
|
+// CHECK:STDOUT: %array: %.32 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
-// CHECK:STDOUT: .Int32 = %import_ref
|
|
|
+// CHECK:STDOUT: .Int32 = %import_ref.1
|
|
|
+// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
|
|
// CHECK:STDOUT: import Core//prelude
|
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -417,8 +466,8 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
|
|
// CHECK:STDOUT: %T.patt.loc10_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)]
|
|
|
// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc10_6.1, runtime_param<invalid> [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_16.1: i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt)]
|
|
|
-// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc10_16.1, runtime_param<invalid> [symbolic = %N.patt.loc10_16.2 (constants.%N.patt)]
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_16.1: i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.1)]
|
|
|
+// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc10_16.1, runtime_param<invalid> [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.1)]
|
|
|
// CHECK:STDOUT: %a.patt: <error> = binding_pattern a
|
|
|
// CHECK:STDOUT: %a.param_patt: <error> = value_param_pattern %a.patt, runtime_param0
|
|
|
// CHECK:STDOUT: %return.patt: @F.%T.loc10_6.2 (%T) = return_slot_pattern
|
|
|
@@ -428,13 +477,18 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %.loc10_20.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
|
|
// CHECK:STDOUT: %.loc10_20.2: type = converted %int.make_type_32, %.loc10_20.1 [template = i32]
|
|
|
// CHECK:STDOUT: %T.ref.loc10_29: type = name_ref T, %T.loc10_6.1 [symbolic = %T.loc10_6.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %N.ref: i32 = name_ref N, %N.loc10_16.1 [symbolic = %N.loc10_16.2 (constants.%N)]
|
|
|
-// CHECK:STDOUT: %.loc10_33: type = array_type %N.ref, %T [template = <error>]
|
|
|
+// CHECK:STDOUT: %N.ref: i32 = name_ref N, %N.loc10_16.1 [symbolic = %N.loc10_16.2 (constants.%N.1)]
|
|
|
+// CHECK:STDOUT: %.loc10_32.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc10_32.2: <bound method> = bound_method %N.ref, %.loc10_32.1 [symbolic = %.loc10_32.5 (constants.%.27)]
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_32.1: init Core.IntLiteral = call %.loc10_32.2(%N.ref) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_32.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_32.4: Core.IntLiteral = converted %N.ref, %.loc10_32.3 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_33: type = array_type %.loc10_32.4, %T [template = <error>]
|
|
|
// CHECK:STDOUT: %T.ref.loc10_39: type = name_ref T, %T.loc10_6.1 [symbolic = %T.loc10_6.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
// CHECK:STDOUT: %T.loc10_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_6.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: %N.param: i32 = value_param runtime_param<invalid>
|
|
|
-// CHECK:STDOUT: %N.loc10_16.1: i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc10_16.2 (constants.%N)]
|
|
|
+// CHECK:STDOUT: %N.loc10_16.1: i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc10_16.2 (constants.%N.1)]
|
|
|
// CHECK:STDOUT: %a.param: <error> = value_param runtime_param0
|
|
|
// CHECK:STDOUT: %a: <error> = bind_name a, %a.param
|
|
|
// CHECK:STDOUT: %return.param: ref @F.%T.loc10_6.2 (%T) = out_param runtime_param1
|
|
|
@@ -460,8 +514,10 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: generic fn @F(%T.loc10_6.1: type, %N.loc10_16.1: i32) {
|
|
|
// CHECK:STDOUT: %T.loc10_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_6.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.patt.loc10_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %N.loc10_16.2: i32 = bind_symbolic_name N, 1 [symbolic = %N.loc10_16.2 (constants.%N)]
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_16.2: i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt)]
|
|
|
+// CHECK:STDOUT: %N.loc10_16.2: i32 = bind_symbolic_name N, 1 [symbolic = %N.loc10_16.2 (constants.%N.1)]
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_16.2: i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.1)]
|
|
|
+// CHECK:STDOUT: %.loc10_32.5: <bound method> = bound_method %N.loc10_16.2, constants.%Convert.15 [symbolic = %.loc10_32.5 (constants.%.27)]
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_32.2: init Core.IntLiteral = call %.loc10_32.5(%N.loc10_16.2) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn[%T.param_patt: type, %N.param_patt: i32](%a.param_patt: <error>) -> @F.%T.loc10_6.2 (%T);
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -469,39 +525,46 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: fn @G() -> %return: %C {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.4]
|
|
|
-// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.5]
|
|
|
-// CHECK:STDOUT: %a.var: ref %.5 = var a
|
|
|
-// CHECK:STDOUT: %a: ref %.5 = bind_name a, %a.var
|
|
|
+// CHECK:STDOUT: %.loc13_14.1: i32 = int_value 3 [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc13_14.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc13_14.3: <bound method> = bound_method %.loc13_14.1, %.loc13_14.2 [template = constants.%.30]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.loc13_14.3(%.loc13_14.1) [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_14.4: Core.IntLiteral = value_of_initializer %int.convert_checked [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_14.5: Core.IntLiteral = converted %.loc13_14.1, %.loc13_14.4 [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14.5, %C [template = constants.%.32]
|
|
|
+// CHECK:STDOUT: %a.var: ref %.32 = var a
|
|
|
+// CHECK:STDOUT: %a: ref %.32 = bind_name a, %a.var
|
|
|
// CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1)
|
|
|
-// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.7]
|
|
|
+// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.34]
|
|
|
// CHECK:STDOUT: %.loc13_30.3: ref %C = array_index %a.var, %.loc13_30.2
|
|
|
// CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.3 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.4: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.8]
|
|
|
+// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.35]
|
|
|
// CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %.loc13_30.5
|
|
|
// CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.6 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.9]
|
|
|
+// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.36]
|
|
|
// CHECK:STDOUT: %.loc13_30.9: ref %C = array_index %a.var, %.loc13_30.8
|
|
|
// CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.9 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.10: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.11: init %.5 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array]
|
|
|
-// CHECK:STDOUT: %.loc13_31: init %.5 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc13_30.11: init %.32 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc13_31: init %.32 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array]
|
|
|
// CHECK:STDOUT: assign %a.var, %.loc13_31
|
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
|
|
-// CHECK:STDOUT: %a.ref: ref %.5 = name_ref a, %a
|
|
|
+// CHECK:STDOUT: %a.ref: ref %.32 = name_ref a, %a
|
|
|
// CHECK:STDOUT: return <error> to %return
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @F(constants.%T, constants.%N) {
|
|
|
+// CHECK:STDOUT: specific @F(constants.%T, constants.%N.1) {
|
|
|
// CHECK:STDOUT: %T.loc10_6.2 => constants.%T
|
|
|
// CHECK:STDOUT: %T.patt.loc10_6.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %N.loc10_16.2 => constants.%N
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_16.2 => constants.%N
|
|
|
+// CHECK:STDOUT: %N.loc10_16.2 => constants.%N.1
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_16.2 => constants.%N.1
|
|
|
+// CHECK:STDOUT: %.loc10_32.5 => constants.%.27
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_32.2 => constants.%int.convert_checked
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- fail_bound_mismatch.carbon
|
|
|
@@ -513,20 +576,28 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
|
|
|
-// CHECK:STDOUT: %.4: type = array_type %.3, %T [symbolic]
|
|
|
+// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
|
+// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
|
|
|
+// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %.27: <witness> = interface_witness (%Convert.15) [template]
|
|
|
+// CHECK:STDOUT: %.28: <bound method> = bound_method %.3, %Convert.15 [template]
|
|
|
+// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 2 [template]
|
|
|
+// CHECK:STDOUT: %.30: type = array_type %.29, %T [symbolic]
|
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.6: i32 = int_value 0 [template]
|
|
|
+// CHECK:STDOUT: %.32: i32 = int_value 0 [template]
|
|
|
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
|
|
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.8: i32 = int_value 3 [template]
|
|
|
-// CHECK:STDOUT: %.9: type = array_type %.8, %C [template]
|
|
|
+// CHECK:STDOUT: %.34: i32 = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.35: <bound method> = bound_method %.34, %Convert.15 [template]
|
|
|
+// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.37: type = array_type %.36, %C [template]
|
|
|
// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template]
|
|
|
// CHECK:STDOUT: %struct: %C = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.11: i32 = int_value 1 [template]
|
|
|
-// CHECK:STDOUT: %array: %.9 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
-// CHECK:STDOUT: %.12: type = array_type %.3, %C [template]
|
|
|
-// CHECK:STDOUT: %.13: <specific function> = specific_function %F, @F(%C) [template]
|
|
|
+// CHECK:STDOUT: %.39: i32 = int_value 1 [template]
|
|
|
+// CHECK:STDOUT: %array: %.37 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
+// CHECK:STDOUT: %.40: type = array_type %.29, %C [template]
|
|
|
+// CHECK:STDOUT: %.41: <specific function> = specific_function %F, @F(%C) [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
@@ -549,19 +620,24 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
|
|
// CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)]
|
|
|
// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param<invalid> [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %a.patt: @F.%.loc6_24.2 (%.4) = binding_pattern a
|
|
|
-// CHECK:STDOUT: %a.param_patt: @F.%.loc6_24.2 (%.4) = value_param_pattern %a.patt, runtime_param0
|
|
|
+// CHECK:STDOUT: %a.patt: @F.%.loc6_24.2 (%.30) = binding_pattern a
|
|
|
+// CHECK:STDOUT: %a.param_patt: @F.%.loc6_24.2 (%.30) = value_param_pattern %a.patt, runtime_param0
|
|
|
// CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern
|
|
|
// CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %T.ref.loc6_20: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %.loc6_23: i32 = int_value 2 [template = constants.%.3]
|
|
|
-// CHECK:STDOUT: %.loc6_24.1: type = array_type %.loc6_23, %T [symbolic = %.loc6_24.2 (constants.%.4)]
|
|
|
+// CHECK:STDOUT: %.loc6_23.1: i32 = int_value 2 [template = constants.%.3]
|
|
|
+// CHECK:STDOUT: %.loc6_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc6_23.3: <bound method> = bound_method %.loc6_23.1, %.loc6_23.2 [template = constants.%.28]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.loc6_23.3(%.loc6_23.1) [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc6_23.4: Core.IntLiteral = value_of_initializer %int.convert_checked [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc6_23.5: Core.IntLiteral = converted %.loc6_23.1, %.loc6_23.4 [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc6_24.1: type = array_type %.loc6_23.5, %T [symbolic = %.loc6_24.2 (constants.%.30)]
|
|
|
// CHECK:STDOUT: %T.ref.loc6_30: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %a.param: @F.%.loc6_24.2 (%.4) = value_param runtime_param0
|
|
|
-// CHECK:STDOUT: %a: @F.%.loc6_24.2 (%.4) = bind_name a, %a.param
|
|
|
+// CHECK:STDOUT: %a.param: @F.%.loc6_24.2 (%.30) = value_param runtime_param0
|
|
|
+// CHECK:STDOUT: %a: @F.%.loc6_24.2 (%.30) = bind_name a, %a.param
|
|
|
// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1
|
|
|
// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -585,15 +661,15 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) {
|
|
|
// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %.loc6_24.2: type = array_type constants.%.3, @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_24.2 (constants.%.4)]
|
|
|
+// CHECK:STDOUT: %.loc6_24.2: type = array_type constants.%.29, @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_24.2 (constants.%.30)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%.loc6_24.2 (%.4)) -> @F.%T.loc6_6.2 (%T) {
|
|
|
+// CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%.loc6_24.2 (%.30)) -> @F.%T.loc6_6.2 (%T) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.4) = name_ref a, %a
|
|
|
-// CHECK:STDOUT: %.loc6_43: i32 = int_value 0 [template = constants.%.6]
|
|
|
-// CHECK:STDOUT: %.loc6_44.1: ref @F.%.loc6_24.2 (%.4) = value_as_ref %a.ref
|
|
|
+// CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.30) = name_ref a, %a
|
|
|
+// CHECK:STDOUT: %.loc6_43: i32 = int_value 0 [template = constants.%.32]
|
|
|
+// CHECK:STDOUT: %.loc6_44.1: ref @F.%.loc6_24.2 (%.30) = value_as_ref %a.ref
|
|
|
// CHECK:STDOUT: %.loc6_44.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.1, %.loc6_43
|
|
|
// CHECK:STDOUT: %.loc6_44.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.2
|
|
|
// CHECK:STDOUT: return %.loc6_44.3
|
|
|
@@ -603,19 +679,24 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: fn @G() -> %return: %C {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %.loc10_14: i32 = int_value 3 [template = constants.%.8]
|
|
|
-// CHECK:STDOUT: %.loc10_15: type = array_type %.loc10_14, %C [template = constants.%.9]
|
|
|
-// CHECK:STDOUT: %a.var: ref %.9 = var a
|
|
|
-// CHECK:STDOUT: %a: ref %.9 = bind_name a, %a.var
|
|
|
+// CHECK:STDOUT: %.loc10_14.1: i32 = int_value 3 [template = constants.%.34]
|
|
|
+// CHECK:STDOUT: %.loc10_14.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc10_14.3: <bound method> = bound_method %.loc10_14.1, %.loc10_14.2 [template = constants.%.35]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.loc10_14.3(%.loc10_14.1) [template = constants.%.36]
|
|
|
+// CHECK:STDOUT: %.loc10_14.4: Core.IntLiteral = value_of_initializer %int.convert_checked [template = constants.%.36]
|
|
|
+// CHECK:STDOUT: %.loc10_14.5: Core.IntLiteral = converted %.loc10_14.1, %.loc10_14.4 [template = constants.%.36]
|
|
|
+// CHECK:STDOUT: %.loc10_15: type = array_type %.loc10_14.5, %C [template = constants.%.37]
|
|
|
+// CHECK:STDOUT: %a.var: ref %.37 = var a
|
|
|
+// CHECK:STDOUT: %a: ref %.37 = bind_name a, %a.var
|
|
|
// CHECK:STDOUT: %.loc10_21.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc10_25.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc10_29.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc10_30.1: %tuple.type = tuple_literal (%.loc10_21.1, %.loc10_25.1, %.loc10_29.1)
|
|
|
-// CHECK:STDOUT: %.loc10_30.2: i32 = int_value 0 [template = constants.%.6]
|
|
|
+// CHECK:STDOUT: %.loc10_30.2: i32 = int_value 0 [template = constants.%.32]
|
|
|
// CHECK:STDOUT: %.loc10_30.3: ref %C = array_index %a.var, %.loc10_30.2
|
|
|
// CHECK:STDOUT: %.loc10_21.2: init %C = class_init (), %.loc10_30.3 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc10_30.4: init %C = converted %.loc10_21.1, %.loc10_21.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc10_30.5: i32 = int_value 1 [template = constants.%.11]
|
|
|
+// CHECK:STDOUT: %.loc10_30.5: i32 = int_value 1 [template = constants.%.39]
|
|
|
// CHECK:STDOUT: %.loc10_30.6: ref %C = array_index %a.var, %.loc10_30.5
|
|
|
// CHECK:STDOUT: %.loc10_25.2: init %C = class_init (), %.loc10_30.6 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc10_30.7: init %C = converted %.loc10_25.1, %.loc10_25.2 [template = constants.%struct]
|
|
|
@@ -623,14 +704,14 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %.loc10_30.9: ref %C = array_index %a.var, %.loc10_30.8
|
|
|
// CHECK:STDOUT: %.loc10_29.2: init %C = class_init (), %.loc10_30.9 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc10_30.10: init %C = converted %.loc10_29.1, %.loc10_29.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc10_30.11: init %.9 = array_init (%.loc10_30.4, %.loc10_30.7, %.loc10_30.10) to %a.var [template = constants.%array]
|
|
|
-// CHECK:STDOUT: %.loc10_31: init %.9 = converted %.loc10_30.1, %.loc10_30.11 [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc10_30.11: init %.37 = array_init (%.loc10_30.4, %.loc10_30.7, %.loc10_30.10) to %a.var [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc10_31: init %.37 = converted %.loc10_30.1, %.loc10_30.11 [template = constants.%array]
|
|
|
// CHECK:STDOUT: assign %a.var, %.loc10_31
|
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
|
|
-// CHECK:STDOUT: %a.ref: ref %.9 = name_ref a, %a
|
|
|
-// CHECK:STDOUT: %.loc21_10: <specific function> = specific_function %F.ref, @F(constants.%C) [template = constants.%.13]
|
|
|
+// CHECK:STDOUT: %a.ref: ref %.37 = name_ref a, %a
|
|
|
+// CHECK:STDOUT: %.loc21_10: <specific function> = specific_function %F.ref, @F(constants.%C) [template = constants.%.41]
|
|
|
// CHECK:STDOUT: %.loc8_8.2: ref %C = splice_block %return {}
|
|
|
-// CHECK:STDOUT: %.loc21_12: %.12 = converted %a.ref, <error> [template = <error>]
|
|
|
+// CHECK:STDOUT: %.loc21_12: %.40 = converted %a.ref, <error> [template = <error>]
|
|
|
// CHECK:STDOUT: %F.call: init %C = call %.loc21_10(<error>) to %.loc8_8.2
|
|
|
// CHECK:STDOUT: return %F.call to %return
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -638,13 +719,13 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: specific @F(constants.%T) {
|
|
|
// CHECK:STDOUT: %T.loc6_6.2 => constants.%T
|
|
|
// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %.loc6_24.2 => constants.%.4
|
|
|
+// CHECK:STDOUT: %.loc6_24.2 => constants.%.30
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @F(constants.%C) {
|
|
|
// CHECK:STDOUT: %T.loc6_6.2 => constants.%C
|
|
|
// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C
|
|
|
-// CHECK:STDOUT: %.loc6_24.2 => constants.%.12
|
|
|
+// CHECK:STDOUT: %.loc6_24.2 => constants.%.40
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -658,25 +739,34 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %D: type = class_type @D [template]
|
|
|
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
|
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %N.1: i32 = bind_symbolic_name N, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %N.patt.1: i32 = symbolic_binding_pattern N, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
|
+// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
|
|
|
+// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %.26: <witness> = interface_witness (%Convert.15) [template]
|
|
|
+// CHECK:STDOUT: %.27: <bound method> = bound_method %N.1, %Convert.15 [symbolic]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic]
|
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
|
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
|
|
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.4: i32 = int_value 3 [template]
|
|
|
-// CHECK:STDOUT: %.5: type = array_type %.4, %D [template]
|
|
|
+// CHECK:STDOUT: %.29: i32 = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.30: <bound method> = bound_method %.29, %Convert.15 [template]
|
|
|
+// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template]
|
|
|
+// CHECK:STDOUT: %.32: type = array_type %.31, %D [template]
|
|
|
// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template]
|
|
|
-// CHECK:STDOUT: %.7: i32 = int_value 0 [template]
|
|
|
+// CHECK:STDOUT: %.34: i32 = int_value 0 [template]
|
|
|
// CHECK:STDOUT: %struct: %D = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %.8: i32 = int_value 1 [template]
|
|
|
-// CHECK:STDOUT: %.9: i32 = int_value 2 [template]
|
|
|
-// CHECK:STDOUT: %array: %.5 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
+// CHECK:STDOUT: %.35: i32 = int_value 1 [template]
|
|
|
+// CHECK:STDOUT: %.36: i32 = int_value 2 [template]
|
|
|
+// CHECK:STDOUT: %array: %.32 = tuple_value (%struct, %struct, %struct) [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
-// CHECK:STDOUT: .Int32 = %import_ref
|
|
|
+// CHECK:STDOUT: .Int32 = %import_ref.1
|
|
|
+// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
|
|
// CHECK:STDOUT: import Core//prelude
|
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -694,8 +784,8 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
|
|
|
// CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {}
|
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_6.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt)]
|
|
|
-// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc10_6.1, runtime_param<invalid> [symbolic = %N.patt.loc10_6.2 (constants.%N.patt)]
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_6.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)]
|
|
|
+// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc10_6.1, runtime_param<invalid> [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)]
|
|
|
// CHECK:STDOUT: %a.patt: <error> = binding_pattern a
|
|
|
// CHECK:STDOUT: %a.param_patt: <error> = value_param_pattern %a.patt, runtime_param0
|
|
|
// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern
|
|
|
@@ -705,13 +795,18 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_32.loc10_10 [template = i32]
|
|
|
// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_32.loc10_10, %.loc10_10.1 [template = i32]
|
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %N.ref.loc10_22: i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N)]
|
|
|
-// CHECK:STDOUT: %.loc10_23: type = array_type %N.ref.loc10_22, %C [template = <error>]
|
|
|
+// CHECK:STDOUT: %N.ref.loc10_22: i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)]
|
|
|
+// CHECK:STDOUT: %.loc10_22.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc10_22.2: <bound method> = bound_method %N.ref.loc10_22, %.loc10_22.1 [symbolic = %.loc10_22.5 (constants.%.27)]
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %.loc10_22.2(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_22.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_22.4: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.3 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)]
|
|
|
+// CHECK:STDOUT: %.loc10_23: type = array_type %.loc10_22.4, %C [template = <error>]
|
|
|
// CHECK:STDOUT: %int.make_type_32.loc10_29: init type = call constants.%Int32() [template = i32]
|
|
|
// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_32.loc10_29 [template = i32]
|
|
|
// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_32.loc10_29, %.loc10_29.1 [template = i32]
|
|
|
// CHECK:STDOUT: %N.param: i32 = value_param runtime_param<invalid>
|
|
|
-// CHECK:STDOUT: %N.loc10_6.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N)]
|
|
|
+// CHECK:STDOUT: %N.loc10_6.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.1)]
|
|
|
// CHECK:STDOUT: %a.param: <error> = value_param runtime_param0
|
|
|
// CHECK:STDOUT: %a: <error> = bind_name a, %a.param
|
|
|
// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1
|
|
|
@@ -742,14 +837,16 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: generic fn @F(%N.loc10_6.1: i32) {
|
|
|
-// CHECK:STDOUT: %N.loc10_6.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N)]
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_6.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt)]
|
|
|
+// CHECK:STDOUT: %N.loc10_6.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.1)]
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_6.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)]
|
|
|
+// CHECK:STDOUT: %.loc10_22.5: <bound method> = bound_method %N.loc10_6.2, constants.%Convert.15 [symbolic = %.loc10_22.5 (constants.%.27)]
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %.loc10_22.5(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn[%N.param_patt: i32](%a.param_patt: <error>) -> i32 {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %N.ref.loc10_42: i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N)]
|
|
|
+// CHECK:STDOUT: %N.ref.loc10_42: i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)]
|
|
|
// CHECK:STDOUT: return %N.ref.loc10_42
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -757,36 +854,43 @@ fn G() -> C {
|
|
|
// CHECK:STDOUT: fn @G() -> %return: %C {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D]
|
|
|
-// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.4]
|
|
|
-// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %D [template = constants.%.5]
|
|
|
-// CHECK:STDOUT: %a.var: ref %.5 = var a
|
|
|
-// CHECK:STDOUT: %a: ref %.5 = bind_name a, %a.var
|
|
|
+// CHECK:STDOUT: %.loc13_14.1: i32 = int_value 3 [template = constants.%.29]
|
|
|
+// CHECK:STDOUT: %.loc13_14.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.15]
|
|
|
+// CHECK:STDOUT: %.loc13_14.3: <bound method> = bound_method %.loc13_14.1, %.loc13_14.2 [template = constants.%.30]
|
|
|
+// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.loc13_14.3(%.loc13_14.1) [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_14.4: Core.IntLiteral = value_of_initializer %int.convert_checked [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_14.5: Core.IntLiteral = converted %.loc13_14.1, %.loc13_14.4 [template = constants.%.31]
|
|
|
+// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14.5, %D [template = constants.%.32]
|
|
|
+// CHECK:STDOUT: %a.var: ref %.32 = var a
|
|
|
+// CHECK:STDOUT: %a: ref %.32 = bind_name a, %a.var
|
|
|
// CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal ()
|
|
|
// CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1)
|
|
|
-// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.7]
|
|
|
+// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.34]
|
|
|
// CHECK:STDOUT: %.loc13_30.3: ref %D = array_index %a.var, %.loc13_30.2
|
|
|
// CHECK:STDOUT: %.loc13_21.2: init %D = class_init (), %.loc13_30.3 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.4: init %D = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.8]
|
|
|
+// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.35]
|
|
|
// CHECK:STDOUT: %.loc13_30.6: ref %D = array_index %a.var, %.loc13_30.5
|
|
|
// CHECK:STDOUT: %.loc13_25.2: init %D = class_init (), %.loc13_30.6 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.7: init %D = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.9]
|
|
|
+// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.36]
|
|
|
// CHECK:STDOUT: %.loc13_30.9: ref %D = array_index %a.var, %.loc13_30.8
|
|
|
// CHECK:STDOUT: %.loc13_29.2: init %D = class_init (), %.loc13_30.9 [template = constants.%struct]
|
|
|
// CHECK:STDOUT: %.loc13_30.10: init %D = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct]
|
|
|
-// CHECK:STDOUT: %.loc13_30.11: init %.5 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array]
|
|
|
-// CHECK:STDOUT: %.loc13_31: init %.5 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc13_30.11: init %.32 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc13_31: init %.32 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array]
|
|
|
// CHECK:STDOUT: assign %a.var, %.loc13_31
|
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
|
|
-// CHECK:STDOUT: %a.ref: ref %.5 = name_ref a, %a
|
|
|
+// CHECK:STDOUT: %a.ref: ref %.32 = name_ref a, %a
|
|
|
// CHECK:STDOUT: return <error> to %return
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @F(constants.%N) {
|
|
|
-// CHECK:STDOUT: %N.loc10_6.2 => constants.%N
|
|
|
-// CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N
|
|
|
+// CHECK:STDOUT: specific @F(constants.%N.1) {
|
|
|
+// CHECK:STDOUT: %N.loc10_6.2 => constants.%N.1
|
|
|
+// CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.1
|
|
|
+// CHECK:STDOUT: %.loc10_22.5 => constants.%.27
|
|
|
+// CHECK:STDOUT: %int.convert_checked.loc10_22.2 => constants.%int.convert_checked
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|