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:
+12
-12
@@ -19,14 +19,14 @@ var d: i32 = a[b];
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_literal 2 [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
|
||||
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_literal 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_literal 24 [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 12 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 24 [template]
|
||||
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32) [template]
|
||||
// CHECK:STDOUT: %.8: i32 = int_literal 0 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_literal 1 [template]
|
||||
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.9: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -49,7 +49,7 @@ var d: i32 = a[b];
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_14: i32 = int_literal 2 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc11_14: i32 = int_value 2 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3]
|
||||
@@ -76,22 +76,22 @@ var d: i32 = a[b];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_20: i32 = int_literal 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_24: i32 = int_literal 24 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_24: i32 = int_value 24 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_26.1: %.7 = tuple_literal (%.loc11_20, %.loc11_24)
|
||||
// CHECK:STDOUT: %.loc11_26.2: i32 = int_literal 0 [template = constants.%.8]
|
||||
// CHECK:STDOUT: %.loc11_26.2: i32 = int_value 0 [template = constants.%.8]
|
||||
// CHECK:STDOUT: %.loc11_26.3: ref i32 = array_index file.%a.var, %.loc11_26.2
|
||||
// CHECK:STDOUT: %.loc11_26.4: init i32 = initialize_from %.loc11_20 to %.loc11_26.3 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc11_26.5: i32 = int_literal 1 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc11_26.5: i32 = int_value 1 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc11_26.6: ref i32 = array_index file.%a.var, %.loc11_26.5
|
||||
// CHECK:STDOUT: %.loc11_26.7: init i32 = initialize_from %.loc11_24 to %.loc11_26.6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc11_26.8: init %.3 = array_init (%.loc11_26.4, %.loc11_26.7) to file.%a.var [template = constants.%array]
|
||||
// CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array]
|
||||
// CHECK:STDOUT: assign file.%a.var, %.loc11_27
|
||||
// CHECK:STDOUT: %.loc12: i32 = int_literal 1 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc12: i32 = int_value 1 [template = constants.%.9]
|
||||
// CHECK:STDOUT: assign file.%b.var, %.loc12
|
||||
// CHECK:STDOUT: %a.ref.loc13: ref %.3 = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %.loc13_16: i32 = int_literal 0 [template = constants.%.8]
|
||||
// CHECK:STDOUT: %.loc13_16: i32 = int_value 0 [template = constants.%.8]
|
||||
// CHECK:STDOUT: %.loc13_17.1: ref i32 = array_index %a.ref.loc13, %.loc13_16
|
||||
// CHECK:STDOUT: %.loc13_17.2: i32 = bind_value %.loc13_17.1
|
||||
// CHECK:STDOUT: assign file.%c.var, %.loc13_17.2
|
||||
|
||||
Reference in New Issue
Block a user