mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename IntLiteral to IntValue. (#4475)
This instruction represents integer values, whether they come from literals or calculations, so it the old name is inaccurate. I also plan to rename `BigInt` to `IntLiteral` based on recent discussion and this change aims to avoid confusion stemming from the same name being used for two different things. I'm not renaming `FloatLiteral` because recent discussion suggests we may want distinct `FloatLiteral` versus `FloatValue` representations in SemIR.
This commit is contained in:
@@ -20,9 +20,9 @@ var c: i32 = b.0;
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -67,7 +67,7 @@ var c: i32 = b.0;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_18: i32 = int_literal 12 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_18: i32 = int_value 12 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_21.1: %.3 = tuple_literal (%.loc11_18)
|
||||
// CHECK:STDOUT: %.loc11_21.2: init %.3 = tuple_init (%.loc11_18) to file.%a.var [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc11_22: init %.3 = converted %.loc11_21.1, %.loc11_21.2 [template = constants.%tuple]
|
||||
@@ -79,7 +79,7 @@ var c: i32 = b.0;
|
||||
// CHECK:STDOUT: %.loc12_18: init %.3 = converted %a.ref, %.loc12_17.3
|
||||
// CHECK:STDOUT: assign file.%b.var, %.loc12_18
|
||||
// CHECK:STDOUT: %b.ref: ref %.3 = name_ref b, file.%b
|
||||
// CHECK:STDOUT: %.loc13_16: i32 = int_literal 0 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc13_16: i32 = int_value 0 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc13_15.1: ref i32 = tuple_access %b.ref, element0
|
||||
// CHECK:STDOUT: %.loc13_15.2: i32 = bind_value %.loc13_15.1
|
||||
// CHECK:STDOUT: assign file.%c.var, %.loc13_15.2
|
||||
|
||||
@@ -23,8 +23,8 @@ var b: i32 = a.(oops);
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 6 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -65,8 +65,8 @@ var b: i32 = a.(oops);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_literal 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_27.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26)
|
||||
// CHECK:STDOUT: %.loc11_27.2: ref i32 = tuple_access file.%a.var, element0
|
||||
// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.5]
|
||||
|
||||
@@ -25,7 +25,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
|
||||
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -55,7 +55,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc17_7: i32 = int_literal 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc17_7: i32 = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc17_4.1: ref %.1 = temporary_storage
|
||||
// CHECK:STDOUT: %.loc17_4.2: ref %.1 = temporary %.loc17_4.1, %F.call
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
@@ -28,10 +28,10 @@ var d: i32 = b.(0x7FFF_FFFF);
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 2147483647 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 2147483647 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -82,7 +82,7 @@ var d: i32 = b.(0x7FFF_FFFF);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_18: i32 = int_literal 12 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_18: i32 = int_value 12 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_21.1: %.3 = tuple_literal (%.loc11_18)
|
||||
// CHECK:STDOUT: %.loc11_21.2: init %.3 = tuple_init (%.loc11_18) to file.%a.var [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc11_22: init %.3 = converted %.loc11_21.1, %.loc11_21.2 [template = constants.%tuple]
|
||||
@@ -94,10 +94,10 @@ var d: i32 = b.(0x7FFF_FFFF);
|
||||
// CHECK:STDOUT: %.loc12_18: init %.3 = converted %a.ref, %.loc12_17.3
|
||||
// CHECK:STDOUT: assign file.%b.var, %.loc12_18
|
||||
// CHECK:STDOUT: %b.ref.loc17: ref %.3 = name_ref b, file.%b
|
||||
// CHECK:STDOUT: %.loc17: i32 = int_literal 1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc17: i32 = int_value 1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: assign file.%c.var, <error>
|
||||
// CHECK:STDOUT: %b.ref.loc21: ref %.3 = name_ref b, file.%b
|
||||
// CHECK:STDOUT: %.loc21: i32 = int_literal 2147483647 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc21: i32 = int_value 2147483647 [template = constants.%.6]
|
||||
// CHECK:STDOUT: assign file.%d.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -23,10 +23,10 @@ var b: i32 = a.(-10);
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 6 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_literal 10 [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_value 10 [template]
|
||||
// CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template]
|
||||
// CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Op.type: type = fn_type @Op [template]
|
||||
@@ -91,8 +91,8 @@ var b: i32 = a.(-10);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_literal 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_27.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26)
|
||||
// CHECK:STDOUT: %.loc11_27.2: ref i32 = tuple_access file.%a.var, element0
|
||||
// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.5]
|
||||
@@ -102,7 +102,7 @@ var b: i32 = a.(-10);
|
||||
// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: assign file.%a.var, %.loc11_28
|
||||
// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %.loc15: i32 = int_literal 10 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc15: i32 = int_value 10 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %Op.ref: %.8 = name_ref Op, imports.%import_ref.4 [template = constants.%.9]
|
||||
// CHECK:STDOUT: assign file.%b.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
@@ -24,10 +24,10 @@ var c: i32 = a.(b);
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -73,8 +73,8 @@ var c: i32 = a.(b);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_literal 2 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_25: i32 = int_literal 3 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_value 2 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_25: i32 = int_value 3 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_26.1: %.3 = tuple_literal (%.loc11_22, %.loc11_25)
|
||||
// CHECK:STDOUT: %.loc11_26.2: ref i32 = tuple_access file.%a.var, element0
|
||||
// CHECK:STDOUT: %.loc11_26.3: init i32 = initialize_from %.loc11_22 to %.loc11_26.2 [template = constants.%.5]
|
||||
@@ -83,7 +83,7 @@ var c: i32 = a.(b);
|
||||
// CHECK:STDOUT: %.loc11_26.6: init %.3 = tuple_init (%.loc11_26.3, %.loc11_26.5) to file.%a.var [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.6 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: assign file.%a.var, %.loc11_27
|
||||
// CHECK:STDOUT: %.loc12: i32 = int_literal 0 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.7]
|
||||
// CHECK:STDOUT: assign file.%b.var, %.loc12
|
||||
// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %b.ref: ref i32 = name_ref b, file.%b
|
||||
|
||||
@@ -26,8 +26,8 @@ var b: i32 = a.(2.6);
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 6 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: %.7: f64 = float_literal 2.6000000000000001 [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
|
||||
@@ -121,8 +121,8 @@ var b: i32 = a.(2.6);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_literal 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_27.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26)
|
||||
// CHECK:STDOUT: %.loc11_27.2: ref i32 = tuple_access file.%a.var, element0
|
||||
// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.5]
|
||||
|
||||
@@ -28,8 +28,8 @@ fn Main() {
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template]
|
||||
// CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %ElementType: type = bind_symbolic_name ElementType, 1 [symbolic]
|
||||
@@ -45,10 +45,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.7: type = array_type %.6, i32 [template]
|
||||
// CHECK:STDOUT: %.8: type = ptr_type %.7 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_literal 5 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_value 5 [template]
|
||||
// CHECK:STDOUT: %.10: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %array: %.7 = tuple_value (%.9, %.9) [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -101,22 +101,22 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc16_3: i32 = int_literal 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc16_5: i32 = int_literal 1 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc16_3: i32 = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc16_5: i32 = int_value 1 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc18_24: i32 = int_literal 2 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc18_24: i32 = int_value 2 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc18_19.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32]
|
||||
// CHECK:STDOUT: %.loc18_19.2: type = converted %int.make_type_32.loc18, %.loc18_19.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc18_25: type = array_type %.loc18_24, i32 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %non_tuple.var: ref %.7 = var non_tuple
|
||||
// CHECK:STDOUT: %non_tuple: ref %.7 = bind_name non_tuple, %non_tuple.var
|
||||
// CHECK:STDOUT: %.loc18_30: i32 = int_literal 5 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc18_33: i32 = int_literal 5 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc18_30: i32 = int_value 5 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc18_33: i32 = int_value 5 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc18_34.1: %.10 = tuple_literal (%.loc18_30, %.loc18_33)
|
||||
// CHECK:STDOUT: %.loc18_34.2: i32 = int_literal 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc18_34.2: i32 = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc18_34.3: ref i32 = array_index %non_tuple.var, %.loc18_34.2
|
||||
// CHECK:STDOUT: %.loc18_34.4: init i32 = initialize_from %.loc18_30 to %.loc18_34.3 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc18_34.5: i32 = int_literal 1 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc18_34.5: i32 = int_value 1 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc18_34.6: ref i32 = array_index %non_tuple.var, %.loc18_34.5
|
||||
// CHECK:STDOUT: %.loc18_34.7: init i32 = initialize_from %.loc18_33 to %.loc18_34.6 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc18_34.8: init %.7 = array_init (%.loc18_34.4, %.loc18_34.7) to %non_tuple.var [template = constants.%array]
|
||||
@@ -128,7 +128,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: %first.var: ref i32 = var first
|
||||
// CHECK:STDOUT: %first: ref i32 = bind_name first, %first.var
|
||||
// CHECK:STDOUT: %non_tuple.ref: ref %.7 = name_ref non_tuple, %non_tuple
|
||||
// CHECK:STDOUT: %.loc22_30: i32 = int_literal 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc22_30: i32 = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: assign %first.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -23,10 +23,10 @@ var b: i32 = a.2;
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 6 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -66,8 +66,8 @@ var b: i32 = a.2;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_literal 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_27.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26)
|
||||
// CHECK:STDOUT: %.loc11_27.2: ref i32 = tuple_access file.%a.var, element0
|
||||
// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.5]
|
||||
@@ -77,7 +77,7 @@ var b: i32 = a.2;
|
||||
// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: assign file.%a.var, %.loc11_28
|
||||
// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %.loc15: i32 = int_literal 2 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc15: i32 = int_value 2 [template = constants.%.7]
|
||||
// CHECK:STDOUT: assign file.%b.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -23,10 +23,10 @@ var b: i32 = a.({.index = 2}.index);
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 34 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 34 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.8: type = struct_type {.index: i32} [template]
|
||||
// CHECK:STDOUT: %struct: %.8 = struct_value (%.7) [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -68,8 +68,8 @@ var b: i32 = a.({.index = 2}.index);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_literal 34 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_value 34 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_28.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26)
|
||||
// CHECK:STDOUT: %.loc11_28.2: ref i32 = tuple_access file.%a.var, element0
|
||||
// CHECK:STDOUT: %.loc11_28.3: init i32 = initialize_from %.loc11_22 to %.loc11_28.2 [template = constants.%.5]
|
||||
@@ -79,7 +79,7 @@ var b: i32 = a.({.index = 2}.index);
|
||||
// CHECK:STDOUT: %.loc11_29: init %.3 = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: assign file.%a.var, %.loc11_29
|
||||
// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %.loc15_27: i32 = int_literal 2 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc15_27: i32 = int_value 2 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc15_28.1: %.8 = struct_literal (%.loc15_27)
|
||||
// CHECK:STDOUT: %struct: %.8 = struct_value (%.loc15_27) [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc15_28.2: %.8 = converted %.loc15_28.1, %struct [template = constants.%struct]
|
||||
|
||||
@@ -20,10 +20,10 @@ var b: i32 = a.({.index = 1}.index);
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 34 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 34 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.8: type = struct_type {.index: i32} [template]
|
||||
// CHECK:STDOUT: %struct: %.8 = struct_value (%.7) [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -65,8 +65,8 @@ var b: i32 = a.({.index = 1}.index);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_literal 34 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26: i32 = int_value 34 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_28.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26)
|
||||
// CHECK:STDOUT: %.loc11_28.2: ref i32 = tuple_access file.%a.var, element0
|
||||
// CHECK:STDOUT: %.loc11_28.3: init i32 = initialize_from %.loc11_22 to %.loc11_28.2 [template = constants.%.5]
|
||||
@@ -76,7 +76,7 @@ var b: i32 = a.({.index = 1}.index);
|
||||
// CHECK:STDOUT: %.loc11_29: init %.3 = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: assign file.%a.var, %.loc11_29
|
||||
// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %.loc12_27: i32 = int_literal 1 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc12_27: i32 = int_value 1 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc12_28.1: %.8 = struct_literal (%.loc12_27)
|
||||
// CHECK:STDOUT: %struct: %.8 = struct_value (%.loc12_27) [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc12_28.2: %.8 = converted %.loc12_28.1, %struct [template = constants.%struct]
|
||||
|
||||
@@ -24,7 +24,7 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
|
||||
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
|
||||
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
|
||||
@@ -74,7 +74,7 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() -> %.3 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_28: i32 = int_literal 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_28: i32 = int_value 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_30: %.3 = tuple_literal (%.loc11_28)
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc11_28) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc11_31: %.3 = converted %.loc11_30, %tuple [template = constants.%tuple]
|
||||
@@ -85,7 +85,7 @@ fn Run() -> i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init %.3 = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc14_14: i32 = int_literal 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc14_14: i32 = int_value 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc14_11.1: ref %.3 = temporary_storage
|
||||
// CHECK:STDOUT: %.loc14_11.2: ref %.3 = temporary %.loc14_11.1, %F.call
|
||||
// CHECK:STDOUT: %.loc14_13.1: ref i32 = tuple_access %.loc14_11.2, element0
|
||||
|
||||
+12
-12
@@ -26,13 +26,13 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6));
|
||||
// CHECK:STDOUT: %.6: type = ptr_type %.4 [template]
|
||||
// CHECK:STDOUT: %.7: type = tuple_type (%.6, %.6) [template]
|
||||
// CHECK:STDOUT: %.8: type = ptr_type %.7 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.10: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.11: i32 = int_literal 3 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.10: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.11: i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %.12: type = tuple_type (i32, i32, i32) [template]
|
||||
// CHECK:STDOUT: %.13: i32 = int_literal 4 [template]
|
||||
// CHECK:STDOUT: %.14: i32 = int_literal 5 [template]
|
||||
// CHECK:STDOUT: %.15: i32 = int_literal 6 [template]
|
||||
// CHECK:STDOUT: %.13: i32 = int_value 4 [template]
|
||||
// CHECK:STDOUT: %.14: i32 = int_value 5 [template]
|
||||
// CHECK:STDOUT: %.15: i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: %.16: type = tuple_type (%.12, %.12) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -77,13 +77,13 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc14_37: i32 = int_literal 1 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc14_40: i32 = int_literal 2 [template = constants.%.10]
|
||||
// CHECK:STDOUT: %.loc14_43: i32 = int_literal 3 [template = constants.%.11]
|
||||
// CHECK:STDOUT: %.loc14_37: i32 = int_value 1 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc14_40: i32 = int_value 2 [template = constants.%.10]
|
||||
// CHECK:STDOUT: %.loc14_43: i32 = int_value 3 [template = constants.%.11]
|
||||
// CHECK:STDOUT: %.loc14_44: %.12 = tuple_literal (%.loc14_37, %.loc14_40, %.loc14_43)
|
||||
// CHECK:STDOUT: %.loc14_48: i32 = int_literal 4 [template = constants.%.13]
|
||||
// CHECK:STDOUT: %.loc14_51: i32 = int_literal 5 [template = constants.%.14]
|
||||
// CHECK:STDOUT: %.loc14_54: i32 = int_literal 6 [template = constants.%.15]
|
||||
// CHECK:STDOUT: %.loc14_48: i32 = int_value 4 [template = constants.%.13]
|
||||
// CHECK:STDOUT: %.loc14_51: i32 = int_value 5 [template = constants.%.14]
|
||||
// CHECK:STDOUT: %.loc14_54: i32 = int_value 6 [template = constants.%.15]
|
||||
// CHECK:STDOUT: %.loc14_55: %.12 = tuple_literal (%.loc14_48, %.loc14_51, %.loc14_54)
|
||||
// CHECK:STDOUT: %.loc14_56: %.16 = tuple_literal (%.loc14_44, %.loc14_55)
|
||||
// CHECK:STDOUT: assign file.%x.var, <error>
|
||||
|
||||
@@ -25,7 +25,7 @@ var x: (i32, i32) = (2, 65.89);
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.6: f64 = float_literal 65.890000000000001 [template]
|
||||
// CHECK:STDOUT: %.7: type = tuple_type (i32, f64) [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
|
||||
@@ -113,7 +113,7 @@ var x: (i32, i32) = (2, 65.89);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc17_22: i32 = int_literal 2 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc17_22: i32 = int_value 2 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc17_25: f64 = float_literal 65.890000000000001 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc17_30.1: %.7 = tuple_literal (%.loc17_22, %.loc17_25)
|
||||
// CHECK:STDOUT: %.loc17_30.2: ref i32 = tuple_access file.%x.var, element0
|
||||
|
||||
@@ -30,7 +30,7 @@ var p: Incomplete* = &t[1];
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, %Incomplete) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %Incomplete [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -72,7 +72,7 @@ var p: Incomplete* = &t[1];
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %t.ref: ref <error> = name_ref t, file.%t
|
||||
// CHECK:STDOUT: %.loc21_25: i32 = int_literal 1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc21_25: i32 = int_value 1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc21_22: <error> = addr_of <error> [template = <error>]
|
||||
// CHECK:STDOUT: assign file.%p.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
@@ -22,7 +22,7 @@ var x: (i32, i32) = (2, );
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.6: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -57,7 +57,7 @@ var x: (i32, i32) = (2, );
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc14_22: i32 = int_literal 2 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc14_22: i32 = int_value 2 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc14_25: %.6 = tuple_literal (%.loc14_22)
|
||||
// CHECK:STDOUT: assign file.%x.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
@@ -19,7 +19,7 @@ var x: (1, );
|
||||
// CHECK:STDOUT: --- fail_value_as_type.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type () [template]
|
||||
@@ -61,7 +61,7 @@ var x: (1, );
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %.loc17_9: i32 = int_literal 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc17_9: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc17_12.1: %.2 = tuple_literal (%.loc17_9)
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%ImplicitAs.type.3]
|
||||
// CHECK:STDOUT: %.loc17_12.2: %.6 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.7]
|
||||
|
||||
+27
-27
@@ -61,7 +61,7 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %tuple.1: %.3 = tuple_value (%.4) [template]
|
||||
// CHECK:STDOUT: %.5: type = tuple_type (%.2, type) [template]
|
||||
// CHECK:STDOUT: %.6: type = tuple_type (type, type) [template]
|
||||
@@ -73,9 +73,9 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %.12: type = ptr_type %.8 [template]
|
||||
// CHECK:STDOUT: %.13: type = tuple_type (%.12, %.11) [template]
|
||||
// CHECK:STDOUT: %.14: type = ptr_type %.13 [template]
|
||||
// CHECK:STDOUT: %.15: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.16: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.17: i32 = int_literal 3 [template]
|
||||
// CHECK:STDOUT: %.15: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.16: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.17: i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %tuple.2: %.8 = tuple_value (%tuple.1, %.15) [template]
|
||||
// CHECK:STDOUT: %tuple.3: %.9 = tuple_value (%.16, %.17) [template]
|
||||
// CHECK:STDOUT: %tuple.4: %.10 = tuple_value (%tuple.2, %tuple.3) [template]
|
||||
@@ -159,8 +159,8 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %return.param_patt: %C.3 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %.loc9_14: i32 = int_literal 1 [template = constants.%.15]
|
||||
// CHECK:STDOUT: %.loc9_17: i32 = int_literal 2 [template = constants.%.16]
|
||||
// CHECK:STDOUT: %.loc9_14: i32 = int_value 1 [template = constants.%.15]
|
||||
// CHECK:STDOUT: %.loc9_17: i32 = int_value 2 [template = constants.%.16]
|
||||
// CHECK:STDOUT: %.loc9_18: %.9 = tuple_literal (%.loc9_14, %.loc9_17)
|
||||
// CHECK:STDOUT: %tuple: %.9 = tuple_value (%.loc9_14, %.loc9_17) [template = constants.%tuple.5]
|
||||
// CHECK:STDOUT: %.loc9_12: %.9 = converted %.loc9_18, %tuple [template = constants.%tuple.5]
|
||||
@@ -190,17 +190,17 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc4_22: i32 = int_literal 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc4_22: i32 = int_value 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc4_24.1: %.3 = tuple_literal (%.loc4_22)
|
||||
// CHECK:STDOUT: %.loc4_24.2: init %.3 = tuple_init (%.loc4_22) to file.%a_ref.var [template = constants.%tuple.1]
|
||||
// CHECK:STDOUT: %.loc4_25: init %.3 = converted %.loc4_24.1, %.loc4_24.2 [template = constants.%tuple.1]
|
||||
// CHECK:STDOUT: assign file.%a_ref.var, %.loc4_25
|
||||
// CHECK:STDOUT: %.loc5_45: i32 = int_literal 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc5_45: i32 = int_value 0 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc5_47.1: %.3 = tuple_literal (%.loc5_45)
|
||||
// CHECK:STDOUT: %.loc5_50: i32 = int_literal 1 [template = constants.%.15]
|
||||
// CHECK:STDOUT: %.loc5_50: i32 = int_value 1 [template = constants.%.15]
|
||||
// CHECK:STDOUT: %.loc5_51.1: %.8 = tuple_literal (%.loc5_47.1, %.loc5_50)
|
||||
// CHECK:STDOUT: %.loc5_55: i32 = int_literal 2 [template = constants.%.16]
|
||||
// CHECK:STDOUT: %.loc5_58: i32 = int_literal 3 [template = constants.%.17]
|
||||
// CHECK:STDOUT: %.loc5_55: i32 = int_value 2 [template = constants.%.16]
|
||||
// CHECK:STDOUT: %.loc5_58: i32 = int_value 3 [template = constants.%.17]
|
||||
// CHECK:STDOUT: %.loc5_59.1: %.9 = tuple_literal (%.loc5_55, %.loc5_58)
|
||||
// CHECK:STDOUT: %.loc5_60.1: %.10 = tuple_literal (%.loc5_51.1, %.loc5_59.1)
|
||||
// CHECK:STDOUT: %.loc5_60.2: ref %.8 = tuple_access file.%b_ref.var, element0
|
||||
@@ -260,8 +260,8 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %X: %.8 = bind_symbolic_name X, 0 [symbolic]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic]
|
||||
// CHECK:STDOUT: %X.patt: %.8 = symbolic_binding_pattern X, 0 [symbolic]
|
||||
// CHECK:STDOUT: %.16: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.17: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.16: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.17: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %tuple: %.8 = tuple_value (%.16, %.17) [template]
|
||||
// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple) [template]
|
||||
// CHECK:STDOUT: %.18: type = ptr_type %.14 [template]
|
||||
@@ -327,8 +327,8 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %b.var: ref %.9 = var b
|
||||
// CHECK:STDOUT: %b: ref %.9 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %.loc6_11: i32 = int_literal 1 [template = constants.%.16]
|
||||
// CHECK:STDOUT: %.loc6_14: i32 = int_literal 2 [template = constants.%.17]
|
||||
// CHECK:STDOUT: %.loc6_11: i32 = int_value 1 [template = constants.%.16]
|
||||
// CHECK:STDOUT: %.loc6_14: i32 = int_value 2 [template = constants.%.17]
|
||||
// CHECK:STDOUT: %.loc6_15: %.8 = tuple_literal (%.loc6_11, %.loc6_14)
|
||||
// CHECK:STDOUT: %tuple: %.8 = tuple_value (%.loc6_11, %.loc6_14) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc6_9: %.8 = converted %.loc6_15, %tuple [template = constants.%tuple]
|
||||
@@ -423,9 +423,9 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %X: %.4 = bind_symbolic_name X, 0 [symbolic]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic]
|
||||
// CHECK:STDOUT: %X.patt: %.4 = symbolic_binding_pattern X, 0 [symbolic]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_literal 3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.7: i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %.8: type = tuple_type (i32, i32, i32) [template]
|
||||
// CHECK:STDOUT: %.9: type = ptr_type %.4 [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
@@ -460,9 +460,9 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %.loc12_15: i32 = int_literal 1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc12_18: i32 = int_literal 2 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc12_21: i32 = int_literal 3 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc12_15: i32 = int_value 1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc12_18: i32 = int_value 2 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc12_21: i32 = int_value 3 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc12_22: %.8 = tuple_literal (%.loc12_15, %.loc12_18, %.loc12_21)
|
||||
// CHECK:STDOUT: %c_bad.var: ref <error> = var c_bad
|
||||
// CHECK:STDOUT: %c_bad: ref <error> = bind_name c_bad, %c_bad.var
|
||||
@@ -515,16 +515,16 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %X: %.4 = bind_symbolic_name X, 0 [symbolic]
|
||||
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic]
|
||||
// CHECK:STDOUT: %X.patt: %.4 = symbolic_binding_pattern X, 0 [symbolic]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 3 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 4 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 4 [template]
|
||||
// CHECK:STDOUT: %.7: type = ptr_type %.4 [template]
|
||||
// CHECK:STDOUT: %tuple.1: %.4 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.1) [template]
|
||||
// CHECK:STDOUT: %.8: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.10: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.10: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %tuple.2: %.4 = tuple_value (%.10, %.9) [template]
|
||||
// CHECK:STDOUT: %C.4: type = class_type @C, @C(%tuple.2) [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
|
||||
@@ -578,8 +578,8 @@ var c_bad: C((3, 4)) = F();
|
||||
// CHECK:STDOUT: %default.import = import <invalid>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1]
|
||||
// CHECK:STDOUT: %.loc10_15: i32 = int_literal 3 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc10_18: i32 = int_literal 4 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc10_15: i32 = int_value 3 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc10_18: i32 = int_value 4 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc10_19: %.4 = tuple_literal (%.loc10_15, %.loc10_18)
|
||||
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc10_15, %.loc10_18) [template = constants.%tuple.1]
|
||||
// CHECK:STDOUT: %.loc10_13: %.4 = converted %.loc10_19, %tuple [template = constants.%tuple.1]
|
||||
|
||||
+6
-6
@@ -23,9 +23,9 @@ var x: ((i32, i32), i32) = ((12, 76), 6);
|
||||
// CHECK:STDOUT: %.6: type = ptr_type %.4 [template]
|
||||
// CHECK:STDOUT: %.7: type = tuple_type (%.6, i32) [template]
|
||||
// CHECK:STDOUT: %.8: type = ptr_type %.7 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.10: i32 = int_literal 76 [template]
|
||||
// CHECK:STDOUT: %.11: i32 = int_literal 6 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %.10: i32 = int_value 76 [template]
|
||||
// CHECK:STDOUT: %.11: i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: %tuple.1: %.4 = tuple_value (%.9, %.10) [template]
|
||||
// CHECK:STDOUT: %tuple.2: %.5 = tuple_value (%tuple.1, %.11) [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -66,10 +66,10 @@ var x: ((i32, i32), i32) = ((12, 76), 6);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_30: i32 = int_literal 12 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc11_34: i32 = int_literal 76 [template = constants.%.10]
|
||||
// CHECK:STDOUT: %.loc11_30: i32 = int_value 12 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc11_34: i32 = int_value 76 [template = constants.%.10]
|
||||
// CHECK:STDOUT: %.loc11_36.1: %.4 = tuple_literal (%.loc11_30, %.loc11_34)
|
||||
// CHECK:STDOUT: %.loc11_39: i32 = int_literal 6 [template = constants.%.11]
|
||||
// CHECK:STDOUT: %.loc11_39: i32 = int_value 6 [template = constants.%.11]
|
||||
// CHECK:STDOUT: %.loc11_40.1: %.5 = tuple_literal (%.loc11_36.1, %.loc11_39)
|
||||
// CHECK:STDOUT: %.loc11_40.2: ref %.4 = tuple_access file.%x.var, element0
|
||||
// CHECK:STDOUT: %.loc11_36.2: ref i32 = tuple_access %.loc11_40.2, element0
|
||||
|
||||
@@ -41,8 +41,8 @@ fn H() {
|
||||
// CHECK:STDOUT: %.10: type = tuple_type (i32, %.3, i32) [template]
|
||||
// CHECK:STDOUT: %.11: type = tuple_type (i32, %.6, i32) [template]
|
||||
// CHECK:STDOUT: %.12: type = ptr_type %.11 [template]
|
||||
// CHECK:STDOUT: %.13: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.14: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.13: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.14: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -152,11 +152,11 @@ fn H() {
|
||||
// CHECK:STDOUT: %.loc18_36.13: type = converted %.loc18_36.1, constants.%.10 [template = constants.%.10]
|
||||
// CHECK:STDOUT: %v.var: ref %.10 = var v
|
||||
// CHECK:STDOUT: %v: ref %.10 = bind_name v, %v.var
|
||||
// CHECK:STDOUT: %.loc18_41: i32 = int_literal 1 [template = constants.%.13]
|
||||
// CHECK:STDOUT: %.loc18_41: i32 = int_value 1 [template = constants.%.13]
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %.loc18_50.1: ref %.3 = tuple_access %v.var, element1
|
||||
// CHECK:STDOUT: %F.call: init %.3 = call %F.ref() to %.loc18_50.1
|
||||
// CHECK:STDOUT: %.loc18_49: i32 = int_literal 2 [template = constants.%.14]
|
||||
// CHECK:STDOUT: %.loc18_49: i32 = int_value 2 [template = constants.%.14]
|
||||
// CHECK:STDOUT: %.loc18_50.2: %.10 = tuple_literal (%.loc18_41, %F.call, %.loc18_49)
|
||||
// CHECK:STDOUT: %.loc18_50.3: ref i32 = tuple_access %v.var, element0
|
||||
// CHECK:STDOUT: %.loc18_50.4: init i32 = initialize_from %.loc18_41 to %.loc18_50.3 [template = constants.%.13]
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ var y: (i32,) = x;
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_literal 4 [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_value 4 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -59,7 +59,7 @@ var y: (i32,) = x;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_18: i32 = int_literal 4 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_18: i32 = int_value 4 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc11_20.1: %.3 = tuple_literal (%.loc11_18)
|
||||
// CHECK:STDOUT: %.loc11_20.2: init %.3 = tuple_init (%.loc11_18) to file.%x.var [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc11_21: init %.3 = converted %.loc11_20.1, %.loc11_20.2 [template = constants.%tuple]
|
||||
|
||||
+6
-6
@@ -23,8 +23,8 @@ var y: (i32, i32) = x;
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 4 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 102 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 4 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 102 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -88,16 +88,16 @@ var y: (i32, i32) = x;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_literal 4 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_25: i32 = int_literal 102 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_22: i32 = int_value 4 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_25: i32 = int_value 102 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_28: %.3 = tuple_literal (%.loc11_22, %.loc11_25)
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc11_22, %.loc11_25) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc11_29: %.3 = converted %.loc11_28, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %v: %.3 = bind_name v, %.loc11_29
|
||||
// CHECK:STDOUT: %v.ref: %.3 = name_ref v, %v
|
||||
// CHECK:STDOUT: %w: %.3 = bind_name w, %v.ref
|
||||
// CHECK:STDOUT: %.loc14_22: i32 = int_literal 4 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc14_25: i32 = int_literal 102 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc14_22: i32 = int_value 4 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc14_25: i32 = int_value 102 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc14_28.1: %.3 = tuple_literal (%.loc14_22, %.loc14_25)
|
||||
// CHECK:STDOUT: %.loc14_28.2: ref i32 = tuple_access file.%x.var, element0
|
||||
// CHECK:STDOUT: %.loc14_28.3: init i32 = initialize_from %.loc14_22 to %.loc14_28.2 [template = constants.%.5]
|
||||
|
||||
Reference in New Issue
Block a user