mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
More instructions get named (#4615)
Goal is to reduce churn in names in test updates (by churning a lot of them in this PR). --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
+28
-28
@@ -16,21 +16,21 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: --- address_of_deref.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.26: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %.27: <bound method> = bound_method %.2, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %.28: <specific function> = specific_function %.27, @Convert.2(%.1) [template]
|
||||
// CHECK:STDOUT: %.29: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.30: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -52,10 +52,10 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11, %.loc11_11.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11, %.loc11_11.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -63,24 +63,24 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() -> %i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %n.var: ref %i32 = var n
|
||||
// CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var
|
||||
// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %.loc12_17.2: <bound method> = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27]
|
||||
// CHECK:STDOUT: %.loc12_17.3: <specific function> = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29]
|
||||
// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.29]
|
||||
// CHECK:STDOUT: assign %n.var, %.loc12_17.4
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2]
|
||||
// CHECK:STDOUT: %.loc12_17: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2]
|
||||
// CHECK:STDOUT: assign %n.var, %.loc12_17
|
||||
// CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n
|
||||
// CHECK:STDOUT: %.loc13_13: %.30 = addr_of %n.ref
|
||||
// CHECK:STDOUT: %.loc13_12: ref %i32 = deref %.loc13_13
|
||||
// CHECK:STDOUT: %.loc13_11: %.30 = addr_of %.loc13_12
|
||||
// CHECK:STDOUT: %.loc13_10.1: ref %i32 = deref %.loc13_11
|
||||
// CHECK:STDOUT: %addr.loc13_13: %ptr = addr_of %n.ref
|
||||
// CHECK:STDOUT: %.loc13_12: ref %i32 = deref %addr.loc13_13
|
||||
// CHECK:STDOUT: %addr.loc13_11: %ptr = addr_of %.loc13_12
|
||||
// CHECK:STDOUT: %.loc13_10.1: ref %i32 = deref %addr.loc13_11
|
||||
// CHECK:STDOUT: %.loc13_10.2: %i32 = bind_value %.loc13_10.1
|
||||
// CHECK:STDOUT: return %.loc13_10.2
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+121
-121
@@ -25,32 +25,32 @@ fn F() {
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {.a: %i32, .b: %i32} [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.6: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template]
|
||||
// CHECK:STDOUT: %ptr.1: type = ptr_type %struct_type.a.b.1 [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: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.30: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %.31: <bound method> = bound_method %.4, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %.32: <specific function> = specific_function %.31, @Convert.2(%.1) [template]
|
||||
// CHECK:STDOUT: %.33: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.34: <bound method> = bound_method %.5, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %.35: <specific function> = specific_function %.34, @Convert.2(%.1) [template]
|
||||
// CHECK:STDOUT: %.36: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %.36) [template]
|
||||
// CHECK:STDOUT: %.37: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [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.14 [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: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template]
|
||||
// CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template]
|
||||
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.33, %.36) [template]
|
||||
// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -73,78 +73,78 @@ fn F() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12_15: init type = call constants.%Int(%.loc12_15.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %int.make_type_signed.loc12_15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_15.3: type = converted %int.make_type_signed.loc12_15, %.loc12_15.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12_24: init type = call constants.%Int(%.loc12_24.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_24.2: type = value_of_initializer %int.make_type_signed.loc12_24 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_24.3: type = converted %int.make_type_signed.loc12_24, %.loc12_24.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_27: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %s.var: ref %.2 = var s
|
||||
// CHECK:STDOUT: %s: ref %.2 = bind_name s, %s.var
|
||||
// CHECK:STDOUT: %.loc12_37: Core.IntLiteral = int_value 1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc12_45: Core.IntLiteral = int_value 2 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc12_46.1: %.6 = struct_literal (%.loc12_37, %.loc12_45)
|
||||
// CHECK:STDOUT: %.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %.loc12_46.3: <bound method> = bound_method %.loc12_37, %.loc12_46.2 [template = constants.%.31]
|
||||
// CHECK:STDOUT: %.loc12_46.4: <specific function> = specific_function %.loc12_46.3, @Convert.2(constants.%.1) [template = constants.%.32]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc12_46.1: init %i32 = call %.loc12_46.4(%.loc12_37) [template = constants.%.33]
|
||||
// CHECK:STDOUT: %.loc12_46.5: init %i32 = converted %.loc12_37, %int.convert_checked.loc12_46.1 [template = constants.%.33]
|
||||
// CHECK:STDOUT: %.loc12_46.6: ref %i32 = struct_access %s.var, element0
|
||||
// CHECK:STDOUT: %.loc12_46.7: init %i32 = initialize_from %.loc12_46.5 to %.loc12_46.6 [template = constants.%.33]
|
||||
// CHECK:STDOUT: %.loc12_46.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %.loc12_46.9: <bound method> = bound_method %.loc12_45, %.loc12_46.8 [template = constants.%.34]
|
||||
// CHECK:STDOUT: %.loc12_46.10: <specific function> = specific_function %.loc12_46.9, @Convert.2(constants.%.1) [template = constants.%.35]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc12_46.2: init %i32 = call %.loc12_46.10(%.loc12_45) [template = constants.%.36]
|
||||
// CHECK:STDOUT: %.loc12_46.11: init %i32 = converted %.loc12_45, %int.convert_checked.loc12_46.2 [template = constants.%.36]
|
||||
// CHECK:STDOUT: %.loc12_46.12: ref %i32 = struct_access %s.var, element1
|
||||
// CHECK:STDOUT: %.loc12_46.13: init %i32 = initialize_from %.loc12_46.11 to %.loc12_46.12 [template = constants.%.36]
|
||||
// CHECK:STDOUT: %.loc12_46.14: init %.2 = struct_init (%.loc12_46.7, %.loc12_46.13) to %s.var [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc12_47: init %.2 = converted %.loc12_46.1, %.loc12_46.14 [template = constants.%struct]
|
||||
// CHECK:STDOUT: %int_32.loc12_15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12_15: init type = call constants.%Int(%int_32.loc12_15) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed.loc12_15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed.loc12_15, %.loc12_15.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc12_24: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12_24: init type = call constants.%Int(%int_32.loc12_24) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_24.1: type = value_of_initializer %int.make_type_signed.loc12_24 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_24.2: type = converted %int.make_type_signed.loc12_24, %.loc12_24.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %s.var: ref %struct_type.a.b.1 = var s
|
||||
// CHECK:STDOUT: %s: ref %struct_type.a.b.1 = bind_name s, %s.var
|
||||
// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %.loc12_46.1: %struct_type.a.b.2 = struct_literal (%int_1.loc12, %int_2.loc12)
|
||||
// CHECK:STDOUT: %impl.elem0.loc12_46.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %Convert.bound.loc12_46.1: <bound method> = bound_method %int_1.loc12, %impl.elem0.loc12_46.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc12_46.1: <specific function> = specific_function %Convert.bound.loc12_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc12_46.1: init %i32 = call %Convert.specific_fn.loc12_46.1(%int_1.loc12) [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc12_46.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_46.1 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc12_46.3: ref %i32 = struct_access %s.var, element0
|
||||
// CHECK:STDOUT: %.loc12_46.4: init %i32 = initialize_from %.loc12_46.2 to %.loc12_46.3 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %Convert.bound.loc12_46.2: <bound method> = bound_method %int_2.loc12, %impl.elem0.loc12_46.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc12_46.2: <specific function> = specific_function %Convert.bound.loc12_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc12_46.2: init %i32 = call %Convert.specific_fn.loc12_46.2(%int_2.loc12) [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc12_46.5: init %i32 = converted %int_2.loc12, %int.convert_checked.loc12_46.2 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc12_46.6: ref %i32 = struct_access %s.var, element1
|
||||
// CHECK:STDOUT: %.loc12_46.7: init %i32 = initialize_from %.loc12_46.5 to %.loc12_46.6 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc12_46.8: init %struct_type.a.b.1 = struct_init (%.loc12_46.4, %.loc12_46.7) to %s.var [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc12_47: init %struct_type.a.b.1 = converted %.loc12_46.1, %.loc12_46.8 [template = constants.%struct]
|
||||
// CHECK:STDOUT: assign %s.var, %.loc12_47
|
||||
// CHECK:STDOUT: %.loc14_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_15: init type = call constants.%Int(%.loc14_15.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_signed.loc14_15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_signed.loc14_15, %.loc14_15.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%.loc14_24.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_signed.loc14_24, %.loc14_24.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_27: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc14_28: type = ptr_type %.2 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %p.var: ref %.3 = var p
|
||||
// CHECK:STDOUT: %p: ref %.3 = bind_name p, %p.var
|
||||
// CHECK:STDOUT: %s.ref.loc14: ref %.2 = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc14_32: %.3 = addr_of %s.ref.loc14
|
||||
// CHECK:STDOUT: assign %p.var, %.loc14_32
|
||||
// CHECK:STDOUT: %.loc15_10: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_10) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_15: init type = call constants.%Int(%int_32.loc14_15) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %int.make_type_signed.loc14_15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_15.2: type = converted %int.make_type_signed.loc14_15, %.loc14_15.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%int_32.loc14_24) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.1: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.2: type = converted %int.make_type_signed.loc14_24, %.loc14_24.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
||||
// CHECK:STDOUT: %ptr.loc14: type = ptr_type %struct_type.a.b.1 [template = constants.%ptr.1]
|
||||
// CHECK:STDOUT: %p.var: ref %ptr.1 = var p
|
||||
// CHECK:STDOUT: %p: ref %ptr.1 = bind_name p, %p.var
|
||||
// CHECK:STDOUT: %s.ref.loc14: ref %struct_type.a.b.1 = name_ref s, %s
|
||||
// CHECK:STDOUT: %addr.loc14: %ptr.1 = addr_of %s.ref.loc14
|
||||
// CHECK:STDOUT: assign %p.var, %addr.loc14
|
||||
// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_signed.loc15, %.loc15_13.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_13.3: type = ptr_type %i32 [template = constants.%.37]
|
||||
// CHECK:STDOUT: %q.var: ref %.37 = var q
|
||||
// CHECK:STDOUT: %q: ref %.37 = bind_name q, %q.var
|
||||
// CHECK:STDOUT: %s.ref.loc15: ref %.2 = name_ref s, %s
|
||||
// CHECK:STDOUT: %ptr.loc15: type = ptr_type %i32 [template = constants.%ptr.2]
|
||||
// CHECK:STDOUT: %q.var: ref %ptr.2 = var q
|
||||
// CHECK:STDOUT: %q: ref %ptr.2 = bind_name q, %q.var
|
||||
// CHECK:STDOUT: %s.ref.loc15: ref %struct_type.a.b.1 = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc15_19: ref %i32 = struct_access %s.ref.loc15, element0
|
||||
// CHECK:STDOUT: %.loc15_17: %.37 = addr_of %.loc15_19
|
||||
// CHECK:STDOUT: assign %q.var, %.loc15_17
|
||||
// CHECK:STDOUT: %.loc16_10: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_10) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %addr.loc15: %ptr.2 = addr_of %.loc15_19
|
||||
// CHECK:STDOUT: assign %q.var, %addr.loc15
|
||||
// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed.loc16, %.loc16_13.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc16_13.3: type = ptr_type %i32 [template = constants.%.37]
|
||||
// CHECK:STDOUT: %r.var: ref %.37 = var r
|
||||
// CHECK:STDOUT: %r: ref %.37 = bind_name r, %r.var
|
||||
// CHECK:STDOUT: %s.ref.loc16: ref %.2 = name_ref s, %s
|
||||
// CHECK:STDOUT: %ptr.loc16: type = ptr_type %i32 [template = constants.%ptr.2]
|
||||
// CHECK:STDOUT: %r.var: ref %ptr.2 = var r
|
||||
// CHECK:STDOUT: %r: ref %ptr.2 = bind_name r, %r.var
|
||||
// CHECK:STDOUT: %s.ref.loc16: ref %struct_type.a.b.1 = name_ref s, %s
|
||||
// CHECK:STDOUT: %.loc16_19: ref %i32 = struct_access %s.ref.loc16, element1
|
||||
// CHECK:STDOUT: %.loc16_17: %.37 = addr_of %.loc16_19
|
||||
// CHECK:STDOUT: assign %r.var, %.loc16_17
|
||||
// CHECK:STDOUT: %.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc18_11: init type = call constants.%Int(%.loc18_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_16: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc18_16: init type = call constants.%Int(%.loc18_16) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %addr.loc16: %ptr.2 = addr_of %.loc16_19
|
||||
// CHECK:STDOUT: assign %r.var, %addr.loc16
|
||||
// CHECK:STDOUT: %int_32.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc18_11: init type = call constants.%Int(%int_32.loc18_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc18_16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc18_16: init type = call constants.%Int(%int_32.loc18_16) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_19.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc18_11, %int.make_type_signed.loc18_16)
|
||||
// CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %int.make_type_signed.loc18_11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_19.3: type = converted %int.make_type_signed.loc18_11, %.loc18_19.2 [template = constants.%i32]
|
||||
@@ -153,50 +153,50 @@ fn F() {
|
||||
// CHECK:STDOUT: %.loc18_19.6: type = converted %.loc18_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %t.var: ref %tuple.type.2 = var t
|
||||
// CHECK:STDOUT: %t: ref %tuple.type.2 = bind_name t, %t.var
|
||||
// CHECK:STDOUT: %.loc18_24: Core.IntLiteral = int_value 1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc18_27: Core.IntLiteral = int_value 2 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc18_28.1: %tuple.type.3 = tuple_literal (%.loc18_24, %.loc18_27)
|
||||
// CHECK:STDOUT: %.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %.loc18_28.3: <bound method> = bound_method %.loc18_24, %.loc18_28.2 [template = constants.%.31]
|
||||
// CHECK:STDOUT: %.loc18_28.4: <specific function> = specific_function %.loc18_28.3, @Convert.2(constants.%.1) [template = constants.%.32]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %.loc18_28.4(%.loc18_24) [template = constants.%.33]
|
||||
// CHECK:STDOUT: %.loc18_28.5: init %i32 = converted %.loc18_24, %int.convert_checked.loc18_28.1 [template = constants.%.33]
|
||||
// CHECK:STDOUT: %.loc18_28.6: ref %i32 = tuple_access %t.var, element0
|
||||
// CHECK:STDOUT: %.loc18_28.7: init %i32 = initialize_from %.loc18_28.5 to %.loc18_28.6 [template = constants.%.33]
|
||||
// CHECK:STDOUT: %.loc18_28.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %.loc18_28.9: <bound method> = bound_method %.loc18_27, %.loc18_28.8 [template = constants.%.34]
|
||||
// CHECK:STDOUT: %.loc18_28.10: <specific function> = specific_function %.loc18_28.9, @Convert.2(constants.%.1) [template = constants.%.35]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %.loc18_28.10(%.loc18_27) [template = constants.%.36]
|
||||
// CHECK:STDOUT: %.loc18_28.11: init %i32 = converted %.loc18_27, %int.convert_checked.loc18_28.2 [template = constants.%.36]
|
||||
// CHECK:STDOUT: %.loc18_28.12: ref %i32 = tuple_access %t.var, element1
|
||||
// CHECK:STDOUT: %.loc18_28.13: init %i32 = initialize_from %.loc18_28.11 to %.loc18_28.12 [template = constants.%.36]
|
||||
// CHECK:STDOUT: %.loc18_28.14: init %tuple.type.2 = tuple_init (%.loc18_28.7, %.loc18_28.13) to %t.var [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc18_29: init %tuple.type.2 = converted %.loc18_28.1, %.loc18_28.14 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %.loc18_28.1: %tuple.type.3 = tuple_literal (%int_1.loc18, %int_2.loc18)
|
||||
// CHECK:STDOUT: %impl.elem0.loc18_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %Convert.bound.loc18_28.1: <bound method> = bound_method %int_1.loc18, %impl.elem0.loc18_28.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc18_28.1: <specific function> = specific_function %Convert.bound.loc18_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %Convert.specific_fn.loc18_28.1(%int_1.loc18) [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc18_28.2: init %i32 = converted %int_1.loc18, %int.convert_checked.loc18_28.1 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc18: ref %i32 = tuple_access %t.var, element0
|
||||
// CHECK:STDOUT: %.loc18_28.3: init %i32 = initialize_from %.loc18_28.2 to %tuple.elem0.loc18 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %Convert.bound.loc18_28.2: <bound method> = bound_method %int_2.loc18, %impl.elem0.loc18_28.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc18_28.2: <specific function> = specific_function %Convert.bound.loc18_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %Convert.specific_fn.loc18_28.2(%int_2.loc18) [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc18_28.4: init %i32 = converted %int_2.loc18, %int.convert_checked.loc18_28.2 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc18: ref %i32 = tuple_access %t.var, element1
|
||||
// CHECK:STDOUT: %.loc18_28.5: init %i32 = initialize_from %.loc18_28.4 to %tuple.elem1.loc18 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc18_28.6: init %tuple.type.2 = tuple_init (%.loc18_28.3, %.loc18_28.5) to %t.var [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc18_29: init %tuple.type.2 = converted %.loc18_28.1, %.loc18_28.6 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: assign %t.var, %.loc18_29
|
||||
// CHECK:STDOUT: %.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%int_32.loc19) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_signed.loc19, %.loc19_14.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc19_14.3: type = ptr_type %i32 [template = constants.%.37]
|
||||
// CHECK:STDOUT: %t0.var: ref %.37 = var t0
|
||||
// CHECK:STDOUT: %t0: ref %.37 = bind_name t0, %t0.var
|
||||
// CHECK:STDOUT: %ptr.loc19: type = ptr_type %i32 [template = constants.%ptr.2]
|
||||
// CHECK:STDOUT: %t0.var: ref %ptr.2 = var t0
|
||||
// CHECK:STDOUT: %t0: ref %ptr.2 = bind_name t0, %t0.var
|
||||
// CHECK:STDOUT: %t.ref.loc19: ref %tuple.type.2 = name_ref t, %t
|
||||
// CHECK:STDOUT: %.loc19_21: Core.IntLiteral = int_value 0 [template = constants.%.39]
|
||||
// CHECK:STDOUT: %.loc19_20: ref %i32 = tuple_access %t.ref.loc19, element0
|
||||
// CHECK:STDOUT: %.loc19_18: %.37 = addr_of %.loc19_20
|
||||
// CHECK:STDOUT: assign %t0.var, %.loc19_18
|
||||
// CHECK:STDOUT: %.loc20_11: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc19: ref %i32 = tuple_access %t.ref.loc19, element0
|
||||
// CHECK:STDOUT: %addr.loc19: %ptr.2 = addr_of %tuple.elem0.loc19
|
||||
// CHECK:STDOUT: assign %t0.var, %addr.loc19
|
||||
// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc20_14.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc20_14.2: type = converted %int.make_type_signed.loc20, %.loc20_14.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc20_14.3: type = ptr_type %i32 [template = constants.%.37]
|
||||
// CHECK:STDOUT: %t1.var: ref %.37 = var t1
|
||||
// CHECK:STDOUT: %t1: ref %.37 = bind_name t1, %t1.var
|
||||
// CHECK:STDOUT: %ptr.loc20: type = ptr_type %i32 [template = constants.%ptr.2]
|
||||
// CHECK:STDOUT: %t1.var: ref %ptr.2 = var t1
|
||||
// CHECK:STDOUT: %t1: ref %ptr.2 = bind_name t1, %t1.var
|
||||
// CHECK:STDOUT: %t.ref.loc20: ref %tuple.type.2 = name_ref t, %t
|
||||
// CHECK:STDOUT: %.loc20_21: Core.IntLiteral = int_value 1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc20_20: ref %i32 = tuple_access %t.ref.loc20, element1
|
||||
// CHECK:STDOUT: %.loc20_18: %.37 = addr_of %.loc20_20
|
||||
// CHECK:STDOUT: assign %t1.var, %.loc20_18
|
||||
// CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc20: ref %i32 = tuple_access %t.ref.loc20, element1
|
||||
// CHECK:STDOUT: %addr.loc20: %ptr.2 = addr_of %tuple.elem1.loc20
|
||||
// CHECK:STDOUT: assign %t1.var, %addr.loc20
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+34
-34
@@ -30,10 +30,10 @@ fn Foo(ptr: C*) {
|
||||
// CHECK:STDOUT: %Member.type: type = fn_type @Member [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Member: %Member.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.1: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template]
|
||||
// CHECK:STDOUT: %.3: type = struct_type {.field: %.1} [template]
|
||||
// CHECK:STDOUT: %.4: <witness> = complete_type_witness %.3 [template]
|
||||
// CHECK:STDOUT: %ptr.1: type = ptr_type %C [template]
|
||||
// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %ptr.1 [template]
|
||||
// CHECK:STDOUT: %struct_type.field: type = struct_type {.field: %ptr.1} [template]
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.field [template]
|
||||
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
|
||||
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -54,13 +54,13 @@ fn Foo(ptr: C*) {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
|
||||
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
|
||||
// CHECK:STDOUT: %ptr.patt: %.1 = binding_pattern ptr
|
||||
// CHECK:STDOUT: %ptr.param_patt: %.1 = value_param_pattern %ptr.patt, runtime_param0
|
||||
// CHECK:STDOUT: %ptr.patt: %ptr.1 = binding_pattern ptr
|
||||
// CHECK:STDOUT: %ptr.param_patt: %ptr.1 = value_param_pattern %ptr.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc16: type = ptr_type %C [template = constants.%.1]
|
||||
// CHECK:STDOUT: %ptr.param: %.1 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %ptr: %.1 = bind_name ptr, %ptr.param
|
||||
// CHECK:STDOUT: %ptr.loc16_14: type = ptr_type %C [template = constants.%ptr.1]
|
||||
// CHECK:STDOUT: %ptr.param: %ptr.1 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %ptr.loc16_8: %ptr.1 = bind_name ptr, %ptr.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -74,49 +74,49 @@ fn Foo(ptr: C*) {
|
||||
// CHECK:STDOUT: %self: %C = bind_name self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc13_15: type = ptr_type %C [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc13_12: %.2 = field_decl field, element0 [template]
|
||||
// CHECK:STDOUT: %.loc14: <witness> = complete_type_witness %.3 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1]
|
||||
// CHECK:STDOUT: %.loc13: %C.elem = field_decl field, element0 [template]
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.field [template = constants.%complete_type]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: .Member = %Member.decl
|
||||
// CHECK:STDOUT: .field = %.loc13_12
|
||||
// CHECK:STDOUT: complete_type_witness = %.loc14
|
||||
// CHECK:STDOUT: .field = %.loc13
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Member[%self.param_patt: %C]();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Foo(%ptr.param_patt: %.1) {
|
||||
// CHECK:STDOUT: fn @Foo(%ptr.param_patt: %ptr.1) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %ptr.ref.loc17: %.1 = name_ref ptr, %ptr
|
||||
// CHECK:STDOUT: %ptr.ref.loc17: %ptr.1 = name_ref ptr, %ptr.loc16_8
|
||||
// CHECK:STDOUT: %.loc17_4.1: ref %C = deref %ptr.ref.loc17
|
||||
// CHECK:STDOUT: %Member.ref.loc17: %Member.type = name_ref Member, @C.%Member.decl [template = constants.%Member]
|
||||
// CHECK:STDOUT: %.loc17_9: <bound method> = bound_method %.loc17_4.1, %Member.ref.loc17
|
||||
// CHECK:STDOUT: %Member.bound.loc17: <bound method> = bound_method %.loc17_4.1, %Member.ref.loc17
|
||||
// CHECK:STDOUT: %.loc17_4.2: %C = bind_value %.loc17_4.1
|
||||
// CHECK:STDOUT: %Member.call.loc17: init %empty_tuple.type = call %.loc17_9(%.loc17_4.2)
|
||||
// CHECK:STDOUT: %ptr.ref.loc18: %.1 = name_ref ptr, %ptr
|
||||
// CHECK:STDOUT: %Member.call.loc17: init %empty_tuple.type = call %Member.bound.loc17(%.loc17_4.2)
|
||||
// CHECK:STDOUT: %ptr.ref.loc18: %ptr.1 = name_ref ptr, %ptr.loc16_8
|
||||
// CHECK:STDOUT: %.loc18_6.1: ref %C = deref %ptr.ref.loc18
|
||||
// CHECK:STDOUT: %Member.ref.loc18: %Member.type = name_ref Member, @C.%Member.decl [template = constants.%Member]
|
||||
// CHECK:STDOUT: %.loc18_6.2: <bound method> = bound_method %.loc18_6.1, %Member.ref.loc18
|
||||
// CHECK:STDOUT: %.loc18_6.3: %C = bind_value %.loc18_6.1
|
||||
// CHECK:STDOUT: %Member.call.loc18: init %empty_tuple.type = call %.loc18_6.2(%.loc18_6.3)
|
||||
// CHECK:STDOUT: %ptr.ref.loc20: %.1 = name_ref ptr, %ptr
|
||||
// CHECK:STDOUT: %Member.bound.loc18: <bound method> = bound_method %.loc18_6.1, %Member.ref.loc18
|
||||
// CHECK:STDOUT: %.loc18_6.2: %C = bind_value %.loc18_6.1
|
||||
// CHECK:STDOUT: %Member.call.loc18: init %empty_tuple.type = call %Member.bound.loc18(%.loc18_6.2)
|
||||
// CHECK:STDOUT: %ptr.ref.loc20: %ptr.1 = name_ref ptr, %ptr.loc16_8
|
||||
// CHECK:STDOUT: %.loc20_4: ref %C = deref %ptr.ref.loc20
|
||||
// CHECK:STDOUT: %field.ref.loc20: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12]
|
||||
// CHECK:STDOUT: %.loc20_9: ref %.1 = class_element_access %.loc20_4, element0
|
||||
// CHECK:STDOUT: %ptr.ref.loc21: %.1 = name_ref ptr, %ptr
|
||||
// CHECK:STDOUT: %field.ref.loc20: %C.elem = name_ref field, @C.%.loc13 [template = @C.%.loc13]
|
||||
// CHECK:STDOUT: %.loc20_9: ref %ptr.1 = class_element_access %.loc20_4, element0
|
||||
// CHECK:STDOUT: %ptr.ref.loc21: %ptr.1 = name_ref ptr, %ptr.loc16_8
|
||||
// CHECK:STDOUT: %.loc21_6.1: ref %C = deref %ptr.ref.loc21
|
||||
// CHECK:STDOUT: %field.ref.loc21: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12]
|
||||
// CHECK:STDOUT: %.loc21_6.2: ref %.1 = class_element_access %.loc21_6.1, element0
|
||||
// CHECK:STDOUT: %ptr.ref.loc23: %.1 = name_ref ptr, %ptr
|
||||
// CHECK:STDOUT: %field.ref.loc21: %C.elem = name_ref field, @C.%.loc13 [template = @C.%.loc13]
|
||||
// CHECK:STDOUT: %.loc21_6.2: ref %ptr.1 = class_element_access %.loc21_6.1, element0
|
||||
// CHECK:STDOUT: %ptr.ref.loc23: %ptr.1 = name_ref ptr, %ptr.loc16_8
|
||||
// CHECK:STDOUT: %.loc23_6.1: ref %C = deref %ptr.ref.loc23
|
||||
// CHECK:STDOUT: %field.ref.loc23_6: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12]
|
||||
// CHECK:STDOUT: %.loc23_6.2: ref %.1 = class_element_access %.loc23_6.1, element0
|
||||
// CHECK:STDOUT: %.loc23_6.3: %.1 = bind_value %.loc23_6.2
|
||||
// CHECK:STDOUT: %field.ref.loc23_6: %C.elem = name_ref field, @C.%.loc13 [template = @C.%.loc13]
|
||||
// CHECK:STDOUT: %.loc23_6.2: ref %ptr.1 = class_element_access %.loc23_6.1, element0
|
||||
// CHECK:STDOUT: %.loc23_6.3: %ptr.1 = bind_value %.loc23_6.2
|
||||
// CHECK:STDOUT: %.loc23_13.1: ref %C = deref %.loc23_6.3
|
||||
// CHECK:STDOUT: %field.ref.loc23_13: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12]
|
||||
// CHECK:STDOUT: %.loc23_13.2: ref %.1 = class_element_access %.loc23_13.1, element0
|
||||
// CHECK:STDOUT: %field.ref.loc23_13: %C.elem = name_ref field, @C.%.loc13 [template = @C.%.loc13]
|
||||
// CHECK:STDOUT: %.loc23_13.2: ref %ptr.1 = class_element_access %.loc23_13.1, element0
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+33
-33
@@ -18,21 +18,21 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: --- basic.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.26: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %.27: <bound method> = bound_method %.2, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %.28: <specific function> = specific_function %.27, @Convert.2(%.1) [template]
|
||||
// CHECK:STDOUT: %.29: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.30: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -54,10 +54,10 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed.loc11, %.loc11_11.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11, %.loc11_11.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -65,31 +65,31 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() -> %i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc12_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_10.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed.loc12, %.loc12_10.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %n.var: ref %i32 = var n
|
||||
// CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var
|
||||
// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %.loc12_17.2: <bound method> = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27]
|
||||
// CHECK:STDOUT: %.loc12_17.3: <specific function> = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29]
|
||||
// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.29]
|
||||
// CHECK:STDOUT: assign %n.var, %.loc12_17.4
|
||||
// CHECK:STDOUT: %.loc13_10: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2]
|
||||
// CHECK:STDOUT: %.loc12_17: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2]
|
||||
// CHECK:STDOUT: assign %n.var, %.loc12_17
|
||||
// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed.loc13, %.loc13_13.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_13.3: type = ptr_type %i32 [template = constants.%.30]
|
||||
// CHECK:STDOUT: %p.var: ref %.30 = var p
|
||||
// CHECK:STDOUT: %p: ref %.30 = bind_name p, %p.var
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr]
|
||||
// CHECK:STDOUT: %p.var: ref %ptr = var p
|
||||
// CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var
|
||||
// CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n
|
||||
// CHECK:STDOUT: %.loc13_17: %.30 = addr_of %n.ref
|
||||
// CHECK:STDOUT: assign %p.var, %.loc13_17
|
||||
// CHECK:STDOUT: %p.ref: ref %.30 = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc15_11: %.30 = bind_value %p.ref
|
||||
// CHECK:STDOUT: %addr: %ptr = addr_of %n.ref
|
||||
// CHECK:STDOUT: assign %p.var, %addr
|
||||
// CHECK:STDOUT: %p.ref: ref %ptr = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc15_11: %ptr = bind_value %p.ref
|
||||
// CHECK:STDOUT: %.loc15_10.1: ref %i32 = deref %.loc15_11
|
||||
// CHECK:STDOUT: %.loc15_10.2: %i32 = bind_value %.loc15_10.1
|
||||
// CHECK:STDOUT: return %.loc15_10.2
|
||||
|
||||
@@ -50,10 +50,10 @@ fn Test() {
|
||||
// CHECK:STDOUT: fn @Test() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %undeclared.ref.loc16: <error> = name_ref undeclared, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc16: <error> = addr_of %undeclared.ref.loc16 [template = <error>]
|
||||
// CHECK:STDOUT: %addr.loc16: <error> = addr_of %undeclared.ref.loc16 [template = <error>]
|
||||
// CHECK:STDOUT: %undeclared.ref.loc24: <error> = name_ref undeclared, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc24_5: <error> = addr_of %undeclared.ref.loc24 [template = <error>]
|
||||
// CHECK:STDOUT: %.loc24_3: <error> = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %addr.loc24_5: <error> = addr_of %undeclared.ref.loc24 [template = <error>]
|
||||
// CHECK:STDOUT: %addr.loc24_3: <error> = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+93
-93
@@ -102,46 +102,46 @@ fn AddressOfParam(param: i32) {
|
||||
// CHECK:STDOUT: --- fail_address_of_value.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {.a: %i32} [template]
|
||||
// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [template]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %AddressOfLiteral.type: type = fn_type @AddressOfLiteral [template]
|
||||
// CHECK:STDOUT: %AddressOfLiteral: %AddressOfLiteral.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type Core.IntLiteral [template]
|
||||
// CHECK:STDOUT: %.5: bool = bool_literal true [template]
|
||||
// CHECK:STDOUT: %.6: type = ptr_type bool [template]
|
||||
// CHECK:STDOUT: %.7: f64 = float_literal 1 [template]
|
||||
// CHECK:STDOUT: %.8: type = ptr_type f64 [template]
|
||||
// CHECK:STDOUT: %.9: type = ptr_type String [template]
|
||||
// CHECK:STDOUT: %.10: String = string_literal "Hello" [template]
|
||||
// CHECK:STDOUT: %.11: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.12: Core.IntLiteral = int_value 2 [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %ptr.1: type = ptr_type Core.IntLiteral [template]
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [template]
|
||||
// CHECK:STDOUT: %ptr.2: type = ptr_type bool [template]
|
||||
// CHECK:STDOUT: %float: f64 = float_literal 1 [template]
|
||||
// CHECK:STDOUT: %ptr.3: type = ptr_type f64 [template]
|
||||
// CHECK:STDOUT: %ptr.4: type = ptr_type String [template]
|
||||
// CHECK:STDOUT: %str: String = string_literal "Hello" [template]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template]
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %.13: type = ptr_type %tuple.type [template]
|
||||
// CHECK:STDOUT: %.14: Core.IntLiteral = int_value 5 [template]
|
||||
// CHECK:STDOUT: %.15: type = struct_type {.a: Core.IntLiteral} [template]
|
||||
// CHECK:STDOUT: %.16: type = ptr_type %.15 [template]
|
||||
// CHECK:STDOUT: %ptr.5: type = ptr_type %tuple.type [template]
|
||||
// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template]
|
||||
// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template]
|
||||
// CHECK:STDOUT: %ptr.6: type = ptr_type %struct_type.a.2 [template]
|
||||
// CHECK:STDOUT: %AddressOfOperator.type: type = fn_type @AddressOfOperator [template]
|
||||
// CHECK:STDOUT: %AddressOfOperator: %AddressOfOperator.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.17: bool = bool_literal false [template]
|
||||
// CHECK:STDOUT: %.18: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %false: bool = bool_literal false [template]
|
||||
// CHECK:STDOUT: %ptr.7: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %AddressOfCall.type: type = fn_type @AddressOfCall [template]
|
||||
// CHECK:STDOUT: %AddressOfCall: %AddressOfCall.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %AddressOfType.type: type = fn_type @AddressOfType [template]
|
||||
// CHECK:STDOUT: %AddressOfType: %AddressOfType.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.19: type = ptr_type type [template]
|
||||
// CHECK:STDOUT: %.20: type = const_type %i32 [template]
|
||||
// CHECK:STDOUT: %.21: type = ptr_type %.20 [template]
|
||||
// CHECK:STDOUT: %ptr.8: type = ptr_type type [template]
|
||||
// CHECK:STDOUT: %const: type = const_type %i32 [template]
|
||||
// CHECK:STDOUT: %ptr.9: type = ptr_type %const [template]
|
||||
// CHECK:STDOUT: %AddressOfTupleElementValue.type: type = fn_type @AddressOfTupleElementValue [template]
|
||||
// CHECK:STDOUT: %AddressOfTupleElementValue: %AddressOfTupleElementValue.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.11, %.12) [template]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1, %int_2) [template]
|
||||
// CHECK:STDOUT: %AddressOfParam.type: type = fn_type @AddressOfParam [template]
|
||||
// CHECK:STDOUT: %AddressOfParam: %AddressOfParam.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -171,24 +171,24 @@ fn AddressOfParam(param: i32) {
|
||||
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_11.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.3: type = converted %int.make_type_signed, %.loc11_11.2 [template = constants.%i32]
|
||||
// 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]
|
||||
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed, %.loc11_11.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {
|
||||
// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %struct_type.a.1 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %struct_type.a.1 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc13_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_16.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_16.3: type = converted %int.make_type_signed, %.loc13_16.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_19: type = struct_type {.a: %i32} [template = constants.%.2]
|
||||
// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param
|
||||
// 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]
|
||||
// CHECK:STDOUT: %.loc13_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_16.2: type = converted %int.make_type_signed, %.loc13_16.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1]
|
||||
// CHECK:STDOUT: %return.param: ref %struct_type.a.1 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %struct_type.a.1 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %AddressOfLiteral.decl: %AddressOfLiteral.type = fn_decl @AddressOfLiteral [template = constants.%AddressOfLiteral] {} {}
|
||||
// CHECK:STDOUT: %AddressOfOperator.decl: %AddressOfOperator.type = fn_decl @AddressOfOperator [template = constants.%AddressOfOperator] {} {}
|
||||
@@ -199,10 +199,10 @@ fn AddressOfParam(param: i32) {
|
||||
// CHECK:STDOUT: %param.patt: %i32 = binding_pattern param
|
||||
// CHECK:STDOUT: %param.param_patt: %i32 = value_param_pattern %param.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc95_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc95: init type = call constants.%Int(%.loc95_26.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc95_26.2: type = value_of_initializer %int.make_type_signed.loc95 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc95_26.3: type = converted %int.make_type_signed.loc95, %.loc95_26.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc95: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc95: init type = call constants.%Int(%int_32.loc95) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc95_26.1: type = value_of_initializer %int.make_type_signed.loc95 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc95_26.2: type = converted %int.make_type_signed.loc95, %.loc95_26.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %param.param: %i32 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %param: %i32 = bind_name param, %param.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -210,50 +210,50 @@ fn AddressOfParam(param: i32) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G() -> %i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @H() -> %.2;
|
||||
// CHECK:STDOUT: fn @H() -> %struct_type.a.1;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @AddressOfLiteral() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc20_4: Core.IntLiteral = int_value 0 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc20_3: %.4 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc25_4: bool = bool_literal true [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc25_3: %.6 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc30_4: f64 = float_literal 1 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc30_3: %.8 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc35_4: String = string_literal "Hello" [template = constants.%.10]
|
||||
// CHECK:STDOUT: %.loc35_3: %.9 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc40_5: Core.IntLiteral = int_value 1 [template = constants.%.11]
|
||||
// CHECK:STDOUT: %.loc40_8: Core.IntLiteral = int_value 2 [template = constants.%.12]
|
||||
// CHECK:STDOUT: %.loc40_9: %tuple.type = tuple_literal (%.loc40_5, %.loc40_8)
|
||||
// CHECK:STDOUT: %.loc40_3: %.13 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc45_10: Core.IntLiteral = int_value 5 [template = constants.%.14]
|
||||
// CHECK:STDOUT: %.loc45_11: %.15 = struct_literal (%.loc45_10)
|
||||
// CHECK:STDOUT: %.loc45_3: %.16 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %addr.loc20: %ptr.1 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true]
|
||||
// CHECK:STDOUT: %addr.loc25: %ptr.2 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %float: f64 = float_literal 1 [template = constants.%float]
|
||||
// CHECK:STDOUT: %addr.loc30: %ptr.3 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %str: String = string_literal "Hello" [template = constants.%str]
|
||||
// CHECK:STDOUT: %addr.loc35: %ptr.4 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc40: %tuple.type = tuple_literal (%int_1, %int_2)
|
||||
// CHECK:STDOUT: %addr.loc40: %ptr.5 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5]
|
||||
// CHECK:STDOUT: %.loc45: %struct_type.a.2 = struct_literal (%int_5)
|
||||
// CHECK:STDOUT: %addr.loc45: %ptr.6 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @AddressOfOperator() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc53_5: bool = bool_literal true [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc53_10.1: bool = bool_literal false [template = constants.%.17]
|
||||
// CHECK:STDOUT: if %.loc53_5 br !and.rhs else br !and.result(%.loc53_10.1)
|
||||
// CHECK:STDOUT: %true.loc53: bool = bool_literal true [template = constants.%true]
|
||||
// CHECK:STDOUT: %false.loc53_10: bool = bool_literal false [template = constants.%false]
|
||||
// CHECK:STDOUT: if %true.loc53 br !and.rhs else br !and.result(%false.loc53_10)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !and.rhs:
|
||||
// CHECK:STDOUT: %.loc53_14: bool = bool_literal false [template = constants.%.17]
|
||||
// CHECK:STDOUT: br !and.result(%.loc53_14)
|
||||
// CHECK:STDOUT: %false.loc53_14: bool = bool_literal false [template = constants.%false]
|
||||
// CHECK:STDOUT: br !and.result(%false.loc53_14)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !and.result:
|
||||
// CHECK:STDOUT: %.loc53_10.2: bool = block_arg !and.result [template = constants.%.17]
|
||||
// CHECK:STDOUT: %.loc53_3: %.6 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc53: bool = block_arg !and.result [template = constants.%false]
|
||||
// CHECK:STDOUT: %addr.loc53: %ptr.2 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H]
|
||||
// CHECK:STDOUT: %H.call: init %.2 = call %H.ref()
|
||||
// CHECK:STDOUT: %.loc58_6.1: ref %.2 = temporary_storage
|
||||
// CHECK:STDOUT: %.loc58_6.2: ref %.2 = temporary %.loc58_6.1, %H.call
|
||||
// CHECK:STDOUT: %H.call: init %struct_type.a.1 = call %H.ref()
|
||||
// CHECK:STDOUT: %.loc58_6.1: ref %struct_type.a.1 = temporary_storage
|
||||
// CHECK:STDOUT: %.loc58_6.2: ref %struct_type.a.1 = temporary %.loc58_6.1, %H.call
|
||||
// CHECK:STDOUT: %.loc58_7: ref %i32 = struct_access %.loc58_6.2, element0
|
||||
// CHECK:STDOUT: %.loc58_3: %.18 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc63_9: bool = bool_literal true [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc63_5: bool = not %.loc63_9 [template = constants.%.17]
|
||||
// CHECK:STDOUT: %.loc63_3: %.6 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %addr.loc58: %ptr.7 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %true.loc63: bool = bool_literal true [template = constants.%true]
|
||||
// CHECK:STDOUT: %.loc63: bool = not %true.loc63 [template = constants.%false]
|
||||
// CHECK:STDOUT: %addr.loc63: %ptr.2 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -261,50 +261,50 @@ fn AddressOfParam(param: i32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G]
|
||||
// CHECK:STDOUT: %G.call: init %i32 = call %G.ref()
|
||||
// CHECK:STDOUT: %.loc71: %.18 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %addr: %ptr.7 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @AddressOfType() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc79_4: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc79: init type = call constants.%Int(%.loc79_4) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc79_3: %.19 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc84_11: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc84: init type = call constants.%Int(%.loc84_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc79: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc79: init type = call constants.%Int(%int_32.loc79) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %addr.loc79: %ptr.8 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %int_32.loc84: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc84: init type = call constants.%Int(%int_32.loc84) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc84_5.1: type = value_of_initializer %int.make_type_signed.loc84 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc84_5.2: type = converted %int.make_type_signed.loc84, %.loc84_5.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc84_5.3: type = const_type %i32 [template = constants.%.20]
|
||||
// CHECK:STDOUT: %.loc84_14: type = ptr_type %.20 [template = constants.%.21]
|
||||
// CHECK:STDOUT: %.loc84_3: %.19 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %const: type = const_type %i32 [template = constants.%const]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr.9]
|
||||
// CHECK:STDOUT: %addr.loc84: %ptr.8 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @AddressOfTupleElementValue() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc92_6: Core.IntLiteral = int_value 1 [template = constants.%.11]
|
||||
// CHECK:STDOUT: %.loc92_9: Core.IntLiteral = int_value 2 [template = constants.%.12]
|
||||
// CHECK:STDOUT: %.loc92_10.1: %tuple.type = tuple_literal (%.loc92_6, %.loc92_9)
|
||||
// CHECK:STDOUT: %.loc92_12: Core.IntLiteral = int_value 0 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc92_6, %.loc92_9) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc92_10.1: %tuple.type = tuple_literal (%int_1, %int_2)
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1, %int_2) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc92_10.2: %tuple.type = converted %.loc92_10.1, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc92_11: Core.IntLiteral = tuple_access %.loc92_10.2, element0 [template = constants.%.11]
|
||||
// CHECK:STDOUT: %.loc92_3: %.4 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: %tuple.elem0: Core.IntLiteral = tuple_access %.loc92_10.2, element0 [template = constants.%int_1]
|
||||
// CHECK:STDOUT: %addr: %ptr.1 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @AddressOfParam(%param.param_patt: %i32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc99_19: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc99: init type = call constants.%Int(%.loc99_19) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc99: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc99: init type = call constants.%Int(%int_32.loc99) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc99_22.1: type = value_of_initializer %int.make_type_signed.loc99 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc99_22.2: type = converted %int.make_type_signed.loc99, %.loc99_22.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc99_22.3: type = ptr_type %i32 [template = constants.%.18]
|
||||
// CHECK:STDOUT: %param_addr.var: ref %.18 = var param_addr
|
||||
// CHECK:STDOUT: %param_addr: ref %.18 = bind_name param_addr, %param_addr.var
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.7]
|
||||
// CHECK:STDOUT: %param_addr.var: ref %ptr.7 = var param_addr
|
||||
// CHECK:STDOUT: %param_addr: ref %ptr.7 = bind_name param_addr, %param_addr.var
|
||||
// CHECK:STDOUT: %param.ref: %i32 = name_ref param, %param
|
||||
// CHECK:STDOUT: %.loc99_26: %.18 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: assign %param_addr.var, %.loc99_26
|
||||
// CHECK:STDOUT: %addr: %ptr.7 = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: assign %param_addr.var, %addr
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+10
-10
@@ -21,10 +21,10 @@ let n2: i32 = undeclared->foo;
|
||||
// CHECK:STDOUT: --- fail_deref_error.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -42,14 +42,14 @@ let n2: i32 = undeclared->foo;
|
||||
// CHECK:STDOUT: .n2 = @__global_init.%n2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %.loc15_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_8.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_8.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_8.3: type = converted %int.make_type_signed.loc15, %.loc15_8.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc19_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_9.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc19_9.2: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc19_9.3: type = converted %int.make_type_signed.loc19, %.loc19_9.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%int_32.loc19) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_signed.loc19, %.loc19_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
|
||||
+14
-14
@@ -43,16 +43,16 @@ fn Deref(n: i32) {
|
||||
// CHECK:STDOUT: --- fail_deref_not_pointer.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %Deref.type: type = fn_type @Deref [template]
|
||||
// CHECK:STDOUT: %Deref: %Deref.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %struct: %.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -73,10 +73,10 @@ fn Deref(n: i32) {
|
||||
// CHECK:STDOUT: %n.patt: %i32 = binding_pattern n
|
||||
// CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_13.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed, %.loc11_13.2 [template = constants.%i32]
|
||||
// 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]
|
||||
// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed, %.loc11_13.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %n: %i32 = bind_name n, %n.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -98,13 +98,13 @@ fn Deref(n: i32) {
|
||||
// CHECK:STDOUT: %.loc31_4.2: %empty_tuple.type = converted %.loc31_4.1, %empty_tuple.loc31 [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc31_5: ref <error> = deref %.loc31_4.2
|
||||
// CHECK:STDOUT: %foo.ref.loc31: <error> = name_ref foo, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %.loc36_5.1: %.2 = struct_literal ()
|
||||
// CHECK:STDOUT: %struct.loc36: %.2 = struct_value () [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc36_5.2: %.2 = converted %.loc36_5.1, %struct.loc36 [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc36_5.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %empty_struct.loc36: %empty_struct_type = struct_value () [template = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc36_5.2: %empty_struct_type = converted %.loc36_5.1, %empty_struct.loc36 [template = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc36_3: ref <error> = deref %.loc36_5.2
|
||||
// CHECK:STDOUT: %.loc40_4.1: %.2 = struct_literal ()
|
||||
// CHECK:STDOUT: %struct.loc40: %.2 = struct_value () [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc40_4.2: %.2 = converted %.loc40_4.1, %struct.loc40 [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc40_4.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %empty_struct.loc40: %empty_struct_type = struct_value () [template = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc40_4.2: %empty_struct_type = converted %.loc40_4.1, %empty_struct.loc40 [template = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc40_5: ref <error> = deref %.loc40_4.2
|
||||
// CHECK:STDOUT: %foo.ref.loc40: <error> = name_ref foo, <error> [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
+12
-12
@@ -24,10 +24,10 @@ var p2: i32->foo;
|
||||
// CHECK:STDOUT: --- fail_deref_type.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -45,18 +45,18 @@ var p2: i32->foo;
|
||||
// CHECK:STDOUT: .p2 = %p2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %.loc18_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_9.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_9.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_9.3: type = converted %int.make_type_signed.loc18, %.loc18_9.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_8: ref <error> = deref %.loc18_9.3
|
||||
// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_9.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_9.2: type = converted %int.make_type_signed.loc18, %.loc18_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_8: ref <error> = deref %.loc18_9.2
|
||||
// CHECK:STDOUT: %p.var: ref <error> = var p
|
||||
// CHECK:STDOUT: %p: ref <error> = bind_name p, %p.var
|
||||
// CHECK:STDOUT: %.loc22_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_9.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc22_9.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc22_9.3: type = converted %int.make_type_signed.loc22, %.loc22_9.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc22_12: ref <error> = deref %.loc22_9.3
|
||||
// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%int_32.loc22) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc22_9.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc22_9.2: type = converted %int.make_type_signed.loc22, %.loc22_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc22_12: ref <error> = deref %.loc22_9.2
|
||||
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %p2.var: ref <error> = var p2
|
||||
// CHECK:STDOUT: %p2: ref <error> = bind_name p2, %p2.var
|
||||
|
||||
+24
-24
@@ -21,11 +21,11 @@ fn ConstMismatch(p: const {}*) -> const ({}*) {
|
||||
// CHECK:STDOUT: --- fail_type_mismatch.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.2: type = const_type %.1 [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.1 [template]
|
||||
// CHECK:STDOUT: %.5: type = const_type %.4 [template]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %const.1: type = const_type %empty_struct_type [template]
|
||||
// CHECK:STDOUT: %ptr.1: type = ptr_type %const.1 [template]
|
||||
// CHECK:STDOUT: %ptr.2: type = ptr_type %empty_struct_type [template]
|
||||
// CHECK:STDOUT: %const.2: type = const_type %ptr.2 [template]
|
||||
// CHECK:STDOUT: %ConstMismatch.type: type = fn_type @ConstMismatch [template]
|
||||
// CHECK:STDOUT: %ConstMismatch: %ConstMismatch.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -45,30 +45,30 @@ fn ConstMismatch(p: const {}*) -> const ({}*) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %ConstMismatch.decl: %ConstMismatch.type = fn_decl @ConstMismatch [template = constants.%ConstMismatch] {
|
||||
// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p
|
||||
// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p
|
||||
// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %const.2 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %const.2 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_28: %.1 = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc11_21.1: type = converted %.loc11_28, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc11_21.2: type = const_type %.1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc11_29: type = ptr_type %.2 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc11_43: %.1 = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc11_44.1: type = converted %.loc11_43, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc11_44.2: type = ptr_type %.1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_35: type = const_type %.4 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param
|
||||
// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param
|
||||
// CHECK:STDOUT: %.loc11_28: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc11_21: type = converted %.loc11_28, constants.%empty_struct_type [template = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %const.loc11_21: type = const_type %empty_struct_type [template = constants.%const.1]
|
||||
// CHECK:STDOUT: %ptr.loc11_29: type = ptr_type %const.1 [template = constants.%ptr.1]
|
||||
// CHECK:STDOUT: %.loc11_43: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc11_44: type = converted %.loc11_43, constants.%empty_struct_type [template = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %ptr.loc11_44: type = ptr_type %empty_struct_type [template = constants.%ptr.2]
|
||||
// CHECK:STDOUT: %const.loc11_35: type = const_type %ptr.2 [template = constants.%const.2]
|
||||
// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param
|
||||
// CHECK:STDOUT: %return.param: ref %const.2 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %const.2 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ConstMismatch(%p.param_patt: %.3) -> %.5 {
|
||||
// CHECK:STDOUT: fn @ConstMismatch(%p.param_patt: %ptr.1) -> %const.2 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc18: %.5 = converted %p.ref, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc18: %const.2 = converted %p.ref, <error> [template = <error>]
|
||||
// CHECK:STDOUT: return <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+80
-80
@@ -24,19 +24,19 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: --- implicit.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.26: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %.27: <bound method> = bound_method %.2, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %.28: <specific function> = specific_function %.27, @Convert.2(%.1) [template]
|
||||
// CHECK:STDOUT: %.29: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.30: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -55,33 +55,33 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: .a_ref = %a_ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %.loc4_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_13.1) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_signed.loc4, %.loc4_13.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed.loc4, %.loc4_13.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %a_orig.var: ref %i32 = var a_orig
|
||||
// CHECK:STDOUT: %a_orig: ref %i32 = bind_name a_orig, %a_orig.var
|
||||
// CHECK:STDOUT: %.loc5_12: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_signed.loc5, %.loc5_15.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_15.3: type = ptr_type %i32 [template = constants.%.30]
|
||||
// CHECK:STDOUT: %a_ref.var: ref %.30 = var a_ref
|
||||
// CHECK:STDOUT: %a_ref: ref %.30 = bind_name a_ref, %a_ref.var
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr]
|
||||
// CHECK:STDOUT: %a_ref.var: ref %ptr = var a_ref
|
||||
// CHECK:STDOUT: %a_ref: ref %ptr = bind_name a_ref, %a_ref.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc4_19: Core.IntLiteral = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc4_20.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %.loc4_20.2: <bound method> = bound_method %.loc4_19, %.loc4_20.1 [template = constants.%.27]
|
||||
// CHECK:STDOUT: %.loc4_20.3: <specific function> = specific_function %.loc4_20.2, @Convert.2(constants.%.1) [template = constants.%.28]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_20.3(%.loc4_19) [template = constants.%.29]
|
||||
// CHECK:STDOUT: %.loc4_20.4: init %i32 = converted %.loc4_19, %int.convert_checked [template = constants.%.29]
|
||||
// CHECK:STDOUT: assign file.%a_orig.var, %.loc4_20.4
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2]
|
||||
// CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2]
|
||||
// CHECK:STDOUT: assign file.%a_orig.var, %.loc4
|
||||
// CHECK:STDOUT: %a_orig.ref: ref %i32 = name_ref a_orig, file.%a_orig
|
||||
// CHECK:STDOUT: %.loc5: %.30 = addr_of %a_orig.ref
|
||||
// CHECK:STDOUT: assign file.%a_ref.var, %.loc5
|
||||
// CHECK:STDOUT: %addr: %ptr = addr_of %a_orig.ref
|
||||
// CHECK:STDOUT: assign file.%a_ref.var, %addr
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -99,67 +99,67 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
||||
// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.9 [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.2 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.9 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.4: <witness> = interface_witness (%Convert.2) [symbolic]
|
||||
// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic]
|
||||
// CHECK:STDOUT: %interface.1: <witness> = interface_witness (%Convert.2) [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.1 [symbolic]
|
||||
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.6: <witness> = interface_witness (%Convert.3) [symbolic]
|
||||
// CHECK:STDOUT: %interface.2: <witness> = interface_witness (%Convert.3) [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
|
||||
// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.7: <witness> = interface_witness (%Convert.4) [symbolic]
|
||||
// CHECK:STDOUT: %interface.3: <witness> = interface_witness (%Convert.4) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
|
||||
// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.16 [template]
|
||||
// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
|
||||
// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.16 [template]
|
||||
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.10: <witness> = interface_witness (%Convert.6) [symbolic]
|
||||
// CHECK:STDOUT: %interface.4: <witness> = interface_witness (%Convert.6) [symbolic]
|
||||
// CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic]
|
||||
// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
|
||||
// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.26 [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.4 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.26 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.14: <witness> = interface_witness (%Convert.8) [symbolic]
|
||||
// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.8) [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.4: type = facet_access_type %Self.3 [symbolic]
|
||||
// CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.16: <witness> = interface_witness (%Convert.9) [symbolic]
|
||||
// CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.9) [symbolic]
|
||||
// CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.17: <witness> = interface_witness (%Convert.10) [symbolic]
|
||||
// CHECK:STDOUT: %interface.7: <witness> = interface_witness (%Convert.10) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
|
||||
// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.33 [template]
|
||||
// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
|
||||
// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.33 [template]
|
||||
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.20: <witness> = interface_witness (%Convert.12) [symbolic]
|
||||
// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %interface.8: <witness> = interface_witness (%Convert.12) [symbolic]
|
||||
// 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: type = int_type signed, %.21 [template]
|
||||
// CHECK:STDOUT: %.22: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+20, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2: ref %.22 = import_ref Implicit//default, inst+332, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: ref %ptr = import_ref Implicit//default, inst+332, loaded
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.37
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
@@ -209,13 +209,13 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %.loc4_8: Core.IntLiteral = int_value 32 [template = constants.%.21]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_8) [template = constants.%i32]
|
||||
// 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]
|
||||
// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_11.3: type = ptr_type %i32 [template = constants.%.22]
|
||||
// CHECK:STDOUT: %a.var: ref %.22 = var a
|
||||
// CHECK:STDOUT: %a: ref %.22 = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr]
|
||||
// CHECK:STDOUT: %a.var: ref %ptr = var a
|
||||
// CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
||||
@@ -227,8 +227,8 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
||||
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.9 [symbolic = %.2 (constants.%.3)]
|
||||
// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.9 [symbolic = %assoc0 (constants.%assoc0.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -247,8 +247,8 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
|
||||
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
|
||||
// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)]
|
||||
// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.26 [symbolic = %.2 (constants.%.13)]
|
||||
// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)]
|
||||
// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.26 [symbolic = %assoc0 (constants.%assoc0.3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -267,7 +267,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
|
||||
// CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)]
|
||||
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: imports.%import_ref.6 as imports.%import_ref.7 {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -284,7 +284,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
|
||||
// CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)]
|
||||
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: imports.%import_ref.10 as imports.%import_ref.11 {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -300,7 +300,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
|
||||
// CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)]
|
||||
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: imports.%import_ref.13 as imports.%import_ref.14 {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -316,7 +316,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
|
||||
// CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)]
|
||||
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: imports.%import_ref.17 as imports.%import_ref.18 {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -333,7 +333,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
|
||||
// CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)]
|
||||
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: imports.%import_ref.23 as imports.%import_ref.24 {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -350,7 +350,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
|
||||
// CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)]
|
||||
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: imports.%import_ref.27 as imports.%import_ref.28 {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -366,7 +366,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
|
||||
// CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)]
|
||||
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: imports.%import_ref.30 as imports.%import_ref.31 {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -382,7 +382,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
|
||||
// CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)]
|
||||
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: imports.%import_ref.34 as imports.%import_ref.35 {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -394,9 +394,9 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
||||
// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest);
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
|
||||
@@ -439,9 +439,9 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
||||
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
|
||||
// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest);
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.3)]() -> @Convert.6.%Dest (%Dest);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
|
||||
@@ -482,8 +482,8 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a_ref.ref: ref %.22 = name_ref a_ref, imports.%import_ref.2
|
||||
// CHECK:STDOUT: %.loc4: %.22 = bind_value %a_ref.ref
|
||||
// CHECK:STDOUT: %a_ref.ref: ref %ptr = name_ref a_ref, imports.%import_ref.2
|
||||
// CHECK:STDOUT: %.loc4: %ptr = bind_value %a_ref.ref
|
||||
// CHECK:STDOUT: assign file.%a.var, %.loc4
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -531,7 +531,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
||||
// CHECK:STDOUT: %Self => constants.%Self.1
|
||||
// CHECK:STDOUT: %.1 => constants.%.5
|
||||
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Convert.2(constants.%N) {
|
||||
@@ -577,8 +577,8 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Self => constants.%Self.2
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.5
|
||||
// CHECK:STDOUT: %.1 => constants.%.8
|
||||
// CHECK:STDOUT: %.2 => constants.%.9
|
||||
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @impl.3(constants.%N) {
|
||||
@@ -658,7 +658,7 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %As.type => constants.%As.type.2
|
||||
// CHECK:STDOUT: %Self => constants.%Self.3
|
||||
// CHECK:STDOUT: %.1 => constants.%.15
|
||||
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.4
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Convert.7(constants.%N) {
|
||||
@@ -704,8 +704,8 @@ var a: i32* = a_ref;
|
||||
// CHECK:STDOUT: %Self => constants.%Self.4
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.11
|
||||
// CHECK:STDOUT: %.1 => constants.%.18
|
||||
// CHECK:STDOUT: %.2 => constants.%.19
|
||||
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.4
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @impl.7(constants.%N) {
|
||||
|
||||
+31
-31
@@ -16,15 +16,15 @@ fn F(p: const (const (const i32*)*)) -> const i32 {
|
||||
// CHECK:STDOUT: --- nested_const.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %.2: type = const_type %i32 [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %.4: type = const_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: type = ptr_type %.4 [template]
|
||||
// CHECK:STDOUT: %.6: type = const_type %.5 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %const.1: type = const_type %i32 [template]
|
||||
// CHECK:STDOUT: %ptr.1: type = ptr_type %const.1 [template]
|
||||
// CHECK:STDOUT: %const.2: type = const_type %ptr.1 [template]
|
||||
// CHECK:STDOUT: %ptr.2: type = ptr_type %const.2 [template]
|
||||
// CHECK:STDOUT: %const.3: type = const_type %ptr.2 [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -44,39 +44,39 @@ fn F(p: const (const (const i32*)*)) -> const i32 {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p
|
||||
// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: %p.patt: %const.3 = binding_pattern p
|
||||
// CHECK:STDOUT: %p.param_patt: %const.3 = value_param_pattern %p.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %const.1 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %const.1 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12_29: init type = call constants.%Int(%.loc12_29) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12_29: init type = call constants.%Int(%int_32.loc12_29) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_23.1: type = value_of_initializer %int.make_type_signed.loc12_29 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_signed.loc12_29, %.loc12_23.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_23.3: type = const_type %i32 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc12_32: type = ptr_type %.2 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc12_16: type = const_type %.3 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc12_34: type = ptr_type %.4 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc12_9: type = const_type %.5 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc12_47: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12_47: init type = call constants.%Int(%.loc12_47) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %const.loc12_23: type = const_type %i32 [template = constants.%const.1]
|
||||
// CHECK:STDOUT: %ptr.loc12_32: type = ptr_type %const.1 [template = constants.%ptr.1]
|
||||
// CHECK:STDOUT: %const.loc12_16: type = const_type %ptr.1 [template = constants.%const.2]
|
||||
// CHECK:STDOUT: %ptr.loc12_34: type = ptr_type %const.2 [template = constants.%ptr.2]
|
||||
// CHECK:STDOUT: %const.loc12_9: type = const_type %ptr.2 [template = constants.%const.3]
|
||||
// CHECK:STDOUT: %int_32.loc12_47: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12_47: init type = call constants.%Int(%int_32.loc12_47) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_41.1: type = value_of_initializer %int.make_type_signed.loc12_47 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_41.2: type = converted %int.make_type_signed.loc12_47, %.loc12_41.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_41.3: type = const_type %i32 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param
|
||||
// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param
|
||||
// CHECK:STDOUT: %const.loc12_41: type = const_type %i32 [template = constants.%const.1]
|
||||
// CHECK:STDOUT: %p.param: %const.3 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %p: %const.3 = bind_name p, %p.param
|
||||
// CHECK:STDOUT: %return.param: ref %const.1 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %const.1 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%p.param_patt: %.6) -> %.2 {
|
||||
// CHECK:STDOUT: fn @F(%p.param_patt: %const.3) -> %const.1 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc13_11.1: ref %.4 = deref %p.ref
|
||||
// CHECK:STDOUT: %.loc13_11.2: %.4 = bind_value %.loc13_11.1
|
||||
// CHECK:STDOUT: %.loc13_10.1: ref %.2 = deref %.loc13_11.2
|
||||
// CHECK:STDOUT: %.loc13_10.2: %.2 = bind_value %.loc13_10.1
|
||||
// CHECK:STDOUT: %p.ref: %const.3 = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc13_11.1: ref %const.2 = deref %p.ref
|
||||
// CHECK:STDOUT: %.loc13_11.2: %const.2 = bind_value %.loc13_11.1
|
||||
// CHECK:STDOUT: %.loc13_10.1: ref %const.1 = deref %.loc13_11.2
|
||||
// CHECK:STDOUT: %.loc13_10.2: %const.1 = bind_value %.loc13_10.1
|
||||
// CHECK:STDOUT: return %.loc13_10.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+39
-39
@@ -19,15 +19,15 @@ fn ConstPtr(p: const i32*) -> (const i32)* {
|
||||
// CHECK:STDOUT: --- types.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
|
||||
// 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: type = int_type signed, %.1 [template]
|
||||
// CHECK:STDOUT: %.2: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %ptr.1: type = ptr_type %i32 [template]
|
||||
// CHECK:STDOUT: %Ptr.type: type = fn_type @Ptr [template]
|
||||
// CHECK:STDOUT: %Ptr: %Ptr.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = const_type %i32 [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %const: type = const_type %i32 [template]
|
||||
// CHECK:STDOUT: %ptr.2: type = ptr_type %const [template]
|
||||
// CHECK:STDOUT: %ConstPtr.type: type = fn_type @ConstPtr [template]
|
||||
// CHECK:STDOUT: %ConstPtr: %ConstPtr.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -48,60 +48,60 @@ fn ConstPtr(p: const i32*) -> (const i32)* {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Ptr.decl: %Ptr.type = fn_decl @Ptr [template = constants.%Ptr] {
|
||||
// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p
|
||||
// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p
|
||||
// CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %ptr.1 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %ptr.1 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%.loc11_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11_11, %.loc11_14.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_14.3: type = ptr_type %i32 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_20: init type = call constants.%Int(%.loc11_20) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %ptr.loc11_14: type = ptr_type %i32 [template = constants.%ptr.1]
|
||||
// CHECK:STDOUT: %int_32.loc11_20: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_20: init type = call constants.%Int(%int_32.loc11_20) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_20 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_20, %.loc11_23.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_23.3: type = ptr_type %i32 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param
|
||||
// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param
|
||||
// CHECK:STDOUT: %ptr.loc11_23: type = ptr_type %i32 [template = constants.%ptr.1]
|
||||
// CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param
|
||||
// CHECK:STDOUT: %return.param: ref %ptr.1 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %ptr.1 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ConstPtr.decl: %ConstPtr.type = fn_decl @ConstPtr [template = constants.%ConstPtr] {
|
||||
// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p
|
||||
// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p
|
||||
// CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0
|
||||
// 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: %.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call constants.%Int(%.loc15_22) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call constants.%Int(%int_32.loc15_22) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_16.1: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_16.2: type = converted %int.make_type_signed.loc15_22, %.loc15_16.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_16.3: type = const_type %i32 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc15_25: type = ptr_type %.3 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc15_38: Core.IntLiteral = int_value 32 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15_38: init type = call constants.%Int(%.loc15_38) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %const.loc15_16: type = const_type %i32 [template = constants.%const]
|
||||
// CHECK:STDOUT: %ptr.loc15_25: type = ptr_type %const [template = constants.%ptr.2]
|
||||
// CHECK:STDOUT: %int_32.loc15_38: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15_38: init type = call constants.%Int(%int_32.loc15_38) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_signed.loc15_38 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_32.2: type = converted %int.make_type_signed.loc15_38, %.loc15_32.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_32.3: type = const_type %i32 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc15_42: type = ptr_type %.3 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param
|
||||
// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param
|
||||
// CHECK:STDOUT: %const.loc15_32: type = const_type %i32 [template = constants.%const]
|
||||
// CHECK:STDOUT: %ptr.loc15_42: type = ptr_type %const [template = constants.%ptr.2]
|
||||
// CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param
|
||||
// CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Ptr(%p.param_patt: %.2) -> %.2 {
|
||||
// CHECK:STDOUT: fn @Ptr(%p.param_patt: %ptr.1) -> %ptr.1 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p
|
||||
// CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p
|
||||
// CHECK:STDOUT: return %p.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ConstPtr(%p.param_patt: %.4) -> %.4 {
|
||||
// CHECK:STDOUT: fn @ConstPtr(%p.param_patt: %ptr.2) -> %ptr.2 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p
|
||||
// CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p
|
||||
// CHECK:STDOUT: return %p.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user