Skip to content

Commit

Permalink
Superficial support for Core.BigInt type (#4414)
Browse files Browse the repository at this point in the history
Add a `Core.BigInt` type and a corresponding builtin type in the
toolchain. See [corresponding section of the
design](https://docs.carbon-lang.dev/docs/design/expressions/literals.html#defined-types).

So far this type is not used for anything, and there is no way to create
an instance of it.
  • Loading branch information
zygoloid authored Oct 16, 2024
1 parent 96964ee commit a02dfe0
Show file tree
Hide file tree
Showing 310 changed files with 573 additions and 419 deletions.
1 change: 1 addition & 0 deletions core/prelude/types.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export import library "prelude/types/bool";
// noise in the toolchain tests.
// import library "prelude/types/i32";

fn BigInt() -> type = "big_int.make_type";
fn Int32() -> type = "int.make_type_32";
fn Int(size: i32) -> type = "int.make_type_signed";
fn UInt(size: i32) -> type = "int.make_type_unsigned";
Expand Down
1 change: 1 addition & 0 deletions toolchain/check/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,7 @@ class TypeCompleter {
case SemIR::BuiltinInstKind::Error:
case SemIR::BuiltinInstKind::Invalid:
case SemIR::BuiltinInstKind::BoolType:
case SemIR::BuiltinInstKind::BigIntType:
case SemIR::BuiltinInstKind::IntType:
case SemIR::BuiltinInstKind::FloatType:
case SemIR::BuiltinInstKind::NamespaceType:
Expand Down
4 changes: 4 additions & 0 deletions toolchain/check/eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,10 @@ static auto MakeConstantForBuiltinCall(Context& context, SemIRLoc loc,
return SemIR::ConstantId::NotConstant;
}

case SemIR::BuiltinFunctionKind::BigIntMakeType: {
return context.constant_values().Get(SemIR::InstId::BuiltinBigIntType);
}

case SemIR::BuiltinFunctionKind::IntMakeType32: {
return context.constant_values().Get(SemIR::InstId::BuiltinIntType);
}
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/alias/fail_builtins.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ alias b = bool;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+2, loaded [template = constants.%Bool]
// CHECK:STDOUT: }
// CHECK:STDOUT:
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/array_in_place.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn G() {
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/array_vs_tuple.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn G() {
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/assign_return_value.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn Run() {
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/assign_var.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var b: [i32; 3] = a;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/array/base.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ var c: [(); 5] = ((), (), (), (), (),);
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+38, loaded [template = constants.%Float]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+42, loaded [template = constants.%Float]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/canonicalize_index.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let b: [i32; 3]* = &a;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/fail_bound_negative.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var a: [i32; Negate(1)];
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/fail_bound_overflow.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var b: [1; 39999999999999999993];
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+46, loaded [template = constants.%ImplicitAs]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+52, unloaded
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+71, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)]
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/fail_out_of_bound.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var a: [i32; 1] = (1, 2, 3);
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var b: i32 = a[{.index = 3}.index];
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/fail_type_mismatch.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ var d: [i32; 3] = t2;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+46, loaded [template = constants.%ImplicitAs]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+52, unloaded
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+71, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)]
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/function_param.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn G() -> i32 {
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/index_not_literal.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var b: i32 = a[{.index = 2}.index];
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/nine_elements.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
8 changes: 4 additions & 4 deletions toolchain/check/testdata/as/adapter_conversion.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var b: B = {.x = 1} as B;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down Expand Up @@ -274,7 +274,7 @@ var b: B = {.x = 1} as B;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down Expand Up @@ -443,7 +443,7 @@ var b: B = {.x = 1} as B;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down Expand Up @@ -577,7 +577,7 @@ var b: B = {.x = 1} as B;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+7, loaded [template = constants.%As]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+14, unloaded
// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+33, loaded [symbolic = @As.%.2 (constants.%.12)]
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/as/as_type.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let t: type = (i32, i32) as type;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/as/basic.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn Main() -> i32 {
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/as/fail_no_conversion.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let n: (i32, i32) = 1 as (i32, i32);
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+7, loaded [template = constants.%As]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+14, unloaded
// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+33, loaded [symbolic = @As.%.2 (constants.%.10)]
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/as/fail_not_type.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ let n: i32 = 1 as 2;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+46, loaded [template = constants.%ImplicitAs]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+52, unloaded
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+71, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)]
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/as/overloaded.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let n: i32 = ((4 as i32) as X) as i32;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+7, loaded [template = constants.%As]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+14, unloaded
// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+33, loaded [symbolic = @As.%.2 (constants.%.15)]
Expand Down
2 changes: 2 additions & 0 deletions toolchain/check/testdata/basics/builtin_insts.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// CHECK:STDOUT: instError: {kind: BuiltinInst, arg0: Error, type: typeError}
// CHECK:STDOUT: instAutoType: {kind: BuiltinInst, arg0: AutoType, type: typeTypeType}
// CHECK:STDOUT: instBoolType: {kind: BuiltinInst, arg0: BoolType, type: typeTypeType}
// CHECK:STDOUT: instBigIntType: {kind: BuiltinInst, arg0: BigIntType, type: typeTypeType}
// CHECK:STDOUT: instIntType: {kind: BuiltinInst, arg0: IntType, type: typeTypeType}
// CHECK:STDOUT: instFloatType: {kind: BuiltinInst, arg0: FloatType, type: typeTypeType}
// CHECK:STDOUT: instStringType: {kind: BuiltinInst, arg0: StringType, type: typeTypeType}
Expand All @@ -47,6 +48,7 @@
// CHECK:STDOUT: instError: templateConstant(instError)
// CHECK:STDOUT: instAutoType: templateConstant(instAutoType)
// CHECK:STDOUT: instBoolType: templateConstant(instBoolType)
// CHECK:STDOUT: instBigIntType: templateConstant(instBigIntType)
// CHECK:STDOUT: instIntType: templateConstant(instIntType)
// CHECK:STDOUT: instFloatType: templateConstant(instFloatType)
// CHECK:STDOUT: instStringType: templateConstant(instStringType)
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/basics/builtin_types.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ var test_type: type = i32;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+38, loaded [template = constants.%Float]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+42, loaded [template = constants.%Float]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/basics/fail_bad_run_2.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn Run(n: i32) {}
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ let e: f64 = 5.0e39999999999999999993;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+38, loaded [template = constants.%Float]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+42, loaded [template = constants.%Float]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var y: i32 = x.b;
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/basics/numeric_literals.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ fn F() {
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+38, loaded [template = constants.%Float]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+42, loaded [template = constants.%Float]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/basics/parens.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var b: i32 = ((2));
// CHECK:STDOUT: import Core//prelude/operators/comparison
// CHECK:STDOUT: import Core//prelude/types/bool
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+4, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+9, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down
Loading

0 comments on commit a02dfe0

Please sign in to comment.